mbox series

[4.14,V2,00/17] V4.14 backport of more 32-bit arm spectre patches

Message ID 20190214021022.5313-1-dave.long@linaro.org
Headers show
Series V4.14 backport of more 32-bit arm spectre patches | expand

Message

David Long Feb. 14, 2019, 2:10 a.m. UTC
From: "David A. Long" <dave.long@linaro.org>


V4.14 backport of spectre patches from Russell M. King's spectre branch.
Patches have been kvm-unit-test'ed on an arndale, run through kernelci, and
handed off to ARM for functional testing.

Julien Thierry (10):
  ARM: 8789/1: signal: copy registers using __copy_to_user()
  ARM: 8790/1: signal: always use __copy_to_user to save iwmmxt context
  ARM: 8791/1: vfp: use __copy_to_user() when saving VFP state
  ARM: 8792/1: oabi-compat: copy oabi events using __copy_to_user()
  ARM: 8793/1: signal: replace __put_user_error with __put_user
  ARM: 8794/1: uaccess: Prevent speculative use of the current
    addr_limit
  ARM: 8795/1: spectre-v1.1: use put_user() for __put_user()
  ARM: 8796/1: spectre-v1,v1.1: provide helpers for address sanitization
  ARM: 8797/1: spectre-v1.1: harden __copy_to_user
  ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc

Russell King (7):
  ARM: make lookup_processor_type() non-__init
  ARM: split out processor lookup
  ARM: clean up per-processor check_bugs method call
  ARM: add PROC_VTABLE and PROC_TABLE macros
  ARM: spectre-v2: per-CPU vtables to work around big.Little systems
  ARM: ensure that processor vtables is not lost after boot
  ARM: fix the cockup in the previous patch

 arch/arm/include/asm/assembler.h   | 11 ++++
 arch/arm/include/asm/cputype.h     |  1 +
 arch/arm/include/asm/proc-fns.h    | 61 ++++++++++++++++++-----
 arch/arm/include/asm/thread_info.h |  4 +-
 arch/arm/include/asm/uaccess.h     | 49 +++++++++++++++---
 arch/arm/kernel/bugs.c             |  4 +-
 arch/arm/kernel/head-common.S      |  6 +--
 arch/arm/kernel/setup.c            | 40 +++++++++------
 arch/arm/kernel/signal.c           | 80 ++++++++++++++++--------------
 arch/arm/kernel/smp.c              | 31 ++++++++++++
 arch/arm/kernel/sys_oabi-compat.c  |  8 ++-
 arch/arm/lib/copy_from_user.S      |  6 +--
 arch/arm/lib/copy_to_user.S        |  6 ++-
 arch/arm/lib/uaccess_with_memcpy.c |  3 +-
 arch/arm/mm/proc-macros.S          | 10 ++++
 arch/arm/mm/proc-v7-bugs.c         | 17 +------
 arch/arm/vfp/vfpmodule.c           | 20 +++-----
 17 files changed, 245 insertions(+), 112 deletions(-)

-- 
2.17.1

Comments

Julien Thierry Feb. 14, 2019, 8:54 a.m. UTC | #1
Hi David,

On 14/02/2019 02:10, David Long wrote:
> From: "David A. Long" <dave.long@linaro.org>

> 

> V4.14 backport of spectre patches from Russell M. King's spectre branch.

> Patches have been kvm-unit-test'ed on an arndale, run through kernelci, and

> handed off to ARM for functional testing.


Same as 4.19 backports, I've reviewed these as well.

For patches 1 to 10 I can also confirm the generated code for the
mitigation looks sane.

Reviewed-by: Julien Thierry <julien.thierry@arm.com>


For patches 11 to 17, tested on TC2 and CPUs use the correct method to
mitigate Spectre-v2.

Reviewed-by: Julien Thierry <julien.thierry@arm.com>

Tested-by: Julien Thierry <julien.thierry@arm.com>


Thanks,

-- 
Julien Thierry
Sasha Levin Feb. 17, 2019, 7:16 p.m. UTC | #2
On Wed, Feb 13, 2019 at 09:10:05PM -0500, David Long wrote:
>From: "David A. Long" <dave.long@linaro.org>

>

>V4.14 backport of spectre patches from Russell M. King's spectre branch.

>Patches have been kvm-unit-test'ed on an arndale, run through kernelci, and

>handed off to ARM for functional testing.

>

>Julien Thierry (10):

>  ARM: 8789/1: signal: copy registers using __copy_to_user()

>  ARM: 8790/1: signal: always use __copy_to_user to save iwmmxt context

>  ARM: 8791/1: vfp: use __copy_to_user() when saving VFP state

>  ARM: 8792/1: oabi-compat: copy oabi events using __copy_to_user()

>  ARM: 8793/1: signal: replace __put_user_error with __put_user

>  ARM: 8794/1: uaccess: Prevent speculative use of the current

>    addr_limit

>  ARM: 8795/1: spectre-v1.1: use put_user() for __put_user()

>  ARM: 8796/1: spectre-v1,v1.1: provide helpers for address sanitization

>  ARM: 8797/1: spectre-v1.1: harden __copy_to_user

>  ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc

>

>Russell King (7):

>  ARM: make lookup_processor_type() non-__init

>  ARM: split out processor lookup

>  ARM: clean up per-processor check_bugs method call

>  ARM: add PROC_VTABLE and PROC_TABLE macros

>  ARM: spectre-v2: per-CPU vtables to work around big.Little systems

>  ARM: ensure that processor vtables is not lost after boot

>  ARM: fix the cockup in the previous patch


Queued for 4.14, thank you.

--
Thanks,
Sasha