* [PATCH 0/2] MIPS: VDSO / microMIPS fixes
@ 2016-05-24 8:35 James Hogan
2016-05-24 8:35 ` [PATCH 1/2] MIPS: Fix sigreturn via VDSO on microMIPS kernel James Hogan
2016-05-24 8:35 ` [PATCH 2/2] MIPS: Build microMIPS VDSO for microMIPS kernels James Hogan
0 siblings, 2 replies; 3+ messages in thread
From: James Hogan @ 2016-05-24 8:35 UTC (permalink / raw)
To: Ralf Baechle; +Cc: James Hogan, Paul Burton, linux-mips, stable
These patches fix breakage on microMIPS kernels caused by commit
ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") in v4.4.
The first patch drops stale microMIPS handling code when setting up
sigreturn which was causing serious breakage.
The second patch causes the VDSO to be built for microMIPS on microMIPS
kernels, which should avoid breakage on microMIPS only cores.
James Hogan (2):
MIPS: Fix sigreturn via VDSO on microMIPS kernel
MIPS: Build microMIPS VDSO for microMIPS kernels
arch/mips/kernel/signal.c | 8 --------
arch/mips/vdso/Makefile | 1 +
2 files changed, 1 insertion(+), 8 deletions(-)
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org>
--
2.4.10
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 1/2] MIPS: Fix sigreturn via VDSO on microMIPS kernel
2016-05-24 8:35 [PATCH 0/2] MIPS: VDSO / microMIPS fixes James Hogan
@ 2016-05-24 8:35 ` James Hogan
2016-05-24 8:35 ` [PATCH 2/2] MIPS: Build microMIPS VDSO for microMIPS kernels James Hogan
1 sibling, 0 replies; 3+ messages in thread
From: James Hogan @ 2016-05-24 8:35 UTC (permalink / raw)
To: Ralf Baechle; +Cc: James Hogan, Paul Burton, linux-mips, stable
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 ebb5e78cc634 ("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: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 4.4.x-
---
arch/mips/kernel/signal.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index ab042291fbfd..ae4231452115 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -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;
-#ifdef CONFIG_CPU_MICROMIPS
- void *vdso;
- unsigned long tmp = (unsigned long)current->mm->context.vdso;
-
- set_isa16_mode(tmp);
- vdso = (void *)tmp;
-#else
void *vdso = current->mm->context.vdso;
-#endif
if (regs->regs[0]) {
switch(regs->regs[2]) {
--
2.4.10
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] MIPS: Build microMIPS VDSO for microMIPS kernels
2016-05-24 8:35 [PATCH 0/2] MIPS: VDSO / microMIPS fixes James Hogan
2016-05-24 8:35 ` [PATCH 1/2] MIPS: Fix sigreturn via VDSO on microMIPS kernel James Hogan
@ 2016-05-24 8:35 ` James Hogan
1 sibling, 0 replies; 3+ messages in thread
From: James Hogan @ 2016-05-24 8:35 UTC (permalink / raw)
To: Ralf Baechle; +Cc: James Hogan, Paul Burton, linux-mips, stable
MicroMIPS kernels may be expected to run on microMIPS only cores which
don't support the normal MIPS instruction set, so be sure to pass the
-mmicromips flag through to the VDSO cflags.
Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 4.4.x-
---
arch/mips/vdso/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
index b369509e9753..a5ec3e5274c4 100644
--- a/arch/mips/vdso/Makefile
+++ b/arch/mips/vdso/Makefile
@@ -5,6 +5,7 @@ obj-vdso-y := elf.o gettimeofday.o sigreturn.o
ccflags-vdso := \
$(filter -I%,$(KBUILD_CFLAGS)) \
$(filter -E%,$(KBUILD_CFLAGS)) \
+ $(filter -mmicromips,$(KBUILD_CFLAGS)) \
$(filter -march=%,$(KBUILD_CFLAGS))
cflags-vdso := $(ccflags-vdso) \
$(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \
--
2.4.10
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-24 8:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-24 8:35 [PATCH 0/2] MIPS: VDSO / microMIPS fixes James Hogan
2016-05-24 8:35 ` [PATCH 1/2] MIPS: Fix sigreturn via VDSO on microMIPS kernel James Hogan
2016-05-24 8:35 ` [PATCH 2/2] MIPS: Build microMIPS VDSO for microMIPS kernels James Hogan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox