From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f71.google.com (mail-it0-f71.google.com [209.85.214.71]) by kanga.kvack.org (Postfix) with ESMTP id E5F126B0390 for ; Tue, 4 Apr 2017 20:22:29 -0400 (EDT) Received: by mail-it0-f71.google.com with SMTP id n130so202999ita.15 for ; Tue, 04 Apr 2017 17:22:29 -0700 (PDT) Received: from mail-io0-x241.google.com (mail-io0-x241.google.com. [2607:f8b0:4001:c06::241]) by mx.google.com with ESMTPS id m2si12081306itg.45.2017.04.04.17.22.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Apr 2017 17:22:29 -0700 (PDT) Received: by mail-io0-x241.google.com with SMTP id f103so50558ioi.2 for ; Tue, 04 Apr 2017 17:22:28 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20170330194143.cbracica3w3ijrcx@codemonkey.org.uk> <20170331171724.nm22iqiellfsvj5z@codemonkey.org.uk> From: Linus Torvalds Date: Tue, 4 Apr 2017 17:22:27 -0700 Message-ID: Subject: Re: sudo x86info -a => kernel BUG at mm/usercopy.c:78! Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Kees Cook Cc: Tommi Rantala , Dave Jones , Linux-MM , LKML , Laura Abbott , Ingo Molnar , Josh Poimboeuf , Mark Rutland , Eric Biggers On Tue, Apr 4, 2017 at 3:55 PM, Linus Torvalds wrote: > > I already explained what the likely fix is: make devmem_is_allowed() > return a ternary value, so that those things that *do* read the BIOS > area can just continue to do so, but they see zeroes for the parts > that the kernel has taken over. Actually, a simpler solution might be to (a) keep the binary value (b) remove the test for the low 1M (c) to avoid breakage, don't return _error_, but just always read zero that also removes (or at least makes it much more expensive) a signal of which pages are kernel allocated vs BIOS allocated. 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