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=-11.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT 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 B9FE5C433DB for ; Wed, 10 Feb 2021 05:18:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5C38464E5A for ; Wed, 10 Feb 2021 05:18:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C38464E5A 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 ED9036B0070; Wed, 10 Feb 2021 00:18:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EAFA96B0071; Wed, 10 Feb 2021 00:18:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DEC126B0072; Wed, 10 Feb 2021 00:18:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0236.hostedemail.com [216.40.44.236]) by kanga.kvack.org (Postfix) with ESMTP id C93E16B0070 for ; Wed, 10 Feb 2021 00:18:28 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 89ED718030C6B for ; Wed, 10 Feb 2021 05:18:28 +0000 (UTC) X-FDA: 77801202696.15.nest22_3c0f4672760d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id 629C31802F63C for ; Wed, 10 Feb 2021 05:18:28 +0000 (UTC) X-HE-Tag: nest22_3c0f4672760d X-Filterd-Recvd-Size: 3283 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Wed, 10 Feb 2021 05:18:27 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 2658764E42; Wed, 10 Feb 2021 05:18:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612934307; bh=r8mlLnkiTtqHjwX7GPDdrTYdtz5ipUM83ae8N83ypv0=; h=From:To:Subject:Date:From; b=p3BkaluQeAe+D7tVC7ezEiSj63R3tHm0kVkGz5PhnawSERsD4o4EmzwPRLeTDEyVk W2Es7rCZBCGuILlzJQXS4TSkk9N1aEaw7Ap7SRjaver3H9qpGtVKm4NdYxqDz3ac3r fESqAjPY/KpMzfbsY/jbf1R692+e2Wg7mBck8DDO5PWkN6g0g/GTcZN02MegnkXTxB Vo/dB/ewF2q6SyMwQlJ8IVfOH2yGUXJqqJxk+M6FzLlHYAToOXFCIDa9UWlZb/HviA ZnifXDhIuRbrHRjWhmDmDlx6bHmQBfRf4CzvG6qXQVRp3L92VPhguumWgZGJ6uvVho rXH5FTiECjrxw== From: Timur Tabi To: Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Vlastimil Babka , Andy Shevchenko , Matthew Wilcox , akpm@linux-foundation.org, Linus Torvalds , roman.fietze@magna.com, Kees Cook , John Ogness , akinobu.mita@gmail.com, glider@google.com, Andrey Konovalov , Marco Elver , Rasmus Villemoes , Pavel Machek , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 0/3][RESEND] add support for never printing hashed addresses Date: Tue, 9 Feb 2021 23:18:11 -0600 Message-Id: <20210210051814.845713-1-timur@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-NVConfidentiality: public Content-Transfer-Encoding: quoted-printable 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: [accidentally sent from the wrong email address, so resending] [The list of email addresses on CC: is getting quite lengthy, so I hope I've included everyone.] Although hashing addresses printed via printk does make the kernel more secure, it interferes with debugging, especially with some functions like print_hex_dump() which always uses hashed addresses. To avoid having to choose between %p and %px, it's easier to add a kernel command line that treats all %p as %px. This encourages developers to use %p more without making debugging more difficult. Patches #1 and #2 upgrade the kselftest framework so that it can report on tests that were skipped outright. This is needed for the test_printf module which will now skip %p hashing tests if hashing is disabled. Patch #2 upgrades the printf library to check the command line. It also updates test_printf(). Timur Tabi (3): lib/test_printf: use KSTM_MODULE_GLOBALS macro kselftest: add support for skipped tests [v2] lib/vsprintf: make-printk-non-secret printks all addresses as unhashed .../admin-guide/kernel-parameters.txt | 15 +++++++ lib/test_printf.c | 12 +++++- lib/vsprintf.c | 40 ++++++++++++++++++- tools/testing/selftests/kselftest_module.h | 18 ++++++--- 4 files changed, 75 insertions(+), 10 deletions(-) --=20 2.25.1