From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751470AbdKTPkC (ORCPT ); Mon, 20 Nov 2017 10:40:02 -0500 Received: from mx2.suse.de ([195.135.220.15]:42454 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751329AbdKTPjv (ORCPT ); Mon, 20 Nov 2017 10:39:51 -0500 Date: Mon, 20 Nov 2017 16:39:46 +0100 From: Petr Mladek To: kaiwan.billimoria@gmail.com Cc: "Tobin C. Harding" , 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 , Joe Perches , Ian Campbell , Sergey Senozhatsky , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein , Daniel Micay , Djalal Harouni , linux-kernel@vger.kernel.org, Network Development , David Miller Subject: Re: [kernel-hardening] [PATCH v4] scripts: add leaking_addresses.pl Message-ID: <20171120153946.6ifryf2uk4oorvq5@pathway.suse.cz> References: <1510050731-32446-1-git-send-email-me@tobin.cc> <1510322194.19812.3.camel@gmail.com> <20171112222119.GL19752@eros> <1510551988.30178.10.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1510551988.30178.10.camel@gmail.com> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2017-11-13 11:16:28, kaiwan.billimoria@gmail.com wrote: > On Mon, 2017-11-13 at 09:21 +1100, Tobin C. Harding wrote: > > On Fri, Nov 10, 2017 at 07:26:34PM +0530, kaiwan.billimoria@gmail.com > > > - it currently hard-codes a global 'PAGE_OFFSET_32BIT=0xc0000000' > > > , just > > > so I can test quickly; must figure whether to query it or pass it; > > > Suggestions? > > > > Perhaps we should have a command line option for this. > > > > --kernel-base-address > > Why not just detect it programatically? We could devise a series of > fallbacks; something like: > - if .config exists in the kernel source tree root, grep it for > PAGE_OFFSET > - if not, grep the arch-specific (arch//configs/) > for the same > - if for some reason we don't have enough info regarding specific > platform and thus the defconfig filename (could happen for ARM, PPC?), > we then fail and request the user to pass it as a parameter. You might also check /proc/config.gz. Best Regards, Petr From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Mladek Subject: Re: [PATCH v4] scripts: add leaking_addresses.pl Date: Mon, 20 Nov 2017 16:39:46 +0100 Message-ID: <20171120153946.6ifryf2uk4oorvq5@pathway.suse.cz> References: <1510050731-32446-1-git-send-email-me@tobin.cc> <1510322194.19812.3.camel@gmail.com> <20171112222119.GL19752@eros> <1510551988.30178.10.camel@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Tobin C. Harding" , 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 , Joe Perches , Ian Campbell , Sergey Senozhatsky , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein , Daniel Micay , Djalal Harouni , linux-kernel@vger.kernel.org, Network De To: kaiwan.billimoria@gmail.com Return-path: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Content-Disposition: inline In-Reply-To: <1510551988.30178.10.camel@gmail.com> List-Id: netdev.vger.kernel.org On Mon 2017-11-13 11:16:28, kaiwan.billimoria@gmail.com wrote: > On Mon, 2017-11-13 at 09:21 +1100, Tobin C. Harding wrote: > > On Fri, Nov 10, 2017 at 07:26:34PM +0530, kaiwan.billimoria@gmail.com > > > - it currently hard-codes a global 'PAGE_OFFSET_32BIT=0xc0000000' > > > , just > > > so I can test quickly; must figure whether to query it or pass it; > > > Suggestions? > > > > Perhaps we should have a command line option for this. > > > > --kernel-base-address > > Why not just detect it programatically? We could devise a series of > fallbacks; something like: > - if .config exists in the kernel source tree root, grep it for > PAGE_OFFSET > - if not, grep the arch-specific (arch//configs/) > for the same > - if for some reason we don't have enough info regarding specific > platform and thus the defconfig filename (could happen for ARM, PPC?), > we then fail and request the user to pass it as a parameter. You might also check /proc/config.gz. Best Regards, Petr