diff mbox series

[v4,1/3] IMA: Update KBUILD_MODNAME for IMA files to ima

Message ID 20200215014709.3006-2-tusharsu@linux.microsoft.com (mailing list archive)
State New, archived
Headers show
Series IMA: improve log messages | expand

Commit Message

Tushar Sugandhi Feb. 15, 2020, 1:47 a.m. UTC
The kbuild Makefile specifies object files for vmlinux in the $(obj-y)
lists. These lists depend on the kernel configuration[1].

The kbuild Makefile for IMA combines the object files for IMA into a
single object file namely ima.o. All the object files for IMA should be
combined into ima.o. But certain object files are being added to their
own $(obj-y). This results in the log messages from those modules getting
prefixed with their respective base file name, instead of "ima". This is
inconsistent with the log messages from the IMA modules that are combined
into ima.o.

This change fixes the above issue.

[1] Documentation\kbuild\makefiles.rst 

Signed-off-by: Tushar Sugandhi <tusharsu@linux.microsoft.com>
Reviewed-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
---
 security/integrity/ima/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Tushar Sugandhi Feb. 18, 2020, 7:25 p.m. UTC | #1
Hi Mimi,

On 2020-02-14 5:47 p.m., Tushar Sugandhi wrote:
> The kbuild Makefile specifies object files for vmlinux in the $(obj-y)
> lists. These lists depend on the kernel configuration[1].
> 
> The kbuild Makefile for IMA combines the object files for IMA into a
> single object file namely ima.o. All the object files for IMA should be
> combined into ima.o. But certain object files are being added to their
> own $(obj-y). This results in the log messages from those modules getting
> prefixed with their respective base file name, instead of "ima". This is
> inconsistent with the log messages from the IMA modules that are combined
> into ima.o.
> 
> This change fixes the above issue.
> 
> [1] Documentation\kbuild\makefiles.rst
> 
Is there any feedback on this patch description?
I can address it in the next iteration.

Thanks,
Tushar
Mimi Zohar Feb. 18, 2020, 7:37 p.m. UTC | #2
On Tue, 2020-02-18 at 11:25 -0800, Tushar Sugandhi wrote:
> Hi Mimi,
> 
> On 2020-02-14 5:47 p.m., Tushar Sugandhi wrote:
> > The kbuild Makefile specifies object files for vmlinux in the $(obj-y)
> > lists. These lists depend on the kernel configuration[1].
> > 
> > The kbuild Makefile for IMA combines the object files for IMA into a
> > single object file namely ima.o. All the object files for IMA should be
> > combined into ima.o. But certain object files are being added to their
> > own $(obj-y). This results in the log messages from those modules getting
> > prefixed with their respective base file name, instead of "ima". This is
> > inconsistent with the log messages from the IMA modules that are combined
> > into ima.o.
> > 
> > This change fixes the above issue.
> > 
> > [1] Documentation\kbuild\makefiles.rst
> > 
> Is there any feedback on this patch description?
> I can address it in the next iteration.

No, it looks good to me.

Mimi
diff mbox series

Patch

diff --git a/security/integrity/ima/Makefile b/security/integrity/ima/Makefile
index 064a256f8725..67dabca670e2 100644
--- a/security/integrity/ima/Makefile
+++ b/security/integrity/ima/Makefile
@@ -11,6 +11,6 @@  ima-y := ima_fs.o ima_queue.o ima_init.o ima_main.o ima_crypto.o ima_api.o \
 ima-$(CONFIG_IMA_APPRAISE) += ima_appraise.o
 ima-$(CONFIG_IMA_APPRAISE_MODSIG) += ima_modsig.o
 ima-$(CONFIG_HAVE_IMA_KEXEC) += ima_kexec.o
-obj-$(CONFIG_IMA_BLACKLIST_KEYRING) += ima_mok.o
-obj-$(CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS) += ima_asymmetric_keys.o
-obj-$(CONFIG_IMA_QUEUE_EARLY_BOOT_KEYS) += ima_queue_keys.o
+ima-$(CONFIG_IMA_BLACKLIST_KEYRING) += ima_mok.o
+ima-$(CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS) += ima_asymmetric_keys.o
+ima-$(CONFIG_IMA_QUEUE_EARLY_BOOT_KEYS) += ima_queue_keys.o