All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Richard Henderson <rth@twiddle.net>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Matt Turner <mattst88@gmail.com>,
	"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
	Helge Deller <deller@gmx.de>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	linux-alpha@vger.kernel.org,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org,
	netdev@vger.kernel.org, linux-sparse@vger.kernel.org,
	Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 0/4] Introduce and use absolute_pointer macro
Date: Sun, 12 Sep 2021 09:01:45 -0700	[thread overview]
Message-ID: <20210912160149.2227137-1-linux@roeck-us.net> (raw)

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

             reply	other threads:[~2021-09-12 16:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-12 16:01 Guenter Roeck [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210912160149.2227137-1-linux@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=davem@davemloft.net \
    --cc=deller@gmx.de \
    --cc=geert@linux-m68k.org \
    --cc=ink@jurassic.park.msu.ru \
    --cc=kuba@kernel.org \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=rth@twiddle.net \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [PATCH 0/4] Introduce and use absolute_pointer macro' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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.