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: <416c8ef6-3459-8710-2eb5-870e2c695ceb@infradead.org>
Date:   Tue, 28 Jul 2020 13:07:07 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Andrii Nakryiko <andriin@...com>, bpf@...r.kernel.org,
        netdev@...r.kernel.org, ast@...com, daniel@...earbox.net
Cc:     andrii.nakryiko@...il.com, kernel-team@...com
Subject: Re: [PATCH bpf-next] bpf: fix build without CONFIG_NET when using BPF
 XDP link

On 7/28/20 12:05 PM, Andrii Nakryiko wrote:
> Entire net/core subsystem is not built without CONFIG_NET. linux/netdevice.h
> just assumes that it's always there, so the easiest way to fix this is to
> conditionally compile out bpf_xdp_link_attach() use in bpf/syscall.c.
> 
> Reported-by: Randy Dunlap <rdunlap@...radead.org>
> Fixes: aa8d3a716b59 ("bpf, xdp: Add bpf_link-based XDP attachment API")
> Signed-off-by: Andrii Nakryiko <andriin@...com>

Acked-by: Randy Dunlap <rdunlap@...radead.org> # build-tested

Thanks.

> ---
>  kernel/bpf/syscall.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
> index 0e8c88db7e7a..cd3d599e9e90 100644
> --- a/kernel/bpf/syscall.c
> +++ b/kernel/bpf/syscall.c
> @@ -3923,9 +3923,11 @@ static int link_create(union bpf_attr *attr)
>  	case BPF_PROG_TYPE_SK_LOOKUP:
>  		ret = netns_bpf_link_create(attr, prog);
>  		break;
> +#ifdef CONFIG_NET
>  	case BPF_PROG_TYPE_XDP:
>  		ret = bpf_xdp_link_attach(attr, prog);
>  		break;
> +#endif
>  	default:
>  		ret = -EINVAL;
>  	}
> 


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ