Received: by 10.223.185.116 with SMTP id b49csp6796230wrg; Wed, 28 Feb 2018 16:02:12 -0800 (PST) X-Google-Smtp-Source: AH8x227ELQnBdux8clnT9qp0LxEZjI+qSkox7H5nXY7zmXopeqnXyy6lqNoPZ+EDlp6w0o85Q5KZ X-Received: by 10.101.101.10 with SMTP id x10mr15887523pgv.223.1519862532601; Wed, 28 Feb 2018 16:02:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519862532; cv=none; d=google.com; s=arc-20160816; b=HUm9NcpKU0a29xANQPBGHlQfWLMGYvGFO2GUsiRH90nOo2XjuLgjwMq424pajZvqJd YswQuFu2y01pFQ5TCr9usaH1myT5EfYYLSnPOu5dFP+JtxeQzmRQtqkooIf4Qf0MLnVO yvlEp/1FgT2NObBtMxnPr5l2uEZ1sk46KhX2a/f+rSsVDFtMoNhN25u9iNyhRw4IqNyj jLG2ZzP/TFhbqeu8W+n0nENDCL1CDHxb1EtzkJq99mQ7g6fES+5Jkj/fu7Zx60HjuzwV EQbXiuQYwLy647QqXcLFlyjsH+ZpoXS+zS+q8+a4O5k9SMuM1H/9yGqTCHRr1uQmwETN L3tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=y0RqrcqVjVjOGg7jxjugYpw4/HPGMfFfN6N9CBtlvtA=; b=Igi140rUZWEhXUGeYCZ/n5JVarxKrUbavkNOngLa5BsbtA17x7u9cY1ccxVfP2rkNn +iYFaDmJ3Z8f1CaPAsZ67BAYIBg6aA0y7zLc1iIRJ4M8fCXY2ae9wZtPGdtDjuRKLsBX SVnrDBf//tCd5BL2Nljd2eYOjgkdzwYRQq8OTbEoeIsoUfd5PJh7ReK4v71wxajj870b 7+wg2gxsufkPkzfHQvwvGN6UjOgW0UPf5Gvk7noC+BjUFUG8kqRgQIq58eKZ7UG1sXYF tqoy9L3c2/F6z7CAZXYjGop9PStajlJu3+Xhw+nx35L9JrVS7XwbLVxbRbUn6r2vmQ8z sbfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s6-v6si2090102plq.382.2018.02.28.16.01.57; Wed, 28 Feb 2018 16:02:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965167AbeCAABP (ORCPT + 99 others); Wed, 28 Feb 2018 19:01:15 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:51786 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964824AbeCAABN (ORCPT ); Wed, 28 Feb 2018 19:01:13 -0500 X-Originating-IP: 50.39.166.153 Received: from localhost (50-39-166-153.bvtn.or.frontiernet.net [50.39.166.153]) (Authenticated sender: josh@joshtriplett.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 97E0441C084; Thu, 1 Mar 2018 01:01:00 +0100 (CET) Date: Wed, 28 Feb 2018 16:00:58 -0800 From: Josh Triplett To: "Luis R. Rodriguez" Cc: Kees Cook , Greg KH , Andrew Morton , Shuah Khan , Martin Fuzzey , Mimi Zohar , David Howells , pali.rohar@gmail.com, Takashi Iwai , arend.vanspriel@broadcom.com, =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , nbroeking@me.com, Vikram Mulukutla , stephen.boyd@linaro.org, Mark Brown , Dmitry Torokhov , David Woodhouse , Linus Torvalds , Abhay_Salunke@dell.com, bjorn.andersson@linaro.org, jewalt@lgsinnovations.com, LKML , "linux-fsdevel@vger.kernel.org" Subject: Re: [PATCH v2 11/11] test_firmware: test three firmware kernel configs using a proc knob Message-ID: <20180301000057.GA3426@localhost> References: <20180224024613.24078-1-mcgrof@kernel.org> <20180224024613.24078-12-mcgrof@kernel.org> <20180228013237.GH14069@wotan.suse.de> <20180228090723.GA11438@localhost> <20180228182603.GI14069@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180228182603.GI14069@wotan.suse.de> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 28, 2018 at 06:26:03PM +0000, Luis R. Rodriguez wrote: > On Wed, Feb 28, 2018 at 01:07:23AM -0800, Josh Triplett wrote: > > On Wed, Feb 28, 2018 at 01:32:37AM +0000, Luis R. Rodriguez wrote: > > > On Tue, Feb 27, 2018 at 03:18:15PM -0800, Kees Cook wrote: > > > > On Fri, Feb 23, 2018 at 6:46 PM, Luis R. Rodriguez wrote: > > > > > Since we now have knobs to twiddle what used to be set on kernel > > > > > configurations we can build one base kernel configuration and modify > > > > > behaviour to mimic such kernel configurations to test them. > > > > > > > > > > Provided you build a kernel with: > > > > > > > > > > CONFIG_TEST_FIRMWARE=y > > > > > CONFIG_FW_LOADER=y > > > > > CONFIG_FW_LOADER_USER_HELPER=y > > > > > CONFIG_IKCONFIG=y > > > > > CONFIG_IKCONFIG_PROC=y > > > > > > > > > > We should now be able test all possible kernel configurations > > > > > when FW_LOADER=y. Note that when FW_LOADER=m we just don't provide > > > > > the built-in functionality of the built-in firmware. > > > > > > > > > > If you're on an old kernel and either don't have /proc/config.gz > > > > > (CONFIG_IKCONFIG_PROC) or haven't enabled CONFIG_FW_LOADER_USER_HELPER > > > > > we cannot run these dynamic tests, so just run both scripts just > > > > > as we used to before making blunt assumptions about your setup > > > > > and requirements exactly as we did before. > > > > > > > > > > Signed-off-by: Luis R. Rodriguez > > > > > > > > Cool. Nice to have it all in one test build now. :) > > > > > > Now what about we start discussing one kernel config only for the future? The > > > impact would be the size of the fallback mechanism. That should be a bit clear > > > in terms of size impact after this series. > > > > > > Wonder what Josh thinks as he help with tinyconfig. We could target v4.18 if > > > its sensible. > > > > Having any of these unconditionally compiled in seems likely to be a > > significant impact, both directly and because of what else it would > > implicitly prevent compiling out or removing. And the firmware loader, > > for instance, is something that many kernels or hardware will not need > > at all. > > Oh sorry, I did not mean always enabling the firmware loader, that would add > an extra 828 bytes, and 14264 bytes if the fallback mechanism is enabled as > well. > > I meant having only CONFIG_FW_LOADER=y, and removing > CONFIG_FW_LOADER_USER_HELPER so that we just always compile it in if we have > CONFIG_FW_LOADER=y, so a penalty of 13436 bytes for those who enabled the > firmware loader but hadn't before enabled the fallback mechanism. > > I'll note CONFIG_FW_LOADER_USER_HELPER is actually known to be enabled by most > distributions these days. We have an extra CONFIG_FW_LOADER_USER_HELPER_FALLBACK > but this is now just a toggle of a boolean, and actually Android is known to > enable it mostly, not other Linux distributions. Since Android enables > CONFIG_FW_LOADER_USER_HELPER_FALLBACK we know they also enable the fallback > mechanism with CONFIG_FW_LOADER_USER_HELPER_FALLBACK. > > So for folks who enable CONFIG_FW_LOADER=y, they'd now be forced to gain an > extra 13436 bytes broken down as follows: Ah, I see. If you have CONFIG_FW_LOADER and not CONFIG_FW_LOADER_USER_HELPER, then you only have the in-kernel firmware loading mechanism? Given the *substantial* size difference between the two, it seems useful to have that option. What would it gain to combine the two?