From: Stefan Berger <stefanb@linux.ibm.com>
To: Jonathan McDowell <noodles@fb.com>
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-integrity@vger.kernel.org"
<linux-integrity@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"nayna@linux.ibm.com" <nayna@linux.ibm.com>,
"nasastry@in.ibm.com" <nasastry@in.ibm.com>,
"mpe@ellerman.id.au" <mpe@ellerman.id.au>,
Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Mimi Zohar <zohar@linux.ibm.com>
Subject: Re: [PATCH v5 5/6] of: kexec: Refactor IMA buffer related functions to make them reusable
Date: Thu, 7 Jul 2022 12:10:31 -0400 [thread overview]
Message-ID: <985a1b8b-5c1c-ba9c-ce6c-4968239448a2@linux.ibm.com> (raw)
In-Reply-To: <YsbyENo0bOLljuI8@noodles-fedora.dhcp.thefacebook.com>
On 7/7/22 10:47, Jonathan McDowell wrote:
> On Wed, Jul 06, 2022 at 11:23:28AM -0400, Stefan Berger wrote:
>> Refactor IMA buffer related functions to make them reusable for carrying
>> TPM logs across kexec.
>>
>> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> Cc: Frank Rowand <frowand.list@gmail.com>
>> Cc: Mimi Zohar <zohar@linux.ibm.com>
>>
>> ---
>> v5:
>> - Rebased on Jonathan McDowell's commit "b69a2afd5afc x86/kexec: Carry
>> forward IMA measurement log on kexec"
>> v4:
>> - Move debug output into setup_buffer()
>> ---
>> drivers/of/kexec.c | 125 ++++++++++++++++++++++++++-------------------
>> 1 file changed, 73 insertions(+), 52 deletions(-)
>>
>> diff --git a/drivers/of/kexec.c b/drivers/of/kexec.c
>> index 548dd5b1b5c1..404a86bb3978 100644
>> --- a/drivers/of/kexec.c
>> +++ b/drivers/of/kexec.c
>> @@ -117,45 +117,56 @@ static int do_get_kexec_buffer(const void *prop, int len, unsigned long *addr,
>> }
>>
>> #ifdef CONFIG_HAVE_IMA_KEXEC
>> -/**
>> - * ima_get_kexec_buffer - get IMA buffer from the previous kernel
>> - * @addr: On successful return, set to point to the buffer contents.
>> - * @size: On successful return, set to the buffer size.
>> - *
>> - * Return: 0 on success, negative errno on error.
>> - */
>> -int __init ima_get_kexec_buffer(void **addr, size_t *size)
>> +static int get_kexec_buffer(const char *name, unsigned long *addr, size_t *size)
>
> I think this new function can + should be marked __init as well; it's
> only called from the existing IMA functions and your new
> tpm_get_kexec_buffer which is already __init.
Yes, right. Thanks.
Stefan
next prev parent reply other threads:[~2022-07-07 16:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 15:23 [PATCH v5 0/6] tpm: Preserve TPM measurement log across kexec (ppc64) Stefan Berger
2022-07-06 15:23 ` [PATCH v5 1/6] of: check previous kernel's ima-kexec-buffer against memory bounds Stefan Berger
2022-07-06 15:23 ` [PATCH v5 2/6] drivers: of: kexec ima: Support 32-bit platforms Stefan Berger
2022-07-06 15:23 ` [PATCH v5 3/6] x86/kexec: Carry forward IMA measurement log on kexec Stefan Berger
2022-07-06 15:23 ` [PATCH v5 4/6] tpm: of: Make of-tree specific function commonly available Stefan Berger
2022-07-11 3:04 ` Jarkko Sakkinen
2022-07-15 16:01 ` Stefan Berger
2022-07-28 7:40 ` Jarkko Sakkinen
2022-07-06 15:23 ` [PATCH v5 5/6] of: kexec: Refactor IMA buffer related functions to make them reusable Stefan Berger
2022-07-07 14:47 ` Jonathan McDowell
2022-07-07 16:10 ` Stefan Berger [this message]
2022-07-06 15:23 ` [PATCH v5 6/6] tpm/kexec: Duplicate TPM measurement log in of-tree for kexec Stefan Berger
2022-07-07 4:25 ` kernel test robot
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=985a1b8b-5c1c-ba9c-ce6c-4968239448a2@linux.ibm.com \
--to=stefanb@linux.ibm.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=kexec@lists.infradead.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=nasastry@in.ibm.com \
--cc=nayna@linux.ibm.com \
--cc=noodles@fb.com \
--cc=robh+dt@kernel.org \
--cc=zohar@linux.ibm.com \
/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 NNTP newsgroup(s).