Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp588921ybm; Wed, 27 May 2020 03:08:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzf5mb7+t4qkOahqoccLHpnJbiI27BZh1wmvWcXK8UQhO6WWmxs5z+k3C/5XzWZFTFfaHFk X-Received: by 2002:a17:906:404a:: with SMTP id y10mr4943765ejj.130.1590574113281; Wed, 27 May 2020 03:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590574113; cv=none; d=google.com; s=arc-20160816; b=wShKRCXPIomT8/UZA2UvLP5oICcVmBaBtexDoHkYsHSPRefqZC7//hA9ILkaluk8Zd OIRJHpN8nVUcetn0TyKi5mLmIdr/4SEGTECNRcST8VoaYSV2x96qr1wvP5reEv7psvFG gKrfVGzRtYuaYvClkeE1J1/TTDC3CY/ZrybOhQQUxgFYCmkpNdUYQcSuHizWvgmaqalr JwySHiukKieds5gcL9eNhZbu58BjTmKZpP+v5FkTU5yPITLqiiHaJ9N6xwSK52OeO/pd GcCguS11UaVMiW0edc1y9TYwgrDGJj94EUkihno3kDFqp0zU8/7lKtuDsCZ705lj602f tkuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:date:message-id:subject:from:to; bh=+ZxLEWzIVyV/Rt5lPbwGrnDpTjfjBTvjDOWyob0J7GI=; b=EqoRYqgmpwsL0Y1eyqI4GkbxA9ce95VpQPQKIMbbedNms5JNFDfoUlXlteMGeElHJ8 WU+/qAX8R0K350xieao22ysStuJZ3BTFTvQoiWRE27Cno/Kp+xDQ5J9fyCERl6nC2PcD m7QgcV1Ce+r0QLBTaK4PBPZIIAty1wAdToFVOClhJdRnVfVMAHA6CfT9ZQsmYNYV4Y3T a14xvVjk5WGLxOBfgyxEFzrSx0koVhrX5g/b6z4tHdBid7h+rfZTeot+eW3zDud9OOLx uHSP2f3FHuVbzoE0SU99JTiEPc+iz3a/autjnU5tUp9lWkWsQqNL0ZfnejpSq1Kw6Eu/ WRIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u2si1600385edp.67.2020.05.27.03.08.10; Wed, 27 May 2020 03:08:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728638AbgE0GyV (ORCPT + 99 others); Wed, 27 May 2020 02:54:21 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:45820 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728111AbgE0GyV (ORCPT ); Wed, 27 May 2020 02:54:21 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2983E3FD399042156E76; Wed, 27 May 2020 14:54:19 +0800 (CST) Received: from [127.0.0.1] (10.67.102.197) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Wed, 27 May 2020 14:54:14 +0800 To: , , , , , , , , , , , , , , , , , , , , From: Xiaoming Ni Subject: Re: [PATCH v2 1/1] userfaultfd/sysctl: add vm.unprivileged_userfaultfd Message-ID: <3b64de85-beb4-5a07-0093-cad6e8f2a8d8@huawei.com> Date: Wed, 27 May 2020 14:54:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.197] X-CFilter-Loop: Reflected 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:07:22AM +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. Hello I am a bit confused about this patch, can you help to answer it. Why the sysctl interface of fs/userfaultfd.c belongs to vm_table instead of fs_table ? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cefdca0a86be517bc390fc4541e3674b8e7803b0 Thanks Xiaoming Ni