From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752423AbdFSU20 (ORCPT ); Mon, 19 Jun 2017 16:28:26 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:35166 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751839AbdFSU0e (ORCPT ); Mon, 19 Jun 2017 16:26:34 -0400 From: Kees Cook To: Andrew Morton Cc: Kees Cook , Matt Fleming , linux-kernel@vger.kernel.org, Stephen Rothwell , Daniel Micay Subject: [PATCH 1/7] efi: Avoid fortify checks in EFI stub Date: Mon, 19 Jun 2017 13:26:21 -0700 Message-Id: <1497903987-21002-2-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497903987-21002-1-git-send-email-keescook@chromium.org> References: <1497903987-21002-1-git-send-email-keescook@chromium.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Ard Biesheuvel Acked-by: Mark Rutland --- 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) -- 2.7.4