From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tobin C. Harding" Subject: Re: [PATCH V11 4/5] vsprintf: add printk specifier %px Date: Thu, 7 Dec 2017 16:17:11 +1100 Message-ID: <20171207051711.GB2191@eros> References: <324abe19f1ee4177911d2fc48899ac8a@AcuMS.aculab.com> <596c917e-3183-d80a-89d4-97e0eb5dc077@infradead.org> <20171206013657.GA479@jagdpanzerIV> <20171206084537.GA462@jagdpanzerIV> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Geert Uytterhoeven , Linus Torvalds , Randy Dunlap , David Laight , Kees Cook , "kernel-hardening@lists.openwall.com" , "Jason A. Donenfeld" , Theodore Ts'o , Paolo Bonzini , Tycho Andersen , "Roberts, William C" , Tejun Heo , Jordan Glover , Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Sergey Senozhatsky , Catalin Marinas To: Sergey Senozhatsky Return-path: Content-Disposition: inline In-Reply-To: <20171206084537.GA462@jagdpanzerIV> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Wed, Dec 06, 2017 at 05:45:37PM +0900, Sergey Senozhatsky wrote: > On (12/06/17 09:32), Geert Uytterhoeven wrote: > [..] > > >> show_fault_oops(struct pt_regs *regs, unsigned long error_code, > > >> unsigned long address) > > >> ... > > >> printk(KERN_CONT " at %p\n", (void *) address); > > >> printk(KERN_ALERT "IP: %pS\n", (void *)regs->ip); > > > > > > So %pS isn't %p, and shows the symbolic name. > > > > If the symbolic name is available. > > Else it prints the non-hashed pointer value (FTR). Well, this [RFC 0/3] kallsyms: don't leak address when printing symbol _trys_ to fix that > hm, indeed. and !CONFIG_KALLSYMS config turns %pS/%ps > into special_hex_number(). But totally misses this :( "" would be better returned when !CONFIG_KALLSYMS, right? thanks, Tobin.