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] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y5OHVnaGZckyhaSC@x130>
Date:   Fri, 9 Dec 2022 11:07:02 -0800
From:   Saeed Mahameed <saeed@...nel.org>
To:     Tony Nguyen <anthony.l.nguyen@...el.com>
Cc:     davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        edumazet@...gle.com,
        Bartosz Staszewski <bartoszx.staszewski@...el.com>,
        netdev@...r.kernel.org, maciej.fijalkowski@...el.com,
        magnus.karlsson@...el.com, bjorn@...nel.org, ast@...nel.org,
        daniel@...earbox.net, hawk@...nel.org, john.fastabend@...il.com,
        bpf@...r.kernel.org,
        Mateusz Palczewski <mateusz.palczewski@...el.com>,
        Shwetha Nagaraju <Shwetha.nagaraju@...el.com>
Subject: Re: [PATCH net v3 1/1] i40e: Fix the inability to attach XDP program
 on downed interface

On 09 Dec 10:54, Tony Nguyen wrote:
>From: Bartosz Staszewski <bartoszx.staszewski@...el.com>
>
>Whenever trying to load XDP prog on downed interface, function i40e_xdp
>was passing vsi->rx_buf_len field to i40e_xdp_setup() which was equal 0.
>i40e_open() calls i40e_vsi_configure_rx() which configures that field,
>but that only happens when interface is up. When it is down, i40e_open()
>is not being called, thus vsi->rx_buf_len is not set.
>
>Solution for this is calculate buffer length in newly created
>function - i40e_calculate_vsi_rx_buf_len() that return actual buffer
>length. Buffer length is being calculated based on the same rules
>applied previously in i40e_vsi_configure_rx() function.
>
>Fixes: 613142b0bb88 ("i40e: Log error for oversized MTU on device")
>Fixes: 0c8493d90b6b ("i40e: add XDP support for pass and drop actions")
>Signed-off-by: Bartosz Staszewski <bartoszx.staszewski@...el.com>
>Signed-off-by: Mateusz Palczewski <mateusz.palczewski@...el.com>
>Tested-by: Shwetha Nagaraju <Shwetha.nagaraju@...el.com>
>Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
>Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
>---
>v3:
>- Remove unnecessary braces and parentheses
>- Simplify return in i40e_calculate_vsi_rx_buf_len(); return early on
>if conditions and remove elses
>

Reviewed-by: Saeed Mahameed <saeed@...nel.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ