Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp875239ybe; Wed, 4 Sep 2019 09:02:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPo0zcIsj56PwcQFVb3bJ6aJJrU5FescR+51Wz53Fcg9Ol5C0cvB1TOkyK+vmRW3WyhfbK X-Received: by 2002:a62:be04:: with SMTP id l4mr44334855pff.247.1567612939034; Wed, 04 Sep 2019 09:02:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567612939; cv=none; d=google.com; s=arc-20160816; b=R1nBw7/h/fXDsckpdr2Ae8yBdlsbAeX8GaHpnbxJr7ulRrFHTZMGeod2PF6WjVtI5u Q+7ux4KZYsL3+YcGrkf0o3TqxH3z5SmHhG67Tv16nDudohXThRlUnbOetGaIFQU+DHsz aTXiEGdLLkaX2NeJvR0nAbs7nHFmCFf9de2+FdO2apljFadcPexjmByyJsZSwmXiCryU GcJRf8JnWYVWCeaFgSyXenHWYLbVf9ehGep6f6Zu9GDvquOM4Ggs14ebqCfXCkN2nJjz b+JnI3odaDJQ5BPUOFQ0i5bmzFJnE13971XyjRi5oA8AHiMtuTFxhGSdG9W1V45r4uTJ E3dA== 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=CbQuWEgbKM4D/nfHP14z1vh6lSAvk92EWxaaITPZdsI=; b=zpXR+FSA1GIdBiAZhmc9goz34glV+zJ3pf2hjH/HNuODodj5oJTdG14z2QqKd9VyGh TgDq3JCNrXLV0O31/FavX7aPgUNAE7bDcO++GP6IjbqduoCUXcAZY0Qaj4CC6t9O5Ua3 YMQGvbfCOiuzsZzmPhVJrXSLyQJA5wpK0/IKHDC5+X0kckDioSOd5fVdJh7wEfNPqK0C XMhvB8uMQ3iQLRCOcwb5OCohXjZtq/G9axrNDyf+sr69YZq2jo6PEYQCmHvdoTqQTLGw RnUAsjdGWB6I1quA4GU3h2mYtTkr1oq13nwJ0bO7Ad4tIzUwoZX692mgFPGYbFz9BKNR Gz0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JbGLERe6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d7si17151863pgv.86.2019.09.04.09.02.02; Wed, 04 Sep 2019 09:02:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@kernel.org header.s=default header.b=JbGLERe6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732332AbfIDP7P (ORCPT + 99 others); Wed, 4 Sep 2019 11:59:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:33638 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732316AbfIDP7P (ORCPT ); Wed, 4 Sep 2019 11:59:15 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 746832342D; Wed, 4 Sep 2019 15:59:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567612754; bh=pusz++BkZaH5s5cwokz0PPsiEDmhyvks8HAypCrb+mA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JbGLERe6Hv9kN+WGEwtoTwerng2JZoLAIexKbqnR4jrL9Xs9vsLONXmwfsAkcncx8 7kJ3pFRZ4vo89k81bGBCYnC3nNMa24Z0H/Qgok9InSisJ/fMb3z5p/vpImfKE+b177 eJC2GPL2u3CRFDZJWO7E0MGopELnxctaak//fSb8= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Linus Torvalds , Borislav Petkov , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Sasha Levin Subject: [PATCH AUTOSEL 5.2 63/94] x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning Date: Wed, 4 Sep 2019 11:57:08 -0400 Message-Id: <20190904155739.2816-63-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190904155739.2816-1-sashal@kernel.org> References: <20190904155739.2816-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Torvalds [ Upstream commit 42e0e95474fc6076b5cd68cab8fa0340a1797a72 ] One of the very few warnings I have in the current build comes from arch/x86/boot/edd.c, where I get the following with a gcc9 build: arch/x86/boot/edd.c: In function ‘query_edd’: arch/x86/boot/edd.c:148:11: warning: taking address of packed member of ‘struct boot_params’ may result in an unaligned pointer value [-Waddress-of-packed-member] 148 | mbrptr = boot_params.edd_mbr_sig_buffer; | ^~~~~~~~~~~ This warning triggers because we throw away all the CFLAGS and then make a new set for REALMODE_CFLAGS, so the -Wno-address-of-packed-member we added in the following commit is not present: 6f303d60534c ("gcc-9: silence 'address-of-packed-member' warning") The simplest solution for now is to adjust the warning for this version of CFLAGS as well, but it would definitely make sense to examine whether REALMODE_CFLAGS could be derived from CFLAGS, so that it picks up changes in the compiler flags environment automatically. Signed-off-by: Linus Torvalds Acked-by: Borislav Petkov Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- arch/x86/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 56e748a7679f4..94df0868804bc 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -38,6 +38,7 @@ REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING \ REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding) REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -fno-stack-protector) +REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -Wno-address-of-packed-member) REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), $(cc_stack_align4)) export REALMODE_CFLAGS -- 2.20.1