From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934034AbdKBQEO (ORCPT ); Thu, 2 Nov 2017 12:04:14 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:56821 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752128AbdKBQEM (ORCPT ); Thu, 2 Nov 2017 12:04:12 -0400 X-Google-Smtp-Source: ABhQp+TN1bFbprHqCigAtr3NFOdTEhZTzFXclTINbfy94P2Jx4WH3BIkxJAgK1aHbmVMVHv/hKkhng== Date: Fri, 3 Nov 2017 01:04:09 +0900 From: Sergey Senozhatsky To: "Tobin C. Harding" Cc: Sergey Senozhatsky , Sergey Senozhatsky , kernel-hardening@lists.openwall.com, "Jason A. Donenfeld" , "Theodore Ts'o" , Linus Torvalds , Kees Cook , Paolo Bonzini , Tycho Andersen , "Roberts, William C" , Tejun Heo , Jordan Glover , Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein , Daniel Micay , Djalal Harouni , linux-kernel@vger.kernel.org Subject: Re: [PATCH V8 0/2] printk: hash addresses printed with %p Message-ID: <20171102160409.GE7195@tigerII.localdomain> References: <1508986436-31966-1-git-send-email-me@tobin.cc> <20171027133301.GA612@tigerII.localdomain> <20171031233533.GD3585@eros> <20171102082344.GC655@jagdpanzerIV> <20171102101449.GG7499@eros> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171102101449.GG7499@eros> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (11/02/17 21:14), Tobin C. Harding wrote: [..] > I can put my email address if there is not a better option. sounds good. > > hm... just a huge pile of if's > > > > if (is_vmalloc_addr(addr)) > > do_hashing(addr); > > else if (__module_address(addr)) > > do_hashing(addr); > > else if (is_kernel(addr) || is_kernel_inittext(addr)) > > ... > > > > but that's going to be really messy and "iffy". > > This is the only suggestion we have so far. > well... one more: check if we can safely dereference it. if so it's a pointer, probably :) if (!probe_kernel_address(addr, p)) do_hashing(addr); just an idea. -ss