From patchwork Thu Nov 23 22:42:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 13466799 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8FADC61DF7 for ; Thu, 23 Nov 2023 22:42:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2FCBF6B06C2; Thu, 23 Nov 2023 17:42:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2ABD56B06C8; Thu, 23 Nov 2023 17:42:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 14D1F6B06C9; Thu, 23 Nov 2023 17:42:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 03AAC6B06C2 for ; Thu, 23 Nov 2023 17:42:12 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id DBBC4120DEC for ; Thu, 23 Nov 2023 22:42:11 +0000 (UTC) X-FDA: 81490693662.27.5D3537A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf24.hostedemail.com (Postfix) with ESMTP id D907918000F for ; Thu, 23 Nov 2023 22:42:09 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=cgWoTEfR; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf24.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700779329; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=RNOblxCVZ5MmbuOKhDAArpLLJZp0p2DhC0r92TlF9VQ=; b=Qb5KlrusEiMzMjQhz3Qs7KZ4MBR3eKj5KcBFuLW3FjTA+lRaWnR9LJOx2x/e5x3xAp6ZNK 9xki/ySvbr+chUnM3jejnCgWGIqIgc7mPunE30Jf4aJKTqJklgPy8AdknRwkhWkTEvsc77 F6x2afrBHxgaySDJoV3ZOSLpujxcBpg= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=cgWoTEfR; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf24.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700779329; a=rsa-sha256; cv=none; b=SBCZ1Sc2Cfy3Cqn0PwDRDVeIplbk92aTD/+RL2GirKk11ePB+gIpT8lxlhCHLdSH7GCk/v 9Et7Ztb80yluvCqTS0m0iaeuwAyc9G0AYcQ+e62vGG/ZnHnVIS/MbiUnnDwWorHpGm4hA1 iXQ2UrhlsbFbB+BbmB7IwhBtm+yHx+0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700779329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RNOblxCVZ5MmbuOKhDAArpLLJZp0p2DhC0r92TlF9VQ=; b=cgWoTEfR2EjF+ZGzFyjUbl6syJ//TxTXw0w8w7j/VGfikl1+quzNPJWrKI9HrhxQBJjaJd +42bXUeMDAPJxnHU0eMgt0OXCPUbj00JBgKj2UwqRqNbaaZ9DAjqd0GVlRoXXD4O7Sb1XP ZaO36DwcxXseyEFPXlgPXgPnZGDA3k8= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-609-_ApzqxhDMcWK49Pe6lSVUQ-1; Thu, 23 Nov 2023 17:42:07 -0500 X-MC-Unique: _ApzqxhDMcWK49Pe6lSVUQ-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-679d8383224so3245496d6.0 for ; Thu, 23 Nov 2023 14:42:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700779327; x=1701384127; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RNOblxCVZ5MmbuOKhDAArpLLJZp0p2DhC0r92TlF9VQ=; b=GF1VnEzXXy5IOkkXY6njOnp4+d9hqv4VyUON11BWxSE0HBDKLHBXs3fkrP9UrIuFb1 kwzrh5VJTuUtShSlI6XzLYfIRD3DpS2r7zceg39tD0+sVEt6YNdsGhw3G3BhZcJmtmDK eYT4oiOnTEEXbtFbJHosO9uuhKSda13JYAR+ECbveeav272CUCLUTQCaCcZxd1hpkFGS as8Ms7Gmd25DtwmIK3u3R5LtrbswvlypFMXcqtLTnL9e1RyipnFgbhS+7/xye1q4d6aZ Buq+CaQQOmhRH11AEcXMwh7pXLJpWjlSz81/C0JconfiayZAmFu2uSGGIq0/jlqlM9Ue qYRA== X-Gm-Message-State: AOJu0Yyr6855YbTHRix8jMMBtzwpCOo62LWkzT53T1pYJDox0BtaOV7p 1Q8KcIHxSaUbKlVGwzsypkPzb/pezoU70F9F1ZSKGGw01cIov3cNBP3GdCuQtjzQ2UoVz75+eZ2 O/6Dh8oF4eJvdxl/qLxGhNavjHLPPc0m08tcZCG2Kns603723Jkq5EbeUKIMw1pzrG26Z X-Received: by 2002:a05:620a:17a9:b0:774:17d6:31f1 with SMTP id ay41-20020a05620a17a900b0077417d631f1mr861527qkb.4.1700779326747; Thu, 23 Nov 2023 14:42:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IGIHM2z03Sos/ggi1TVZ4Gq8krOSZyonckYQxXLL0O+5fXXP7i1/B0xHmsV9L9UeiSme61bOw== X-Received: by 2002:a05:620a:17a9:b0:774:17d6:31f1 with SMTP id ay41-20020a05620a17a900b0077417d631f1mr861509qkb.4.1700779326284; Thu, 23 Nov 2023 14:42:06 -0800 (PST) Received: from x1n.redhat.com (cpe688f2e2cb7c3-cm688f2e2cb7c0.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id k18-20020a05620a143200b007743671a41fsm770555qkj.72.2023.11.23.14.42.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 14:42:05 -0800 (PST) From: Peter Xu To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Axel Rasmussen , Mike Rapoport , Andrea Arcangeli , Andrew Morton , peterx@redhat.com Subject: [PATCH] mm/Kconfig: Make userfaultfd a menuconfig Date: Thu, 23 Nov 2023 17:42:04 -0500 Message-ID: <20231123224204.1060152-1-peterx@redhat.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Rspamd-Queue-Id: D907918000F X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 3mghno5eeodbcusow7pmb88iz9g18j63 X-HE-Tag: 1700779329-287777 X-HE-Meta: U2FsdGVkX1/PmSlrwjYVrNbbSbuXH8X7g1arl7qioZUoBpB7Rxkxz59ByWeWGfk0B/bNMlUMRzqZZchEki8soCO2szrlPbOW+gWEbAwO+CWP3scyr/opUyXdZQN7K3GqNgBOe2YehoU8Z7R5mtQb+z5jLTQSmdW9dArTSfTfHa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GOwaQIaGnyJtKdyR2a/kTF8EInH5qiWJNFsAHsLUVcmzik/tqt38O7rEfPISIgb69IU99GGf79KzuEK0N1Xdv95RwlKcsabI6BQj9P97MJRrNCdIVCGzh X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: PTE_MARKER_UFFD_WP is a subconfig for userfaultfd. To make it clear, switch to use menuconfig for userfaultfd. Signed-off-by: Peter Xu --- mm/Kconfig | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/mm/Kconfig b/mm/Kconfig index 89971a894b60..57cd378c73d6 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -1201,13 +1201,6 @@ config ANON_VMA_NAME area from being merged with adjacent virtual memory areas due to the difference in their name. -config USERFAULTFD - bool "Enable userfaultfd() system call" - depends on MMU - help - Enable the userfaultfd() system call that allows to intercept and - handle page faults in userland. - config HAVE_ARCH_USERFAULTFD_WP bool help @@ -1218,6 +1211,14 @@ config HAVE_ARCH_USERFAULTFD_MINOR help Arch has userfaultfd minor fault support +menuconfig USERFAULTFD + bool "Enable userfaultfd() system call" + depends on MMU + help + Enable the userfaultfd() system call that allows to intercept and + handle page faults in userland. + +if USERFAULTFD config PTE_MARKER_UFFD_WP bool "Userfaultfd write protection support for shmem/hugetlbfs" default y @@ -1227,6 +1228,7 @@ config PTE_MARKER_UFFD_WP Allows to create marker PTEs for userfaultfd write protection purposes. It is required to enable userfaultfd write protection on file-backed memory types like shmem and hugetlbfs. +endif # USERFAULTFD # multi-gen LRU { config LRU_GEN