dm: Don't warn if IMA_DISABLE_HTABLE is not enabled
PATCH 1/1 dm: Don't warn if IMA_DISABLE_HTABLE is not enabled
Commit f1cd6cb24b6b ("dm ima: add a warning in dm_init if duplicate ima events are not measured") added a warning message if CONFIG_IMA is enabled but CONFIG_IMA_DISABLE_HTABLE is not to inform users. When enabling CONFIG_IMA, CONFIG_IMA_DISABLE_HTABLE is disabled by default and so warning is seen. Therefore, it seems more appropriate to make this an INFO level message than warning. If this truly is a warning, then maybe CONFIG_IMA_DISABLE_HTABLE should default to y if CONFIG_IMA is enabled.
---
We have some tests that check for kernel warnings and whenever we stumbled across a new warning we see if there is a way to fix it. For this one it seems a bit odd to always warn for something that defaults to disabled. If necessary we can ignore it, but I wanted to see if this would be acceptable first.
drivers/md/dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm.c +1 -1
@@ -272,7 +272,7 @@ static int __init dm_init(void)int r, i;#if (IS_ENABLED (CONFIG_IMA ) && !IS_ENABLED (CONFIG_IMA_DISABLE_HTABLE )) -DMWARN ("CONFIG_IMA_DISABLE_HTABLE is disabled." +DMINFO ("CONFIG_IMA_DISABLE_HTABLE is disabled." " Duplicate IMA measurements will not be recorded in the IMA log." );#endif
Signature · 1 line
2.43.0
Mikulas Patocka
maintainerAccepted, thanks.
Mikulas
Quoted 36 lines · Jon Hunter
Commit
f1cd6cb24b6b("dm ima: add a warning indm_initif duplicate ima events are not measured") added a warning message ifCONFIG_IMAis enabled butCONFIG_IMA_DISABLE_HTABLEis not to inform users. When enablingCONFIG_IMA,CONFIG_IMA_DISABLE_HTABLEis disabled by default and so warning is seen. Therefore, it seems more appropriate to make this an INFO level message than warning. If this truly is a warning, then maybeCONFIG_IMA_DISABLE_HTABLEshould default to y ifCONFIG_IMAis enabled.Signed-off-by Jon Hunter <[email protected]>---
We have some tests that check for kernel warnings and whenever we stumbled across a new warning we see if there is a way to fix it. For this one it seems a bit odd to always warn for something that defaults to disabled. If necessary we can ignore it, but I wanted to see if this would be acceptable first.drivers/md/dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/md/dm.c +1
-1@@ -272,7 +272,7 @@ static int __init dm_init(void)int r, i;#if (IS_ENABLED (CONFIG_IMA ) && !IS_ENABLED (CONFIG_IMA_DISABLE_HTABLE )) -DMWARN ("CONFIG_IMA_DISABLE_HTABLE is disabled." +DMINFO ("CONFIG_IMA_DISABLE_HTABLE is disabled." " Duplicate IMA measurements will not be recorded in the IMA log." );#endif Signature · 1 line
2.43.0