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]
Date: Fri, 3 May 2024 08:03:39 -0500
From: Rob Herring <robh@...nel.org>
To: Oreoluwa Babatunde <quic_obabatun@...cinc.com>
Cc: saravanak@...gle.com, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org, kernel@...cinc.com
Subject: Re: [PATCH v2] of: reserved_mem: Remove the use of phandle from the
 reserved_mem APIs

On Thu, May 2, 2024 at 2:24 PM Oreoluwa Babatunde
<quic_obabatun@...cinc.com> wrote:
>
> The __find_rmem() function is the only place that references the phandle
> field of the reserved_mem struct. __find_rmem() is used to match a
> device_node object to its corresponding entry in the reserved_mem array
> using its phandle value. But, there is already a function called
> of_reserved_mem_lookup() which carries out the same action using the
> name of the node.
>
> Using the of_reserved_mem_lookup() function is more reliable because
> every node is guaranteed to have a name, but not all nodes will have a
> phandle.
>
> Nodes are only assigned a phandle if they are explicitly defined in the
> DT using "phandle = <phandle_number>", or if they are referenced by
> another node in the DT. Hence, If the phandle field is empty, then
> __find_rmem() will return a false negative.
>
> Hence, delete the __find_rmem() function and switch to using the
> of_reserved_mem_lookup() function to find the corresponding entry of a
> device_node in the reserved_mem array. Since the phandle field of the
> reserved_mem struct is now unused, delete that as well.
>
> Signed-off-by: Oreoluwa Babatunde <quic_obabatun@...cinc.com>
> ---
> v2:
> - Addressed error found by kernel test bot:
>   https://lore.kernel.org/all/202405020127.3ncxx3EI-lkp@intel.com/
> - Fixed spelling error in commit text.
>
> v1:
> https://lore.kernel.org/all/20240422235243.2878536-1-quic_obabatun@quicinc.com/
>
>  drivers/of/of_reserved_mem.c    | 22 +---------------------
>  include/linux/of_reserved_mem.h |  1 -
>  2 files changed, 1 insertion(+), 22 deletions(-)

Applied, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ