Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1425268imu; Wed, 16 Jan 2019 19:39:24 -0800 (PST) X-Google-Smtp-Source: ALg8bN5b9R+ZTHXP2luvPIhwAfWEuN6JrmThRalg0Ty01oGK3TIPefoWZxpfKf8ZRkw+tV4UMWRp X-Received: by 2002:a62:d206:: with SMTP id c6mr12049816pfg.245.1547696364884; Wed, 16 Jan 2019 19:39:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547696364; cv=none; d=google.com; s=arc-20160816; b=oSCsC0rqYV18i0tR41Ti5B2Vrc7cAbtkCJlM5SF0M27C4t8k26wUGCvRuUYF/X6oUT SFiq8iaCjPnp6cLLauuAR/f4h/1T8ENieejd4RRSzNeFDKjAReE2V+gupV37xMiWrCNV 8O6UAgdR5DsrFYmnulRTjgaxp4/c2K6yUyHIMwFWB22UgpiW3iNwGK7IF1JWUOgRR4XK zKu2TN/qy50yUGvzrS9wukvMoKtHR2/zw2HzNYVVO9mrvOPt0qLp18WY2EOKtQoRQUXQ OzkyIZsnSRBmLh6+ji/ySnUBuB4MhJONjjoC4KBmK8qJYJiZ+VVEZ4fh6pLmxl4VauyA X0WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=YApQMaEHfv0eu9a39AV/asa2CSwkIoBJ7ADkF2XbuYA=; b=e7032EfRIbIgzxiTgtmGOOmHox5917mbtBhzNxLsfidoXo0qX4Ld5/JiBnJfFDAcmK 29o7xpKz6KtKl4OR5VYWD2eCVE568gNn9keGmrrqd3yr4oB6D7gzAXL5xjBjCAuPxU4I kkdtJn7+4ADOIic6ElAfzu7cxgrYu+riuA0OtYhvfCj9YP2ch3nQFup9bt0JKdSq5uYU 6tvCy7ekOit0e+w0vmG5sNdbdofywBId6NS/x9o8BnGzrmKJp0va6Lf5D0otIugIJlKE RTNuuYRHyb3b3IGBWzoXmCYpkOgZOM2i5FIlPwCnmZE3y3UQw4FM2czWtDKX+kepr3Rx 3nFg== 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 f23si329353pgv.431.2019.01.16.19.39.09; Wed, 16 Jan 2019 19:39:24 -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 S2390127AbfAPMSR (ORCPT + 99 others); Wed, 16 Jan 2019 07:18:17 -0500 Received: from aws.guarana.org ([13.237.110.252]:55706 "EHLO aws.guarana.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732856AbfAPMSQ (ORCPT ); Wed, 16 Jan 2019 07:18:16 -0500 Received: by aws.guarana.org (Postfix, from userid 1006) id 0B1AEA18B9; Wed, 16 Jan 2019 12:18:12 +0000 (UTC) Date: Wed, 16 Jan 2019 12:18:11 +0000 From: Kevin Easton To: Josh Snyder Cc: Dominique Martinet , Linus Torvalds , Andy Lutomirski , Dave Chinner , Jiri Kosina , 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 Message-ID: <20190116121811.GA6971@ip-172-31-15-78> References: <20190110122442.GA21216@nautica> <5c3e7de6.1c69fb81.4aebb.3fec@mx.google.com> <9E337EA6-7CDA-457B-96C6-E91F83742587@amacapital.net> <20190116054613.GA11670@nautica> <20190116063430.GA22938@nautica> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 15, 2019 at 11:52:25PM -0800, Josh Snyder wrote: > On Tue, Jan 15, 2019 at 10:34 PM Dominique Martinet > wrote: > > > > There is a difference with your previous patch though, that used to list no > > page in core when it didn't know; this patch lists pages as in core when it > > refuses to tell. I don't think that's very important, though. > > Is there a reason not to return -EPERM in this case? When I was looking through the Debian Code Search results, quite a few of the hits were for code that uses mincore() as a way to check if _anything_ is mapped at an address or not. This code doesn't care about the in core / not in core result of mincore(), just whether it returned an error or not. I think a new error return would break most of the instances of that code I saw. - Kevin