From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754100AbdK2KHh (ORCPT ); Wed, 29 Nov 2017 05:07:37 -0500 Received: from smtp-out4.electric.net ([192.162.216.182]:64026 "EHLO smtp-out4.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbdK2KHc (ORCPT ); Wed, 29 Nov 2017 05:07:32 -0500 From: David Laight To: "'Linus Torvalds'" , "Tobin C. Harding" CC: "kernel-hardening@lists.openwall.com" , "Jason A. Donenfeld" , "Theodore Ts'o" , Kees Cook , Paolo Bonzini , Tycho Andersen , "Roberts, William C" , "Tejun Heo" , Jordan Glover , Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Sergey Senozhatsky , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein , "Daniel Micay" , Djalal Harouni , =?utf-8?B?UmFkaW0gS3JjbcOhcg==?= , "Linux Kernel Mailing List" , Network Development , David Miller , "Stephen Rothwell" , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrew Morton Subject: RE: [PATCH V11 4/5] vsprintf: add printk specifier %px Thread-Topic: [PATCH V11 4/5] vsprintf: add printk specifier %px Thread-Index: AQHTaLnlNbdOW8vPZEqlErHdKDS3dKMrISKg Date: Wed, 29 Nov 2017 10:07:27 +0000 Message-ID: <324abe19f1ee4177911d2fc48899ac8a@AcuMS.aculab.com> References: <1511921105-3647-1-git-send-email-me@tobin.cc> <1511921105-3647-5-git-send-email-me@tobin.cc> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuMS.aculab.com X-TLS: TLSv1.2:ECDHE-RSA-AES256-SHA384:256 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id vATA7h6w014058 From: Linus Torvalds > Sent: 29 November 2017 02:29 > > On Tue, Nov 28, 2017 at 6:05 PM, Tobin C. Harding wrote: > > > > Let's add specifier %px as a > > clear, opt-in, way to print a pointer and maintain some level of > > isolation from all the other hex integer output within the Kernel. > > Yes, I like this model. It's easy and it's obvious ("'x' for hex"), > and it gives people a good way to say "yes, I really want the actual > address as hex" for if/when the hashed pointer doesn't work for some > reason. Remind me to change every %p to %px on kernels that support it. Although the absolute values of pointers may not be useful, knowing that two pointer differ by a small amount is useful. It is also useful to know whether pointers are to stack, code, static data or heap. This change to %p is going to make debugging a nightmare. David