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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=no 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 0BAEAC433DB for ; Wed, 3 Feb 2021 22:38:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7387B64E43 for ; Wed, 3 Feb 2021 22:38:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7387B64E43 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BE29F6B0073; Wed, 3 Feb 2021 17:38:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B93466B0075; Wed, 3 Feb 2021 17:38:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A59516B0078; Wed, 3 Feb 2021 17:38:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0032.hostedemail.com [216.40.44.32]) by kanga.kvack.org (Postfix) with ESMTP id 90D8B6B0073 for ; Wed, 3 Feb 2021 17:38:13 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4B9A3181AEF0B for ; Wed, 3 Feb 2021 22:38:13 +0000 (UTC) X-FDA: 77778421266.04.laugh78_46153af275d7 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 28E81800CE9A for ; Wed, 3 Feb 2021 22:38:13 +0000 (UTC) X-HE-Tag: laugh78_46153af275d7 X-Filterd-Recvd-Size: 2971 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Wed, 3 Feb 2021 22:38:12 +0000 (UTC) Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2533364D99; Wed, 3 Feb 2021 22:38:10 +0000 (UTC) Date: Wed, 3 Feb 2021 17:38:08 -0500 From: Steven Rostedt To: Timur Tabi Cc: Kees Cook , Petr Mladek , Sergey Senozhatsky , linux-kernel@vger.kernel.org, vbabka@suse.cz, linux-mm@kvack.org, willy@infradead.org, akpm@linux-foundation.org, torvalds@linux-foundation.org, roman.fietze@magna.com, john.ogness@linutronix.de, Andy Shevchenko , Rasmus Villemoes , akinobu.mita@gmail.com Subject: Re: [PATCH][RESEND] lib/vsprintf: make-printk-non-secret printks all addresses as unhashed Message-ID: <20210203173808.03737e03@gandalf.local.home> In-Reply-To: References: <20210202213633.755469-1-timur@kernel.org> <19c1c17e-d0b3-326e-97ec-a4ec1ebee749@kernel.org> <202102031201.FFED9547D@keescook> <20210203152513.34492916@gandalf.local.home> <202102031234.9BF349F@keescook> <20210203154727.20946539@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, 3 Feb 2021 15:56:20 -0600 Timur Tabi wrote: > On 2/3/21 2:47 PM, Steven Rostedt wrote: > > static void __init > > plain(void) > > { > > int err; > > > > + if (debug_never_hash_pointers) > > + return; > > So, I have a stupid question. What's the best way for test_printf.c to > read the command line parameter? Should I just do this in vsprintf.c: > > /* Disable pointer hashing if requested */ > static bool debug_never_hash_pointers __ro_after_init; It wont be static. > EXPORT_SYMBOL_GPL(debug_never_hash_pointers); > > I'm not crazy about exporting this variable to other drivers. It could > be used to disable hashing by any driver. But it is set as "__ro_after_init". That is, every module will see it as read only. IOW, they wont be able to modify it. > > AFAIK, the only command-line parameter code that works in drivers is > module_parm, and that expects the module prefix on the command-line. This is just a constant variable for others to see. The command line itself is visible (see saved_command_line, it's even exported to modules in sparc). -- Steve