mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* next: s390 allyesconfig fails to compile samples/seccomp
@ 2017-01-06 15:04 Michal Hocko
  2017-01-06 20:18 ` Kees Cook
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Hocko @ 2017-01-06 15:04 UTC (permalink / raw)
  To: Kees Cook; +Cc: LKML

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)),
-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: next: s390 allyesconfig fails to compile samples/seccomp
  2017-01-06 15:04 next: s390 allyesconfig fails to compile samples/seccomp Michal Hocko
@ 2017-01-06 20:18 ` Kees Cook
  2017-01-06 20:53   ` Kees Cook
  2017-01-07 10:21   ` Michal Hocko
  0 siblings, 2 replies; 4+ messages in thread
From: Kees Cook @ 2017-01-06 20:18 UTC (permalink / raw)
  To: Michal Hocko; +Cc: LKML

On Fri, Jan 6, 2017 at 7:04 AM, Michal Hocko <mhocko@kernel.org> wrote:
> 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...


>
> samples/seccomp/bpf-helper.h:134:2: error: #error __BITS_PER_LONG value unusable.
>  #error __BITS_PER_LONG value 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

-- 
Kees Cook
Nexus Security

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: next: s390 allyesconfig fails to compile samples/seccomp
  2017-01-06 20:18 ` Kees Cook
@ 2017-01-06 20:53   ` Kees Cook
  2017-01-07 10:21   ` Michal Hocko
  1 sibling, 0 replies; 4+ messages in thread
From: Kees Cook @ 2017-01-06 20:53 UTC (permalink / raw)
  To: Michal Hocko; +Cc: LKML

On Fri, Jan 6, 2017 at 12:18 PM, Kees Cook <keescook@chromium.org> wrote:
> On Fri, Jan 6, 2017 at 7:04 AM, Michal Hocko <mhocko@kernel.org> wrote:
>> 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...
>
>
>>
>> samples/seccomp/bpf-helper.h:134:2: error: #error __BITS_PER_LONG value unusable.
>>  #error __BITS_PER_LONG value 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...

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

-- 
Kees Cook
Nexus Security

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: next: s390 allyesconfig fails to compile samples/seccomp
  2017-01-06 20:18 ` Kees Cook
  2017-01-06 20:53   ` Kees Cook
@ 2017-01-07 10:21   ` Michal Hocko
  1 sibling, 0 replies; 4+ messages in thread
From: Michal Hocko @ 2017-01-07 10:21 UTC (permalink / raw)
  To: Kees Cook; +Cc: LKML

On Fri 06-01-17 12:18:42, Kees Cook wrote:
> On Fri, Jan 6, 2017 at 7:04 AM, Michal Hocko <mhocko@kernel.org> wrote:
> > 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...

Yes, and it seems something is broken wrt build system for
samples/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 */

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-07 10:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-06 15:04 next: s390 allyesconfig fails to compile samples/seccomp Michal Hocko
2017-01-06 20:18 ` Kees Cook
2017-01-06 20:53   ` Kees Cook
2017-01-07 10:21   ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®