From: Luis Chamberlain <mcgrof@kernel.org>
To: Maninder Singh <maninder1.s@samsung.com>
Cc: ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com,
andrii@kernel.org, martin.lau@linux.dev, song@kernel.org,
yhs@fb.com, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, jolsa@kernel.org, thunder.leizhen@huawei.com,
boqun.feng@gmail.com, vincenzopalazzodev@gmail.com,
ojeda@kernel.org, jgross@suse.com, brauner@kernel.org,
michael.christie@oracle.com, samitolvanen@google.com,
glider@google.com, peterz@infradead.org, keescook@chromium.org,
stephen.s.brennan@oracle.com, alan.maguire@oracle.com,
pmladek@suse.com, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org, Onkarnath <onkarnath.1@samsung.com>
Subject: Re: [PATCH v2 1/2] bpf: make defination of bpf_dump_raw_ok based on CONFIG_KALLSYMS
Date: Wed, 31 May 2023 10:22:05 -0700 [thread overview]
Message-ID: <ZHeCPYcq23gp1hRa@bombadil.infradead.org> (raw)
In-Reply-To: <20230531084745.877337-1-maninder1.s@samsung.com>
On Wed, May 31, 2023 at 02:17:44PM +0530, Maninder Singh wrote:
> No functional change with this commit.
>
> As of now bpf_dump_raw_ok() is dependent on kallsyms_show_value().
> Rearranging the code to return false directly in defination of
> bpf_dump_raw_ok() based on CONFIG_KALLSYMS.
>
> @reason: next patch will make kallsyms_show_value() defination
> generic and bpf_dump_raw_ok() will return true otherwise.
This reads a bit funny and the split here doesn't help the patch
reviewier, so you can help with that a bit with the commit log
and be a bit clearer to throw in the few pieces of nuggets the
reader should be aware of when reviewing your patch right away.
So how about instaed:
bpf_dump_raw_ok() depends on kallsyms_show_value() and we already
have a false definition for the !CONFIG_KALLSYMS case. But we'll
soon expand on kallsyms_show_value() and so to make the code
easier to follow just provide a direct !CONFIG_KALLSYMS definition
for bpf_dump_raw_ok() as well.
This makes it easier to read and makes it clear bpf_dump_raw_ok()
will immediately return false when !CONFIG_KALLSYMS, making it
easier to understand what happens for heavy users such as bfp.
With this you can add:
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Luis
prev parent reply other threads:[~2023-05-31 17:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230531084800epcas5p1c02d5a7ffcef2bb7cf626bf52beb0eee@epcas5p1.samsung.com>
2023-05-31 8:47 ` Maninder Singh
[not found] ` <CGME20230531084808epcas5p4a782bf6bb5655f2d320c246057e7bb63@epcas5p4.samsung.com>
2023-05-31 8:47 ` [PATCH v2 2/2] kallsyms: add kallsyms_show_value defination in all cases Maninder Singh
2023-05-31 17:26 ` Luis Chamberlain
2023-05-31 17:22 ` Luis Chamberlain [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZHeCPYcq23gp1hRa@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=boqun.feng@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=daniel@iogearbox.net \
--cc=glider@google.com \
--cc=haoluo@google.com \
--cc=jgross@suse.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=keescook@chromium.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maninder1.s@samsung.com \
--cc=martin.lau@linux.dev \
--cc=michael.christie@oracle.com \
--cc=ojeda@kernel.org \
--cc=onkarnath.1@samsung.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=samitolvanen@google.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=stephen.s.brennan@oracle.com \
--cc=thunder.leizhen@huawei.com \
--cc=vincenzopalazzodev@gmail.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®