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]
Date:   Mon, 27 Jul 2020 23:00:51 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>
Subject: Re: linux-next: Tree for Jul 27 (kernel/bpf/syscall.o)

On 7/27/20 10:48 PM, Andrii Nakryiko wrote:
> On Mon, Jul 27, 2020 at 11:58 AM Randy Dunlap <rdunlap@...radead.org> wrote:
>>
>> On 7/27/20 6:23 AM, Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> Changes since 20200724:
>>>
>>
>> on i386:
>> when CONFIG_XPS is not set/enabled:
>>
>> ld: kernel/bpf/syscall.o: in function `__do_sys_bpf':
>> syscall.c:(.text+0x4482): undefined reference to `bpf_xdp_link_attach'
>>
> 
> I can't repro this on x86-64 with CONFIG_XPS unset. Do you mind
> sharing the exact config you've used?

No problem. I see this on i386 or x86_64. I am attaching the x86_64
randconfig file instead of the i386 one.

> I see that kernel/bpf/syscall.c doesn't include linux/netdevice.h
> directly, so something must be preventing netdevice.h to eventually
> get to bpf/syscall.c, but instead of guessing on the fix, I'd like to
> repro it first. Thanks!

The build failure was causing me to see lots of builds failing, so I made
a simple patch so that I could get past this issue.  My patch follows.
Feel free to fix it any way you like.

Thanks.
---
---
 kernel/bpf/syscall.c |    4 ++++
 1 file changed, 4 insertions(+)

--- mmotm-2020-0727-1818.orig/kernel/bpf/syscall.c
+++ mmotm-2020-0727-1818/kernel/bpf/syscall.c
@@ -3924,7 +3924,11 @@ static int link_create(union bpf_attr *a
 		ret = netns_bpf_link_create(attr, prog);
 		break;
 	case BPF_PROG_TYPE_XDP:
+#ifdef CONFIG_XPS
 		ret = bpf_xdp_link_attach(attr, prog);
+#else
+		ret = -EINVAL;
+#endif
 		break;
 	default:
 		ret = -EINVAL;


View attachment "config-r4197" of type "text/plain" (134124 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ