Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2518207imu; Sun, 6 Jan 2019 03:39:09 -0800 (PST) X-Google-Smtp-Source: ALg8bN4aukO5/qRB1Uio9n58halBOEDW1jo9pYfXS053Ls/8R4i7uEwygsxvat54YyHIC6UfKFkI X-Received: by 2002:a63:ff62:: with SMTP id s34mr26658777pgk.325.1546774749128; Sun, 06 Jan 2019 03:39:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546774749; cv=none; d=google.com; s=arc-20160816; b=k3tUyhl878piJYfShPQ5HHzOp5WJr47atT0mOHf1CBfKtq1ID46z0rVi74J539TBRW P+XLfmX329Hn2ihKWiWbzksWB3vdTQrvua+A9r3MVQv2RvvZsRQQDzPqA6j88Zs3j0OC 7qqsCCoEI1Jqe1IqUmzWvw6P5VcTqnqk55kY2opGZezJCTE2kbtG94r/hqg83vs0ncRj SDXubCyhtZkE+NWwmT4x0B3z81j0JtVV+kHcdWpn7rwE5C52ENey1X768ssg1wpGVa8b VCUNbW0S995WLCJwpjyc21aoDHZO0WXbTpoPzIg5D74XBNjXcqSEJFpVlHxppqDx/aQ+ iL7A== 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=JpcBj1lLbSenx8ItuX6b/MwKhBlwE4DT9cvnXEWx6R8=; b=NY8ReWZIThQu3ll3L1p6KSIf9w6w6+9psMlhqj22R05svz6cR7EP40Orl0XhYtZYKS QJIXKIpK79L7h7bfhUdbPZv3etB2S3xy21RdkeUNO4subRrcWfO4mLRZQ0e5H06lBSyP tMvWbfS6riFzqzPHMgXL5HEFKA1/zRvTaS3MSSptoF1d/3AQxpc/uhSsdiDekrytBdBd 5nxsCrmb0RmfrK5Z2f0qylqQyVK6mQUQmKBqrswLkjdKFetrFpSsJTjBBiBiiLbhnnSk r9nUnIsd2THLbHeOjF5SkW5VkbTdCkkKWcFp23gQLqRQqDM8EnIvgrwcer3eVktkm0+A QOEQ== 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 j1si40533145plk.342.2019.01.06.03.38.30; Sun, 06 Jan 2019 03:39:09 -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 S1726405AbfAFLdl (ORCPT + 99 others); Sun, 6 Jan 2019 06:33:41 -0500 Received: from aws.guarana.org ([13.237.110.252]:57648 "EHLO aws.guarana.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726189AbfAFLdl (ORCPT ); Sun, 6 Jan 2019 06:33:41 -0500 Received: by aws.guarana.org (Postfix, from userid 1006) id 705D0A18B4; Sun, 6 Jan 2019 11:33:36 +0000 (UTC) Date: Sun, 6 Jan 2019 11:33:36 +0000 From: Kevin Easton To: Linus Torvalds Cc: Jiri Kosina , Masatake YAMATO , Andrew Morton , Greg KH , Peter Zijlstra , Michal Hocko , linux-mm@kvack.org, Linux List Kernel Mailing , linux-api@vger.kernel.org Subject: Re: [PATCH] mm/mincore: allow for making sys_mincore() privileged Message-ID: <20190106113336.GA31214@ip-172-31-15-78> References: 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 Sat, Jan 05, 2019 at 01:54:03PM -0800, Linus Torvalds wrote: > On Sat, Jan 5, 2019 at 12:43 PM Jiri Kosina wrote: > > > > > Who actually _uses_ mincore()? That's probably the best guide to what > > > we should do. Maybe they open the file read-only even if they are the > > > owner, and we really should look at file ownership instead. > > > > Yeah, well > > > > https://codesearch.debian.net/search?q=mincore > > > > is a bit too much mess to get some idea quickly I am afraid. > Anyway, the Debian code search just results in mostly non-present > stuff. It's sad that google code search is no more. It was great for > exactly these kinds of questions. If you select the "Group search results by Debian source package" option on the search results page it makes it a lot easier to skim through. It looks to me like Firefox is expecting mincore() not to fail on libraries that it has mapped: https://sources.debian.org/src/firefox-esr/60.4.0esr-1/mozglue/linker/BaseElf.cpp/?hl=98#L98 - Kevin > > The mono runtime seems to have some mono_pages_not_faulted() function, > but I don't know if people use it for file mappings, and I couldn't > find any interesting users of it. > > I didn't find anything that seems to really care, but I gave up after > a few pages of really boring stuff. > > Linus > >