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 5589BC433DB for ; Fri, 5 Feb 2021 18:25:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A443464F03 for ; Fri, 5 Feb 2021 18:25:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A443464F03 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 E14526B0070; Fri, 5 Feb 2021 13:25:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DC6ED6B0071; Fri, 5 Feb 2021 13:25:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD9036B0073; Fri, 5 Feb 2021 13:25:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0034.hostedemail.com [216.40.44.34]) by kanga.kvack.org (Postfix) with ESMTP id BAAD76B0070 for ; Fri, 5 Feb 2021 13:25:26 -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 7F5F31F06 for ; Fri, 5 Feb 2021 18:25:26 +0000 (UTC) X-FDA: 77785041852.14.boats76_1610a4f275e6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 5EA6F18229818 for ; Fri, 5 Feb 2021 18:25:26 +0000 (UTC) X-HE-Tag: boats76_1610a4f275e6 X-Filterd-Recvd-Size: 2989 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Fri, 5 Feb 2021 18:25:25 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 62B4D64E4D; Fri, 5 Feb 2021 18:25:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612549524; bh=hb309p839a18x47275kXH8RdkKDWYDg5Qa7e2tIfzIU=; h=Subject:To:References:From:Date:In-Reply-To:From; b=PP/2qv0ejvMgDlya0fseiY1tFEzYeNhIgoz2v+eezRT1XWzBYyjXcEICJm8sun0kQ aSi59nceGXXXGoj4w4mG4ZYipqkso3wM8Wpb9AOeGReZI+iP9cz73lozokotMkju6f mkcnrMgEhT9vuowqgW8VHdUByJb+SOMtWCcYTdTu6RSEYHZutHEr2wEaGl63bnkefa cAHibiZPqBznjlN6ge11tK2orMz+XjWsUerZswaMzxDb9+YRMkh9qHfSOzVDQMOjOf Yh8Unu4ucUnxv6cEJ4SleeSrWn1cgwOFVv6mbh2veyyaKljuXo6SI6z4W9oJP8TVKR 0HK075rWG8bkA== Subject: Re: [PATCH][RESEND] lib/vsprintf: make-printk-non-secret printks all addresses as unhashed To: Vlastimil Babka , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , linux-kernel@vger.kernel.org, linux-mm@kvack.org, willy@infradead.org, akpm@linux-foundation.org, torvalds@linux-foundation.org, roman.fietze@magna.com, keescook@chromium.org, john.ogness@linutronix.de, akinobu.mita@gmail.com References: <20210202213633.755469-1-timur@kernel.org> <3baace45-38af-a59b-c376-9a4c39a17b2d@suse.cz> From: Timur Tabi Message-ID: Date: Fri, 5 Feb 2021 12:25:22 -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: <3baace45-38af-a59b-c376-9a4c39a17b2d@suse.cz> 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/5/21 4:59 AM, Vlastimil Babka wrote: > Thanks a lot. Should this also affect %pK though? IIUC, there's currently no way > to achieve non-mangled %pK in all cases, even with the most permissive > kptr_restrict=1 setting: > - in IRQ, there's "pK-error" instead > - in a context of non-CAP_SYSLOG process, nulls are printed Hmmm.. I thought %pK prints an unhashed pointer when the user is root, at least in situations where the user can be known (e.g. during an ioctl call). > Yes, neither should matter if %pK were only used for prints that generate > content of some kind of /proc file read by a CAP_SYSLOG process, but that > doesn't seem to be the case and there are %pK used for printing to dmesg too... I thought about that. On one hand, people who use %pK probably really wanted a hashed pointer printed. On the other hand, I agree that %pK should not be used for dmesg prints. I get the feeling that some (most?) people who use %pK don't really understand how it's supposed to be used. I can extend make-printk-non-secret to %pK if everyone agrees.