Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3860455imu; Mon, 28 Jan 2019 12:10:29 -0800 (PST) X-Google-Smtp-Source: ALg8bN5OTJ9CaCAvNsfwyFo0FHJ0HlQS9w3oyxac0llM01uukIApS80JUymGqkSIrfli88WkuhNt X-Received: by 2002:a17:902:2bc5:: with SMTP id l63mr23524898plb.107.1548706229913; Mon, 28 Jan 2019 12:10:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548706229; cv=none; d=google.com; s=arc-20160816; b=UtTk71A/DG+vluafWaXUQ3c2ojR3TUqJc+CZuOm5OuyOwjyGsYtXcscpHRYDraX8vd o/sJeINgNCoEzrF+HdcQylqfuxBmpM1LzpaX7j7k2e6CLu+5BQdU3Cp3CaW0L9XPyZgG OUV5T/hjJQ+w3GlpEQaYJCBuPHTbjjrHxqKf1aSrSeOf3SyiRFwpSrc2AzL59a3KvrnO xFlabbeJWAqwHSlJ47SAWDbVoSsAoHl8K8sas8YrLyHaYJenrTZDXSs7BswDFTNxLMur pjLWd3W2OMSsK0WpA93dkdTlFVw4TiG8KWRoXnAUR4eeRcVhYxOmGt1y1Dd/BV+Twi4I tOyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=9mwZ0QBxPH2S8WD7jA1qNlfu8xYBuTJXO/drTZkzxVE=; b=GKNyuu7E6UwpWPJRyawJ/6wN9yVrGokEYSlTzSA2i8a3EsWLJAojJL+acp8oa1FSLB /XhdpeLKqE40z7dmckSrBwDMHy8p208JdouIY8Nqe45MnOPJBIJ3qBJ05pOoJJv0m/7l gj8oTfSNwZYgs3b1Lp9trptVeYx7lG1HQewq1YzMESgtsGdahsTYTzP5yloD3dE55vcs hJqQoHOkZwogk7+Uj34HM4TGoLZRprahruCg9G1ZphMkAdsKAyk8Yli254iHf8R5PivE aTgclEuEA/+dMpkbJaOP3AlTU6OKw6FDzDSUN5rTT8MTnRdXcNlfkBwV/Z4PWvGhyFpW Y94w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=JvuLOphC; 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 a16si11932478pls.146.2019.01.28.12.10.13; Mon, 28 Jan 2019 12:10:29 -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; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=JvuLOphC; 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 S1727378AbfA1UIZ (ORCPT + 99 others); Mon, 28 Jan 2019 15:08:25 -0500 Received: from a9-92.smtp-out.amazonses.com ([54.240.9.92]:58322 "EHLO a9-92.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726661AbfA1UIY (ORCPT ); Mon, 28 Jan 2019 15:08:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1548706103; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=1NG3+0lQa0q2Lu/ZORmD6juh0aS+X9Cwa2FxEX8RMho=; b=JvuLOphCesaanzYNk2yM9XIrCg8OE4Qh4sCo18E9Z0kGk7JsPqj0bkQIJ2M/Ci7n ujgpayRrjhDy93POKRUV/LxnIrm6AqQvzzItZPceVL2P9YvWKR5t8S4XLX2Ynw2/a4j hFPE9hRjARLr1mq6WcwXquSeFwonhBqoN7teIcz0= Date: Mon, 28 Jan 2019 20:08:23 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Kees Cook cc: Andrew Morton , Matthew Wilcox , Linux-MM , LKML , Rik van Riel , Pekka Enberg , David Rientjes , Joonsoo Kim , Kernel Hardening , Michael Ellerman Subject: Re: [PATCH] mm: Prevent mapping slab pages to userspace In-Reply-To: Message-ID: <010001689613c1b5-6539225d-b74e-4248-8d8f-5b801c1a333b-000000@email.amazonses.com> References: <20190125173827.2658-1-willy@infradead.org> <20190128102055.5b0790549542891c4dca47a3@linux-foundation.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2019.01.28-54.240.9.92 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 Jan 2019, Kees Cook wrote: > It seems like a fatal condition to me? There's nothing to check that > such a page wouldn't get freed by the slab while still mapped to > userspace, right? Lets just fail the code. Currently this may work with SLUB. But SLAB and SLOB overlay fields with mapcount. So you would have a corrupted page struct if you mapped a slab page to user space.