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 3/4] parisc: Use absolute_pointer for memcmp on fixed memory location
Date: Sun, 12 Sep 2021 09:01:48 -0700 [thread overview]
Message-ID: <20210912160149.2227137-4-linux@roeck-us.net> (raw)
In-Reply-To: <20210912160149.2227137-1-linux@roeck-us.net>
parisc:allmodconfig fails to build with the following error
when using gcc 11.x.
arch/parisc/kernel/setup.c: In function 'start_parisc':
arch/parisc/kernel/setup.c:389:28: error:
'__builtin_memcmp_eq' specified bound 8 exceeds source size 0
Avoid the problem by using absolute_pointer() when providing a memory
address to memcmp().
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
arch/parisc/kernel/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index cceb09855e03..4e13345b6581 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -384,7 +384,7 @@ void __init start_parisc(void)
struct pdc_coproc_cfg coproc_cfg;
/* check QEMU/SeaBIOS marker in PAGE0 */
- running_on_qemu = (memcmp(&PAGE0->pad0, "SeaBIOS", 8) == 0);
+ running_on_qemu = (memcmp(absolute_pointer(&PAGE0->pad0), "SeaBIOS", 8) == 0);
cpunum = smp_processor_id();
--
2.33.0
next prev parent reply other threads:[~2021-09-12 16:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Guenter Roeck [this message]
2021-09-12 19:11 ` [PATCH 3/4] parisc: Use absolute_pointer for memcmp " 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-4-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 \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).