MIPS: VDSO: Prevent use of smp_processor_id()
authorPaul Burton <paul.burton@mips.com>
Tue, 12 Dec 2017 09:57:47 +0000 (09:57 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Sep 2019 05:12:44 +0000 (07:12 +0200)
commite3484129eb0f7c67c85868d1584f1e6335e86efa
tree44575235777e606177a4678fd3790f6bab30c86f
parent2a24255bdc2aacf7ce3e68e6573b3e314bffefea
MIPS: VDSO: Prevent use of smp_processor_id()

commit 351fdddd366245c0fb4636f32edfb4198c8d6b8c upstream.

VDSO code should not be using smp_processor_id(), since it is executed
in user mode.
Introduce a VDSO-specific path which will cause a compile-time
or link-time error (depending upon support for __compiletime_error) if
the VDSO ever incorrectly attempts to use smp_processor_id().

[Matt Redfearn <matt.redfearn@imgtec.com>: Move before change to
smp_processor_id in series]

Signed-off-by: Paul Burton <paul.burton@mips.com>
Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/17932/
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/include/asm/smp.h
arch/mips/vdso/Makefile