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] [day] [month] [year] [list]
Message-ID: <690505bcc8105_10e910095@dwillia2-mobl4.notmuch>
Date: Fri, 31 Oct 2025 11:53:48 -0700
From: <dan.j.williams@...el.com>
To: Carlos López <clopez@...e.de>,
	<linux-kernel@...r.kernel.org>
CC: <willy@...radead.org>, Carlos López <clopez@...e.de>,
	Dan Williams <dan.j.williams@...el.com>, Andy Whitcroft <apw@...onical.com>,
	Joe Perches <joe@...ches.com>, Dwaipayan Ray <dwaipayanray1@...il.com>,
	"Lukas Bulwahn" <lukas.bulwahn@...il.com>
Subject: Re: [PATCH] checkpatch: add IDR to the deprecated list

Carlos López wrote:
> As of commit 85656ec193e9, the IDR interface is marked as deprecated
> in the documentation, but no checks are made in that regard for new
> code. Add the existing IDR initialization APIs to the deprecated list
> in checkpatch, so that if new code is introduced using these APIs, a
> warning is emitted.
> 
> Suggested-by: Dan Williams <dan.j.williams@...el.com>
> Signed-off-by: Carlos López <clopez@...e.de>
> ---
>  scripts/checkpatch.pl | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 92669904eecc..bc72fa66c0ef 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -860,6 +860,10 @@ our %deprecated_apis = (
>  	"kunmap"				=> "kunmap_local",
>  	"kmap_atomic"				=> "kmap_local_page",
>  	"kunmap_atomic"				=> "kunmap_local",
> +	#These should be enough to drive away new IDR users
> +	"DEFINE_IDR"				=> "DEFINE_XARRAY",
> +	"idr_init"				=> "xa_init",
> +	"idr_init_base"				=> "xa_init_flags"
>  );

Thanks! Works for me:

WARNING: Deprecated use of 'DEFINE_IDR', prefer 'DEFINE_XARRAY' instead
#111: FILE: drivers/virt/coco/tsm-core.c:15:
+static DEFINE_IDR(tsm_idr);

Acked-by: Dan Williams <dan.j.williams@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ