Date: Sat, 7 Oct 2017 19:44:53 -0400 From: Theodore Ts'o Message-ID: <20171007234453.vojizsbxec4gygku@thunk.org> References: <1506816410-10230-1-git-send-email-me@tobin.cc> <476DC76E7D1DF2438D32BFADF679FC563EAF4F29@ORSMSX103.amr.corp.intel.com> <20171005021915.GK16685@eros> <476DC76E7D1DF2438D32BFADF679FC563F4AD0AF@ORSMSX115.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [kernel-hardening] [RFC V2 0/6] add more kernel pointer filter options To: Linus Torvalds Cc: "Roberts, William C" , "Tobin C. Harding" , Tejun Heo , Jordan Glover , Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Sergey Senozhatsky , "kernel-hardening@lists.openwall.com" , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein List-ID: On Thu, Oct 05, 2017 at 09:19:17AM -0700, Linus Torvalds wrote: > - meaningful hardware addresses (ie the pointer is some mmio pointer). > > At least the first case could possibly continue to use a '%p' that > simply hashes the actual pointer value with some hash or something > like that. It's not the pointer itself that is important, it's just > the "identity" of the socket or device or whatever. > > Of course, "just hash it" isn't good enough if we're just hiding the > (very limited) kernel address space randomization, but mixing in a > per-boot random value might be sufficient. Maybe this is overkill, but what about *encrypting* the pointer using fixed, per-boot random key? It would have to be a block crypto algorithm, like Tea/XXTea/XXTEA or Speck. That has all of the benefits of hashing, plus if the key is available (only to privileged users, of course), then it would be possible to get the pointer for debugging purposes. - Ted