linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] efi/libstub: Disable some warnings for x86{,_64}
@ 2018-10-13  1:03 Nathan Chancellor
  2018-10-15 19:40 ` Nick Desaulniers
  2018-10-23 17:53 ` Nathan Chancellor
  0 siblings, 2 replies; 10+ messages in thread
From: Nathan Chancellor @ 2018-10-13  1:03 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: linux-efi, linux-kernel, Nick Desaulniers, Nathan Chancellor

When building the kernel with Clang, some disabled warnings appear
because this Makefile overrides KBUILD_CFLAGS for x86{,_64}. Add them to
this list so that the build is clean again.

-Wpointer-sign was disabled for the whole kernel before the beginning
of git history.

-Waddress-of-packed-member was disabled for the whole kernel in
commit bfb38988c51e ("kbuild: clang: Disable 'address-of-packed-member'
warning") and for x86/boot/compressed in commit 20c6c1890455 ("x86/boot:
Disable the address-of-packed-member compiler warning").

-Wgnu was disabled for the whole kernel in commit 61163efae020 ("kbuild:
LLVMLinux: Add Kbuild support for building kernel with Clang") and for
x86/boot/compressed in commit 6c3b56b19730 ("x86/boot: Disable Clang
warnings about GNU extensions").

Link: https://github.com/ClangBuiltLinux/linux/issues/112
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---

Nick expressed concern that this Makefile is overwriting KBUILD_CFLAGS
and suggested potentially rewriting the x86 portion of this Makefile to
behave like the arm/arm64 one where problematic flags are filtered out.
While that comes to fruition, it would be nice for this folder to behave
like the rest of the kernel when it comes to this warnings so that the
build is cleaner, thus this patch.

 drivers/firmware/efi/libstub/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
index c51627660dbb..d9845099635e 100644
--- a/drivers/firmware/efi/libstub/Makefile
+++ b/drivers/firmware/efi/libstub/Makefile
@@ -9,7 +9,10 @@ cflags-$(CONFIG_X86_32)		:= -march=i386
 cflags-$(CONFIG_X86_64)		:= -mcmodel=small
 cflags-$(CONFIG_X86)		+= -m$(BITS) -D__KERNEL__ -O2 \
 				   -fPIC -fno-strict-aliasing -mno-red-zone \
-				   -mno-mmx -mno-sse -fshort-wchar
+				   -mno-mmx -mno-sse -fshort-wchar \
+				   -Wno-pointer-sign \
+				   $(call cc-disable-warning, address-of-packed-member) \
+				   $(call cc-disable-warning, gnu)
 
 # arm64 uses the full KBUILD_CFLAGS so it's necessary to explicitly
 # disable the stackleak plugin
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] efi/libstub: Disable some warnings for x86{,_64}
  2018-10-13  1:03 [PATCH] efi/libstub: Disable some warnings for x86{,_64} Nathan Chancellor
@ 2018-10-15 19:40 ` Nick Desaulniers
  2018-10-15 19:46   ` Nathan Chancellor
  2018-10-23 17:53 ` Nathan Chancellor
  1 sibling, 1 reply; 10+ messages in thread
From: Nick Desaulniers @ 2018-10-15 19:40 UTC (permalink / raw)
  To: Nathan Chancellor; +Cc: Ard Biesheuvel, linux-efi, LKML

On Fri, Oct 12, 2018 at 6:06 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> When building the kernel with Clang, some disabled warnings appear
> because this Makefile overrides KBUILD_CFLAGS for x86{,_64}. Add them to
> this list so that the build is clean again.
>
> -Wpointer-sign was disabled for the whole kernel before the beginning
> of git history.
>
> -Waddress-of-packed-member was disabled for the whole kernel in
> commit bfb38988c51e ("kbuild: clang: Disable 'address-of-packed-member'
> warning") and for x86/boot/compressed in commit 20c6c1890455 ("x86/boot:
> Disable the address-of-packed-member compiler warning").
>
> -Wgnu was disabled for the whole kernel in commit 61163efae020 ("kbuild:
> LLVMLinux: Add Kbuild support for building kernel with Clang") and for
> x86/boot/compressed in commit 6c3b56b19730 ("x86/boot: Disable Clang
> warnings about GNU extensions").
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/112
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>
> Nick expressed concern that this Makefile is overwriting KBUILD_CFLAGS
> and suggested potentially rewriting the x86 portion of this Makefile to
> behave like the arm/arm64 one where problematic flags are filtered out.
> While that comes to fruition, it would be nice for this folder to behave
> like the rest of the kernel when it comes to this warnings so that the
> build is cleaner, thus this patch.
>
>  drivers/firmware/efi/libstub/Makefile | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
> index c51627660dbb..d9845099635e 100644
> --- a/drivers/firmware/efi/libstub/Makefile
> +++ b/drivers/firmware/efi/libstub/Makefile
> @@ -9,7 +9,10 @@ cflags-$(CONFIG_X86_32)                := -march=i386
>  cflags-$(CONFIG_X86_64)                := -mcmodel=small
>  cflags-$(CONFIG_X86)           += -m$(BITS) -D__KERNEL__ -O2 \
>                                    -fPIC -fno-strict-aliasing -mno-red-zone \
> -                                  -mno-mmx -mno-sse -fshort-wchar
> +                                  -mno-mmx -mno-sse -fshort-wchar \
> +                                  -Wno-pointer-sign \

Hi Nathan, thanks for this patch.

Should this be:
$(call cc-disable-warning, pointer-sign)
as well?

> +                                  $(call cc-disable-warning, address-of-packed-member) \
> +                                  $(call cc-disable-warning, gnu)
>
>  # arm64 uses the full KBUILD_CFLAGS so it's necessary to explicitly
>  # disable the stackleak plugin
> --
> 2.19.1
>


-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] efi/libstub: Disable some warnings for x86{,_64}
  2018-10-15 19:40 ` Nick Desaulniers
@ 2018-10-15 19:46   ` Nathan Chancellor
  2018-10-15 20:16     ` Nick Desaulniers
  0 siblings, 1 reply; 10+ messages in thread
From: Nathan Chancellor @ 2018-10-15 19:46 UTC (permalink / raw)
  To: Nick Desaulniers; +Cc: Ard Biesheuvel, linux-efi, LKML

On Mon, Oct 15, 2018 at 12:40:36PM -0700, Nick Desaulniers wrote:
> On Fri, Oct 12, 2018 at 6:06 PM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
> >
> > When building the kernel with Clang, some disabled warnings appear
> > because this Makefile overrides KBUILD_CFLAGS for x86{,_64}. Add them to
> > this list so that the build is clean again.
> >
> > -Wpointer-sign was disabled for the whole kernel before the beginning
> > of git history.
> >
> > -Waddress-of-packed-member was disabled for the whole kernel in
> > commit bfb38988c51e ("kbuild: clang: Disable 'address-of-packed-member'
> > warning") and for x86/boot/compressed in commit 20c6c1890455 ("x86/boot:
> > Disable the address-of-packed-member compiler warning").
> >
> > -Wgnu was disabled for the whole kernel in commit 61163efae020 ("kbuild:
> > LLVMLinux: Add Kbuild support for building kernel with Clang") and for
> > x86/boot/compressed in commit 6c3b56b19730 ("x86/boot: Disable Clang
> > warnings about GNU extensions").
> >
> > Link: https://github.com/ClangBuiltLinux/linux/issues/112
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > ---
> >
> > Nick expressed concern that this Makefile is overwriting KBUILD_CFLAGS
> > and suggested potentially rewriting the x86 portion of this Makefile to
> > behave like the arm/arm64 one where problematic flags are filtered out.
> > While that comes to fruition, it would be nice for this folder to behave
> > like the rest of the kernel when it comes to this warnings so that the
> > build is cleaner, thus this patch.
> >
> >  drivers/firmware/efi/libstub/Makefile | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
> > index c51627660dbb..d9845099635e 100644
> > --- a/drivers/firmware/efi/libstub/Makefile
> > +++ b/drivers/firmware/efi/libstub/Makefile
> > @@ -9,7 +9,10 @@ cflags-$(CONFIG_X86_32)                := -march=i386
> >  cflags-$(CONFIG_X86_64)                := -mcmodel=small
> >  cflags-$(CONFIG_X86)           += -m$(BITS) -D__KERNEL__ -O2 \
> >                                    -fPIC -fno-strict-aliasing -mno-red-zone \
> > -                                  -mno-mmx -mno-sse -fshort-wchar
> > +                                  -mno-mmx -mno-sse -fshort-wchar \
> > +                                  -Wno-pointer-sign \
> 
> Hi Nathan, thanks for this patch.
> 
> Should this be:
> $(call cc-disable-warning, pointer-sign)
> as well?
> 

According to commit 1d6bf3a9a546 ("kbuild: add -Wno-pointer-sign flag
unconditionally") in -next, all supported compilers recognize the flag
so I don't think it's necessary.

> > +                                  $(call cc-disable-warning, address-of-packed-member) \
> > +                                  $(call cc-disable-warning, gnu)
> >
> >  # arm64 uses the full KBUILD_CFLAGS so it's necessary to explicitly
> >  # disable the stackleak plugin
> > --
> > 2.19.1
> >
> 
> 
> -- 
> Thanks,
> ~Nick Desaulniers

Thanks for the review!
Nathan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] efi/libstub: Disable some warnings for x86{,_64}
  2018-10-15 19:46   ` Nathan Chancellor
@ 2018-10-15 20:16     ` Nick Desaulniers
  0 siblings, 0 replies; 10+ messages in thread
From: Nick Desaulniers @ 2018-10-15 20:16 UTC (permalink / raw)
  To: Nathan Chancellor; +Cc: Ard Biesheuvel, linux-efi, LKML

On Mon, Oct 15, 2018 at 12:46 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> On Mon, Oct 15, 2018 at 12:40:36PM -0700, Nick Desaulniers wrote:
> > On Fri, Oct 12, 2018 at 6:06 PM Nathan Chancellor
> > <natechancellor@gmail.com> wrote:
> > >
> > > When building the kernel with Clang, some disabled warnings appear
> > > because this Makefile overrides KBUILD_CFLAGS for x86{,_64}. Add them to
> > > this list so that the build is clean again.
> > >
> > > -Wpointer-sign was disabled for the whole kernel before the beginning
> > > of git history.
> > >
> > > -Waddress-of-packed-member was disabled for the whole kernel in
> > > commit bfb38988c51e ("kbuild: clang: Disable 'address-of-packed-member'
> > > warning") and for x86/boot/compressed in commit 20c6c1890455 ("x86/boot:
> > > Disable the address-of-packed-member compiler warning").
> > >
> > > -Wgnu was disabled for the whole kernel in commit 61163efae020 ("kbuild:
> > > LLVMLinux: Add Kbuild support for building kernel with Clang") and for
> > > x86/boot/compressed in commit 6c3b56b19730 ("x86/boot: Disable Clang
> > > warnings about GNU extensions").
> > >
> > > Link: https://github.com/ClangBuiltLinux/linux/issues/112
> > > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > > ---
> > >
> > > Nick expressed concern that this Makefile is overwriting KBUILD_CFLAGS
> > > and suggested potentially rewriting the x86 portion of this Makefile to
> > > behave like the arm/arm64 one where problematic flags are filtered out.
> > > While that comes to fruition, it would be nice for this folder to behave
> > > like the rest of the kernel when it comes to this warnings so that the
> > > build is cleaner, thus this patch.
> > >
> > >  drivers/firmware/efi/libstub/Makefile | 5 ++++-
> > >  1 file changed, 4 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
> > > index c51627660dbb..d9845099635e 100644
> > > --- a/drivers/firmware/efi/libstub/Makefile
> > > +++ b/drivers/firmware/efi/libstub/Makefile
> > > @@ -9,7 +9,10 @@ cflags-$(CONFIG_X86_32)                := -march=i386
> > >  cflags-$(CONFIG_X86_64)                := -mcmodel=small
> > >  cflags-$(CONFIG_X86)           += -m$(BITS) -D__KERNEL__ -O2 \
> > >                                    -fPIC -fno-strict-aliasing -mno-red-zone \
> > > -                                  -mno-mmx -mno-sse -fshort-wchar
> > > +                                  -mno-mmx -mno-sse -fshort-wchar \
> > > +                                  -Wno-pointer-sign \
> >
> > Hi Nathan, thanks for this patch.
> >
> > Should this be:
> > $(call cc-disable-warning, pointer-sign)
> > as well?
> >
>
> According to commit 1d6bf3a9a546 ("kbuild: add -Wno-pointer-sign flag
> unconditionally") in -next, all supported compilers recognize the flag
> so I don't think it's necessary.

No problem.
Tested-by: Nick Desaulniers <ndesaulniers@google.com>

>
> > > +                                  $(call cc-disable-warning, address-of-packed-member) \
> > > +                                  $(call cc-disable-warning, gnu)
> > >
> > >  # arm64 uses the full KBUILD_CFLAGS so it's necessary to explicitly
> > >  # disable the stackleak plugin
> > > --
> > > 2.19.1
> > >
> >
> >
> > --
> > Thanks,
> > ~Nick Desaulniers
>
> Thanks for the review!
> Nathan



-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] efi/libstub: Disable some warnings for x86{,_64}
  2018-10-13  1:03 [PATCH] efi/libstub: Disable some warnings for x86{,_64} Nathan Chancellor
  2018-10-15 19:40 ` Nick Desaulniers
@ 2018-10-23 17:53 ` Nathan Chancellor
  2018-10-24  7:22   ` Sedat Dilek
  1 sibling, 1 reply; 10+ messages in thread
From: Nathan Chancellor @ 2018-10-23 17:53 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: linux-efi, linux-kernel, Nick Desaulniers, Sedat Dilek

On Fri, Oct 12, 2018 at 06:03:49PM -0700, Nathan Chancellor wrote:
> When building the kernel with Clang, some disabled warnings appear
> because this Makefile overrides KBUILD_CFLAGS for x86{,_64}. Add them to
> this list so that the build is clean again.
> 
> -Wpointer-sign was disabled for the whole kernel before the beginning
> of git history.
> 
> -Waddress-of-packed-member was disabled for the whole kernel in
> commit bfb38988c51e ("kbuild: clang: Disable 'address-of-packed-member'
> warning") and for x86/boot/compressed in commit 20c6c1890455 ("x86/boot:
> Disable the address-of-packed-member compiler warning").
> 
> -Wgnu was disabled for the whole kernel in commit 61163efae020 ("kbuild:
> LLVMLinux: Add Kbuild support for building kernel with Clang") and for
> x86/boot/compressed in commit 6c3b56b19730 ("x86/boot: Disable Clang
> warnings about GNU extensions").
> 
> Link: https://github.com/ClangBuiltLinux/linux/issues/112
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
> 
> Nick expressed concern that this Makefile is overwriting KBUILD_CFLAGS
> and suggested potentially rewriting the x86 portion of this Makefile to
> behave like the arm/arm64 one where problematic flags are filtered out.
> While that comes to fruition, it would be nice for this folder to behave
> like the rest of the kernel when it comes to this warnings so that the
> build is cleaner, thus this patch.
> 
>  drivers/firmware/efi/libstub/Makefile | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
> index c51627660dbb..d9845099635e 100644
> --- a/drivers/firmware/efi/libstub/Makefile
> +++ b/drivers/firmware/efi/libstub/Makefile
> @@ -9,7 +9,10 @@ cflags-$(CONFIG_X86_32)		:= -march=i386
>  cflags-$(CONFIG_X86_64)		:= -mcmodel=small
>  cflags-$(CONFIG_X86)		+= -m$(BITS) -D__KERNEL__ -O2 \
>  				   -fPIC -fno-strict-aliasing -mno-red-zone \
> -				   -mno-mmx -mno-sse -fshort-wchar
> +				   -mno-mmx -mno-sse -fshort-wchar \
> +				   -Wno-pointer-sign \
> +				   $(call cc-disable-warning, address-of-packed-member) \
> +				   $(call cc-disable-warning, gnu)
>  
>  # arm64 uses the full KBUILD_CFLAGS so it's necessary to explicitly
>  # disable the stackleak plugin
> -- 
> 2.19.1
> 

+ Sedat for review/testing.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] efi/libstub: Disable some warnings for x86{,_64}
  2018-10-23 17:53 ` Nathan Chancellor
@ 2018-10-24  7:22   ` Sedat Dilek
  2018-11-05 12:52     ` Ard Biesheuvel
  0 siblings, 1 reply; 10+ messages in thread
From: Sedat Dilek @ 2018-10-24  7:22 UTC (permalink / raw)
  To: natechancellor; +Cc: ard.biesheuvel, linux-efi, linux-kernel, Nick Desaulniers

On Tue, Oct 23, 2018 at 7:53 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> On Fri, Oct 12, 2018 at 06:03:49PM -0700, Nathan Chancellor wrote:
> > When building the kernel with Clang, some disabled warnings appear
> > because this Makefile overrides KBUILD_CFLAGS for x86{,_64}. Add them to
> > this list so that the build is clean again.
> >
> > -Wpointer-sign was disabled for the whole kernel before the beginning
> > of git history.
> >
> > -Waddress-of-packed-member was disabled for the whole kernel in
> > commit bfb38988c51e ("kbuild: clang: Disable 'address-of-packed-member'
> > warning") and for x86/boot/compressed in commit 20c6c1890455 ("x86/boot:
> > Disable the address-of-packed-member compiler warning").
> >
> > -Wgnu was disabled for the whole kernel in commit 61163efae020 ("kbuild:
> > LLVMLinux: Add Kbuild support for building kernel with Clang") and for
> > x86/boot/compressed in commit 6c3b56b19730 ("x86/boot: Disable Clang
> > warnings about GNU extensions").
> >
> > Link: https://github.com/ClangBuiltLinux/linux/issues/112
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > ---
> >
> > Nick expressed concern that this Makefile is overwriting KBUILD_CFLAGS
> > and suggested potentially rewriting the x86 portion of this Makefile to
> > behave like the arm/arm64 one where problematic flags are filtered out.
> > While that comes to fruition, it would be nice for this folder to behave
> > like the rest of the kernel when it comes to this warnings so that the
> > build is cleaner, thus this patch.
> >
> >  drivers/firmware/efi/libstub/Makefile | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
> > index c51627660dbb..d9845099635e 100644
> > --- a/drivers/firmware/efi/libstub/Makefile
> > +++ b/drivers/firmware/efi/libstub/Makefile
> > @@ -9,7 +9,10 @@ cflags-$(CONFIG_X86_32)              := -march=i386
> >  cflags-$(CONFIG_X86_64)              := -mcmodel=small
> >  cflags-$(CONFIG_X86)         += -m$(BITS) -D__KERNEL__ -O2 \
> >                                  -fPIC -fno-strict-aliasing -mno-red-zone \
> > -                                -mno-mmx -mno-sse -fshort-wchar
> > +                                -mno-mmx -mno-sse -fshort-wchar \
> > +                                -Wno-pointer-sign \
> > +                                $(call cc-disable-warning, address-of-packed-member) \
> > +                                $(call cc-disable-warning, gnu)
> >
> >  # arm64 uses the full KBUILD_CFLAGS so it's necessary to explicitly
> >  # disable the stackleak plugin
> > --
> > 2.19.1
> >
>
> + Sedat for review/testing.

Thanks Nathan.

Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
[ Reported-by: Sedat Dilek <sedat.dilek@gmail.com> ]
[ See duplicate "arch/x86/include/asm/processor.h: Warning
-Waddress-of-packed-member "
<https://github.com/ClangBuiltLinux/linux/issues/234> ]

Regards,
- Sedat -

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] efi/libstub: Disable some warnings for x86{,_64}
  2018-10-24  7:22   ` Sedat Dilek
@ 2018-11-05 12:52     ` Ard Biesheuvel
  2018-11-06 13:15       ` Sedat Dilek
  0 siblings, 1 reply; 10+ messages in thread
From: Ard Biesheuvel @ 2018-11-05 12:52 UTC (permalink / raw)
  To: sedat.dilek
  Cc: natechancellor, linux-efi, Linux Kernel Mailing List, Nick Desaulniers

On 24 October 2018 at 09:22, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> On Tue, Oct 23, 2018 at 7:53 PM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
>>
>> On Fri, Oct 12, 2018 at 06:03:49PM -0700, Nathan Chancellor wrote:
>> > When building the kernel with Clang, some disabled warnings appear
>> > because this Makefile overrides KBUILD_CFLAGS for x86{,_64}. Add them to
>> > this list so that the build is clean again.
>> >
>> > -Wpointer-sign was disabled for the whole kernel before the beginning
>> > of git history.
>> >
>> > -Waddress-of-packed-member was disabled for the whole kernel in
>> > commit bfb38988c51e ("kbuild: clang: Disable 'address-of-packed-member'
>> > warning") and for x86/boot/compressed in commit 20c6c1890455 ("x86/boot:
>> > Disable the address-of-packed-member compiler warning").
>> >
>> > -Wgnu was disabled for the whole kernel in commit 61163efae020 ("kbuild:
>> > LLVMLinux: Add Kbuild support for building kernel with Clang") and for
>> > x86/boot/compressed in commit 6c3b56b19730 ("x86/boot: Disable Clang
>> > warnings about GNU extensions").
>> >
>> > Link: https://github.com/ClangBuiltLinux/linux/issues/112
>> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>> > ---
>> >
>> > Nick expressed concern that this Makefile is overwriting KBUILD_CFLAGS
>> > and suggested potentially rewriting the x86 portion of this Makefile to
>> > behave like the arm/arm64 one where problematic flags are filtered out.
>> > While that comes to fruition, it would be nice for this folder to behave
>> > like the rest of the kernel when it comes to this warnings so that the
>> > build is cleaner, thus this patch.
>> >
>> >  drivers/firmware/efi/libstub/Makefile | 5 ++++-
>> >  1 file changed, 4 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
>> > index c51627660dbb..d9845099635e 100644
>> > --- a/drivers/firmware/efi/libstub/Makefile
>> > +++ b/drivers/firmware/efi/libstub/Makefile
>> > @@ -9,7 +9,10 @@ cflags-$(CONFIG_X86_32)              := -march=i386
>> >  cflags-$(CONFIG_X86_64)              := -mcmodel=small
>> >  cflags-$(CONFIG_X86)         += -m$(BITS) -D__KERNEL__ -O2 \
>> >                                  -fPIC -fno-strict-aliasing -mno-red-zone \
>> > -                                -mno-mmx -mno-sse -fshort-wchar
>> > +                                -mno-mmx -mno-sse -fshort-wchar \
>> > +                                -Wno-pointer-sign \
>> > +                                $(call cc-disable-warning, address-of-packed-member) \
>> > +                                $(call cc-disable-warning, gnu)
>> >
>> >  # arm64 uses the full KBUILD_CFLAGS so it's necessary to explicitly
>> >  # disable the stackleak plugin
>> > --
>> > 2.19.1
>> >
>>
>> + Sedat for review/testing.
>
> Thanks Nathan.
>
> Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com>
> Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
> [ Reported-by: Sedat Dilek <sedat.dilek@gmail.com> ]
> [ See duplicate "arch/x86/include/asm/processor.h: Warning
> -Waddress-of-packed-member "
> <https://github.com/ClangBuiltLinux/linux/issues/234> ]
>

Queued in efi/next

Thanks

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] efi/libstub: Disable some warnings for x86{,_64}
  2018-11-05 12:52     ` Ard Biesheuvel
@ 2018-11-06 13:15       ` Sedat Dilek
  2018-11-06 14:16         ` Ard Biesheuvel
  0 siblings, 1 reply; 10+ messages in thread
From: Sedat Dilek @ 2018-11-06 13:15 UTC (permalink / raw)
  To: ard.biesheuvel; +Cc: natechancellor, linux-efi, linux-kernel, Nick Desaulniers

On Mon, Nov 5, 2018 at 1:52 PM Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
> On 24 October 2018 at 09:22, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> > On Tue, Oct 23, 2018 at 7:53 PM Nathan Chancellor
> > <natechancellor@gmail.com> wrote:
> >>
> >> On Fri, Oct 12, 2018 at 06:03:49PM -0700, Nathan Chancellor wrote:
> >> > When building the kernel with Clang, some disabled warnings appear
> >> > because this Makefile overrides KBUILD_CFLAGS for x86{,_64}. Add them to
> >> > this list so that the build is clean again.
> >> >
> >> > -Wpointer-sign was disabled for the whole kernel before the beginning
> >> > of git history.
> >> >
> >> > -Waddress-of-packed-member was disabled for the whole kernel in
> >> > commit bfb38988c51e ("kbuild: clang: Disable 'address-of-packed-member'
> >> > warning") and for x86/boot/compressed in commit 20c6c1890455 ("x86/boot:
> >> > Disable the address-of-packed-member compiler warning").
> >> >
> >> > -Wgnu was disabled for the whole kernel in commit 61163efae020 ("kbuild:
> >> > LLVMLinux: Add Kbuild support for building kernel with Clang") and for
> >> > x86/boot/compressed in commit 6c3b56b19730 ("x86/boot: Disable Clang
> >> > warnings about GNU extensions").
> >> >
> >> > Link: https://github.com/ClangBuiltLinux/linux/issues/112
> >> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> >> > ---
> >> >
> >> > Nick expressed concern that this Makefile is overwriting KBUILD_CFLAGS
> >> > and suggested potentially rewriting the x86 portion of this Makefile to
> >> > behave like the arm/arm64 one where problematic flags are filtered out.
> >> > While that comes to fruition, it would be nice for this folder to behave
> >> > like the rest of the kernel when it comes to this warnings so that the
> >> > build is cleaner, thus this patch.
> >> >
> >> >  drivers/firmware/efi/libstub/Makefile | 5 ++++-
> >> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >> >
> >> > diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
> >> > index c51627660dbb..d9845099635e 100644
> >> > --- a/drivers/firmware/efi/libstub/Makefile
> >> > +++ b/drivers/firmware/efi/libstub/Makefile
> >> > @@ -9,7 +9,10 @@ cflags-$(CONFIG_X86_32)              := -march=i386
> >> >  cflags-$(CONFIG_X86_64)              := -mcmodel=small
> >> >  cflags-$(CONFIG_X86)         += -m$(BITS) -D__KERNEL__ -O2 \
> >> >                                  -fPIC -fno-strict-aliasing -mno-red-zone \
> >> > -                                -mno-mmx -mno-sse -fshort-wchar
> >> > +                                -mno-mmx -mno-sse -fshort-wchar \
> >> > +                                -Wno-pointer-sign \
> >> > +                                $(call cc-disable-warning, address-of-packed-member) \
> >> > +                                $(call cc-disable-warning, gnu)
> >> >
> >> >  # arm64 uses the full KBUILD_CFLAGS so it's necessary to explicitly
> >> >  # disable the stackleak plugin
> >> > --
> >> > 2.19.1
> >> >
> >>
> >> + Sedat for review/testing.
> >
> > Thanks Nathan.
> >
> > Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com>
> > Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
> > [ Reported-by: Sedat Dilek <sedat.dilek@gmail.com> ]
> > [ See duplicate "arch/x86/include/asm/processor.h: Warning
> > -Waddress-of-packed-member "
> > <https://github.com/ClangBuiltLinux/linux/issues/234> ]
> >
>
> Queued in efi/next
>

Thanks Ard.
This means efi-for-4.21 / efi-for-5.0?

- Sedat -

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] efi/libstub: Disable some warnings for x86{,_64}
  2018-11-06 13:15       ` Sedat Dilek
@ 2018-11-06 14:16         ` Ard Biesheuvel
  2018-11-08 20:42           ` Nick Desaulniers
  0 siblings, 1 reply; 10+ messages in thread
From: Ard Biesheuvel @ 2018-11-06 14:16 UTC (permalink / raw)
  To: sedat.dilek
  Cc: Nathan Chancellor, linux-efi, Linux Kernel Mailing List,
	Nick Desaulniers

On 6 November 2018 at 14:15, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> On Mon, Nov 5, 2018 at 1:52 PM Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>>
>> On 24 October 2018 at 09:22, Sedat Dilek <sedat.dilek@gmail.com> wrote:
>> > On Tue, Oct 23, 2018 at 7:53 PM Nathan Chancellor
>> > <natechancellor@gmail.com> wrote:
>> >>
>> >> On Fri, Oct 12, 2018 at 06:03:49PM -0700, Nathan Chancellor wrote:
>> >> > When building the kernel with Clang, some disabled warnings appear
>> >> > because this Makefile overrides KBUILD_CFLAGS for x86{,_64}. Add them to
>> >> > this list so that the build is clean again.
>> >> >
>> >> > -Wpointer-sign was disabled for the whole kernel before the beginning
>> >> > of git history.
>> >> >
>> >> > -Waddress-of-packed-member was disabled for the whole kernel in
>> >> > commit bfb38988c51e ("kbuild: clang: Disable 'address-of-packed-member'
>> >> > warning") and for x86/boot/compressed in commit 20c6c1890455 ("x86/boot:
>> >> > Disable the address-of-packed-member compiler warning").
>> >> >
>> >> > -Wgnu was disabled for the whole kernel in commit 61163efae020 ("kbuild:
>> >> > LLVMLinux: Add Kbuild support for building kernel with Clang") and for
>> >> > x86/boot/compressed in commit 6c3b56b19730 ("x86/boot: Disable Clang
>> >> > warnings about GNU extensions").
>> >> >
>> >> > Link: https://github.com/ClangBuiltLinux/linux/issues/112
>> >> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>> >> > ---
>> >> >
>> >> > Nick expressed concern that this Makefile is overwriting KBUILD_CFLAGS
>> >> > and suggested potentially rewriting the x86 portion of this Makefile to
>> >> > behave like the arm/arm64 one where problematic flags are filtered out.
>> >> > While that comes to fruition, it would be nice for this folder to behave
>> >> > like the rest of the kernel when it comes to this warnings so that the
>> >> > build is cleaner, thus this patch.
>> >> >
>> >> >  drivers/firmware/efi/libstub/Makefile | 5 ++++-
>> >> >  1 file changed, 4 insertions(+), 1 deletion(-)
>> >> >
>> >> > diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
>> >> > index c51627660dbb..d9845099635e 100644
>> >> > --- a/drivers/firmware/efi/libstub/Makefile
>> >> > +++ b/drivers/firmware/efi/libstub/Makefile
>> >> > @@ -9,7 +9,10 @@ cflags-$(CONFIG_X86_32)              := -march=i386
>> >> >  cflags-$(CONFIG_X86_64)              := -mcmodel=small
>> >> >  cflags-$(CONFIG_X86)         += -m$(BITS) -D__KERNEL__ -O2 \
>> >> >                                  -fPIC -fno-strict-aliasing -mno-red-zone \
>> >> > -                                -mno-mmx -mno-sse -fshort-wchar
>> >> > +                                -mno-mmx -mno-sse -fshort-wchar \
>> >> > +                                -Wno-pointer-sign \
>> >> > +                                $(call cc-disable-warning, address-of-packed-member) \
>> >> > +                                $(call cc-disable-warning, gnu)
>> >> >
>> >> >  # arm64 uses the full KBUILD_CFLAGS so it's necessary to explicitly
>> >> >  # disable the stackleak plugin
>> >> > --
>> >> > 2.19.1
>> >> >
>> >>
>> >> + Sedat for review/testing.
>> >
>> > Thanks Nathan.
>> >
>> > Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com>
>> > Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
>> > [ Reported-by: Sedat Dilek <sedat.dilek@gmail.com> ]
>> > [ See duplicate "arch/x86/include/asm/processor.h: Warning
>> > -Waddress-of-packed-member "
>> > <https://github.com/ClangBuiltLinux/linux/issues/234> ]
>> >
>>
>> Queued in efi/next
>>
>
> Thanks Ard.
> This means efi-for-4.21 / efi-for-5.0?
>

Yes

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] efi/libstub: Disable some warnings for x86{,_64}
  2018-11-06 14:16         ` Ard Biesheuvel
@ 2018-11-08 20:42           ` Nick Desaulniers
  0 siblings, 0 replies; 10+ messages in thread
From: Nick Desaulniers @ 2018-11-08 20:42 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: sedat.dilek, Nathan Chancellor, linux-efi, LKML

On Tue, Nov 6, 2018 at 6:16 AM Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
> On 6 November 2018 at 14:15, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> >
> > Thanks Ard.
> > This means efi-for-4.21 / efi-for-5.0?
> >
>
> Yes

Thanks for picking up this patch, Ard.  Is there any way to get it into 4.20?
-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-11-08 20:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-13  1:03 [PATCH] efi/libstub: Disable some warnings for x86{,_64} Nathan Chancellor
2018-10-15 19:40 ` Nick Desaulniers
2018-10-15 19:46   ` Nathan Chancellor
2018-10-15 20:16     ` Nick Desaulniers
2018-10-23 17:53 ` Nathan Chancellor
2018-10-24  7:22   ` Sedat Dilek
2018-11-05 12:52     ` Ard Biesheuvel
2018-11-06 13:15       ` Sedat Dilek
2018-11-06 14:16         ` Ard Biesheuvel
2018-11-08 20:42           ` Nick Desaulniers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).