lkml.org 
[lkml]   [2015]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v8] seccomp, ptrace: add support for dumping seccomp filters
From
On Mon, Oct 26, 2015 at 3:46 PM, Kees Cook <keescook@chromium.org> wrote:
> On Mon, Oct 26, 2015 at 12:39 AM, Oleg Nesterov <oleg@redhat.com> wrote:
>> On 10/21, Tycho Andersen wrote:
>>>
>>> > And this leads to another question... If we expect that this interface
>>> > can change later, then perhaps PTRACE_SECCOMP_GET_FILTER should also
>>> > dump some header before copy_to_user(fprog->filter) ? Say, just
>>> > "unsigned long version" == 0 for now. So that we can avoid
>>> > PTRACE_SECCOMP_GET_FILTER_V2 in future.
>>>
>>> So this is interesting. Like Kees mentioned, the bulk of the work
>>> would be done by the bpf syscall. We'd still need some way to get
>>> access to the fd itself, which we could (ab)use
>>> PTRACE_SECCOMP_GET_FILTER for, by returning the fd + BPF_MAXINSNS (so
>>> that it doesn't conflict with length) or something like that. Or add a
>>> _V2 as you say. If there is some change we can make to have a nicer
>>> interface than fd + BPF_MAXINSNS to future proof, I'm fine with making
>>> it.
>>
>> Can't comment, this is up to you/Kees ;)
>>
>> So, just in case, let me repeat I am fine with this patch.
>
> Cool, thanks. I'll get this into my tree after kernel summit. Thanks
> for suffering through all this Tycho!

Actually, since this depends on changes in net, could this get pulled
in from that direction?

Acked-by: Kees Cook <keescook@chromium.org>

-Kees

--
Kees Cook
Chrome OS Security


\
 
 \ /
  Last update: 2015-10-26 08:21    [W:0.055 / U:2.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site