* Re: [PATCH 2/2] [stable-4.9] x86: fix build warnign with 32-bit PAE
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
2018-02-21 9:41 ` Patch "x86: fix build warnign with 32-bit PAE" has been added to the 4.4-stable tree gregkh
2018-02-21 9:41 ` Patch "x86: fix build warnign with 32-bit PAE" has been added to the 4.9-stable tree gregkh
2 siblings, 1 reply; 9+ messages in thread
From: Kees Cook @ 2018-02-15 17:58 UTC (permalink / raw)
To: Arnd Bergmann
Cc: # 3.4.x, X86 ML, Dave Hansen, Ben Hutchings, Greg Kroah-Hartman,
Hugh Dickins, LKML
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...
-Kees
--
Kees Cook
Pixel Security
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH 2/2] [stable-4.9] x86: fix build warnign with 32-bit PAE
2018-02-15 17:58 ` Kees Cook
@ 2018-02-21 9:36 ` Greg Kroah-Hartman
0 siblings, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2018-02-21 9:36 UTC (permalink / raw)
To: Kees Cook
Cc: Arnd Bergmann, # 3.4.x, X86 ML, Dave Hansen, Ben Hutchings,
Hugh Dickins, LKML
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Patch "x86: fix build warnign with 32-bit PAE" has been added to the 4.4-stable tree
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:41 ` gregkh
2018-02-21 9:41 ` Patch "x86: fix build warnign with 32-bit PAE" has been added to the 4.9-stable tree gregkh
2 siblings, 0 replies; 9+ messages in thread
From: gregkh @ 2018-02-21 9:41 UTC (permalink / raw)
To: arnd, ben.hutchings, dave.hansen, gregkh, hughd, keescook
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
x86: fix build warnign with 32-bit PAE
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-fix-build-warnign-with-32-bit-pae.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From arnd@arndb.de Wed Feb 21 10:34:37 2018
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 15 Feb 2018 16:16:57 +0100
Subject: x86: fix build warnign with 32-bit PAE
To: stable@vger.kernel.org
Cc: x86@kernel.org, Dave Hansen <dave.hansen@linux.intel.com>, Ben Hutchings <ben.hutchings@codethink.co.uk>, Arnd Bergmann <arnd@arndb.de>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Hugh Dickins <hughd@google.com>, Kees Cook <keescook@chromium.org>, linux-kernel@vger.kernel.org
Message-ID: <20180215151710.1473117-2-arnd@arndb.de>
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>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/kaiser.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 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;
}
Patches currently in stable-queue which might be from arnd@arndb.de are
queue-4.4/arm-spear600-add-missing-interrupt-parent-of-rtc.patch
queue-4.4/arm-dts-sti-add-gpio-polarity-for-hdmi-hpd-gpio-property.patch
queue-4.4/arm-spear13xx-fix-spics-gpio-controller-s-warning.patch
queue-4.4/x86-fix-build-warnign-with-32-bit-pae.patch
queue-4.4/mm-hide-a-warning-for-compile_test.patch
queue-4.4/arm-spear13xx-fix-dmas-cells.patch
^ permalink raw reply [flat|nested] 9+ messages in thread* Patch "x86: fix build warnign with 32-bit PAE" has been added to the 4.9-stable tree
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:41 ` Patch "x86: fix build warnign with 32-bit PAE" has been added to the 4.4-stable tree gregkh
@ 2018-02-21 9:41 ` gregkh
2 siblings, 0 replies; 9+ messages in thread
From: gregkh @ 2018-02-21 9:41 UTC (permalink / raw)
To: arnd, ben.hutchings, dave.hansen, gregkh, hughd, keescook
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
x86: fix build warnign with 32-bit PAE
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-fix-build-warnign-with-32-bit-pae.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From arnd@arndb.de Wed Feb 21 10:34:37 2018
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 15 Feb 2018 16:16:57 +0100
Subject: x86: fix build warnign with 32-bit PAE
To: stable@vger.kernel.org
Cc: x86@kernel.org, Dave Hansen <dave.hansen@linux.intel.com>, Ben Hutchings <ben.hutchings@codethink.co.uk>, Arnd Bergmann <arnd@arndb.de>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Hugh Dickins <hughd@google.com>, Kees Cook <keescook@chromium.org>, linux-kernel@vger.kernel.org
Message-ID: <20180215151710.1473117-2-arnd@arndb.de>
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>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/kaiser.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 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;
}
Patches currently in stable-queue which might be from arnd@arndb.de are
queue-4.9/arm-spear600-add-missing-interrupt-parent-of-rtc.patch
queue-4.9/arm-dts-sti-add-gpio-polarity-for-hdmi-hpd-gpio-property.patch
queue-4.9/kselftest-fix-oom-in-memory-compaction-test.patch
queue-4.9/arm-spear13xx-fix-spics-gpio-controller-s-warning.patch
queue-4.9/x86-fix-build-warnign-with-32-bit-pae.patch
queue-4.9/mm-hide-a-warning-for-compile_test.patch
queue-4.9/arm-lpc3250-fix-uda1380-gpio-numbers.patch
queue-4.9/arm-spear13xx-fix-dmas-cells.patch
queue-4.9/arm-dts-nomadik-add-interrupt-parent-for-clcd.patch
^ permalink raw reply [flat|nested] 9+ messages in thread