Thread (26 messages) 26 messages, 4 authors, 2020-12-31

Re: [PATCH v13 2/6] powerpc: Move arch independent ima kexec functions to drivers/of/kexec.c

From: Thiago Jung Bauermann <hidden>
Date: 2020-12-23 17:59:22
Also in: linux-arm-kernel, linux-integrity, lkml

Lakshmi Ramasubramanian [off-list ref] writes:
On 12/22/20 4:19 PM, Thiago Jung Bauermann wrote:
quoted
Lakshmi Ramasubramanian [off-list ref] writes:
quoted
diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
index 6ebefec616e4..7c3947ad3773 100644
--- a/security/integrity/ima/ima.h
+++ b/security/integrity/ima/ima.h
@@ -24,10 +24,6 @@
    #include "../integrity.h"
  -#ifdef CONFIG_HAVE_IMA_KEXEC
-#include <asm/ima.h>
-#endif
-
  enum ima_show_type { IMA_SHOW_BINARY, IMA_SHOW_BINARY_NO_FIELD_LEN,
  		     IMA_SHOW_BINARY_OLD_STRING_FMT, IMA_SHOW_ASCII };
  enum tpm_pcrs { TPM_PCR0 = 0, TPM_PCR8 = 8, TPM_PCR10 = 10 };
This belongs in patch 1.
No - the reference to "asm/ima.h" cannot be removed in Patch #1 since
ima_get_kexec_buffer() and ima_free_kexec_buffer() are still declared in 
this header. They are moved in this patch only (Patch #2).
Indeed, you are right. My mistake.
quoted
quoted
diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c
index 38bcd7543e27..8a6712981dee 100644
--- a/security/integrity/ima/ima_kexec.c
+++ b/security/integrity/ima/ima_kexec.c
@@ -10,6 +10,7 @@
  #include <linux/seq_file.h>
  #include <linux/vmalloc.h>
  #include <linux/kexec.h>
+#include <linux/of.h>
  #include <linux/ima.h>
  #include "ima.h"
This include isn't necessary.
This change is necessary because ima_get_kexec_buffer() and
ima_free_kexec_buffer() are now declared in "linux/of.h".
You are right here as well. Before I made the suggestion, I had tested
building the kernel without the include above and it worked fine, but
that's because <linux/of.h> is being included indirectly by some other
header file. It's better to include it explicitly.

-- 
Thiago Jung Bauermann
IBM Linux Technology Center
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help