]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Thu, 26 Sep 2019 04:34:52 +0000 (00:34 -0400)
commit2639b7583ac596b9e26f9545cdc42f168470c08a
tree842c5ecc8e8713daebed6b829512339a3f06af08
parentff2726ac7f151126c8688750bc0088beb097f7db
MIPS: VDSO: Prevent use of smp_processor_id()

BugLink: https://bugs.launchpad.net/bugs/1845266
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/mips/include/asm/smp.h
arch/mips/vdso/Makefile