Received: by 10.223.164.202 with SMTP id h10csp2892274wrb; Sun, 12 Nov 2017 21:35:56 -0800 (PST) X-Google-Smtp-Source: AGs4zMYN4oN0+k3nFcK5EGtjMGHZ+34sGUsKDP7722toHu6mHwHhz3c6R3tPAlrxJNkAsxNBuLPl X-Received: by 10.99.120.131 with SMTP id t125mr7563946pgc.81.1510551355924; Sun, 12 Nov 2017 21:35:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510551355; cv=none; d=google.com; s=arc-20160816; b=X/ClyDmPDjExXO33gNb/jnPIwDRS9SbdEmhOnp3UHXc9ZyJ5Mb3vCCQrbb3qQnVwXl Ft5UUrjPyDV5gUHaTErvExTfqZk4J8jSDzMiTBOepOhB93CZB+Q/kP4h71vLmQ18gji4 G2y813H45mpc9st37CvEZoIcVUxCw+1+b3biwmXeq62sJHjtvpe6b4Yt6hfeOklFk43v VZahiTjFr36eKvRo+3AlznJlkMut4o0qttmC0kaRAa5bMXKYZ+Nr/ywRzw4sQj1y9zdy Y0Gw/BFRNj0S+mINId8QhH9dR0NOe2g2YYeHJowhDH5DVmDPkcBTy5KEmWMbr5NcRVjj 1IlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:arc-authentication-results; bh=UHqmZElyR6LRtg/nuDwStqYgXyfIoSCUMhdxyqoVlI4=; b=ijmRfKFaUB1RS9ZCMZ7WI9/Xn99kFYHtLm+7E4XcYWQiyXBDXc1cxQH31YeuXL+ZLj jT8TGy6VLVfAt7zndhH6HvdTufwOAMxXPqPf3+a0wk7/C87GUogbpysmNL8YCFwZfxpa J6v8kvNQTcJLv98lGXxRN34h7+uRFwVS8hYepm9cQFhDJdZbNpUBM7JItjT2/TV6Jc1C 0B4poQYLocmo+zuu3xIwsFSD3+Rsc0DmWU4+mNnEAtupUJCXdaQ3WXV6DprQNspT8l2k 0xcXUMm8AijF7Be4iwOQV4CRkZRSxpDC5ZZJdavngGAaNstX9p1HHOdq+j35UXN8up4i ddQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j74si14968544pfk.66.2017.11.12.21.35.43; Sun, 12 Nov 2017 21:35:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751909AbdKMFfD (ORCPT + 88 others); Mon, 13 Nov 2017 00:35:03 -0500 Received: from sg2plout10-02.prod.sin2.secureserver.net ([182.50.145.5]:46833 "EHLO sg2plout10-02.prod.sin2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751756AbdKMFfB (ORCPT ); Mon, 13 Nov 2017 00:35:01 -0500 Received: from mail-oi0-f54.google.com ([209.85.218.54]) by :SMTPAUTH: with SMTP id E7HXelnookLQ5E7HYe6G6Y; Sun, 12 Nov 2017 22:27:40 -0700 Received: by mail-oi0-f54.google.com with SMTP id d65so1074446oig.0; Sun, 12 Nov 2017 21:27:40 -0800 (PST) X-Gm-Message-State: AJaThX5fN7X3xOevpwn0XxluqgJUC0vzhp4RahTYxJE54qD4b/wvN63k 6wCNEODkyO1eMMvWLPqekTTARppbqcykpzHDssk= X-Received: by 10.202.72.79 with SMTP id v76mr4156806oia.430.1510550857273; Sun, 12 Nov 2017 21:27:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.138.199 with HTTP; Sun, 12 Nov 2017 21:27:16 -0800 (PST) In-Reply-To: <20171113043511.GH11398@eros> References: <1510050731-32446-1-git-send-email-me@tobin.cc> <20171111231007.iirqce3r7xqqnxd3@node.shutemov.name> <20171112230646.GM19752@eros> <20171113033728.wheztgb2hbc74lj2@node.shutemov.name> <20171113043511.GH11398@eros> From: Kaiwan N Billimoria Date: Mon, 13 Nov 2017 10:57:16 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [kernel-hardening] Re: [PATCH v4] scripts: add leaking_addresses.pl To: "Tobin C. Harding" Cc: "Kirill A. Shutemov" , 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 , Sergey Senozhatsky , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein , Daniel Micay , Djalal Harouni , Linux Kernel Mailing List , Network Development , David Miller Content-Type: text/plain; charset="UTF-8" X-CMAE-Envelope: MS4wfA8335xVta+YnILaj3bInOrowKdgM1KjC7hZUN3YIG9IQ+orV2cpR/gafoj2QObh06ME7lWJ8dPBBwEnF0T45cWLSV/xvt15xD7K+3a/mJHPEAAueELb 3Iumd5t/VgRG4YMpj/7qfIMaE8uayb0026rsaeU8I6zdWNtYy/T0wtJNvv4/2m+Jb4MX9RZnZWwVykTvTIerEgATLqsKKmDpVP1aoDwlkrrIzkJBHI+YCn4e Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 13, 2017 at 10:05 AM, Tobin C. Harding wrote: > On Mon, Nov 13, 2017 at 06:37:28AM +0300, Kirill A. Shutemov wrote: >> On Mon, Nov 13, 2017 at 10:06:46AM +1100, Tobin C. Harding wrote: >> > On Sun, Nov 12, 2017 at 02:10:07AM +0300, Kirill A. Shutemov wrote: ... >> > >> > Thanks for the link. So it looks like we need to refactor the kernel >> > address regular expression into a function that takes into account the >> > machine architecture and the number of page table levels. We will need >> > to add this to the false positive checks also. >> > >> > > Not sure if we care. It won't work too for other 64-bit architectrues that >> > > have more than 256TB of virtual address space. >> > >> > Is this because of the virtual memory map? >> >> On x86 direct mapping is the nearest thing we have to userspace. >> >> > Did you mean 512TB? >> >> No, I mean 256TB. >> >> You have all kernel memory in the range from 0xffff000000000000 to >> 0xffffffffffffffff if you have 256 TB of virtual address space. If you >> hvae more, some thing might be ouside the range. > > Doesn't 4-level paging already limit a system to 64TB of memory? So any > system better equipped than this will use 5-level paging right? If I am > totally talking rubbish please ignore, I'm appreciative that you pointed > out the limitation already. Perhaps we can add a comment to the script > > # Script may miss some addresses on machines with more than 256TB of > # memory. I think the 256TB is wrt *virtual* address space not physical RAM. Also, IMHO, the script should 'transparently' take into account the # of paging levels (instead of the user needing to pass a parameter). IOW it should be able to detect the same (say, from the .config file) and act accordingly - in the sense, the regex's and associated logic would accordingly differ. From 1583924138870675712@xxx Mon Nov 13 04:36:10 +0000 2017 X-GM-THRID: 1583410491222242898 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread