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: Fri, 02 Feb 2024 17:10:33 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Yan Zhao" <yan.y.zhao@...el.com>,
 "Linus Walleij" <linus.walleij@...aro.org>, guoren <guoren@...nel.org>,
 "Brian Cain" <bcain@...cinc.com>, "Jonas Bonn" <jonas@...thpole.se>,
 "Stefan Kristiansson" <stefan.kristiansson@...nalahti.fi>,
 "Stafford Horne" <shorne@...il.com>
Cc: Linux-Arch <linux-arch@...r.kernel.org>, linux-kernel@...r.kernel.org,
 "linux-csky@...r.kernel.org" <linux-csky@...r.kernel.org>,
 linux-hexagon@...r.kernel.org,
 "linux-openrisc@...r.kernel.org" <linux-openrisc@...r.kernel.org>
Subject: Re: [PATCH] mm: Remove broken pfn_to_virt() on arch csky/hexagon/openrisc

On Fri, Feb 2, 2024, at 15:05, Yan Zhao wrote:
> Remove the broken pfn_to_virt() on architectures csky/hexagon/openrisc.
>
> The pfn_to_virt() on those architectures takes PFN instead of PA as the
> input to macro __va(), with PAGE_SHIFT applying to the converted VA, which
> is not right, especially when there's a non-zero offset in __va(). [1]
>
> The broken pfn_to_virt() was noticed when checking how page_to_virt() is
> unfolded on x86. It turns out that the one in linux/mm.h instead of in
> asm-generic/page.h is compiled for x86. However, page_to_virt() in
> asm-generic/page.h is found out expanding to pfn_to_virt() with a bug
> described above. The pfn_to_virt() is found out not right as well on
> architectures csky/hexagon/openrisc.
>
> Since there's no single caller on csky/hexagon/openrisc to pfn_to_virt()
> and there are functions doing similar things as pfn_to_virt() --
> - pfn_to_kaddr() in asm/page.h for csky,
> - page_to_virt() in asm/page.h for hexagon, and
> - page_to_virt() in linux/mm.h for openrisc,
> just delete the pfn_to_virt() on those architectures.
>
> The pfn_to_virt() in asm-generic/page.h is not touched in this patch as
> it's referenced by page_to_virt() in that header while the whole header is
> going to be removed as a whole due to no one including it.
>
> Link:https://lore.kernel.org/all/20240131055159.2506-1-yan.y.zhao@intel.com [1]
> Cc: Linus Walleij <linus.walleij@...aro.org>
> Suggested-by: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: Yan Zhao <yan.y.zhao@...el.com>

Nice changelog text!

Applied it to the asm-generic tree now, thanks,

    Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ