Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-mips@vger.kernel.org, fancer.lancer@gmail.com,
	gerg@kernel.org, open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] MIPS: Fixed __debug_virt_addr_valid()
Date: Fri, 15 Jul 2022 14:24:36 +0200	[thread overview]
Message-ID: <20220715122436.GA2705@alpha.franken.de> (raw)
In-Reply-To: <20220714222514.1570617-1-f.fainelli@gmail.com>

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@gmail.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 ]

      parent reply	other threads:[~2022-07-15 12:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 22:25 [PATCH v2] MIPS: Fixed __debug_virt_addr_valid() Florian Fainelli
2022-07-15 11:44 ` Serge Semin
2022-07-15 12:24 ` Thomas Bogendoerfer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220715122436.GA2705@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=f.fainelli@gmail.com \
    --cc=fancer.lancer@gmail.com \
    --cc=gerg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox