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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36DA6ECAAA1 for ; Fri, 9 Sep 2022 06:23:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C91358D0005; Fri, 9 Sep 2022 02:23:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C40A58D0002; Fri, 9 Sep 2022 02:23:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B2FBB8D0005; Fri, 9 Sep 2022 02:23:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id A45048D0002 for ; Fri, 9 Sep 2022 02:23:36 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 584FB160424 for ; Fri, 9 Sep 2022 06:23:36 +0000 (UTC) X-FDA: 79891555632.24.D16176A Received: from conssluserg-01.nifty.com (conssluserg-01.nifty.com [210.131.2.80]) by imf26.hostedemail.com (Postfix) with SMTP id 67B2414009E for ; Fri, 9 Sep 2022 06:23:35 +0000 (UTC) Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) (authenticated) by conssluserg-01.nifty.com with ESMTP id 2896NJgv027952 for ; Fri, 9 Sep 2022 15:23:20 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com 2896NJgv027952 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.44] Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-1279948d93dso1480525fac.10 for ; Thu, 08 Sep 2022 23:23:20 -0700 (PDT) X-Gm-Message-State: ACgBeo31fSjqhm+Lpr3RaLIEVi+BBl/S3Nmd9DnjcTQMEpMIKzO/ST3z vqq2EJP5lo7OwLHWS93FCaDxAN72DTFNOws6G3s= X-Google-Smtp-Source: AA6agR6TkF3ZCXHdyUVvKfeexJcA6/iUO15vrP/nUMylWe8sfgvSiu+88R6kp9AHz26LHLW2L4i7YtsZ/0OFNLM4DXc= 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" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662704615; a=rsa-sha256; cv=none; b=gK7euCb0iSZ9Ob7b3rkmzdsmS69M/T4kUzajbmQKWLasTMJHdKyuxKSw/EE8eaiqzkbZZV n5MZzvusEPOkzyRh9hGvQ3M/HjtvPw60Odcx5KOLDlbWC/HX1A0OmHccd/ErzlHjzG0CU1 jl22wyvh3nYb9Wxzo3FIBxrOBEViNu0= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=nifty.com header.s=dec2015msa header.b=z9ef8H04; spf=softfail (imf26.hostedemail.com: 210.131.2.80 is neither permitted nor denied by domain of masahiroy@kernel.org) smtp.mailfrom=masahiroy@kernel.org; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662704615; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=M8RU77rFPgb9iCDZlcgmp1AIsNWV2fZAChJbFjqGEXM=; b=QYGzl94k5UMrF5RrEL8iVUipBg0RwLSFXpUl3D7H4YYZhHePBrrud8kr52WqUJRHzNmRKj OpKn/t7Yg56abITmfjce/nystmlHn7N1dPY91ubu0Xfpp7C3MypH2wDSVOlLGkYfI7j4Y/ g40287/9N1MSjXZBjoZ29ZJgbS/8joQ= X-Rspamd-Queue-Id: 67B2414009E Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=nifty.com header.s=dec2015msa header.b=z9ef8H04; spf=softfail (imf26.hostedemail.com: 210.131.2.80 is neither permitted nor denied by domain of masahiroy@kernel.org) smtp.mailfrom=masahiroy@kernel.org; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) X-Rspam-User: X-Rspamd-Server: rspam06 X-Stat-Signature: p176ikhn7xgushhwb34uf39n5soq6snk X-HE-Tag: 1662704615-327284 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: 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