From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:50656 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753123AbeBUJgd (ORCPT ); Wed, 21 Feb 2018 04:36:33 -0500 Date: Wed, 21 Feb 2018 10:36:32 +0100 From: Greg Kroah-Hartman To: Kees Cook Cc: Arnd Bergmann , "# 3.4.x" , X86 ML , Dave Hansen , Ben Hutchings , Hugh Dickins , LKML Subject: Re: [PATCH 2/2] [stable-4.9] x86: fix build warnign with 32-bit PAE Message-ID: <20180221093632.GE16575@kroah.com> References: <20180215151710.1473117-1-arnd@arndb.de> <20180215151710.1473117-2-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: stable-owner@vger.kernel.org List-ID: On Thu, Feb 15, 2018 at 09:58:00AM -0800, Kees Cook wrote: > On Thu, Feb 15, 2018 at 7:16 AM, Arnd Bergmann wrote: > > 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(-) > > > > 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; > > } > > -- > > 2.9.0 > > > > Acked-by: Kees Cook > > I assume this is needed for 4.4 as well... Yes, I've added it there too. greg k-h