lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZHeCPYcq23gp1hRa@bombadil.infradead.org>
Date:   Wed, 31 May 2023 10:22:05 -0700
From:   Luis Chamberlain <mcgrof@...nel.org>
To:     Maninder Singh <maninder1.s@...sung.com>
Cc:     ast@...nel.org, daniel@...earbox.net, john.fastabend@...il.com,
        andrii@...nel.org, martin.lau@...ux.dev, song@...nel.org,
        yhs@...com, kpsingh@...nel.org, sdf@...gle.com, haoluo@...gle.com,
        jolsa@...nel.org, thunder.leizhen@...wei.com, boqun.feng@...il.com,
        vincenzopalazzodev@...il.com, ojeda@...nel.org, jgross@...e.com,
        brauner@...nel.org, michael.christie@...cle.com,
        samitolvanen@...gle.com, glider@...gle.com, peterz@...radead.org,
        keescook@...omium.org, stephen.s.brennan@...cle.com,
        alan.maguire@...cle.com, pmladek@...e.com,
        linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
        Onkarnath <onkarnath.1@...sung.com>
Subject: Re: [PATCH v2 1/2] bpf: make defination of bpf_dump_raw_ok based on
 CONFIG_KALLSYMS

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@...nel.org>

  Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ