From: David Miller <davem@davemloft.net>
To: matorola@gmail.com
Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: sparc gcc 7.1 compile issue
Date: Thu, 01 Jun 2017 12:45:44 -0400 (EDT) [thread overview]
Message-ID: <20170601.124544.426768385909160370.davem@davemloft.net> (raw)
In-Reply-To: <CADxRZqyug5w1+tWpWxAX7aKkom166j=xqHUa-L61EKWEx7XAHw@mail.gmail.com>
From: Anatoly Pugachev <matorola@gmail.com>
Date: Thu, 1 Jun 2017 15:46:04 +0300
> on the same topic , latest git does not compile for me with gcc-7.0.1
> gcc version 7.0.1 20170407 (experimental) [trunk revision 246759]
> (Debian 7-20170407-1)
>
> $ make
> ...
> CC arch/sparc/kernel/ds.o
> arch/sparc/kernel/ds.c: In function ‘register_services’:
> arch/sparc/kernel/ds.c:912:3: error: ‘strcpy’: writing at least 1 byte
> into a region of size 0 overflows the destination
> [-Werror=stringop-overflow ]
> strcpy(pbuf.req.svc_id, cp->service_id);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
That's easy enough to fix, I've pushed the patch below to 'sparc' GIT.
> MODPOST vmlinux.o
> ipc/built-in.o: In function `mq_attr_ok.isra.0':
> mqueue.c:(.text+0xc490): undefined reference to `__multi3'
> drivers/built-in.o: In function `dm_vcalloc':
> (.text+0xc9e98): undefined reference to `__multi3'
> Makefile:997: recipe for target 'vmlinux' failed
> make: *** [vmlinux] Error 1
This, on the other hand.... wonder why it wants to do a 128-bit multiply
when the MQ attribute struct is just 64-bit values...
====================
>From 0fde7ad71ee371ede73b3f326e58f9e8d102feb6 Mon Sep 17 00:00:00 2001
From: "David S. Miller" <davem@davemloft.net>
Date: Thu, 1 Jun 2017 09:42:46 -0700
Subject: [PATCH] sparc64: Fix build warnings with gcc 7.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
arch/sparc/kernel/ds.c: In function ‘register_services’:
arch/sparc/kernel/ds.c:912:3: error: ‘strcpy’: writing at least 1 byte
into a region of size 0 overflows the destination
Reported-by: Anatoly Pugachev <matorola@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
arch/sparc/kernel/ds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c
index b542cc7..f87265a 100644
--- a/arch/sparc/kernel/ds.c
+++ b/arch/sparc/kernel/ds.c
@@ -909,7 +909,7 @@ static int register_services(struct ds_info *dp)
pbuf.req.handle = cp->handle;
pbuf.req.major = 1;
pbuf.req.minor = 0;
- strcpy(pbuf.req.svc_id, cp->service_id);
+ strcpy(pbuf.id_buf, cp->service_id);
err = __ds_send(lp, &pbuf, msg_len);
if (err > 0)
--
2.1.2.532.g19b5d50
next prev parent reply other threads:[~2017-06-01 16:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-31 19:34 Waldemar Brodkorb
2017-05-31 21:10 ` David Miller
2017-06-01 12:12 ` Waldemar Brodkorb
2017-06-01 12:46 ` Anatoly Pugachev
2017-06-01 12:48 ` John Paul Adrian Glaubitz
2017-06-01 16:45 ` David Miller [this message]
2017-06-02 9:17 ` John Paul Adrian Glaubitz
2017-06-02 14:22 ` David Miller
2017-06-02 16:33 ` John Paul Adrian Glaubitz
2017-06-02 17:28 ` David Miller
2017-06-04 13:16 ` John Paul Adrian Glaubitz
2017-06-04 14:40 ` Waldemar Brodkorb
2017-06-04 15:09 ` John Paul Adrian Glaubitz
2017-06-04 20:22 ` David Miller
2017-06-04 20:27 ` John Paul Adrian Glaubitz
2017-06-04 20:21 ` David Miller
2017-06-04 20:26 ` John Paul Adrian Glaubitz
2017-06-04 20:30 ` David Miller
2017-06-04 20:33 ` John Paul Adrian Glaubitz
2017-06-04 20:34 ` David Miller
2017-06-04 20:38 ` John Paul Adrian Glaubitz
2017-06-18 9:22 ` Pavel Machek
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=20170601.124544.426768385909160370.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=matorola@gmail.com \
--cc=sparclinux@vger.kernel.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
all inboxes | Powered by JetHome®