Received: by 10.223.185.116 with SMTP id b49csp612775wrg; Fri, 16 Feb 2018 04:29:47 -0800 (PST) X-Google-Smtp-Source: AH8x227ega2jdEBpHQKBV567nYJHXlCcDMyB36XvWoHeamHokjFg/guPZ2j6R1V8JYqHozVifOGO X-Received: by 10.99.124.2 with SMTP id x2mr5122004pgc.184.1518784187456; Fri, 16 Feb 2018 04:29:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518784187; cv=none; d=google.com; s=arc-20160816; b=BA+2NJ82Ori+rdNSUSm1CqzZ+v161WL1tsFdvxNpGC6M5z+ml3XzUvhbbeTMEjTbks Zalqk3aw0UZO5cEiukol6AUnrjC1q3SSYKSaWjF/39/BEuBTFpYnnWBDftSiQwFFNXbx ERM71SV8PnAuBFeq2pjr/5OLRnd5PfnbBhj8sRCJ/xWfu5fVtMhgQcQlXZ/7ZIcE9ZRu QTLH9Wd86+G/UVmL4fhsBFKT2P5Cdi4WCSa5/VY2rYcDoZ5zX+W0DZdxRi3aSJbcwfWr vQihv67u0ElTS6rt/xGhrx2aR+FvQ54aDSI0d+9EpWcxL7TqkDvfqULAqrW5UUoaMmZK Y31g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=z5x3I1D3cw0RfrL1OOWZ3zA6k4gsjiGWdPsWxhvt3+c=; b=ep72dcLT3965X7oGsFU9Z3hVWL95UyWH5M3h9cs15Kxblzp3AQdhbS6hkvNRuHYYxw J+unDnWxaes8UCsfsv9SRdc0aovCmAOhSUzQP/LBGCXO12bz1BPd674l/EMqPa22wsfG 3rbNTxXWEACsZdQM4/+v6YkbnBgBtcXLzurPGFBa0xJjIe5SQF8iqwKxyIA2OJRcnAjN /FkMULBwHtkWjdkxh/0OWFPaa8O7QPuMrnuPvs6wOUr21WHI7z6WeBCpeLZReIw8gC8x BNkElzo5OoJPDHzIdDdpgOzTGh1NwdHnvDZrnp1m8Xc6ulqFI8XNNGZufL9iKzcKxIHo ZnwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=vNOOTUXV; dkim=fail header.i=@chromium.org header.s=google header.b=kLYNGJ+j; 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=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9-v6si1462607pls.560.2018.02.16.04.29.32; Fri, 16 Feb 2018 04:29:47 -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; dkim=fail header.i=@google.com header.s=20161025 header.b=vNOOTUXV; dkim=fail header.i=@chromium.org header.s=google header.b=kLYNGJ+j; 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=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1165995AbeBOR6F (ORCPT + 99 others); Thu, 15 Feb 2018 12:58:05 -0500 Received: from mail-vk0-f65.google.com ([209.85.213.65]:44220 "EHLO mail-vk0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1034080AbeBOR6C (ORCPT ); Thu, 15 Feb 2018 12:58:02 -0500 Received: by mail-vk0-f65.google.com with SMTP id t126so328934vkb.11 for ; Thu, 15 Feb 2018 09:58:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=z5x3I1D3cw0RfrL1OOWZ3zA6k4gsjiGWdPsWxhvt3+c=; b=vNOOTUXVcY3YenYvfBBheByXYuhxHIfaNzHaZienCZLbRnH3sMmsZds4Ln+ldrx9S7 oBU3ygwERCIUx3kJPiEEvGrHaVzGLBw6Do6UTsNKjItk3TMdcwT66q5AAMHidHPt1Yok h9UmTvqv5p0LPvXHVUvt5M0uJumjv8JBdekVQbMIN5rzPQtMMlxB3xChHZoSKokiY8jl sDrbKDMWoK23eM8D7FlxjHBLQeiwtrQnM04HFaSc8xuZ6CarF7XaL9bUAoGiSLFzQ0xc zdU7NiGKidGNZLJO8rDHn8LkiGJ0y232yEo5OURCBsEJNQnofWUB0vpxxP+SaGvmAqq1 12Vw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=z5x3I1D3cw0RfrL1OOWZ3zA6k4gsjiGWdPsWxhvt3+c=; b=kLYNGJ+jmdgUxMJT2WMu303uI+ejVOCkLH4Vr8y1XHnob3Xtbvd7NM3fzk5aYMmCfY Bd3tt9kZpR5QKaJntj4EDoG7+FxNVbtw10IkZPq1nyqzZ71L10nxQcBHbDWbXAcA70o4 PKkqmuXyHEvvuNTfvhlb8M40NnZ4/XfEsry8g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=z5x3I1D3cw0RfrL1OOWZ3zA6k4gsjiGWdPsWxhvt3+c=; b=hwloqgn8lF/Ov2iI03ksnvpjkrWEC3iHsmW5oa0j9eg1PfScUEkGD2ZJ6/Ugvd6HPL 7hsnkZXNriLvZJRDhSGdgy+utIHxxUzbE3DV1MT53bll/MuJJo4k1RsvvPJa/AVfWGWi gKSq/fJx+0H7dMUtHjz6foL2WOpr9UPSDFlqp9dxa1egh0uV6P1aD03Sz/bOpf8U4qaO H5B79mOHTmgMk3iUgGO5C5Uh1ZLgrMi4L8yANETBCK6CR9JSBuZXaxJutdMQ5I5VczyW SQQ0ageI+aVXfiF3B3CZ502RnZUPK+dE0fdOzA2fOmO0TzaYBACXr6YRV7mSfw2OZp1H MDnQ== X-Gm-Message-State: APf1xPDp69uPr8tjfl9CQu9AqEYOY531zC0TcnfPdCtKGJp4x+mxk75q pz8lXt0MzamUpq635HwcXiH2cfeudeG/7R71TT2Xuw== X-Received: by 10.31.168.20 with SMTP id r20mr2667964vke.149.1518717481027; Thu, 15 Feb 2018 09:58:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.56.87 with HTTP; Thu, 15 Feb 2018 09:58:00 -0800 (PST) In-Reply-To: <20180215151710.1473117-2-arnd@arndb.de> References: <20180215151710.1473117-1-arnd@arndb.de> <20180215151710.1473117-2-arnd@arndb.de> From: Kees Cook Date: Thu, 15 Feb 2018 09:58:00 -0800 X-Google-Sender-Auth: xYqn-MN6OH54z0IdHwLd-G5lWHM Message-ID: Subject: Re: [PATCH 2/2] [stable-4.9] x86: fix build warnign with 32-bit PAE To: Arnd Bergmann Cc: "# 3.4.x" , X86 ML , Dave Hansen , Ben Hutchings , Greg Kroah-Hartman , Hugh Dickins , LKML Content-Type: text/plain; charset="UTF-8" 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 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... -Kees -- Kees Cook Pixel Security