[BZ 16372] fixing tst-longjmp_chk2 on ia64

Mike Frysinger vapier@gentoo.org
Fri Dec 27 18:07:00 GMT 2013


On Friday 27 December 2013 06:22:08 Andreas Schwab wrote:
> Mike Frysinger <vapier@gentoo.org> writes:
> > i was going through the outstanding ia64 test failures when i came across
> > tst- longjmp_chk2.  that test is designed to make sure the longjmp
> > fortify logic handles signal stacks correctly which the current ia64
> > code does not.  to implement this, you have to call sigaltstack from asm
> > code, and my ia64 skills are bad :).
> > 
> > here's what i've got so far:
> > #define CHECK_RSP(reg) \
> >         /* First see if target stack is within current one.  */ \
> >         cmp.ltu p0, p8 = reg, r12;                              \
> > (p8)    br.cond.dpnt .Lok;;                                     \
> >                                                                 \
> >         /* Maybe it's an alternative signal stack.  */          \
> >         adds r34 = -sizeSS, r12;                                \
> 
> How did you allocate the space for the stack_t?

afaik, r12 is the sp, so this line is allocating stack_t using the current 
stack.  just before the syscall, i update r12:
	mov r12 = r9;

in a previous version i was using r9 instead of r34 ... guess i need to update 
this line too so the stack is properly adjusted before calling the kernel.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20131227/8e1159bb/attachment.sig>


More information about the Libc-alpha mailing list