Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2767416ybh; Mon, 5 Aug 2019 06:32:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzM3ryhdAfo3fmzYG5MwmotVsuGDhYAJ0SJ3hbzeLUqkWdz1MsC8aMfgiocES2uPfGCeYWV X-Received: by 2002:aa7:9217:: with SMTP id 23mr74233209pfo.239.1565011927405; Mon, 05 Aug 2019 06:32:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565011927; cv=none; d=google.com; s=arc-20160816; b=taHzHvXCF6F0xj8HgnPGIiR0r3FzXDB7wMY49z8+0NFQAtSxvs0pNhpcX01yCd1iHw AmecPsH20BhhBirdnPWKnVfb24/YiwT3rUzdsggkLDGLyhFn1XzyopV+2DPG4pIq5bb0 DWyYP1oU15qyVySeUajU5ZAtcU00qhT9SgiiM1XlJzroR7VBlEaRRwWsP39dfqqB3AEh 0xKR6QB/1HChd/+y7ctbNAmNVU2RXyCsNaHc44ZiZqww67RXV+QU6VcjBYsvkTExFd4j 7o1kqVyYpP9hj+0VJHiJ/7k72hoOLqqT+vLWvghRF3h+HAX1vWkCm4l+8AiA5pObS1JI OYZA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=brIK70ewQH2bL8reLtwPx3MoO5/fpWcRIu/jKtJTKbY=; b=FUA7G0jz5UzFRGqPId948tTPQn/Hf16+xDsfGMbE14LiNvSrjdi8Tkb8tQAFjmRjGl ukCjzE8gESMxDfx+aGmHe3U5/k9T9kmTCPGWyZL1wGmIkOzq6/8cE9qiZQcnDnVm31QC 8dWuGFHKW/3zLBhwEiVYbm0r/2rYf1ABhr+mXDZ9iD1TwIxxYE9zSqVI4oBC8JbfNDuH /e1ntBfGE2xfVSvqxLkJOxlKGiZxC5tUMTQXtDyfbmnttiNZQRkKAGsfzlaQ0VmQKN1p WUj8sWkVTSnFCTC2SVjcgliVTdNbLQV3u1VMvZuAW91nwqug1Dmas+FtLf4qr2VRGy8D WvOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qKBwO2C5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si10566450plt.155.2019.08.05.06.31.52; Mon, 05 Aug 2019 06:32:07 -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=qKBwO2C5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728933AbfHENTq (ORCPT + 99 others); Mon, 5 Aug 2019 09:19:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:55692 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728865AbfHENTh (ORCPT ); Mon, 5 Aug 2019 09:19:37 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DFF1F2147A; Mon, 5 Aug 2019 13:19:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565011176; bh=kET/XI/yGE7hnw4dQZUVxgjobkG7KvceWR0d2hddSUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qKBwO2C53RjFII28Zm3kPJUxw4eUzj+wwTzlCLxFJ8SdE15u8Gyr8uAEjZvCicmMu i0POSwb98YaGC5rFUilhSFBqaB+CeoVX+3qWJR/8aplhhXM30NvMEBzKEq301avBJD K7SZrHMksMBXnoS6zbTaBtnJIH+y4P+1FnocmB98= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linus Torvalds Subject: [PATCH 4.19 72/74] gcc-9: properly declare the {pv,hv}clock_page storage Date: Mon, 5 Aug 2019 15:03:25 +0200 Message-Id: <20190805124941.618238077@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190805124935.819068648@linuxfoundation.org> References: <20190805124935.819068648@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 commit 459e3a21535ae3c7a9a123650e54f5c882b8fcbf upstream. The pvlock_page and hvclock_page variables are (as the name implies) addresses to pages, created by the linker script. But we declared them as just "extern u8" variables, which _works_, but now that gcc does some more bounds checking, it causes warnings like warning: array subscript 1 is outside array bounds of ‘u8[1]’ when we then access more than one byte from those variables. Fix this by simply making the declaration of the variables match reality, which makes the compiler happy too. Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- arch/x86/entry/vdso/vclock_gettime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -29,12 +29,12 @@ extern int __vdso_gettimeofday(struct ti extern time_t __vdso_time(time_t *t); #ifdef CONFIG_PARAVIRT_CLOCK -extern u8 pvclock_page +extern u8 pvclock_page[PAGE_SIZE] __attribute__((visibility("hidden"))); #endif #ifdef CONFIG_HYPERV_TSCPAGE -extern u8 hvclock_page +extern u8 hvclock_page[PAGE_SIZE] __attribute__((visibility("hidden"))); #endif