Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2716170imu; Thu, 17 Jan 2019 20:52:04 -0800 (PST) X-Google-Smtp-Source: ALg8bN7I8nY/FRCNeMEtJVlMtui9QTl5RIgIIpsoK3bhdeZKVe0nTZWvic8a/LyyF18AHX/KawQK X-Received: by 2002:aa7:8758:: with SMTP id g24mr1195247pfo.250.1547787124543; Thu, 17 Jan 2019 20:52:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547787124; cv=none; d=google.com; s=arc-20160816; b=DJ1gUveyZAoQccb6zYIq//jB6eY0qneHR+oyWFOO+yP1mI9ROrLfeGiHXHAcwF9DhK HMjbMmDKqF9zKfS0tACo0BHV8UThfTSu6C35j/93h1c5eS9/+W/jxDJno1AwvylrEQzr sde74aFsk2L0HA4mxDfjvpSfZhWBBjppTcxKpL84Drji1NoG+Kw079sbYiapzVPNugTn 0EEn+5dppSiB2Y4o4EGPkgHtkyRp3xnMH1srTkbkLuhTSuB7YVCnpJ4tdp/bG/+JeZMJ L6C2hjjvkaDWnPY6AKQduQVtdXqwzotVLx9fWFvU/ut4053sI7nTK9NhcNdF4MSKgTBl 6TtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Gqf9qHHa0eKIHV+14V27XEKAlPK94YNO0a+RM1lW6M0=; b=GPOKxFG61AGqBuRXPm9OaDlcgSN8hqJqE0Wm8DZql4jjUp4d5jb1RZKm2I1YfNrPA+ /7DJBwiADqDPgq7sviL/cXqhhM8IK2vzXrOwDmg22xqaC3yIZIy8D1cu1d7Ac1QYU1Ly dFvnKW0oiT+wA8k9Dnj1g3lC9CnaW2U1M1Xybn1jGFPAsHaVFkLldpnkWos0i3VShkbd WlpAploByyT50Ml65wETOonfQ6j6Y+vH5LB1eLJv6yG8aSoDI82sMU0OV+PBchrcGxBb hMtkTObycoUjvy6wymsZuMg6nuVaL8iWoNLr3wes0ZwuiakRM17nyV37PIF8TobZhAX4 ts5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=amwtGCvK; 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 p12si3589119pgj.56.2019.01.17.20.51.49; Thu, 17 Jan 2019 20:52:04 -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=@linux-foundation.org header.s=google header.b=amwtGCvK; 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 S1727189AbfAREtw (ORCPT + 99 others); Thu, 17 Jan 2019 23:49:52 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:43227 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726902AbfAREtv (ORCPT ); Thu, 17 Jan 2019 23:49:51 -0500 Received: by mail-lj1-f193.google.com with SMTP id q2-v6so10504007lji.10 for ; Thu, 17 Jan 2019 20:49:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Gqf9qHHa0eKIHV+14V27XEKAlPK94YNO0a+RM1lW6M0=; b=amwtGCvKbkeY8xeTsPStBlygztpu7+NzIWZeZMInmmPPgYzP70KMKK+wXQun03oZTL 4gaqpdKCC94C/fIW4letO9lVl33BumTvbRz3lEu44trR3vQ/1GBqPj4MtSJ6uCOREp/d /2WdUfwUpfb1hyWXK5ciVRMxO8irBXFtrq4F0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Gqf9qHHa0eKIHV+14V27XEKAlPK94YNO0a+RM1lW6M0=; b=GaC0415dFXd7S39+73HK29B5gAu8a39BI7JmX64Q+SH48qcpeCNWa6Tv8VIqpdYFSG MajbDqJmk/OxZnB3scZHjkHp7it9lamgVELRPq3/Vr3LBGYpGqSMOSlm6zAUvt0mik/R sjl7Ezr5T7tLz151U1ttjqsL68g9dgT2DNaGnDU7PJ9ewnI33q8R2f73UBZCK5NSvVjK 4dYQdjt5WRQ2KCBWwbqXFag09cQPQ8ltNPddILf1bUrlQzt3ggRoNy+8w4hmDqQL9309 jGpPj+ces6X2j82+zYTiPyN3jntpset3mNBoBBLPTfxfG+y9Yb6yK3us6YagOsu5f4ld gXIA== X-Gm-Message-State: AJcUukckAOb14ZNTHgUtfyKYhjHgogevZ5ZInAAmolstxFOaYIi8FVGJ Jby/nED8qARnYlYYt/7bJosIN6xA5dE= X-Received: by 2002:a2e:86ca:: with SMTP id n10-v6mr10873945ljj.49.1547786989102; Thu, 17 Jan 2019 20:49:49 -0800 (PST) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com. [209.85.167.45]) by smtp.gmail.com with ESMTPSA id v5-v6sm550448lje.78.2019.01.17.20.49.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 20:49:47 -0800 (PST) Received: by mail-lf1-f45.google.com with SMTP id a8so9541001lfk.5 for ; Thu, 17 Jan 2019 20:49:47 -0800 (PST) X-Received: by 2002:a19:c014:: with SMTP id q20mr11103285lff.16.1547786987162; Thu, 17 Jan 2019 20:49:47 -0800 (PST) MIME-Version: 1.0 References: <20190110070355.GJ27534@dastard> <20190110122442.GA21216@nautica> <5c3e7de6.1c69fb81.4aebb.3fec@mx.google.com> <9E337EA6-7CDA-457B-96C6-E91F83742587@amacapital.net> <20190116054613.GA11670@nautica> <20190116063430.GA22938@nautica> In-Reply-To: From: Linus Torvalds Date: Fri, 18 Jan 2019 16:49:30 +1200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm/mincore: allow for making sys_mincore() privileged To: Vlastimil Babka Cc: Josh Snyder , Dominique Martinet , Andy Lutomirski , Dave Chinner , Jiri Kosina , Matthew Wilcox , Jann Horn , Andrew Morton , Greg KH , Peter Zijlstra , Michal Hocko , Linux-MM , kernel list , Linux API Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 18, 2019 at 9:45 AM Vlastimil Babka wrote: > > Or maybe we could resort to the 5.0-rc1 page table check (that is now being > reverted) but only in cases when we are not allowed the page cache residency > check? Or would that be needlessly complicated? I think it would be good fallback semantics, but I'm not sure it's worth it. Have you tried writing a patch for it? I don't think you'd want to do the check *when* you find a hole, so you'd have to do it upfront and then pass the cached data down with the private pointer (or have a separate "struct mm_walk" structure, perhaps? So I suspect we're better off with the patch we have. But if somebody *wants* to try to do that fancier patch, and it doesn't look horrendous, I think it might be the "quality" solution. Linus