[RESEND PATCH 0/2][SRU][DISCO][EOAN] seccomp: fix selftests compilation

Kleber Souza kleber.souza at canonical.com
Mon Oct 28 16:40:04 UTC 2019


On 22.10.19 11:36, Christian Brauner wrote:
> Hey everyone,
> 
> BugLink: https://bugs.launchpad.net/bugs/1849281
> 
> This contains two small fixes for the seccomp selftests so they can be
> compiled on older kernels.
> The first patch is upstream, the second one is in Kees tree targeted for
> inclusion in v5.5. The latter one needs to be backported because we
> backported the SECCOMP_USER_NOTIF_FLAG_CONTINUE feature
> (cf. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1847744)
> 
> Thanks!
> Christian
> 
> Christian Brauner (1):
>   UBUNTU: SAUCE: seccomp: fix SECCOMP_USER_NOTIF_FLAG_CONTINUE test
> 
> Tycho Andersen (1):
>   selftests/seccomp: fix build on older kernels
> 
>  tools/testing/selftests/seccomp/seccomp_bpf.c | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 

Hi Christian,

When compiling your seccomp testcase I get the following error
when doing it in a disco VM (with or without these follow up
fixes):

make[1]: Entering directory '/home/ubuntu/disco/linux/tools/testing/selftests/seccomp'
gcc -Wl,-no-as-needed -Wall  seccomp_bpf.c -lpthread -o seccomp_bpf
seccomp_bpf.c: In function ‘user_notification_continue’:
seccomp_bpf.c:3074:26: warning: overflow in conversion from ‘long int’ to ‘__s32’ {aka ‘int’} changes value from ‘116983961184613’ to ‘1936943461’ [-Woverflow]
 #define USER_NOTIF_MAGIC 116983961184613L
                          ^~~~~~~~~~~~~~~~
seccomp_bpf.c:3535:15: note: in expansion of macro ‘USER_NOTIF_MAGIC’
  resp.error = USER_NOTIF_MAGIC;
               ^~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccNnI8Ei.o: in function `user_notification_continue':
seccomp_bpf.c:(.text+0x2e226): undefined reference to `BIT'


Interesting fact is that I don't get this error in a disco
chroot (they compile fine with the fixes).


Could you please investigate it?


Thanks,
Kleber



More information about the kernel-team mailing list