[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201909181031.1EE73B4@keescook>
Date: Wed, 18 Sep 2019 10:33:09 -0700
From: Kees Cook <keescook@...omium.org>
To: Tyler Hicks <tyhicks@...onical.com>
Cc: Christian Brauner <christian.brauner@...ntu.com>,
luto@...capital.net, jannh@...gle.com, wad@...omium.org,
shuah@...nel.org, ast@...nel.org, daniel@...earbox.net,
kafai@...com, songliubraving@...com, yhs@...com,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
netdev@...r.kernel.org, bpf@...r.kernel.org,
Tycho Andersen <tycho@...ho.ws>, stable@...r.kernel.org
Subject: Re: [PATCH 2/4] seccomp: add two missing ptrace ifdefines
On Wed, Sep 18, 2019 at 11:15:12AM +0200, Tyler Hicks wrote:
> On 2019-09-18 10:48:31, Christian Brauner wrote:
> > Add tw missing ptrace ifdefines to avoid compilation errors on systems
> > that do not provide PTRACE_EVENTMSG_SYSCALL_ENTRY or
> > PTRACE_EVENTMSG_SYSCALL_EXIT or:
> >
> > gcc -Wl,-no-as-needed -Wall seccomp_bpf.c -lpthread -o seccomp_bpf
> > In file included from seccomp_bpf.c:52:0:
> > seccomp_bpf.c: In function ‘tracer_ptrace’:
> > seccomp_bpf.c:1792:20: error: ‘PTRACE_EVENTMSG_SYSCALL_ENTRY’ undeclared (first use in this function); did you mean ‘PTRACE_EVENT_CLONE’?
> > EXPECT_EQ(entry ? PTRACE_EVENTMSG_SYSCALL_ENTRY
> > ^
> > ../kselftest_harness.h:608:13: note: in definition of macro ‘__EXPECT’
> > __typeof__(_expected) __exp = (_expected); \
> > ^~~~~~~~~
> > seccomp_bpf.c:1792:2: note: in expansion of macro ‘EXPECT_EQ’
> > EXPECT_EQ(entry ? PTRACE_EVENTMSG_SYSCALL_ENTRY
> > ^~~~~~~~~
> > seccomp_bpf.c:1792:20: note: each undeclared identifier is reported only once for each function it appears in
> > EXPECT_EQ(entry ? PTRACE_EVENTMSG_SYSCALL_ENTRY
> > ^
> > ../kselftest_harness.h:608:13: note: in definition of macro ‘__EXPECT’
> > __typeof__(_expected) __exp = (_expected); \
> > ^~~~~~~~~
> > seccomp_bpf.c:1792:2: note: in expansion of macro ‘EXPECT_EQ’
> > EXPECT_EQ(entry ? PTRACE_EVENTMSG_SYSCALL_ENTRY
> > ^~~~~~~~~
> > seccomp_bpf.c:1793:6: error: ‘PTRACE_EVENTMSG_SYSCALL_EXIT’ undeclared (first use in this function); did you mean ‘PTRACE_EVENTMSG_SYSCALL_ENTRY’?
> > : PTRACE_EVENTMSG_SYSCALL_EXIT, msg);
> > ^
> > ../kselftest_harness.h:608:13: note: in definition of macro ‘__EXPECT’
> > __typeof__(_expected) __exp = (_expected); \
> > ^~~~~~~~~
> > seccomp_bpf.c:1792:2: note: in expansion of macro ‘EXPECT_EQ’
> > EXPECT_EQ(entry ? PTRACE_EVENTMSG_SYSCALL_ENTRY
> > ^~~~~~~~~
> >
> > Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace")
>
> I think this Fixes line is incorrect and should be changed to:
>
> Fixes: 201766a20e30 ("ptrace: add PTRACE_GET_SYSCALL_INFO request")
>
> With that changed,
>
> Reviewed-by: Tyler Hicks <tyhicks@...onical.com>
This is actually fixed in -next already (and, yes, with the Fixes line
Tyler has mentioned):
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=next&id=69b2d3c5924273a0ae968d3818210fc57a1b9d07
--
Kees Cook
Powered by blists - more mailing lists