This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] vfprintf: validate nargs and maybe allocate from heap
- From: "Ryan S. Arnold" <ryan dot arnold at gmail dot com>
- To: Kees Cook <kees at outflux dot net>
- Cc: libc-alpha at sourceware dot org, Paul Eggert <eggert at cs dot ucla dot edu>, Roland McGrath <roland at hack dot frob dot com>, Andreas Schwab <schwab at linux-m68k dot org>
- Date: Tue, 14 Feb 2012 16:20:17 -0600
- Subject: Re: [PATCH] vfprintf: validate nargs and maybe allocate from heap
- References: <20120206062537.GM4979@outflux.net><20120207000509.GP4989@outflux.net><20120210192457.GF20420@outflux.net>
On Fri, Feb 10, 2012 at 1:24 PM, Kees Cook <email@example.com> wrote:
> Just checking in on this. Is anyone willing to ACK this patch?
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
>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
bug-vfprintf-nargs-ENV = TIMEOUTFACTOR="10"
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
# define EXPECTED_SIGNAL SIGSEGV
Of course, on a system that's not under loader this may SEGV before
the timeout is hit and SIGALRM is raised.