Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1574700rwn; Fri, 9 Sep 2022 00:01:33 -0700 (PDT) X-Google-Smtp-Source: AA6agR4JqjdsXrfXQMDULBD+9VJn1lzQlKJ99fwG8i9rIfm8XLIVv4Fbd0WSEKSo5EP+aSyP41HY X-Received: by 2002:a19:e00d:0:b0:492:e5a5:588b with SMTP id x13-20020a19e00d000000b00492e5a5588bmr3700261lfg.243.1662706893248; Fri, 09 Sep 2022 00:01:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662706893; cv=none; d=google.com; s=arc-20160816; b=WRhaxzwDfN/S3f/3WZy70K8kzb53rvn8P5kvyCYqtLTlZQWx3ObuSfP85bb950Mhuh inVW3llo7aGKzhlqWalVyMspgPaBWNMhIOzhzJ30U5d6MU63ou6wkDbig6GvVF2o3yXc ZQQYXOeMiCiizUxjo4NstPJ31oHqKujQ9zXDsjGNZd/LJQRsTvT8oqtvNfCLZLjRX6EY zQwtmKvTmEb2GSAofYh9MqLlxQIlWTrZbFNL+HekpQ4nJg7NiWlQQALhKvevcdchfE33 vKjdtDQGYajRlKACATohs+Y4uApImQZQ6bJBTKHpYCuW7GbaYGiKUIget1cc+g3hXmwj vHNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=M8RU77rFPgb9iCDZlcgmp1AIsNWV2fZAChJbFjqGEXM=; b=TbUlx1JSleB9KSB3GfGlxMMGC40kZY3OD+V4P9fZvln0rIALqVxmQX+3WRzxW6Qd13 ED6wezvHfoOSWHnAR/uDlzU2tNPow3Olz6rENJFqSlB8BmUaUDel8lukoc4TTVpMiYZ1 FAZzjGKX0Gu0SrOLCIg/lkQVkCRaUQFoxFa/lqHUDPs0iDRP6TxoIAY49uMeeI0TshBa z6pDWXgNe3XINbNBd6VUEeQEjDnYPchqlmjOQ7iqg4+ZT5tKcsxkvqSd1nTyWDuHhyQa s7OW/l9HyJYTnc6BWPa7ziZSkZweihzyHcLr2Nq43te//TkFXYpCU7w1ykvTTcPwaXxO KAtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=z9ef8H04; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y8-20020a2e7d08000000b0025e4ee1f697si439974ljc.311.2022.09.09.00.01.02; Fri, 09 Sep 2022 00:01:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=z9ef8H04; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230494AbiIIG3B (ORCPT + 99 others); Fri, 9 Sep 2022 02:29:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230483AbiIIG26 (ORCPT ); Fri, 9 Sep 2022 02:28:58 -0400 X-Greylist: delayed 100 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 08 Sep 2022 23:28:57 PDT Received: from condef-07.nifty.com (condef-07.nifty.com [202.248.20.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E15D912ACD9; Thu, 8 Sep 2022 23:28:56 -0700 (PDT) Received: from conssluserg-04.nifty.com ([10.126.8.83])by condef-07.nifty.com with ESMTP id 2896NZ7G010861; Fri, 9 Sep 2022 15:23:35 +0900 Received: from mail-oa1-f42.google.com (mail-oa1-f42.google.com [209.85.160.42]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 2896NJ2b016840; Fri, 9 Sep 2022 15:23:20 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 2896NJ2b016840 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1662704600; bh=M8RU77rFPgb9iCDZlcgmp1AIsNWV2fZAChJbFjqGEXM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=z9ef8H04q8ejPMDdTZVr2QgANUJssDpWr44P8Mqs6YSyAgIK/FjPofKCpmo9coGPW UztnJvygPDhKFnFQ7TjuZJb17kQ4OgKsqc2iGGfJPdUa6kiAjIVQI70gQrYhzRBqnZ j8o3SHCjh1eNQWEVlDKeU1Z5kGq6rvdE1caB6Q9DcucNDrvoVBDQ3afvZ64llg1+ZX Tp50MfrCK62W2PAZInSRCuQZ8+OK2DZYcNmX4bmyHr1VGuvTCxQIMb9Lbxpb76TZmt WIsjVDjdNYYF/LyJWnlQUgHnK+FzjA2gwHEXeFC88qEz78AeYwZIVq24kOnU6uWMzs e8+sL5U3ME5RA== X-Nifty-SrcIP: [209.85.160.42] Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-1225219ee46so1556100fac.2; Thu, 08 Sep 2022 23:23:20 -0700 (PDT) X-Gm-Message-State: ACgBeo1Xuq79pN+VlE0AGlko35nGnLZEEM7oPJ/T8rZlhIEVlN4xRp/t PbbJq3v1I6thI6vt8Zts09y07wtwvwVchu194w4= X-Received: by 2002:a05:6870:f626:b0:10d:a798:f3aa with SMTP id ek38-20020a056870f62600b0010da798f3aamr3955805oab.194.1662704599250; Thu, 08 Sep 2022 23:23:19 -0700 (PDT) MIME-Version: 1.0 References: <20220908104337.11940-1-lukas.bulwahn@gmail.com> <20220908104337.11940-6-lukas.bulwahn@gmail.com> In-Reply-To: From: Masahiro Yamada Date: Fri, 9 Sep 2022 15:22:43 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 5/6] mm: Kconfig: make config SECRETMEM visible with EXPERT To: Mike Rapoport Cc: Lukas Bulwahn , Russell King , linux-arm-kernel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , X86 ML , Mauro Carvalho Chehab , Linux Media Mailing List , Peter Chen , Greg Kroah-Hartman , linux-usb , Andrew Morton , Linux Memory Management List , Linux Kbuild mailing list , kernel-janitors@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_SOFTFAIL, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 8, 2022 at 8:24 PM Mike Rapoport wrote: > > On Thu, Sep 08, 2022 at 12:43:36PM +0200, Lukas Bulwahn wrote: > > 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 > > Acked-by: Mike Rapoport > > > --- > > 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 > > > > -- > Sincerely yours, > Mike. Reviewed-by: Masahiro Yamada -- Best Regards Masahiro Yamada