Linux-parisc archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] parisc: use -fno-strict-aliasing for decompressor
@ 2020-05-08  9:35 Arnd Bergmann
  2020-05-08 21:40 ` Helge Deller
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2020-05-08  9:35 UTC (permalink / raw)
  To: James E.J. Bottomley, Helge Deller
  Cc: Arnd Bergmann, kbuild test robot, linux-parisc, linux-kernel

An experimental patch series of mine reworks how warnings are processed
in Kbuild. A side effect is a new warning about a harmless aliasing
rule violation in an inline function:

In file included from
include/linux/rhashtable-types.h:15:0,
                 from include/linux/ipc.h:7,
                 from include/uapi/linux/sem.h:5,
                 from include/linux/sem.h:5,
                 from include/linux/sched.h:15,
                 from include/linux/uaccess.h:6,
                 from arch/parisc/boot/compressed/misc.c:7:
include/linux/workqueue.h: In function 'work_static':
include/linux/workqueue.h:212:2: warning: dereferencing
type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  return *work_data_bits(work) & WORK_STRUCT_STATIC;

Make the decompressor use -fno-strict-aliasing like the rest of
the kernel for consistency, and to ensure this warning never makes
it into a release.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/parisc/boot/compressed/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/parisc/boot/compressed/Makefile b/arch/parisc/boot/compressed/Makefile
index 1e5879c6a752..dff453687530 100644
--- a/arch/parisc/boot/compressed/Makefile
+++ b/arch/parisc/boot/compressed/Makefile
@@ -16,6 +16,7 @@ targets += real2.S firmware.c
 
 KBUILD_CFLAGS := -D__KERNEL__ -O2 -DBOOTLOADER
 KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
+KBUILD_CFLAGS += -fno-strict-aliasing
 KBUILD_CFLAGS += $(cflags-y) -fno-delete-null-pointer-checks -fno-builtin-printf
 KBUILD_CFLAGS += -fno-PIE -mno-space-regs -mdisable-fpregs -Os
 ifndef CONFIG_64BIT
-- 
2.26.0


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

* Re: [PATCH] parisc: use -fno-strict-aliasing for decompressor
  2020-05-08  9:35 [PATCH] parisc: use -fno-strict-aliasing for decompressor Arnd Bergmann
@ 2020-05-08 21:40 ` Helge Deller
  2020-05-08 21:43   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Helge Deller @ 2020-05-08 21:40 UTC (permalink / raw)
  To: Arnd Bergmann, James E.J. Bottomley
  Cc: kbuild test robot, linux-parisc, linux-kernel

On 08.05.20 11:35, Arnd Bergmann wrote:
> An experimental patch series of mine reworks how warnings are processed
> in Kbuild. A side effect is a new warning about a harmless aliasing
> rule violation in an inline function:
>
> In file included from
> include/linux/rhashtable-types.h:15:0,
>                  from include/linux/ipc.h:7,
>                  from include/uapi/linux/sem.h:5,
>                  from include/linux/sem.h:5,
>                  from include/linux/sched.h:15,
>                  from include/linux/uaccess.h:6,
>                  from arch/parisc/boot/compressed/misc.c:7:
> include/linux/workqueue.h: In function 'work_static':
> include/linux/workqueue.h:212:2: warning: dereferencing
> type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
>   return *work_data_bits(work) & WORK_STRUCT_STATIC;
>
> Make the decompressor use -fno-strict-aliasing like the rest of
> the kernel for consistency, and to ensure this warning never makes
> it into a release.
>
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Helge Deller <deller@gmx.de>

Arnd, will you take it through your trees when you push your experimental
patches, or do you want me to take it through the parisc tree?

Helge

> ---
>  arch/parisc/boot/compressed/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/parisc/boot/compressed/Makefile b/arch/parisc/boot/compressed/Makefile
> index 1e5879c6a752..dff453687530 100644
> --- a/arch/parisc/boot/compressed/Makefile
> +++ b/arch/parisc/boot/compressed/Makefile
> @@ -16,6 +16,7 @@ targets += real2.S firmware.c
>
>  KBUILD_CFLAGS := -D__KERNEL__ -O2 -DBOOTLOADER
>  KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
> +KBUILD_CFLAGS += -fno-strict-aliasing
>  KBUILD_CFLAGS += $(cflags-y) -fno-delete-null-pointer-checks -fno-builtin-printf
>  KBUILD_CFLAGS += -fno-PIE -mno-space-regs -mdisable-fpregs -Os
>  ifndef CONFIG_64BIT
>


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

* Re: [PATCH] parisc: use -fno-strict-aliasing for decompressor
  2020-05-08 21:40 ` Helge Deller
@ 2020-05-08 21:43   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2020-05-08 21:43 UTC (permalink / raw)
  To: Helge Deller
  Cc: James E.J. Bottomley, kbuild test robot, Parisc List, linux-kernel

On Fri, May 8, 2020 at 11:40 PM Helge Deller <deller@gmx.de> wrote:
> On 08.05.20 11:35, Arnd Bergmann wrote:
> > An experimental patch series of mine reworks how warnings are processed
> > in Kbuild. A side effect is a new warning about a harmless aliasing
> > rule violation in an inline function:
> >
> > In file included from
> > include/linux/rhashtable-types.h:15:0,
> >                  from include/linux/ipc.h:7,
> >                  from include/uapi/linux/sem.h:5,
> >                  from include/linux/sem.h:5,
> >                  from include/linux/sched.h:15,
> >                  from include/linux/uaccess.h:6,
> >                  from arch/parisc/boot/compressed/misc.c:7:
> > include/linux/workqueue.h: In function 'work_static':
> > include/linux/workqueue.h:212:2: warning: dereferencing
> > type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
> >   return *work_data_bits(work) & WORK_STRUCT_STATIC;
> >
> > Make the decompressor use -fno-strict-aliasing like the rest of
> > the kernel for consistency, and to ensure this warning never makes
> > it into a release.
> >
> > Reported-by: kbuild test robot <lkp@intel.com>
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Acked-by: Helge Deller <deller@gmx.de>
>
> Arnd, will you take it through your trees when you push your experimental
> patches, or do you want me to take it through the parisc tree?

Please take it through your tree. It will take me a while to finish my
series, and having one less change will make it easier to review.

       Arnd

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08  9:35 [PATCH] parisc: use -fno-strict-aliasing for decompressor Arnd Bergmann
2020-05-08 21:40 ` Helge Deller
2020-05-08 21:43   ` Arnd Bergmann

Linux-parisc archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-parisc/0 linux-parisc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-parisc linux-parisc/ https://lore.kernel.org/linux-parisc \
		linux-parisc@vger.kernel.org
	public-inbox-index linux-parisc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-parisc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git