]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
x86 vDSO: don't use disabled vDSO for signal trampoline
authorRoland McGrath <roland@redhat.com>
Wed, 9 Apr 2008 08:29:27 +0000 (01:29 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:40:45 +0000 (17:40 +0200)
commit1a3e4ca41c5a38975023a6e8831c309d3322889c
tree83036829962928b992efa58f03e36de40db313e1
parent85eb69a16aab5a394ce043c2131319eae35e6493
x86 vDSO: don't use disabled vDSO for signal trampoline

If the vDSO was not mapped, don't use it as the "restorer" for a signal
handler.  Whether we have a pointer in mm->context.vdso depends on what
happened at exec time, so we shouldn't check any global flags now.

Background:

Currently, every 32-bit exec gets the vDSO mapped even if it's disabled
(the process just doesn't get told about it).  Because it's in fact
always there, the bug that this patch fixes cannot happen now.  With
the second patch, it won't be mapped at all when it's disabled, which is
one of the things that people might really want when they disable it (so
nothing they didn't ask for goes into their address space).

The 32-bit signal handler setup when SA_RESTORER is not used refers to
current->mm->context.vdso without regard to whether the vDSO has been
disabled when the process was exec'd.  This patch fixes this not to use
it when it's null, which becomes possible after the second patch. (This
never happens in normal use, because glibc's sigaction call uses
SA_RESTORER unless glibc detected the vDSO.)

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/ia32/ia32_signal.c
arch/x86/kernel/signal_32.c