Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp269252pxf; Wed, 31 Mar 2021 03:01:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyP5+jC0s9QqqtRFgfEZBxHYBlIc6Ur75552Yl/j5wYkKhf8vF4kYfvb7mKxsVVkz3WrtKg X-Received: by 2002:a17:906:cb87:: with SMTP id mf7mr2563676ejb.81.1617184877720; Wed, 31 Mar 2021 03:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617184877; cv=none; d=google.com; s=arc-20160816; b=CUdeMh6fqvR9u+UxSZ5eMIt0zVdxjt+hgT8geH6UALv3ML/MO5UBcY8Ca1euOxY6FV IlvibvudgPb6r0JHBY/H8VgMqv6fd1kyiv8BLYN2FFG4Kj/eUtE2RLiDqj4HDMLNqq+C 0XFLP6Kj/Op1NX63UXJRdSx45qys3EcWbuAVLY8SmIh5t9vgt/Aqq9GiYMYLUi+GrMhP JLN7dJkHpmup5xpXmz8LbKprm4lfk5nm8nuC1fzW5zA3GumCb2FoB9iqHQT7isxjB0tN V2Mc3bUciunwmXovWPH7Z46PLtuKzZRT85eOcqBBBMrxccc3cr/O0i5uuXDPjfTnAHo9 5fbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=sbo3/PvpJmzd+yM5dJxKPDSEWO/RNVVoEdMSx5vfSA4=; b=Qdl1wgbpCSn5Zcxb79F/B0Z1N6rN3BqSfBUSYe9b85KFyehpDn53Hr1xJ2is11ZGxG 9wgHfKVSivnhMnpMK36Nt+xXxQ2djHe4rhUyJaJPQRcLTtnn56Cml5LDKwDS1Q0eVuym YEedtndOYdXQlNdTmNiyLJM98RZzoT0e72gtL3nr1VpPAdA8SwiYg6jzDF3KZhXkmYfh PYcLNLjdt2FOX9tqW8QUzMXpDZGt1EzXBmzthhohjDDNt/Tm0lsj8i1RVVCBaafrnlty v0Azms8jjrmTmJknKEDMrjnsGzjTCZnVDZt4i6hYPRpj4ZBvOO2HxCSpzHMNbAWGRyLI eU0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-embedded-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-embedded-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l15si1344042edb.89.2021.03.31.03.00.55; Wed, 31 Mar 2021 03:01:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-embedded-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-embedded-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-embedded-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234875AbhCaKAX (ORCPT + 89 others); Wed, 31 Mar 2021 06:00:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234965AbhCaJ7t (ORCPT ); Wed, 31 Mar 2021 05:59:49 -0400 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2122BC061760 for ; Wed, 31 Mar 2021 02:59:48 -0700 (PDT) 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 Cc: Linus Torvalds , Andrew Morton , Andy Shevchenko , Rasmus Villemoes , John Ogness , Gary R Hook , Marco Elver , Randy Dunlap , Vlastimil Babka , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-embedded@vger.kernel.org, Geert Uytterhoeven 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-embedded@vger.kernel.org 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