Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp664490pxb; Wed, 3 Feb 2021 14:41:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzeJpz0VQuc6Qj+psaJHKlFoRZ6k4fi0cltdvB4FtR9tArTB8W9yFAvDU8og4kQuOhH9OSa X-Received: by 2002:a05:6402:3114:: with SMTP id dc20mr3320795edb.197.1612392061108; Wed, 03 Feb 2021 14:41:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612392061; cv=none; d=google.com; s=arc-20160816; b=ekJXohZfwKfcUXqQaTTFUs44JM44C8DZpgHVFWA1+KipyMGfA/0qH//RyT7p2Eg8u4 z5fnF2mljzBH5MsGYaTC4IZX/dP5Tjuc6gpQ0xsAVfS3QtaE4Km8KZpYBAWPUrdhOIUI UDb9G94MLeL8jWRBxUSHFeuGg5FgLTI2teWwh4unyN7ISAAhpK/8rcHyAOSPf1fBflJI i63jbMg5X6DXzfXNAeNLcx5tzAb+Eq1uuj/tkyJNEm8SrtU2pPlWxOF72XtrCEF/23xN /diVZTt6Ene/F28iZa2anJHnhQXAaO7oLYShQO9tldlJ5D1CRhHGq6YU8CAucsOPOtup DF1Q== 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:subject:cc:to:from:date; bh=x/ey+YevfCStkFY9GWkRDYkb33vgdfym1vl3gmr9KS8=; b=TAqLYsZ7/wj9uzKvRVpRxJGuINUXrDbmsgiXqqtONoYvwZLZuYQ3eUBKVeFHcoWGLR Ch1knRUtrN2txrCfg0Grg6XOEVClVCRbKOqI3VijNNSuHrDnBPrK+WKKJFbBbNt6YSu9 EcJ9ZNKOHGm169tyLOO4ZxBYsSHH+8D2fwVnNaPfUYKochrStOZ8+i7wBXqtapEq5l9S H7XMwfj/OrQw7ylQw7W+Th6/+APF3SiGOpTD84fZzv03BS1AsGGCWm1H7ryPKoqCJUKS +2JyZ+u17vix32ZIZdSFWgaeER4baeTEVhSzk/4GLRiICzbKI3Xk2TACGXJ/PtVCjrkp zZuA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a16si2369750ejb.377.2021.02.03.14.40.36; Wed, 03 Feb 2021 14:41:01 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232483AbhBCWiz (ORCPT + 99 others); Wed, 3 Feb 2021 17:38:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:34298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232201AbhBCWiw (ORCPT ); Wed, 3 Feb 2021 17:38:52 -0500 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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