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]
Date: Mon, 22 Jan 2024 18:57:42 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: Andreas Noever <andreas.noever@...il.com>,
 Michael Jamet <michael.jamet@...el.com>,
 Yehezkel Bernat <YehezkelShB@...il.com>, linux-kernel@...r.kernel.org,
 kernel-janitors@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH] thunderbolt: Remove usage of the deprecated
 ida_simple_xx() API

Le 22/01/2024 à 12:29, Mika Westerberg a écrit :
> On Thu, Jan 11, 2024 at 10:10:21PM +0100, Christophe JAILLET wrote:
>> ida_alloc() and ida_free() should be preferred to the deprecated
>> ida_simple_get() and ida_simple_remove().
>>
>> Note that the upper limit of ida_simple_get() is exclusive, but the one of
>> ida_alloc_range()/ida_alloc_max() is inclusive. So a -1 has been added
>> when needed.
> 
> Looks tood to me but wanted to check if you tested this on a real
> hardware or you just build tested?
> 
> 

Hi,

It was compile tested only.

Transformation has been done with the help of the cocci script below.

CJ


===

@@
expression i, gfp;
@@
-    ida_simple_get(i, 0, 0, gfp)
+    ida_alloc(i, gfp)


@@
expression e1, e2, gfp;
@@
-    ida_simple_get(e1, e2, 0, gfp)
+    ida_alloc_min(e1, e2, gfp)


@@
expression e1, e2, gfp;
@@
-    ida_simple_get(e1, 0, e2, gfp)
+    ida_alloc_max(e1, e2 - 1, gfp)


@@
expression e1, e2, gfp;
@@
-    ida_simple_get(e1, e2, e2+1, gfp)
+    ida_alloc_range(e1, e2, e2, gfp)


@@
expression e1, e2, e3, gfp;
@@
-    ida_simple_get(e1, e2, e3, gfp)
+    ida_alloc_range(e1, e2, e3 - 1, gfp)


@@
expression e1, e2;
@@
-    ida_simple_remove(e1, e2)
+    ida_free(e1, e2)



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ