Received: by 10.223.164.221 with SMTP id h29csp2155197wrb; Thu, 2 Nov 2017 06:44:32 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Tt77f1glx/IhqPr6WfE2gY6LwM3RGo8CoEXf0JFp9hvB2wECbAPtIrVOOnyd6lDzSXunSz X-Received: by 10.159.247.129 with SMTP id e1mr3211794pls.335.1509630272653; Thu, 02 Nov 2017 06:44:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509630272; cv=none; d=google.com; s=arc-20160816; b=rlMD/uDX29xzVZycsCRee5CkwF/J/syiagE+tJ6TM1aHPTbDp2KQjjYEtbp6hqxFUM g7/5NJhPJwo1LtP3slScJTGGxr8f19gdnx125vmmJ21Xb/R2iO6ey38xl3seSHcujj56 u4F96rY2ycatB+wZPUKqzqJ9uI5MHVPMA1kaeRJP7h9CzhxKQlR8/drLGa3SA+2+1bmt 6ZaBNxVAZ7HQ1kyR4ThHH2Ss6LdV7ojn9Cq6OJqdd4GfuWhDDXvMDvO6q2EARz7Piioc G6VeSfINW3qgX1G4JesfqbBA5XaU7lPbWs3MzpQWgGi6CBX8RabyU6eXTV+X0hP8aksp qanA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=juYZ80GcEzp6EKQf1hWIbIboqT2RStgusUJmYVju+eo=; b=lvnQV0rEtInT4Om5YThOhE3kDBwRaTizWK2JwaUvv9hb88bD4vdvRa/ztMQMNQdFY3 yETfAbOk1cu8ClTJMbaiLffXjgUa2mJJkhc7a7IPymNyD58egBkHzosnJW1wfDqKT8Ur 09nvk65f6M0aXerqL6KdB+Z8pH32EqP+Wpl2SFm63rIs1ApVn1wHkbUnaxY2qoQ65X8o 8opJZ8UuTkHePoCP2RF/VycNdhOwOJ4bprA9suQPsuTkujqQXMU4KI5TI43Ri9r4kWka Kcv64gLJfiDXRji/rmTAttaltLryw7QbErNSoNDd7SCv+NEHB5p3lziH1sw8CoL3JUto 9bzg== 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 q8si3789377pgn.679.2017.11.02.06.44.19; Thu, 02 Nov 2017 06:44:32 -0700 (PDT) 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 S933085AbdKBNn3 convert rfc822-to-8bit (ORCPT + 96 others); Thu, 2 Nov 2017 09:43:29 -0400 Received: from mga06.intel.com ([134.134.136.31]:17684 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932583AbdKBNn2 (ORCPT ); Thu, 2 Nov 2017 09:43:28 -0400 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP; 02 Nov 2017 06:43:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,334,1505804400"; d="scan'208";a="168396797" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by orsmga005.jf.intel.com with ESMTP; 02 Nov 2017 06:43:25 -0700 Received: from orsmsx115.amr.corp.intel.com ([169.254.4.2]) by ORSMSX106.amr.corp.intel.com ([169.254.1.120]) with mapi id 14.03.0319.002; Thu, 2 Nov 2017 06:43:25 -0700 From: "Roberts, William C" To: "Tobin C. Harding" , Sergey Senozhatsky CC: Sergey Senozhatsky , "kernel-hardening@lists.openwall.com" , "Jason A. Donenfeld" , Theodore Ts'o , "Linus Torvalds" , Kees Cook , Paolo Bonzini , Tycho Andersen , "Tejun Heo" , Jordan Glover , Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein , Daniel Micay , Djalal Harouni , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH V8 0/2] printk: hash addresses printed with %p Thread-Topic: [PATCH V8 0/2] printk: hash addresses printed with %p Thread-Index: AQHTU7P5e/Ie6sojY0GHqaAmC4u9tqMBVMWA///EyXA= Date: Thu, 2 Nov 2017 13:43:24 +0000 Message-ID: <476DC76E7D1DF2438D32BFADF679FC563F4B8075@ORSMSX115.amr.corp.intel.com> References: <1508986436-31966-1-git-send-email-me@tobin.cc> <20171027133301.GA612@tigerII.localdomain> <20171031233533.GD3585@eros> <20171102082344.GC655@jagdpanzerIV> <20171102101449.GG7499@eros> In-Reply-To: <20171102101449.GG7499@eros> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Tobin C. Harding [mailto:me@tobin.cc] > Sent: Thursday, November 2, 2017 3:15 AM > To: Sergey Senozhatsky > Cc: Sergey Senozhatsky ; kernel- > hardening@lists.openwall.com; Jason A. Donenfeld ; > Theodore Ts'o ; Linus Torvalds foundation.org>; Kees Cook ; Paolo Bonzini > ; Tycho Andersen ; Roberts, > William C ; Tejun Heo ; Jordan > Glover ; Greg KH > ; Petr Mladek ; Joe > Perches ; Ian Campbell ; Catalin Marinas > ; Will Deacon ; Steven > Rostedt ; Chris Fries ; Dave > Weinstein ; Daniel Micay ; Djalal > Harouni ; linux-kernel@vger.kernel.org > Subject: Re: [PATCH V8 0/2] printk: hash addresses printed with %p > > On Thu, Nov 02, 2017 at 05:23:44PM +0900, Sergey Senozhatsky wrote: > > On (11/01/17 10:35), Tobin C. Harding wrote: > > [..] > > > Yes. The question has been raised will we be here again in 6 years > > > time trying to fix all the uses of %x. And there are already 29K > > > uses of %[xX] in tree, which of these are leaking addresses? This is why Linus' > > > has commented that really effort should be directed at finding the > > > leaks as they happen (in procfs, sysfs, dmesg) instead of fixing > > > this in the code. > > > > got it. thanks. > > > > > So far I haven't been able to come up with any meaningful way to do > > > this on 32 bit machines. There is a patch adding a script to catch > > > leaks on 64 bit machines in flight. > > > > who is expected to run that script? > > If one person runs it and finds one leaking address, I'd say it wast worth writing. If > a bunch of people with different set ups run it and we find a bunch of leaking > addresses, WIN! I wonder if the 0 day testing robot could run it.... > > Your comment did give me the idea of adding some output to the command > offering an email address to send suspicious output for those who do not wish to > investigate it further. I can put my email address if there is not a better option. > > > BTW, can BPF/eBPF printk addresses? > > I know absolutely zero about BPF/eBPF. I guess now is a good time to learn. > > > > This patch needs to be a small part of a continued effort to stop > > > the leaks if we want to have any hope of stopping them. > > > > > > If you have any suggestions on dealing with %x please do say. We > > > have code changes, compiler warnings, and checkpatch - none of which > > > immediately seem great. > > > > hm... just a huge pile of if's > > > > if (is_vmalloc_addr(addr)) > > do_hashing(addr); > > else if (__module_address(addr)) > > do_hashing(addr); > > else if (is_kernel(addr) || is_kernel_inittext(addr)) > > ... > > > > but that's going to be really messy and "iffy". > > This is the only suggestion we have so far. > > thanks, > Tobin. From 1582948968587560161@xxx Thu Nov 02 10:16:15 +0000 2017 X-GM-THRID: 1582089505245226476 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread