While long fancy messages have a higher probability of being seen than
small messages, they may scroll of the screen fast, if visible at all,
and may still be missed.  In addition, they increase boot time and
kernel size.

The correct mechanism to increase importance of a kernel message is not
to draw fancy boxes with more text, but to shout louder, i.e. increase
the message's reporting level.  Making sure the administrator of the
system is aware of such a message is a system policy, and is the
responsability of a user-space log daemon.

Fix this by increasing the reporting level from KERN_WARNING to
KERN_CRIT, and removing irrelevant text and graphics.

This reduces kernel size by ca. 0.5 KiB.

Fixes: bad614b24293ae46 ("iommu: Enable debugfs exposure of IOMMU driver 
internals")
Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be>
---
 drivers/iommu/iommu-debugfs.c | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/drivers/iommu/iommu-debugfs.c b/drivers/iommu/iommu-debugfs.c
index f0354894209648fd..c3306998de0687bd 100644
--- a/drivers/iommu/iommu-debugfs.c
+++ b/drivers/iommu/iommu-debugfs.c
@@ -32,20 +32,9 @@ void iommu_debugfs_setup(void)
 {
        if (!iommu_debugfs_dir) {
                iommu_debugfs_dir = debugfs_create_dir("iommu", NULL);
-               pr_warn("\n");
-               
pr_warn("*************************************************************\n");
-               pr_warn("**     NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE 
NOTICE    **\n");
-               pr_warn("**                                                     
    **\n");
-               pr_warn("**  IOMMU DebugFS SUPPORT HAS BEEN ENABLED IN THIS 
KERNEL  **\n");
-               pr_warn("**                                                     
    **\n");
-               pr_warn("** This means that this kernel is built to expose 
internal **\n");
-               pr_warn("** IOMMU data structures, which may compromise 
security on **\n");
-               pr_warn("** your system.                                        
    **\n");
-               pr_warn("**                                                     
    **\n");
-               pr_warn("** If you see this message and you are not debugging 
the   **\n");
-               pr_warn("** kernel, report this immediately to your vendor!     
    **\n");
-               pr_warn("**                                                     
    **\n");
-               pr_warn("**     NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE 
NOTICE    **\n");
-               
pr_warn("*************************************************************\n");
+               pr_crit("IOMMU DebugFS SUPPORT HAS BEEN ENABLED IN THIS 
KERNEL\n");
+               pr_crit("This means that this kernel is built to expose 
internal\n");
+               pr_crit("IOMMU data structures, which may compromise security 
on\n");
+               pr_crit("your system.\n");
        }
 }
-- 
2.25.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to