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 A0257C433DB for ; Wed, 3 Feb 2021 21:57:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 71BB864F5F for ; Wed, 3 Feb 2021 21:57:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231732AbhBCV5c (ORCPT ); Wed, 3 Feb 2021 16:57:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:42620 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232430AbhBCV5D (ORCPT ); Wed, 3 Feb 2021 16:57:03 -0500 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.