From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guenter Roeck Subject: [PATCH 0/4] Introduce and use absolute_pointer macro Date: Sun, 12 Sep 2021 09:01:45 -0700 Message-ID: <20210912160149.2227137-1-linux@roeck-us.net> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=369lDAEYI6mhcg75EK6D9X/8m+ItLAaJCovGP1Kk1FE=; b=mzzQHVTUH56eSIfjTlTliV7cmskLg33EaeKzO5HpHV1sLBJCnDeUTO07YqZjy8jZZi hc/YKR5o5m4S1dhCH1ubOowAKoNHBkftRpvPF3tAKX2O/vLWNUWirs2OJM60lekpwhzC txQAZJIuSaIx0vhp5gLjFEo1pu5ochkFYkjwVBu9lVk1CsdkUD451UPHlwZzjTbrkUKC Ulr81r6kJiBzVU2KCCmddPDNuQjIEPpPH6bRoU2nuoPStcWL8WXjiAMfawWmnMXXuCXy fcoNkia2JJk+vUXwukWytrb9OM4o6u9GchgXrZR60T/nCrQW7mslnQqJDd76/ueDBGHr 0Q+A== Sender: Guenter Roeck List-ID: Content-Type: text/plain; charset="us-ascii" To: Linus Torvalds Cc: Richard Henderson , Ivan Kokshaysky , Matt Turner , "James E . J . Bottomley" , Helge Deller , "David S . Miller" , Jakub Kicinski , linux-alpha@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, netdev@vger.kernel.org, linux-sparse@vger.kernel.org, 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(-)