next: s390 allyesconfig fails to compile samples/seccomp
Hi,
I am not relly sure what went wrong, but I've noticed that allyesconfig doesn't compile with my s390 crosscompiler with a strange error messages for linux-next (next-20170106). Linus' tree compiles just fine. It smells like some headers include problems because
$ git diff origin/master..next/master -- samples/seccomp/ doesn't show anything...
samples/seccomp/bpf-helper.h:134:2: error: #error __BITS_PER_LONG value unusable.
#error __BITS_PER_LONG value unusable.
^
In file included from samples/seccomp/bpf-fancy.c:12:0:samples/seccomp/bpf-fancy.c: In function ‘main’:samples/seccomp/bpf-fancy.c:37:11: error: ‘__NR_exit’ undeclared (first use in this function)
SYSCALL(__NR_exit, ALLOW),
^
./usr/include/linux/filter.h:51:69: note: in definition of macro ‘BPF_JUMP’
#define BPF_JUMP(code, k, jt, jf) { (unsigned short)(code), jt, jf, k }
^samples/seccomp/bpf-fancy.c:37:3: note: in expansion of macro ‘SYSCALL’
SYSCALL(__NR_exit, ALLOW),
^samples/seccomp/bpf-fancy.c:37:11: note: each undeclared identifier is reported only once for each function it appears in
SYSCALL(__NR_exit, ALLOW),
^
./usr/include/linux/filter.h:51:69: note: in definition of macro ‘BPF_JUMP’
#define BPF_JUMP(code, k, jt, jf) { (unsigned short)(code), jt, jf, k }
^samples/seccomp/bpf-fancy.c:37:3: note: in expansion of macro ‘SYSCALL’
SYSCALL(__NR_exit, ALLOW),
^samples/seccomp/bpf-fancy.c:38:11: error: ‘__NR_exit_group’ undeclared (first use in this function)
SYSCALL(__NR_exit_group, ALLOW),
^
./usr/include/linux/filter.h:51:69: note: in definition of macro ‘BPF_JUMP’
#define BPF_JUMP(code, k, jt, jf) { (unsigned short)(code), jt, jf, k }
^samples/seccomp/bpf-fancy.c:38:3: note: in expansion of macro ‘SYSCALL’
SYSCALL(__NR_exit_group, ALLOW),
^samples/seccomp/bpf-fancy.c:39:11: error: ‘__NR_write’ undeclared (first use in this function)
SYSCALL(__NR_write, JUMP(&l, write_fd)),
^
./usr/include/linux/filter.h:51:69: note: in definition of macro ‘BPF_JUMP’
#define BPF_JUMP(code, k, jt, jf) { (unsigned short)(code), jt, jf, k }
^samples/seccomp/bpf-fancy.c:39:3: note: in expansion of macro ‘SYSCALL’
SYSCALL(__NR_write, JUMP(&l, write_fd)),
Signature · 2 lines
Michal Hocko SUSE Labs
Quoted 7 lines · Michal Hocko
Hi,
I am not relly sure what went wrong, but I've noticed that allyesconfig doesn't compile with my s390 crosscompiler with a strange error messages for linux-next (next-20170106). Linus' tree compiles just fine. It smells like some headers include problems because$ git diff origin/master..next/master -- samples/seccomp/ doesn't show anything...
Oh, how strange. Did __BITS_PER_LONG move around? That's part of uapi...
Quoted 4 lines
samples/seccomp/bpf-helper.h:134:2: error: #error__BITS_PER_LONGvalue unusable.
#error__BITS_PER_LONGvalue unusable.
^
#include <asm/bitsperlong.h> /* for __BITS_PER_LONG */
Hm, maybe this should be uapi/asm/bitsperlong.h ?
Let me see if I can reproduce this...
-Kees
Signature · 2 lines
Kees Cook Nexus Security
Quoted 17 lines · Kees Cook
Quoted 7 lines · Michal Hocko
Hi,
I am not relly sure what went wrong, but I've noticed that allyesconfig doesn't compile with my s390 crosscompiler with a strange error messages for linux-next (next-20170106). Linus' tree compiles just fine. It smells like some headers include problems because$ git diff origin/master..next/master -- samples/seccomp/ doesn't show anything...Oh, how strange. Did
__BITS_PER_LONGmove around? That's part of uapi...Quoted 4 lines
samples/seccomp/bpf-helper.h:134:2: error: #error__BITS_PER_LONGvalue unusable.
#error__BITS_PER_LONGvalue unusable.
^
Quoted 5 lines
#include <
asm/bitsperlong.h> /* for__BITS_PER_LONG*/Hm, maybe this should be
uapi/asm/bitsperlong.h?Let me see if I can reproduce this...
I don't see the samples error. :(
I do get this, though:
OBJCOPY arch/s390/boot/compressed/vmlinux.bin
GZIP arch/s390/boot/compressed/vmlinux.bin.gz AS arch/s390/boot/compressed/head.o CC arch/s390/boot/compressed/misc.o LD arch/s390/boot/compressed/piggy.o
s390x-linux-gnu-ld: arch/s390/boot/compressed/vmlinux.bin.gz: not in ELF format arch/s390/boot/compressed/Makefile:71: recipe for target 'arch/s390/boot/compressed/piggy.o' failed
make[2]: *** [arch/s390/boot/compressed/piggy.o] Error 1 arch/s390/boot/Makefile:22: recipe for target 'arch/s390/boot/compressed/vmlinux' failed
make[1]: *** [arch/s390/boot/compressed/vmlinux] Error 2 arch/s390/Makefile:119: recipe for target 'bzImage' failed
I'm using:
$ s390x-linux-gnu-gcc --version s390x-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609
-Kees
Signature · 2 lines
Kees Cook Nexus Security
Quoted 10 lines · Kees Cook
Quoted 7 lines · Michal Hocko
Hi,
I am not relly sure what went wrong, but I've noticed that allyesconfig doesn't compile with my s390 crosscompiler with a strange error messages for linux-next (next-20170106). Linus' tree compiles just fine. It smells like some headers include problems because$ git diff origin/master..next/master -- samples/seccomp/ doesn't show anything...Oh, how strange. Did
__BITS_PER_LONGmove around? That's part of uapi...
Yes, and it seems something is broken wrt build system forsamples/seccomp
In file included from samples/seccomp/bpf-fancy.c:20:0:samples/seccomp/bpf-helper.h:17:60: fatal error: uapi/asm/bitsperlong.h: No such file or directory
#include <uapi/asm/bitsperlong.h> /* for __BITS_PER_LONG */
^compilation terminated.
make[2]: *** [samples/seccomp/bpf-fancy.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from samples/seccomp/bpf-helper.c:16:0:samples/seccomp/bpf-helper.h:17:60: fatal error: uapi/asm/bitsperlong.h: No such file or directory
#include <uapi/asm/bitsperlong.h> /* for __BITS_PER_LONG */
Signature · 2 lines
Michal Hocko SUSE Labs