Message ID | 20211120112738.45980-7-laoar.shao@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B51C2C433F5 for <linux-mm@archiver.kernel.org>; Sat, 20 Nov 2021 11:31:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 767CB6B007B; Sat, 20 Nov 2021 06:28:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7186C6B007D; Sat, 20 Nov 2021 06:28:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B9756B007E; Sat, 20 Nov 2021 06:28:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0194.hostedemail.com [216.40.44.194]) by kanga.kvack.org (Postfix) with ESMTP id 4E6466B007B for <linux-mm@kvack.org>; Sat, 20 Nov 2021 06:28:19 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 1267F181DA0A2 for <linux-mm@kvack.org>; Sat, 20 Nov 2021 11:28:09 +0000 (UTC) X-FDA: 78829084698.25.EB632ED Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by imf29.hostedemail.com (Postfix) with ESMTP id CC3939000676 for <linux-mm@kvack.org>; Sat, 20 Nov 2021 11:28:06 +0000 (UTC) Received: by mail-pl1-f172.google.com with SMTP id z6so8944255plk.6 for <linux-mm@kvack.org>; Sat, 20 Nov 2021 03:28:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tEaEqo0LatYc7Bqp4nP+g3PsyWq0ANknSNVk7gGI5oU=; b=dwMQaTe6H58dGLThH9f5dNiTLQTR7wxrd97n6+FoRq4EPM3JuDVu84xxEFhUl6W3y+ 1Mu/DW1NsWZAwXTLhJQrlZCFhhB29VS7mZCbJPR0kdIXQ9WPpF1LBjJt3uDQJLTzWCc0 oiliUIs4wTII45cxT7PG19NzN2+2Xi85fPMefEU5mEs3OXsJbmmORGKc5uOxsSx3p0/b 0fy655YcaSZGhbpcOuFD6x7ceHW5Kr1Lc9y/qkXLMhYUcI1vRme0dXmdQ5ZgtZbbXFyA JrPiQz8xA1WqDLKfoRgz8scX02M4e1okXtvGmYoBEDzjrezOTO8HKwDXPh162cGB24bm FWtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tEaEqo0LatYc7Bqp4nP+g3PsyWq0ANknSNVk7gGI5oU=; b=gBMJdfxjSq1Csegz7oeyxSNNYeRMKyIk9Isbj2yIcvvDeViHu5dTyhVxXI54G2KSgy Hp9oqZwBw8FEYQETKibfeX+mVHUxd4kH1OwMNVtAKYyIS64f8WDxFr2ncZF7Y1Sz0+Mv 7K6fbWmBONcPBIyqgydzHY9bHBOFZpJ7KbNuaqCLENY+AtJspXQ55PAJ7D8/IrXpJ+4e tPIquiRTRjZ9uJ3lMHFu6xBX0Ynh/FOt4S+tBKCY5vgnch2h7NdGK9XmAuN2D+FIsG4Z V5pXfDWNHBgGURaEvDbo8O2eQcksSt7RiHgjQ4w9eh1Vkn9tiMsBPgCPO8sIpJncwVKE oH5w== X-Gm-Message-State: AOAM532eM5Lsl7d29ChDAjiFQhZOU0KcDHVBffQ5mVzis66QKU6Zn0E4 3buztNzKXCQmHFTTvSDA8BU= X-Google-Smtp-Source: ABdhPJxx6IXfHMZUvhVc7t2hNtDO+hU3JjOX4iXLcBdBeDlaYH5wP6HAWIyvMxWolg+i2afGvs9kdw== X-Received: by 2002:a17:902:9a09:b0:142:82e1:6cff with SMTP id v9-20020a1709029a0900b0014282e16cffmr88343798plp.47.1637407687765; Sat, 20 Nov 2021 03:28:07 -0800 (PST) Received: from vultr.guest ([66.42.104.82]) by smtp.gmail.com with ESMTPSA id q17sm2835490pfu.117.2021.11.20.03.28.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Nov 2021 03:28:07 -0800 (PST) From: Yafang Shao <laoar.shao@gmail.com> To: akpm@linux-foundation.org Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, oliver.sang@intel.com, lkp@intel.com, Yafang Shao <laoar.shao@gmail.com>, Andrii Nakryiko <andrii@kernel.org>, David Hildenbrand <david@redhat.com>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>, Alexei Starovoitov <alexei.starovoitov@gmail.com>, Andrii Nakryiko <andrii.nakryiko@gmail.com>, Michal Miroslaw <mirq-linux@rere.qmqm.pl>, Peter Zijlstra <peterz@infradead.org>, Steven Rostedt <rostedt@goodmis.org>, Matthew Wilcox <willy@infradead.org>, Al Viro <viro@zeniv.linux.org.uk>, Kees Cook <keescook@chromium.org>, Petr Mladek <pmladek@suse.com> Subject: [PATCH v2 6/7] tools/bpf/bpftool/skeleton: replace bpf_probe_read_kernel with bpf_probe_read_kernel_str to get task comm Date: Sat, 20 Nov 2021 11:27:37 +0000 Message-Id: <20211120112738.45980-7-laoar.shao@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211120112738.45980-1-laoar.shao@gmail.com> References: <20211120112738.45980-1-laoar.shao@gmail.com> MIME-Version: 1.0 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: CC3939000676 X-Stat-Signature: p8g95bwzq5bb84wgbh81pm9af6qioxmp Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=dwMQaTe6; spf=pass (imf29.hostedemail.com: domain of laoar.shao@gmail.com designates 209.85.214.172 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1637407686-175160 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
task comm cleanups
|
expand
|
diff --git a/tools/bpf/bpftool/skeleton/pid_iter.bpf.c b/tools/bpf/bpftool/skeleton/pid_iter.bpf.c index d9b420972934..f70702fcb224 100644 --- a/tools/bpf/bpftool/skeleton/pid_iter.bpf.c +++ b/tools/bpf/bpftool/skeleton/pid_iter.bpf.c @@ -71,8 +71,8 @@ int iter(struct bpf_iter__task_file *ctx) e.pid = task->tgid; e.id = get_obj_id(file->private_data, obj_type); - bpf_probe_read_kernel(&e.comm, sizeof(e.comm), - task->group_leader->comm); + bpf_probe_read_kernel_str(&e.comm, sizeof(e.comm), + task->group_leader->comm); bpf_seq_write(ctx->meta->seq, &e, sizeof(e)); return 0;