[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXGCetKOZ86JmTbPUL9koq7=n8fRcWtctf7Xzi5mWaP2Bg@mail.gmail.com>
Date: Thu, 30 Apr 2020 17:14:09 +0200
From: Ard Biesheuvel <ardb@...nel.org>
To: Arvind Sankar <nivedita@...m.mit.edu>
Cc: Joe Perches <joe@...ches.com>,
linux-efi <linux-efi@...r.kernel.org>, X86 ML <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 03/10] efi/x86: Use pr_efi_err for error messages
On Thu, 30 Apr 2020 at 00:21, Arvind Sankar <nivedita@...m.mit.edu> wrote:
>
> On Wed, Apr 29, 2020 at 11:55:04PM +0200, Ard Biesheuvel wrote:
> > On Wed, 29 Apr 2020 at 23:53, Joe Perches <joe@...ches.com> wrote:
> > >
> > > On Wed, 2020-04-29 at 17:43 -0400, Arvind Sankar wrote:
> > > > On Wed, Apr 29, 2020 at 08:49:21PM +0200, Ard Biesheuvel wrote:
> > > > > On Wed, 29 Apr 2020 at 20:47, Joe Perches <joe@...ches.com> wrote:
> > > > > > On Wed, 2020-04-29 at 13:41 -0400, Arvind Sankar wrote:
> > > > > > > Use pr_efi_err instead of bare efi_printk for error messages.
> > > > > >
> > > > > > Perhaps it'd be better to rename pr_efi_err to eri_err
> > > > > > so it's clearer it's a typical efi_ logging function.
> > > > > >
> > > > > > $ git grep -w --name-only pr_efi_err | \
> > > > > > xargs sed -i 's/\bpr_efi_err\b/efi_err/g'
> > > > > >
> > > > >
> > > > > Yeah, pr_efi_err() is probably not the best name
> > > >
> > > > Should I rename pr_efi/pr_efi_err to, say, efi_pr_info/efi_pr_error?
> > >
> > > Perhaps not use pr_ in the name at all.
> > >
> > > I suggest:
> > >
> > > pr_efi -> efi_info (or efi_debug or efi_dbg)
> > > (it is guarded by an efi_quiet flag, default: on)
> > > pr_efi_err -> efi_err
> > >
> >
> > Agreed. Shorter is better if there is no risk of confusion..
>
> Ok, I'll use efi_info/efi_err. We could add debugging output as
> efi_debug later, enabled if efi=debug is specified.
>
> While we're here: most of the existing cases of pr_efi look like notice
> or info level, except maybe these two, which probably should be at least
> warnings?
>
> drivers/firmware/efi/libstub/arm64-stub.c
> 62: pr_efi("EFI_RNG_PROTOCOL unavailable, no randomness supplied\n");
>
This should not be a warning. KASLR is enabled by default by the
distros, and many systems don't implement this protocol at all.
> drivers/firmware/efi/libstub/efi-stub.c
> 254: pr_efi("Ignoring DTB from command line.\n");
That could be upgraded to an error.
Powered by blists - more mailing lists