Message ID | 1462812240-31204-1-git-send-email-aurelien@aurel32.net |
---|---|
State | New |
Headers | show |
Am 09.05.2016 um 18:44 schrieb Aurelien Jarno: > Recent versions of GCC report the following error when compiling > target-mips/helper.c: > > qemu/target-mips/helper.c:542:9: warning: ‘memset’ used with length > equal to number of elements without multiplication by element size > [-Wmemset-elt-size] > > This is indeed correct and due to a wrong usage of sizeof(). Fix that. > > Cc: Stefan Weil <sw@weilnetz.de> > Cc: Leon Alrae <leon.alrae@imgtec.com> > LP: https://bugs.launchpad.net/qemu/+bug/1577841 > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> > --- > target-mips/helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target-mips/helper.c b/target-mips/helper.c > index 1004ede..cfea177 100644 > --- a/target-mips/helper.c > +++ b/target-mips/helper.c > @@ -539,7 +539,7 @@ void mips_cpu_do_interrupt(CPUState *cs) > break; > case EXCP_SRESET: > env->CP0_Status |= (1 << CP0St_SR); > - memset(env->CP0_WatchLo, 0, sizeof(*env->CP0_WatchLo)); > + memset(env->CP0_WatchLo, 0, sizeof(env->CP0_WatchLo)); > goto set_error_EPC; > case EXCP_NMI: > env->CP0_Status |= (1 << CP0St_NMI); > Reviewed-by: Stefan Weil <sw@weilnetz.de> I suggest to apply this patch to 2.6, if this is still possible: * It is a very small modification which fixes a bug. * It fixes a new build error with recent gcc versions. The first reason alone would not justify it for 2.6 as this is a rather old bug. Stefan
On 9 May 2016 at 18:53, Stefan Weil <sw@weilnetz.de> wrote:
> I suggest to apply this patch to 2.6, if this is still possible
It is not; sorry.
thanks
-- PMM
On 9 May 2016 at 18:55, Peter Maydell <peter.maydell@linaro.org> wrote: > On 9 May 2016 at 18:53, Stefan Weil <sw@weilnetz.de> wrote: >> I suggest to apply this patch to 2.6, if this is still possible > > It is not; sorry. Note that it's only an error if you're building with -Werror, and releases don't default to -Werror, so users using released QEMU 2.6 shouldn't hit this even with the newer gcc. Developers developing on trunk shouldn't be unduly inconvenienced if the commit fixing it is post-2.6-release rather than the actual release. thanks -- PMM
On 05/09/2016 07:57 PM, Peter Maydell wrote: > On 9 May 2016 at 18:55, Peter Maydell <peter.maydell@linaro.org> wrote: >> On 9 May 2016 at 18:53, Stefan Weil <sw@weilnetz.de> wrote: >>> I suggest to apply this patch to 2.6, if this is still possible >> >> It is not; sorry. I think we have delayed 2.6 already far too long (so please release) but > Note that it's only an error if you're building with -Werror, and > releases don't default to -Werror, so users using released QEMU 2.6 > shouldn't hit this even with the newer gcc. Developers developing > on trunk shouldn't be unduly inconvenienced if the commit fixing it > is post-2.6-release rather than the actual release. to me it looks like that this is not a compile time error, instead we really do not memset a variable that we are supposed to memset. the only reason to not consider it for 2.6 is that its is really old and it did not seem to cause harm. Christian
On 11 May 2016 at 20:28, Christian Borntraeger <borntraeger@de.ibm.com> wrote: > On 05/09/2016 07:57 PM, Peter Maydell wrote: >> On 9 May 2016 at 18:55, Peter Maydell <peter.maydell@linaro.org> wrote: >>> On 9 May 2016 at 18:53, Stefan Weil <sw@weilnetz.de> wrote: >>>> I suggest to apply this patch to 2.6, if this is still possible >>> >>> It is not; sorry. > > I think we have delayed 2.6 already far too long (so please release) > but Already done :-) >> Note that it's only an error if you're building with -Werror, and >> releases don't default to -Werror, so users using released QEMU 2.6 >> shouldn't hit this even with the newer gcc. Developers developing >> on trunk shouldn't be unduly inconvenienced if the commit fixing it >> is post-2.6-release rather than the actual release. > > to me it looks like that this is not a compile time error, instead we > really do not memset a variable that we are supposed to memset. > the only reason to not consider it for 2.6 is that its is really old > and it did not seem to cause harm. Yes, it is both a code bug and a compile error, but the former has been present for many releases so is not a regression, and the latter is only an error if you're building with -Werror. So in my view it's the kind of bug we'd certainly fix at about rc3 or so, but not a bug which is "release critical showstopper". thanks -- PMM
On 05/12/2016 12:41 AM, Peter Maydell wrote: > On 11 May 2016 at 20:28, Christian Borntraeger <borntraeger@de.ibm.com> wrote: >> On 05/09/2016 07:57 PM, Peter Maydell wrote: >>> On 9 May 2016 at 18:55, Peter Maydell <peter.maydell@linaro.org> wrote: >>>> On 9 May 2016 at 18:53, Stefan Weil <sw@weilnetz.de> wrote: >>>>> I suggest to apply this patch to 2.6, if this is still possible >>>> >>>> It is not; sorry. >> >> I think we have delayed 2.6 already far too long (so please release) >> but > > Already done :-) > >>> Note that it's only an error if you're building with -Werror, and >>> releases don't default to -Werror, so users using released QEMU 2.6 >>> shouldn't hit this even with the newer gcc. Developers developing >>> on trunk shouldn't be unduly inconvenienced if the commit fixing it >>> is post-2.6-release rather than the actual release. >> >> to me it looks like that this is not a compile time error, instead we >> really do not memset a variable that we are supposed to memset. >> the only reason to not consider it for 2.6 is that its is really old >> and it did not seem to cause harm. > > Yes, it is both a code bug and a compile error, but the former > has been present for many releases so is not a regression, and > the latter is only an error if you're building with -Werror. > So in my view it's the kind of bug we'd certainly fix at about > rc3 or so, but not a bug which is "release critical showstopper". Maybe a topic for this years QEMU summit could be to talk about release process and release criterias. We could a: allow more patches , e.g. I thing that this patch would be have been taken in the Linux kernel a day before the release, see for example what is applied 4 days before a release as network fixes: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4d8bbbff1227bbb27fdb02b6db17f080c06eedad 22 files changed, 258 insertions, 86 deletions b: as we are strict and only apply hand selected patches, regressions are very unlikely, so we could release sooner. For example the CVE fixes could have just been taken and rc5 being released as final. (which we did anyway but 3 days later) c: we consider everything fine and keep the process d: better ideas
On 12 May 2016 at 08:40, Christian Borntraeger <borntraeger@de.ibm.com> wrote: > Maybe a topic for this years QEMU summit could be to talk about > release process and release criterias. Yeah, I'm happy to talk about what we could do better with releases (both on the mailing list and at the summit). A couple of notes: This time around we had to delay by at least a week because of the timing of the CVEs -- we had to allow a reasonable time before raising the embargo for distros to prepare fixes, and the bugs came in pretty close to when we'd otherwise have done our final rc for the release. I think one significant difference between us and Linux is that we have fewer people testing our rcs, so I worry that if we put more stuff in then we are less likely to notice bugs in it in time. The intended purpose of the "few days gap then final release is same as last rc" approach is to give a safety valve in case the patches that went into the final rc had some horrendous bug in them. In this case the last rc only had the CVE fixes so was pretty safe, but in previous releases we've often had a few more patches than that in final-rc. I don't think two extra days before reopening the tree is a very big cost. thanks -- PMM
On Thu, 12 May 2016 09:40:21 +0200 Christian Borntraeger <borntraeger@de.ibm.com> wrote: > Maybe a topic for this years QEMU summit could be to talk about > release process and release criterias. +1 to that. > We could > a: allow more patches , e.g. I thing that this patch would be have > been taken in the Linux kernel a day before the release, see for > example what is applied 4 days before a release as network fixes: > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4d8bbbff1227bbb27fdb02b6db17f080c06eedad > 22 files changed, 258 insertions, 86 deletions Personally, I would probably go for something between applying this patch and that networking pull :) > b: as we are strict and only apply hand selected patches, regressions are > very unlikely, so we could release sooner. For example the CVE fixes could > have just been taken and rc5 being released as final. (which we did anyway > but 3 days later) > > c: we consider everything fine and keep the process > > d: better ideas One thing I've noticed is that softfreeze/early hardfreeze qemus often seem more unstable than versions earlier in the development cycle - probably because people panic and rush to get code in for the release. I don't know if stricter rules/enforcement of what is supposed to go in during softfreeze/hardfreeze would help here.
On 05/12/2016 10:06 AM, Cornelia Huck wrote: > On Thu, 12 May 2016 09:40:21 +0200 > Christian Borntraeger <borntraeger@de.ibm.com> wrote: > >> Maybe a topic for this years QEMU summit could be to talk about >> release process and release criterias. > > +1 to that. > >> We could >> a: allow more patches , e.g. I thing that this patch would be have >> been taken in the Linux kernel a day before the release, see for >> example what is applied 4 days before a release as network fixes: >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4d8bbbff1227bbb27fdb02b6db17f080c06eedad >> 22 files changed, 258 insertions, 86 deletions > > Personally, I would probably go for something between applying this > patch and that networking pull :) > >> b: as we are strict and only apply hand selected patches, regressions are >> very unlikely, so we could release sooner. For example the CVE fixes could >> have just been taken and rc5 being released as final. (which we did anyway >> but 3 days later) >> >> c: we consider everything fine and keep the process >> >> d: better ideas > > One thing I've noticed is that softfreeze/early hardfreeze qemus often > seem more unstable than versions earlier in the development cycle - > probably because people panic and rush to get code in for the release. > I don't know if stricter rules/enforcement of what is supposed to go in > during softfreeze/hardfreeze would help here. Yes, there are some problems here. But I fully agree with Peter. We really do need more infrastructure and people to - maintain stable release much more often and for more than one release (that would allow to be less strict before a release) - have something like qemu-next - have something like kbuild test robot (aka 0-Day) - have releases more often (to reduce the pressure to rush in) Christian
On Mon, May 09, 2016 at 06:44:00PM +0200, Aurelien Jarno wrote: > Recent versions of GCC report the following error when compiling > target-mips/helper.c: > > qemu/target-mips/helper.c:542:9: warning: ‘memset’ used with length > equal to number of elements without multiplication by element size > [-Wmemset-elt-size] > > This is indeed correct and due to a wrong usage of sizeof(). Fix that. > > Cc: Stefan Weil <sw@weilnetz.de> > Cc: Leon Alrae <leon.alrae@imgtec.com> > LP: https://bugs.launchpad.net/qemu/+bug/1577841 > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> > --- > target-mips/helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied to target-mips queue and added Cc: qemu-stable@nongnu.org. Thanks, Leon
diff --git a/target-mips/helper.c b/target-mips/helper.c index 1004ede..cfea177 100644 --- a/target-mips/helper.c +++ b/target-mips/helper.c @@ -539,7 +539,7 @@ void mips_cpu_do_interrupt(CPUState *cs) break; case EXCP_SRESET: env->CP0_Status |= (1 << CP0St_SR); - memset(env->CP0_WatchLo, 0, sizeof(*env->CP0_WatchLo)); + memset(env->CP0_WatchLo, 0, sizeof(env->CP0_WatchLo)); goto set_error_EPC; case EXCP_NMI: env->CP0_Status |= (1 << CP0St_NMI);
Recent versions of GCC report the following error when compiling target-mips/helper.c: qemu/target-mips/helper.c:542:9: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size] This is indeed correct and due to a wrong usage of sizeof(). Fix that. Cc: Stefan Weil <sw@weilnetz.de> Cc: Leon Alrae <leon.alrae@imgtec.com> LP: https://bugs.launchpad.net/qemu/+bug/1577841 Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> --- target-mips/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)