From patchwork Thu Sep 8 10:43:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Bulwahn X-Patchwork-Id: 604167 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76BCDC54EE9 for ; Thu, 8 Sep 2022 10:44:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231273AbiIHKoF (ORCPT ); Thu, 8 Sep 2022 06:44:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231144AbiIHKny (ORCPT ); Thu, 8 Sep 2022 06:43:54 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F85E9D8ED; Thu, 8 Sep 2022 03:43:52 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 186-20020a1c02c3000000b003b26feb5c6bso1352196wmc.5; Thu, 08 Sep 2022 03:43:52 -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=YcRQWeHsNHudXowYxhzrFSu3g61QameARaQdQJb5lU8=; b=g3G7qs40MLQJX14/onOdc/vwEuCiGg3qlXRS98ERCemYZhBI59bvkmMyGLr09yHXS/ yFosfFbqEKXH3p/CfgCOl/rnQhKEtFaDJTjdwAl2E9NoJNZ8YIVubxdleDB/f0g4+3oo JIeGMlGuo3uFUW4fDwCEy9M1RHT2k/t4jVo48Ln/eFseeN1oVe9bh0vMtHB5XTVOMXlQ BfukHii/KG8jzkRD5yeoihVnAl+O4D3cCY+SL/5O/X6oM9T0JNIC31tvygvv5sDkdBMp C81T8fKmjXFOmCxs6csbtglXCTBnAX8JxPtOwKgLbEgviTauwuYqLNDYQ4p+gnFdpP+i HV8g== 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=YcRQWeHsNHudXowYxhzrFSu3g61QameARaQdQJb5lU8=; b=bLws0u7gqf5mdU/P7joaZoL+Tc8iE2IyPybnfHndtMVDtAGKDG02GrhQXwqwZhYS3l ybzhxp2oxNYDCDKKCzNwlUDcAxAZF0GvOy+1OOQ1gF6sDkGc5X8FxHkGGcLQmsIV63qc KOzQ+PPdpFLvHsFtcoYut2AZe/pDxL+mIan75rSxHGm/bA65x3VJrGxk9bhD2ilTDL+k hRU7b61Dz+513VLqtbuYVqJPUjOKiXL7fexDBLQx5pIEC9xq0Q3S2ohNcDsXqT5UMjRn OjPDeBRLbL76iVNQ/gM0MHSoezU5qmvXHRWsfdil+jYakONWGcJYruXVbXTrF/E/xpfa tPOg== X-Gm-Message-State: ACgBeo1uV2URTjeEcRe9aP1ptyXX75t9/P9131Nqdtj18p+pXDvZryvv tti0TXq8xcjn+5YUzh9W0Sk= X-Google-Smtp-Source: AA6agR6ynOlAaxihPYz+CdT04VP+VpGksNMzS5VFetSq0N8fvehilNxf41zef99BhDZbNdGwjrNtVg== X-Received: by 2002:a05:600c:4f10:b0:3a5:f8c8:a5b5 with SMTP id l16-20020a05600c4f1000b003a5f8c8a5b5mr1835323wmq.34.1662633830474; Thu, 08 Sep 2022 03:43:50 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Sep 2022 03:43:50 -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 2/6] x86: make config X86_FEATURE_NAMES visible with EXPERT Date: Thu, 8 Sep 2022 12:43:33 +0200 Message-Id: <20220908104337.11940-3-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> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.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 first purpose, at the point in time where CONFIG_EMBEDDED was renamed to CONFIG_EXPERT, CONFIG_EXPERT already made 130 more options become visible throughout all different menus for the kernel configuration. Over the last decade, this has gradually increased, so that currently, with CONFIG_EXPERT, roughly 170 more options become visible throughout all different menus for the kernel configuration. In comparison, currently with CONFIG_EMBEDDED enabled, just seven more options are visible, one in x86, one in arm, and five for the ChipIdea Highspeed Dual Role Controller. As the numbers suggest, these two levels of enabling the visibility of even more configuration options---beyond what CONFIG_EXPERT enables---never evolved to a good solution in the last decade. In other words, this additional level of visibility of configuration option with CONFIG_EMBEDDED compared to CONFIG_EXPERT has since its introduction never become really valuable. It requires quite some investigation to actually understand what is additionally visible and it does not differ significantly in complexity compared to just enabling CONFIG_EXPERT. This CONFIG_EMBEDDED---or any other config to show more detailed options beyond CONFIG_EXPERT---is unlikely to be valuable unless somebody puts significant effort in identifying how such visibility options can be properly split and creating clear criteria, when some config option is visible with CONFIG_EXPERT and when some config option is visible only with some further option enabled beyond CONFIG_EXPERT, such as CONFIG_EMBEDDED attempted to do. For now, it is much more reasonable to simply make those additional seven options that visible with CONFIG_EMBEDDED, visible with CONFIG_EXPERT, and then remove CONFIG_EMBEDDED. If anyone spends significant effort in structuring the visibility of config options, they may re-introduce suitable new config options simply as they see fit. Make the config X86_FEATURE_NAMES visible when CONFIG_EXPERT is enabled. Signed-off-by: Lukas Bulwahn --- arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 2ec0b1eabe86..7807eb1c8df8 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -438,7 +438,7 @@ config SMP If you don't know what to do here, say N. config X86_FEATURE_NAMES - bool "Processor feature human-readable names" if EMBEDDED + bool "Processor feature human-readable names" if EXPERT default y help This option compiles in a table of x86 feature bits and corresponding From patchwork Thu Sep 8 10:43:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Bulwahn X-Patchwork-Id: 604166 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AFB27C6FA82 for ; Thu, 8 Sep 2022 10:44:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231441AbiIHKoL (ORCPT ); Thu, 8 Sep 2022 06:44:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231284AbiIHKoG (ORCPT ); Thu, 8 Sep 2022 06:44:06 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57F01901B9; Thu, 8 Sep 2022 03:43:56 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id t7so20317382wrm.10; Thu, 08 Sep 2022 03:43:55 -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=DAvW/j/5PxDjN0idhO6jbr+d99JWnLewou5/uVrgjpw=; b=BjftNcUlKNzBBVcZwF15+1/SUUs6ojyiGx+bmwJqOwI5zKTtIVhoNVvdW8TIaVaAps aFmzTJUK0Ef6cg7zBmV6LX/dGZoPVKPVveNp1rNUaW++nGkfDSyUmRTu68aOk96Ga0kb fSRCjPZQ3DYljHvB7IJp1AYr6FdAu44RzyJZFwdMk6cECanW5F4IsNN8672rXQmOhGgT w5Q43+vhG98S2dBXQrlNbW2OC34mTsABkWOS4wxUoD2d1eAAAGk1Qotds/77Bze+3n9P EXcygbRWdDU5R1rHXmu76wKLlz4ntHJmGuu2+SKMsGn0qkR8sbyLSpyCEz6H6QMxjmAq pTUQ== 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=DAvW/j/5PxDjN0idhO6jbr+d99JWnLewou5/uVrgjpw=; b=z2en7F8eCx7xUmmrP3FKhd51vbRcFayAo7F/LBSAFgjXx25ma5NFWgY6GQCd4imf6J GojwT0ktSmwdBEHvgU2cz6AuhCrp/ylhL9pGtm8W5pSZLruSJvNcjWaUJgALy90H+VqM /zy5C0aQ6JKrmdur5Yax3yr8EdTkzbB/0v8tK+/rgKwxTrf8tX+3LIU8ofh90YmElpEK pTrFs36D9xVUk2t6N0RBLMU3jJa/eGZzgV2RvJl1oOXJPhRyp//IKEH688QciPuC2U0c ysXO/zE/4FHTYf/GAGubR5TzSuLDapQZsZE9oROmxjUgjbisLehv69eUOn4vncD2zy3L iJ6A== X-Gm-Message-State: ACgBeo17pfV3rRNgyD+iBiomz/tZf48U2ohQa/u/2g/2QR7QWg/aZ/IE 1jCjVyjM424hAusW0J8NjNY= X-Google-Smtp-Source: AA6agR5QOaqvtIoVx5Bin2x+wiRcH4moEJJlXrbG8Yn8LK7Igv7M/jtpddN3oejEBKPK9FGt4HnrHg== X-Received: by 2002:a5d:6802:0:b0:228:d6e9:6dd8 with SMTP id w2-20020a5d6802000000b00228d6e96dd8mr4963144wru.710.1662633834261; Thu, 08 Sep 2022 03:43:54 -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.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Sep 2022 03:43:53 -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 4/6] usb: chipidea: make configs for glue drivers visible with EXPERT Date: Thu, 8 Sep 2022 12:43:35 +0200 Message-Id: <20220908104337.11940-5-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> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.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 first purpose, at the point in time where CONFIG_EMBEDDED was renamed to CONFIG_EXPERT, CONFIG_EXPERT already made 130 more options become visible throughout all different menus for the kernel configuration. Over the last decade, this has gradually increased, so that currently, with CONFIG_EXPERT, roughly 170 more options become visible throughout all different menus for the kernel configuration. In comparison, currently with CONFIG_EMBEDDED enabled, just seven more options are visible, one in x86, one in arm, and five for the ChipIdea Highspeed Dual Role Controller. As the numbers suggest, these two levels of enabling the visibility of even more configuration options---beyond what CONFIG_EXPERT enables---never evolved to a good solution in the last decade. In other words, this additional level of visibility of configuration option with CONFIG_EMBEDDED compared to CONFIG_EXPERT has since its introduction never become really valuable. It requires quite some investigation to actually understand what is additionally visible and it does not differ significantly in complexity compared to just enabling CONFIG_EXPERT. This CONFIG_EMBEDDED---or any other config to show more detailed options beyond CONFIG_EXPERT---is unlikely to be valuable unless somebody puts significant effort in identifying how such visibility options can be properly split and creating clear criteria, when some config option is visible with CONFIG_EXPERT and when some config option is visible only with some further option enabled beyond CONFIG_EXPERT, such as CONFIG_EMBEDDED attempted to do. For now, it is much more reasonable to simply make those additional seven options that visible with CONFIG_EMBEDDED, visible with CONFIG_EXPERT, and then remove CONFIG_EMBEDDED. If anyone spends significant effort in structuring the visibility of config options, they may re-introduce suitable new config options simply as they see fit. Make the configs for usb chipidea glue drivers visible when CONFIG_EXPERT is enabled. Signed-off-by: Lukas Bulwahn --- drivers/usb/chipidea/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig index 661818e8fed6..c815824a0b2d 100644 --- a/drivers/usb/chipidea/Kconfig +++ b/drivers/usb/chipidea/Kconfig @@ -34,26 +34,26 @@ config USB_CHIPIDEA_HOST ChipIdea driver. config USB_CHIPIDEA_PCI - tristate "Enable PCI glue driver" if EMBEDDED + tristate "Enable PCI glue driver" if EXPERT depends on USB_PCI depends on NOP_USB_XCEIV default USB_CHIPIDEA config USB_CHIPIDEA_MSM - tristate "Enable MSM hsusb glue driver" if EMBEDDED + tristate "Enable MSM hsusb glue driver" if EXPERT default USB_CHIPIDEA config USB_CHIPIDEA_IMX - tristate "Enable i.MX USB glue driver" if EMBEDDED + tristate "Enable i.MX USB glue driver" if EXPERT depends on OF default USB_CHIPIDEA config USB_CHIPIDEA_GENERIC - tristate "Enable generic USB2 glue driver" if EMBEDDED + tristate "Enable generic USB2 glue driver" if EXPERT default USB_CHIPIDEA config USB_CHIPIDEA_TEGRA - tristate "Enable Tegra USB glue driver" if EMBEDDED + tristate "Enable Tegra USB glue driver" if EXPERT depends on OF default USB_CHIPIDEA From patchwork Thu Sep 8 10:43:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Bulwahn X-Patchwork-Id: 604165 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45816C38145 for ; Thu, 8 Sep 2022 10:44:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231499AbiIHKoY (ORCPT ); Thu, 8 Sep 2022 06:44:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231292AbiIHKoG (ORCPT ); Thu, 8 Sep 2022 06:44:06 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5044BB90E; Thu, 8 Sep 2022 03:43:56 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id k17so10572338wmr.2; Thu, 08 Sep 2022 03:43:56 -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=l4s46F7h9gmZxnGSKEZoOkCDPTH0/41fNpaqRWrhEUbNxS+xqBe+1lmlZ79Urqic71 F6+vFiNqrtR+tNBP3D8iPv7irPW0mIjoo+PInKuq9CXItdYnGRqgVJCb/MAYI7m6MRpK iu2M82UWksAMmnyHpBtCtPu+PpjQewWHr+kugZmBOMiVOzL6tBxR7CIgrZWDeqS/dDOY /fu0xiIifnm8ZpMwrOc9cjSc2azfAwI+mMCG4xr7gPinFMifVsPKXnEu+Jx1MOQ94NhJ De8gZQGWYoGok6d0Z7QBj8GLnwgibsBHEJBxzQ/jyo1fBz7ALz0GdfZCet4nhUW+d6Ql aIJQ== X-Gm-Message-State: ACgBeo3FeyBNoQXNnlZa6pYTWwJRo0E65uc65TCrtsrXMy1YVFgNBo3F GQg+JR2GeiIVqGoQmM59E+U= 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> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.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"