Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1639082imu; Wed, 9 Jan 2019 23:55:56 -0800 (PST) X-Google-Smtp-Source: ALg8bN7BRPSLe5b+KRqTEu4TtVH+tNfkbZnt+wFK/kLQ0Lf4lL+JGOY1SmLQi/x5L9qNxQ79xCKl X-Received: by 2002:a17:902:820d:: with SMTP id x13mr9602939pln.229.1547106956622; Wed, 09 Jan 2019 23:55:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547106956; cv=none; d=google.com; s=arc-20160816; b=jwSeetY5zdzlwFb8ljRwRA6EeZmGCel/82V8huukTBI+CxZdKTBkfge5O6c+9Y+Y+m pUiIIajoqlhvoSu+fkJgQyhZVjg/ZuP9gIibzcAaTbaOlR0qbobRhgn5U26ZKtFGOTy9 joHqMg13krIVyzjyq03AQNXFNijFb3cuDwdXbe63b1nz54cyT6kzbzE06IdWX8FfTILa JG1vQyRKk8yrCgNxDaT2LDD2r++LanEd8YCNaVqGiHsnUGBycefzB4rkjlFcxNTShUXd HQSJ9XBxql9j8MErU08G6IKHSba6/2m49GFCoDBF5ZPnBtkgti9gaUF4EJEbTd3X4zD2 q1Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=AP3vwm5hJhQ37Qu1gNZNJyRbsEdNns+KLkKgtf0sA+c=; b=uh5e2LpgCWdRy+S4p08sbNIKqJw98jxZAewdZy8TdLojckeHOaD5QnZRj03/0KzVqq J0MYKeEqYV7aiQw/9umplXOqAUQmZNSOuHZbjqFcPlRs0mv6AoLQzFMqaq1actNKz9+N VBSM3NioTe4Ti0CmGy67h7pXhEUd5Oci28MzX6yjMtsC3FY9+h5EuuygqzK/FVdvcmw3 NAZ/6anYxCahsGVKnFmdpkh+MZCebwBic34UL2YsodEBiw4JU4Xep2QAkVTRQ20e+nqP WFbpm2PmNbzOoAxykAuWB6A6RYzbQD5ftvuP5DBCJkmK8N79p9pFpFO2XhgdALb1grrB ew1g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62si19970495plc.87.2019.01.09.23.55.41; Wed, 09 Jan 2019 23:55:56 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727497AbfAJHya (ORCPT + 99 others); Thu, 10 Jan 2019 02:54:30 -0500 Received: from mx2.suse.de ([195.135.220.15]:42192 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726137AbfAJHya (ORCPT ); Thu, 10 Jan 2019 02:54:30 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 10AADAC6E; Thu, 10 Jan 2019 07:54:29 +0000 (UTC) Date: Thu, 10 Jan 2019 08:54:23 +0100 (CET) From: Jiri Kosina To: Dave Chinner cc: Linus Torvalds , Matthew Wilcox , Jann Horn , Andrew Morton , Greg KH , Peter Zijlstra , Michal Hocko , Linux-MM , kernel list , Linux API Subject: Re: [PATCH] mm/mincore: allow for making sys_mincore() privileged In-Reply-To: <20190110011533.GI27534@dastard> Message-ID: References: <20190106001138.GW6310@bombadil.infradead.org> <20190108044336.GB27534@dastard> <20190109022430.GE27534@dastard> <20190109043906.GF27534@dastard> <20190110011533.GI27534@dastard> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 10 Jan 2019, Dave Chinner wrote: > > Yeah, preadv2(RWF_NOWAIT) is in the same teritory as mincore(), it has > > "just" been overlooked. I can't speak for Daniel, but I believe he might > > be ok with rephrasing the above as "Restricting mincore() and RWF_NOWAIT > > is sufficient ...". > > Good luck with restricting RWF_NOWAIT. I eagerly await all the > fstests that exercise both the existing and new behaviours to > demonstrate they work correctly. Well, we can still resurrect my original aproach of doing this opt-in based on a sysctl setting, and letting the admin choose his poison. If 'secure' mode is selected, RWF_NOWAIT will then probably just always fail wit EAGAIN. -- Jiri Kosina SUSE Labs