stubdom: fix errors in newlib
PATCH 1/1 stubdom: fix errors in newlib
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1341839122 -7200
# Node ID 2dd50c201ca0d3542f3589942ae9e51d33ec7509 # Parent 42f76d536b116d2ebad1b6705ae51ecd171d2581
stubdom: fix errors in newlib
rpmlint found a few code bugs in newlib, and marks them as errors after rpm build. Add another newlib patch and apply it during stubdom build.
I: A function uses a 'return;' statement, but has actually a value
to return, like an integer ('return 42;') or similar.
W: xen voidreturn ../../../../newlib-1.16.0/libgloss/i386/cygmon-gmon.c:117, 125, 146, 157, 330
I: Program is using implicit definitions of special functions.
these functions need to use their correct prototypes to allow
the lightweight buffer overflow checking to work.
- Implicit memory/string functions need #include <string.h>.
- Implicit *printf functions need #include <stdio.h>.
- Implicit *printf functions need #include <stdio.h>.
- Implicit *read* functions need #include <unistd.h>.
- Implicit *recv* functions need #include <sys/socket.h>.
E: xen implicit-fortify-decl ../../../../newlib-1.16.0/libgloss/i386/cygmon-gmon.c:119
I: Program returns random data in a function
E: xen no-return-in-nonvoid-function ../../../../newlib-1.16.0/libgloss/i386/cygmon-gmon.c:362
stubdom/Makefile +1 -0
@@ -102,6 +102,7 @@ newlib-$(NEWLIB_VERSION): newlib-$(NEWLI patch -d $@ -p0 < newlib.patch patch -d $@ -p0 < newlib-chk.patch patch -d $@ -p1 < newlib-stdint-size_max-fix-from-1.17.0.patch + patch -d $@ -p1 < newlib-cygmon-gmon.patch find $@ -type f | xargs perl -i.bak \ -pe 's/\b_(tzname|daylight|timezone)\b/$$1/g' touch $@
stubdom/newlib-cygmon-gmon.patch new file +51 -0
51 lines not on this page · raw message
Quoted 9 lines · Olaf Hering
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1341839122 -7200
# Node ID2dd50c201ca0d3542f3589942ae9e51d33ec7509# Parent42f76d536b116d2ebad1b6705ae51ecd171d2581
stubdom: fix errors in newlibrpmlint found a few code bugs in newlib, and marks them as errors after rpm build. Add another newlib patch and apply it during stubdom build.
Are any of these specific to Xen or should they really be being sent to newlib upstream? (we could really do with resyncing on he latest newlib and sending or our patches again it. In our CFT of course ;-))
Ian.
Quoted 8 lines · Ian Campbell
Quoted 7 lines · Olaf Hering
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1341839122 -7200
# Node ID2dd50c201ca0d3542f3589942ae9e51d33ec7509# Parent42f76d536b116d2ebad1b6705ae51ecd171d2581
stubdom: fix errors in newlib
Quoted 6 lines
Quoted 2 lines
rpmlint found a few code bugs in newlib, and marks them as errors after rpm build. Add another newlib patch and apply it during stubdom build.
Are any of these specific to Xen or should they really be being sent to newlib upstream? (we could really do with resyncing on he latest newlib and sending or our patches again it. In our CFT of course ;-))
I have not yet checked wether upstream has the same issue, just trying to fix the build errors.
Olaf
Quoted 8 lines · Ian Campbell
Quoted 7 lines · Olaf Hering
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1341839122 -7200
# Node ID2dd50c201ca0d3542f3589942ae9e51d33ec7509# Parent42f76d536b116d2ebad1b6705ae51ecd171d2581
stubdom: fix errors in newlib
Quoted 6 lines
Quoted 2 lines
rpmlint found a few code bugs in newlib, and marks them as errors after rpm build. Add another newlib patch and apply it during stubdom build.
Are any of these specific to Xen or should they really be being sent to newlib upstream? (we could really do with resyncing on he latest newlib and sending or our patches again it. In our CFT of course ;-))
There are more issues in that file, I will send another version later.
Olaf
PATCH 1/1 stubdom: fix errors in newlib
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1342079763 -7200
# Node ID 599f8f767c86d0445fd57d1525196b80056d9483 # Parent 02ec826cab1e4acb25b364a180a1597ace1149f9
stubdom: fix errors in newlib
rpm post-build-checks found a few code bugs in newlib, and marks them as errors. Add another newlib patch and apply it during stubdom build.
I: A function uses a 'return;' statement, but has actually a value
to return, like an integer ('return 42;') or similar.
W: xen voidreturn ../../../../newlib-1.16.0/libgloss/i386/cygmon-gmon.c:117, 125, 146, 157, 330
I: Program is using implicit definitions of special functions.
these functions need to use their correct prototypes to allow
the lightweight buffer overflow checking to work.
- Implicit memory/string functions need #include <string.h>.
- Implicit *printf functions need #include <stdio.h>.
- Implicit *printf functions need #include <stdio.h>.
- Implicit *read* functions need #include <unistd.h>.
- Implicit *recv* functions need #include <sys/socket.h>.
E: xen implicit-fortify-decl ../../../../newlib-1.16.0/libgloss/i386/cygmon-gmon.c:119
I: Program returns random data in a function
E: xen no-return-in-nonvoid-function ../../../../newlib-1.16.0/libgloss/i386/cygmon-gmon.c:362
stubdom/Makefile +1 -0
@@ -102,6 +102,7 @@ newlib-$(NEWLIB_VERSION): newlib-$(NEWLI patch -d $@ -p0 < newlib.patch patch -d $@ -p0 < newlib-chk.patch patch -d $@ -p1 < newlib-stdint-size_max-fix-from-1.17.0.patch + patch -d $@ -p1 < newlib-cygmon-gmon.patch find $@ -type f | xargs perl -i.bak \ -pe 's/\b_(tzname|daylight|timezone)\b/$$1/g' touch $@
stubdom/newlib-cygmon-gmon.patch new file +60 -0
60 lines not on this page · raw message
Re: [PATCH] stubdom: fix errors in newlib [and 1 more messages]
Olaf Hering writes ("[Xen-devel] [PATCH] stubdom: fix errors in newlib"):
Quoted 1 line
stubdom: fix errors in newlib
Well, I agree with Ian's reservations about this:
Ian Campbell writes ("Re: [Xen-devel] [PATCH] stubdom: fix errors in newlib"):
Quoted 8 lines · Olaf Hering
Quoted 7 lines
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1341839122 -7200
# Node ID2dd50c201ca0d3542f3589942ae9e51d33ec7509# Parent42f76d536b116d2ebad1b6705ae51ecd171d2581
stubdom: fix errors in newlib
Quoted 6 lines
Quoted 2 lines
rpmlint found a few code bugs in newlib, and marks them as errors after rpm build. Add another newlib patch and apply it during stubdom build.
Are any of these specific to Xen or should they really be being sent to newlib upstream? (we could really do with resyncing on he latest newlib and sending or our patches again it. In our CFT of course ;-))
I definitely don't think we should be trying to drain the swamp of newlib's bad code in our own tree.
The right answer for your rpm checks is probably to disable them somehow. These are very likely to be real security problems in the context of stubdomains.
Ian.
Re: [PATCH] stubdom: fix errors in newlib [and 1 more messages]
Quoted 21 lines · Ian Jackson
Olaf Hering writes ("[Xen-devel] [PATCH] stubdom: fix errors in newlib"):
Quoted 1 line
stubdom: fix errors in newlib
Well, I agree with Ian's reservations about this:
Ian Campbell writes ("Re: [Xen-devel] [PATCH] stubdom: fix errors in newlib"):
Quoted 8 lines · Olaf Hering
Quoted 7 lines
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1341839122 -7200
# Node ID2dd50c201ca0d3542f3589942ae9e51d33ec7509# Parent42f76d536b116d2ebad1b6705ae51ecd171d2581
stubdom: fix errors in newlibQuoted 6 lines
Quoted 2 lines
rpmlint found a few code bugs in newlib, and marks them as errors after rpm build. Add another newlib patch and apply it during stubdom build.
Are any of these specific to Xen or should they really be being sent to newlib upstream? (we could really do with resyncing on he latest newlib and sending or our patches again it. In our CFT of course ;-))
Quoted 5 lines
I definitely don't think we should be trying to drain the swamp of newlib's bad code in our own tree.
The right answer for your rpm checks is probably to disable them somehow. These are very likely to be real security problems in the
^un ?
Quoted 3 lines
context of stubdomains.
Ian.
Re: [PATCH] stubdom: fix errors in newlib [and 1 more messages]
Ian Campbell writes ("Re: [Xen-devel] [PATCH] stubdom: fix errors in newlib [and 1 more messages]"):
Quoted 7 lines · Ian Jackson
Quoted 2 lines
The right answer for your rpm checks is probably to disable them somehow. These are very likely to be real security problems in the
^un ?Quoted 1 line
context of stubdomains.
Uh, yes.
I'll go and fetch more coffee.
Ian.
Re: [PATCH] stubdom: fix errors in newlib [and 1 more messages]
In reply to Ian JacksonQuoted 21 lines · Ian Jackson
Olaf Hering writes ("[Xen-devel] [PATCH] stubdom: fix errors in newlib"):
Quoted 1 line
stubdom: fix errors in newlib
Well, I agree with Ian's reservations about this:
Ian Campbell writes ("Re: [Xen-devel] [PATCH] stubdom: fix errors in newlib"):
Quoted 8 lines · Olaf Hering
Quoted 7 lines
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1341839122 -7200
# Node ID2dd50c201ca0d3542f3589942ae9e51d33ec7509# Parent42f76d536b116d2ebad1b6705ae51ecd171d2581
stubdom: fix errors in newlibQuoted 6 lines
Quoted 2 lines
rpmlint found a few code bugs in newlib, and marks them as errors after rpm build. Add another newlib patch and apply it during stubdom build.
Are any of these specific to Xen or should they really be being sent to newlib upstream? (we could really do with resyncing on he latest newlib and sending or our patches again it. In our CFT of course ;-))
Quoted 6 lines
I definitely don't think we should be trying to drain the swamp of newlib's bad code in our own tree.
The right answer for your rpm checks is probably to disable them somehow. These are very likely to be real security problems in the context of stubdomains.
I tried newlib 1.20, which seems to emit no such warnings. However building stubdom with the newer version leads to link errors. I havent spent time yet to find a fix for those failures.
Now that rc1 is out, its probably much too late to go for a more recent newlib to get around the build failures in current code?
Olaf
Re: [PATCH] stubdom: fix errors in newlib [and 1 more messages]
Quoted 26 lines · Olaf Hering
Quoted 24 lines · Ian Jackson
Olaf Hering writes ("[Xen-devel] [PATCH] stubdom: fix errors in newlib"):
Quoted 1 line
stubdom: fix errors in newlib
Well, I agree with Ian's reservations about this:
Ian Campbell writes ("Re: [Xen-devel] [PATCH] stubdom: fix errors in newlib"):
Quoted 8 lines · Olaf Hering
Quoted 7 lines
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1341839122 -7200
# Node ID2dd50c201ca0d3542f3589942ae9e51d33ec7509# Parent42f76d536b116d2ebad1b6705ae51ecd171d2581
stubdom: fix errors in newlibQuoted 6 lines
Quoted 2 lines
rpmlint found a few code bugs in newlib, and marks them as errors after rpm build. Add another newlib patch and apply it during stubdom build.
Are any of these specific to Xen or should they really be being sent to newlib upstream? (we could really do with resyncing on he latest newlib and sending or our patches again it. In our CFT of course ;-))
I definitely don't think we should be trying to drain the swamp of newlib's bad code in our own tree.
Quoted 7 lines
Quoted 3 lines
The right answer for your rpm checks is probably to disable them somehow. These are very likely to be real security problems in the context of stubdomains.
I tried newlib 1.20, which seems to emit no such warnings. However building stubdom with the newer version leads to link errors. I havent spent time yet to find a fix for those failures.
This would be good to have for 4.3.
Quoted 2 lines
Now that rc1 is out, its probably much too late to go for a more recent newlib to get around the build failures in current code?
It was too late when we froze, never mind now!
Ian.