Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753610AbdLDIVT (ORCPT ); Mon, 4 Dec 2017 03:21:19 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:41589 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753425AbdLDIVQ (ORCPT ); Mon, 4 Dec 2017 03:21:16 -0500 X-ME-Sender: Date: Mon, 4 Dec 2017 19:21:11 +1100 From: "Tobin C. Harding" To: Kaiwan N Billimoria Cc: Alexander Kapshuk , linux-kernel , kernel-hardening@lists.openwall.com Subject: Re: [PATCH] leaking_addresses: add support for 32-bit kernel addresses Message-ID: <20171204082111.GB21565@eros> References: <20171129101640.GC6217@eros> <20171129204812.GE6217@eros> <1512133747.17323.3.camel@gmail.com> <20171204001106.GB27780@eros> <1512362481.17323.9.camel@gmail.com> <20171204045522.GE27780@eros> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailer: Mutt 1.5.24 (2015-08-30) User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1052 Lines: 33 On Mon, Dec 04, 2017 at 10:51:53AM +0530, Kaiwan N Billimoria wrote: > > On Mon, Dec 4, 2017 at 10:25 AM, Tobin C. Harding wrote: > >> > >> > With the 'eval', no warning, it's fine. > >> > >> Why not use hex()? > > > >> > > >> > foreach my $config_file (@config_files) { > >> > + $config_file =~ s/\R*//g; > >> > >> Is there some reason you don't use chomp()? > > > > Wrt your suggestions: > > --- > diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl > index 9906dcf8b807..260b52e456f1 100755 > --- a/scripts/leaking_addresses.pl > +++ b/scripts/leaking_addresses.pl > @@ -266,7 +266,7 @@ sub is_false_positive > sub is_false_positive_ix86_32 > { > my ($match) = @_; > - state $page_offset = eval get_page_offset(); # only gets called once > + state $page_offset = hex get_page_offset(); # only gets called once I don't think this is valid ;) I meant use hex() to convert the string to an int so it doesn't throw the warning (inside get_page_offset()). thanks, Tobin.