Thread (13 messages) 13 messages, 4 authors, 2022-07-28

Re: [PATCH v5 5/6] of: kexec: Refactor IMA buffer related functions to make them reusable

flat view

From: Stefan Berger <stefanb@linux.ibm.com>
Date: 2022-07-07 16:12:12
Also in: kexec, linux-integrity, linuxppc-dev, lkml


On 7/7/22 10:47, Jonathan McDowell wrote:
On Wed, Jul 06, 2022 at 11:23:28AM -0400, Stefan Berger wrote:
quoted
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 <redacted>
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help