DragonFly submit List (threaded) for 2008-03
DragonFly BSD
DragonFly submit List (threaded) for 2008-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [patch] clear direction flag for signal handlers


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 Mar 2008 12:19:45 -0700 (PDT)

:swildner@ pointed out that there's yet another path that ends up running
:a signal handler (for linux binaries). Updated patch follows.
:
:gcc-4.3 assumes the direction flag is clear on function entry as
:specified by the i386 abi. Ensure that is the case when running
:a signal handler.
:
:Linux-kernel discussion with gcc people starts here:
:http://article.gmane.org/gmane.linux.kernel/650279
:
:Index: platform/pc32/i386/machdep.c
:===================================================================
:retrieving revision 1.129
:diff -u -r1.129 machdep.c
:--- platform/pc32/i386/machdep.c
:+++ platform/pc32/i386/machdep.c
:@@ -515,7 +515,13 @@
: 
: 	regs->tf_esp = (int)sfp;
: 	regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode);
:-	regs->tf_eflags &= ~PSL_T;
:+
:+	/*
:...

    It all looks good, definitely commit it and maybe even MFC it to
    the release branch too.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]