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=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 32617C433DB for ; Wed, 3 Feb 2021 21:56:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9ADF564F5F for ; Wed, 3 Feb 2021 21:56:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9ADF564F5F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0B8CB6B0071; Wed, 3 Feb 2021 16:56:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 08EC06B0072; Wed, 3 Feb 2021 16:56:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE5DD6B0073; Wed, 3 Feb 2021 16:56:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0036.hostedemail.com [216.40.44.36]) by kanga.kvack.org (Postfix) with ESMTP id D86A86B0071 for ; Wed, 3 Feb 2021 16:56:24 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id A4F201EF1 for ; Wed, 3 Feb 2021 21:56:24 +0000 (UTC) X-FDA: 77778315888.14.truck36_110c94c275d6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 805B118229818 for ; Wed, 3 Feb 2021 21:56:24 +0000 (UTC) X-HE-Tag: truck36_110c94c275d6 X-Filterd-Recvd-Size: 2930 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Wed, 3 Feb 2021 21:56:24 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 64C3364D90; Wed, 3 Feb 2021 21:56:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612389383; bh=KlqMz0AxDAOewwpGjJMp9MSlBYUAqgp9ZkKxph73xJk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=hsz8CLyqqjck4bzLjA1rUO2vj3NHLNp+ADj16T6Jv3rjoLQKWc013iaR9ISh+glcF w75zcKGZKpk5/9M/8/fVJnvADPEO5j4+ffFLS1MK0ybu/tmBP1jCQFlGEfx1dg/T2z S1Yl25qfwaKMKe21n16App3VbJcx7MQrfoq6BBjlEJjCmQz8LZGH4K/soSlaHW0V/i imM7AdA9HHCCGjOpwOtTd9wB4SQsqfXxvCuBKLOV/FAwHnlPIQIHrl0oFq+g/rWE6F MKqHJNqZpXvur1adiaMWcQjHmO8OiLS93PQAmQThBB8Ba8XIE2wkqtqm+j8MJUDg8W JtbU9LOyyJfFA== Subject: Re: [PATCH][RESEND] lib/vsprintf: make-printk-non-secret printks all addresses as unhashed To: Steven Rostedt , Kees Cook Cc: 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 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> From: Timur Tabi Message-ID: Date: Wed, 3 Feb 2021 15:56:20 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210203154727.20946539@gandalf.local.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US 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 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; 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. AFAIK, the only command-line parameter code that works in drivers is module_parm, and that expects the module prefix on the command-line.