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] [day] [month] [year] [list]
Date:   Tue, 09 Feb 2021 20:12:28 -0800
From:   Joe Perches <joe@...ches.com>
To:     Song Liu <songliubraving@...com>
Cc:     open list <linux-kernel@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>, Andy Whitcroft <apw@...onical.com>
Subject: Re: [PATCH v4] checkpatch: do not apply "initialise globals to 0"
 check to BPF progs

On Wed, 2021-02-10 at 04:07 +0000, Song Liu wrote:
> > On Feb 9, 2021, at 6:10 PM, Joe Perches <joe@...ches.com> wrote:
> > On Tue, 2021-02-09 at 13:19 -0800, Song Liu wrote:
> > > BPF programs explicitly initialise global variables to 0 to make sure
> > > clang (v10 or older) do not put the variables in the common section.
> > 
> > Acked-by: Joe Perches <joe@...ches.com>
> > 
> > So the patch is OK now, but I have a question about the concept:
> > 
> > Do you mean that these initialized to 0 global variables
> > should go into bss or another section?
> 
> We want these variables to go to bss. 

OK, then the patch is fine.

> > Perhaps it'd be useful to somehow mark variables into specific
> > sections rather than bss when initialized to 0 and data when not
> > initialized to 0.
> 
> Currently, libbpf expects zero initialized global data in bss. This 
> convention works well so far. Is there any reason that we specify 
> section for global data? 

There's no need I know of.

cheers, Joe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ