Commit 13eb192d authored by James Hogan's avatar James Hogan Committed by Ralf Baechle
Browse files

MIPS: Fix sigreturn via VDSO on microMIPS kernel

In microMIPS kernels, handle_signal() sets the isa16 mode bit in the
vdso address so that the sigreturn trampolines (which are offset from
the VDSO) get executed as microMIPS.

However commit ebb5e78c ("MIPS: Initial implementation of a VDSO")
changed the offsets to come from the VDSO image, which already have the
isa16 mode bit set correctly since they're extracted from the VDSO
shared library symbol table.

Drop the isa16 mode bit handling from handle_signal() to fix sigreturn
for cores which support both microMIPS and normal MIPS. This doesn't fix
microMIPS only cores, since the VDSO is still built for normal MIPS, but
thats a separate problem.

Fixes: ebb5e78c

 ("MIPS: Initial implementation of a VDSO")
Signed-off-by: default avatarJames Hogan <>
Cc: Paul Burton <>
Cc: <> # 4.4.x-

Signed-off-by: default avatarRalf Baechle <>
parent 5214cae7
......@@ -770,15 +770,7 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)
sigset_t *oldset = sigmask_to_save();
int ret;
struct mips_abi *abi = current->thread.abi;
void *vdso;
unsigned long tmp = (unsigned long)current->mm->context.vdso;
vdso = (void *)tmp;
void *vdso = current->mm->context.vdso;
if (regs->regs[0]) {
switch(regs->regs[2]) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment