Received: by 10.223.185.116 with SMTP id b49csp861688wrg; Wed, 21 Feb 2018 08:06:24 -0800 (PST) X-Google-Smtp-Source: AH8x2277H7AbcY480ugzCcbI8f2F3JIfQROGrta7wjD+yOKrprz3pt2PvF/KW8X+i2nrL/etQKZv X-Received: by 10.98.96.70 with SMTP id u67mr3844239pfb.66.1519229183969; Wed, 21 Feb 2018 08:06:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519229183; cv=none; d=google.com; s=arc-20160816; b=Hyi9S+IAoH7exMOLfCAndZzbrNnKji9oJNvGYDaanHfLWoGvy8NcbsxbSmIuoZa9Pg k1JWfuLml2EYMsmb2SFLhsqG+4OAXmUK3YZe5rpK5dSfNusCRI+07Ho2eMuLk4DkuPRg KfP2ne3U4y+Nz02sufLORdCWib10ayypON20W65lPwZjDsDiw6V/q3jhHdszhoJU8KRf yEJhgXm1hA/OSkJffNCLOQ+AUdHqkMcxvg3ONQxEnAELYz/A7kT562UDX7CdIX4Sss6Y f3USr+z6Q1C1ZCCY73tBoWBbut4PiA/jhHgZOtM599Z2k4rqnjUlGHAkeDaNwPEWwuM4 Vpsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=CpNR2Sb92kDsTV7ElLH5pYppFqLIlmCw2uGS06LeHjg=; b=Uh1ORs0fQJLVNZXk2OY7+ofc8Blrv0SSimrsYv6lt6Bd+1VoC+7pC3eMzcWug41O/F u31x2+cTYRrTW1p8Z/8qJ30iQyWcaEYo9Im9jk+80yk9o3MtZkgzaw9MpRUYQeKsCcOM 7GnxM+7EK3YoI+XgFUY7/P1D/mJRGrY2I6KSsjJIJjIw+xFnToa/Dgzs72gdJy2zamBy su8BniPWUpo+OlctoMA4vnvxgq5SZVkRILPscu24K/3axvXDfK6xVwA1GVML2BBbwbNH DXO9UKofFdyMfvJ1kGOk7SWGz4wmkrRGn/DK7RM7YGlTo78a5QLYgORPU3yUoQ43K7PK j1XA== ARC-Authentication-Results: i=1; mx.google.com; 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 x10si137659pfd.188.2018.02.21.08.06.07; Wed, 21 Feb 2018 08:06:23 -0800 (PST) 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; 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 S932524AbeBUJgf (ORCPT + 99 others); Wed, 21 Feb 2018 04:36:35 -0500 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 Received: from localhost (unknown [37.173.128.199]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 49AA0E05; Wed, 21 Feb 2018 09:36:31 +0000 (UTC) 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: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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