mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Kees Cook <keescook@chromium.org>
Cc: Arnd Bergmann <arnd@arndb.de>, "# 3.4.x" <stable@vger.kernel.org>,
	X86 ML <x86@kernel.org>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Ben Hutchings <ben.hutchings@codethink.co.uk>,
	Hugh Dickins <hughd@google.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] [stable-4.9] x86: fix build warnign with 32-bit PAE
Date: Wed, 21 Feb 2018 10:36:32 +0100	[thread overview]
Message-ID: <20180221093632.GE16575@kroah.com> (raw)
In-Reply-To: <CAGXu5jKH1N3nqmRLnRiieGS-YpXj+dptDAB65ZgBWx+Ey3mCdQ@mail.gmail.com>

On Thu, Feb 15, 2018 at 09:58:00AM -0800, Kees Cook wrote:
> On Thu, Feb 15, 2018 at 7:16 AM, Arnd Bergmann <arnd@arndb.de> 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 <arnd@arndb.de>
> > ---
> >  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 <keescook@chromium.org>
> 
> I assume this is needed for 4.4 as well...

Yes, I've added it there too.

greg k-h

  reply	other threads:[~2018-02-21  9:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 15:16 [PATCH 1/2] [stable-4.9] x86: fix build without CONFIG_X86_VSYSCALL_EMULATION Arnd Bergmann
2018-02-15 15:16 ` [PATCH 2/2] [stable-4.9] x86: fix build warnign with 32-bit PAE Arnd Bergmann
2018-02-15 17:58   ` Kees Cook
2018-02-21  9:36     ` Greg Kroah-Hartman [this message]
2018-02-15 16:49 ` [PATCH 1/2] [stable-4.9] x86: fix build without CONFIG_X86_VSYSCALL_EMULATION Greg Kroah-Hartman
2018-02-15 19:18   ` Hugh Dickins
2018-02-21  9:36     ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180221093632.GE16575@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=ben.hutchings@codethink.co.uk \
    --cc=dave.hansen@linux.intel.com \
    --cc=hughd@google.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome