lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 5 Jan 2016 10:47:05 -0500
From:	Craig Gallek <kraigatgoog@...il.com>
To:	Daniel Borkmann <daniel@...earbox.net>
Cc:	netdev@...r.kernel.org, David Miller <davem@...emloft.net>
Subject: Re: [PATCH v4 net-next 3/4] soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF

On Tue, Jan 5, 2016 at 4:38 AM, Daniel Borkmann <daniel@...earbox.net> wrote:
> On 01/04/2016 11:41 PM, Craig Gallek wrote:
>>
>> From: Craig Gallek <kraig@...gle.com>
>>
>> Expose socket options for setting a classic or extended BPF program
>> for use when selecting sockets in an SO_REUSEPORT group.  These options
>> can be used on the first socket to belong to a group before bind or
>> on any socket in the group after bind.
>>
>> This change includes refactoring of the existing sk_filter code to
>> allow reuse of the existing BPF filter validation checks.
>>
>> Signed-off-by: Craig Gallek <kraig@...gle.com>
>
> [...]
>>
>> +static struct sock *run_bpf(struct sock_reuseport *reuse, u16 socks,
>> +                           struct bpf_prog *prog, struct sk_buff *skb,
>> +                           int hdr_len)
>> +{
>> +       struct sk_buff *nskb = NULL;
>> +       u32 index;
>> +
>> +       if (skb_shared(skb)) {
>> +               nskb = skb_clone(skb, GFP_ATOMIC);
>> +               if (!nskb)
>> +                       return NULL;
>> +               skb = nskb;
>> +       }
>> +
>> +       /* temporarily advance data past protocol header */
>> +       if (!pskb_pull(skb, hdr_len)) {
>> +               consume_skb(nskb);
>
>
> Btw, this one could still be made kfree_skb() to indicate error condition
> here.
Good point.  I'll send a follow-up.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ