All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Introduce and use absolute_pointer macro
@ 2021-09-12 16:01 Guenter Roeck
  2021-09-12 16:01 ` [PATCH 1/4] compiler.h: Introduce " Guenter Roeck
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Guenter Roeck @ 2021-09-12 16:01 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Richard Henderson, Ivan Kokshaysky, Matt Turner,
	James E . J . Bottomley, Helge Deller, David S . Miller,
	Jakub Kicinski, linux-alpha, Geert Uytterhoeven, linux-kernel,
	linux-parisc, netdev, linux-sparse, Guenter Roeck

Kernel test builds currently fail for several architectures with error
messages such as the following.

drivers/net/ethernet/i825xx/82596.c: In function 'i82596_probe':
./arch/m68k/include/asm/string.h:72:25: error:
	'__builtin_memcpy' reading 6 bytes from a region of size 0
		[-Werror=stringop-overread]

Such warnings may be reported by gcc 11.x for string and memory operations
on fixed addresses.

This patch series introduces absolute_pointer() to fix the problem.
absolute_pointer() disassociates a pointer from its originating symbol
type and context, and thus prevents gcc from making assumptions about
pointers passed to memory operations.

----------------------------------------------------------------
Guenter Roeck (4):
      compiler.h: Introduce absolute_pointer macro
      net: i825xx: Use absolute_pointer for memcpy on fixed memory location
      parisc: Use absolute_pointer for memcmp on fixed memory location
      alpha: Use absolute_pointer for strcmp on fixed memory location

 arch/alpha/kernel/setup.c           | 2 +-
 arch/parisc/kernel/setup.c          | 2 +-
 drivers/net/ethernet/i825xx/82596.c | 2 +-
 include/linux/compiler.h            | 2 ++
 4 files changed, 5 insertions(+), 3 deletions(-)

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

end of thread, other threads:[~2021-09-12 23:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-12 16:01 [PATCH 0/4] Introduce and use absolute_pointer macro Guenter Roeck
2021-09-12 16:01 ` [PATCH 1/4] compiler.h: Introduce " Guenter Roeck
2021-09-12 16:01 ` [PATCH 2/4] net: i825xx: Use absolute_pointer for memcpy on fixed memory location Guenter Roeck
2021-09-12 16:11   ` Jeroen Roovers
2021-09-12 16:16     ` Guenter Roeck
2021-09-12 16:01 ` [PATCH 3/4] parisc: Use absolute_pointer for memcmp " Guenter Roeck
2021-09-12 19:11   ` Linus Torvalds
2021-09-12 19:58     ` Helge Deller
2021-09-12 20:28       ` Guenter Roeck
2021-09-12 16:01 ` [PATCH 4/4] alpha: Use absolute_pointer for strcmp " Guenter Roeck
2021-09-12 19:13   ` Linus Torvalds
2021-09-12 20:15     ` Guenter Roeck
2021-09-12 20:37     ` Guenter Roeck
2021-09-12 22:58       ` Linus Torvalds

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.