Skip to content

ARM: spectre v1/v2 mitigations

Ard Biesheuvel linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest53 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/53ARM: 8051/1: put_user: fix possible data corruption in put_userarch/arm/include/asm/uaccess.h+1 -10 replies
2/53ARM: 8478/2: arm/arm64: add arm-smcccdrivers/firmware/Kconfig include/linux/arm-smccc.h+107 -00 replies
3/53ARM: 8479/2: add implementation for arm-smcccarch/arm/Kconfig arch/arm/kernel/Makefile arch/arm/kernel/armksyms.c +1 more+71 -00 replies
4/53ARM: 8480/2: arm64: add implementation for arm-smcccarch/arm64/Kconfig arch/arm64/kernel/Makefile arch/arm64/kernel/arm64ksyms.c +2 more+53 -10 replies
5/53ARM: 8481/2: drivers: psci: replace psci firmware callsarch/arm/Kconfig arch/arm/kernel/Makefile arch/arm/kernel/psci-call.S +3 more+23 -640 replies
6/53ARM: uaccess: remove put_user() code duplicationarch/arm/include/asm/uaccess.h+49 -570 replies
7/53ARM: Move system register accessors to asm/cp15.harch/arm/include/asm/arch_gicv3.h arch/arm/include/asm/cp15.h+26 -160 replies
8/53arm: kernel: Add SMC structure parameterarch/arm/kernel/armksyms.c arch/arm/kernel/smccc-call.S arch/arm64/kernel/arm64ksyms.c +3 more+57 -260 replies
9/53firmware: qcom: scm: Fix interrupted SCM callsarch/arm64/kernel/smccc-call.S include/linux/arm-smccc.h+16 -40 replies
10/53ARM: smccc: Update HVC comment to describe new quirk parameterinclude/linux/arm-smccc.h+1 -00 replies
11/53arm/arm64: KVM: Advertise SMCCC v1.1include/linux/arm-smccc.h+13 -00 replies
12/53arm64: KVM: Report SMCCC_ARCH_WORKAROUND_1 BP hardening supportinclude/linux/arm-smccc.h+5 -00 replies
13/53firmware/psci: Expose PSCI conduitdrivers/firmware/psci.c include/linux/psci.h+30 -50 replies
14/53firmware/psci: Expose SMCCC version through psci_opsdrivers/firmware/psci.c include/linux/psci.h+33 -00 replies
15/53arm/arm64: smccc: Make function identifiers an unsigned quantityinclude/linux/arm-smccc.h+4 -20 replies
16/53arm/arm64: smccc: Implement SMCCC v1.1 inline primitiveinclude/linux/arm-smccc.h+141 -00 replies
17/53arm/arm64: smccc: Add SMCCC-specific return codesinclude/linux/arm-smccc.h+5 -00 replies
18/53arm/arm64: smccc-1.1: Make return values unsigned longinclude/linux/arm-smccc.h+10 -100 replies
19/53arm/arm64: smccc-1.1: Handle function result as parametersinclude/linux/arm-smccc.h+20 -100 replies
20/53ARM: add more CPU part numbers for Cortex and Brahma B15 CPUsarch/arm/include/asm/cputype.h+8 -00 replies
21/53ARM: bugs: prepare processor bug infrastructurearch/arm/include/asm/bugs.h arch/arm/kernel/Makefile arch/arm/kernel/bugs.c+12 -20 replies
22/53ARM: bugs: hook processor bug checking into SMP and suspend pathsarch/arm/include/asm/bugs.h arch/arm/kernel/bugs.c arch/arm/kernel/smp.c +1 more+13 -00 replies
23/53ARM: bugs: add support for per-processor bug checkingarch/arm/include/asm/proc-fns.h arch/arm/kernel/bugs.c arch/arm/mm/proc-macros.S+10 -10 replies
24/53ARM: spectre: add Kconfig symbol for CPUs vulnerable to Spectrearch/arm/mm/Kconfig+4 -00 replies
25/53ARM: spectre-v2: harden branch predictor on context switchesarch/arm/mm/Kconfig arch/arm/mm/proc-v7-2level.S arch/arm/mm/proc-v7.S+115 -350 replies
26/53ARM: spectre-v2: add Cortex A8 and A15 validation of the IBE bitarch/arm/mm/Makefile arch/arm/mm/proc-v7-bugs.c arch/arm/mm/proc-v7.S+39 -30 replies
27/53ARM: spectre-v2: harden user aborts in kernel spacearch/arm/include/asm/cp15.h arch/arm/include/asm/system_misc.h arch/arm/mm/fault.c +2 more+94 -80 replies
28/53ARM: spectre-v2: add firmware based hardeningarch/arm/mm/proc-v7-bugs.c arch/arm/mm/proc-v7.S+81 -00 replies
29/53ARM: spectre-v2: warn about incorrect context switching functionsarch/arm/mm/proc-v7-bugs.c+15 -00 replies
30/53ARM: spectre-v1: add speculation barrier (csdb) macrosarch/arm/include/asm/assembler.h arch/arm/include/asm/barrier.h+21 -00 replies
31/53ARM: spectre-v1: add array_index_mask_nospec() implementationarch/arm/include/asm/barrier.h+21 -00 replies
32/53ARM: spectre-v1: fix syscall entryarch/arm/kernel/entry-common.S arch/arm/kernel/entry-header.S+32 -110 replies
33/53ARM: signal: copy registers using __copy_from_user()arch/arm/kernel/signal.c+21 -170 replies
34/53ARM: vfp: use __copy_from_user() when restoring VFP statearch/arm/include/asm/thread_info.h arch/arm/kernel/signal.c arch/arm/vfp/vfpmodule.c+17 -210 replies
35/53ARM: oabi-compat: copy semops using __copy_from_user()arch/arm/kernel/sys_oabi-compat.c+5 -30 replies
36/53ARM: use __inttype() in get_user()arch/arm/include/asm/uaccess.h+8 -10 replies
37/53ARM: spectre-v1: use get_user() for __get_user()arch/arm/include/asm/uaccess.h+11 -60 replies
38/53ARM: spectre-v1: mitigate user accessesarch/arm/include/asm/assembler.h arch/arm/lib/copy_from_user.S+13 -00 replies
39/53ARM: 8789/1: signal: copy registers using __copy_to_user()arch/arm/kernel/signal.c+27 -220 replies
40/53ARM: 8791/1: vfp: use __copy_to_user() when saving VFP statearch/arm/include/asm/thread_info.h arch/arm/kernel/signal.c arch/arm/vfp/vfpmodule.c+17 -200 replies
41/53ARM: 8792/1: oabi-compat: copy oabi events using __copy_to_user()arch/arm/kernel/sys_oabi-compat.c+6 -20 replies
42/53ARM: 8793/1: signal: replace __put_user_error with __put_userarch/arm/kernel/signal.c+4 -40 replies
43/53ARM: 8794/1: uaccess: Prevent speculative use of the current addr_limitarch/arm/include/asm/uaccess.h+8 -00 replies
44/53ARM: 8795/1: spectre-v1.1: use put_user() for __put_user()arch/arm/include/asm/uaccess.h+9 -60 replies
45/53ARM: 8796/1: spectre-v1, v1.1: provide helpers for address sanitizationarch/arm/include/asm/assembler.h arch/arm/include/asm/uaccess.h arch/arm/lib/copy_from_user.S+38 -50 replies
46/53ARM: 8810/1: vfp: Fix wrong assignement to ufp_excarch/arm/vfp/vfpmodule.c+1 -10 replies
47/53ARM: make lookup_processor_type() non-__initarch/arm/kernel/head-common.S+3 -30 replies
48/53ARM: split out processor lookuparch/arm/include/asm/cputype.h arch/arm/kernel/setup.c+20 -120 replies
49/53ARM: clean up per-processor check_bugs method callarch/arm/include/asm/proc-fns.h arch/arm/kernel/bugs.c+3 -20 replies
50/53ARM: add PROC_VTABLE and PROC_TABLE macrosarch/arm/include/asm/proc-fns.h arch/arm/kernel/setup.c+27 -160 replies
51/53ARM: spectre-v2: per-CPU vtables to work around big.Little systemsarch/arm/include/asm/proc-fns.h arch/arm/kernel/setup.c arch/arm/kernel/smp.c +1 more+62 -150 replies
52/53ARM: ensure that processor vtables is not lost after bootarch/arm/mm/proc-macros.S+10 -00 replies
53/53ARM: fix the cockup in the previous patcharch/arm/mm/proc-macros.S+2 -20 replies

Reviews trailers per patch

49 of 53 patches have a Reviewed-by or Acked-by.

PatchNicolas PitreLorenzo PieralisiLars PerssonWill DeaconMark RutlandMarc ZyngierArd BiesheuvelChristoffer DallGreg HackmannRobin MurphyFlorian FainelliTony LindgrenJulien ThierryKrzysztof Kozlowski
1/53R-b
2/53R-b
3/53R-b
4/53A-b
5/53A-b T-b A-b R-b T-b
6/53
7/53A-b
8/53R-b
9/53R-b
10/53
11/53T-b R-b T-b
12/53T-b R-b T-b
13/53A-b T-b T-b R-b
14/53A-b T-b T-b R-b
15/53A-b T-b T-b R-b
16/53T-b T-b R-b
17/53A-b R-b
18/53
19/53
20/53A-b A-b Boot-tested-by R-b
21/53A-b R-b Boot-tested-by R-b
22/53A-b R-b Boot-tested-by R-b
23/53A-b R-b Boot-tested-by R-b
24/53A-b R-b Boot-tested-by R-b
25/53A-b Boot-tested-by R-b
26/53R-b Boot-tested-by R-b
27/53Boot-tested-by R-b
28/53R-b Boot-tested-by R-b
29/53A-b Boot-tested-by R-b
30/53A-b Boot-tested-by R-b
31/53A-b Boot-tested-by R-b
32/53A-b Boot-tested-by R-b
33/53A-b
34/53A-b
35/53A-b
36/53A-b
37/53A-b
38/53A-b
39/53R-b
40/53R-b
41/53R-b
42/53R-b
43/53R-b
44/53R-b
45/53R-b
46/53R-b
47/53R-b R-b
48/53R-b R-b
49/53R-b R-b
50/53R-b R-b
51/53R-b R-b
52/53R-b T-b
53/53R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 14 reviewers.

Read the v1 thread

Cover letter [PATCH for-stable-v4.4 00/53] ARM: spectre v1/v2 mitigations

This is a backport to v4.4 of the Spectre v1 and v2 mitigations that have already been backported to v4.9. Note that this submission was not yet cc'ed to <[email protected]>, but is being proposed for review first.

Patches #20 and up were cherry-picked from the v4.9 tree, and applied cleanly. The first 19 patches are prerequisites that were introduced between v4.4 and v4.9, and some needed minor massaging to apply. Some notable issues:
- the 32-bit KVM host parts were omitted, given the lack of demand and the fact that those pieces saw significantly more churn during the v4.4-v4.9 timeframe due to the fact that the code is shared with arm64
- some other changes are shared between ARM and arm64 (notably, the ARM SMCCCC changes), so the backport affects both architectures
- patch #9 is needed due to the changes it makes to linux/arm-smccc.h, but the qcom firmware code is not actually used on 64-bit in v4.4, so we could drop the arm64 changes from it as well

Patches can be found at [0]. They were build and boot tested using a variety of ARM and arm64 configs and platforms, both locally and on KernelCI [1].

Comments and/or test results welcome. If no concerns are raised, I'll send these to -stable by the end of the week.

Cc Russell King <[email protected]>
Cc Will Deacon <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Marc Zyngier <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc Tony Lindgren <[email protected]>

[0] https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=for-kernelci
[1] https://kernelci.org/build/ardb/branch/for-kernelci/kernel/v4.4-12970-gf4fc4dad03aa/

Andrey Ryabinin (1):
ARM: 8051/1: put_user: fix possible data corruption in put_user

Andy Gross (2):
arm: kernel: Add SMC structure parameter
firmware: qcom: scm: Fix interrupted SCM calls

Jens Wiklander (4):
ARM: 8478/2: arm/arm64: add arm-smccc
ARM: 8479/2: add implementation for arm-smccc
ARM: 8480/2: arm64: add implementation for arm-smccc
ARM: 8481/2: drivers: psci: replace psci firmware calls

Julien Thierry (8):
ARM: 8789/1: signal: copy registers using __copy_to_user()
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: 8810/1: vfp: Fix wrong assignement to ufp_exc

Marc Zyngier (3):
arm/arm64: smccc: Add SMCCC-specific return codes arm/arm64: smccc-1.1: Make return values unsigned long arm/arm64: smccc-1.1: Handle function result as parameters

Mark Rutland (6):
arm/arm64: KVM: Advertise SMCCC v1.1
arm64: KVM: Report SMCCC_ARCH_WORKAROUND_1 BP hardening support firmware/psci: Expose PSCI conduit
firmware/psci: Expose SMCCC version through psci_ops arm/arm64: smccc: Make function identifiers an unsigned quantity arm/arm64: smccc: Implement SMCCC v1.1 inline primitive

Russell King (27):
ARM: uaccess: remove put_user() code duplication
ARM: add more CPU part numbers for Cortex and Brahma B15 CPUs
ARM: bugs: prepare processor bug infrastructure
ARM: bugs: hook processor bug checking into SMP and suspend paths
ARM: bugs: add support for per-processor bug checking
ARM: spectre: add Kconfig symbol for CPUs vulnerable to Spectre
ARM: spectre-v2: harden branch predictor on context switches
ARM: spectre-v2: add Cortex A8 and A15 validation of the IBE bit
ARM: spectre-v2: harden user aborts in kernel space
ARM: spectre-v2: add firmware based hardening
ARM: spectre-v2: warn about incorrect context switching functions
ARM: spectre-v1: add speculation barrier (csdb) macros
ARM: spectre-v1: add array_index_mask_nospec() implementation
ARM: spectre-v1: fix syscall entry
ARM: signal: copy registers using __copy_from_user()
ARM: vfp: use __copy_from_user() when restoring VFP state
ARM: oabi-compat: copy semops using __copy_from_user()
ARM: use __inttype() in get_user()
ARM: spectre-v1: use get_user() for __get_user()
ARM: spectre-v1: mitigate user accesses
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

Vladimir Murzin (1):
ARM: Move system register accessors to asm/cp15.h

Will Deacon (1):
ARM: smccc: Update HVC comment to describe new quirk parameter

 arch/arm/Kconfig                   |   3 +-
 arch/arm/include/asm/arch_gicv3.h  |  27 +-
 arch/arm/include/asm/assembler.h   |  23 ++
 arch/arm/include/asm/barrier.h     |  34 +++
 arch/arm/include/asm/bugs.h        |   6 +-
 arch/arm/include/asm/cp15.h        |  18 ++
 arch/arm/include/asm/cputype.h     |   9 +
 arch/arm/include/asm/proc-fns.h    |  65 +++-
 arch/arm/include/asm/system_misc.h |  15 +
 arch/arm/include/asm/thread_info.h |   8 +-
 arch/arm/include/asm/uaccess.h     | 177 ++++++-----
 arch/arm/kernel/Makefile           |   4 +-
 arch/arm/kernel/armksyms.c         |   6 +
 arch/arm/kernel/bugs.c             |  18 ++
 arch/arm/kernel/entry-common.S     |  18 +-
 arch/arm/kernel/entry-header.S     |  25 ++
 arch/arm/kernel/head-common.S      |   6 +-
 arch/arm/kernel/psci-call.S        |  31 --
 arch/arm/kernel/setup.c            |  40 ++-
 arch/arm/kernel/signal.c           | 125 ++++----
 arch/arm/kernel/smccc-call.S       |  64 ++++
 arch/arm/kernel/smp.c              |  36 +++
 arch/arm/kernel/suspend.c          |   2 +
 arch/arm/kernel/sys_oabi-compat.c  |  16 +-
 arch/arm/lib/copy_from_user.S      |   5 +
 arch/arm/mm/Kconfig                |  23 ++
 arch/arm/mm/Makefile               |   2 +-
 arch/arm/mm/fault.c                |   3 +
 arch/arm/mm/proc-macros.S          |  13 +-
 arch/arm/mm/proc-v7-2level.S       |   6 -
 arch/arm/mm/proc-v7-bugs.c         | 161 ++++++++++
 arch/arm/mm/proc-v7.S              | 154 ++++++++--
 arch/arm/vfp/vfpmodule.c           |  37 +--
 arch/arm64/Kconfig                 |   1 +
 arch/arm64/kernel/Makefile         |   4 +-
 arch/arm64/kernel/arm64ksyms.c     |   5 +
 arch/arm64/kernel/asm-offsets.c    |   6 +
 arch/arm64/kernel/psci-call.S      |  28 --
 arch/arm64/kernel/smccc-call.S     |  52 ++++
 drivers/firmware/Kconfig           |   3 +
 drivers/firmware/psci.c            |  78 ++++-
 include/linux/arm-smccc.h          | 310 ++++++++++++++++++++
 include/linux/psci.h               |  13 +
 43 files changed, 1354 insertions(+), 326 deletions(-)
 create mode 100644 arch/arm/kernel/bugs.c
 delete mode 100644 arch/arm/kernel/psci-call.S
 create mode 100644 arch/arm/kernel/smccc-call.S
 create mode 100644 arch/arm/mm/proc-v7-bugs.c
 delete mode 100644 arch/arm64/kernel/psci-call.S
 create mode 100644 arch/arm64/kernel/smccc-call.S
 create mode 100644 include/linux/arm-smccc.h
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel