2019-01-28 17:13:36

by Tommi Rantala

[permalink] [raw]
Subject: 4.14 revert "seccomp: add a selftest for get_metadata"

Hi Greg,

Can you please revert this commit in 4.14?

commit e65cd9a20343ea90f576c24c38ee85ab6e7d5fec
Author: Tycho Andersen <[email protected]>
Date: Tue Feb 20 19:47:47 2018 -0700

seccomp: add a selftest for get_metadata

[ Upstream commit d057dc4e35e16050befa3dda943876dab39cbf80 ]

Let's test that we get the flags correctly, and that we preserve
the filter
index across the ptrace(PTRACE_SECCOMP_GET_METADATA) correctly.



PTRACE_SECCOMP_GET_METADATA was only added in 4.16
(26500475ac1b499d8636ff281311d633909f5d20)


And it's also breaking seccomp_bpf.c compilation for me:

seccomp_bpf.c: In function ‘get_metadata’:
seccomp_bpf.c:2878:26: error: storage size of ‘md’ isn’t known
struct seccomp_metadata md;
^~

-Tommi


2019-01-28 17:23:06

by Tycho Andersen

[permalink] [raw]
Subject: Re: 4.14 revert "seccomp: add a selftest for get_metadata"

On Mon, Jan 28, 2019 at 05:13:11PM +0000, Rantala, Tommi T. (Nokia - FI/Espoo) wrote:
> Hi Greg,
>
> Can you please revert this commit in 4.14?
>
> commit e65cd9a20343ea90f576c24c38ee85ab6e7d5fec
> Author: Tycho Andersen <[email protected]>
> Date: Tue Feb 20 19:47:47 2018 -0700
>
> seccomp: add a selftest for get_metadata
>
> [ Upstream commit d057dc4e35e16050befa3dda943876dab39cbf80 ]
>
> Let's test that we get the flags correctly, and that we preserve
> the filter
> index across the ptrace(PTRACE_SECCOMP_GET_METADATA) correctly.
>
>
>
> PTRACE_SECCOMP_GET_METADATA was only added in 4.16
> (26500475ac1b499d8636ff281311d633909f5d20)
>
>
> And it's also breaking seccomp_bpf.c compilation for me:
>
> seccomp_bpf.c: In function ‘get_metadata’:
> seccomp_bpf.c:2878:26: error: storage size of ‘md’ isn’t known
> struct seccomp_metadata md;

Yes, agreed. The get_metadata() stuff went in for 4.16, so anything
before that won't have the struct. Sorry if I missed the stable commit
before.

Cheers,

Tycho

2019-01-28 19:52:28

by Sasha Levin

[permalink] [raw]
Subject: Re: 4.14 revert "seccomp: add a selftest for get_metadata"

On Mon, Jan 28, 2019 at 05:13:11PM +0000, Rantala, Tommi T. (Nokia - FI/Espoo) wrote:
>Hi Greg,
>
>Can you please revert this commit in 4.14?
>
>commit e65cd9a20343ea90f576c24c38ee85ab6e7d5fec
>Author: Tycho Andersen <[email protected]>
>Date: Tue Feb 20 19:47:47 2018 -0700
>
> seccomp: add a selftest for get_metadata
>
> [ Upstream commit d057dc4e35e16050befa3dda943876dab39cbf80 ]
>
> Let's test that we get the flags correctly, and that we preserve
>the filter
> index across the ptrace(PTRACE_SECCOMP_GET_METADATA) correctly.
>
>
>
>PTRACE_SECCOMP_GET_METADATA was only added in 4.16
>(26500475ac1b499d8636ff281311d633909f5d20)
>
>
>And it's also breaking seccomp_bpf.c compilation for me:
>
>seccomp_bpf.c: In function ‘get_metadata’:
>seccomp_bpf.c:2878:26: error: storage size of ‘md’ isn’t known
> struct seccomp_metadata md;

I've queued a revert, sorry about that.

--
Thanks,
Sasha