public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: "Kalra, Ashish" <ashish.kalra@amd.com>,
	"Edgecombe, Rick P" <rick.p.edgecombe@intel.com>,
	"luto@kernel.org" <luto@kernel.org>,
	"bp@alien8.de" <bp@alien8.de>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>
Cc: "x86@kernel.org" <x86@kernel.org>,
	"mhklinux@outlook.com" <mhklinux@outlook.com>,
	"Rodel, Jorg" <jroedel@suse.de>, "hpa@zytor.com" <hpa@zytor.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"thomas.lendacky@amd.com" <thomas.lendacky@amd.com>,
	"kirill.shutemov@linux.intel.com"
	<kirill.shutemov@linux.intel.com>,
	"peterx@redhat.com" <peterx@redhat.com>,
	"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>
Subject: Re: [PATCH] x86/mm: fix lookup_address() to handle physical memory holes in direct mapping
Date: Tue, 2 Jul 2024 07:29:44 +0200	[thread overview]
Message-ID: <89aa51c4-20e1-4284-9ab4-bb505f261bea@suse.com> (raw)
In-Reply-To: <306a9358-a452-4595-b1d0-8e38a53d9084@amd.com>

On 01.07.24 21:39, Kalra, Ashish wrote:
> 
> On 7/1/2024 2:13 PM, Edgecombe, Rick P wrote:
>> On Mon, 2024-07-01 at 13:59 -0500, Kalra, Ashish wrote:
>>> Then what is the caller supposed to do in this case ?
>>>
>>> As the return from lookup_address() is non-NULL in this case, accessing it
>>> causes a fatal #PF.
>>>
>>> Is the caller supposed to add the check for a valid PTE using pte_none(*pte) ?
>> I did a quick look at the callers, and some do their own check for pte_none().
>> But some don't. Some also assume the return can't be NULL.
>>
>> Can you elaborate on your goal for this change? Just a cleanup?
> 
> Hit this issue while implementing and testing SNP guest kexec.
> 
> So trying to understand if need a generic fix for this issue or do i need to add my own check for pte_none() ?

Please add a check for pte_none() after calling lookup_address().


Juergen

      reply	other threads:[~2024-07-02  5:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28 20:52 [PATCH] x86/mm: fix lookup_address() to handle physical memory holes in direct mapping Ashish Kalra
2024-06-28 20:58 ` Edgecombe, Rick P
2024-06-28 21:22   ` Kalra, Ashish
2024-06-28 21:33     ` Edgecombe, Rick P
2024-06-28 21:36       ` Tom Lendacky
2024-06-28 21:31   ` Tom Lendacky
2024-06-29 10:20 ` Jürgen Groß
2024-06-29 15:16   ` Tom Lendacky
2024-06-29 16:50     ` Jürgen Groß
2024-07-01 17:57   ` Kalra, Ashish
2024-07-01 18:38     ` Jürgen Groß
2024-07-01 18:59       ` Kalra, Ashish
2024-07-01 19:13         ` Edgecombe, Rick P
2024-07-01 19:39           ` Kalra, Ashish
2024-07-02  5:29             ` Jürgen Groß [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=89aa51c4-20e1-4284-9ab4-bb505f261bea@suse.com \
    --to=jgross@suse.com \
    --cc=ashish.kalra@amd.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jroedel@suse.de \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mhklinux@outlook.com \
    --cc=mingo@redhat.com \
    --cc=peterx@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rick.p.edgecombe@intel.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@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