Re: [PATCH] net: filter: fix upper BPF instruction limit

2014-06-20 Thread Daniel Borkmann
On 06/20/2014 06:48 PM, Kees Cook wrote: ... Are there any plans to put and extend test cases from [1] via user space side into the kernel self-test directory, i.e. into something like tools/testing/selftests/seccomp/ so that in future new tests can be added or run from there? Might be worth to c

Re: [PATCH] net: filter: fix upper BPF instruction limit

2014-06-20 Thread Kees Cook
On Fri, Jun 20, 2014 at 3:13 AM, Daniel Borkmann wrote: > Hi Kees, > > > On 06/19/2014 01:28 AM, Kees Cook wrote: >> >> On Wed, Jun 18, 2014 at 4:19 PM, Alexei Starovoitov >> wrote: >>> >>> On Wed, Jun 18, 2014 at 3:55 PM, Kees Cook wrote: On Wed, Jun 18, 2014 at 3:48 PM, Alexei Starov

Re: [PATCH] net: filter: fix upper BPF instruction limit

2014-06-20 Thread Daniel Borkmann
Hi Kees, On 06/19/2014 01:28 AM, Kees Cook wrote: On Wed, Jun 18, 2014 at 4:19 PM, Alexei Starovoitov wrote: On Wed, Jun 18, 2014 at 3:55 PM, Kees Cook wrote: On Wed, Jun 18, 2014 at 3:48 PM, Alexei Starovoitov wrote: On Wed, Jun 18, 2014 at 3:34 PM, Kees Cook wrote: ... I wonder how di

Re: [PATCH] net: filter: fix upper BPF instruction limit

2014-06-18 Thread David Miller
From: Kees Cook Date: Wed, 18 Jun 2014 15:34:57 -0700 > The original checks (via sk_chk_filter) for instruction count uses ">", > not ">=", so changing this in sk_convert_filter has the potential to break > existing seccomp filters that used exactly BPF_MAXINSNS many instructions. > > Fixes: bd4

Re: [PATCH] net: filter: fix upper BPF instruction limit

2014-06-18 Thread Kees Cook
On Wed, Jun 18, 2014 at 4:19 PM, Alexei Starovoitov wrote: > On Wed, Jun 18, 2014 at 3:55 PM, Kees Cook wrote: >> On Wed, Jun 18, 2014 at 3:48 PM, Alexei Starovoitov >> wrote: >>> On Wed, Jun 18, 2014 at 3:34 PM, Kees Cook wrote: The original checks (via sk_chk_filter) for instruction cou

Re: [PATCH] net: filter: fix upper BPF instruction limit

2014-06-18 Thread Alexei Starovoitov
On Wed, Jun 18, 2014 at 3:55 PM, Kees Cook wrote: > On Wed, Jun 18, 2014 at 3:48 PM, Alexei Starovoitov wrote: >> On Wed, Jun 18, 2014 at 3:34 PM, Kees Cook wrote: >>> The original checks (via sk_chk_filter) for instruction count uses ">", >>> not ">=", so changing this in sk_convert_filter has

Re: [PATCH] net: filter: fix upper BPF instruction limit

2014-06-18 Thread Kees Cook
On Wed, Jun 18, 2014 at 3:48 PM, Alexei Starovoitov wrote: > On Wed, Jun 18, 2014 at 3:34 PM, Kees Cook wrote: >> The original checks (via sk_chk_filter) for instruction count uses ">", >> not ">=", so changing this in sk_convert_filter has the potential to break >> existing seccomp filters that

Re: [PATCH] net: filter: fix upper BPF instruction limit

2014-06-18 Thread Alexei Starovoitov
On Wed, Jun 18, 2014 at 3:34 PM, Kees Cook wrote: > The original checks (via sk_chk_filter) for instruction count uses ">", > not ">=", so changing this in sk_convert_filter has the potential to break > existing seccomp filters that used exactly BPF_MAXINSNS many instructions. > > Fixes: bd4cf0ed3

Re: [PATCH] net: filter: fix upper BPF instruction limit

2014-06-18 Thread Daniel Borkmann
On 06/19/2014 12:34 AM, Kees Cook wrote: The original checks (via sk_chk_filter) for instruction count uses ">", not ">=", so changing this in sk_convert_filter has the potential to break existing seccomp filters that used exactly BPF_MAXINSNS many instructions. Fixes: bd4cf0ed331a ("net: filter

[PATCH] net: filter: fix upper BPF instruction limit

2014-06-18 Thread Kees Cook
The original checks (via sk_chk_filter) for instruction count uses ">", not ">=", so changing this in sk_convert_filter has the potential to break existing seccomp filters that used exactly BPF_MAXINSNS many instructions. Fixes: bd4cf0ed331a ("net: filter: rework/optimize internal BPF interpreter'