Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp971248imu; Wed, 16 Jan 2019 10:28:06 -0800 (PST) X-Google-Smtp-Source: ALg8bN4hJyhOxxKn4ZQXoMwAiD2Rdi6SoAz1OmMQwx2gObvP4WuoI5QFUVJ+10nnPzvaPp4PBGOg X-Received: by 2002:a63:f141:: with SMTP id o1mr10308767pgk.134.1547663286372; Wed, 16 Jan 2019 10:28:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547663286; cv=none; d=google.com; s=arc-20160816; b=ilBYZ9Fkdq+WPXRF80+HmXjqnMfxhLke7hZs8naz6/71/sZDpstFoR7yJttktfeOmi OYIILU/tsooBteVq+JUx1uXQERbPW32g9xkncSECYCJwF4ZNsHVd8J8q8NRPgtFLiG/p IrvIcAEZCaC4UF/nAu71uwqACmNNcuRUNiLyd26l5tcA6+qQzz8PBVjZ9tG/mujlZNM3 NAsVV72507vHFSf0++H6hXLKgcJDqLVXQFJgfkoIUwLyuSdYbVoteRpIUwlmzi/l3co8 JPkKVoMCVheB0SDLtjvQ1D8cGR+T/Li1CK5vbCDbJMEfcmba6ioOf2PplpZgT1HI3KAR Q6/A== 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=pFDn5ysZInbYYMmQO8U1DXJt9AnYsoBmKkVlkjzfZYM=; b=OHETKZyOHWprYBUXsGUCsVnvN7u3S84v+oYVL3PbnpM6yXBppipjfTyWgAQDZbgmYV lqp8rYk4lKZAUz+DB1vhMGNnyTj8vmoo0nCAsJwrMuUfuhEerhkW8w9jh0ENwUnUAPKl krHlY2MUuD2ytxU434q+/f9p+Evgj34ofaUSFKfmC87DuyPAnmhgy41DR24XrKgDRN4o ifZSTDNcOVhak/GVqh9PRj9/L2pVf5z2Dawt+sHZXkblQ/ik9XneoVBvgHjyhq2yEmJX oulul5dGEkR45tkzItLC4aQcKBkwD+d/6VJKYF4NNfiyoqct9B3+z6Ey8Z19xOnUOwad 308g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netflix.com header.s=google header.b=H1yszSmf; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=netflix.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 135si6004365pge.572.2019.01.16.10.27.50; Wed, 16 Jan 2019 10:28:06 -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=@netflix.com header.s=google header.b=H1yszSmf; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=netflix.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388510AbfAPHwk (ORCPT + 99 others); Wed, 16 Jan 2019 02:52:40 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:46430 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730076AbfAPHwk (ORCPT ); Wed, 16 Jan 2019 02:52:40 -0500 Received: by mail-lf1-f68.google.com with SMTP id y14so4081381lfg.13 for ; Tue, 15 Jan 2019 23:52:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pFDn5ysZInbYYMmQO8U1DXJt9AnYsoBmKkVlkjzfZYM=; b=H1yszSmfXcQwcHnbLw+bx6wvU0WL5aTIQ5hJu2oppIOt0Vq42K4bSpXfnoXcwBVjR5 brgret9pUAXqqW05+wgG/+qE3nE97JTVBh5q7kjUf2YxC833ygob19mk+wO+AT5p+O1X rTKma5dBUQPuIUephTJAIc2HUx0KSJxDJ8qO0= 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=pFDn5ysZInbYYMmQO8U1DXJt9AnYsoBmKkVlkjzfZYM=; b=JLW3IiyE+Uc9S90CwzDZtW62N1y1Xv/3+5uBdC3kq6yOXgWA8NeTSSLoBsoZdseppb SE33lwOzelEFeO4DiE4tO9QLxfnP2rivraFe1BhaozooP9PHa50KARSm6SlCmN+xL1dd hRaq3ZX4r2do8ubhbd7MFip96cGVOL6r5FpbePMuDcZvJrqn31Hr1TFXnM4aAfp6Y+Sm dhcCQwm4pU3NjCc6NLI6pV+iPjGBNKt4Q4sxFlRwSeEzx+wwAkzK3Go/SMxPEJYaqMGz BDfIm4Jrl2DgmI5XnnnGg9UMircOyBLyYXxIVu/S4BtPKFGp9s/HP+kmEtlvzeyXxyq3 wdzQ== X-Gm-Message-State: AJcUukeqqBAWpcCkW3czc1UvPrHDHNpmZn4iiF6/ToALd5VRS9n0kFk8 QHlGDdN/vnQvd4xuYZZDIYt1qwG5bCH4P3rbnjlKDg== X-Received: by 2002:a19:4402:: with SMTP id r2mr5614346lfa.111.1547625158227; Tue, 15 Jan 2019 23:52:38 -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: <20190116063430.GA22938@nautica> From: Josh Snyder Date: Tue, 15 Jan 2019 23:52:25 -0800 Message-ID: Subject: Re: [PATCH] mm/mincore: allow for making sys_mincore() privileged To: Dominique Martinet Cc: 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 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 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? > > If anything, the 0400 user-owner file might be a problem in some edge > case (e.g. if you're preloading git directories, many objects are 0444); > should we *also* check ownership?... Yes, this seems valuable. Some databases with immutable files (e.g. git, as you've mentioned) conceivably operate this way. Josh