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: <Y7gRTj3Dfwp/HYUm@nanopsycho>
Date:   Fri, 6 Jan 2023 13:17:18 +0100
From:   Jiri Pirko <jiri@...nulli.us>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
        pabeni@...hat.com, jacob.e.keller@...el.com
Subject: Re: [PATCH net-next 1/9] devlink: bump the instance index directly
 when iterating

Fri, Jan 06, 2023 at 07:33:54AM CET, kuba@...nel.org wrote:
>xa_find_after() is designed to handle multi-index entries correctly.
>If a xarray has two entries one which spans indexes 0-3 and one at
>index 4 xa_find_after(0) will return the entry at index 4.
>
>Having to juggle the two callbacks, however, is unnecessary in case
>of the devlink xarray, as there is 1:1 relationship with indexes.
>
>Always use xa_find() and increment the index manually.
>
>Signed-off-by: Jakub Kicinski <kuba@...nel.org>

Reviewed-by: Jiri Pirko <jiri@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ