Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABqD9haBppbqAvcEYP_nstB7aZc-PbVvHwj+P69AQ5+Z87FofA@mail.gmail.com>
Date: Fri, 16 Mar 2012 14:23:15 -0500
From: Will Drewry <wad@...omium.org>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org, 
	linux-doc@...r.kernel.org, kernel-hardening@...ts.openwall.com, 
	netdev@...r.kernel.org, x86@...nel.org, arnd@...db.de, davem@...emloft.net, 
	hpa@...or.com, mingo@...hat.com, oleg@...hat.com, peterz@...radead.org, 
	rdunlap@...otime.net, mcgrathr@...omium.org, tglx@...utronix.de, luto@....edu, 
	eparis@...hat.com, serge.hallyn@...onical.com, djm@...drot.org, 
	scarybeasts@...il.com, indan@....nu, pmoore@...hat.com, 
	akpm@...ux-foundation.org, corbet@....net, markus@...omium.org, 
	coreyb@...ux.vnet.ibm.com, keescook@...omium.org
Subject: Re: [PATCH v15 02/13] net/compat.c,linux/filter.h: share compat_sock_fprog

On Fri, Mar 16, 2012 at 1:16 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Wed, 2012-03-14 at 22:11 -0500, Will Drewry wrote:
>> Any other users of bpf_*_filter that take a struct sock_fprog from
>> userspace will need to be able to also accept a compat_sock_fprog
>> if the arch supports compat calls.  This change let's the existing
>> compat_sock_fprog be shared.
>>
>> Acked-by: Serge Hallyn <serge.hallyn@...onical.com>
>> Signed-off-by: Will Drewry <wad@...omium.org>
>>
>> v14: rebase/nochanges
>> v13: rebase on to 88ebdda6159ffc15699f204c33feb3e431bf9bdc
>> v12: rebase on to linux-next
>> v11: introduction
>> ---
>>  include/linux/filter.h |   11 +++++++++++
>>  net/compat.c           |    8 --------
>>  2 files changed, 11 insertions(+), 8 deletions(-)
>>
>> diff --git a/include/linux/filter.h b/include/linux/filter.h
>> index aaa2e80..f2e5315 100644
>> --- a/include/linux/filter.h
>> +++ b/include/linux/filter.h
>> @@ -10,6 +10,7 @@
>>
>>  #ifdef __KERNEL__
>>  #include <linux/atomic.h>
>> +#include <linux/compat.h>
>>  #endif
>>
>>  /*
>> @@ -132,6 +133,16 @@ struct sock_fprog {      /* Required for SO_ATTACH_FILTER. */
>>
>>  #ifdef __KERNEL__
>>
>> +#ifdef CONFIG_COMPAT
>> +/*
>> + * A struct sock_filter is architecture independent.
>> + */
>> +struct compat_sock_fprog {
>> +     u16             len;
>> +     compat_uptr_t   filter;         /* struct sock_filter * */
>> +};
>> +#endif
>> +
>>  struct sk_buff;
>>  struct sock;
>>
>> diff --git a/net/compat.c b/net/compat.c
>> index 6def90e..c5c61c8 100644
>> --- a/net/compat.c
>> +++ b/net/compat.c
>> @@ -326,14 +326,6 @@ void scm_detach_fds_compat(struct msghdr *kmsg, struct scm_cookie *scm)
>>       __scm_destroy(scm);
>>  }
>>
>> -/*
>> - * A struct sock_filter is architecture independent.
>> - */
>> -struct compat_sock_fprog {
>> -     u16             len;
>> -     compat_uptr_t   filter;         /* struct sock_filter * */
>> -};
>> -
>>  static int do_set_attach_filter(struct socket *sock, int level, int optname,
>>                               char __user *optval, unsigned int optlen)
>>  {
>
> Acked-by: Eric Dumazet <eric.dumazet@...il.com>

Added your Acked-by's to the tree at

  https://github.com/redpig/linux/tree/seccomp

Thanks!
will

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.