Linux 4.14.151
Greg KH
maintainerI'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
Greg KH
maintainerDocumentation/admin-guide/kernel-parameters.txt +9 -7
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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; + + asmvolatile ( +"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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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++)
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
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +35 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0 -35
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/broadcom/genet/bcmgenet.h +1 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/broadcom/genet/bcmmii.c +8 -3
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/hisilicon/hns_mdio.c +5 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/i825xx/lasi_82596.c +3 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/i825xx/sni_82596.c +3 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +8 -4
Lines of this file are not shown. View the raw message.
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +13 -13
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.