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: <20230815112856.1f1bd3ac@kernel.org>
Date: Tue, 15 Aug 2023 11:28:56 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
Cc: Jiri Pirko <jiri@...nulli.us>, Arkadiusz Kubalewski
 <arkadiusz.kubalewski@...el.com>, Jonathan Lemon
 <jonathan.lemon@...il.com>, Paolo Abeni <pabeni@...hat.com>, Milena Olech
 <milena.olech@...el.com>, Michal Michalik <michal.michalik@...el.com>,
 linux-arm-kernel@...ts.infradead.org, poros@...hat.com,
 mschmidt@...hat.com, netdev@...r.kernel.org, linux-clk@...r.kernel.org,
 Bart Van Assche <bvanassche@....org>, intel-wired-lan@...ts.osuosl.org,
 Jiri Pirko <jiri@...dia.com>
Subject: Re: [PATCH net-next v4 3/9] dpll: core: Add DPLL framework base
 functions

On Tue, 15 Aug 2023 19:20:31 +0100 Vadim Fedorenko wrote:
> >> +	ret = xa_alloc(&dpll_device_xa, &dpll->id, dpll, xa_limit_16b,
> >> +		       GFP_KERNEL);  
> > 
> > Why only 16b and why not _cyclic?
> 
> I cannot image systems with more than 65k of DPLL devices. We don't
> store any id's of last used DPLL device, so there is no easy way to
> restart the search from the last point. And it's not a hot path to
> optimize it.

I think this gets used under the xa_lock() so you can just add a static
variable inside the function to remember previous allocation.

I don't expect >64k devices either, obviously, but what are we saving
by not allowing the full u32 range?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ