Thread (40 messages) read the whole thread 40 messages, 10 authors, 2021-09-22
STALE1741d

Revision v2 of 2 in this series.

Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 0/4] Introduce and use absolute_pointer macro

From: Guenter Roeck <linux@roeck-us.net>
Date: 2021-09-15 03:52:36
Also in: linux-alpha, lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help