[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <700184879c5f78c72930ba69f09c9d4eddaf933f.camel@linux.ibm.com>
Date: Tue, 24 Jan 2023 15:40:13 +1100
From: Andrew Donnellan <ajd@...ux.ibm.com>
To: Nicholas Piggin <npiggin@...il.com>, linuxppc-dev@...ts.ozlabs.org,
linux-integrity@...r.kernel.org
Cc: sudhakar@...ux.ibm.com, bgray@...ux.ibm.com, erichte@...ux.ibm.com,
gregkh@...uxfoundation.org, nayna@...ux.ibm.com,
linux-kernel@...r.kernel.org, zohar@...ux.ibm.com,
gjoyce@...ux.ibm.com, ruscur@...sell.cc, gcwilson@...ux.ibm.com,
joel@....id.au
Subject: Re: [PATCH v4 21/24] powerpc/pseries: Pass PLPKS password on kexec
On Tue, 2023-01-24 at 14:36 +1000, Nicholas Piggin wrote:
>
> > + prop = of_find_property(of_chosen, "ibm,plpks-pw", &len);
> > + if (prop) {
> > + ospasswordlength = (u16)len;
> > + ospassword = kzalloc(ospasswordlength, GFP_KERNEL);
> > + if (!ospassword) {
> > + of_remove_property(of_chosen, prop);
> > + return -ENOMEM;
> > + }
> > + memcpy(ospassword, prop->value, len);
> > + return of_remove_property(of_chosen, prop);
>
> Why do you remove the property afterward?
Because otherwise the password will be sitting around in /proc/device-
tree for the world to go and read.
--
Andrew Donnellan OzLabs, ADL Canberra
ajd@...ux.ibm.com IBM Australia Limited
Powered by blists - more mailing lists