From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751505AbdFFRSH (ORCPT ); Tue, 6 Jun 2017 13:18:07 -0400 Received: from foss.arm.com ([217.140.101.70]:50048 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390AbdFFRSC (ORCPT ); Tue, 6 Jun 2017 13:18:02 -0400 Date: Tue, 6 Jun 2017 18:17:12 +0100 From: Mark Rutland To: Ard Biesheuvel , Kees Cook Cc: Matt Fleming , Andrew Morton , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/6] efi: Avoid fortify checks in EFI stub Message-ID: <20170606171712.GA4483@leverpostej> References: <1496724755-104187-1-git-send-email-keescook@chromium.org> <1496724755-104187-3-git-send-email-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 06, 2017 at 05:13:07PM +0000, Ard Biesheuvel wrote: > (+ Mark, Matt) > > On 6 June 2017 at 04:52, Kees Cook wrote: > > This avoids CONFIG_FORTIFY_SOURCE from being enabled during the EFI stub > > build, as adding a panic() implementation may not work well. This can be > > adjusted in the future. > > > > Suggested-by: Daniel Micay > > Signed-off-by: Kees Cook > > Cc; Matt Fleming > > Cc: Ard Biesheuvel I believe for arm64 the immediate breakage is implicitly fixed by the definition, but I agree it makes sense to be explicit anyhow. FWIW: Acked-by: Mark Rutland Kees, as an aside, do you want me to patchify the vdso fixup? Or are you going to handle that? Thanks, Mark. > > --- > > drivers/firmware/efi/libstub/Makefile | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile > > index f7425960f6a5..37e24f525162 100644 > > --- a/drivers/firmware/efi/libstub/Makefile > > +++ b/drivers/firmware/efi/libstub/Makefile > > @@ -17,6 +17,7 @@ cflags-$(CONFIG_ARM) := $(subst -pg,,$(KBUILD_CFLAGS)) \ > > cflags-$(CONFIG_EFI_ARMSTUB) += -I$(srctree)/scripts/dtc/libfdt > > > > KBUILD_CFLAGS := $(cflags-y) -DDISABLE_BRANCH_PROFILING \ > > + -D__NO_FORTIFY \ > > $(call cc-option,-ffreestanding) \ > > $(call cc-option,-fno-stack-protector) > > > > Reviewed-by: Ard Biesheuvel > > This is unlikely to conflict with anything going through the EFI tree, > so feel free to queue it elsewhere.