Skip to contentSkip to conversation

seccomp update for v5.18-rc1

GIT PULL Kees Cook 2 participants 3 messages Mar 21, 2022 – Mar 22, 2022

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

Hi Linus,

Please pull this tiny seccomp update for v5.18-rc1.

Thanks!

-Kees

The following changes since commit eed09ad261822a7bdc441ed192c6f444375e5527:

samples/seccomp: Adjust sample to also provide kill option (2022-02-10 19:09:12 -0800)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/seccomp-v5.18-rc1

for you to fetch changes up to b5caa8dd9cc8ad5126f06e9266c326d38a1fc6d2:

samples/seccomp: Improve arch hints (2022-02-13 10:16:25 -0800)

----------------------------------------------------------------
seccomp update for v5.18-rc1

- Improve architecture hints in sample (Kees Cook)

----------------------------------------------------------------
Kees Cook (1):
samples/seccomp: Improve arch hints

 samples/seccomp/dropper.c | 84 ++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 73 insertions(+), 11 deletions(-)
Signature · 1 line
Kees Cook
#1 lore raw
Quoted 2 lines · Kees Cook

Please pull this tiny seccomp update for v5.18-rc1.

Well, that *really* didn't work at all.

In file included from samples/seccomp/dropper.c:29:
usr/include/linux/ptrace.h:50: warning: "PTRACE_GETREGSET" redefined

     50 | #define PTRACE_GETREGSET        0x4204
        |

In file included from samples/seccomp/dropper.c:24:
/usr/include/sys/ptrace.h:153: note: this is the location of the
previous definition
153 | #define PTRACE_GETREGSET PTRACE_GETREGSET
|
[...]

.. and a lot of similar warnings.

Yeah, that sample code is horrible, and mixes kernel headers with regular user-space headers.

It did that before too, it just does it much more now, and simply doesn't work. I'm sure this probably only happens on some distros, but that's what you get when you play those kinds of broken games.

Pulled and immediately unpulled. That sample probably needs to just be removed.

Linus

author
#2 lore raw
Quoted 10 lines · Linus Torvalds
Quoted 2 lines · Kees Cook

Please pull this tiny seccomp update for v5.18-rc1.

Well, that *really* didn't work at all.

In file included from samples/seccomp/dropper.c:29:
usr/include/linux/ptrace.h:50: warning: "PTRACE_GETREGSET" redefined

    50 | #define PTRACE_GETREGSET        0x4204
       |
Quoted 8 lines

In file included from samples/seccomp/dropper.c:24:
/usr/include/sys/ptrace.h:153: note: this is the location of the
previous definition
153 | #define PTRACE_GETREGSET PTRACE_GETREGSET

       |

[...]

.. and a lot of similar warnings.

Oh, eww. Apologies! That didn't happen for my builders, but yeah, that code is super fragile anyway, so this just confirms my suspicion that the changes weren't useful. I'll drop it from my tree.

Signature · 1 line
Kees Cook