From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8Qj-0005HP-4m for kexec@lists.infradead.org; Wed, 09 Sep 2020 22:19:06 +0000 Received: by mail-pg1-x541.google.com with SMTP id 7so3076353pgm.11 for ; Wed, 09 Sep 2020 15:19:02 -0700 (PDT) Date: Wed, 9 Sep 2020 15:18:58 -0700 From: Kees Cook Subject: Re: [PATCH v2 01/18] test_firmware: Test platform fw loading on non-EFI systems Message-ID: <202009091518.732D15B21@keescook> References: <20200722193020.2676422-1-keescook@chromium.org> <20200722193020.2676422-2-keescook@chromium.org> <20200729004806.GK4332@42.do-not-panic.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200729004806.GK4332@42.do-not-panic.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Luis Chamberlain Cc: linux-efi@vger.kernel.org, "Rafael J. Wysocki" , Peter Zijlstra , linux-fsdevel@vger.kernel.org, Stephen Boyd , SeongJae Park , Mimi Zohar , David Howells , Tushar Sugandhi , Peter Jones , linux-kselftest@vger.kernel.org, "Joel Fernandes (Google)" , Shuah Khan , Ard Biesheuvel , Thomas Cedeno , Anders Roxell , Paul Moore , Mauro Carvalho Chehab , Michael Ellerman , Nayna Jain , Matthew Garrett , James Morris , Lakshmi Ramasubramanian , Aaron Goidel , "Serge E. Hallyn" , Wenwen Wang , Scott Branden , selinux@vger.kernel.org, Jessica Yu , Hans de Goede , Alexander Viro , Matthieu Baerts , KP Singh , Eric Paris , linux-integrity@vger.kernel.org, Florent Revest , Andrea Righi , Greg Kroah-Hartman , Stephen Smalley , Randy Dunlap , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-security-module@vger.kernel.org, Eric Biederman , Dave Olsthoorn , Dmitry Kasatkin , Casey Schaufler , Joe Perches , Andrew Morton , Thiago Jung Bauermann On Wed, Jul 29, 2020 at 12:48:06AM +0000, Luis Chamberlain wrote: > On Wed, Jul 22, 2020 at 12:30:03PM -0700, Kees Cook wrote: > > On non-EFI systems, it wasn't possible to test the platform firmware > > loader because it will have never set "checked_fw" during __init. > > Instead, allow the test code to override this check. Additionally split > > the declarations into a private header file so it there is greater > > enforcement of the symbol visibility. > > > > Fixes: 548193cba2a7 ("test_firmware: add support for firmware_request_platform") > > Cc: stable@vger.kernel.org > > Signed-off-by: Kees Cook > > A *clearly* private symbol namespace would seem cleaner, example the existing: > > EXPORT_SYMBOL_NS_GPL(fw_fallback_config, FIRMWARE_LOADER_PRIVATE); I'm respinning this now. It doesn't solve in-kernel visibility, but it does solve module visibility, I guess. It's a simpler patch, and I think gets the point across. Will send after build testing... -- Kees Cook _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec