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: <CAHS8izNWmcYvFBNwa_kUrWFWAHO_6h9Pd67BTCadeaDX3H8GhQ@mail.gmail.com>
Date: Thu, 6 Feb 2025 08:43:58 -0800
From: Mina Almasry <almasrymina@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com, 
	pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org
Subject: Re: [PATCH net-next 3/3] netdevsim: allow normal queue reset while down

On Wed, Feb 5, 2025 at 11:02 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> Resetting queues while the device is down should be legal.
> Allow it, test it. Ideally we'd test this with a real device
> supporting devmem but I don't have access to such devices.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>

Reviewed-by: Mina Almasry <almasrymina@...gle.com>

> ---
>  drivers/net/netdevsim/netdev.c           |  8 +++-----
>  tools/testing/selftests/net/nl_netdev.py | 17 ++++++++++++++++-
>  2 files changed, 19 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c
> index 42f247cbdcee..d26b2fb1cabc 100644
> --- a/drivers/net/netdevsim/netdev.c
> +++ b/drivers/net/netdevsim/netdev.c
> @@ -644,6 +644,9 @@ nsim_queue_mem_alloc(struct net_device *dev, void *per_queue_mem, int idx)
>
>         if (ns->rq_reset_mode > 3)
>                 return -EINVAL;
> +       /* Only "mode 0" works when device is down */

Just to make sure I understand: modes 2 & 3 should also work with the
device down, and this is an artificial limitation that you're adding
to netdevsim, right? I don't see how changing the call order to
napi_del and napi_add_config breaks resetting while the device is
down.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ