From patchwork Mon Dec 4 05:21:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaiwan N Billimoria X-Patchwork-Id: 10089657 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2670360327 for ; Mon, 4 Dec 2017 05:22:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16AEC28E52 for ; Mon, 4 Dec 2017 05:22:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0AA6C28EF5; Mon, 4 Dec 2017 05:22:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 1E6D228E52 for ; Mon, 4 Dec 2017 05:22:28 +0000 (UTC) Received: (qmail 25626 invoked by uid 550); 4 Dec 2017 05:22:26 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 24568 invoked from network); 4 Dec 2017 05:22:25 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=gr+Sq7sirdTa1OBWTgm74h83Ax8UluimrqgAeSeMM9c=; b=Y4FFSy9Nvs687qObntZr+kDgXJbVws25SzTM1wkyJ+6esAr09YkqfgvPvRZiV+Xtd5 o2DBAM2BjQd/Tk8NWy5BKQ4QlLO0U61/e4BJvkNqHr4bpby4DUGR7lBywVEGr8KAys7s NW1eDQ07BbfJFtCTWosT5payC3RAZ/G/q48O9/HR4UHFfwe8UtjxVXp7Vr8RWOEKYRkP M3ij5jIUSLR2u4jSc0u3GJS51ic1bHgnM+VAy4naHLXqSlJUYm4Ez7BsivlhF29980pK q2srkj3yYC7lPsItOQJGVgI5dfP5PvfACEhcgB/5SQxtua2IAt9ydzcxk4oEIwvpSeUv Wfgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=gr+Sq7sirdTa1OBWTgm74h83Ax8UluimrqgAeSeMM9c=; b=q7iboCbmr1OCR46BOsingCd2Blhm3huWu1BAbU8AlX+81P15OzgeLygpQ8O+hoIweU VUQYUGTWqjHXBiW4A6+wp5SoPRTy2NkyWSqJ9hAIdM/5VZ65wLxgzN6I02sCCJHUdYxF ipDUWE0UD3uy5VHy43sc/ytQljZghWaOWDDzUKzRsMoZiMFRexVFKUlKEJ5TPaZjTbUO E/I2fRidYAlaVltQMVuRpA7Lyy034Wl0I9NspsZnUmmw+litBS6LATDq4EMJgxI2f7w7 mM2apXJFXDoub0i4UgzY0v/qX7uJlp9t9V3qWevtkc0tBASf84qwLHkJE7YbdJaO5cLH F5ow== X-Gm-Message-State: AJaThX7H4VGf/lQqbdbyj5FZbbB0Nf8zfEnbRWLvsJRhrbO8h/BcJ5Jf GcqNu5vubb2qqnQ7xZwAR5V9FosTMtZ0A0UCCAI= X-Google-Smtp-Source: AGs4zMbVjJcUlS5y4fRvHbNMJGFbBavHQIgUEvebfuLq5ICIhIvAZZKy8QJVXify3qu+IT3QqPiHwaJ+GQvSFHYP7F4= X-Received: by 10.157.72.225 with SMTP id a30mr15403029otj.195.1512364933773; Sun, 03 Dec 2017 21:22:13 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <1511850724-2381-1-git-send-email-me@tobin.cc> <20171128211003.GY17858@eros> <20171129101640.GC6217@eros> <20171129204812.GE6217@eros> <1512133747.17323.3.camel@gmail.com> <20171204001106.GB27780@eros> <1512362481.17323.9.camel@gmail.com> <20171204045522.GE27780@eros> From: Kaiwan N Billimoria Date: Mon, 4 Dec 2017 10:51:53 +0530 Message-ID: To: "Tobin C. Harding" Cc: Alexander Kapshuk , linux-kernel , kernel-hardening@lists.openwall.com Subject: [kernel-hardening] Re: [PATCH] leaking_addresses: add support for 32-bit kernel addresses X-Virus-Scanned: ClamAV using ClamSMTP > 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: --- Thanks & Regards, Kaiwan. 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 if ($match =~ '\b(0x)?(f|F){8}\b') { return 1; @@ -313,7 +313,7 @@ sub get_page_offset } foreach my $config_file (@config_files) { - $config_file =~ s/\R*//g; + chomp $config_file; $page_offset = parse_kernel_config_file($config_file); if ($page_offset ne "") { return $page_offset;