From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0D8ECC38145 for ; Thu, 8 Sep 2022 10:45:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MRuKAg4Mk1mpIsW29FaCNfCeD7tnk8IjB5cw2yVWbcA=; b=btGLBuI4ysE3wv sEMrEyzLZqSGSO0HBP2h6eIuGeFtCZaAO3ThBFJ9ipTUSoN/NfTKnzbz5dBJ2omtPlAOTcqu0mtLw OuCh/Q/+yKbDHb2FFPd18ld5J2RmC9EbXLE9Gb7BxP9IzZsEFfTcWKSDmTASlFtg8HK2sglVrEFUV sDMVIZWuuDNWQQFp8how1+dZWRrebV6l1mH4tXFmqVl5C0zgMxFhtB2KCBjizIgEzA6iNm1ZS2tBl OOqKo/5mc8SUFPjQPhfscDOkyWrSJs+0rbOUyeS4IL61Oi5GL6DmDD81RNb/OvgTfE3sUt5Tm2S+6 ZPLeyIow0iyILNhCzkbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWF1a-002OVj-GT; Thu, 08 Sep 2022 10:44:46 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWF0n-002OAu-Oj for linux-arm-kernel@lists.infradead.org; Thu, 08 Sep 2022 10:44:01 +0000 Received: by mail-wm1-x336.google.com with SMTP id n23-20020a7bc5d7000000b003a62f19b453so1360231wmk.3 for ; Thu, 08 Sep 2022 03:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date; bh=RDfo3bMr+JPT0XwUqpEkdXAA/w6q2WGGKmvqZnqv+TQ=; b=Fw4IKH8ap4pumBI12Nq1Lfh9UtKeAcIDpwe+b1cX00pCYnpLbbi+7TinfG2yAn37L8 04V+5lVNVeT7IoxTbICeOOJhv1i6FAQCJB08146+bhoKQNtIDt3xvNsvk6HTXCBqHFM3 N6LDDtIOq8qwPGklXmHEsyu6FkeprRxH3Exu5bKLnJaqtWALAamiEythWkn8NzQQ+8NC txG9S13vwDKVmWy390YKikVWb8EjCqwWoURsQoLOsRXaO5r05Xy2D3/TxKFA1vhOwV5l k/pfHLouALbI5XPTSW97BlFXSnjAB6iK1gfU5LBfKvbTddVEbjqCmqVKQqCV+KQvE2Gq knlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date; bh=RDfo3bMr+JPT0XwUqpEkdXAA/w6q2WGGKmvqZnqv+TQ=; b=Ozjvvl0HdZR3OKwvm/zas/9Oa7KITmagd239AYxu0dBF73uP2zc/0yHWPZPWXtXCVc fykM105RHxvCF2Qi9DXOoEyRIM2qKrylpYFqyBArPsQl2rX3Y0SzuWqob7x8kCKZuVqy TnTthojby2rd/5W6pypyVWosr86uVUMiAYAfX3SEBQbhAzuM0N/c8PPhqfnowLlonnJE /Ej6CP1mKVH9Z0AkVTN89AkCJExgG8sVuROYNj+0w12IhW17IxFmV6IEnkeNQp51tv8k bO0w61LFfRg+wsDLrlw1Ej7/j6TvvzJ/V8dTTuOVNmLqmC91hqj9X1kBPRdPjN5Ma0mR tvVw== X-Gm-Message-State: ACgBeo0PCgOL8syjS9wRXESpePe6UFY40spO87fQ9AbFEn4xjflsXwHr 20eY/oi4CUYziKtTj/UrYFc= X-Google-Smtp-Source: AA6agR6LWwrUGGfoOSbVk9oxNX8imZLStpZ8izPiLHM9p+m8rli2GQHNjyDS5uL1kEKQueemyub1Qg== X-Received: by 2002:a1c:6a0a:0:b0:3a5:bcad:f2cc with SMTP id f10-20020a1c6a0a000000b003a5bcadf2ccmr1823007wmc.74.1662633836389; Thu, 08 Sep 2022 03:43:56 -0700 (PDT) Received: from felia.fritz.box (200116b826f77600d0640cc051af4288.dip.versatel-1u1.de. [2001:16b8:26f7:7600:d064:cc0:51af:4288]) by smtp.gmail.com with ESMTPSA id bu3-20020a056000078300b0022863395912sm17227486wrb.53.2022.09.08.03.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Sep 2022 03:43:56 -0700 (PDT) From: Lukas Bulwahn To: Russell King , linux-arm-kernel@lists.infradead.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Mauro Carvalho Chehab , linux-media@vger.kernel.org, Peter Chen , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Andrew Morton , Mike Rapoport , linux-mm@kvack.org, Masahiro Yamada , linux-kbuild@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Lukas Bulwahn Subject: [PATCH 5/6] mm: Kconfig: make config SECRETMEM visible with EXPERT Date: Thu, 8 Sep 2022 12:43:36 +0200 Message-Id: <20220908104337.11940-6-lukas.bulwahn@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220908104337.11940-1-lukas.bulwahn@gmail.com> References: <20220908104337.11940-1-lukas.bulwahn@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_034357_858090_D7DB2E17 X-CRM114-Status: GOOD ( 24.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Commit 6a108a14fa35 ("kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT") introduces CONFIG_EXPERT to carry the previous intent of CONFIG_EMBEDDED and just gives that intent a much better name. That has been clearly a good and long overdue renaming, and it is clearly an improvement to the kernel build configuration that has shown to help managing the kernel build configuration in the last decade. However, rather than bravely and radically just deleting CONFIG_EMBEDDED, this commit gives CONFIG_EMBEDDED a new intended semantics, but keeps it open for future contributors to implement that intended semantics: A new CONFIG_EMBEDDED option is added that automatically selects CONFIG_EXPERT when enabled and can be used in the future to isolate options that should only be considered for embedded systems (RISC architectures, SLOB, etc). Since then, this CONFIG_EMBEDDED implicitly had two purposes: - It can make even more options visible beyond what CONFIG_EXPERT makes visible. In other words, it may introduce another level of enabling the visibility of configuration options: always visible, visible with CONFIG_EXPERT and visible with CONFIG_EMBEDDED. - Set certain default values of some configurations differently, following the assumption that configuring a kernel build for an embedded system generally starts with a different set of default values compared to kernel builds for all other kind of systems. Considering the second purpose, note that already probably arguing that a kernel build for an embedded system would choose some values differently is already tricky: the set of embedded systems with Linux kernels is already quite diverse. Many embedded system have powerful CPUs and it would not be clear that all embedded systems just optimize towards one specific aspect, e.g., a smaller kernel image size. So, it is unclear if starting with "one set of default configuration" that is induced by CONFIG_EMBEDDED is a good offer for developers configuring their kernels. Also, the differences of needed user-space features in an embedded system compared to a non-embedded system are probably difficult or even impossible to name in some generic way. So it is not surprising that in the last decade hardly anyone has contributed changes to make something default differently in case of CONFIG_EMBEDDED=y. Currently, in v6.0-rc4, SECRETMEM is the only config switched off if CONFIG_EMBEDDED=y. As long as that is actually the only option that currently is selected or deselected, it is better to just make SECRETMEM configurable at build time by experts using menuconfig instead. Make SECRETMEM configurable when EXPERT is set and otherwise default to yes. Further, SECRETMEM needs ARCH_HAS_SET_DIRECT_MAP. This allows us to remove CONFIG_EMBEDDED in the close future. Signed-off-by: Lukas Bulwahn --- mm/Kconfig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mm/Kconfig b/mm/Kconfig index ceec438c0741..aa154c20b129 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -1068,7 +1068,13 @@ config IO_MAPPING bool config SECRETMEM - def_bool ARCH_HAS_SET_DIRECT_MAP && !EMBEDDED + default y + bool "Enable memfd_secret() system call" if EXPERT + depends on ARCH_HAS_SET_DIRECT_MAP + help + Enable the memfd_secret() system call with the ability to create + memory areas visible only in the context of the owning process and + not mapped to other processes and other kernel page tables. config ANON_VMA_NAME bool "Anonymous VMA name support" -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel