From patchwork Thu Nov 29 17:12:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152419 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2634169ljp; Thu, 29 Nov 2018 09:13:03 -0800 (PST) X-Google-Smtp-Source: AFSGD/VUPhfcY15w9B6NEigY+jz2GirVSQoEATjls69vFezQvwynu/ycSI0H1aOQ/F6cykgbG//c X-Received: by 2002:a63:7556:: with SMTP id f22mr1751847pgn.231.1543511583634; Thu, 29 Nov 2018 09:13:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543511583; cv=none; d=google.com; s=arc-20160816; b=EFwa8aN7/AxzbCImjlmvARipWEWiSBa0Ktbn6xFFYQOFGbPgFU+O8pWnRodisJJeAg FSlpB4qU1sVApu8lVN3v6HMj1iSTDEGs5rD8zithKHuncd5CqMxB/+N1lG2CCoT4EqWx vEVH9TbA1RuPantCOV0asitZ/XVsRIBXiXAGO3P20wz0WfO0iTn0sVBT4EYaX3szmPg3 rXz02RmIei8W/SUj2D4gC4rl3gMibjVcDhLC4vei0a6ZjPH2lmMnR/RHSsKJR7EGblor Ka0tO6BTDSNfKwhdg99q5+pDuHj0d1w+oQPSwJuw18+UjXm2G6+ME99S9WLKSkeMegid hzIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5aEOue59gExXs0lNGE2h5oDrnn0K20vvi0KDkgckJZA=; b=P2WiYYMUe1OPo3MDXwOSeWqdfb9H0xyokEXf++X4g6eNJaoWsf57sHLMXLPnZqL6Cj 0+tHFTPANEbaCJbxmaEo5vdgrESRXWfRks7zigFs0ZJ7d/622wx7pjg8kqyXO+mn2iqT klJSqeCM5QtXojlSbSfPrBhKNYSs60xnHioceceU+PQgrurpNiW62aQ1P1WuUWTk6g3P XfBoOGswd2SnNvk0HzemPyp7kr/4X7VCmWnXQONW1TY8B3ZOHa4i1jDOHKVqUxM4qPtJ 4kNbgIICKX772JMFg03SWB7O3O1x8G3SrIcU5M6AYQhBOns7Yo95W2sQtqLpBzy3sUBU FqHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z5OF9y+z; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r77-v6si2618065pfa.69.2018.11.29.09.13.03; Thu, 29 Nov 2018 09:13:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z5OF9y+z; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730610AbeK3ETG (ORCPT + 3 others); Thu, 29 Nov 2018 23:19:06 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34624 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730577AbeK3ETF (ORCPT ); Thu, 29 Nov 2018 23:19:05 -0500 Received: by mail-wr1-f66.google.com with SMTP id j2so2695818wrw.1 for ; Thu, 29 Nov 2018 09:13:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5aEOue59gExXs0lNGE2h5oDrnn0K20vvi0KDkgckJZA=; b=Z5OF9y+znrVtgMNqnvDMwi6nPeaNhKQ+05e60Fkg1ExcJrgK5GqtUOBCvB1T6i5VRZ KVbW0x8U861A09P6Hm6HTBsIKl6UsS4TjKLSh7sH4O6HvWO5piv+XnzRDLk+tqZUa0ZF FBw16cuUShERLQaOGTbDSSUkCGU0dvgH/b1yw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5aEOue59gExXs0lNGE2h5oDrnn0K20vvi0KDkgckJZA=; b=Gemkgm28SYKfxtAWf4sZSMRh+hs6bnlwa/dloWJRVdHGb1/dUnJRFHkKcE4Z1JD/wh A6Rw4lElXhS2b4W34Ob/fCFUQ4Yus32HXd0Ay5zTsGae4UJf25jyUUdugejI9hOz/Zac XkFt+CFfHBpb+DpOYBhxGQUN7WyPCYZYGyZ4vGlyrbCMyuySm7HKWm62QRtJVQcUG9z4 zveJGE1hjEFCYTAjumjpI7m9AThq7NroELSRefnvYZbbcR48gTg4jrUMc43DbqIn+02c bBT11z2HnCI3oUv7eMYSedOOYL3aMALVYPxANFHkCtRtyo538oZjCgw6uieuQ9/9mRe2 92pw== X-Gm-Message-State: AA+aEWYM4NssmuJV+C9Hv0W+8VAqkIhurKkXtovD5eP5x3qMH983A2wv KIELpdEAz5NTmJrk59wfLVtcaAT101Y= X-Received: by 2002:a5d:488f:: with SMTP id g15mr2137609wrq.15.1543511579436; Thu, 29 Nov 2018 09:12:59 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:f070:d240:312e:9f99]) by smtp.gmail.com with ESMTPSA id y185sm1593882wmg.34.2018.11.29.09.12.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 09:12:58 -0800 (PST) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Andy Lutomirski , Arend van Spriel , Bhupesh Sharma , Borislav Petkov , Dave Hansen , Eric Snowberg , Hans de Goede , Joe Perches , Jon Hunter , Julien Thierry , Marc Zyngier , Nathan Chancellor , Peter Zijlstra , Sai Praneeth Prakhya , Sedat Dilek , YiFei Zhu Subject: [PATCH 07/11] efi/libstub: Disable some warnings for x86{,_64} Date: Thu, 29 Nov 2018 18:12:26 +0100 Message-Id: <20181129171230.18699-8-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181129171230.18699-1-ard.biesheuvel@linaro.org> References: <20181129171230.18699-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org From: Nathan Chancellor When building the kernel with Clang, some disabled warnings appear because this Makefile overrides KBUILD_CFLAGS for x86{,_64}. Add them to this list so that the build is clean again. -Wpointer-sign was disabled for the whole kernel before the beginning of git history. -Waddress-of-packed-member was disabled for the whole kernel in commit bfb38988c51e ("kbuild: clang: Disable 'address-of-packed-member' warning") and for x86/boot/compressed in commit 20c6c1890455 ("x86/boot: Disable the address-of-packed-member compiler warning"). -Wgnu was disabled for the whole kernel in commit 61163efae020 ("kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang") and for x86/boot/compressed in commit 6c3b56b19730 ("x86/boot: Disable Clang warnings about GNU extensions"). Link: https://github.com/ClangBuiltLinux/linux/issues/112 Signed-off-by: Nathan Chancellor Reviewed-by: Sedat Dilek Tested-by: Sedat Dilek Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/libstub/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.19.1 diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index c51627660dbb..d9845099635e 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -9,7 +9,10 @@ cflags-$(CONFIG_X86_32) := -march=i386 cflags-$(CONFIG_X86_64) := -mcmodel=small cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ -O2 \ -fPIC -fno-strict-aliasing -mno-red-zone \ - -mno-mmx -mno-sse -fshort-wchar + -mno-mmx -mno-sse -fshort-wchar \ + -Wno-pointer-sign \ + $(call cc-disable-warning, address-of-packed-member) \ + $(call cc-disable-warning, gnu) # arm64 uses the full KBUILD_CFLAGS so it's necessary to explicitly # disable the stackleak plugin