Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752234AbcLHRbT convert rfc822-to-8bit (ORCPT ); Thu, 8 Dec 2016 12:31:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45536 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751327AbcLHRbR (ORCPT ); Thu, 8 Dec 2016 12:31:17 -0500 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20161208124236.GA8757@wunner.de> References: <20161208124236.GA8757@wunner.de> <20161208065735.GB8549@wunner.de> <148111668193.23390.6340512985876251017.stgit@warthog.procyon.org.uk> <148111671977.23390.12452925207541146423.stgit@warthog.procyon.org.uk> <6009.1481184981@warthog.procyon.org.uk> To: Lukas Wunner Cc: dhowells@redhat.com, matt@codeblueprint.co.uk, ard.biesheuvel@linaro.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 5/8] efi: Get the secure boot status [ver #5] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14654.1481218273.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Thu, 08 Dec 2016 17:31:13 +0000 Message-ID: <14655.1481218273@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 08 Dec 2016 17:31:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 615 Lines: 18 Lukas Wunner wrote: > > +out_efi_err: > > + pr_efi_err(sys_table_arg, "Could not determine UEFI Secure Boot status.\n"); > > + if (status == EFI_NOT_FOUND) > > + return efi_secureboot_mode_disabled; > > + return efi_secureboot_mode_unknown; > > +} > > In the out_efi_err path, the if-statement needs to come before the > pr_efi_err() call. Otherwise it would be a change of behaviour for > ARM to what we have now. As I understand it, if the BIOS is an EFI BIOS, these variables must exist - in which case I would argue that the pr_efi_err-statement should be before the if-statement. David