From: Wei Liu <wei.liu@kernel.org>
To: Michael Kelley <mhklinux@outlook.com>
Cc: "wei.liu@kernel.org" <wei.liu@kernel.org>,
"haiyangz@microsoft.com" <haiyangz@microsoft.com>,
"decui@microsoft.com" <decui@microsoft.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"bp@alien8.de" <bp@alien8.de>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"hpa@zytor.com" <hpa@zytor.com>, "arnd@arndb.de" <arnd@arndb.de>,
"tytso@mit.edu" <tytso@mit.edu>,
"Jason@zx2c4.com" <Jason@zx2c4.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
Saurabh Singh Sengar <ssengar@microsoft.com>,
Long Li <longli@microsoft.com>
Subject: Re: [PATCH 1/1] x86/hyperv: Use Hyper-V entropy to seed guest random number generator
Date: Fri, 8 Mar 2024 23:53:02 +0000 [thread overview]
Message-ID: <Zeuk3ixlvMFg1CDo@liuwe-devbox-debian-v2> (raw)
In-Reply-To: <SN6PR02MB4157B61CA09C0DAF0BB994E1D4212@SN6PR02MB4157.namprd02.prod.outlook.com>
On Wed, Mar 06, 2024 at 05:43:41PM +0000, Michael Kelley wrote:
> From: wei.liu@kernel.org @ 2024-03-04 6:57 UTC
> >
> > > +void __init ms_hyperv_late_init(void)
> > > +{
> > > + struct acpi_table_header *header;
> > > + acpi_status status;
> > > + u8 *randomdata;
> > > + u32 length, i;
> > > +
> > > + /*
> > > + * Seed the Linux random number generator with entropy provided by
> > > + * the Hyper-V host in ACPI table OEM0. It would be nice to do this
> > > + * even earlier in ms_hyperv_init_platform(), but the ACPI subsystem
> > > + * isn't set up at that point. Skip if booted via EFI as generic EFI
> > > + * code has already done some seeding using the EFI RNG protocol.
> > > + */
> > > + if (!IS_ENABLED(CONFIG_ACPI) || efi_enabled(EFI_BOOT))
> > > + return;
> > > +
> > > + status = acpi_get_table("OEM0", 0, &header);
> > > + if (ACPI_FAILURE(status) || !header) {
> > > + pr_info("Hyper-V: ACPI table OEM0 not found\n");
> >
> > I would like this to be a pr_debug() instead of pr_info(), considering
> > using the negative case may cause users to think not having this table
> > can be problematic.
> >
> > Alternatively, we can remove this message here, and then ...
> >
> > > + return;
> > > + }
> > > +
> >
> > ... add a pr_debug() here to indicate that the table was found.
> >
> > pr_info("Hyper-V: Seeding randomness with data from ACPI table OEM0\n");
>
> You wrote the code as "pr_info()" but your comment suggests "pr_debug()".
> I'm assuming pr_debug() is better because we don't really need any output
Yes, I meant to use pr_debug() here. Sorry for the confusion. The
pr_info() was a c&p error.
Thanks,
Wei.
prev parent reply other threads:[~2024-03-08 23:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 16:00 [PATCH 1/1] x86/hyperv: Use Hyper-V entropy to seed guest random number generator mhkelley58
2024-03-04 6:57 ` Wei Liu
2024-03-06 17:43 ` Michael Kelley
2024-03-08 23:53 ` Wei Liu [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=Zeuk3ixlvMFg1CDo@liuwe-devbox-debian-v2 \
--to=wei.liu@kernel.org \
--cc=Jason@zx2c4.com \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=mhklinux@outlook.com \
--cc=mingo@redhat.com \
--cc=ssengar@microsoft.com \
--cc=tglx@linutronix.de \
--cc=tytso@mit.edu \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).