Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3764641imu; Mon, 28 Jan 2019 10:21:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN4jZSN7OfriDnjwB/FXbBSGaf6eyuXAYEyI4ty4kpLg1iN6pIMbBHFYrbuSfwIpf1lwRsgY X-Received: by 2002:a63:4e41:: with SMTP id o1mr21251213pgl.282.1548699697625; Mon, 28 Jan 2019 10:21:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548699697; cv=none; d=google.com; s=arc-20160816; b=FYVfOONlC1H9LifDuyWeGHeWKxRQiNcRbwWEj0ZegxGyXSQdTE+ZDPKIhZjm6CcfY/ hCpYIwNhfKDNVHYPiAMU+odogN1trYmzENrS1eYyoZMqo/eoe0c4MI5iTWRCa2PO1ztl b02Ae/50QYt1McbszlVNSdKsByjpzSVEP40tp2wIlutJ8KClZbRu2H0KGaKIk5wKRmx0 T/CU/VJTKrG6sU2EEFbADc6REwNVVz9YF3M76rTnY949tkHYlx62hz9dk23C3nSXDo3J aTal0rX9rdLeW8houzSFuzfUC1Ue+wQb9MdZpkR5SpXoC5e9Q8iPe1I1cE3GILEN1Eof 4NiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=N/L/9GhZefvhIbNzmPmzWZE8ly6u08M/YuT6KkZeo+k=; b=J7FeUE+2XVP8Hhnlz+KlkgiNQdYgKxnoRZISifeAB5KlgHCeTFwKQf1lB3Xc7E96fF Y/ZOYEGbw/UzKs8s7NqMR1ULzibha4mwGA846WlLCF3nBcJBWlFERxTTDYsZ38EhriHm yLtpDW18I+Eco6EKAWbrU2fiUpgXJDZybOUKmhjGjsYNSHNYhKNF1rcMPUFvE/Zc9m6Z fWGGLJ8BoLEuZlSHn4RFmA0pK9nciTj8htRP1uteSsBgrdPkg0fvYRY4EJOxY8LID+fj /ETo+YrwpCrNhTtTE+vRDbipXh1wPdzJ15Hz3eN2syiEvnnKBUT/9mF8HwttL/FEngZC DRjg== 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 j10si25965644pgn.365.2019.01.28.10.21.20; Mon, 28 Jan 2019 10:21:37 -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 S1726925AbfA1SU6 (ORCPT + 99 others); Mon, 28 Jan 2019 13:20:58 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:58128 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbfA1SU6 (ORCPT ); Mon, 28 Jan 2019 13:20:58 -0500 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1228223DD; Mon, 28 Jan 2019 18:20:57 +0000 (UTC) Date: Mon, 28 Jan 2019 10:20:55 -0800 From: Andrew Morton To: Matthew Wilcox Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Rik van Riel , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , kernel-hardening@lists.openwall.com, Kees Cook , Michael Ellerman Subject: Re: [PATCH] mm: Prevent mapping slab pages to userspace Message-Id: <20190128102055.5b0790549542891c4dca47a3@linux-foundation.org> In-Reply-To: <20190125173827.2658-1-willy@infradead.org> References: <20190125173827.2658-1-willy@infradead.org> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 25 Jan 2019 09:38:27 -0800 Matthew Wilcox wrote: > It's never appropriate to map a page allocated by SLAB into userspace. > A buggy device driver might try this, or an attacker might be able to > find a way to make it happen. It wouldn't surprise me if someone somewhere is doing this. Rather than mysteriously breaking their code, how about we emit a warning and still permit it to proceed, for a while?