Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5078230pxb; Mon, 15 Feb 2021 08:57:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMtA38p2Ui3xMUC2qrj/PJfIQXIuAbiUaWfeBKxF92rVTQTUc+lYWH2wzvEOI+Ltag7Hjb X-Received: by 2002:a17:906:27d2:: with SMTP id k18mr10198498ejc.74.1613408241872; Mon, 15 Feb 2021 08:57:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613408241; cv=none; d=google.com; s=arc-20160816; b=wInkUjkPEil+gobHmcTWkMPh5/p95LTwffucqCRTuKIFfYztW0NG6ekll3a3RVY97e HnCqnGh8jHIpeEz3tUqwMdwSwbqSSR44JG6OjsbZe34q8uiO1fwXMjM/9FrEP1tFqNol WYFeCxQbdkNqwygrQyHq/FxjgwX6Ko/bVczTY1sCRUuF6ZL3Xwx2SViOb73RCxLTTYaQ WcGZf7ya1j2D6Rlf/UH/clDmAMLDW9Bf88SD8uVZRMpU79VJrn4JDj8CTk9+eK3G0xnO 5sttlXJ6ehJjzgs6F645wDadRzvGa1+9LdtP0wKT8YEHe/5GcBm7zOS9uHMlKqgsQ06h xb6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=NtDy32bY/Y1zTOf7DKj9efB/xBdszqh07iIfGvvf2ao=; b=fbTuTPfoO6k75FfZaXUna9ijH2Q1Ici0HDl61X+wgY7Re0GITlR/hWY5wAE9UyUMAv 8OiMhkVgdDwbYLTKQOD2XADOlT6Y0SVlk1WIZcuoAXcimM51gEaLTzlcQPS77+PVAQPK 03YFp8fohzx3nWp7eXZOGW/2FHn5LS4U5B1/Y5D6h/8GrnN0gqWrqVNHoNGkB3yLE0tL znxnwrniZLMGfaIaezA8OMbb4oS0gDMTWC2LueWpufpMCwJzyUwJUpR/KFUohvEoPrV6 5UQ0X/inH6zFUkEwbyaeNueTm6NPqCCcy2fZcumop0kFAOu1uJDjpRtu2NIVN4ubm993 wLbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c59si12140186edd.508.2021.02.15.08.56.58; Mon, 15 Feb 2021 08:57:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231596AbhBOQyQ (ORCPT + 99 others); Mon, 15 Feb 2021 11:54:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231555AbhBOPnZ (ORCPT ); Mon, 15 Feb 2021 10:43:25 -0500 Received: from smtp-42a9.mail.infomaniak.ch (smtp-42a9.mail.infomaniak.ch [IPv6:2001:1600:3:17::42a9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9F8FC0617A9 for ; Mon, 15 Feb 2021 07:41:32 -0800 (PST) Received: from smtp-3-0000.mail.infomaniak.ch (unknown [10.4.36.107]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4DfSw063mzzMprKn; Mon, 15 Feb 2021 16:39:44 +0100 (CET) Received: from ns3096276.ip-94-23-54.eu (unknown [23.97.221.149]) by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4DfSvz3vM9zlh8TM; Mon, 15 Feb 2021 16:39:43 +0100 (CET) Subject: Re: [PATCH v1 2/3] kconfig: Ask user if string needs to be changed when dependency changed To: Boris Kolpackov Cc: James Morris , Masahiro Yamada , "Serge E . Hallyn" , Casey Schaufler , Nicolas Iooss , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= References: <20210215122513.1773897-1-mic@digikod.net> <20210215122513.1773897-3-mic@digikod.net> From: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= Message-ID: Date: Mon, 15 Feb 2021 16:40:34 +0100 User-Agent: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-8859-15 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/02/2021 15:13, Boris Kolpackov wrote: > Micka?l Sala?n writes: > >> Content of string configuration may depend on related kernel >> configurations. Modify oldconfig and syncconfig to inform users about >> possible required configuration update and give them the opportunity to >> update it: >> * if dependencies of this string has changed (e.g. enabled or disabled), >> * and if the current value of this string is different than the (new) >> default one. > > I have a number of questions: > > 1. Why is a change in dependencies necessarily means that the dependent's > value must be revised? Here is a specific example (to make sure we are > talking about the same things): > > config FOO > string "Foo value" > depends on BAR || BAZ > > Why, in the general case, when I disable BAR and enable BAZ I must > also revise the value of FOO? It may be necessary, or not, depending of the use of the string. This semantic is not clearly expressed by kconfig but looking at the current configuration, there is only 4 strings depending on more than one dependency: * SIMDISK1_FILENAME for arch/xtensa * CMDLINE for arch/sh * SECURITY_TOMOYO_POLICY_LOADER * SECURITY_TOMOYO_ACTIVATION_TRIGGER Such patterns seem in line with this patch. > > 2. How do you know that what's in the user's .config is the old default > and in Kconfig -- the new default value? What if in the user's .config > is a custom value (with which the user is perfectly happy) and what's > in Kconfig is the old default (which the user has already seen)? The current behavior (i.e. keeping the current user config) is not changed. The oldconfig target only stops when a string may require an update, shows to the user the (potentially new but not necessary best) default value along with the value already in place in the .config file, and if the user just type enter this current value will not be changed. > > 3. Why limit this to strings only? Strings contain configuration blobs that may be interpreted by the kernel but not by kconfig (cf. CONFIG_LSM). It will still be possible to handle other types if there is some related use cases. > > >> This is particularly relevant for CONFIG_LSM which contains a list of >> LSMs enabled at boot, but users will not have a chance to update this >> list with a make oldconfig. > > If my understanding above is correct, this feels like it's been purpose- > made to address whatever issue you are having with CONFIG_LSM. If so, > what about potential numerous other options that don't have this issue > but will now be presented to the user for modification? This patch series helps address the LSM stacking issue. The 4 other cases may benefit from this patch too.