Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4107727yba; Tue, 23 Apr 2019 15:28:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRqzXN4YiysePf1LQ93GnA5OJXiyn+CtRyNLFu3P9T/3gS2dXVn6misGRe5ouRMKwKdQ0r X-Received: by 2002:a65:60c7:: with SMTP id r7mr21538020pgv.191.1556058488219; Tue, 23 Apr 2019 15:28:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556058488; cv=none; d=google.com; s=arc-20160816; b=WWz/DynCjvDU9Ds/pDKa85plfusNI1Y0Ii8GkhJTkFOBfHFSTVvZ7grF4znySguJ/S etyON2Z76BdZOx/OzY6FKx5n+L8Zb9lgIbC48DVdxAyuQuAXd1ulxoVZQK2Ae4mHflac 8x7w7nQaCn8mL0P4LS3Qo5NfWUgkae55IUISdNBnBkLX0ATZKKfjP+PHQ6AJQc4m/Nb2 SpKHCnIcrw88NzC94Rrx83wOeh3M3Y1O2zkpewPIHNWiOnK36z+KkVJ8nVfriYi7Ue2T WtjcvaiNAQr0rh48FqAtmbdXnyQHh5tPwdzbdlGfV0eYjeS+xtfiamlSeGD5Wtc/IqCZ yoWg== 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=5wd3juuCyGv6I7aWGEczXK2I2MkaE+Yk5Y+BNpedQc0=; b=CLNprG0FJwTAYnBeEYQxlpY8pPQrzWVeFiXpaLJn6eFIcXR3iDDn3kBUJqXdl8NF0f tci92s7OU85o1ixKGm4u6/ZmWOVxQAndEXjnpK8uzH3/1yS6vSu0NqrDBVz5EidyW0JO 2xxMf3FQaYIMmSWOojxSUQx6MsCEOcV/LWOcQWKhasqLioc52ThXIN/SJL17rPFZr8tL rMVljeP2sCGGBUpMaYZ5RspD4oYVau8vRo+W3PY4MlQxbR1fco+jpPOI6r3c+CG46ppc UQSg1NLt78HOVv9UFkRYGHdAP8ZKf/px+gLmADaVkF6ykuzDEDda8p2SfolrEqdbM5Y2 lKTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JHvP3Qc4; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t14si6130090pgs.543.2019.04.23.15.27.53; Tue, 23 Apr 2019 15:28:08 -0700 (PDT) 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=@chromium.org header.s=google header.b=JHvP3Qc4; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728410AbfDWW1A (ORCPT + 99 others); Tue, 23 Apr 2019 18:27:00 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:43762 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726953AbfDWW06 (ORCPT ); Tue, 23 Apr 2019 18:26:58 -0400 Received: by mail-vs1-f66.google.com with SMTP id t23so9248910vso.10 for ; Tue, 23 Apr 2019 15:26:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5wd3juuCyGv6I7aWGEczXK2I2MkaE+Yk5Y+BNpedQc0=; b=JHvP3Qc4kkkwAoF/0QYHWGplc3qsgSmh5NdB5v8VmADIDIKfxm29Zl03JyD4XVG9cK yzYYTUn+efgCCTi0FS+KzNAIgDktxEMhu5YO/Tot5RTlhcmQOOsrOxBqmB7so3nbTEBw AtVJmduRKOPMSxBxaCpYNVHVhvuORHcV1NhOQ= 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=5wd3juuCyGv6I7aWGEczXK2I2MkaE+Yk5Y+BNpedQc0=; b=c2vv5OpVt7arVwotEd0XQodtnV8NEuxnmovvMtXYBnNOHYlKglWy7Cl0HBKYXO7E8j gB7hewBpa3rmjmsJVaTu2oEPFi9+emsXUGg+q6y+c3FaeaiJOYCLhqMN24z8cRWFu/y9 5an1Yuz7pMaVpMWAia3gw+lK8wDwJpSO4T/O9pEdXvrwEl8GfiJPoqBteEJw06dcMPej KyeJonBbHyfkq6IxWIHC5XR5BTZm/90Scm8mxrboQAN7CdNds01cSKb+ZrsDEuMuitPb IALw+gPY69v/HqnbfHD5Y0KR3cCYtp8Ry4akxxqi33ffdFKgZsj1ia8Pn0st9psolnxw bjUg== X-Gm-Message-State: APjAAAWd2WospFOyg8bmiTA2d5Vuh/V4cZPhTo1HM4g6e6Cvcb6wVZ/Z fQ8axhX6HonqEgCHoyuafkCDFmdOUOY= X-Received: by 2002:a67:ea8b:: with SMTP id f11mr4441619vso.64.1556058417008; Tue, 23 Apr 2019 15:26:57 -0700 (PDT) Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com. [209.85.217.53]) by smtp.gmail.com with ESMTPSA id 2sm19181004vke.27.2019.04.23.15.26.56 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2019 15:26:56 -0700 (PDT) Received: by mail-vs1-f53.google.com with SMTP id e2so9236481vsc.13 for ; Tue, 23 Apr 2019 15:26:56 -0700 (PDT) X-Received: by 2002:a67:f849:: with SMTP id b9mr14894109vsp.188.1556057966875; Tue, 23 Apr 2019 15:19:26 -0700 (PDT) MIME-Version: 1.0 References: <20190319030722.12441-1-peterx@redhat.com> <20190319030722.12441-2-peterx@redhat.com> <20190319110236.b6169d6b469a587a852c7e09@linux-foundation.org> In-Reply-To: <20190319110236.b6169d6b469a587a852c7e09@linux-foundation.org> From: Kees Cook Date: Tue, 23 Apr 2019 15:19:15 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/1] userfaultfd/sysctl: add vm.unprivileged_userfaultfd To: Andrew Morton Cc: Peter Xu , LKML , Paolo Bonzini , Hugh Dickins , Luis Chamberlain , Maxime Coquelin , Maya Gokhale , Jerome Glisse , Pavel Emelyanov , Johannes Weiner , Martin Cracauer , Denis Plotnikov , Linux-MM , Marty McFadden , Mike Kravetz , Andrea Arcangeli , Mike Rapoport , Kees Cook , Mel Gorman , "Kirill A . Shutemov" , Linux API , "linux-fsdevel@vger.kernel.org" , "Dr . David Alan Gilbert" 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, Mar 19, 2019 at 11:02 AM Andrew Morton wrote: > > On Tue, 19 Mar 2019 11:07:22 +0800 Peter Xu wrote: > > > Add a global sysctl knob "vm.unprivileged_userfaultfd" to control > > whether userfaultfd is allowed by unprivileged users. When this is > > set to zero, only privileged users (root user, or users with the > > CAP_SYS_PTRACE capability) will be able to use the userfaultfd > > syscalls. > > Please send along a full description of why you believe Linux needs > this feature, for me to add to the changelog. What is the benefit to > our users? How will it be used? > > etcetera. As it was presented I'm seeing no justification for adding > the patch! Was there a v3 of this patch? I'd still really like to have this knob added. :) Thanks! -- Kees Cook