Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp947148imu; Wed, 16 Jan 2019 10:05:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN69qbB1wS/C0sOlLBzprYlPeprkH24naLVabXIFRPb9UqPMVlC5s4h9WkazZuqG3Gir/Zj9 X-Received: by 2002:a63:f201:: with SMTP id v1mr9456817pgh.232.1547661938528; Wed, 16 Jan 2019 10:05:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547661938; cv=none; d=google.com; s=arc-20160816; b=nFcz+AAAMfu/MJoV6nsGc0zsLkjJJEF+y2DoYFcpazMeNk57YGnvwEND/6fCZrjbzW Qtq3j3v6CxUQdARE36wmXU6egxDVplydTpM7VX3GHKiDJfMhK7iiqq3Is4vAifLbQZLj s2yurCvUMm/ZlauCUzkMcFDqKB168sflF6USni2RSG6K/ylPfOHWFU+ULH3LLSm/Y4mv mbPRy59TjT5v6jgD5Q6CcO/XtX1yM9qWbX0L/Ug0ahG7K0qXGAp7vO3+jL7ZBkwV9imt itvqoi2aVpELU0gr3nM0EFHTmPZDqsq/Bd23bsH4qYXyIjUDhLsGX0nW3xFs69xhWI1I PC2A== 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=LDxDttklbhpkSSFdds0eF04wkYvET9AjjK+yF2ZuPzE=; b=QWzR8rqzKPF+cxdOmBfUyR+zyCksB1ytFReEmGtVMfWZZeTuQfhX/n/WDJ2H59Mr6g xThVwXV9nhTZdwjjAFiclnjIhRbS4RVmuy28kgoNCxpGfZNewd6Dp53SQ6RAlm3k0XV/ tFekWPLrnj8+PJsDk/Emj/v0POtnkejspreTW2anS1MbgoAj5nziGv3PaiKsTEb4YJVd UuyMFKw6rlCS3kNkcWia44CSl9df7x4y11Y4JkVbG+7PSzjiFUkBQPO0WlOP0TwYeg64 R7Qf6c1Xza1Gjwt4D6ALljwSA4yDPihqdu2/WuvXIoYvuSk87bGCb8FuZs5Txeo90Ymh PZiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=dMA7vAKe; 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 t75si6677959pfi.193.2019.01.16.10.05.08; Wed, 16 Jan 2019 10:05:38 -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=dMA7vAKe; 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 S1732385AbfAPFeW (ORCPT + 99 others); Wed, 16 Jan 2019 00:34:22 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:46766 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725878AbfAPFeV (ORCPT ); Wed, 16 Jan 2019 00:34:21 -0500 Received: by mail-lf1-f67.google.com with SMTP id y14so3858301lfg.13 for ; Tue, 15 Jan 2019 21:34:19 -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=LDxDttklbhpkSSFdds0eF04wkYvET9AjjK+yF2ZuPzE=; b=dMA7vAKe4Uxo13jLl7fuE02FkWSO9VLEtIiC20q6ryh7qGuilSEBxz0+EQjqTdCvH1 dfnnNIrDVHLAmspi+kEutDaiSBDCjQXDDZeWLIuw36P0qGup094crertM7FqgpCuwxbz NTB7xxRsm9w7aa4NUnH42wRZALAPuidJQR0qw= 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=LDxDttklbhpkSSFdds0eF04wkYvET9AjjK+yF2ZuPzE=; b=cOWxsXTYC2bHNpWceLYAZMGhEbr66P5RBace4KmMVofrt/pUHpVzpAfXc5GzSJDYNL iC32LI4zc81qa9n4Rw9lHkwXFbYbHimhLTWdiM/EkakIIz+ZvjG9iuTtX/ofkFjmeRVz 8QfiKuhxNUSdrBd+jC11mNQj+UVvGhUT+1vZKoVlg0eiqMbGdjvWGPohkeO37OqA2Kes ZMeEhyetRgO36f20/bEaKdS+gc8Jt7jtwzW0FpqhAQ7c0ZzFgJBaCsM9eHpFJXQQep5e x4oLZmUZN21CcDTbqFePTg5x1dsE/HNlNPWtzqK0AG3VLW3w8HUyl6R7Gv+f+XFExfU9 93tg== X-Gm-Message-State: AJcUukc9rfUWCueMj63HDS1xmLaeKYtXQDgc0GTUvDIkCPQ0oFZSsk/A 8rUt6s0fQApmiqax7qGSRmJKY1XyRFo= X-Received: by 2002:ac2:4343:: with SMTP id o3mr5548267lfl.129.1547616859214; Tue, 15 Jan 2019 21:34:19 -0800 (PST) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id l21-v6sm851913lji.6.2019.01.15.21.34.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Jan 2019 21:34:19 -0800 (PST) Received: by mail-lj1-f182.google.com with SMTP id k19-v6so4329143lji.11 for ; Tue, 15 Jan 2019 21:34:18 -0800 (PST) X-Received: by 2002:a2e:9c7:: with SMTP id 190-v6mr4899089ljj.120.1547616858160; Tue, 15 Jan 2019 21:34:18 -0800 (PST) MIME-Version: 1.0 References: <20190108044336.GB27534@dastard> <20190109022430.GE27534@dastard> <20190109043906.GF27534@dastard> <20190110004424.GH27534@dastard> <20190110070355.GJ27534@dastard> <20190110122442.GA21216@nautica> <5c3e7de6.1c69fb81.4aebb.3fec@mx.google.com> <9E337EA6-7CDA-457B-96C6-E91F83742587@amacapital.net> In-Reply-To: <9E337EA6-7CDA-457B-96C6-E91F83742587@amacapital.net> From: Linus Torvalds Date: Wed, 16 Jan 2019 17:34:01 +1200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm/mincore: allow for making sys_mincore() privileged To: Andy Lutomirski Cc: Josh Snyder , Dominique Martinet , 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 Wed, Jan 16, 2019 at 5:25 PM Andy Lutomirski wrote: > > Something like CAP_DAC_READ_SEARCH might not be crazy. I agree that it would work. In fact' it's what Jiri's patch basically did. Except Jiri used CAP_SYS_ADMIN instead. But that then basically limits it to root (or root-like with capability masks), which is quite likely to not work in practice all that well. That's why I wanted to find alternatives. *Very* few people want to run their databases as root. Jiri's original patch kind of acknowledged that by making the new test be conditional, and off by default. So then it's a "only do this for lockdown mode, because normal people won't find it acceptable". And I'm not a huge fan of that approach. If you don't protect normal people, then what's the point, really? Linus