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]
Message-ID: <dad435ca-d7df-f78e-93bf-4016545c15d8@gmail.com>
Date:   Thu, 20 Aug 2020 08:00:26 -0600
From:   David Ahern <dsahern@...il.com>
To:     Jesper Dangaard Brouer <brouer@...hat.com>,
        Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc:     Lorenzo Bianconi <lorenzo@...nel.org>,
        Andrii Nakryiko <andriin@...com>, bpf <bpf@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Toke Høiland-Jørgensen <toke@...hat.com>
Subject: Re: xdp generic default option

On 8/20/20 2:25 AM, Jesper Dangaard Brouer wrote:
>>> diff --git a/net/core/dev.c b/net/core/dev.c
>>> index a00aa737ce29..1f85880ee412 100644
>>> --- a/net/core/dev.c
>>> +++ b/net/core/dev.c
>>> @@ -8747,9 +8747,9 @@ static enum bpf_xdp_mode dev_xdp_mode(u32 flags)
>>>  {
>>>         if (flags & XDP_FLAGS_HW_MODE)
>>>                 return XDP_MODE_HW;
>>> -       if (flags & XDP_FLAGS_DRV_MODE)
>>> -               return XDP_MODE_DRV;
>>> -       return XDP_MODE_SKB;
>>> +       if (flags & XDP_FLAGS_SKB_MODE)
>>> +               return XDP_MODE_SKB;
>>> +       return XDP_MODE_DRV;
>>>  }
>>>  
>>
>> I think the better way would be to choose XDP_MODE_DRV if ndo_bpf !=
>> NULL and XDP_MODE_SKB otherwise. That seems to be matching original
>> behavior, no?
> 
> Yes, but this silent fallback to XDP_MODE_SKB (generic-XDP) have
> cause a lot of support issues in the past.  I wish we could change it.
> We already changed all the samples/bpf/ to ask for XDP_FLAGS_DRV_MODE,
> so they behave this way.
> 

I would prefer the flags check in Lorenzo's proposed patch which is an
explicit opt in to the SKB mode.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ