Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp959091pxb; Wed, 3 Mar 2021 22:33:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbcTuSzQ+s4N6BZ9fjFdl7bgNhQCvwQ/xmt3dq1MNnzQlXYYiYaMGGoP0NgcrC6axFWNac X-Received: by 2002:a17:906:1bf2:: with SMTP id t18mr2617455ejg.418.1614839592901; Wed, 03 Mar 2021 22:33:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614839592; cv=none; d=google.com; s=arc-20160816; b=WLyeau4bQZ2t1LCNx949U4JAQqiW36sICywNd/DGz9F4d5tQXTvNwuIOoUzJsLElW2 5DL1xzwOTnVMoNext970RW3Fp1lTf0hOOTjaoH9k5JASc8ElH4O4C6oPTXLw9CSWL0Pi t8Hfq/1gXf1pSBQOo7jtGY4B+Lf4luNrdb8+MKcYHwMptWlhl+3YKs4irEnqWLxFrcpy ne5ACg+YdfjvEKcJTJsGG0lgAoaP6+nJiczFILjHyVELHgurwI583t04yRzOCKDh/67k 3Q/0i7/8soDZ5wvmdOPHXYjf+NTctEH+GrYwHNNPpK80thPQcLYAt0gVDay1u/VJoav9 CSeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=OfvIn6tnAer/wsIHlzGEIhHvedmKFbfhktDXSIp7ijI=; b=Sfwq3WO15dcpREZF1VsSM9oxIjn6aYpwL/4uq7Tz6gKFzagBQBK/2H49IrCHZsRuKC 2mhQprHTWMCDRt93b/QTbXEm7sF09lpRoGH5U4msJ0yGJqTWi7PTakKAhiLpsqLwqUXf CVrdWRCkXIO3qYWMnmqdAYfDVIMIwtU7OIQE6/Frv1nMA8XsGf7uRI7Wo42kKTbnPlPV gN33fXJVZtt+MZKiSsPcmS8Lrlnyez2PThkFlwEp31IcvILehIaC23JcpMwf27DDxMjh X8uJr6kvp08sUZOHIwrPA9mfuWji4u8qX7NTszQ+9IVr+M15KbLgtPvD6YK9Jzy/xCi5 IsXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k5si16924284ejj.483.2021.03.03.22.32.50; Wed, 03 Mar 2021 22:33:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1580826AbhCBSVk (ORCPT + 99 others); Tue, 2 Mar 2021 13:21:40 -0500 Received: from mga06.intel.com ([134.134.136.31]:34803 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1447268AbhCBPdS (ORCPT ); Tue, 2 Mar 2021 10:33:18 -0500 IronPort-SDR: yBONr8JFZIXgcK14onfp8saPU445QnqpqtNWtxA/2+JXLk0XoOyFct/se3gXfJRHEHrPdEIEc/ J7TtOXIjZRRA== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="248258123" X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="248258123" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 07:29:58 -0800 IronPort-SDR: 15rbFgAnk1wAoW7qk1qh3Hjl7Tu8j51q4BNQ81ulINlDE+FX3Och0OoDdI2Pe48lHAUUROIIQu U2P/3RJuIUYQ== X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="368995015" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 07:29:52 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lH6y4-009Pvb-Jh; Tue, 02 Mar 2021 17:29:48 +0200 Date: Tue, 2 Mar 2021 17:29:48 +0200 From: Andy Shevchenko To: Geert Uytterhoeven Cc: Steven Rostedt , Vlastimil Babka , Petr Mladek , Marco Elver , Timur Tabi , Sergey Senozhatsky , Matthew Wilcox , Andrew Morton , Linus Torvalds , roman.fietze@magna.com, Kees Cook , John Ogness , Akinobu Mita , Alexander Potapenko , Andrey Konovalov , Rasmus Villemoes , Pavel Machek , Tetsuo Handa , Linux Kernel Mailing List , Linux MM Subject: Re: [PATCH 3/3] [v4] lib/vsprintf: no_hash_pointers prints all addresses as unhashed Message-ID: References: <20210214161348.369023-1-timur@kernel.org> <20210214161348.369023-4-timur@kernel.org> <8893ff08-1e50-316c-f632-cd37be1690d5@suse.cz> <20210302090811.620ae7d0@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 02, 2021 at 03:28:09PM +0100, Geert Uytterhoeven wrote: > On Tue, Mar 2, 2021 at 3:08 PM Steven Rostedt wrote: > > On Tue, 2 Mar 2021 14:49:42 +0100 > > Geert Uytterhoeven wrote: > > > > So this is basically a kernel tinyfication issue, right? Is that still pursued > > > > today? Are there better config options suitable for this than CONFIG_DEBUG_KERNEL? > > > > > > As long as I hear about products running Linux on SoCs with 10 MiB of > > > SRAM, I think the answer is yes. > > > I'm not immediately aware of a better config option. There are no more > > > TINY options left, and EXPERT selects DEBUG_KERNEL. > > > > Since the trace_printk() uses the same type of notice, I wonder if we could > > make this into a helper function and just pass in the top part. > > > > + pr_warn("**********************************************************\n"); > > + pr_warn("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **\n"); > > + pr_warn("** **\n"); > > > > > > + pr_warn("** This system shows unhashed kernel memory addresses **\n"); > > + pr_warn("** via the console, logs, and other interfaces. This **\n"); > > + pr_warn("** might reduce the security of your system. **\n"); > > > > Only the above section is really unique. The rest can be a boiler plate. > > Good idea. drivers/iommu/iommu-debugfs.c has a third copy. +1. Let's keep it in some helper that can be added if we have a corresponding functionality. > > + pr_warn("** **\n"); > > + pr_warn("** If you see this message and you are not debugging **\n"); > > + pr_warn("** the kernel, report this immediately to your system **\n"); > > + pr_warn("** administrator! **\n"); > > + pr_warn("** **\n"); > > + pr_warn("** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **\n"); > > + pr_warn("**********************************************************\n"); > > Fortunately gcc is already smart enough to deduplicate identical strings, > but only in the same source file. -- With Best Regards, Andy Shevchenko