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:   Fri, 25 May 2018 09:29:11 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Andrey Ignatov <rdna@...com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, kafai@...com,
        ast@...nel.org, daniel@...earbox.net, kernel-team@...com
Subject: Re: [PATCH v4 bpf-next 1/6] bpf: Define cgroup_bpf_enabled for
 CONFIG_CGROUP_BPF=n

On Fri, May 25, 2018 at 08:55:22AM -0700, Andrey Ignatov wrote:
> Static key is used to enable/disable cgroup-bpf related code paths at
> run time.
> 
> Though it's not defined when cgroup-bpf is disabled at compile time,
> i.e. CONFIG_CGROUP_BPF=n, and if some code wants to use it, it has to do
> this:
> 
> 	#ifdef CONFIG_CGROUP_BPF
> 		if (cgroup_bpf_enabled) {
> 			/* ... some work ... */
> 		}
> 	#endif
> 
> This code can be simplified by setting cgroup_bpf_enabled to 0 for
> CONFIG_CGROUP_BPF=n case:
> 
> 	if (cgroup_bpf_enabled) {
> 		/* ... some work ... */
> 	}
> 
> And it aligns well with existing BPF_CGROUP_RUN_PROG_* macros that
> defined for both states of CONFIG_CGROUP_BPF.
> 
> Signed-off-by: Andrey Ignatov <rdna@...com>

Acked-by: Alexei Starovoitov <ast@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ