* [GIT PULL] security: seccomp changes for v4.21 @ 2018-12-31 4:15 James Morris 2019-01-02 19:10 ` pr-tracker-bot 2019-01-07 10:15 ` Ingo Molnar 0 siblings, 2 replies; 8+ messages in thread From: James Morris @ 2018-12-31 4:15 UTC (permalink / raw) To: Linus Torvalds; +Cc: linux-kernel, linux-security-module From Kees: "- Add SECCOMP_RET_USER_NOTIF - seccomp fixes for sparse warnings and s390 build (Tycho)" The following changes since commit 1072bd678547f8663cfb81a22fdb50c589e4976e: security: fs: make inode explicitly non-modular (2018-12-12 14:58:51 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-seccomp for you to fetch changes up to 55b8cbe470d103b44104c64dbf89e5cad525d4e0: Merge tag 'seccomp-next-part2' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into next-seccomp (2018-12-17 11:36:26 -0800) ---------------------------------------------------------------- James Morris (2): Merge tag 'seccomp-next' of https://git.kernel.org/.../kees/linux into next-seccomp Merge tag 'seccomp-next-part2' of https://git.kernel.org/.../kees/linux into next-seccomp Tycho Andersen (6): seccomp: hoist struct seccomp_data recalculation higher seccomp: switch system call argument type to void * seccomp: add a return code to trap to userspace samples: add an example of seccomp user trap seccomp: fix poor type promotion seccomp, s390: fix build for syscall type change Documentation/ioctl/ioctl-number.txt | 1 + Documentation/userspace-api/seccomp_filter.rst | 84 +++++ arch/s390/kernel/compat_wrapper.c | 2 +- include/linux/seccomp.h | 9 +- include/linux/syscalls.h | 2 +- include/uapi/linux/seccomp.h | 40 ++- kernel/seccomp.c | 467 ++++++++++++++++++++++++- samples/seccomp/.gitignore | 1 + samples/seccomp/Makefile | 7 +- samples/seccomp/user-trap.c | 375 ++++++++++++++++++++ tools/testing/selftests/seccomp/seccomp_bpf.c | 447 ++++++++++++++++++++++- 11 files changed, 1411 insertions(+), 24 deletions(-) create mode 100644 samples/seccomp/user-trap.c ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL] security: seccomp changes for v4.21 2018-12-31 4:15 [GIT PULL] security: seccomp changes for v4.21 James Morris @ 2019-01-02 19:10 ` pr-tracker-bot 2019-01-07 10:15 ` Ingo Molnar 1 sibling, 0 replies; 8+ messages in thread From: pr-tracker-bot @ 2019-01-02 19:10 UTC (permalink / raw) To: James Morris; +Cc: Linus Torvalds, linux-kernel, linux-security-module The pull request you sent on Mon, 31 Dec 2018 15:15:08 +1100 (AEDT): > git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-seccomp has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/d9a7fa67b4bfe6ce93ee9aab23ae2e7ca0763e84 Thank you! -- Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL] security: seccomp changes for v4.21 2018-12-31 4:15 [GIT PULL] security: seccomp changes for v4.21 James Morris 2019-01-02 19:10 ` pr-tracker-bot @ 2019-01-07 10:15 ` Ingo Molnar 2019-01-07 20:03 ` James Morris 2019-01-07 21:09 ` Kees Cook 1 sibling, 2 replies; 8+ messages in thread From: Ingo Molnar @ 2019-01-07 10:15 UTC (permalink / raw) To: James Morris Cc: Linus Torvalds, linux-kernel, linux-security-module, Thomas Gleixner, Borislav Petkov * James Morris <jmorris@namei.org> wrote: > From Kees: > > "- Add SECCOMP_RET_USER_NOTIF > > - seccomp fixes for sparse warnings and s390 build (Tycho)" > > > > The following changes since commit 1072bd678547f8663cfb81a22fdb50c589e4976e: > > security: fs: make inode explicitly non-modular (2018-12-12 14:58:51 -0800) > > are available in the Git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-seccomp > > for you to fetch changes up to 55b8cbe470d103b44104c64dbf89e5cad525d4e0: > > Merge tag 'seccomp-next-part2' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into next-seccomp (2018-12-17 11:36:26 -0800) > > ---------------------------------------------------------------- > James Morris (2): > Merge tag 'seccomp-next' of https://git.kernel.org/.../kees/linux into next-seccomp > Merge tag 'seccomp-next-part2' of https://git.kernel.org/.../kees/linux into next-seccomp > > Tycho Andersen (6): > seccomp: hoist struct seccomp_data recalculation higher > seccomp: switch system call argument type to void * > seccomp: add a return code to trap to userspace > samples: add an example of seccomp user trap > seccomp: fix poor type promotion > seccomp, s390: fix build for syscall type change > > Documentation/ioctl/ioctl-number.txt | 1 + > Documentation/userspace-api/seccomp_filter.rst | 84 +++++ > arch/s390/kernel/compat_wrapper.c | 2 +- > include/linux/seccomp.h | 9 +- > include/linux/syscalls.h | 2 +- > include/uapi/linux/seccomp.h | 40 ++- > kernel/seccomp.c | 467 ++++++++++++++++++++++++- > samples/seccomp/.gitignore | 1 + > samples/seccomp/Makefile | 7 +- > samples/seccomp/user-trap.c | 375 ++++++++++++++++++++ > tools/testing/selftests/seccomp/seccomp_bpf.c | 447 ++++++++++++++++++++++- > 11 files changed, 1411 insertions(+), 24 deletions(-) > create mode 100644 samples/seccomp/user-trap.c 32-bit x86 allyesconfig doesn't build: /usr/bin/ld: i386:x86-64 architecture of input file `samples/seccomp/user-trap.o' is incompatible with i386 output /usr/bin/ld: samples/seccomp/user-trap.o: file class ELFCLASS64 incompatible with ELFCLASS32 /usr/bin/ld: final link failed: File in wrong format collect2: error: ld returned 1 exit status scripts/Makefile.host:99: recipe for target 'samples/seccomp/user-trap' failed make[2]: *** [samples/seccomp/user-trap] Error 1 Is this a known regression? Thanks, Ingo ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL] security: seccomp changes for v4.21 2019-01-07 10:15 ` Ingo Molnar @ 2019-01-07 20:03 ` James Morris 2019-01-07 21:09 ` Kees Cook 1 sibling, 0 replies; 8+ messages in thread From: James Morris @ 2019-01-07 20:03 UTC (permalink / raw) To: Ingo Molnar, Kees Cook Cc: Linus Torvalds, linux-kernel, linux-security-module, Thomas Gleixner, Borislav Petkov On Mon, 7 Jan 2019, Ingo Molnar wrote: > 32-bit x86 allyesconfig doesn't build: > > /usr/bin/ld: i386:x86-64 architecture of input file `samples/seccomp/user-trap.o' is incompatible with i386 output > /usr/bin/ld: samples/seccomp/user-trap.o: file class ELFCLASS64 incompatible with ELFCLASS32 > /usr/bin/ld: final link failed: File in wrong format > collect2: error: ld returned 1 exit status > scripts/Makefile.host:99: recipe for target 'samples/seccomp/user-trap' failed > make[2]: *** [samples/seccomp/user-trap] Error 1 > > Is this a known regression? > Not that I'm aware of (cc Kees). -- James Morris <jmorris@namei.org> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL] security: seccomp changes for v4.21 2019-01-07 10:15 ` Ingo Molnar 2019-01-07 20:03 ` James Morris @ 2019-01-07 21:09 ` Kees Cook 2019-01-07 21:53 ` Tycho Andersen 1 sibling, 1 reply; 8+ messages in thread From: Kees Cook @ 2019-01-07 21:09 UTC (permalink / raw) To: Ingo Molnar, Tycho Andersen Cc: James Morris, Linus Torvalds, LKML, linux-security-module, Thomas Gleixner, Borislav Petkov On Mon, Jan 7, 2019 at 2:15 AM Ingo Molnar <mingo@kernel.org> wrote: > > > * James Morris <jmorris@namei.org> wrote: > > > From Kees: > > > > "- Add SECCOMP_RET_USER_NOTIF > > > > - seccomp fixes for sparse warnings and s390 build (Tycho)" > > > > > > > > The following changes since commit 1072bd678547f8663cfb81a22fdb50c589e4976e: > > > > security: fs: make inode explicitly non-modular (2018-12-12 14:58:51 -0800) > > > > are available in the Git repository at: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-seccomp > > > > for you to fetch changes up to 55b8cbe470d103b44104c64dbf89e5cad525d4e0: > > > > Merge tag 'seccomp-next-part2' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into next-seccomp (2018-12-17 11:36:26 -0800) > > > > ---------------------------------------------------------------- > > James Morris (2): > > Merge tag 'seccomp-next' of https://git.kernel.org/.../kees/linux into next-seccomp > > Merge tag 'seccomp-next-part2' of https://git.kernel.org/.../kees/linux into next-seccomp > > > > Tycho Andersen (6): > > seccomp: hoist struct seccomp_data recalculation higher > > seccomp: switch system call argument type to void * > > seccomp: add a return code to trap to userspace > > samples: add an example of seccomp user trap > > seccomp: fix poor type promotion > > seccomp, s390: fix build for syscall type change > > > > Documentation/ioctl/ioctl-number.txt | 1 + > > Documentation/userspace-api/seccomp_filter.rst | 84 +++++ > > arch/s390/kernel/compat_wrapper.c | 2 +- > > include/linux/seccomp.h | 9 +- > > include/linux/syscalls.h | 2 +- > > include/uapi/linux/seccomp.h | 40 ++- > > kernel/seccomp.c | 467 ++++++++++++++++++++++++- > > samples/seccomp/.gitignore | 1 + > > samples/seccomp/Makefile | 7 +- > > samples/seccomp/user-trap.c | 375 ++++++++++++++++++++ > > tools/testing/selftests/seccomp/seccomp_bpf.c | 447 ++++++++++++++++++++++- > > 11 files changed, 1411 insertions(+), 24 deletions(-) > > create mode 100644 samples/seccomp/user-trap.c > > 32-bit x86 allyesconfig doesn't build: > > /usr/bin/ld: i386:x86-64 architecture of input file `samples/seccomp/user-trap.o' is incompatible with i386 output > /usr/bin/ld: samples/seccomp/user-trap.o: file class ELFCLASS64 incompatible with ELFCLASS32 > /usr/bin/ld: final link failed: File in wrong format > collect2: error: ld returned 1 exit status > scripts/Makefile.host:99: recipe for target 'samples/seccomp/user-trap' failed > make[2]: *** [samples/seccomp/user-trap] Error 1 > > Is this a known regression? That looks like something is busted in the samples Makefile? Tycho, are you able to reproduce this? -Kees -- Kees Cook ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL] security: seccomp changes for v4.21 2019-01-07 21:09 ` Kees Cook @ 2019-01-07 21:53 ` Tycho Andersen 2019-01-07 22:04 ` Kees Cook 2019-01-08 6:46 ` Ingo Molnar 0 siblings, 2 replies; 8+ messages in thread From: Tycho Andersen @ 2019-01-07 21:53 UTC (permalink / raw) To: Kees Cook Cc: Ingo Molnar, James Morris, Linus Torvalds, LKML, linux-security-module, Thomas Gleixner, Borislav Petkov Hi, On Mon, Jan 07, 2019 at 01:09:09PM -0800, Kees Cook wrote: > On Mon, Jan 7, 2019 at 2:15 AM Ingo Molnar <mingo@kernel.org> wrote: > > > > > > * James Morris <jmorris@namei.org> wrote: > > > > > From Kees: > > > > > > "- Add SECCOMP_RET_USER_NOTIF > > > > > > - seccomp fixes for sparse warnings and s390 build (Tycho)" > > > > > > > > > > > > The following changes since commit 1072bd678547f8663cfb81a22fdb50c589e4976e: > > > > > > security: fs: make inode explicitly non-modular (2018-12-12 14:58:51 -0800) > > > > > > are available in the Git repository at: > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-seccomp > > > > > > for you to fetch changes up to 55b8cbe470d103b44104c64dbf89e5cad525d4e0: > > > > > > Merge tag 'seccomp-next-part2' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into next-seccomp (2018-12-17 11:36:26 -0800) > > > > > > ---------------------------------------------------------------- > > > James Morris (2): > > > Merge tag 'seccomp-next' of https://git.kernel.org/.../kees/linux into next-seccomp > > > Merge tag 'seccomp-next-part2' of https://git.kernel.org/.../kees/linux into next-seccomp > > > > > > Tycho Andersen (6): > > > seccomp: hoist struct seccomp_data recalculation higher > > > seccomp: switch system call argument type to void * > > > seccomp: add a return code to trap to userspace > > > samples: add an example of seccomp user trap > > > seccomp: fix poor type promotion > > > seccomp, s390: fix build for syscall type change > > > > > > Documentation/ioctl/ioctl-number.txt | 1 + > > > Documentation/userspace-api/seccomp_filter.rst | 84 +++++ > > > arch/s390/kernel/compat_wrapper.c | 2 +- > > > include/linux/seccomp.h | 9 +- > > > include/linux/syscalls.h | 2 +- > > > include/uapi/linux/seccomp.h | 40 ++- > > > kernel/seccomp.c | 467 ++++++++++++++++++++++++- > > > samples/seccomp/.gitignore | 1 + > > > samples/seccomp/Makefile | 7 +- > > > samples/seccomp/user-trap.c | 375 ++++++++++++++++++++ > > > tools/testing/selftests/seccomp/seccomp_bpf.c | 447 ++++++++++++++++++++++- > > > 11 files changed, 1411 insertions(+), 24 deletions(-) > > > create mode 100644 samples/seccomp/user-trap.c > > > > 32-bit x86 allyesconfig doesn't build: > > > > /usr/bin/ld: i386:x86-64 architecture of input file `samples/seccomp/user-trap.o' is incompatible with i386 output > > /usr/bin/ld: samples/seccomp/user-trap.o: file class ELFCLASS64 incompatible with ELFCLASS32 > > /usr/bin/ld: final link failed: File in wrong format > > collect2: error: ld returned 1 exit status > > scripts/Makefile.host:99: recipe for target 'samples/seccomp/user-trap' failed > > make[2]: *** [samples/seccomp/user-trap] Error 1 > > > > Is this a known regression? > > That looks like something is busted in the samples Makefile? Tycho, > are you able to reproduce this? Given that the samples build only happens when CROSS_COMPILE is not set, I'll see about digging up a 32-bit box. But I think the patch below should fix it, I'll send it out when I actually get it tested. Sorry for the breakage! Tycho From b53b390ab554ef6e5b995ac050718fd62ed0803e Mon Sep 17 00:00:00 2001 From: Tycho Andersen <tycho@tycho.ws> Date: Mon, 7 Jan 2019 14:46:34 -0700 Subject: [PATCH] samples/seccomp: fix 32-bit build Both the .o and the actual executable need to be built with -m32 in order to link correctly. Signed-off-by: Tycho Andersen <tycho@tycho.ws> Reported-by: Ingo Molnar <mingo@kernel.org> --- samples/seccomp/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/seccomp/Makefile b/samples/seccomp/Makefile index 4920903c8009..a5607668a5c7 100644 --- a/samples/seccomp/Makefile +++ b/samples/seccomp/Makefile @@ -37,6 +37,7 @@ HOSTCFLAGS_bpf-fancy.o += $(MFLAG) HOSTLDLIBS_bpf-direct += $(MFLAG) HOSTLDLIBS_bpf-fancy += $(MFLAG) HOSTLDLIBS_dropper += $(MFLAG) +HOSTLDLIBS_user-trap.o += $(MFLAG) HOSTLDLIBS_user-trap += $(MFLAG) endif always := $(hostprogs-m) -- 2.19.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [GIT PULL] security: seccomp changes for v4.21 2019-01-07 21:53 ` Tycho Andersen @ 2019-01-07 22:04 ` Kees Cook 2019-01-08 6:46 ` Ingo Molnar 1 sibling, 0 replies; 8+ messages in thread From: Kees Cook @ 2019-01-07 22:04 UTC (permalink / raw) To: Tycho Andersen Cc: Ingo Molnar, James Morris, Linus Torvalds, LKML, linux-security-module, Thomas Gleixner, Borislav Petkov On Mon, Jan 7, 2019 at 1:53 PM Tycho Andersen <tycho@tycho.ws> wrote: > > Hi, > > On Mon, Jan 07, 2019 at 01:09:09PM -0800, Kees Cook wrote: > > On Mon, Jan 7, 2019 at 2:15 AM Ingo Molnar <mingo@kernel.org> wrote: > > > > > > > > > * James Morris <jmorris@namei.org> wrote: > > > > > > > From Kees: > > > > > > > > "- Add SECCOMP_RET_USER_NOTIF > > > > > > > > - seccomp fixes for sparse warnings and s390 build (Tycho)" > > > > > > > > > > > > > > > > The following changes since commit 1072bd678547f8663cfb81a22fdb50c589e4976e: > > > > > > > > security: fs: make inode explicitly non-modular (2018-12-12 14:58:51 -0800) > > > > > > > > are available in the Git repository at: > > > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-seccomp > > > > > > > > for you to fetch changes up to 55b8cbe470d103b44104c64dbf89e5cad525d4e0: > > > > > > > > Merge tag 'seccomp-next-part2' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into next-seccomp (2018-12-17 11:36:26 -0800) > > > > > > > > ---------------------------------------------------------------- > > > > James Morris (2): > > > > Merge tag 'seccomp-next' of https://git.kernel.org/.../kees/linux into next-seccomp > > > > Merge tag 'seccomp-next-part2' of https://git.kernel.org/.../kees/linux into next-seccomp > > > > > > > > Tycho Andersen (6): > > > > seccomp: hoist struct seccomp_data recalculation higher > > > > seccomp: switch system call argument type to void * > > > > seccomp: add a return code to trap to userspace > > > > samples: add an example of seccomp user trap > > > > seccomp: fix poor type promotion > > > > seccomp, s390: fix build for syscall type change > > > > > > > > Documentation/ioctl/ioctl-number.txt | 1 + > > > > Documentation/userspace-api/seccomp_filter.rst | 84 +++++ > > > > arch/s390/kernel/compat_wrapper.c | 2 +- > > > > include/linux/seccomp.h | 9 +- > > > > include/linux/syscalls.h | 2 +- > > > > include/uapi/linux/seccomp.h | 40 ++- > > > > kernel/seccomp.c | 467 ++++++++++++++++++++++++- > > > > samples/seccomp/.gitignore | 1 + > > > > samples/seccomp/Makefile | 7 +- > > > > samples/seccomp/user-trap.c | 375 ++++++++++++++++++++ > > > > tools/testing/selftests/seccomp/seccomp_bpf.c | 447 ++++++++++++++++++++++- > > > > 11 files changed, 1411 insertions(+), 24 deletions(-) > > > > create mode 100644 samples/seccomp/user-trap.c > > > > > > 32-bit x86 allyesconfig doesn't build: > > > > > > /usr/bin/ld: i386:x86-64 architecture of input file `samples/seccomp/user-trap.o' is incompatible with i386 output > > > /usr/bin/ld: samples/seccomp/user-trap.o: file class ELFCLASS64 incompatible with ELFCLASS32 > > > /usr/bin/ld: final link failed: File in wrong format > > > collect2: error: ld returned 1 exit status > > > scripts/Makefile.host:99: recipe for target 'samples/seccomp/user-trap' failed > > > make[2]: *** [samples/seccomp/user-trap] Error 1 > > > > > > Is this a known regression? > > > > That looks like something is busted in the samples Makefile? Tycho, > > are you able to reproduce this? > > Given that the samples build only happens when CROSS_COMPILE is not > set, I'll see about digging up a 32-bit box. But I think the patch > below should fix it, I'll send it out when I actually get it tested. Cool, thanks for looking at it! :) > > Sorry for the breakage! > > Tycho > > > From b53b390ab554ef6e5b995ac050718fd62ed0803e Mon Sep 17 00:00:00 2001 > From: Tycho Andersen <tycho@tycho.ws> > Date: Mon, 7 Jan 2019 14:46:34 -0700 > Subject: [PATCH] samples/seccomp: fix 32-bit build > > Both the .o and the actual executable need to be built with -m32 in order > to link correctly. > > Signed-off-by: Tycho Andersen <tycho@tycho.ws> And just for tracking: Fixes: fec7b6690541 ("samples: add an example of seccomp user trap") Thanks! -Kees > Reported-by: Ingo Molnar <mingo@kernel.org> > --- > samples/seccomp/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/samples/seccomp/Makefile b/samples/seccomp/Makefile > index 4920903c8009..a5607668a5c7 100644 > --- a/samples/seccomp/Makefile > +++ b/samples/seccomp/Makefile > @@ -37,6 +37,7 @@ HOSTCFLAGS_bpf-fancy.o += $(MFLAG) > HOSTLDLIBS_bpf-direct += $(MFLAG) > HOSTLDLIBS_bpf-fancy += $(MFLAG) > HOSTLDLIBS_dropper += $(MFLAG) > +HOSTLDLIBS_user-trap.o += $(MFLAG) > HOSTLDLIBS_user-trap += $(MFLAG) > endif > always := $(hostprogs-m) > -- > 2.19.1 > -- Kees Cook ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT PULL] security: seccomp changes for v4.21 2019-01-07 21:53 ` Tycho Andersen 2019-01-07 22:04 ` Kees Cook @ 2019-01-08 6:46 ` Ingo Molnar 1 sibling, 0 replies; 8+ messages in thread From: Ingo Molnar @ 2019-01-08 6:46 UTC (permalink / raw) To: Tycho Andersen Cc: Kees Cook, James Morris, Linus Torvalds, LKML, linux-security-module, Thomas Gleixner, Borislav Petkov * Tycho Andersen <tycho@tycho.ws> wrote: > Hi, > > On Mon, Jan 07, 2019 at 01:09:09PM -0800, Kees Cook wrote: > > On Mon, Jan 7, 2019 at 2:15 AM Ingo Molnar <mingo@kernel.org> wrote: > > > > > > > > > * James Morris <jmorris@namei.org> wrote: > > > > > > > From Kees: > > > > > > > > "- Add SECCOMP_RET_USER_NOTIF > > > > > > > > - seccomp fixes for sparse warnings and s390 build (Tycho)" > > > > > > > > > > > > > > > > The following changes since commit 1072bd678547f8663cfb81a22fdb50c589e4976e: > > > > > > > > security: fs: make inode explicitly non-modular (2018-12-12 14:58:51 -0800) > > > > > > > > are available in the Git repository at: > > > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-seccomp > > > > > > > > for you to fetch changes up to 55b8cbe470d103b44104c64dbf89e5cad525d4e0: > > > > > > > > Merge tag 'seccomp-next-part2' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into next-seccomp (2018-12-17 11:36:26 -0800) > > > > > > > > ---------------------------------------------------------------- > > > > James Morris (2): > > > > Merge tag 'seccomp-next' of https://git.kernel.org/.../kees/linux into next-seccomp > > > > Merge tag 'seccomp-next-part2' of https://git.kernel.org/.../kees/linux into next-seccomp > > > > > > > > Tycho Andersen (6): > > > > seccomp: hoist struct seccomp_data recalculation higher > > > > seccomp: switch system call argument type to void * > > > > seccomp: add a return code to trap to userspace > > > > samples: add an example of seccomp user trap > > > > seccomp: fix poor type promotion > > > > seccomp, s390: fix build for syscall type change > > > > > > > > Documentation/ioctl/ioctl-number.txt | 1 + > > > > Documentation/userspace-api/seccomp_filter.rst | 84 +++++ > > > > arch/s390/kernel/compat_wrapper.c | 2 +- > > > > include/linux/seccomp.h | 9 +- > > > > include/linux/syscalls.h | 2 +- > > > > include/uapi/linux/seccomp.h | 40 ++- > > > > kernel/seccomp.c | 467 ++++++++++++++++++++++++- > > > > samples/seccomp/.gitignore | 1 + > > > > samples/seccomp/Makefile | 7 +- > > > > samples/seccomp/user-trap.c | 375 ++++++++++++++++++++ > > > > tools/testing/selftests/seccomp/seccomp_bpf.c | 447 ++++++++++++++++++++++- > > > > 11 files changed, 1411 insertions(+), 24 deletions(-) > > > > create mode 100644 samples/seccomp/user-trap.c > > > > > > 32-bit x86 allyesconfig doesn't build: > > > > > > /usr/bin/ld: i386:x86-64 architecture of input file `samples/seccomp/user-trap.o' is incompatible with i386 output > > > /usr/bin/ld: samples/seccomp/user-trap.o: file class ELFCLASS64 incompatible with ELFCLASS32 > > > /usr/bin/ld: final link failed: File in wrong format > > > collect2: error: ld returned 1 exit status > > > scripts/Makefile.host:99: recipe for target 'samples/seccomp/user-trap' failed > > > make[2]: *** [samples/seccomp/user-trap] Error 1 > > > > > > Is this a known regression? > > > > That looks like something is busted in the samples Makefile? Tycho, > > are you able to reproduce this? > > Given that the samples build only happens when CROSS_COMPILE is not > set, I'll see about digging up a 32-bit box. But I think the patch > below should fix it, I'll send it out when I actually get it tested. > > Sorry for the breakage! > > Tycho > > > From b53b390ab554ef6e5b995ac050718fd62ed0803e Mon Sep 17 00:00:00 2001 > From: Tycho Andersen <tycho@tycho.ws> > Date: Mon, 7 Jan 2019 14:46:34 -0700 > Subject: [PATCH] samples/seccomp: fix 32-bit build > > Both the .o and the actual executable need to be built with -m32 in order > to link correctly. > > Signed-off-by: Tycho Andersen <tycho@tycho.ws> > Reported-by: Ingo Molnar <mingo@kernel.org> > --- > samples/seccomp/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/samples/seccomp/Makefile b/samples/seccomp/Makefile > index 4920903c8009..a5607668a5c7 100644 > --- a/samples/seccomp/Makefile > +++ b/samples/seccomp/Makefile > @@ -37,6 +37,7 @@ HOSTCFLAGS_bpf-fancy.o += $(MFLAG) > HOSTLDLIBS_bpf-direct += $(MFLAG) > HOSTLDLIBS_bpf-fancy += $(MFLAG) > HOSTLDLIBS_dropper += $(MFLAG) > +HOSTLDLIBS_user-trap.o += $(MFLAG) That did the trick - thanks! Ingo ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-01-08 6:46 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-12-31 4:15 [GIT PULL] security: seccomp changes for v4.21 James Morris 2019-01-02 19:10 ` pr-tracker-bot 2019-01-07 10:15 ` Ingo Molnar 2019-01-07 20:03 ` James Morris 2019-01-07 21:09 ` Kees Cook 2019-01-07 21:53 ` Tycho Andersen 2019-01-07 22:04 ` Kees Cook 2019-01-08 6:46 ` Ingo Molnar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).