[PATCH] vfprintf: validate nargs and maybe allocate from heap
Ryan S. Arnold
ryan.arnold@gmail.com
Tue Feb 14 22:25:00 GMT 2012
On Fri, Feb 10, 2012 at 1:24 PM, Kees Cook <kees@outflux.net> wrote:
> Hi,
>
> Just checking in on this. Is anyone willing to ACK this patch?
>
> Thanks!
Hi Kees,
The patch passed make check for PowerPC 32-bit and Libdfp 32-bit
regression testing of the printf-hooks mechanism.
Currently I'm testing PowerPC 64-bit and bug-vfprintf-nargs is getting
killed by the skeleton code due to a timeout before the expected
SEGV happens.
>From my tests it looks like the test-case needs a TIMEOUTFACTOR
environment variable to give the test time to SEGV on PowerPC64. On a
system that's not under load a timeoutfactor of 10 seemed to be
adequate.
in sysdeps/powerpc/powerpc64/Makefile:
ifeq ($(subdir),stdio-common)
bug-vfprintf-nargs-ENV = TIMEOUTFACTOR="10"
endif
The problem with this method is that this may still fail with a
SIGALRM before the SEGV happens on a system under load (for instance
under a parallel make check).
The other possibility is to changed the expected signal to SIGALRM for
powerpc64 in bug-vfprintf-nargs.c:
#if __WORDSIZE == 32
# define EXPECTED_STATUS 0
#elif defined __powerpc64__
# define EXPECTED_SIGNAL SIGALRM
#else
# define EXPECTED_SIGNAL SIGSEGV
#endif
Of course, on a system that's not under loader this may SEGV before
the timeout is hit and SIGALRM is raised.
Ryan
More information about the Libc-alpha
mailing list