From patchwork Thu Nov 23 05:15:31 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: 10072339 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 450BC6056E for ; Thu, 23 Nov 2017 05:15:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 373A829BA0 for ; Thu, 23 Nov 2017 05:15:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B5D229DB9; Thu, 23 Nov 2017 05:15:50 +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 513C529BA0 for ; Thu, 23 Nov 2017 05:15:49 +0000 (UTC) Received: (qmail 23896 invoked by uid 550); 23 Nov 2017 05:15:47 -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 23860 invoked from network); 23 Nov 2017 05:15:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:mime-version :content-transfer-encoding; bh=ThJtdp6XDsJbPIBA0JdjoVIcQk5Y1QaQtMZKU19o/Ss=; b=DkI50LPOK/jxBmvdzHJyONE1eMfiKqFcsoKY8nrfKp5vbIfN0cl2Ii6QnjAUxyHxxV v2Ue8XtC4xpL/TbROfi03uE5Aq5YMPiHnlMcrZOet4DmYCdrCLysFG0kokU7WM1iZFy7 E9iMcNFztQSmU9OrJxyUbbG5Z26gJpTOxBmL9fmwTn86j8apdHIb7WYBJ1i5gOnZvsTx BMCPzJ0B8tB5/SuNKJJifQl1z2jlg/Br1H+MOtAkmyIZEFIIiHibXk3zHen4jtMFTOtx kVje+iWvnVUNvgRlY7EsiVSUYFEWLrEXS4Wal8IH/Y4o1j+C8RyWJCJDMJ6UVeSEM/21 7snQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:mime-version :content-transfer-encoding; bh=ThJtdp6XDsJbPIBA0JdjoVIcQk5Y1QaQtMZKU19o/Ss=; b=G/xLGc5HOhStgXccfz/D3r72+vKaSh6R+kOadsYXeFxY6iqMjF2nJjXDcdbQziUf8I QmJx7xWCmYv3xnHua6foIULflIFu2Y7zFCa7mqP2fpsZCzI9LO3768Hrt0o51vKmIlDP vjFkgtrdHCEJcuj70sc64KPmHLjuEMW2o/yjvClNYvkKZzbSYsWjly5q5q9AJE9nGz23 D/Ok2o/xIexexr3GXT35xjuDDY5qCUZu6KQ58YgAET18tWp43Tw6ieeoujV/34RMDejs 7eW6z2hh1e3sR2wX/cnv5GyHHxkEZT52Sms7sLcrGtcm8UXaDAVVob2edHi89k0EZdwq hq/w== X-Gm-Message-State: AJaThX4bR03Eok5LNrbAphnOlI5ZpUz2nHd8ls82POdvbB1ha7Oaqb71 qPq2Z2rbQqJ6Fk62lQQZ7CQtQ5M8 X-Google-Smtp-Source: AGs4zMZups07paIL0rTQ6GtPFh2efGurg584VpOkdo00/Xxzi0PBIKyy/PvjQd+CqRsY9UYsL+J7RA== X-Received: by 10.36.108.81 with SMTP id w78mr10473813itb.140.1511414134833; Wed, 22 Nov 2017 21:15:34 -0800 (PST) Message-ID: <1511414131.12425.14.camel@gmail.com> From: kaiwan.billimoria@gmail.com To: "Tobin C. Harding" Cc: linux-kernel@vger.kernel.org, "kernel-hardening@lists.openwall.com" Date: Thu, 23 Nov 2017 10:45:31 +0530 X-Mailer: Evolution 3.26.2 (3.26.2-1.fc27) Mime-Version: 1.0 Subject: [kernel-hardening] [PATCH 2/2] scripts: leaking_addresses: help screen updates X-Virus-Scanned: ClamAV using ClamSMTP The current leaking_addresses.pl script only supports showing "leaked" 64-bit kernel virtual addresses. This patch modifies the "help" screen in the following manner: - the '--raw', '--suppress-dmesg', '--squash-by-path' and '--squash-by-filename' option switches are only meaningful when the '--input-raw=' option switch is used. So, indent the 'Help' screen lines to reflect the fact. - an additional example demonstrating usage of the new '--page-offset' parameter. Feedback welcome.. Signed-off-by: Kaiwan N Billimoria diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl index 7ca218221486..3832abb743d7 100755 --- a/scripts/leaking_addresses.pl +++ b/scripts/leaking_addresses.pl @@ -105,10 +105,10 @@ Options: -o, --output-raw= Save results for future processing. -i, --input-raw= Read results from file instead of scanning. - --raw Show raw results (default). - --suppress-dmesg Do not show dmesg results. - --squash-by-path Show one result per unique path. - --squash-by-filename Show one result per unique filename. + --raw Show raw results (default). + --suppress-dmesg Do not show dmesg results. + --squash-by-path Show one result per unique path. + --squash-by-filename Show one result per unique filename. --page-offset= PAGE_OFFSET value (for 32-bit kernels). -d, --debug Display debugging output. -h, --help, --version Display this help and exit. @@ -124,6 +124,10 @@ Examples: # View summary report. $0 --input-raw scan.out --squash-by-filename + # (On a 32-bit system with a 2GB:2GB VMSPLIT), pass PAGE_OFFSET value + # as a parameter + $0 --page-offset=0x80000000 + Scans the running (32 or 64 bit) kernel for potential leaking addresses. EOM