linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Introduce and use absolute_pointer macro
@ 2021-09-15  3:52 Guenter Roeck
  2021-09-15  3:52 ` [PATCH v2 1/4] compiler.h: Introduce " Guenter Roeck
                   ` (4 more replies)
  0 siblings, 5 replies; 40+ messages in thread
From: Guenter Roeck @ 2021-09-15  3:52 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 if gcc's builtin functions are used for those
operations.

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.

v2: Drop parisc patch (the problem will be solved differently)
    alpha: Move setup.h out of uapi
    Define COMMAND_LINE for alpha as absolute_pointer instead of using
    absolute_pointer on the define.

----------------------------------------------------------------
Guenter Roeck (4):
      compiler.h: Introduce absolute_pointer macro
      net: i825xx: Use absolute_pointer for memcpy from fixed memory location
      alpha: Move setup.h out of uapi
      alpha: Use absolute_pointer to define COMMAND_LINE

 arch/alpha/include/asm/setup.h      | 43 +++++++++++++++++++++++++++++++++++++
 arch/alpha/include/uapi/asm/setup.h | 42 +++---------------------------------
 drivers/net/ethernet/i825xx/82596.c |  2 +-
 include/linux/compiler.h            |  2 ++
 4 files changed, 49 insertions(+), 40 deletions(-)
 create mode 100644 arch/alpha/include/asm/setup.h

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

end of thread, other threads:[~2021-09-22 20:50 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15  3:52 [PATCH v2 0/4] Introduce and use absolute_pointer macro Guenter Roeck
2021-09-15  3:52 ` [PATCH v2 1/4] compiler.h: Introduce " Guenter Roeck
2021-09-15  7:07   ` Geert Uytterhoeven
2021-09-15  7:13   ` Geert Uytterhoeven
2021-09-15 14:03     ` Guenter Roeck
2021-09-15  3:52 ` [PATCH v2 2/4] net: i825xx: Use absolute_pointer for memcpy from fixed memory location Guenter Roeck
2021-09-15  7:08   ` Geert Uytterhoeven
2021-09-15  3:52 ` [PATCH v2 3/4] alpha: Move setup.h out of uapi Guenter Roeck
2021-09-15  3:52 ` [PATCH v2 4/4] alpha: Use absolute_pointer to define COMMAND_LINE Guenter Roeck
2021-09-15 19:18 ` [PATCH v2 0/4] Introduce and use absolute_pointer macro Linus Torvalds
2021-09-15 19:35   ` Guenter Roeck
2021-09-15 19:47     ` Linus Torvalds
2021-09-15 19:50       ` Linus Torvalds
2021-09-15 21:19         ` Linus Torvalds
2021-09-16  7:02           ` Anders Larsen
2021-09-16 16:25             ` Linus Torvalds
2021-09-15 20:30       ` Helge Deller
2021-09-15 22:33       ` Guenter Roeck
2021-09-16 18:35         ` Linus Torvalds
2021-09-18  9:51           ` Michael Cree
2021-09-18 13:11             ` Ulrich Teichert
2021-09-18 17:04               ` Linus Torvalds
2021-09-18 17:17                 ` Thorsten Glaser
2021-09-18 17:21                   ` Linus Torvalds
2021-09-18 17:28                 ` Linus Torvalds
2021-09-18 20:26                 ` Ulrich Teichert
2021-09-18 20:46                   ` Linus Torvalds
2021-09-18 21:12                     ` Linus Torvalds
2021-09-18 22:09                   ` Linus Torvalds
2021-09-19 15:13                     ` Dave Taht
2021-09-20 18:25                     ` Ulrich Teichert
2021-09-20 18:46                       ` Linus Torvalds
2021-09-20 18:59                         ` Matt Turner
2021-09-20 19:45                           ` Linus Torvalds
2021-09-21 19:13                         ` Ulrich Teichert
2021-09-21 20:42                           ` Linus Torvalds
2021-09-21 21:39                           ` Linus Torvalds
2021-09-22 20:50                             ` Ulrich Teichert
2021-09-16 19:47         ` Linus Torvalds
2021-09-16  0:34   ` Michael Cree

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).