From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f200.google.com (mail-io0-f200.google.com [209.85.223.200]) by kanga.kvack.org (Postfix) with ESMTP id 223306B0038 for ; Tue, 19 Dec 2017 23:36:37 -0500 (EST) Received: by mail-io0-f200.google.com with SMTP id q3so3042585ioh.19 for ; Tue, 19 Dec 2017 20:36:37 -0800 (PST) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a16sor1548256itc.124.2017.12.19.20.36.35 for (Google Transport Security); Tue, 19 Dec 2017 20:36:35 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <001a113e9ca8a3affd05609d7ccf@google.com> <6a50d160-56d0-29f9-cfed-6c9202140b43@I-love.SAKURA.ne.jp> <20171219083746.GR19604@eros> <20171219132246.GD13680@bombadil.infradead.org> <20171219214849.GU21978@ZenIV.linux.org.uk> <20171220035043.GA14980@bombadil.infradead.org> From: Linus Torvalds Date: Tue, 19 Dec 2017 20:36:34 -0800 Message-ID: Subject: Re: BUG: bad usercopy in memdup_user Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Matthew Wilcox Cc: Al Viro , "Tobin C. Harding" , Dmitry Vyukov , Kees Cook , Tetsuo Handa , Linux-MM , syzbot , David Windsor , keun-o.park@darkmatter.ae, Laura Abbott , LKML , Mark Rutland , Ingo Molnar , syzkaller-bugs@googlegroups.com, Will Deacon On Tue, Dec 19, 2017 at 8:05 PM, Linus Torvalds wrote: > > And yes, we had a few cases where the hashing actually did hide the > values, and I've been applying patches to turn those from %p to %px. So far at least: 10a7e9d84915 Do not hash userspace addresses in fault handlers 85c3e4a5a185 mm/slab.c: do not hash pointers when debugging slab d81041820873 powerpc/xmon: Don't print hashed pointers in xmon 328b4ed93b69 x86: don't hash faulting address in oops printout b7ad7ef742a9 remove task and stack pointer printout from oops dump 6424f6bb4327 kasan: use %px to print addresses instead of %p although that next-to-last case is a "remove %p" case rather than "convert to %px". And we'll probably hit a few more, I'm not at all claiming that we're somehow "done". There's bound to be other cases people haven't noticed yet (or haven't patched yet, like the usercopy case that Kees is signed up to fix up). But considering that we had something like 12k of those %p users, I think a handful now (and maybe a few tens eventually) is worth the pain and confusion. I just want to make sure that the ones we _do_ convert we actually spend the mental effort really looking at, and really asking "does it make sense to convert this?" Not just knee-jerking "oh, it's hashed, let's just unhash it". Linus -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org