Thread (16 messages) 16 messages, 4 authors, 2015-10-02

Re: v5 of seccomp filter c/r patches

From: Tycho Andersen <hidden>
Date: 2015-10-02 22:59:19
Also in: lkml, netdev

On Sat, Oct 03, 2015 at 12:57:49AM +0200, Daniel Borkmann wrote:
On 10/03/2015 12:44 AM, Tycho Andersen wrote:
quoted
On Fri, Oct 02, 2015 at 02:10:24PM -0700, Kees Cook wrote:
...
quoted
Ok, how about,

struct sock_filter insns[BPF_MAXINSNS];
insn_cnt = ptrace(PTRACE_SECCOMP_GET_FILTER, pid, insns, i);
Would also be good that when the storage buffer (insns) is NULL,
it just returns you the number of sock_filter insns (or 0 when
nothing attached).

That would be consistent with classic socket filters (see
sk_get_filter()), and user space could allocate a specific
size instead of always passing in max insns.
Yep, the current set does this with SECCOMP_FD_DUMP and I agree that
it's nice behavior, so I'll plan on preserving it.

Thanks,

Tycho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help