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: <CACRpkdbYZAt=gs=Fqq_VvOzpmUHiwoaQuGy9e8nfydqjdM4NyQ@mail.gmail.com>
Date: Wed, 16 Apr 2025 13:13:52 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Ross Stutterheim <ross.stutterheim@...min.com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org, 
	Russell King <linux@...linux.org.uk>, Mike Rapoport <rppt@...ux.ibm.com>, ross.sweng@...il.com
Subject: Re: [PATCH v2] arm/memremap: fix arch_memremap_can_ram_remap()

On Mon, Apr 14, 2025 at 4:32 PM Ross Stutterheim
<ross.stutterheim@...min.com> wrote:

> commit 260364d112bc ("arm[64]/memremap: don't abuse pfn_valid() to ensure
> presence of linear map") added the definition of
> arch_memremap_can_ram_remap() for arm[64] specific filtering of what pages
> can be used from the linear mapping. memblock_is_map_memory() was called
> with the pfn of the address given to arch_memremap_can_ram_remap();
> however, memblock_is_map_memory() expects to be given an address for arm,
> not a pfn.
>
> This results in calls to memremap() returning a newly mapped area when
> it should return an address in the existing linear mapping.
>
> Fix this by removing the address to pfn translation and pass the
> address directly.
>
> Fixes: 260364d112bc ("arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map")
> Signed-off-by: Ross Stutterheim <ross.stutterheim@...min.com>

OMG
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>

Also add Cc: stable@...r.kernel.org as pointed out by Catalin.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ