From: Ross Philipson <ross.philipson@oracle.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
dpsmith@apertussolutions.com, tglx@linutronix.de,
mingo@redhat.com, hpa@zytor.com, luto@amacapital.net,
dave.hansen@linux.intel.com, kanth.ghatraju@oracle.com,
trenchboot-devel@googlegroups.com,
Jan Kiszka <jan.kiszka@siemens.com>,
jailhouse-dev@googlegroups.com, xen-devel@lists.xenproject.org,
Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH 1/2] x86: Check return values from early_memremap calls
Date: Wed, 12 Oct 2022 11:13:20 -0400 [thread overview]
Message-ID: <201850b3-5126-cd79-637f-79f198dd409d@oracle.com> (raw)
In-Reply-To: <Y0GTUg1ACpKZYMHY@nazgul.tnic>
On 10/8/22 11:12, Borislav Petkov wrote:
> Adding Xen and Jailhouse people and MLs to Cc.
>
> Folks, thread starts here:
>
> https://lore.kernel.org/r/1650035401-22855-1-git-send-email-ross.philipson@oracle.com
>
> On Fri, Apr 15, 2022 at 11:10:00AM -0400, Ross Philipson wrote:
>> There are a number of places where early_memremap is called
>> but the return pointer is not checked for NULL. The call
>> can result in a NULL being returned so the checks must
>> be added.
>>
>> Signed-off-by: Ross Philipson <ross.philipson@oracle.com>
>> ---
>> arch/x86/kernel/devicetree.c | 10 ++++++++++
>> arch/x86/kernel/e820.c | 5 +++++
>> arch/x86/kernel/jailhouse.c | 6 ++++++
>> arch/x86/kernel/mpparse.c | 23 +++++++++++++++++++++++
>> arch/x86/kernel/setup.c | 5 +++++
>> arch/x86/xen/enlighten_hvm.c | 2 ++
>> arch/x86/xen/mmu_pv.c | 8 ++++++++
>> arch/x86/xen/setup.c | 2 ++
>> 8 files changed, 61 insertions(+)
>
> Ok, a couple of notes:
>
> 1. the pr_*("<prefix>:" ... )
>
> thing is done using pr_fmt() - grep the tree for examples.
I am already using the pr_* macros in the patches. Are you asking me to
do something or is this just informational?
>
> 2. I think you should not panic() the machine but issue a the
> warning/error and let the machine die a painful death anyway. But Xen
> folks will know better what would be the optimal thing to do.
When I was working on the patches I asked Andrew Cooper at Citrix what
action I should take if any of the calls in the Xen code failed. I
believe he told me it was basically fatal and that panic() would be fine
there.
Thank you,
Ross Philipson
>
> Thx.
>
next prev parent reply other threads:[~2022-10-12 15:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-15 15:09 [PATCH 0/2] x86: Check return values for early memory/IO remap calls Ross Philipson
2022-04-15 15:10 ` [PATCH 1/2] x86: Check return values from early_memremap calls Ross Philipson
2022-04-21 8:37 ` Thomas Gleixner
2022-10-08 15:12 ` Borislav Petkov
2022-10-10 8:46 ` Jan Kiszka
2022-10-12 15:13 ` Ross Philipson [this message]
2022-10-12 15:26 ` Juergen Gross
2022-10-12 15:53 ` Borislav Petkov
2022-04-15 15:10 ` [PATCH 2/2] x86: Check return values from early_ioremap calls Ross Philipson
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=201850b3-5126-cd79-637f-79f198dd409d@oracle.com \
--to=ross.philipson@oracle.com \
--cc=andrew.cooper3@citrix.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dpsmith@apertussolutions.com \
--cc=hpa@zytor.com \
--cc=jailhouse-dev@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=kanth.ghatraju@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=trenchboot-devel@googlegroups.com \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.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
all inboxes | Powered by JetHome®