From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: keir@xen.org, ian.campbell@citrix.com,
Andrew Cooper <andrew.cooper3@citrix.com>,
tim@xen.org, xen-devel@lists.xenproject.org,
ian.jackson@eu.citrix.com
Subject: Re: [PATCH v1 3/3] blktap2: Silence warnings under GCC 5.1.1
Date: Mon, 5 Oct 2015 10:57:28 -0400 [thread overview]
Message-ID: <20151005145728.GA2825@l.oracle.com> (raw)
In-Reply-To: <5612A94B02000078000A8330@prv-mh.provo.novell.com>
On Mon, Oct 05, 2015 at 08:46:03AM -0600, Jan Beulich wrote:
> >>> On 05.10.15 at 16:26, <konrad.wilk@oracle.com> wrote:
> > On Mon, Oct 05, 2015 at 04:46:55AM -0600, Jan Beulich wrote:
> >> >>> On 05.10.15 at 10:49, <andrew.cooper3@citrix.com> wrote:
> >> > On 03/10/15 19:39, Konrad Rzeszutek Wilk wrote:
> >> >> I get compile warnings telling me that
> >> >> s->connections[i].fd == fd
> >> >>
> >> >> 'i' may be past the array. Adding in an extra condition
> >> >> on the loop fixes that.
> >> >>
> >> >> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> >> >
> >> > Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> >> >
> >> > Furthermore, I can't see any logic which prevents s->connected getting
> >> > larger than MAX_CONNECTIONS
> >>
> >> Iirc Olaf had already suggested such a patch quite some time ago,
> >> and not having seen the point back then I also don't see the point
> >> now: ctl_accept() prevents ->connected from growing beyond 1,
> >> and there's no other place where the value could get incremented.
> >
> > Thoughts on what to do about the compiler warnings which make this
> > compiler errors (since we compile with -Werror) and one can't
> > compile Xen? A different fix (make s->connected not be an array?)
>
> To be honest I think this needs to be taken care of at the compiler
> side, as I can't see any reason for the warning. The workaround
> therefore would be to suppress the warning via -Wno-* until the
> compiler side would get fixed. (Of course I'm open to be convinced
> otherwise, i.e. this not being a compiler issue.)
There is an code issue here as well.
Andrew said - there is no logic that "prevents s->connected getting larger
than MAX_CONNECTIONS." which would resulted in accessing s->connections
outside its array size.
Let me look to see if I can add some s->connected boundaries. Thought
this is going low on my list of priorities.
>
> >> Also, Konrad, regarding the subject (since this repeats from an
> >> earlier patch of yours) - why do you reference a specific, non-
> >> release version of gcc? Why not simply say 5.x? Because if the
> >> problem is indeed only present in a non-release version, I don't
> >> think we should bother working around such issues.
> >
> > I just ran 'gcc --version' and that is what it spit out. Since
> > it is part of an official Fedora release I figured it is 'released'
> > in some way?
>
> Well, if my understanding of gcc's new versioning is correct, only
> <x>.<y>.<z> with y > 0 and z == 0 are released versions. 5.1.1
> would be an RC for 5.2.0 (which already got released).
And indeed: gcc (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4)
while 5.2.0 was out on July 16 (0716). And doing yum upgrade gcc
gives me no new code, hence it seems that Fedora Core 22 is stuck
at an RC for 5.2.0.
>
> Jan
>
next prev parent reply other threads:[~2015-10-05 14:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-03 18:39 [PATCH] Various fixes - libelf, paging, blktap Konrad Rzeszutek Wilk
2015-10-03 18:39 ` [PATCH v1 1/3] libelf: Preserve log callback after elf_init Konrad Rzeszutek Wilk
2015-10-05 10:36 ` Jan Beulich
2015-10-05 14:23 ` Konrad Rzeszutek Wilk
2015-10-05 14:39 ` Jan Beulich
2015-10-05 14:48 ` Konrad Rzeszutek Wilk
2015-10-03 18:39 ` [PATCH v1 2/3] paging: Fix compile error when DEBUG_TRACE_DUMP is enabled Konrad Rzeszutek Wilk
2015-10-05 8:46 ` Andrew Cooper
2015-10-03 18:39 ` [PATCH v1 3/3] blktap2: Silence warnings under GCC 5.1.1 Konrad Rzeszutek Wilk
2015-10-05 8:49 ` Andrew Cooper
2015-10-05 10:46 ` Jan Beulich
2015-10-05 14:26 ` Konrad Rzeszutek Wilk
2015-10-05 14:46 ` Jan Beulich
2015-10-05 14:57 ` Konrad Rzeszutek Wilk [this message]
2015-10-05 15:02 ` Jan Beulich
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=20151005145728.GA2825@l.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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).