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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJyuomh=K2_3yFBky+N89STR1RVXMf4ry0VRDpW0X6nHg@mail.gmail.com>
Date: Mon, 6 Jan 2025 10:35:09 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, pabeni@...hat.com, 
	dw@...idwei.uk, almasrymina@...gle.com, jdamato@...tly.com
Subject: Re: [PATCH net-next 1/8] net: make sure we retain NAPI ordering on netdev->napi_list

On Fri, Jan 3, 2025 at 8:00 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> Netlink code depends on NAPI instances being sorted by ID on
> the netdev list for dump continuation. We need to be able to
> find the position on the list where we left off if dump does
> not fit in a single skb, and in the meantime NAPI instances
> can come and go.
>
> This was trivially true when we were assigning a new ID to every
> new NAPI instance. Since we added the NAPI config API, we try
> to retain the ID previously used for the same queue, but still
> add the new NAPI instance at the start of the list.
>
> This is fine if we reset the entire netdev and all NAPIs get
> removed and added back. If driver replaces a NAPI instance
> during an operation like DEVMEM queue reset, or recreates
> a subset of NAPI instances in other ways we may end up with
> broken ordering, and therefore Netlink dumps with either
> missing or duplicated entries.
>
> At this stage the problem is theoretical. Only two drivers
> support queue API, bnxt and gve. gve recreates NAPIs during
> queue reset, but it doesn't support NAPI config.
> bnxt supports NAPI config but doesn't recreate instances
> during reset.
>
> We need to save the ID in the config as soon as it is assigned
> because otherwise the new NAPI will not know what ID it will
> get at enable time, at the time it is being added.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ