From: Borislav Petkov <bp@alien8.de>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Ross Philipson <ross.philipson@oracle.com>,
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,
jailhouse-dev@googlegroups.com, jan.kiszka@siemens.com,
xen-devel@lists.xenproject.org, jgross@suse.com,
boris.ostrovsky@oracle.com, andrew.cooper3@citrix.com
Subject: Re: [PATCH v2 1/2] x86: Check return values from early_memremap calls
Date: Wed, 4 Jan 2023 12:58:48 +0100 [thread overview]
Message-ID: <Y7Vp+EPq5wkGr5mi@zn.tnic> (raw)
In-Reply-To: <8e62a029-f2fa-0627-1f71-4850a68ec6b6@intel.com>
On Thu, Nov 10, 2022 at 08:07:53AM -0800, Dave Hansen wrote:
> On 11/10/22 07:45, Ross Philipson wrote:
> > dt = early_memremap(initial_dtb, map_len);
> > + if (!dt) {
> > + pr_warn("failed to memremap initial dtb\n");
> > + return;
> > + }
>
> Are all of these new pr_warn/err()'s really adding much value? They all
> look pretty generic. It makes me wonder if we should just spit out a
> generic message in early_memremap() and save all the callers the trouble.
Well, let's see.
early_memremap() calls __early_ioremap() and that one already warns befofe each
NULL return. So I guess we don't need the error messages as we will know where
it starts failing.
I guess we still need the error handling though.
I.e., this above should be:
dt = early_memremap(initial_dtb, map_len);
+ if (!dt)
+ return;
so that we don't go off into the weeds with a NULL ptr.
Or?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2023-01-04 11:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 15:45 [PATCH v2 0/2] x86: Check return values for early memory/IO remap calls Ross Philipson
2022-11-10 15:45 ` [PATCH v2 1/2] x86: Check return values from early_memremap calls Ross Philipson
2022-11-10 16:07 ` Juergen Gross
2022-11-10 16:07 ` Dave Hansen
2022-11-10 19:30 ` Ross Philipson
2023-01-04 11:58 ` Borislav Petkov [this message]
2022-11-10 15:45 ` [PATCH v2 2/2] x86: Check return values from early_ioremap calls Ross Philipson
2022-11-10 18:07 ` Peter Zijlstra
2022-11-10 19:31 ` Ross Philipson
2023-01-03 20:36 ` [PATCH v2 0/2] x86: Check return values for early memory/IO remap 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=Y7Vp+EPq5wkGr5mi@zn.tnic \
--to=bp@alien8.de \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=dave.hansen@intel.com \
--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=jgross@suse.com \
--cc=kanth.ghatraju@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@redhat.com \
--cc=ross.philipson@oracle.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®