From patchwork Thu Feb 15 15:16:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128481 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1860067ljc; Thu, 15 Feb 2018 07:17:55 -0800 (PST) X-Google-Smtp-Source: AH8x2243jhMuKl8eQkFCwpsHG16/8nJ+qqqW1rOQnEJqq348irPjy/ZpgqTLA7tWniSIyopETgr5 X-Received: by 10.101.101.19 with SMTP id x19mr2503296pgv.347.1518707875499; Thu, 15 Feb 2018 07:17:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518707875; cv=none; d=google.com; s=arc-20160816; b=LA9enGcvrSn83C1wLqQXnyqeX6g1oRe91Pp/X999j7xIah3IezFhUPNSFdeg+LQPBR 6UXnfZgCfxjUTC8XApg045Fitrvf+LuL21p1ddwtDU7YO/jbSHnm2DzDj0xMqE/+1B4s 0+7Eg9XisP6iAExk67sBVWAzGQhzAV/PdSf446hmlyXVACbWRBlhx6sPDUflOgEEpM3d ISDSFIClZyNWVpgW2OF19KP7+j9sUrmNdBQH125+H78cayDMiqkUgPyeebghpHIsZzlC xYYUNzlUWRCs5hLr4fThH7UrYibWn/Gm43juN2qGoSwY5fArYouRvg5hq1TD+LscEKA/ vOcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=+t8H48aTCJ/7PuBQovkPR8uZcmaa7TdWloCY0e9G6iM=; b=sAl7w2ydSNkGFAyGDHJC+5tMj4YbmgQJhH9ZeFiZRAWnTtAlwqBSOKDlKzJu/4tgRE xCGP7FuQ96WflQKOcd1Gi6yomnj7Ur94b1bNxcaI1MXq+b0RHyU4SfXo2J27jpMEkOBh /LBzQzcZZNU7ku0gPTqA/F0TDA2RJEihrwWoJG+PerzF/MFljMH8pCaLmb24lUhGobcl ri4AFFWPzQHnD0DbId/I5737g6B5UfV3dmUyAqJ59Qz/yk2ZqZF6ZWGTwSjUw56utTGS dchn6U5q4fSq3fZuv1fe5HerTPhJnmoA3159XQQL/QTgwMsMkPCuGQuHljAzRqMb4ntq DfGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 3-v6si1335354plt.307.2018.02.15.07.17.55; Thu, 15 Feb 2018 07:17:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033676AbeBOPRy (ORCPT + 10 others); Thu, 15 Feb 2018 10:17:54 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:46733 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033088AbeBOPRx (ORCPT ); Thu, 15 Feb 2018 10:17:53 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MWjbX-1fJg6E2fBz-00Xsoa; Thu, 15 Feb 2018 16:17:13 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: x86@kernel.org, Dave Hansen , Ben Hutchings , Arnd Bergmann , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Greg Kroah-Hartman , Borislav Petkov , Hugh Dickins , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] [stable-4.9] x86: fix build without CONFIG_X86_VSYSCALL_EMULATION Date: Thu, 15 Feb 2018 16:16:56 +0100 Message-Id: <20180215151710.1473117-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:h8PYdX4vUhO5lA7sMXfex+JEYEq0gSc10qodm/Mf7r6DGa1bHXb VUZ7e351d8i011IuLVRgHqws5usV2Sp9NAzX1J5O/LO81qq6hJy4DIrp/uaH6T/OBfjxoEW IGubTV7BYptUXHtfh0VNNc8DDQiYSz8OWVchGz0ldyp7lVAQqF8lcCNuNj20edF8xdyc12R gHG+g2QP6lA6/dpfBiibg== X-UI-Out-Filterresults: notjunk:1; V01:K0:uvigUY2wKMc=:hOgF03DJuu5bIkiN3BiIfT yPF8du2oHtj1pHGK9cWULJic/vWvqiV552BBNuNv139XQuwBVyXF2j3Y0ezmd2HAoqOlHH9L4 JbCAbP8v72/Dn8HyQw8NYhr8J1JRITP6Q9BwKWju1xxjiOkwfugdnColzWMyxu1rqVKNumn/C V4R4/ufrgJhloAfpcTOj0SG3JVJtsR7cCFfzQMWebpDLRT0G6siY0XJvS2mWgcpP/co0J21L8 yag6bKhMAfRm/Q7ieFZuGo5zRMmUsx6GerPg1NFqXdvZqLUT2KLJv29WIYgZ4RUcfybbNKT2D adnon343XWZ3+MWFoxoKnVxcgg8KmAhlhr0o6GMPycivzd5sfgvJpzytN120k+s4hYx1KMUzM lsmx+94W5u+m5j+cVHe2tx2wVf8lLZMjcCa5cax9JTQJxm5CN3OzTndOgK0ubhBCTdIT9QgKw oFlIiXy8E1EntRkO/VfCI3m+U730aOzDKPPCYuuJ0k1hj6+s1MtKWNgMaStoZk4kaom3LopAx lU2WUBrNo8xgxB7OX8pgv0dsY7EOoBWNzKvDjW0aNX6pgFWOCMUajvXR0hJKFfcjCxLRvzKRB YKX16Vf/pOL3B9MbrAxrBFEgXW7074hUZsCrxqKo7QW6imun3wwuA9Wa3np24QmtDtq4i+c3I o7W+wFUOqCmd3puQWMw4MrPnTRKq19D734F4yjtrkmWT7/1nwFwZYHAO3c42tUppbj+6IAI/g Z2VoxiTPUuunVGDDuy0S8+YN5DB8EgjvuSuGbw== Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org I ran into a 4.9 build regression in randconfig testing, starting with the KAISER patches: arch/x86/mm/kaiser.c: In function 'kaiser_init': arch/x86/mm/kaiser.c:347:8: error: 'vsyscall_pgprot' undeclared (first use in this function); did you mean 'massage_pgprot'? This is easy enough to fix, we just need to make the declaration visible outside of the #ifdef. This works because the code using it is optimized away when vsyscall_enabled() returns false at compile time. Fixes: 9a0be5afbfbb ("vsyscall: Fix permissions for emulate mode with KAISER/PTI") Signed-off-by: Arnd Bergmann --- arch/x86/include/asm/vsyscall.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.9.0 diff --git a/arch/x86/include/asm/vsyscall.h b/arch/x86/include/asm/vsyscall.h index 9ee85066f407..c98c21b7f4cd 100644 --- a/arch/x86/include/asm/vsyscall.h +++ b/arch/x86/include/asm/vsyscall.h @@ -13,7 +13,6 @@ extern void map_vsyscall(void); */ extern bool emulate_vsyscall(struct pt_regs *regs, unsigned long address); extern bool vsyscall_enabled(void); -extern unsigned long vsyscall_pgprot; #else static inline void map_vsyscall(void) {} static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address) @@ -23,4 +22,6 @@ static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address) static inline bool vsyscall_enabled(void) { return false; } #endif +extern unsigned long vsyscall_pgprot; + #endif /* _ASM_X86_VSYSCALL_H */ From patchwork Thu Feb 15 15:16:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128480 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1859666ljc; Thu, 15 Feb 2018 07:17:31 -0800 (PST) X-Google-Smtp-Source: AH8x2268o9O/6orXh27q7AR78Aeji/vhE/t9alEshg1IJ6GI4bMjuMblCU5tbUNqW/NthDcE0bHo X-Received: by 2002:a17:902:6544:: with SMTP id d4-v6mr2788774pln.117.1518707851669; Thu, 15 Feb 2018 07:17:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518707851; cv=none; d=google.com; s=arc-20160816; b=tR7BYPn4pna3rxSG0Wl6kokvSxbVZVe45WVMyNAaFX/9jK20bPxAIglwi8PfkYj8JY wk+IM0lmQMBY6xiIhrhaTBnoZfrNvyRiG78btO7cNd0+9GI69hY0GUooBEveLIifr9UC hVFIXElCFEZqacqy54D5+KrCydwbPqwcDd1TPhZZBGM1b1oCdtmp5e/DQcH9GJhjEXZQ lUdZ2HMpl85gJ7m/fsnSJM1rRBrRTuAp+HtVXuK+zatIXCyf9HPtsb/Az06J0Z58q8G3 B1F6A8DpsQ5HxmQL6AS2C7JgbmMurNfK86+d0gXHk1gHfLf93lSlOFAENjr+UfjkduN/ uJsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=6fZQWwXNgoKldEK81nRIh9exMF0Gby73+ZdE/s0PjM0=; b=c69ILCCXJLMb6aIP9tYrKqeBQ8ttesF3Kr1bes+iOfcXIHv6Ad3Wmy1QFd4wCsQ/S6 VlV9p3xw2lV+G947ySgNaEZDJIEQLABXCtjVMrPzueur53kN0HKoSFbcCmhUjOwRt6iI J2+yXR2Taeh/fNT1LWwiajwpDCe95kOUDE2E5AfavurAAnLbBSzVoNXcFz4p2KIT/F8L J4LcVwrSUnp4vu3+jIDyfmiWxM3iTGzDc8aU4AjRLX+FIpZy/EtcpNeDFY4gn5/WRdX/ HuiMLltShq0Z5mZxbACobvc1dzX9hvioZpbT5I7OXa+43slUYbFO1UwA5VrOBcw30OIP A0Zw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 o1-v6si5446046plb.280.2018.02.15.07.17.31; Thu, 15 Feb 2018 07:17:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033584AbeBOPRa (ORCPT + 10 others); Thu, 15 Feb 2018 10:17:30 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:39797 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033088AbeBOPR3 (ORCPT ); Thu, 15 Feb 2018 10:17:29 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0LdmXT-1eM39v1sBf-00j40W; Thu, 15 Feb 2018 16:17:20 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: x86@kernel.org, Dave Hansen , Ben Hutchings , Arnd Bergmann , Greg Kroah-Hartman , Hugh Dickins , Kees Cook , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] [stable-4.9] x86: fix build warnign with 32-bit PAE Date: Thu, 15 Feb 2018 16:16:57 +0100 Message-Id: <20180215151710.1473117-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180215151710.1473117-1-arnd@arndb.de> References: <20180215151710.1473117-1-arnd@arndb.de> X-Provags-ID: V03:K0:ZNEkpV+/34a5mlinGmWrfrlUi1bGOknfRjdA77UbQDa2uH/i4Ut YVnSnSvm1zVSZmd+q1Oki0n5u6trO1LhVxJcX2QxSEM2TRvDtzplT5iSoBB7ZMY1l7q265Q JyQ8oAg943pkonpdXoEaNm2itwd5urm042Cu+ofd8oQAQc9++0SUMWp7f1/0lp5ZqvcO9Gy eewWVWJUuSQ4cPuIVm6Xw== X-UI-Out-Filterresults: notjunk:1; V01:K0:rrq9rkZDoqw=:BPNt7asxlwirS73qWWlyug nUPxa1m9ApVs4VDMe45tljT9SwWQclGYHhPwXyUWy0F5iQKCk71pExzcuml2qXb2sG+9oPF6d RsoMBAM+Fwc7YGJ0GEWUh6h/0ArPmfOl+Yvv0WI9gzIJ0VSlY1cdqSpKjeEazmA19kDO5I1qZ Bt9HNydGFYU+reugr8xwtQtSETf6hpPUPhQYpvIq+4u7uO5VT25rS1HDEEcAtuyCeVq7U+Hfs d7O9gXFFigdSBjbiz8fEuwAlSKAinFerrCQVm2uWRlmychdzR5zc+zjDdCPwixchCsIqUmi/E JVHfxHb/D9locM1XJ4K5jc7vohmhlfGhITO5fQCs6N0mwYa4W9UybuCrbzs4M0+zWUcxRlGpd 5G8ESyVQw7SVDMUp0uGWJa79n2hrjkAFhFQsxh6mv7hT6ZCKTQcmp9XxXDyDEF3S9j9NE3+SV kWu+ZyFBPny4c7geh8lOHyKvYF34SQQ8B7qK63J4zg/SQIIC+3y+4/be4lC780yCMYXROOVRQ 9uAPYCS7ewghwf8tbKvNbwhkfE8C1JdFknmwCrW0CO9eNelXVuapp/FgBl55dD56q6368O3mZ tQE9LXqFAVAkOoOgSMoz07BJMklJpMLJoPodpJgNFZJI3GT8P0lUyHcVHZRMxPmNWiF2UzAmL 1RSOD5cwcvi7VRg600Dpdp0IqxuHyryCG9WielweezgVW9O+IpEHQriruO7lDcu8ANDd9fDvd MRysy63bmgTkwcd1+YbP9XxZo5ICUfDyogrxSw== Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org I ran into a 4.9 build warning in randconfig testing, starting with the KAISER patches: arch/x86/kernel/ldt.c: In function 'alloc_ldt_struct': arch/x86/include/asm/pgtable_types.h:208:24: error: large integer implicitly truncated to unsigned type [-Werror=overflow] #define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX) ^ arch/x86/kernel/ldt.c:81:6: note: in expansion of macro '__PAGE_KERNEL' __PAGE_KERNEL); ^~~~~~~~~~~~~ I originally ran into this last year when the patches were part of linux-next, and tried to work around it by using the proper 'pteval_t' types consistently, but that caused additional problems. This takes a much simpler approach, and makes the argument type of the dummy helper always 64-bit, which is wide enough for any page table layout and won't hurt since this call is just an empty stub anyway. Fixes: 8f0baadf2bea ("kaiser: merged update") Signed-off-by: Arnd Bergmann --- include/linux/kaiser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/include/linux/kaiser.h b/include/linux/kaiser.h index 58c55b1589d0..b56c19010480 100644 --- a/include/linux/kaiser.h +++ b/include/linux/kaiser.h @@ -32,7 +32,7 @@ static inline void kaiser_init(void) { } static inline int kaiser_add_mapping(unsigned long addr, - unsigned long size, unsigned long flags) + unsigned long size, u64 flags) { return 0; }