Skip to contentSkip to conversation

Linux 4.14.151

DISCUSSION Greg KH 1 participant 2 messages Oct 29, 2019 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 4.14.151 kernel.

All users of the 4.14 kernel series must upgrade.

The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Documentation/admin-guide/kernel-parameters.txt         |   16 
 Documentation/arm64/cpu-feature-registers.txt           |   26 
 Makefile                                                |    2 
 arch/arm/boot/dts/am4372.dtsi                           |    2 
 arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c |    3 
 arch/arm/xen/efi.c                                      |    2 
 arch/arm64/Kconfig                                      |    1 
 arch/arm64/include/asm/cpucaps.h                        |    6 
 arch/arm64/include/asm/cpufeature.h                     |  250 +++++++
 arch/arm64/include/asm/cputype.h                        |   43 +
 arch/arm64/include/asm/kvm_asm.h                        |    2 
 arch/arm64/include/asm/kvm_host.h                       |   11 
 arch/arm64/include/asm/processor.h                      |   22 
 arch/arm64/include/asm/ptrace.h                         |   58 +
 arch/arm64/include/asm/sysreg.h                         |   95 ++
 arch/arm64/include/asm/virt.h                           |    6 
 arch/arm64/include/uapi/asm/hwcap.h                     |   12 
 arch/arm64/include/uapi/asm/ptrace.h                    |    1 
 arch/arm64/kernel/bpi.S                                 |   19 
 arch/arm64/kernel/cpu_errata.c                          |  495 +++++++++------
 arch/arm64/kernel/cpufeature.c                          |  517 +++++++++++-----
 arch/arm64/kernel/cpuinfo.c                             |   12 
 arch/arm64/kernel/fpsimd.c                              |    1 
 arch/arm64/kernel/head.S                                |   13 
 arch/arm64/kernel/process.c                             |   31 
 arch/arm64/kernel/ptrace.c                              |   13 
 arch/arm64/kernel/smp.c                                 |   44 -
 arch/arm64/kernel/ssbd.c                                |   22 
 arch/arm64/kernel/traps.c                               |    4 
 arch/arm64/kvm/hyp/entry.S                              |   12 
 arch/arm64/kvm/hyp/switch.c                             |   10 
 arch/arm64/kvm/hyp/sysreg-sr.c                          |   11 
 arch/arm64/mm/fault.c                                   |    3 
 arch/arm64/mm/proc.S                                    |   24 
 arch/mips/boot/dts/qca/ar9331.dtsi                      |    2 
 arch/mips/loongson64/common/serial.c                    |    2 
 arch/mips/mm/tlbex.c                                    |   23 
 arch/parisc/mm/ioremap.c                                |   12 
 arch/x86/include/asm/kvm_host.h                         |    4 
 arch/x86/kernel/head64.c                                |   22 
 arch/x86/kvm/lapic.c                                    |   12 
 arch/x86/kvm/lapic.h                                    |   14 
 arch/x86/kvm/svm.c                                      |   18 
 arch/x86/kvm/vmx.c                                      |   79 +-
 arch/x86/kvm/x86.c                                      |   32 
 arch/x86/xen/efi.c                                      |    2 
 arch/xtensa/kernel/xtensa_ksyms.c                       |    7 
 drivers/base/core.c                                     |    3 
 drivers/base/memory.c                                   |    3 
 drivers/block/loop.c                                    |    1 
 drivers/cpufreq/cpufreq.c                               |   10 
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c                 |   35 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c                 |   35 -
 drivers/gpu/drm/drm_edid.c                              |    3 
 drivers/gpu/drm/radeon/radeon_drv.c                     |    8 
 drivers/infiniband/hw/cxgb4/mem.c                       |   28 
 drivers/input/misc/da9063_onkey.c                       |    5 
 drivers/input/rmi4/rmi_driver.c                         |    6 
 drivers/md/raid0.c                                      |    2 
 drivers/memstick/host/jmb38x_ms.c                       |    2 
 drivers/net/dsa/qca8k.c                                 |    4 
 drivers/net/ethernet/broadcom/genet/bcmgenet.h          |    1 
 drivers/net/ethernet/broadcom/genet/bcmmii.c            |   11 
 drivers/net/ethernet/hisilicon/hns_mdio.c               |    6 
 drivers/net/ethernet/i825xx/lasi_82596.c                |    4 
 drivers/net/ethernet/i825xx/lib82596.c                  |    4 
 drivers/net/ethernet/i825xx/sni_82596.c                 |    4 
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c       |   12 
 drivers/net/ieee802154/ca8210.c                         |    2 
 drivers/net/usb/r8152.c                                 |    3 
 drivers/net/xen-netback/interface.c                     |    1 
 drivers/pci/pci.c                                       |   24 
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c             |   26 
 drivers/s390/scsi/zfcp_fsf.c                            |   16 
 drivers/scsi/ch.c                                       |    1 
 drivers/scsi/megaraid.c                                 |    4 
 drivers/scsi/qla2xxx/qla_target.c                       |    4 
 drivers/scsi/scsi_error.c                               |    3 
 drivers/scsi/scsi_sysfs.c                               |   11 
 drivers/scsi/sd.c                                       |    3 
 drivers/scsi/ufs/ufshcd.c                               |    3 
 drivers/staging/wlan-ng/cfg80211.c                      |    6 
 drivers/usb/class/usblp.c                               |    4 
 drivers/usb/gadget/udc/lpc32xx_udc.c                    |    6 
 drivers/usb/misc/ldusb.c                                |   20 
 drivers/usb/misc/legousbtower.c                         |    5 
 drivers/usb/serial/ti_usb_3410_5052.c                   |   10 
 fs/btrfs/extent-tree.c                                  |    1 
 fs/cifs/smb1ops.c                                       |    3 
 fs/ocfs2/journal.c                                      |    3 
 fs/ocfs2/localalloc.c                                   |    3 
 fs/proc/page.c                                          |   28 
 include/scsi/scsi_eh.h                                  |    1 
 mm/hugetlb.c                                            |    5 
 mm/page_owner.c                                         |    5 
 mm/shmem.c                                              |   18 
 mm/slub.c                                               |   13 
 net/ipv4/route.c                                        |    9 
 net/mac80211/debugfs_netdev.c                           |   11 
 net/mac80211/mlme.c                                     |    5 
 net/sched/act_api.c                                     |   13 
 net/sctp/socket.c                                       |    4 
 net/wireless/nl80211.c                                  |    3 
 net/wireless/wext-sme.c                                 |    8 
 scripts/namespace.pl                                    |   13 
 sound/pci/hda/patch_realtek.c                           |    3 
 sound/soc/sh/rcar/core.c                                |    1 
 107 files changed, 1700 insertions(+), 807 deletions(-)

Alessio Balsini (1):
loop: Add LOOP_SET_DIRECT_IO to compat ioctl

Alex Deucher (1):
Revert "drm/radeon: Fix EEH during kexec"

Bart Van Assche (1):
scsi: ch: Make it possible to open a ch device multiple times again

Biao Huang (1):
net: stmmac: disable/enable ptp_ref_clk in suspend/resume flow

Christophe JAILLET (2):
mips: Loongson: Fix the link time qualifier of 'serial_exit()'
memstick: jmb38x_ms: Fix an error handling path in 'jmb38x_ms_probe()'

Colin Ian King (1):

      staging: wlan-ng: fix exit return when sme->key_idx >= NUM_WEPKEYS

Damien Le Moal (1):
scsi: core: save/restore command resid for error handling

Dave Martin (1):
arm64: capabilities: Update prototype for enable call back

David Hildenbrand (3):
drivers/base/memory.c: don't access uninitialized memmaps in soft_offline_page_store() fs/proc/page.c: don't access uninitialized memmaps in fs/proc/page.c
hugetlbfs: don't access uninitialized memmaps in pfn_range_valid_gigantic()

Dongjiu Geng (1):
arm64: v8.4: Support for new floating point multiplication instructions

Eric Dumazet (1):
net: avoid potential infinite loop in tc_ctl_action()

Evan Green (1):
Input: synaptics-rmi4 - avoid processing unknown IRQs

Florian Fainelli (2):
net: bcmgenet: Fix RGMII_MODE_EN value for GENET v1/2/3
net: bcmgenet: Set phydev->dev_flags only for internal PHYs

Greg KH (1):
RDMA/cxgb4: Do not dma memory off of the stack

Greg Kroah-Hartman (1):

      Linux 4.14.151

Gustavo A. R. Silva (1):
usb: udc: lpc32xx: fix bad bit shift operation

Hans de Goede (1):
drm/amdgpu: Bail earlier when amdgpu.cik_/si_support is not set to 1

Helge Deller (1):
parisc: Fix vmap memory leak in ioremap()/iounmap()

Jacob Keller (1):
namespace: fix namespace.pl script to support relative paths

James Morse (1):
arm64: sysreg: Move to use definitions for all the SCTLR bits

Jeremy Linton (6):
arm64: add sysfs vulnerability show for meltdown
arm64: Always enable ssb vulnerability detection
arm64: Provide a command line to disable spectre_v2 mitigation
arm64: Always enable spectre-v2 vulnerability detection
arm64: add sysfs vulnerability show for spectre-v2
arm64: add sysfs vulnerability show for speculative store bypass

Jim Mattson (2):
kvm: vmx: Introduce lapic_mode enumeration
kvm: vmx: Basic APIC virtualization controls have three settings

Johan Hovold (5):
USB: legousbtower: fix memleak on disconnect
USB: serial: ti_usb_3410_5052: fix port-close races
USB: ldusb: fix memleak on disconnect
USB: usblp: fix use-after-free on disconnect
USB: ldusb: fix read info leaks

Josh Poimboeuf (1):
arm64/speculation: Support 'mitigations=' cmdline option

Juergen Gross (1):
xen/netback: fix error path of xenvif_connect_data()

Junaid Shahid (1):
kvm: apic: Flush TLB after APIC mode/address change if VPIDs are in use

Junya Monden (1):
ASoC: rsnd: Reinitialize bit clock inversion flag for every format setting

Kai-Heng Feng (2):
r8152: Set macpassthru in reset_resume callback drm/edid: Add 6 bpc quirk for SDC panel in Lenovo G50

Kailang Yang (1):
ALSA: hda/realtek - Add support for ALC711

Marc Zyngier (4):
arm64: Get rid of __smccc_workaround_1_hvc_*
arm64: Advertise mitigation of Spectre-v2, or lack thereof
arm64: Force SSBS on context switch
arm64: Use firmware to detect CPUs that are not affected by Spectre-v2

Marco Felsch (1):
Input: da9063 - fix capability and drop KEY_SLEEP

Mark Rutland (5):
arm64: move SCTLR_EL{1,2} assertions to <asm/sysreg.h>
arm64: add PSR_AA32_* definitions
arm64: Introduce sysreg_clear_set()
arm64: don't zero DIT on signal return
arm64: fix SSBS sanitization

Matthew Wilcox (Oracle) (1):
memfd: Fix locking when tagging pins

Max Filippov (1):
xtensa: drop EXPORT_SYMBOL for outs*/ins*

Mian Yousaf Kaukab (2):
arm64: Add sysfs vulnerability show for spectre-v1
arm64: enable generic CPU vulnerabilites support

Miaoqing Pan (2):
nl80211: fix null pointer dereference
mac80211: fix txq null pointer dereference

Michal Vokáč (1):
net: dsa: qca8k: Use up to 7 ports for all operations

Navid Emamdoost (1):

      ieee802154: ca8210: prevent memory leak

Oleksij Rempel (1):
MIPS: dts: ar9331: fix interrupt-controller size

Oliver Neukum (1):
scsi: sd: Ignore a failure to sync cache due to lack of authorization

Patrick Williams (2):
pinctrl: armada-37xx: fix control of pins 32 and up
pinctrl: armada-37xx: swap polarity on LED group

Paul Burton (1):
MIPS: tlbex: Fix build_restore_pagemask KScratch restore

Peter Ujfalusi (1):
ARM: dts: am4372: Set memory bandwidth limit for DISPC

Qian Cai (2):
mm/slub: fix a deadlock in show_slab_objects()
mm/page_owner: don't access uninitialized memmaps when reading /proc/pagetypeinfo

Qu Wenruo (1):
btrfs: block-group: Fix a memory leak due to missing btrfs_put_block_group()

Quinn Tran (1):
scsi: qla2xxx: Fix unbound sleep in fcport delete path.

Rafael J. Wysocki (2):
cpufreq: Avoid cpufreq_suspend() deadlock on system shutdown
PCI: PM: Fix pci_power_up()

Roberto Bergantinos Corpas (1):

      CIFS: avoid using MID 0xFFFF

Ross Lagerwall (1):
xen/efi: Set nonblocking callbacks

Shanker Donthineni (1):
arm64: KVM: Use SMCCC_ARCH_WORKAROUND_1 for Falkor BP hardening

Song Liu (1):
md/raid0: fix warning message for parameter default_layout

Stanley Chu (1):
scsi: ufs: skip shutdown if hba is not powered

Stefano Brivio (1):
ipv4: Return -ENETUNREACH if we can't create route but saddr is valid

Steffen Maier (1):
scsi: zfcp: fix reaction on bit error threshold notification

Steve Wahl (1):
x86/boot/64: Make level2_kernel_pgt pages invalid outside kernel area

Suzuki K Poulose (22):
arm64: Expose support for optional ARMv8-A features
arm64: Fix the feature type for ID register fields
arm64: Documentation: cpu-feature-registers: Remove RES0 fields
arm64: Expose Arm v8.4 features
arm64: capabilities: Move errata work around check on boot CPU
arm64: capabilities: Move errata processing code
arm64: capabilities: Prepare for fine grained capabilities
arm64: capabilities: Add flags to handle the conflicts on late CPU
arm64: capabilities: Unify the verification
arm64: capabilities: Filter the entries based on a given mask
arm64: capabilities: Prepare for grouping features and errata work arounds
arm64: capabilities: Split the processing of errata work arounds
arm64: capabilities: Allow features based on local CPU scope
arm64: capabilities: Group handling of features and errata workarounds
arm64: capabilities: Introduce weak features based on local CPU
arm64: capabilities: Restrict KPTI detection to boot-time CPUs
arm64: capabilities: Add support for features enabled early
arm64: capabilities: Change scope of VHE to Boot CPU feature
arm64: capabilities: Clean up midr range helpers
arm64: Add helpers for checking CPU MIDR against a range
arm64: Add MIDR encoding for Arm Cortex-A55 and Cortex-A35
arm64: capabilities: Add support for checks based on a list of MIDRs

Thomas Bogendoerfer (1):

      net: i82596: fix dma_alloc_attr for sni_82596

Tony Lindgren (1):
ARM: OMAP2+: Fix missing reset done flag for am3 and am43

Wanpeng Li (1):
KVM: X86: introduce invalidate_gpa argument to tlb flush

Will Deacon (6):
arm64: cpufeature: Detect SSBS and advertise to userspace
arm64: ssbd: Add support for PSTATE.SSBS rather than trapping to EL3
KVM: arm64: Set SCTLR_EL2.DSSBS if SSBD is forcefully disabled and !vhe
arm64: ssbs: Don't treat CPUs with SSBS as unaffected by SSB
cfg80211: wext: avoid copying malformed SSIDs
mac80211: Reject malformed SSID elements

Xiang Chen (1):
scsi: megaraid: disable device when probe failed after enabled device

Xin Long (1):
sctp: change sctp_prot .no_autobind with true

Yi Li (1):
ocfs2: fix panic due to ocfs2_wq is null

Yizhuo (1):
net: hisilicon: Fix usage of uninitialized variable in function mdio_sc_cfg_reg_write()

Yufen Yu (1):
scsi: core: try to get module before removing device

author maintainer
#1 lore raw
Documentation/admin-guide/kernel-parameters.txt +9 -7
index 188a7db8501b..b67a6cd08ca1 100644
@@ -2389,8 +2389,8 @@
 			http://repo.or.cz/w/linux-2.6/mini2440.git
 
 	mitigations=
-			[X86,PPC,S390] Control optional mitigations for CPU
-			vulnerabilities.  This is a set of curated,
+			[X86,PPC,S390,ARM64] Control optional mitigations for
+			CPU vulnerabilities.  This is a set of curated,
 			arch-independent options, each of which is an
 			aggregation of existing arch-specific options.
 
@@ -2399,12 +2399,14 @@
 				improves system performance, but it may also
 				expose users to several CPU vulnerabilities.
 				Equivalent to: nopti [X86,PPC]
+					       kpti=0 [ARM64]
 					       nospectre_v1 [PPC]
 					       nobp=0 [S390]
 					       nospectre_v1 [X86]
-					       nospectre_v2 [X86,PPC,S390]
+					       nospectre_v2 [X86,PPC,S390,ARM64]
 					       spectre_v2_user=off [X86]
 					       spec_store_bypass_disable=off [X86,PPC]
+					       ssbd=force-off [ARM64]
 					       l1tf=off [X86]
 					       mds=off [X86]
 
@@ -2745,10 +2747,10 @@
 			(bounds check bypass). With this option data leaks
 			are possible in the system.
 
-	nospectre_v2	[X86,PPC_FSL_BOOK3E] Disable all mitigations for the Spectre variant 2
-			(indirect branch prediction) vulnerability. System may
-			allow data leaks with this option, which is equivalent
-			to spectre_v2=off.
+	nospectre_v2	[X86,PPC_FSL_BOOK3E,ARM64] Disable all mitigations for
+			the Spectre variant 2 (indirect branch prediction)
+			vulnerability. System may allow data leaks with this
+			option.
 
 	nospec_store_bypass_disable
 			[HW] Disable all mitigations for the Speculative Store Bypass vulnerability
Documentation/arm64/cpu-feature-registers.txt +22 -4
index dad411d635d8..7964f03846b1 100644
@@ -110,7 +110,17 @@ infrastructure:
      x--------------------------------------------------x
      | Name                         |  bits   | visible |
      |--------------------------------------------------|
-     | RES0                         | [63-32] |    n    |
+     | TS                           | [55-52] |    y    |
+     |--------------------------------------------------|
+     | FHM                          | [51-48] |    y    |
+     |--------------------------------------------------|
+     | DP                           | [47-44] |    y    |
+     |--------------------------------------------------|
+     | SM4                          | [43-40] |    y    |
+     |--------------------------------------------------|
+     | SM3                          | [39-36] |    y    |
+     |--------------------------------------------------|
+     | SHA3                         | [35-32] |    y    |
      |--------------------------------------------------|
      | RDM                          | [31-28] |    y    |
      |--------------------------------------------------|
@@ -123,8 +133,6 @@ infrastructure:
      | SHA1                         | [11-8]  |    y    |
      |--------------------------------------------------|
      | AES                          | [7-4]   |    y    |
-     |--------------------------------------------------|
-     | RES0                         | [3-0]   |    n    |
      x--------------------------------------------------x
 
 
@@ -132,7 +140,9 @@ infrastructure:
      x--------------------------------------------------x
      | Name                         |  bits   | visible |
      |--------------------------------------------------|
-     | RES0                         | [63-28] |    n    |
+     | DIT                          | [51-48] |    y    |
+     |--------------------------------------------------|
+     | SVE                          | [35-32] |    y    |
      |--------------------------------------------------|
      | GIC                          | [27-24] |    n    |
      |--------------------------------------------------|
@@ -183,6 +193,14 @@ infrastructure:
      | DPB                          | [3-0]   |    y    |
      x--------------------------------------------------x
 
+  5) ID_AA64MMFR2_EL1 - Memory model feature register 2
+
+     x--------------------------------------------------x
+     | Name                         |  bits   | visible |
+     |--------------------------------------------------|
+     | AT                           | [35-32] |    y    |
+     x--------------------------------------------------x
+
 Appendix I: Example
 ---------------------------
 
Makefile +1 -1
index 3d96b277ffc9..db996459d047 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 4
 PATCHLEVEL = 14
-SUBLEVEL = 150
+SUBLEVEL = 151
 EXTRAVERSION =
 NAME = Petit Gorille
 
arch/arm/boot/dts/am4372.dtsi +2 -0
index 4714a59fd86d..345c117bd5ef 100644
@@ -1118,6 +1118,8 @@
 				ti,hwmods = "dss_dispc";
 				clocks = <&disp_clk>;
 				clock-names = "fck";
+
+				max-memory-bandwidth = <230000000>;
 			};
 
 			rfbi: rfbi@4832a800 {
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +2 -1
index de06a1d5ffab..e61c14f59063 100644
@@ -966,7 +966,8 @@ static struct omap_hwmod_class_sysconfig am33xx_timer_sysc = {
 	.rev_offs	= 0x0000,
 	.sysc_offs	= 0x0010,
 	.syss_offs	= 0x0014,
-	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
+	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
+			  SYSC_HAS_RESET_STATUS,
 	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 			  SIDLE_SMART_WKUP),
 	.sysc_fields	= &omap_hwmod_sysc_type2,
arch/arm/xen/efi.c +2 -0
index b4d78959cadf..bc9a37b3cecd 100644
@@ -31,7 +31,9 @@ void __init xen_efi_runtime_setup(void)
 	efi.get_variable             = xen_efi_get_variable;
 	efi.get_next_variable        = xen_efi_get_next_variable;
 	efi.set_variable             = xen_efi_set_variable;
+	efi.set_variable_nonblocking = xen_efi_set_variable;
 	efi.query_variable_info      = xen_efi_query_variable_info;
+	efi.query_variable_info_nonblocking = xen_efi_query_variable_info;
 	efi.update_capsule           = xen_efi_update_capsule;
 	efi.query_capsule_caps       = xen_efi_query_capsule_caps;
 	efi.get_next_high_mono_count = xen_efi_get_next_high_mono_count;
arch/arm64/Kconfig +1 -0
index c30cd78b6918..e296ae3e20f4 100644
@@ -49,6 +49,7 @@ config ARM64
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CLOCKEVENTS_BROADCAST
 	select GENERIC_CPU_AUTOPROBE
+	select GENERIC_CPU_VULNERABILITIES
 	select GENERIC_EARLY_IOREMAP
 	select GENERIC_IDLE_POLL_SETUP
 	select GENERIC_IRQ_PROBE
arch/arm64/include/asm/cpucaps.h +3 -3
index 7d6425d426ac..2f8bd0388905 100644
@@ -42,9 +42,9 @@
 #define ARM64_HAS_DCPOP				21
 #define ARM64_UNMAP_KERNEL_AT_EL0		23
 #define ARM64_HARDEN_BRANCH_PREDICTOR		24
-#define ARM64_HARDEN_BP_POST_GUEST_EXIT		25
-#define ARM64_SSBD				26
-#define ARM64_MISMATCHED_CACHE_TYPE		27
+#define ARM64_SSBD				25
+#define ARM64_MISMATCHED_CACHE_TYPE		26
+#define ARM64_SSBS				27
 
 #define ARM64_NCAPS				28
 
arch/arm64/include/asm/cpufeature.h +230 -20

292 lines not on this page · raw message

arch/arm64/include/asm/cputype.h +43 -0

61 lines not on this page · raw message

arch/arm64/include/asm/kvm_asm.h +0 -2
index 1a6d02350fc6..c59e81b65132 100644
@@ -70,8 +70,6 @@ extern u32 __kvm_get_mdcr_el2(void);
 
 extern u32 __init_stage2_translation(void);
 
-extern void __qcom_hyp_sanitize_btac_predictors(void);
-
 /* Home-grown __this_cpu_{ptr,read} variants that always work at HYP */
 #define __hyp_this_cpu_ptr(sym)						\
 	({								\
arch/arm64/include/asm/kvm_host.h +11 -0
index b01ad3489bd8..f982c9d1d10b 100644
@@ -356,6 +356,8 @@ struct kvm_vcpu *kvm_mpidr_to_vcpu(struct kvm *kvm, unsigned long mpidr);
 void __kvm_set_tpidr_el2(u64 tpidr_el2);
 DECLARE_PER_CPU(kvm_cpu_context_t, kvm_host_cpu_state);
 
+void __kvm_enable_ssbs(void);
+
 static inline void __cpu_init_hyp_mode(phys_addr_t pgd_ptr,
 				       unsigned long hyp_stack_ptr,
 				       unsigned long vector_ptr)
@@ -380,6 +382,15 @@ static inline void __cpu_init_hyp_mode(phys_addr_t pgd_ptr,
 		- (u64)kvm_ksym_ref(kvm_host_cpu_state);
 
 	kvm_call_hyp(__kvm_set_tpidr_el2, tpidr_el2);
+
+	/*
+	 * Disabling SSBD on a non-VHE system requires us to enable SSBS
+	 * at EL2.
+	 */
+	if (!has_vhe() && this_cpu_has_cap(ARM64_SSBS) &&
+	    arm64_get_ssbd_state() == ARM64_SSBD_FORCE_DISABLE) {
+		kvm_call_hyp(__kvm_enable_ssbs);
+	}
 }
 
 static inline void kvm_arch_hardware_unsetup(void) {}
arch/arm64/include/asm/processor.h +20 -2
index 91bb97d8bdbf..9eb95ab19924 100644
@@ -37,6 +37,7 @@
 #include <linux/string.h>
 
 #include <asm/alternative.h>
+#include <asm/cpufeature.h>
 #include <asm/fpsimd.h>
 #include <asm/hw_breakpoint.h>
 #include <asm/lse.h>
@@ -147,11 +148,25 @@ static inline void start_thread_common(struct pt_regs *regs, unsigned long pc)
 	regs->pc = pc;
 }
 
+static inline void set_ssbs_bit(struct pt_regs *regs)
+{
+	regs->pstate |= PSR_SSBS_BIT;
+}
+
+static inline void set_compat_ssbs_bit(struct pt_regs *regs)
+{
+	regs->pstate |= PSR_AA32_SSBS_BIT;
+}
+
 static inline void start_thread(struct pt_regs *regs, unsigned long pc,
 				unsigned long sp)
 {
 	start_thread_common(regs, pc);
 	regs->pstate = PSR_MODE_EL0t;
+
+	if (arm64_get_ssbd_state() != ARM64_SSBD_FORCE_ENABLE)
+		set_ssbs_bit(regs);
+
 	regs->sp = sp;
 }
 
@@ -168,6 +183,9 @@ static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc,
 	regs->pstate |= COMPAT_PSR_E_BIT;
 #endif
 
+	if (arm64_get_ssbd_state() != ARM64_SSBD_FORCE_ENABLE)
+		set_compat_ssbs_bit(regs);
+
 	regs->compat_sp = sp;
 }
 #endif
@@ -222,8 +240,8 @@ static inline void spin_lock_prefetch(const void *ptr)
 
 #endif
 
-int cpu_enable_pan(void *__unused);
-int cpu_enable_cache_maint_trap(void *__unused);
+void cpu_enable_pan(const struct arm64_cpu_capabilities *__unused);
+void cpu_enable_cache_maint_trap(const struct arm64_cpu_capabilities *__unused);
 
 #endif /* __ASSEMBLY__ */
 #endif /* __ASM_PROCESSOR_H */
arch/arm64/include/asm/ptrace.h +57 -1

76 lines not on this page · raw message

arch/arm64/include/asm/sysreg.h +93 -2

168 lines not on this page · raw message

arch/arm64/include/asm/virt.h +0 -6
index c5f89442785c..9d1e24e030b3 100644
@@ -102,12 +102,6 @@ static inline bool has_vhe(void)
 	return false;
 }
 
-#ifdef CONFIG_ARM64_VHE
-extern void verify_cpu_run_el(void);
-#else
-static inline void verify_cpu_run_el(void) {}
-#endif
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* ! __ASM__VIRT_H */
arch/arm64/include/uapi/asm/hwcap.h +12 -0
index b3fdeee739ea..2bcd6e4f3474 100644
@@ -37,5 +37,17 @@
 #define HWCAP_FCMA		(1 << 14)
 #define HWCAP_LRCPC		(1 << 15)
 #define HWCAP_DCPOP		(1 << 16)
+#define HWCAP_SHA3		(1 << 17)
+#define HWCAP_SM3		(1 << 18)
+#define HWCAP_SM4		(1 << 19)
+#define HWCAP_ASIMDDP		(1 << 20)
+#define HWCAP_SHA512		(1 << 21)
+#define HWCAP_SVE		(1 << 22)
+#define HWCAP_ASIMDFHM		(1 << 23)
+#define HWCAP_DIT		(1 << 24)
+#define HWCAP_USCAT		(1 << 25)
+#define HWCAP_ILRCPC		(1 << 26)
+#define HWCAP_FLAGM		(1 << 27)
+#define HWCAP_SSBS		(1 << 28)
 
 #endif /* _UAPI__ASM_HWCAP_H */
arch/arm64/include/uapi/asm/ptrace.h +1 -0
index 67d4c33974e8..eea58f8ec355 100644
@@ -45,6 +45,7 @@
 #define PSR_I_BIT	0x00000080
 #define PSR_A_BIT	0x00000100
 #define PSR_D_BIT	0x00000200
+#define PSR_SSBS_BIT	0x00001000
 #define PSR_PAN_BIT	0x00400000
 #define PSR_UAO_BIT	0x00800000
 #define PSR_Q_BIT	0x08000000
arch/arm64/kernel/bpi.S +2 -17
index e5de33513b5d..4cae34e5a24e 100644
@@ -55,29 +55,14 @@ ENTRY(__bp_harden_hyp_vecs_start)
 	.endr
 ENTRY(__bp_harden_hyp_vecs_end)
 
-ENTRY(__qcom_hyp_sanitize_link_stack_start)
-	stp     x29, x30, [sp, #-16]!
-	.rept	16
-	bl	. + 4
-	.endr
-	ldp	x29, x30, [sp], #16
-ENTRY(__qcom_hyp_sanitize_link_stack_end)
 
-.macro smccc_workaround_1 inst
+ENTRY(__smccc_workaround_1_smc_start)
 	sub	sp, sp, #(8 * 4)
 	stp	x2, x3, [sp, #(8 * 0)]
 	stp	x0, x1, [sp, #(8 * 2)]
 	mov	w0, #ARM_SMCCC_ARCH_WORKAROUND_1
-	\inst	#0
+	smc	#0
 	ldp	x2, x3, [sp, #(8 * 0)]
 	ldp	x0, x1, [sp, #(8 * 2)]
 	add	sp, sp, #(8 * 4)
-.endm
-
-ENTRY(__smccc_workaround_1_smc_start)
-	smccc_workaround_1	smc
 ENTRY(__smccc_workaround_1_smc_end)
-
-ENTRY(__smccc_workaround_1_hvc_start)
-	smccc_workaround_1	hvc
-ENTRY(__smccc_workaround_1_hvc_end)
arch/arm64/kernel/cpu_errata.c +294 -201

767 lines not on this page · raw message

arch/arm64/kernel/cpufeature.c +377 -140

862 lines not on this page · raw message

arch/arm64/kernel/cpuinfo.c +12 -0
index 311885962830..9ff64e04e63d 100644
@@ -69,6 +69,18 @@ static const char *const hwcap_str[] = {
 	"fcma",
 	"lrcpc",
 	"dcpop",
+	"sha3",
+	"sm3",
+	"sm4",
+	"asimddp",
+	"sha512",
+	"sve",
+	"asimdfhm",
+	"dit",
+	"uscat",
+	"ilrcpc",
+	"flagm",
+	"ssbs",
 	NULL
 };
 
arch/arm64/kernel/fpsimd.c +1 -0
index 5d547deb6996..f4fdf6420ac5 100644
@@ -28,6 +28,7 @@
 #include <linux/signal.h>
 
 #include <asm/fpsimd.h>
+#include <asm/cpufeature.h>
 #include <asm/cputype.h>
 #include <asm/simd.h>
 
arch/arm64/kernel/head.S +3 -10
index 1371542de0d3..92cc7b51f100 100644
@@ -388,17 +388,13 @@ ENTRY(el2_setup)
 	mrs	x0, CurrentEL
 	cmp	x0, #CurrentEL_EL2
 	b.eq	1f
-	mrs	x0, sctlr_el1
-CPU_BE(	orr	x0, x0, #(3 << 24)	)	// Set the EE and E0E bits for EL1
-CPU_LE(	bic	x0, x0, #(3 << 24)	)	// Clear the EE and E0E bits for EL1
+	mov_q	x0, (SCTLR_EL1_RES1 | ENDIAN_SET_EL1)
 	msr	sctlr_el1, x0
 	mov	w0, #BOOT_CPU_MODE_EL1		// This cpu booted in EL1
 	isb
 	ret
 
-1:	mrs	x0, sctlr_el2
-CPU_BE(	orr	x0, x0, #(1 << 25)	)	// Set the EE bit for EL2
-CPU_LE(	bic	x0, x0, #(1 << 25)	)	// Clear the EE bit for EL2
+1:	mov_q	x0, (SCTLR_EL2_RES1 | ENDIAN_SET_EL2)
 	msr	sctlr_el2, x0
 
 #ifdef CONFIG_ARM64_VHE
@@ -505,10 +501,7 @@ install_el2_stub:
 	 * requires no configuration, and all non-hyp-specific EL2 setup
 	 * will be done via the _EL1 system register aliases in __cpu_setup.
 	 */
-	/* sctlr_el1 */
-	mov	x0, #0x0800			// Set/clear RES{1,0} bits
-CPU_BE(	movk	x0, #0x33d0, lsl #16	)	// Set EE and E0E on BE systems
-CPU_LE(	movk	x0, #0x30d0, lsl #16	)	// Clear EE and E0E on LE systems
+	mov_q	x0, (SCTLR_EL1_RES1 | ENDIAN_SET_EL1)
 	msr	sctlr_el1, x0
 
 	/* Coprocessor traps. */
arch/arm64/kernel/process.c +31 -0
index 9e773732520c..243fd247d04e 100644
@@ -296,6 +296,10 @@ int copy_thread(unsigned long clone_flags, unsigned long stack_start,
 		if (IS_ENABLED(CONFIG_ARM64_UAO) &&
 		    cpus_have_const_cap(ARM64_HAS_UAO))
 			childregs->pstate |= PSR_UAO_BIT;
+
+		if (arm64_get_ssbd_state() == ARM64_SSBD_FORCE_DISABLE)
+			set_ssbs_bit(childregs);
+
 		p->thread.cpu_context.x19 = stack_start;
 		p->thread.cpu_context.x20 = stk_sz;
 	}
@@ -335,6 +339,32 @@ void uao_thread_switch(struct task_struct *next)
 	}
 }
 
+/*
+ * Force SSBS state on context-switch, since it may be lost after migrating
+ * from a CPU which treats the bit as RES0 in a heterogeneous system.
+ */
+static void ssbs_thread_switch(struct task_struct *next)
+{
+	struct pt_regs *regs = task_pt_regs(next);
+
+	/*
+	 * Nothing to do for kernel threads, but 'regs' may be junk
+	 * (e.g. idle task) so check the flags and bail early.
+	 */
+	if (unlikely(next->flags & PF_KTHREAD))
+		return;
+
+	/* If the mitigation is enabled, then we leave SSBS clear. */
+	if ((arm64_get_ssbd_state() == ARM64_SSBD_FORCE_ENABLE) ||
+	    test_tsk_thread_flag(next, TIF_SSBD))
+		return;
+
+	if (compat_user_mode(regs))
+		set_compat_ssbs_bit(regs);
+	else if (user_mode(regs))
+		set_ssbs_bit(regs);
+}
+
 /*
  * We store our current task in sp_el0, which is clobbered by userspace. Keep a
  * shadow copy so that we can restore this upon entry from userspace.
@@ -363,6 +393,7 @@ __notrace_funcgraph struct task_struct *__switch_to(struct task_struct *prev,
 	contextidr_thread_switch(next);
 	entry_task_switch(next);
 	uao_thread_switch(next);
+	ssbs_thread_switch(next);
 
 	/*
 	 * Complete any pending TLB or cache maintenance on this CPU in case
arch/arm64/kernel/ptrace.c +9 -4
index 34d915b6974b..242527f29c41 100644
@@ -1402,15 +1402,20 @@ asmlinkage void syscall_trace_exit(struct pt_regs *regs)
 }
 
 /*
- * Bits which are always architecturally RES0 per ARM DDI 0487A.h
+ * SPSR_ELx bits which are always architecturally RES0 per ARM DDI 0487D.a.
+ * We permit userspace to set SSBS (AArch64 bit 12, AArch32 bit 23) which is
+ * not described in ARM DDI 0487D.a.
+ * We treat PAN and UAO as RES0 bits, as they are meaningless at EL0, and may
+ * be allocated an EL0 meaning in future.
  * Userspace cannot use these until they have an architectural meaning.
+ * Note that this follows the SPSR_ELx format, not the AArch32 PSR format.
  * We also reserve IL for the kernel; SS is handled dynamically.
  */
 #define SPSR_EL1_AARCH64_RES0_BITS \
-	(GENMASK_ULL(63,32) | GENMASK_ULL(27, 22) | GENMASK_ULL(20, 10) | \
-	 GENMASK_ULL(5, 5))
+	(GENMASK_ULL(63, 32) | GENMASK_ULL(27, 25) | GENMASK_ULL(23, 22) | \
+	 GENMASK_ULL(20, 13) | GENMASK_ULL(11, 10) | GENMASK_ULL(5, 5))
 #define SPSR_EL1_AARCH32_RES0_BITS \
-	(GENMASK_ULL(63,32) | GENMASK_ULL(24, 22) | GENMASK_ULL(20,20))
+	(GENMASK_ULL(63, 32) | GENMASK_ULL(22, 22) | GENMASK_ULL(20, 20))
 
 static int valid_compat_regs(struct user_pt_regs *regs)
 {
arch/arm64/kernel/smp.c +0 -44

56 lines not on this page · raw message

arch/arm64/kernel/ssbd.c +22 -0
index 0560738c1d5c..58de005cd756 100644
@@ -3,13 +3,32 @@
  * Copyright (C) 2018 ARM Ltd, All Rights Reserved.
  */
 
+#include <linux/compat.h>
 #include <linux/errno.h>
 #include <linux/prctl.h>
 #include <linux/sched.h>
+#include <linux/sched/task_stack.h>
 #include <linux/thread_info.h>
 
+#include <asm/compat.h>
 #include <asm/cpufeature.h>
 
+static void ssbd_ssbs_enable(struct task_struct *task)
+{
+	u64 val = is_compat_thread(task_thread_info(task)) ?
+		  PSR_AA32_SSBS_BIT : PSR_SSBS_BIT;
+
+	task_pt_regs(task)->pstate |= val;
+}
+
+static void ssbd_ssbs_disable(struct task_struct *task)
+{
+	u64 val = is_compat_thread(task_thread_info(task)) ?
+		  PSR_AA32_SSBS_BIT : PSR_SSBS_BIT;
+
+	task_pt_regs(task)->pstate &= ~val;
+}
+
 /*
  * prctl interface for SSBD
  */
@@ -45,12 +64,14 @@ static int ssbd_prctl_set(struct task_struct *task, unsigned long ctrl)
 			return -EPERM;
 		task_clear_spec_ssb_disable(task);
 		clear_tsk_thread_flag(task, TIF_SSBD);
+		ssbd_ssbs_enable(task);
 		break;
 	case PR_SPEC_DISABLE:
 		if (state == ARM64_SSBD_FORCE_DISABLE)
 			return -EPERM;
 		task_set_spec_ssb_disable(task);
 		set_tsk_thread_flag(task, TIF_SSBD);
+		ssbd_ssbs_disable(task);
 		break;
 	case PR_SPEC_FORCE_DISABLE:
 		if (state == ARM64_SSBD_FORCE_DISABLE)
@@ -58,6 +79,7 @@ static int ssbd_prctl_set(struct task_struct *task, unsigned long ctrl)
 		task_set_spec_ssb_disable(task);
 		task_set_spec_ssb_force_disable(task);
 		set_tsk_thread_flag(task, TIF_SSBD);
+		ssbd_ssbs_disable(task);
 		break;
 	default:
 		return -ERANGE;
arch/arm64/kernel/traps.c +2 -2
index 74259ae9c7f2..a4e49e947684 100644
@@ -38,6 +38,7 @@
 
 #include <asm/atomic.h>
 #include <asm/bug.h>
+#include <asm/cpufeature.h>
 #include <asm/debug-monitors.h>
 #include <asm/esr.h>
 #include <asm/insn.h>
@@ -436,10 +437,9 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
 	force_signal_inject(SIGILL, ILL_ILLOPC, regs, 0);
 }
 
-int cpu_enable_cache_maint_trap(void *__unused)
+void cpu_enable_cache_maint_trap(const struct arm64_cpu_capabilities *__unused)
 {
 	config_sctlr_el1(SCTLR_EL1_UCI, 0);
-	return 0;
 }
 
 #define __user_cache_maint(insn, address, res)			\
arch/arm64/kvm/hyp/entry.S +0 -12
index a7b3c198d4de..a360ac6e89e9 100644
@@ -196,15 +196,3 @@ alternative_endif
 
 	eret
 ENDPROC(__fpsimd_guest_restore)
-
-ENTRY(__qcom_hyp_sanitize_btac_predictors)
-	/**
-	 * Call SMC64 with Silicon provider serviceID 23<<8 (0xc2001700)
-	 * 0xC2000000-0xC200FFFF: assigned to SiP Service Calls
-	 * b15-b0: contains SiP functionID
-	 */
-	movz    x0, #0x1700
-	movk    x0, #0xc200, lsl #16
-	smc     #0
-	ret
-ENDPROC(__qcom_hyp_sanitize_btac_predictors)
arch/arm64/kvm/hyp/switch.c +0 -10
index 44845996b554..4a8fdbb29286 100644
@@ -405,16 +405,6 @@ int __hyp_text __kvm_vcpu_run(struct kvm_vcpu *vcpu)
 
 	__set_host_arch_workaround_state(vcpu);
 
-	if (cpus_have_const_cap(ARM64_HARDEN_BP_POST_GUEST_EXIT)) {
-		u32 midr = read_cpuid_id();
-
-		/* Apply BTAC predictors mitigation to all Falkor chips */
-		if (((midr & MIDR_CPU_MODEL_MASK) == MIDR_QCOM_FALKOR) ||
-		    ((midr & MIDR_CPU_MODEL_MASK) == MIDR_QCOM_FALKOR_V1)) {
-			__qcom_hyp_sanitize_btac_predictors();
-		}
-	}
-
 	fp_enabled = __fpsimd_enabled();
 
 	__sysreg_save_guest_state(guest_ctxt);
arch/arm64/kvm/hyp/sysreg-sr.c +11 -0
index e19d89cabf2a..3773311ffcd0 100644
@@ -188,3 +188,14 @@ void __hyp_text __kvm_set_tpidr_el2(u64 tpidr_el2)
 {
 	asm("msr tpidr_el2, %0": : "r" (tpidr_el2));
 }
+
+void __hyp_text __kvm_enable_ssbs(void)
+{
+	u64 tmp;
+
+	asm volatile(
+	"mrs	%0, sctlr_el2\n"
+	"orr	%0, %0, %1\n"
+	"msr	sctlr_el2, %0"
+	: "=&r" (tmp) : "L" (SCTLR_ELx_DSSBS));
+}
arch/arm64/mm/fault.c +1 -2
index 465b90d7abf2..bf7c285d0c82 100644
@@ -875,7 +875,7 @@ asmlinkage int __exception do_debug_exception(unsigned long addr_if_watchpoint,
 NOKPROBE_SYMBOL(do_debug_exception);
 
 #ifdef CONFIG_ARM64_PAN
-int cpu_enable_pan(void *__unused)
+void cpu_enable_pan(const struct arm64_cpu_capabilities *__unused)
 {
 	/*
 	 * We modify PSTATE. This won't work from irq context as the PSTATE
@@ -885,6 +885,5 @@ int cpu_enable_pan(void *__unused)
 
 	config_sctlr_el1(SCTLR_EL1_SPAN, 0);
 	asm(SET_PSTATE_PAN(1));
-	return 0;
 }
 #endif /* CONFIG_ARM64_PAN */
arch/arm64/mm/proc.S +1 -23
index 65b040152184..ecbc060807d2 100644
@@ -430,11 +430,7 @@ ENTRY(__cpu_setup)
 	/*
 	 * Prepare SCTLR
 	 */
-	adr	x5, crval
-	ldp	w5, w6, [x5]
-	mrs	x0, sctlr_el1
-	bic	x0, x0, x5			// clear bits
-	orr	x0, x0, x6			// set bits
+	mov_q	x0, SCTLR_EL1_SET
 	/*
 	 * Set/prepare TCR and TTBR. We use 512GB (39-bit) address range for
 	 * both user and kernel.
@@ -470,21 +466,3 @@ ENTRY(__cpu_setup)
 	msr	tcr_el1, x10
 	ret					// return to head.S
 ENDPROC(__cpu_setup)
-
-	/*
-	 * We set the desired value explicitly, including those of the
-	 * reserved bits. The values of bits EE & E0E were set early in
-	 * el2_setup, which are left untouched below.
-	 *
-	 *                 n n            T
-	 *       U E      WT T UD     US IHBS
-	 *       CE0      XWHW CZ     ME TEEA S
-	 * .... .IEE .... NEAI TE.I ..AD DEN0 ACAM
-	 * 0011 0... 1101 ..0. ..0. 10.. .0.. .... < hardware reserved
-	 * .... .1.. .... 01.1 11.1 ..01 0.01 1101 < software settings
-	 */
-	.type	crval, #object
-crval:
-	.word	0xfcffffff			// clear
-	.word	0x34d5d91d			// set
-	.popsection
arch/mips/boot/dts/qca/ar9331.dtsi +1 -1
index efd5f0722206..39b6269610d4 100644
@@ -99,7 +99,7 @@
 
 			miscintc: interrupt-controller@18060010 {
 				compatible = "qca,ar7240-misc-intc";
-				reg = <0x18060010 0x4>;
+				reg = <0x18060010 0x8>;
 
 				interrupt-parent = <&cpuintc>;
 				interrupts = <6>;
arch/mips/loongson64/common/serial.c +1 -1
index ffefc1cb2612..98c3a7feb10f 100644
@@ -110,7 +110,7 @@ static int __init serial_init(void)
 }
 module_init(serial_init);
 
-static void __init serial_exit(void)
+static void __exit serial_exit(void)
 {
 	platform_device_unregister(&uart8250_device);
 }
arch/mips/mm/tlbex.c +15 -8
index dc495578d44d..b55c74a7f7a4 100644
@@ -658,6 +658,13 @@ static void build_restore_pagemask(u32 **p, struct uasm_reloc **r,
 				   int restore_scratch)
 {
 	if (restore_scratch) {
+		/*
+		 * Ensure the MFC0 below observes the value written to the
+		 * KScratch register by the prior MTC0.
+		 */
+		if (scratch_reg >= 0)
+			uasm_i_ehb(p);
+
 		/* Reset default page size */
 		if (PM_DEFAULT_MASK >> 16) {
 			uasm_i_lui(p, tmp, PM_DEFAULT_MASK >> 16);
@@ -672,12 +679,10 @@ static void build_restore_pagemask(u32 **p, struct uasm_reloc **r,
 			uasm_i_mtc0(p, 0, C0_PAGEMASK);
 			uasm_il_b(p, r, lid);
 		}
-		if (scratch_reg >= 0) {
-			uasm_i_ehb(p);
+		if (scratch_reg >= 0)
 			UASM_i_MFC0(p, 1, c0_kscratch(), scratch_reg);
-		} else {
+		else
 			UASM_i_LW(p, 1, scratchpad_offset(0), 0);
-		}
 	} else {
 		/* Reset default page size */
 		if (PM_DEFAULT_MASK >> 16) {
@@ -926,6 +931,10 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
 	}
 	if (mode != not_refill && check_for_high_segbits) {
 		uasm_l_large_segbits_fault(l, *p);
+
+		if (mode == refill_scratch && scratch_reg >= 0)
+			uasm_i_ehb(p);
+
 		/*
 		 * We get here if we are an xsseg address, or if we are
 		 * an xuseg address above (PGDIR_SHIFT+PGDIR_BITS) boundary.
@@ -942,12 +951,10 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
 		uasm_i_jr(p, ptr);
 
 		if (mode == refill_scratch) {
-			if (scratch_reg >= 0) {
-				uasm_i_ehb(p);
+			if (scratch_reg >= 0)
 				UASM_i_MFC0(p, 1, c0_kscratch(), scratch_reg);
-			} else {
+			else
 				UASM_i_LW(p, 1, scratchpad_offset(0), 0);
-			}
 		} else {
 			uasm_i_nop(p);
 		}
arch/parisc/mm/ioremap.c +7 -5
index 92a9b5f12f98..f29f682352f0 100644
@@ -3,7 +3,7 @@
  * arch/parisc/mm/ioremap.c
  *
  * (C) Copyright 1995 1996 Linus Torvalds
- * (C) Copyright 2001-2006 Helge Deller <[email protected]>
+ * (C) Copyright 2001-2019 Helge Deller <[email protected]>
  * (C) Copyright 2005 Kyle McMartin <[email protected]>
  */
 
@@ -84,7 +84,7 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
 	addr = (void __iomem *) area->addr;
 	if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size,
 			       phys_addr, pgprot)) {
-		vfree(addr);
+		vunmap(addr);
 		return NULL;
 	}
 
@@ -92,9 +92,11 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
 }
 EXPORT_SYMBOL(__ioremap);
 
-void iounmap(const volatile void __iomem *addr)
+void iounmap(const volatile void __iomem *io_addr)
 {
-	if (addr > high_memory)
-		return vfree((void *) (PAGE_MASK & (unsigned long __force) addr));
+	unsigned long addr = (unsigned long)io_addr & PAGE_MASK;
+
+	if (is_vmalloc_addr((void *)addr))
+		vunmap((void *)addr);
 }
 EXPORT_SYMBOL(iounmap);
arch/x86/include/asm/kvm_host.h +2 -2
index 94af073476ce..00c12158a5dc 100644
@@ -973,7 +973,7 @@ struct kvm_x86_ops {
 	unsigned long (*get_rflags)(struct kvm_vcpu *vcpu);
 	void (*set_rflags)(struct kvm_vcpu *vcpu, unsigned long rflags);
 
-	void (*tlb_flush)(struct kvm_vcpu *vcpu);
+	void (*tlb_flush)(struct kvm_vcpu *vcpu, bool invalidate_gpa);
 
 	void (*run)(struct kvm_vcpu *vcpu);
 	int (*handle_exit)(struct kvm_vcpu *vcpu);
@@ -998,7 +998,7 @@ struct kvm_x86_ops {
 	void (*hwapic_irr_update)(struct kvm_vcpu *vcpu, int max_irr);
 	void (*hwapic_isr_update)(struct kvm_vcpu *vcpu, int isr);
 	void (*load_eoi_exitmap)(struct kvm_vcpu *vcpu, u64 *eoi_exit_bitmap);
-	void (*set_virtual_x2apic_mode)(struct kvm_vcpu *vcpu, bool set);
+	void (*set_virtual_apic_mode)(struct kvm_vcpu *vcpu);
 	void (*set_apic_access_page_addr)(struct kvm_vcpu *vcpu, hpa_t hpa);
 	void (*deliver_posted_interrupt)(struct kvm_vcpu *vcpu, int vector);
 	int (*sync_pir_to_irr)(struct kvm_vcpu *vcpu);
arch/x86/kernel/head64.c +20 -2
index 7c67d8939f3e..e00ccbcc2913 100644
@@ -145,13 +145,31 @@ unsigned long __head __startup_64(unsigned long physaddr,
 	 * we might write invalid pmds, when the kernel is relocated
 	 * cleanup_highmap() fixes this up along with the mappings
 	 * beyond _end.
+	 *
+	 * Only the region occupied by the kernel image has so far
+	 * been checked against the table of usable memory regions
+	 * provided by the firmware, so invalidate pages outside that
+	 * region. A page table entry that maps to a reserved area of
+	 * memory would allow processor speculation into that area,
+	 * and on some hardware (particularly the UV platform) even
+	 * speculative access to some reserved areas is caught as an
+	 * error, causing the BIOS to halt the system.
 	 */
 
 	pmd = fixup_pointer(level2_kernel_pgt, physaddr);
-	for (i = 0; i < PTRS_PER_PMD; i++) {
+
+	/* invalidate pages before the kernel image */
+	for (i = 0; i < pmd_index((unsigned long)_text); i++)
+		pmd[i] &= ~_PAGE_PRESENT;
+
+	/* fixup pages that are part of the kernel image */
+	for (; i <= pmd_index((unsigned long)_end); i++)
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

arch/x86/kvm/lapic.c +5 -7
index 7b9ad9de4f37..2307f63efd20 100644

Lines of this file are not shown. View the raw message.

arch/x86/kvm/lapic.h +14 -0
index 4b9935a38347..bc3446d3cfdf 100644

Lines of this file are not shown. View the raw message.

arch/x86/kvm/svm.c +9 -9
index 093e7f567e69..f6adc8db0e32 100644

Lines of this file are not shown. View the raw message.

arch/x86/kvm/vmx.c +43 -36

79 lines not on this page · raw message

arch/x86/kvm/x86.c +18 -14
index 98b990f13ae0..4927d0f5be13 100644

Lines of this file are not shown. View the raw message.

arch/x86/xen/efi.c +2 -0
index a18703be9ead..4769a069d5bd 100644

Lines of this file are not shown. View the raw message.

arch/xtensa/kernel/xtensa_ksyms.c +0 -7
index 672391003e40..dc7b470a423a 100644

Lines of this file are not shown. View the raw message.

drivers/base/core.c +3 -0
index 2ec9af90cd28..2b0a1054535c 100644

Lines of this file are not shown. View the raw message.

drivers/base/memory.c +3 -0
index 1d60b58a8c19..c617e00f4361 100644

Lines of this file are not shown. View the raw message.

drivers/block/loop.c +1 -0
index 87d7c42affbc..ec61dd873c93 100644

Lines of this file are not shown. View the raw message.

drivers/cpufreq/cpufreq.c +0 -10
index fceb18d26db8..4aa3c5331666 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +35 -0
index 4dd68d821353..4894d8a87c04 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0 -35
index 884ed359f249..c93e72d8ac5f 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/drm_edid.c +3 -0
index ed01e3aae0e8..dfdc7d3147fb 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/radeon/radeon_drv.c +0 -8
index 54d97dd5780a..f4becad0a78c 100644

Lines of this file are not shown. View the raw message.

drivers/infiniband/hw/cxgb4/mem.c +17 -11
index b5784cb145f5..805429bbc916 100644

Lines of this file are not shown. View the raw message.

drivers/input/misc/da9063_onkey.c +1 -4
index 3e9c353d82ef..a01b25facf46 100644

Lines of this file are not shown. View the raw message.

drivers/input/rmi4/rmi_driver.c +5 -1
index 997ccae7ee05..bae46816a3b3 100644

Lines of this file are not shown. View the raw message.

drivers/md/raid0.c +1 -1
index 28fb71721770..449c4dd060fc 100644

Lines of this file are not shown. View the raw message.

drivers/memstick/host/jmb38x_ms.c +1 -1
index 48db922075e2..08fa6400d255 100644

Lines of this file are not shown. View the raw message.

drivers/net/dsa/qca8k.c +2 -2
index c3c9d7e33bd6..8e49974ffa0e 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/broadcom/genet/bcmgenet.h +1 -0
index 9d499c5c8f8a..f176a0307f39 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/broadcom/genet/bcmmii.c +8 -3
index c421e2753c8c..fca9da1b1363 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/hisilicon/hns_mdio.c +5 -1
index baf5cc251f32..9a3bc0994a1d 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/i825xx/lasi_82596.c +3 -1
index b69c622ba8b2..6f0e4019adef 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/i825xx/lib82596.c +2 -2
index f00a1dc2128c..da3758fdf025 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/i825xx/sni_82596.c +3 -1
index b2c04a789744..43c1fd18670b 100644

Lines of this file are not shown. View the raw message.

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +8 -4
index f4df9ab0aed5..612773b94ae3 100644

Lines of this file are not shown. View the raw message.

drivers/net/ieee802154/ca8210.c +1 -1
index dcd10dba08c7..3a58962babd4 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/r8152.c +1 -2
index 455eec3c4694..c0964281ab98 100644

Lines of this file are not shown. View the raw message.

drivers/net/xen-netback/interface.c +0 -1
index d465071656b5..2641e76d03d9 100644

Lines of this file are not shown. View the raw message.

drivers/pci/pci.c +11 -13
index 044b208f7f6a..c847b5554db6 100644

Lines of this file are not shown. View the raw message.

drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +13 -13
index c5fe7d4a9065..262f591ad8a6 100644

Lines of this file are not shown. View the raw message.

drivers/s390/scsi/zfcp_fsf.c +13 -3
index 00fb98f7b2cd..94d1bcc83fa2 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/ch.c +0 -1
index c535c52e72e5..3f7c25d104fe 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/megaraid.c +2 -2
index 9b6f5d024dba..f5c09bbf9374 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/qla2xxx/qla_target.c +4 -0
index 87e04c4a4982..11753ed3433c 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/scsi_error.c +3 -0
index cf70f0bb8375..bdec5f429440 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/scsi_sysfs.c +10 -1
index 8ce12ffcbb7a..ffb44d77a01b 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/sd.c +2 -1
index 3b70f7bb7fe6..35cea5827a7a 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/ufs/ufshcd.c +3 -0
index 60c9184bad3b..07cae5ea608c 100644

Lines of this file are not shown. View the raw message.

drivers/staging/wlan-ng/cfg80211.c +2 -4
index 42912257e2b9..07b807ceae6d 100644

Lines of this file are not shown. View the raw message.

drivers/usb/class/usblp.c +3 -1
index 50836f79f908..5e456a83779d 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/udc/lpc32xx_udc.c +3 -3
index 6df1aded4503..ac2aa04ca657 100644

Lines of this file are not shown. View the raw message.

drivers/usb/misc/ldusb.c +12 -8
index fa5cf349ae19..cd92ae1231bc 100644

Lines of this file are not shown. View the raw message.

drivers/usb/misc/legousbtower.c +1 -4
index 155615aadc9c..378a565ec989 100644

Lines of this file are not shown. View the raw message.

drivers/usb/serial/ti_usb_3410_5052.c +3 -7
index 57e9f6617084..98c22ace784a 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/extent-tree.c +1 -0
index 10dee8245558..fd15f396b3a0 100644

Lines of this file are not shown. View the raw message.

fs/cifs/smb1ops.c +3 -0
index f50d3d0b9b87..483458340b10 100644

Lines of this file are not shown. View the raw message.

fs/ocfs2/journal.c +2 -1
index e5dcea6cee5f..f7fba58618ef 100644

Lines of this file are not shown. View the raw message.

fs/ocfs2/localalloc.c +2 -1
index 5d53d0d63d19..ea38677daa06 100644

Lines of this file are not shown. View the raw message.

fs/proc/page.c +16 -12
index 1491918a33c3..0c952c217118 100644

Lines of this file are not shown. View the raw message.

include/scsi/scsi_eh.h +1 -0
index 2b7e227960e1..91f403341dd7 100644

Lines of this file are not shown. View the raw message.

mm/hugetlb.c +2 -3
index 8ca0075a5464..310656b4ede6 100644

Lines of this file are not shown. View the raw message.

mm/page_owner.c +3 -2
index a71fe4c623ef..6ac05a6ff2d1 100644

Lines of this file are not shown. View the raw message.

mm/shmem.c +10 -8
index 037e2ee9ccac..5b2cc9f9b1f1 100644

Lines of this file are not shown. View the raw message.

mm/slub.c +11 -2
index 220d42e592ef..07aeb129f3f8 100644

Lines of this file are not shown. View the raw message.

net/ipv4/route.c +6 -3
index 5a1cffb769fd..de7f955ffd0a 100644

Lines of this file are not shown. View the raw message.

net/mac80211/debugfs_netdev.c +9 -2
index c813207bb123..928b6b0464b8 100644

Lines of this file are not shown. View the raw message.

net/mac80211/mlme.c +3 -2
index d91db72b9e9e..36bd59ff49c4 100644

Lines of this file are not shown. View the raw message.

net/sched/act_api.c +8 -5
index 4444d7e755e6..8ae0addb7657 100644

Lines of this file are not shown. View the raw message.

net/sctp/socket.c +2 -2
index 6a2532370545..a18e9be77216 100644

Lines of this file are not shown. View the raw message.

net/wireless/nl80211.c +3 -0
index ec504c4a397b..ff31feeee8e3 100644

Lines of this file are not shown. View the raw message.

net/wireless/wext-sme.c +6 -2
index c67d7a82ab13..73fd0eae08ca 100644

Lines of this file are not shown. View the raw message.

scripts/namespace.pl +7 -6
index 729c547fc9e1..30c43e639db8 100755

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_realtek.c +3 -0
index ab7bc7ebb721..5412952557f7 100644

Lines of this file are not shown. View the raw message.

sound/soc/sh/rcar/core.c +1 -0
index 710c01cd2ad2..ab0bbef7eb48 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.