Skip to contentSkip to conversation

samples/seccomp: fix 32-bit build

PATCH In review Tycho Andersen 4 participants 4 messages Jan 7, 2019 – Jan 8, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 samples/seccomp: fix 32-bit build

Both the .o and the actual executable need to be built with -m32 in order to link correctly.

Fixes fec7b6690541 ("samples: add an example of seccomp user trap")

---
I guess x86 can pick this up directly? Not sure where it should go exactly.

---
 samples/seccomp/Makefile | 1 +
 1 file changed, 1 insertion(+)
samples/seccomp/Makefile +1 -0
index 4920903c8009..fb43a814d4c0 100644
@@ -34,6 +34,7 @@ HOSTCFLAGS_bpf-direct.o += $(MFLAG)
 HOSTCFLAGS_dropper.o += $(MFLAG)
 HOSTCFLAGS_bpf-helper.o += $(MFLAG)
 HOSTCFLAGS_bpf-fancy.o += $(MFLAG)
+HOSTCFLAGS_user-trap.o += $(MFLAG)
 HOSTLDLIBS_bpf-direct += $(MFLAG)
 HOSTLDLIBS_bpf-fancy += $(MFLAG)
 HOSTLDLIBS_dropper += $(MFLAG)
Signature · 1 line
2.19.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Tycho Andersen

Both the .o and the actual executable need to be built with -m32 in order to link correctly.

Fixes fec7b6690541 ("samples: add an example of seccomp user trap")
Quoted 3 lines

---
I guess x86 can pick this up directly? Not sure where it should go exactly.

Ingo, can you snag this? (It's a more direct path, otherwise I can take it via seccomp, which will go through my tree then James's tree...)

-Kees

Quoted 19 lines
---
 samples/seccomp/Makefile | 1 +
 1 file changed, 1 insertion(+)
samples/seccomp/Makefile +1 -1
index 4920903c8009..fb43a814d4c0 100644
@@ -34,6 +34,7 @@ HOSTCFLAGS_bpf-direct.o += $(MFLAG)
 HOSTCFLAGS_dropper.o += $(MFLAG)
 HOSTCFLAGS_bpf-helper.o += $(MFLAG)
 HOSTCFLAGS_bpf-fancy.o += $(MFLAG)
+HOSTCFLAGS_user-trap.o += $(MFLAG)
 HOSTLDLIBS_bpf-direct += $(MFLAG)
 HOSTLDLIBS_bpf-fancy += $(MFLAG)
 HOSTLDLIBS_dropper += $(MFLAG)
--

2.19.1

Signature · 1 line
Kees Cook
#2 lore raw
Quoted 11 lines · Kees Cook
Quoted 7 lines · Tycho Andersen

Both the .o and the actual executable need to be built with -m32 in order to link correctly.

Fixes fec7b6690541 ("samples: add an example of seccomp user trap")
Quoted 7 lines
Quoted 3 lines

---
I guess x86 can pick this up directly? Not sure where it should go exactly.

Ingo, can you snag this? (It's a more direct path, otherwise I can take it via seccomp, which will go through my tree then James's tree...)

Sure - applied it to x86/urgent.

Thanks,

Ingo

#3 lore raw

[tip:x86/urgent] samples/seccomp: Fix 32-bit build

In reply to Tycho Andersen
samples/seccomp: Fix 32-bit build
Commit-ID:  a77d1d196bc63b37d9b4d1b614884669e8e79d32
Gitweb:     https://git.kernel.org/tip/a77d1d196bc63b37d9b4d1b614884669e8e79d32
Author:     Tycho Andersen <[email protected]>
AuthorDate: Mon, 7 Jan 2019 16:16:31 -0700
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 8 Jan 2019 07:45:01 +0100

samples/seccomp: Fix 32-bit build

Both the .o and the actual executable need to be built with -m32 in order to link correctly.

Cc Borislav Petkov <[email protected]>
Cc James Morris <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Fixes fec7b6690541 ("samples: add an example of seccomp user trap")
---
 samples/seccomp/Makefile | 1 +
 1 file changed, 1 insertion(+)
samples/seccomp/Makefile +1 -0
index 4920903c8009..fb43a814d4c0 100644
@@ -34,6 +34,7 @@ HOSTCFLAGS_bpf-direct.o += $(MFLAG)
 HOSTCFLAGS_dropper.o += $(MFLAG)
 HOSTCFLAGS_bpf-helper.o += $(MFLAG)
 HOSTCFLAGS_bpf-fancy.o += $(MFLAG)
+HOSTCFLAGS_user-trap.o += $(MFLAG)
 HOSTLDLIBS_bpf-direct += $(MFLAG)
 HOSTLDLIBS_bpf-fancy += $(MFLAG)
 HOSTLDLIBS_dropper += $(MFLAG)