[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220715122436.GA2705@alpha.franken.de>
Date: Fri, 15 Jul 2022 14:24:36 +0200
From: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: linux-mips@...r.kernel.org, fancer.lancer@...il.com,
gerg@...nel.org, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] MIPS: Fixed __debug_virt_addr_valid()
On Thu, Jul 14, 2022 at 03:25:12PM -0700, Florian Fainelli wrote:
> It is permissible for kernel code to call virt_to_phys() against virtual
> addresses that are in KSEG0 or KSEG1 and we need to be dealing with both
> types. Rewrite the test condition to ensure that the kernel virtual
> addresses are above PAGE_OFFSET which they must be, and below KSEG2
> where the non-linear mapping starts.
>
> For EVA, there is not much that we can do given the linear address range
> that is offered, so just return any virtual address as being valid.
>
> Finally, when HIGHMEM is not enabled, all virtual addresses are assumed
> to be valid as well.
>
> Fixes: dfad83cb7193 ("MIPS: Add support for CONFIG_DEBUG_VIRTUAL")
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> ---
> Changes in v2:
>
> - handle lack of HIGHMEM and EVA
>
> arch/mips/mm/physaddr.c | 14 ++++----------
> 1 file changed, 4 insertions(+), 10 deletions(-)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
Powered by blists - more mailing lists