From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4DFDC433E1 for ; Wed, 31 Mar 2021 10:05:00 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C49561962 for ; Wed, 31 Mar 2021 10:05:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C49561962 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id B9AF960AC7; Wed, 31 Mar 2021 10:04:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qBc-_e0crAwq; Wed, 31 Mar 2021 10:04:58 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTP id 7C6C260AC6; Wed, 31 Mar 2021 10:04:58 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 52C32C000C; Wed, 31 Mar 2021 10:04:58 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id C78B1C000A for ; Wed, 31 Mar 2021 10:04:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B618640629 for ; Wed, 31 Mar 2021 10:04:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rmpXHB3oT6lF for ; Wed, 31 Mar 2021 10:04:53 +0000 (UTC) X-Greylist: delayed 00:05:01 by SQLgrey-1.8.0 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by smtp4.osuosl.org (Postfix) with ESMTPS id DDDA04064B for ; Wed, 31 Mar 2021 10:04:52 +0000 (UTC) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:ada2:b4da:6568:5ad5]) by xavier.telenet-ops.be with bizsmtp id mxzd2400B5W9KJv01xzdYR; Wed, 31 Mar 2021 11:59:48 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lRXdQ-00BseR-EG; Wed, 31 Mar 2021 11:59:36 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1lRXBt-001bpg-C4; Wed, 31 Mar 2021 11:31:09 +0200 From: Geert Uytterhoeven To: Joerg Roedel , Will Deacon , Steven Rostedt , Ingo Molnar , Petr Mladek , Sergey Senozhatsky Subject: [PATCH 1/3] iommu: Use pr_crit() instead of long fancy messages Date: Wed, 31 Mar 2021 11:31:02 +0200 Message-Id: <20210331093104.383705-2-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210331093104.383705-1-geert+renesas@glider.be> References: <20210331093104.383705-1-geert+renesas@glider.be> MIME-Version: 1.0 Cc: Marco Elver , linux-embedded@vger.kernel.org, John Ogness , Gary R Hook , Randy Dunlap , Rasmus Villemoes , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Geert Uytterhoeven , Andrew Morton , Andy Shevchenko , Linus Torvalds , Vlastimil Babka X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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 --- 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