Linux 5.2.7
Greg KH
maintainerI'm announcing the release of the 5.2.7 kernel.
All users of the 5.2 kernel series must upgrade.
The updated 5.2.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.2.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/hw-vuln/spectre.rst | 88 ++++++++++++++++- Documentation/admin-guide/kernel-parameters.txt | 8 - Makefile | 5 - arch/arm/boot/dts/rk3288-veyron-mickey.dts | 4 arch/arm/boot/dts/rk3288-veyron-minnie.dts | 4 arch/arm/boot/dts/rk3288.dtsi | 1 arch/arm/mach-exynos/Kconfig | 6 + arch/arm/mach-exynos/Makefile | 2 arch/arm/mach-exynos/suspend.c | 6 - arch/arm/mach-rpc/dma.c | 5 - arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi | 2 arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 2 arch/arm64/boot/dts/qcom/qcs404.dtsi | 1 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 5 - arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 - arch/arm64/include/asm/cpufeature.h | 7 - arch/arm64/kernel/cpufeature.c | 8 + arch/arm64/kernel/hw_breakpoint.c | 7 - arch/mips/lantiq/irq.c | 5 - arch/nds32/include/asm/syscall.h | 27 +++-- arch/parisc/Makefile | 3 arch/parisc/boot/compressed/Makefile | 4 arch/parisc/boot/compressed/vmlinux.lds.S | 4 arch/powerpc/mm/kasan/kasan_init_32.c | 7 + arch/x86/boot/compressed/misc.c | 1 arch/x86/boot/compressed/misc.h | 1 arch/x86/entry/calling.h | 17 +++ arch/x86/entry/entry_64.S | 22 +++- arch/x86/include/asm/apic.h | 2 arch/x86/include/asm/cpufeature.h | 4 arch/x86/include/asm/cpufeatures.h | 20 ++-- arch/x86/include/asm/kvm_host.h | 34 +++--- arch/x86/include/asm/paravirt.h | 1 arch/x86/include/asm/traps.h | 2 arch/x86/kernel/apic/apic.c | 2 arch/x86/kernel/cpu/bugs.c | 105 +++++++++++++++++++-- arch/x86/kernel/cpu/common.c | 96 ++++++++++--------- arch/x86/kernel/cpu/cpuid-deps.c | 3 arch/x86/kernel/cpu/scattered.c | 4 arch/x86/kernel/kvm.c | 1 arch/x86/kvm/cpuid.h | 2 arch/x86/kvm/mmu.c | 6 - arch/x86/kvm/vmx/nested.c | 5 - arch/x86/math-emu/fpu_emu.h | 2 arch/x86/math-emu/reg_constant.c | 2 arch/x86/xen/enlighten_pv.c | 2 arch/x86/xen/xen-asm_64.S | 1 drivers/acpi/blacklist.c | 4 drivers/block/loop.c | 16 +-- drivers/block/nbd.c | 2 drivers/char/tpm/tpm-chip.c | 23 +++- drivers/clk/mediatek/clk-mt8183.c | 46 ++++++--- drivers/clk/meson/clk-mpll.c | 9 + drivers/clk/meson/clk-mpll.h | 1 drivers/clk/sprd/sc9860-clk.c | 5 - drivers/clk/tegra/clk-tegra210.c | 8 - drivers/crypto/ccp/psp-dev.c | 19 ++- drivers/dax/kmem.c | 5 - drivers/dma/sh/rcar-dmac.c | 2 drivers/dma/tegra20-apb-dma.c | 12 ++ drivers/firmware/psci/psci_checker.c | 10 +- drivers/gpio/gpiolib.c | 23 +++- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 drivers/gpu/drm/i915/gvt/kvmgt.c | 12 ++ drivers/gpu/drm/i915/i915_perf.c | 10 +- drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 drivers/gpu/drm/nouveau/nouveau_connector.c | 2 drivers/gpu/drm/nouveau/nouveau_dmem.c | 3 drivers/i2c/busses/i2c-at91-core.c | 2 drivers/i2c/busses/i2c-at91-master.c | 9 + drivers/i2c/busses/i2c-bcm-iproc.c | 10 +- drivers/infiniband/core/device.c | 54 ++++++++-- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 7 + drivers/infiniband/hw/bnxt_re/qplib_res.c | 13 +- drivers/infiniband/hw/bnxt_re/qplib_res.h | 2 drivers/infiniband/hw/bnxt_re/qplib_sp.c | 14 +- drivers/infiniband/hw/bnxt_re/qplib_sp.h | 7 + drivers/infiniband/hw/hfi1/chip.c | 11 +- drivers/infiniband/hw/hfi1/tid_rdma.c | 43 -------- drivers/infiniband/hw/hfi1/verbs.c | 2 drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 drivers/infiniband/hw/mlx5/mr.c | 23 ++-- drivers/infiniband/hw/mlx5/qp.c | 13 +- drivers/misc/eeprom/at24.c | 2 drivers/mmc/core/queue.c | 5 + drivers/mmc/host/dw_mmc.c | 3 drivers/mmc/host/meson-mx-sdio.c | 2 drivers/mmc/host/sdhci-sprd.c | 1 drivers/mtd/nand/raw/nand_micron.c | 14 ++ drivers/net/ethernet/emulex/benet/be_main.c | 6 + drivers/pci/of.c | 8 + drivers/perf/arm_pmu.c | 2 drivers/rapidio/devices/rio_mport_cdev.c | 2 drivers/remoteproc/remoteproc_core.c | 1 drivers/s390/block/dasd_alias.c | 22 +++- drivers/s390/scsi/zfcp_erp.c | 7 + drivers/scsi/mpt3sas/mpt3sas_base.c | 12 +- drivers/soc/imx/soc-imx8.c | 19 ++- drivers/soc/qcom/rpmpd.c | 2 drivers/virtio/virtio_mmio.c | 7 + drivers/xen/gntdev.c | 2 drivers/xen/swiotlb-xen.c | 6 - fs/adfs/super.c | 5 - fs/block_dev.c | 83 +++++++++++----- fs/btrfs/ioctl.c | 21 ++++ fs/btrfs/qgroup.c | 24 ++++ fs/btrfs/send.c | 77 +++------------ fs/btrfs/transaction.c | 10 ++ fs/btrfs/tree-checker.c | 11 ++ fs/btrfs/volumes.c | 3 fs/ceph/dir.c | 26 +++-- fs/ceph/super.h | 7 + fs/ceph/xattr.c | 14 +- fs/cifs/connect.c | 24 +++- fs/coda/psdev.c | 5 - fs/dax.c | 2 fs/io_uring.c | 3 include/linux/acpi.h | 5 - include/linux/coda.h | 3 include/linux/coda_psdev.h | 11 ++ include/linux/compiler-gcc.h | 2 include/linux/compiler_types.h | 4 include/linux/fs.h | 6 + include/linux/gpio/consumer.h | 64 ++++++------ include/linux/memory_hotplug.h | 8 + include/rdma/ib_verbs.h | 3 include/uapi/linux/coda_psdev.h | 13 -- ipc/mqueue.c | 19 ++- kernel/bpf/btf.c | 19 ++- kernel/bpf/core.c | 2 kernel/dma/swiotlb.c | 4 kernel/module.c | 6 - kernel/stacktrace.c | 5 + kernel/trace/ftrace.c | 28 +++-- kernel/trace/trace_functions_graph.c | 17 +-- lib/Makefile | 3 lib/ioremap.c | 9 + lib/test_overflow.c | 11 +- lib/test_string.c | 6 - mm/cma.c | 13 ++ mm/compaction.c | 11 +- mm/memcontrol.c | 22 +++- mm/memory_hotplug.c | 64 ++++++++---- mm/migrate.c | 21 ++-- mm/slab_common.c | 3 mm/vmscan.c | 9 + mm/z3fold.c | 15 ++- scripts/Makefile.modpost | 6 - scripts/kconfig/confdata.c | 4 security/selinux/ss/policydb.c | 6 + sound/hda/hdac_i915.c | 10 +- tools/perf/builtin-version.c | 1 tools/testing/selftests/bpf/Makefile | 13 +- tools/testing/selftests/cgroup/cgroup_util.c | 3 155 files changed, 1239 insertions(+), 631 deletions(-)
Andrea Parri (1):
ceph: fix improper use of smp_mb__before_atomic()
Andreas Koop (1):
mmc: mmc_spi: Enable stable writes
Andrii Nakryiko (1):
bpf: fix BTF verifier size resolution logic
Andy Gross (1):
arm64: qcom: qcs404: Add reset-cells to GCC node
Anshuman Khandual (1):
mm/ioremap: check virtual address alignment while creating huge mappings
Anson Huang (2):
soc: imx: soc-imx8: Correct return value of error handle
soc: imx8: Fix potential kernel dump in error path
Arnd Bergmann (8):
swiotlb: fix phys_addr_t overflow warning
ARM: exynos: Only build MCPM support if used
ACPI: blacklist: fix clang warning for unused DMI table
x86: kvm: avoid constant-conversion warning
ACPI: fix false-positive -Wuninitialized warning mm/slab_common.c: work around clang bug #42570
x86: math-emu: Hide clang warnings for 16-bit overflow
ubsan: build ubsan.c more conservatively
Baolin Wang (1):
mmc: host: sdhci-sprd: Fix the missing pm_runtime_put_noidle()
Bartosz Golaszewski (1):
gpio: don't WARN() on NULL descs if gpiolib is disabled
Benjamin Block (1):
scsi: zfcp: fix GCC compiler warning emitted with -Wmaybe-uninitialized
Benjamin Poirier (1):
be2net: Signal that the device cannot transmit during reconfiguration
Borislav Petkov (1):
x86/cpufeatures: Carve out CQM features retrieval
Changbin Du (1):
fgraph: Remove redundant ftrace_graph_notrace_addr() test
Cheng Jian (1):
ftrace: Enable trampoline when rec count returns back to one
Chris Down (1):
cgroup: kselftest: relax fs_spec checks
Chris Packham (1):
gpiolib: Preserve desc->flags when setting state
Christophe Leroy (1):
powerpc/kasan: fix early boot failure on PPC32
Chunyan Zhang (1):
clk: sprd: Add check for return value of sprd_clk_regmap_init()
Clement Leger (1):
remoteproc: copy parent dma_pfn_offset for vdev
Dan Carpenter (1):
drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings
David Rientjes (1):
crypto: ccp - Fix SEV_VERSION_GREATER_OR_EQUAL
David Sterba (1):
btrfs: fix minimum number of chunk errors for DUP
Dmitry Osipenko (1):
dmaengine: tegra-apb: Error out if DMA_PREP_INTERRUPT flag is unset
Dmitry V. Levin (1):
nds32: fix asm/syscall.h
Doug Berger (1):
mm/cma.c: fail if fixed declaration can't be honored
Douglas Anderson (4):
ARM: dts: rockchip: Make rk3288-veyron-minnie run at hs200
ARM: dts: rockchip: Make rk3288-veyron-mickey's emmc work again
ARM: dts: rockchip: Mark that the rk3288 timer might stop in suspend
mmc: dw_mmc: Fix occasional hang after tuning on eMMC
Fenghua Yu (1):
x86/cpufeatures: Combine word 11 and 12 into a new scattered features word
Filipe Manana (2):
Btrfs: fix incremental send failure after deduplication
Btrfs: fix race leading to fs corruption after transaction abort
Geert Uytterhoeven (1):
dmaengine: rcar-dmac: Reject zero-length slave DMA requests
Greg Kroah-Hartman (1):
Linux 5.2.7
Gustavo A. R. Silva (1):
IB/hfi1: Fix Spectre v1 vulnerability
Heinrich Schuchardt (1):
arm64: dts: marvell: mcbin: enlarge PCI memory window
Helen Koike (1):
arm64: dts: rockchip: fix isp iommu clocks and power domain
Helge Deller (2):
parisc: Strip debug info from kernel before creating compressed vmlinuz
parisc: Fix build of compressed kernel even with debug enabled
Henry Burns (1):
mm/z3fold.c: reinitialize zhdr structs after migration
Ihor Matushchak (1):
virtio-mmio: add error check for platform_get_irq
Ilya Leoshkevich (1):
selftests/bpf: do not ignore clang failures
JC Kuo (1):
clk: tegra210: fix PLLU and PLLU_OUT1
Jackie Liu (1):
io_uring: fix KASAN use after free in io_sq_wq_submit_work
James Bottomley (1):
parisc: Add archclean Makefile target
Jan Kara (3):
dax: Fix missed wakeup in put_unlocked_entry()
mm: migrate: fix reference check race between __find_get_block() and migration
loop: Fix mount(2) failure due to race with LOOP_SET_FD
Jason Gunthorpe (1):
RDMA/devices: Do not deadlock during client removal
Jean Delvare (1):
eeprom: at24: make spd world-readable again
Jean-Philippe Brucker (2):
PCI: OF: Initialize dev->fwnode appropriately firmware/psci: psci_checker: Park kthreads before stopping them
Jeff Layton (1):
ceph: return -ERANGE if virtual xattr value didn't fit in buffer
Jerome Brunet (1):
clk: meson: mpll: properly handle spread spectrum
Joe Perches (1):
mmc: meson-mx-sdio: Fix misuse of GENMASK macro
John Fleck (1):
IB/hfi1: Check for error on call to alloc_rsm_map_table
Josh Poimboeuf (7):
x86/kvm: Don't call kvm_spurious_fault() from .fixup x86/paravirt: Fix callee-saved function ELF sizes
bpf: Disable GCC -fgcse optimization for ___bpf_prog_run() x86/speculation: Prepare entry code for Spectre v1 swapgs mitigations x86/speculation: Enable Spectre v1 swapgs mitigations x86/entry/64: Use JMP instead of JMPQ
Documentation: Add swapgs description to the Spectre v1 documentation
Juergen Gross (1):
xen/swiotlb: fix condition for calling xen_destroy_contiguous_region()
Kaike Wan (2):
IB/hfi1: Drop all TID RDMA READ RESP packets after r_next_psn IB/hfi1: Field not zero-ed when allocating TID flow memory
Kees Cook (2):
lib/test_overflow.c: avoid tainting the kernel and fix wrap size ipc/mqueue.c: only perform resource calculation if user valid
Lionel Landwerlin (1):
drm/i915/perf: fix ICL perf register offsets
Liran Alon (1):
KVM: nVMX: Ignore segment base for VMX memory operand when segment not FS or GS
Lyude Paul (1):
drm/nouveau: Only release VCPI slots on mode changes
M. Vefa Bicakci (1):
kconfig: Clear "written" flag to avoid data loss
Marco Felsch (1):
mtd: rawnand: micron: handle on-die "ECC-off" devices correctly
Masahiro Yamada (2):
kbuild: initialize CLANG_FLAGS correctly in the top Makefile
kbuild: modpost: include .*.cmd files only when targets exist
Mel Gorman (1):
mm: compaction: avoid 100% CPU usage during compaction when a task is killed
Michael Wu (1):
gpiolib: fix incorrect IRQ requesting of an active-low lineevent
Michał Mirosław (2):
i2c: at91: disable TXRDY interrupt after sending data
i2c: at91: fix clk_offset for sama5d2
Mikko Rapeli (1):
uapi linux/coda_psdev.h: move upc_req definition from uapi to kernel side headers
Milan Broz (1):
tpm: Fix null pointer dereference on chip register error path
Munehisa Kamata (1):
nbd: replace kill_bdev() with __invalidate_device() again
Nicholas Kazlauskas (1):
drm/amd/display: Expose audio inst from DC to DM
Niklas Cassel (1):
arm64: dts: qcom: qcs404-evb: fix l3 min voltage
Ondrej Mosnacek (1):
selinux: fix memory leak in policydb_init()
Pavel Tatashin (2):
device-dax: fix memory and resource leak if hotplug fails mm/hotplug: make remove_memory() interface usable
Peter Rosin (1):
lib/test_string.c: avoid masking memset16/32/64 failures
Peter Zijlstra (1):
stacktrace: Force USER_DS for stack_trace_save_user()
Petr Cvek (1):
MIPS: lantiq: Fix bitfield masking
Prarit Bhargava (1):
kernel/module.c: Only return -EEXIST for modules that have finished loading
Qian Cai (1):
x86/apic: Silence -Wtype-limits compiler warnings
Qu Wenruo (3):
btrfs: tree-checker: Check if the file extent end overflows
btrfs: Flush before reflinking any extent to prevent NOCOW write falling back to COW without data reservation
btrfs: qgroup: Don't hold qgroup_ioctl_lock in btrfs_qgroup_inherit()
Ralph Campbell (2):
drm/nouveau/dmem: missing mutex_lock in error path mm/migrate.c: initialize pud_entry in migrate_vma()
Ravi Bangoria (1):
perf version: Fix segfault due to missing OPT_END()
Rayagonda Kokatanur (1):
i2c: iproc: Fix i2c master read more than 63 bytes
Ronnie Sahlberg (2):
cifs: Fix a race condition with cifs_echo_request
cifs: fix crash in cifs_dfs_do_automount
Russell King (2):
ARM: riscpc: fix DMA
fs/adfs: super: fix use-after-free bug
Sam Protsenko (1):
coda: fix build using bare-metal toolchain
Samuel Thibault (1):
ALSA: hda: Fix 1-minute detection delay when i915 module is not available
Selvin Xavier (1):
RDMA/bnxt_re: Honor vlan_id in GID entry comparison
Sibi Sankar (1):
soc: qcom: rpmpd: fixup rpmpd set performance state
Souptick Joarder (1):
xen/gntdev.c: Replace vm_map_pages() with vm_map_pages_zero()
Stefan Haberland (1):
s390/dasd: fix endless loop after read unit address configuration
Suganath Prabu (1):
scsi: mpt3sas: Use 63-bit DMA addressing on SAS35 HBA
Thomas Gleixner (1):
x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS
Vicente Bergas (1):
arm64: dts: rockchip: Fix USB3 Type-C on rk3399-sapphire
Vitaly Wool (1):
mm/z3fold: don't try to use buddy slots after free
Weiyi Lu (1):
clk: mediatek: mt8183: Register 13MHz clock earlier for clocksource
Will Deacon (3):
drivers/perf: arm_pmu: Fix failure path in PM notifier
arm64: compat: Allow single-byte watchpoints on all addresses
arm64: cpufeature: Fix feature comparison for CTR_EL0.{CWG,ERG}
Xiaolin Zhang (1):
drm/i915/gvt: fix incorrect cache entry for guest page mapping
Yafang Shao (1):
mm/memcontrol.c: keep local VM counters in sync with the hierarchical ones
Yan, Zheng (1):
ceph: fix dir_lease_is_valid()
Yang Shi (1):
mm: vmscan: check if mem cgroup is disabled or not before calling memcg slab shrinker
Yishai Hadas (5):
IB/mlx5: Fix unreg_umr to ignore the mkey state
IB/mlx5: Use direct mkey destroy command upon UMR unreg failure IB/mlx5: Move MRs to a kernel PD when freeing them to the MR cache IB/mlx5: Fix clean_mr() to work in the expected order IB/mlx5: Fix RSS Toeplitz setup to be aligned with the HW specification
Yongxin Liu (1):
drm/nouveau: fix memory leak in nouveau_conn_reset()
Zhenzhong Duan (2):
xen/pv: Fix a boot up hang revealed by int3 self test
x86, boot: Remove multiple copy of static function sanitize_boot_params()
Zhouyang Jia (1):
coda: add error handling for fget
Greg KH
maintainerDocumentation/admin-guide/hw-vuln/spectre.rst +80 -8
@@ -41,10 +41,11 @@ Related CVEs The following CVE entries describe Spectre variants: - ============= ======================= ================= + ============= ======================= ========================== CVE-2017-5753 Bounds check bypass Spectre variant 1 CVE-2017-5715 Branch target injection Spectre variant 2 - ============= ======================= ================= + CVE-2019-1125 Spectre v1 swapgs Spectre variant 1 (swapgs) + ============= ======================= ========================== Problem -------
@@ -78,6 +79,13 @@ There are some extensions of Spectre variant 1 attacks for reading data over the network, see :ref:`[12] <spec_ref12>`. However such attacks are difficult, low bandwidth, fragile, and are considered low risk. +Note that, despite "Bounds Check Bypass" name, Spectre variant 1 is not +only about user-controlled array bounds checks. It can affect any +conditional checks. The kernel entry code interrupt, exception, and NMI +handlers all have conditional swapgs checks. Those may be problematic +in the context of Spectre v1, as kernel code can speculatively run with +a user GS. + Spectre variant 2 (Branch Target Injection) -------------------------------------------
@@ -132,6 +140,9 @@ not cover all possible attack vectors. 1. A user process attacking the kernel ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Spectre variant 1 +~~~~~~~~~~~~~~~~~ + The attacker passes a parameter to the kernel via a register or via a known address in memory during a syscall. Such parameter may be used later by the kernel as an index to an array or to derive
@@ -144,7 +155,40 @@ not cover all possible attack vectors. potentially be influenced for Spectre attacks, new "nospec" accessor macros are used to prevent speculative loading of data. - Spectre variant 2 attacker can :ref:`poison <poison_btb>` the branch +Spectre variant 1 (swapgs) +~~~~~~~~~~~~~~~~~~~~~~~~~~ + + An attacker can train the branch predictor to speculatively skip the + swapgs path for an interrupt or exception. If they initialize + the GS register to a user-space value, if the swapgs is speculatively + skipped, subsequent GS-related percpu accesses in the speculation + window will be done with the attacker-controlled GS value. This + could cause privileged memory to be accessed and leaked. + + For example: + + :: + + if (coming from user space) + swapgs + mov %gs:<percpu_offset>, %reg + mov (%reg), %reg1 + + When coming from user space, the CPU can speculatively skip the + swapgs, and then do a speculative percpu load using the user GS + value. So the user can speculatively force a read of any kernel + value. If a gadget exists which uses the percpu value as an address + in another load/store, then the contents of the kernel value may + become visible via an L1 side channel attack. + + A similar attack exists when coming from kernel space. The CPU can + speculatively do the swapgs, causing the user GS to get used for the + rest of the speculative window. + +Spectre variant 2 +~~~~~~~~~~~~~~~~~ + + A spectre variant 2 attacker can :ref:`poison <poison_btb>` the branch target buffer (BTB) before issuing syscall to launch an attack. After entering the kernel, the kernel could use the poisoned branch target buffer on indirect jump and jump to gadget code in speculative
@@ -280,11 +324,18 @@ The sysfs file showing Spectre variant 1 mitigation status is: The possible values in this file are: - ======================================= ================================= - 'Mitigation: __user pointer sanitation' Protection in kernel on a case by - case base with explicit pointer - sanitation. - ======================================= ================================= + .. list-table:: + + * - 'Not affected' + - The processor is not vulnerable. + * - 'Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers' + - The swapgs protections are disabled; otherwise it has + protection in the kernel on a case by case base with explicit + pointer sanitation and usercopy LFENCE barriers. + * - 'Mitigation: usercopy/swapgs barriers and __user pointer sanitization' + - Protection in the kernel on a case by case base with explicit + pointer sanitation, usercopy LFENCE barriers, and swapgs LFENCE + barriers. However, the protections are put in place on a case by case basis, and there is no guarantee that all possible attack vectors for Spectre
@@ -366,12 +417,27 @@ Turning on mitigation for Spectre variant 1 and Spectre variant 2 1. Kernel mitigation ^^^^^^^^^^^^^^^^^^^^ +Spectre variant 1 +~~~~~~~~~~~~~~~~~ + For the Spectre variant 1, vulnerable kernel code (as determined by code audit or scanning tools) is annotated on a case by case basis to use nospec accessor macros for bounds clipping :ref:`[2] <spec_ref2>` to avoid any usable disclosure gadgets. However, it may not cover all attack vectors for Spectre variant 1. + Copy-from-user code has an LFENCE barrier to prevent the access_ok() + check from being mis-speculated. The barrier is done by the + barrier_nospec() macro. + + For the swapgs variant of Spectre variant 1, LFENCE barriers are + added to interrupt, exception and NMI entry where needed. These + barriers are done by the FENCE_SWAPGS_KERNEL_ENTRY and + FENCE_SWAPGS_USER_ENTRY macros. + +Spectre variant 2 +~~~~~~~~~~~~~~~~~ + For Spectre variant 2 mitigation, the compiler turns indirect calls or jumps in the kernel into equivalent return trampolines (retpolines) :ref:`[3] <spec_ref3>` :ref:`[9] <spec_ref9>` to go to the target
@@ -473,6 +539,12 @@ Mitigation control on the kernel command line Spectre variant 2 mitigation can be disabled or force enabled at the kernel command line. + nospectre_v1 + + [X86,PPC] Disable mitigations for Spectre Variant 1 + (bounds check bypass). With this option data leaks are + possible in the system. + nospectre_v2 [X86] Disable all mitigations for the Spectre variant 2
Documentation/admin-guide/kernel-parameters.txt +4 -4
@@ -2587,7 +2587,7 @@ expose users to several CPU vulnerabilities. Equivalent to: nopti [X86,PPC] kpti=0 [ARM64] - nospectre_v1 [PPC] + nospectre_v1 [X86,PPC] nobp=0 [S390] nospectre_v2 [X86,PPC,S390,ARM64] spectre_v2_user=off [X86]
@@ -2936,9 +2936,9 @@ nosmt=force: Force disable SMT, cannot be undone via the sysfs control file. - nospectre_v1 [PPC] Disable mitigations for Spectre Variant 1 (bounds - check bypass). With this option data leaks are possible - in the system. + nospectre_v1 [X86,PPC] Disable mitigations for Spectre Variant 1 + (bounds check bypass). With this option data leaks are + possible in the system. nospectre_v2 [X86,PPC_FSL_BOOK3E,ARM64] Disable all mitigations for the Spectre variant 2 (indirect branch prediction)
Makefile +3 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 2 -SUBLEVEL = 6 +SUBLEVEL = 7 EXTRAVERSION = NAME = Bobtail Squid
@@ -467,6 +467,7 @@ KBUILD_CFLAGS_MODULE := -DMODULE KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds KBUILD_LDFLAGS := GCC_PLUGINS_CFLAGS := +CLANG_FLAGS := export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC export CPP AR NM STRIP OBJCOPY OBJDUMP PAHOLE KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS
@@ -519,7 +520,7 @@ endif ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) ifneq ($(CROSS_COMPILE),) -CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%)) +CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%)) GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR) GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
arch/arm/boot/dts/rk3288-veyron-mickey.dts +0 -4
@@ -128,10 +128,6 @@ }; }; -&emmc { - /delete-property/mmc-hs200-1_8v; -}; - &i2c2 { status = "disabled"; };
arch/arm/boot/dts/rk3288-veyron-minnie.dts +0 -4
@@ -90,10 +90,6 @@ pwm-off-delay-ms = <200>; }; -&emmc { - /delete-property/mmc-hs200-1_8v; -}; - &gpio_keys { pinctrl-0 = <&pwr_key_l &ap_lid_int_l &volum_down_l &volum_up_l>;
arch/arm/boot/dts/rk3288.dtsi +1 -0
@@ -231,6 +231,7 @@ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>, <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; clock-frequency = <24000000>; + arm,no-tick-in-suspend; }; timer: timer@ff810000 {
arch/arm/mach-exynos/Kconfig +5 -1
@@ -106,7 +106,7 @@ config SOC_EXYNOS5420 bool "SAMSUNG EXYNOS5420" default y depends on ARCH_EXYNOS5 - select MCPM if SMP + select EXYNOS_MCPM if SMP select ARM_CCI400_PORT_CTRL select ARM_CPU_SUSPEND
@@ -115,6 +115,10 @@ config SOC_EXYNOS5800 default y depends on SOC_EXYNOS5420 +config EXYNOS_MCPM + bool + select MCPM + config EXYNOS_CPU_SUSPEND bool select ARM_CPU_SUSPEND
arch/arm/mach-exynos/Makefile +1 -1
@@ -18,5 +18,5 @@ plus_sec := $(call as-instr,.arch_extension sec,+sec) AFLAGS_exynos-smc.o :=-Wa,-march=armv7-a$(plus_sec) AFLAGS_sleep.o :=-Wa,-march=armv7-a$(plus_sec) -obj-$(CONFIG_MCPM) += mcpm-exynos.o +obj-$(CONFIG_EXYNOS_MCPM) += mcpm-exynos.o CFLAGS_mcpm-exynos.o += -march=armv7-a
arch/arm/mach-exynos/suspend.c +3 -3
@@ -268,7 +268,7 @@ static int exynos5420_cpu_suspend(unsigned long arg)unsigned int cluster =MPIDR_AFFINITY_LEVEL (mpidr,1 );unsigned int cpu =MPIDR_AFFINITY_LEVEL (mpidr,0 ); -if (IS_ENABLED (CONFIG_MCPM )) { +if (IS_ENABLED (CONFIG_EXYNOS_MCPM )) {mcpm_set_entry_vector (cpu, cluster, exynos_cpu_resume);mcpm_cpu_suspend (); }
@@ -351,7 +351,7 @@ static void exynos5420_pm_prepare(void)exynos_pm_enter_sleep_mode ();/* ensure at least INFORM0 has the resume address */ -if (IS_ENABLED (CONFIG_MCPM )) +if (IS_ENABLED (CONFIG_EXYNOS_MCPM ))pmu_raw_writel (__pa_symbol (mcpm_entry_point),S5P_INFORM0 ); tmp =pmu_raw_readl (EXYNOS_L2_OPTION (0 ));
@@ -455,7 +455,7 @@ static void exynos5420_prepare_pm_resume(void) mpidr =read_cpuid_mpidr (); cluster =MPIDR_AFFINITY_LEVEL (mpidr,1 ); -if (IS_ENABLED (CONFIG_MCPM )) +if (IS_ENABLED (CONFIG_EXYNOS_MCPM ))WARN_ON (mcpm_cpu_powered_up ());if (IS_ENABLED (CONFIG_HW_PERF_EVENTS ) && cluster !=0 ) {
arch/arm/mach-rpc/dma.c +4 -1
@@ -128,7 +128,7 @@ static irqreturn_t iomd_dma_handle(int irq, void *dev_id) }while (1 ); idma->state = ~DMA_ST_AB ; -disable_irq (irq); +disable_irq_nosync (irq);return IRQ_HANDLED ; }
@@ -177,6 +177,9 @@ static void iomd_enable_dma(unsigned int chan, dma_t *dma) DMA_FROM_DEVICE : DMA_TO_DEVICE); } + idma->dma_addr = idma->dma.sg->dma_address; + idma->dma_len = idma->dma.sg->length; +iomd_writeb (DMA_CR_C , dma_base +CR ); idma->state =DMA_ST_AB ; }
arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi +2 -0
@@ -184,6 +184,8 @@ num-lanes = <4>; num-viewport = <8>; reset-gpios = <&cp0_gpio2 20 GPIO_ACTIVE_LOW>; + ranges = <0x81000000 0x0 0xf9010000 0x0 0xf9010000 0x0 0x10000 + 0x82000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000>; status = "okay"; };
arch/arm64/boot/dts/qcom/qcs404-evb.dtsi +1 -1
@@ -118,7 +118,7 @@ }; vreg_l3_1p05: l3 { - regulator-min-microvolt = <1050000>; + regulator-min-microvolt = <1048000>; regulator-max-microvolt = <1160000>; };
arch/arm64/boot/dts/qcom/qcs404.dtsi +1 -0
@@ -383,6 +383,7 @@ compatible = "qcom,gcc-qcs404"; reg = <0x01800000 0x80000>; #clock-cells = <1>; + #reset-cells = <1>; assigned-clocks = <&gcc GCC_APSS_AHB_CLK_SRC>; assigned-clock-rates = <19200000>;
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +2 -3
@@ -565,12 +565,11 @@ status = "okay"; u2phy0_otg: otg-port { - phy-supply = <&vcc5v0_typec0>; status = "okay"; }; u2phy0_host: host-port { - phy-supply = <&vcc5v0_host>; + phy-supply = <&vcc5v0_typec0>; status = "okay"; }; };
@@ -620,7 +619,7 @@ &usbdrd_dwc3_0 { status = "okay"; - dr_mode = "otg"; + dr_mode = "host"; }; &usbdrd3_1 {
arch/arm64/boot/dts/rockchip/rk3399.dtsi +4 -4
@@ -1706,11 +1706,11 @@ reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>; interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>; interrupt-names = "isp0_mmu"; - clocks = <&cru ACLK_ISP0_NOC>, <&cru HCLK_ISP0_NOC>; + clocks = <&cru ACLK_ISP0_WRAPPER>, <&cru HCLK_ISP0_WRAPPER>; clock-names = "aclk", "iface"; #iommu-cells = <0>; + power-domains = <&power RK3399_PD_ISP0>; rockchip,disable-mmu-reset; - status = "disabled"; }; isp1_mmu: iommu@ff924000 {
@@ -1718,11 +1718,11 @@ reg = <0x0 0xff924000 0x0 0x100>, <0x0 0xff925000 0x0 0x100>; interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH 0>; interrupt-names = "isp1_mmu"; - clocks = <&cru ACLK_ISP1_NOC>, <&cru HCLK_ISP1_NOC>; + clocks = <&cru ACLK_ISP1_WRAPPER>, <&cru HCLK_ISP1_WRAPPER>; clock-names = "aclk", "iface"; #iommu-cells = <0>; + power-domains = <&power RK3399_PD_ISP1>; rockchip,disable-mmu-reset; - status = "disabled"; }; hdmi_sound: hdmi-sound {
arch/arm64/include/asm/cpufeature.h +4 -3
@@ -35,9 +35,10 @@*/ enum ftr_type { -FTR_EXACT ,/* Use a predefined safe value */ -FTR_LOWER_SAFE ,/* Smaller value is safe */ -FTR_HIGHER_SAFE ,/* Bigger value is safe */ +FTR_EXACT ,/* Use a predefined safe value */ +FTR_LOWER_SAFE ,/* Smaller value is safe */ +FTR_HIGHER_SAFE ,/* Bigger value is safe */ +FTR_HIGHER_OR_ZERO_SAFE ,/* Bigger value is safe, but 0 is biggest */ };#define FTR_STRICT true/* SANITY check strict matching required */
arch/arm64/kernel/cpufeature.c +6 -2
@@ -225,8 +225,8 @@ static const struct arm64_ftr_bits ftr_ctr[] = {ARM64_FTR_BITS (FTR_VISIBLE ,FTR_STRICT ,FTR_EXACT ,31 ,1 ,1 ),/* RES1 */ ARM64_FTR_BITS (FTR_VISIBLE ,FTR_STRICT ,FTR_LOWER_SAFE ,CTR_DIC_SHIFT ,1 ,1 ),ARM64_FTR_BITS (FTR_VISIBLE ,FTR_STRICT ,FTR_LOWER_SAFE ,CTR_IDC_SHIFT ,1 ,1 ), -ARM64_FTR_BITS (FTR_VISIBLE ,FTR_STRICT ,FTR_HIGHER_SAFE ,CTR_CWG_SHIFT ,4 ,0 ), -ARM64_FTR_BITS (FTR_VISIBLE ,FTR_STRICT ,FTR_HIGHER_SAFE ,CTR_ERG_SHIFT ,4 ,0 ), +ARM64_FTR_BITS (FTR_VISIBLE ,FTR_STRICT ,FTR_HIGHER_OR_ZERO_SAFE ,CTR_CWG_SHIFT ,4 ,0 ), +ARM64_FTR_BITS (FTR_VISIBLE ,FTR_STRICT ,FTR_HIGHER_OR_ZERO_SAFE ,CTR_ERG_SHIFT ,4 ,0 ),ARM64_FTR_BITS (FTR_VISIBLE ,FTR_STRICT ,FTR_LOWER_SAFE ,CTR_DMINLINE_SHIFT ,4 ,1 ),/* * Linux can handle differing I-cache policies. Userspace JITs will
@@ -468,6 +468,10 @@ static s64 arm64_ftr_safe_value(const struct arm64_ftr_bits *ftrp, s64 new,case FTR_LOWER_SAFE : ret = new < cur ? new : cur;break ; +case FTR_HIGHER_OR_ZERO_SAFE : +if (!cur || !new) +break ; +/* Fallthrough */ case FTR_HIGHER_SAFE : ret = new > cur ? new : cur;break ;
arch/arm64/kernel/hw_breakpoint.c +4 -3
@@ -536,13 +536,14 @@ int hw_breakpoint_arch_parse(struct perf_event *bp,/* Aligned */ break ;case 1 : -/* Allow single byte watchpoint. */ -if (hw->ctrl.len ==ARM_BREAKPOINT_LEN_1 ) -break ;case 2 :/* Allow halfword watchpoints and breakpoints. */ if (hw->ctrl.len ==ARM_BREAKPOINT_LEN_2 )break ; +case 3 : +/* Allow single byte watchpoint. */ +if (hw->ctrl.len ==ARM_BREAKPOINT_LEN_1 ) +break ;default :return -EINVAL ; }
arch/mips/lantiq/irq.c +3 -2
@@ -154,8 +154,9 @@ static int ltq_eiu_settype(struct irq_data *d, unsigned int type)if (edge)irq_set_handler (d->hwirq, handle_edge_irq); -ltq_eiu_w32 (ltq_eiu_r32 (LTQ_EIU_EXIN_C ) | - (val << (i *4 )),LTQ_EIU_EXIN_C ); +ltq_eiu_w32 ((ltq_eiu_r32 (LTQ_EIU_EXIN_C ) & + (~(7 << (i *4 )))) | (val << (i *4 )), +LTQ_EIU_EXIN_C ); } }
arch/nds32/include/asm/syscall.h +17 -10
@@ -26,7 +26,8 @@ struct pt_regs;* * It's only valid to call this when @task is known to be blocked. */ -int syscall_get_nr (struct task_struct *task,struct pt_regs *regs) +static inline int +syscall_get_nr (struct task_struct *task,struct pt_regs *regs) {return regs->syscallno; }
@@ -47,7 +48,8 @@ int syscall_get_nr(struct task_struct *task, struct pt_regs *regs)* system call instruction. This may not be the same as what the * register state looked like at system call entry tracing. */ -void syscall_rollback (struct task_struct *task,struct pt_regs *regs) +static inline void +syscall_rollback (struct task_struct *task,struct pt_regs *regs) { regs->uregs[0 ] = regs->orig_r0; }
@@ -62,7 +64,8 @@ void syscall_rollback(struct task_struct *task, struct pt_regs *regs)* It's only valid to call this when @task is stopped for tracing on exit * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. */ -long syscall_get_error (struct task_struct *task,struct pt_regs *regs) +static inline long +syscall_get_error (struct task_struct *task,struct pt_regs *regs) {unsigned long error = regs->uregs[0 ];return IS_ERR_VALUE (error) ? error :0 ;
@@ -79,7 +82,8 @@ long syscall_get_error(struct task_struct *task, struct pt_regs *regs)* It's only valid to call this when @task is stopped for tracing on exit * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. */ -long syscall_get_return_value (struct task_struct *task,struct pt_regs *regs) +static inline long +syscall_get_return_value (struct task_struct *task,struct pt_regs *regs) {return regs->uregs[0 ]; }
@@ -99,8 +103,9 @@ long syscall_get_return_value(struct task_struct *task, struct pt_regs *regs)* It's only valid to call this when @task is stopped for tracing on exit * from a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. */ -void syscall_set_return_value (struct task_struct *task,struct pt_regs *regs, -int error,long val) +static inline void +syscall_set_return_value (struct task_struct *task,struct pt_regs *regs, +int error,long val) { regs->uregs[0 ] = (long )error ? error : val; }
@@ -118,8 +123,9 @@ void syscall_set_return_value(struct task_struct *task, struct pt_regs *regs,* entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. */ #define SYSCALL_MAX_ARGS 6 -void syscall_get_arguments (struct task_struct *task,struct pt_regs *regs, -unsigned long *args) +static inline void +syscall_get_arguments (struct task_struct *task,struct pt_regs *regs, +unsigned long *args) { args[0 ] = regs->orig_r0; args++;
@@ -138,8 +144,9 @@ void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,* It's only valid to call this when @task is stopped for tracing on * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT. */ -void syscall_set_arguments (struct task_struct *task,struct pt_regs *regs, -const unsigned long *args) +static inline void +syscall_set_arguments (struct task_struct *task,struct pt_regs *regs, +const unsigned long *args) { regs->orig_r0 = args[0 ]; args++;
arch/parisc/Makefile +3 -0
@@ -164,5 +164,8 @@ define archhelp @echo ' zinstall - Install compressed vmlinuz kernel' endef +archclean: + $(Q)$(MAKE) $(clean)=$(boot) + archheaders: $(Q)$(MAKE) $(build)=arch/parisc/kernel/syscalls all
arch/parisc/boot/compressed/Makefile +3 -1
@@ -12,6 +12,7 @@ UBSAN_SANITIZE := n targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4 targets += misc.o piggy.o sizes.h head.o real2.o firmware.o +targets += real2.S firmware.c KBUILD_CFLAGS := -D__KERNEL__ -O2 -DBOOTLOADER KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
@@ -55,7 +56,8 @@ $(obj)/misc.o: $(obj)/sizes.h CPPFLAGS_vmlinux.lds += -I$(objtree)/$(obj) -DBOOTLOADER $(obj)/vmlinux.lds: $(obj)/sizes.h -$(obj)/vmlinux.bin: vmlinux +OBJCOPYFLAGS_vmlinux.bin := -R .comment -R .note -S +$(obj)/vmlinux.bin: vmlinux FORCE $(call if_changed,objcopy) vmlinux.bin.all-y := $(obj)/vmlinux.bin
arch/parisc/boot/compressed/vmlinux.lds.S +2 -2
@@ -48,8 +48,8 @@ SECTIONS *(.rodata.compressed) } - /* bootloader code and data starts behind area of extracted kernel */ - . = (SZ_end - SZparisc_kernel_start + KERNEL_BINARY_TEXT_START); + /* bootloader code and data starts at least behind area of extracted kernel */ + . = MAX(ABSOLUTE(.), (SZ_end - SZparisc_kernel_start + KERNEL_BINARY_TEXT_START)); /* align on next page boundary */ . = ALIGN(4096);
arch/powerpc/mm/kasan/kasan_init_32.c +5 -2
@@ -21,7 +21,7 @@ static void kasan_populate_pte(pte_t *ptep, pgprot_t prot)__set_pte_at (&init_mm, va, ptep,pfn_pte (PHYS_PFN (pa), prot),0 ); } -static int kasan_init_shadow_page_tables (unsigned long k_start,unsigned long k_end) +static int __ref kasan_init_shadow_page_tables (unsigned long k_start,unsigned long k_end) {pmd_t *pmd;unsigned long k_cur, k_next;
@@ -35,7 +35,10 @@ static int kasan_init_shadow_page_tables(unsigned long k_start, unsigned long k_if ((void *)pmd_page_vaddr (*pmd) != kasan_early_shadow_pte)continue ; - new =pte_alloc_one_kernel (&init_mm); +if (slab_is_available ()) + new =pte_alloc_one_kernel (&init_mm); +else + new =memblock_alloc (PTE_FRAG_SIZE ,PTE_FRAG_SIZE );if (!new)return -ENOMEM ;
arch/x86/boot/compressed/misc.c +1 -0
@@ -17,6 +17,7 @@#include "pgtable.h" #include "../string.h" #include "../voffset.h" +#include <asm/bootparam_utils.h> /* * WARNING!!
arch/x86/boot/compressed/misc.h +0 -1
@@ -23,7 +23,6 @@#include <asm/page.h> #include <asm/boot.h> #include <asm/bootparam.h> -#include <asm/bootparam_utils.h> #define BOOT_CTYPE_H #include <linux/acpi.h>
arch/x86/entry/calling.h +17 -0
@@ -329,6 +329,23 @@ For 32-bit we have the following conventions - kernel is built with#endif +/* +* Mitigate Spectre v1 for conditional swapgs code paths. +* +* FENCE_SWAPGS_USER_ENTRY is used in the user entry swapgs code path, to +* prevent a speculative swapgs when coming from kernel space. +* +* FENCE_SWAPGS_KERNEL_ENTRY is used in the kernel entry non-swapgs code path, +* to prevent the swapgs from getting speculatively skipped when coming from +* user space. +*/ +.macro FENCE_SWAPGS_USER_ENTRY + ALTERNATIVE "", "lfence", X86_FEATURE_FENCE_SWAPGS_USER +.endm +.macro FENCE_SWAPGS_KERNEL_ENTRY + ALTERNATIVE "", "lfence", X86_FEATURE_FENCE_SWAPGS_KERNEL +.endm + .macro STACKLEAK_ERASE_NOCLOBBER#ifdef CONFIG_GCC_PLUGIN_STACKLEAK PUSH_AND_CLEAR_REGS
arch/x86/entry/entry_64.S +18 -4
@@ -519,7 +519,7 @@ ENTRY(interrupt_entry) testb $3, CS-ORIG_RAX+8(%rsp) jz 1f SWAPGS - + FENCE_SWAPGS_USER_ENTRY /* * Switch to the thread stack. The IRET frame and orig_ax are * on the stack, as well as the return address. RDI..R12 are
@@ -549,8 +549,10 @@ ENTRY(interrupt_entry) UNWIND_HINT_FUNC movq (%rdi), %rdi + jmp 2f 1: - + FENCE_SWAPGS_KERNEL_ENTRY +2: PUSH_AND_CLEAR_REGS save_ret=1 ENCODE_FRAME_POINTER 8
@@ -1171,7 +1173,6 @@ idtentry stack_segment do_stack_segment has_error_code=1 #ifdef CONFIG_XEN_PV idtentry xennmi do_nmi has_error_code=0 idtentry xendebug do_debug has_error_code=0 -idtentry xenint3 do_int3 has_error_code=0 #endif idtentry general_protection do_general_protection has_error_code=1
@@ -1216,6 +1217,13 @@ ENTRY(paranoid_entry) */ SAVE_AND_SWITCH_TO_KERNEL_CR3 scratch_reg=%rax save_reg=%r14 + /* + * The above SAVE_AND_SWITCH_TO_KERNEL_CR3 macro doesn't do an + * unconditional CR3 write, even in the PTI case. So do an lfence + * to prevent GS speculation, regardless of whether PTI is enabled. + */ + FENCE_SWAPGS_KERNEL_ENTRY + ret END(paranoid_entry)
@@ -1266,6 +1274,7 @@ ENTRY(error_entry) * from user mode due to an IRET fault. */ SWAPGS + FENCE_SWAPGS_USER_ENTRY /* We have user CR3. Change to kernel CR3. */ SWITCH_TO_KERNEL_CR3 scratch_reg=%rax
@@ -1287,6 +1296,8 @@ ENTRY(error_entry) CALL_enter_from_user_mode ret +.Lerror_entry_done_lfence: + FENCE_SWAPGS_KERNEL_ENTRY .Lerror_entry_done: TRACE_IRQS_OFF ret
@@ -1305,7 +1316,7 @@ ENTRY(error_entry) cmpq %rax, RIP+8(%rsp) je .Lbstep_iret cmpq $.Lgs_change, RIP+8(%rsp) - jne .Lerror_entry_done + jne .Lerror_entry_done_lfence /* * hack: .Lgs_change can fail with user gsbase. If this happens, fix up
@@ -1313,6 +1324,7 @@ ENTRY(error_entry) * .Lgs_change's error handler with kernel gsbase. */ SWAPGS + FENCE_SWAPGS_USER_ENTRY SWITCH_TO_KERNEL_CR3 scratch_reg=%rax jmp .Lerror_entry_done
@@ -1327,6 +1339,7 @@ ENTRY(error_entry) * gsbase and CR3. Switch to kernel gsbase and CR3: */ SWAPGS + FENCE_SWAPGS_USER_ENTRY SWITCH_TO_KERNEL_CR3 scratch_reg=%rax /*
@@ -1418,6 +1431,7 @@ ENTRY(nmi) swapgs cld + FENCE_SWAPGS_USER_ENTRY SWITCH_TO_KERNEL_CR3 scratch_reg=%rdx movq %rsp, %rdx movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp
arch/x86/include/asm/apic.h +1 -1
@@ -49,7 +49,7 @@ static inline void generic_apic_probe(void)#ifdef CONFIG_X86_LOCAL_APIC -extern unsigned int apic_verbosity; +extern int apic_verbosity;extern int local_apic_timer_c2_ok;extern int disable_apic;
arch/x86/include/asm/cpufeature.h +2 -2
@@ -22,8 +22,8 @@ enum cpuid_leafsCPUID_LNX_3 ,CPUID_7_0_EBX ,CPUID_D_1_EAX , -CPUID_F_0_EDX , -CPUID_F_1_EDX , +CPUID_LNX_4 , +CPUID_DUMMY ,CPUID_8000_0008_EBX ,CPUID_6_EAX , CPUID_8000_000A_EDX,
arch/x86/include/asm/cpufeatures.h +13 -7
@@ -271,13 +271,18 @@#define X86_FEATURE_XGETBV1 (10*32+ 2)/* XGETBV with ECX = 1 instruction */ #define X86_FEATURE_XSAVES (10*32+ 3)/* XSAVES/XRSTORS instructions */ -/* Intel-defined CPU QoS Sub-leaf, CPUID level 0x0000000F:0 (EDX), word 11 */ -#define X86_FEATURE_CQM_LLC (11*32+ 1)/* LLC QoS if 1 */ - -/* Intel-defined CPU QoS Sub-leaf, CPUID level 0x0000000F:1 (EDX), word 12 */ -#define X86_FEATURE_CQM_OCCUP_LLC (12*32+ 0)/* LLC occupancy monitoring */ -#define X86_FEATURE_CQM_MBM_TOTAL (12*32+ 1)/* LLC Total MBM monitoring */ -#define X86_FEATURE_CQM_MBM_LOCAL (12*32+ 2)/* LLC Local MBM monitoring */ +/* +* Extended auxiliary flags: Linux defined - for features scattered in various +* CPUID levels like 0xf, etc. +* +* Reuse free bits when adding new feature flags! +*/ +#define X86_FEATURE_CQM_LLC (11*32+ 0)/* LLC QoS if 1 */ +#define X86_FEATURE_CQM_OCCUP_LLC (11*32+ 1)/* LLC occupancy monitoring */ +#define X86_FEATURE_CQM_MBM_TOTAL (11*32+ 2)/* LLC Total MBM monitoring */ +#define X86_FEATURE_CQM_MBM_LOCAL (11*32+ 3)/* LLC Local MBM monitoring */ +#define X86_FEATURE_FENCE_SWAPGS_USER (11*32+ 4)/* "" LFENCE in user entry SWAPGS path */ +#define X86_FEATURE_FENCE_SWAPGS_KERNEL (11*32+ 5)/* "" LFENCE in kernel entry SWAPGS path */ /* AMD-defined CPU features, CPUID level 0x80000008 (EBX), word 13 */ #define X86_FEATURE_CLZERO (13*32+ 0)/* CLZERO instruction */
@@ -387,5 +392,6 @@#define X86_BUG_L1TF X86_BUG(18)/* CPU is affected by L1 Terminal Fault */ #define X86_BUG_MDS X86_BUG(19)/* CPU is affected by Microarchitectural data sampling */ #define X86_BUG_MSBDS_ONLY X86_BUG(20)/* CPU is only affected by the MSDBS variant of BUG_MDS */ +#define X86_BUG_SWAPGS X86_BUG(21)/* CPU is affected by speculation through SWAPGS */ #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/include/asm/kvm_host.h +19 -15
@@ -1491,25 +1491,29 @@ enum {#define kvm_arch_vcpu_memslots_id (vcpu) ((vcpu)->arch.hflags & HF_SMM_MASK ? 1 : 0)#define kvm_memslots_for_spte_role (kvm, role) __kvm_memslots(kvm, (role).smm) +asmlinkage void __noreturn kvm_spurious_fault(void); +/* * Hardware virtualization extension instructions may fault if a * reboot turns off virtualization while processes are running. -* Trap the fault and ignore the instruction if that happens. +* Usually after catching the fault we just panic; during reboot +* instead the instruction is ignored. */ -asmlinkage void kvm_spurious_fault(void); - -#define ____kvm_handle_fault_on_reboot (insn, cleanup_insn) \ - "666: " insn "\n\t" \ - "668: \n\t" \ - ".pushsection .fixup, \"ax\" \n" \ - "667: \n\t" \ - cleanup_insn "\n\t" \ - "cmpb $0, kvm_rebooting \n\t" \ - "jne 668b \n\t" \ - __ASM_SIZE(push) " $666b \n\t" \ - "jmp kvm_spurious_fault \n\t" \ - ".popsection \n\t" \ - _ASM_EXTABLE(666b, 667b) +#define ____kvm_handle_fault_on_reboot (insn, cleanup_insn) \ + "666: \n\t" \ + insn "\n\t" \ + "jmp 668f \n\t" \ + "667: \n\t" \ + "call kvm_spurious_fault \n\t" \ + "668: \n\t" \ + ".pushsection .fixup, \"ax\" \n\t" \ + "700: \n\t" \ + cleanup_insn "\n\t" \ + "cmpb $0, kvm_rebooting\n\t" \ + "je 667b \n\t" \ + "jmp 668b \n\t" \ + ".popsection \n\t" \ + _ASM_EXTABLE(666b, 700b)#define __kvm_handle_fault_on_reboot (insn) \ ____kvm_handle_fault_on_reboot(insn, "")
arch/x86/include/asm/paravirt.h +1 -0
@@ -746,6 +746,7 @@ bool __raw_callee_save___native_vcpu_is_preempted(long cpu);PV_RESTORE_ALL_CALLER_REGS \ FRAME_END \"ret;" \ + ".size " PV_THUNK_NAME(func) ", .-" PV_THUNK_NAME(func) ";" \ ".popsection")/* Get a reference to a callee-save function */
arch/x86/include/asm/traps.h +1 -1
@@ -40,7 +40,7 @@ asmlinkage void simd_coprocessor_error(void); asmlinkage void xen_divide_error(void); asmlinkage void xen_xennmi(void); asmlinkage void xen_xendebug(void); -asmlinkage void xen_xenint3(void); +asmlinkage void xen_int3(void); asmlinkage void xen_overflow(void); asmlinkage void xen_bounds(void); asmlinkage void xen_invalid_op(void);
arch/x86/kernel/apic/apic.c +1 -1
@@ -183,7 +183,7 @@ EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok);/* * Debug level, exported for io_apic.c */ -unsigned int apic_verbosity; +int apic_verbosity;int pic_mode;
arch/x86/kernel/cpu/bugs.c +96 -9
132 lines not on this page · raw message
arch/x86/kernel/cpu/common.c +53 -43
140 lines not on this page · raw message
arch/x86/kernel/cpu/cpuid-deps.c +3 -0
@@ -59,6 +59,9 @@ static const struct cpuid_dep cpuid_deps[] = { { X86_FEATURE_AVX512_4VNNIW, X86_FEATURE_AVX512F }, { X86_FEATURE_AVX512_4FMAPS, X86_FEATURE_AVX512F }, { X86_FEATURE_AVX512_VPOPCNTDQ, X86_FEATURE_AVX512F }, + { X86_FEATURE_CQM_OCCUP_LLC, X86_FEATURE_CQM_LLC }, + { X86_FEATURE_CQM_MBM_TOTAL, X86_FEATURE_CQM_LLC }, + { X86_FEATURE_CQM_MBM_LOCAL, X86_FEATURE_CQM_LLC }, {} };
arch/x86/kernel/cpu/scattered.c +4 -0
@@ -26,6 +26,10 @@ struct cpuid_bit {static const struct cpuid_bit cpuid_bits[] = { {X86_FEATURE_APERFMPERF ,CPUID_ECX ,0 ,0x00000006 ,0 }, {X86_FEATURE_EPB ,CPUID_ECX ,3 ,0x00000006 ,0 }, + {X86_FEATURE_CQM_LLC ,CPUID_EDX ,1 ,0x0000000f ,0 }, + {X86_FEATURE_CQM_OCCUP_LLC ,CPUID_EDX ,0 ,0x0000000f ,1 }, + {X86_FEATURE_CQM_MBM_TOTAL ,CPUID_EDX ,1 ,0x0000000f ,1 }, + {X86_FEATURE_CQM_MBM_LOCAL ,CPUID_EDX ,2 ,0x0000000f ,1 }, {X86_FEATURE_CAT_L3 ,CPUID_EBX ,1 ,0x00000010 ,0 }, {X86_FEATURE_CAT_L2 ,CPUID_EBX ,2 ,0x00000010 ,0 }, {X86_FEATURE_CDP_L3 ,CPUID_ECX ,2 ,0x00000010 ,1 },
arch/x86/kernel/kvm.c +1 -0
@@ -817,6 +817,7 @@ asm( "cmpb $0, " __stringify(KVM_STEAL_TIME_preempted) "+steal_time(%rax);""setne %al;" "ret;" +".size __raw_callee_save___kvm_vcpu_is_preempted, .-__raw_callee_save___kvm_vcpu_is_preempted;" ".popsection");#endif
arch/x86/kvm/cpuid.h +0 -2
@@ -47,8 +47,6 @@ static const struct cpuid_reg reverse_cpuid[] = { [CPUID_8000_0001_ECX] = {0x80000001, 0, CPUID_ECX}, [CPUID_7_0_EBX] = { 7, 0, CPUID_EBX}, [CPUID_D_1_EAX] = { 0xd, 1, CPUID_EAX}, - [CPUID_F_0_EDX] = { 0xf, 0, CPUID_EDX}, - [CPUID_F_1_EDX] = { 0xf, 1, CPUID_EDX}, [CPUID_8000_0008_EBX] = {0x80000008, 0, CPUID_EBX}, [CPUID_6_EAX] = { 6, 0, CPUID_EAX}, [CPUID_8000_000A_EDX] = {0x8000000a, 0, CPUID_EDX},
arch/x86/kvm/mmu.c +3 -3
@@ -4593,11 +4593,11 @@ static void update_permission_bitmask(struct kvm_vcpu *vcpu,*/ /* Faults from writes to non-writable pages */ -u8 wf = (pfec &PFERR_WRITE_MASK ) ? ~w :0 ; +u8 wf = (pfec &PFERR_WRITE_MASK ) ? (u8 )~w :0 ;/* Faults from user mode accesses to supervisor pages */ -u8 uf = (pfec &PFERR_USER_MASK ) ? ~u :0 ; +u8 uf = (pfec &PFERR_USER_MASK ) ? (u8 )~u :0 ;/* Faults from fetches of non-executable pages*/ -u8 ff = (pfec &PFERR_FETCH_MASK ) ? ~x :0 ; +u8 ff = (pfec &PFERR_FETCH_MASK ) ? (u8 )~x :0 ;/* Faults from kernel mode fetches of user pages */ u8 smepf =0 ;/* Faults from kernel mode accesses of user pages */
arch/x86/kvm/vmx/nested.c +4 -1
@@ -4087,7 +4087,10 @@ int get_vmx_mem_address(struct kvm_vcpu *vcpu, unsigned long exit_qualification,* mode, e.g. a 32-bit address size can yield a 64-bit virtual * address when using FS/GS with a non-zero base. */ - *ret = s.base + off; +if (seg_reg ==VCPU_SREG_FS || seg_reg ==VCPU_SREG_GS ) + *ret = s.base + off; +else + *ret = off;/* Long mode: #GP(0)/#SS(0) if the memory address is in a * non-canonical form. This is the only check on the memory
arch/x86/math-emu/fpu_emu.h +1 -1
@@ -177,7 +177,7 @@ static inline void reg_copy(FPU_REG const *x, FPU_REG *y)#define setexponentpos (x,y) { (*(short *)&((x)->exp)) = \ ((y) + EXTENDED_Ebias) & 0x7fff; }#define exponent16 (x) (*(short *)&((x)->exp)) -#define setexponent16 (x,y) { (*(short *)&((x)->exp)) = (y); } +#define setexponent16 (x,y) { (*(short *)&((x)->exp)) = (u16)(y); }#define addexponent (x,y) { (*(short *)&((x)->exp)) += (y); }#define stdexp (x) { (*(short *)&((x)->exp)) += EXTENDED_Ebias; }
arch/x86/math-emu/reg_constant.c +1 -1
@@ -18,7 +18,7 @@#include "control_w.h" #define MAKE_REG (s, e, l, h) { l, h, \ - ((EXTENDED_Ebias+(e)) | ((SIGN_##s != 0)*0x8000)) } + (u16)((EXTENDED_Ebias+(e)) | ((SIGN_##s != 0)*0x8000)) }FPU_REG const CONST_1 =MAKE_REG (POS ,0 ,0x00000000 ,0x80000000 );#if 0
arch/x86/xen/enlighten_pv.c +1 -1
@@ -596,12 +596,12 @@ struct trap_array_entry {static struct trap_array_entry trap_array[] = { { debug, xen_xendebug, true }, - { int3, xen_xenint3, true }, { double_fault, xen_double_fault, true }, #ifdef CONFIG_X86_MCE { machine_check, xen_machine_check, true }, #endif { nmi, xen_xennmi, true }, + { int3, xen_int3, false }, { overflow, xen_overflow, false }, #ifdef CONFIG_IA32_EMULATION { entry_INT80_compat, xen_entry_INT80_compat, false },
arch/x86/xen/xen-asm_64.S +0 -1
@@ -32,7 +32,6 @@ xen_pv_trap divide_error xen_pv_trap debug xen_pv_trap xendebug xen_pv_trap int3 -xen_pv_trap xenint3 xen_pv_trap xennmi xen_pv_trap overflow xen_pv_trap bounds
drivers/acpi/blacklist.c +4 -0
@@ -17,7 +17,9 @@#include "internal.h" +#ifdef CONFIG_DMI static const struct dmi_system_id acpi_rev_dmi_table[]__initconst ; +#endif /* * POLICY: If *anything* doesn't work, put it on the blacklist.
@@ -61,7 +63,9 @@ int __init acpi_blacklisted(void) } (void )early_acpi_osi_init (); +#ifdef CONFIG_DMI dmi_check_system (acpi_rev_dmi_table); +#endif return blacklisted; }
drivers/block/loop.c +9 -7
@@ -932,6 +932,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,struct file *file;struct inode *inode;struct address_space *mapping; +struct block_device *claimed_bdev =NULL ;int lo_flags =0 ;int error;loff_t size;
@@ -950,10 +951,11 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,* here to avoid changing device under exclusive owner. */ if (!(mode &FMODE_EXCL )) { -bdgrab (bdev); - error =blkdev_get (bdev, mode |FMODE_EXCL , loop_set_fd); -if (error) + claimed_bdev =bd_start_claiming (bdev, loop_set_fd); +if (IS_ERR (claimed_bdev)) { + error =PTR_ERR (claimed_bdev); goto out_putf; + } } error =mutex_lock_killable (&loop_ctl_mutex);
@@ -1023,15 +1025,15 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,mutex_unlock (&loop_ctl_mutex);if (partscan)loop_reread_partitions (lo, bdev); -if (!(mode &FMODE_EXCL )) -blkdev_put (bdev, mode |FMODE_EXCL ); +if (claimed_bdev) +bd_abort_claiming (bdev, claimed_bdev, loop_set_fd);return 0 ; out_unlock:mutex_unlock (&loop_ctl_mutex); out_bdev: -if (!(mode &FMODE_EXCL )) -blkdev_put (bdev, mode |FMODE_EXCL ); +if (claimed_bdev) +bd_abort_claiming (bdev, claimed_bdev, loop_set_fd); out_putf:fput (file); out:
drivers/block/nbd.c +1 -1
@@ -1229,7 +1229,7 @@ static void nbd_clear_sock_ioctl(struct nbd_device *nbd, struct block_device *bdev) {sock_shutdown (nbd); -kill_bdev (bdev); +__invalidate_device (bdev, true);nbd_bdev_reset (bdev);if (test_and_clear_bit (NBD_HAS_CONFIG_REF , &nbd->config->runtime_flags))
drivers/char/tpm/tpm-chip.c +16 -7
@@ -77,6 +77,18 @@ static int tpm_go_idle(struct tpm_chip *chip)return chip->ops->go_idle (chip); } +static void tpm_clk_enable (struct tpm_chip *chip) +{ +if (chip->ops->clk_enable) + chip->ops->clk_enable (chip, true); +} + +static void tpm_clk_disable (struct tpm_chip *chip) +{ +if (chip->ops->clk_enable) + chip->ops->clk_enable (chip, false); +} +/** * tpm_chip_start() - power on the TPM * @chip: a TPM chip to use
@@ -89,13 +101,12 @@ int tpm_chip_start(struct tpm_chip *chip) {int ret; -if (chip->ops->clk_enable) - chip->ops->clk_enable (chip, true); +tpm_clk_enable (chip);if (chip->locality ==-1 ) { ret =tpm_request_locality (chip);if (ret) { - chip->ops->clk_enable (chip, false); +tpm_clk_disable (chip);return ret; } }
@@ -103,8 +114,7 @@ int tpm_chip_start(struct tpm_chip *chip) ret =tpm_cmd_ready (chip);if (ret) {tpm_relinquish_locality (chip); -if (chip->ops->clk_enable) - chip->ops->clk_enable (chip, false); +tpm_clk_disable (chip);return ret; }
@@ -124,8 +134,7 @@ void tpm_chip_stop(struct tpm_chip *chip) {tpm_go_idle (chip);tpm_relinquish_locality (chip); -if (chip->ops->clk_enable) - chip->ops->clk_enable (chip, false); +tpm_clk_disable (chip); }EXPORT_SYMBOL_GPL (tpm_chip_stop);
drivers/clk/mediatek/clk-mt8183.c +34 -12
80 lines not on this page · raw message
drivers/clk/meson/clk-mpll.c +6 -3
@@ -119,9 +119,12 @@ static int mpll_set_rate(struct clk_hw *hw,meson_parm_write (clk->map, &mpll->sdm, sdm);meson_parm_write (clk->map, &mpll->sdm_en,1 ); -/* Set additional fractional part enable if required */ -if (MESON_PARM_APPLICABLE (&mpll->ssen)) -meson_parm_write (clk->map, &mpll->ssen,1 ); +/* Set spread spectrum if possible */ +if (MESON_PARM_APPLICABLE (&mpll->ssen)) { +unsigned int ss = + mpll->flags &CLK_MESON_MPLL_SPREAD_SPECTRUM ?1 :0 ; +meson_parm_write (clk->map, &mpll->ssen, ss); + }/* Set the integer divider part */ meson_parm_write (clk->map, &mpll->n2, n2);
drivers/clk/meson/clk-mpll.h +1 -0
@@ -23,6 +23,7 @@ struct meson_clk_mpll_data { };#define CLK_MESON_MPLL_ROUND_CLOSEST BIT(0) +#define CLK_MESON_MPLL_SPREAD_SPECTRUM BIT(1)extern const struct clk_ops meson_clk_mpll_ro_ops;extern const struct clk_ops meson_clk_mpll_ops;
drivers/clk/sprd/sc9860-clk.c +4 -1
@@ -2023,6 +2023,7 @@ static int sc9860_clk_probe(struct platform_device *pdev) {const struct of_device_id *match;const struct sprd_clk_desc *desc; +int ret; match =of_match_node (sprd_sc9860_clk_ids, pdev->dev.of_node);if (!match) {
@@ -2031,7 +2032,9 @@ static int sc9860_clk_probe(struct platform_device *pdev) } desc = match->data; -sprd_clk_regmap_init (pdev, desc); + ret =sprd_clk_regmap_init (pdev, desc); +if (ret) +return ret;return sprd_clk_probe (&pdev->dev, desc->hw_clks); }
drivers/clk/tegra/clk-tegra210.c +4 -4
@@ -2204,9 +2204,9 @@ static struct div_nmp pllu_nmp = { };static struct tegra_clk_pll_freq_table pll_u_freq_table[] = { - {12000000 ,480000000 ,40 ,1 ,0 ,0 }, - {13000000 ,480000000 ,36 ,1 ,0 ,0 },/* actual: 468.0 MHz */ - {38400000 ,480000000 ,25 ,2 ,0 ,0 }, + {12000000 ,480000000 ,40 ,1 ,1 ,0 }, + {13000000 ,480000000 ,36 ,1 ,1 ,0 },/* actual: 468.0 MHz */ + {38400000 ,480000000 ,25 ,2 ,1 ,0 }, {0 ,0 ,0 ,0 ,0 ,0 }, };
@@ -3333,6 +3333,7 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA210_CLK_DFLL_REF, TEGRA210_CLK_PLL_P, 51000000, 1 }, { TEGRA210_CLK_SBC4, TEGRA210_CLK_PLL_P, 12000000, 1 }, { TEGRA210_CLK_PLL_RE_VCO, TEGRA210_CLK_CLK_MAX, 672000000, 1 }, + { TEGRA210_CLK_PLL_U_OUT1, TEGRA210_CLK_CLK_MAX, 48000000, 1 }, { TEGRA210_CLK_XUSB_GATE, TEGRA210_CLK_CLK_MAX, 0, 1 }, { TEGRA210_CLK_XUSB_SS_SRC, TEGRA210_CLK_PLL_U_480M, 120000000, 0 }, { TEGRA210_CLK_XUSB_FS_SRC, TEGRA210_CLK_PLL_U_48M, 48000000, 0 },
@@ -3357,7 +3358,6 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA210_CLK_PLL_DP, TEGRA210_CLK_CLK_MAX, 270000000, 0 }, { TEGRA210_CLK_SOC_THERM, TEGRA210_CLK_PLL_P, 51000000, 0 }, { TEGRA210_CLK_CCLK_G, TEGRA210_CLK_CLK_MAX, 0, 1 }, - { TEGRA210_CLK_PLL_U_OUT1, TEGRA210_CLK_CLK_MAX, 48000000, 1 }, { TEGRA210_CLK_PLL_U_OUT2, TEGRA210_CLK_CLK_MAX, 60000000, 1 }, { TEGRA210_CLK_SPDIF_IN_SYNC, TEGRA210_CLK_CLK_MAX, 24576000, 0 }, { TEGRA210_CLK_I2S0_SYNC, TEGRA210_CLK_CLK_MAX, 24576000, 0 },
drivers/crypto/ccp/psp-dev.c +12 -7
@@ -24,10 +24,6 @@#include "sp-dev.h" #include "psp-dev.h" -#define SEV_VERSION_GREATER_OR_EQUAL (_maj, _min) \ - ((psp_master->api_major) >= _maj && \ - (psp_master->api_minor) >= _min) -#define DEVICE_NAME "sev"#define SEV_FW_FILE "amd/sev.fw"#define SEV_FW_NAME_SIZE 64
@@ -47,6 +43,15 @@ MODULE_PARM_DESC(psp_probe_timeout, " default timeout value, in seconds, duringstatic bool psp_dead;static int psp_timeout; +static inline bool sev_version_greater_or_equal (u8 maj,u8 min) +{ +if (psp_master->api_major > maj) +return true; +if (psp_master->api_major == maj && psp_master->api_minor >= min) +return true; +return false; +} +static struct psp_device *psp_alloc_struct (struct sp_device *sp) {struct device *dev = sp->dev;
@@ -588,7 +593,7 @@ static int sev_ioctl_do_get_id2(struct sev_issue_cmd *argp)int ret;/* SEV GET_ID is available from SEV API v0.16 and up */ -if (!SEV_VERSION_GREATER_OR_EQUAL (0 ,16 )) +if (!sev_version_greater_or_equal (0 ,16 ))return -ENOTSUPP ;if (copy_from_user (&input, (void __user *)argp->data,sizeof (input)))
@@ -651,7 +656,7 @@ static int sev_ioctl_do_get_id(struct sev_issue_cmd *argp)int ret;/* SEV GET_ID available from SEV API v0.16 and up */ -if (!SEV_VERSION_GREATER_OR_EQUAL (0 ,16 )) +if (!sev_version_greater_or_equal (0 ,16 ))return -ENOTSUPP ;/* SEV FW expects the buffer it fills with the ID to be
@@ -1053,7 +1058,7 @@ void psp_pci_init(void) psp_master->sev_state =SEV_STATE_UNINIT ; } -if (SEV_VERSION_GREATER_OR_EQUAL (0 ,15 ) && +if (sev_version_greater_or_equal (0 ,15 ) &&sev_update_firmware (psp_master->dev) ==0 )sev_get_api_version ();
drivers/dax/kmem.c +4 -1
@@ -66,8 +66,11 @@ int dev_dax_kmem_probe(struct device *dev) new_res->name =dev_name (dev); rc =add_memory (numa_node, new_res->start,resource_size (new_res)); -if (rc) +if (rc) { +release_resource (new_res); +kfree (new_res);return rc; + }return 0 ; }
drivers/dma/sh/rcar-dmac.c +1 -1
@@ -1165,7 +1165,7 @@ rcar_dmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,struct rcar_dmac_chan *rchan =to_rcar_dmac_chan (chan);/* Someone calling slave DMA on a generic channel? */ -if (rchan->mid_rid <0 || !sg_len) { +if (rchan->mid_rid <0 || !sg_len || !sg_dma_len (sgl)) {dev_warn (chan->device->dev,"%s: bad parameter: len=%d, id=%d\n" , __func__, sg_len, rchan->mid_rid);
drivers/dma/tegra20-apb-dma.c +10 -2
@@ -977,8 +977,12 @@ static struct dma_async_tx_descriptor *tegra_dma_prep_slave_sg( csr |= tdc->slave_id <<TEGRA_APBDMA_CSR_REQ_SEL_SHIFT ; } -if (flags &DMA_PREP_INTERRUPT ) +if (flags &DMA_PREP_INTERRUPT ) { csr |=TEGRA_APBDMA_CSR_IE_EOC ; + }else { +WARN_ON_ONCE (1 ); +return NULL ; + } apb_seq |=TEGRA_APBDMA_APBSEQ_WRAP_WORD_1 ;
@@ -1120,8 +1124,12 @@ static struct dma_async_tx_descriptor *tegra_dma_prep_dma_cyclic( csr |= tdc->slave_id <<TEGRA_APBDMA_CSR_REQ_SEL_SHIFT ; } -if (flags &DMA_PREP_INTERRUPT ) +if (flags &DMA_PREP_INTERRUPT ) { csr |=TEGRA_APBDMA_CSR_IE_EOC ; + }else { +WARN_ON_ONCE (1 ); +return NULL ; + } apb_seq |=TEGRA_APBDMA_APBSEQ_WRAP_WORD_1 ;
drivers/firmware/psci/psci_checker.c +6 -4
@@ -359,16 +359,16 @@ static int suspend_test_thread(void *arg)for (;;) {/* Needs to be set first to avoid missing a wakeup. */ set_current_state (TASK_INTERRUPTIBLE ); -if (kthread_should_stop ()) { -__set_current_state (TASK_RUNNING ); +if (kthread_should_park ())break ; - }schedule (); }pr_info ("CPU %d suspend test results: success %d, shallow states %d, errors %d\n" , cpu, nb_suspend, nb_shallow_sleep, nb_err); +kthread_parkme (); +return nb_err; }
@@ -433,8 +433,10 @@ static int suspend_tests(void)/* Stop and destroy all threads, get return status. */ -for (i =0 ; i < nb_threads; ++i) +for (i =0 ; i < nb_threads; ++i) { + err +=kthread_park (threads[i]); err +=kthread_stop (threads[i]); + } out:cpuidle_resume_and_unlock ();kfree (threads);
drivers/gpio/gpiolib.c +15 -8
@@ -956,9 +956,11 @@ static int lineevent_create(struct gpio_device *gdev, void __user *ip) }if (eflags &GPIOEVENT_REQUEST_RISING_EDGE ) - irqflags |=IRQF_TRIGGER_RISING ; + irqflags |=test_bit (FLAG_ACTIVE_LOW , &desc->flags) ? +IRQF_TRIGGER_FALLING :IRQF_TRIGGER_RISING ;if (eflags &GPIOEVENT_REQUEST_FALLING_EDGE ) - irqflags |=IRQF_TRIGGER_FALLING ; + irqflags |=test_bit (FLAG_ACTIVE_LOW , &desc->flags) ? +IRQF_TRIGGER_RISING :IRQF_TRIGGER_FALLING ; irqflags |=IRQF_ONESHOT ;INIT_KFIFO (le->events);
@@ -1392,12 +1394,17 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data,for (i =0 ; i < chip->ngpio; i++) {struct gpio_desc *desc = &gdev->descs[i]; -if (chip->get_direction &&gpiochip_line_is_valid (chip, i)) - desc->flags = !chip->get_direction (chip, i) ? - (1 <<FLAG_IS_OUT ) :0 ; -else - desc->flags = !chip->direction_input ? - (1 <<FLAG_IS_OUT ) :0 ; +if (chip->get_direction &&gpiochip_line_is_valid (chip, i)) { +if (!chip->get_direction (chip, i)) +set_bit (FLAG_IS_OUT , &desc->flags); +else +clear_bit (FLAG_IS_OUT , &desc->flags); + }else { +if (!chip->direction_input) +set_bit (FLAG_IS_OUT , &desc->flags); +else +clear_bit (FLAG_IS_OUT , &desc->flags); + } }acpi_gpiochip_add (chip);
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +3 -0
@@ -2034,6 +2034,9 @@ enum dc_status resource_map_pool_resources(if (context->streams[i] == stream) { context->stream_status[i].primary_otg_inst = pipe_ctx->stream_res.tg->inst; context->stream_status[i].stream_enc_inst = pipe_ctx->stream_res.stream_enc->id; + context->stream_status[i].audio_inst = + pipe_ctx->stream_res.audio ? pipe_ctx->stream_res.audio->inst :-1 ; +return DC_OK ; }
drivers/gpu/drm/amd/display/dc/dc_stream.h +1 -0
@@ -42,6 +42,7 @@ struct dc_stream_status {int primary_otg_inst;int stream_enc_inst;int plane_count; +int audio_inst;struct timing_sync_info timing_sync_info;struct dc_plane_state *plane_states[MAX_SURFACE_NUM ]; };
drivers/gpu/drm/i915/gvt/kvmgt.c +12 -0
@@ -1904,6 +1904,18 @@ static int kvmgt_dma_map_guest_page(unsigned long handle, unsigned long gfn, entry =__gvt_cache_find_gfn (info->vgpu, gfn);if (!entry) { + ret =gvt_dma_map_page (vgpu, gfn, dma_addr, size); +if (ret) + goto err_unlock; + + ret =__gvt_cache_add (info->vgpu, gfn, *dma_addr, size); +if (ret) + goto err_unmap; + }else if (entry->size != size) { +/* the same gfn with different size: unmap and re-map */ +gvt_dma_unmap_page (vgpu, gfn, entry->dma_addr, entry->size); +__gvt_cache_remove_entry (vgpu, entry); + ret =gvt_dma_map_page (vgpu, gfn, dma_addr, size);if (ret) goto err_unlock;
drivers/gpu/drm/i915/i915_perf.c +7 -3
@@ -3457,9 +3457,13 @@ void i915_perf_init(struct drm_i915_private *dev_priv) dev_priv->perf.oa.ops.enable_metric_set = gen8_enable_metric_set; dev_priv->perf.oa.ops.disable_metric_set = gen10_disable_metric_set; - dev_priv->perf.oa.ctx_oactxctrl_offset =0x128 ; - dev_priv->perf.oa.ctx_flexeu0_offset =0x3de ; - +if (IS_GEN (dev_priv,10 )) { + dev_priv->perf.oa.ctx_oactxctrl_offset =0x128 ; + dev_priv->perf.oa.ctx_flexeu0_offset =0x3de ; + }else { + dev_priv->perf.oa.ctx_oactxctrl_offset =0x124 ; + dev_priv->perf.oa.ctx_flexeu0_offset =0x78e ; + } dev_priv->perf.oa.gen8_valid_ctx_bit = (1 <<16 ); } }
drivers/gpu/drm/nouveau/dispnv50/disp.c +1 -1
@@ -775,7 +775,7 @@ nv50_msto_atomic_check(struct drm_encoder *encoder,drm_dp_calc_pbn_mode (crtc_state->adjusted_mode.clock, connector->display_info.bpc *3 ); -if (drm_atomic_crtc_needs_modeset (crtc_state)) { +if (crtc_state->mode_changed) { slots =drm_dp_atomic_find_vcpi_slots (state, &mstm->mgr, mstc->port, asyh->dp.pbn);
drivers/gpu/drm/nouveau/nouveau_connector.c +1 -1
@@ -252,7 +252,7 @@ nouveau_conn_reset(struct drm_connector *connector)return ;if (connector->state) -__drm_atomic_helper_connector_destroy_state (connector->state); +nouveau_conn_atomic_destroy_state (connector, connector->state);__drm_atomic_helper_connector_reset (connector, &asyc->state); asyc->dither.mode =DITHERING_MODE_AUTO ; asyc->dither.depth =DITHERING_DEPTH_AUTO ;
drivers/gpu/drm/nouveau/nouveau_dmem.c +2 -1
@@ -385,9 +385,10 @@ nouveau_dmem_pages_alloc(struct nouveau_drm *drm, ret =nouveau_dmem_chunk_alloc (drm);if (ret) {if (c) -break ; +return 0 ;return ret; } +mutex_lock (&drm->dmem->mutex);continue ; }
drivers/i2c/busses/i2c-at91-core.c +1 -1
@@ -142,7 +142,7 @@ static struct at91_twi_pdata sama5d4_config = {static struct at91_twi_pdata sama5d2_config = { .clk_max_div =7 , - .clk_offset =4 , + .clk_offset =3 , .has_unre_flag = true, .has_alt_cmd = true, .has_hold_field = true,
drivers/i2c/busses/i2c-at91-master.c +5 -4
@@ -122,9 +122,11 @@ static void at91_twi_write_next_byte(struct at91_twi_dev *dev)writeb_relaxed (*dev->buf, dev->base +AT91_TWI_THR );/* send stop when last byte has been written */ -if (--dev->buf_len ==0 ) +if (--dev->buf_len ==0 ) {if (!dev->use_alt_cmd)at91_twi_write (dev,AT91_TWI_CR ,AT91_TWI_STOP ); +at91_twi_write (dev,AT91_TWI_IDR ,AT91_TWI_TXRDY ); + }dev_dbg (dev->dev,"wrote 0x%x, to go %zu\n" , *dev->buf, dev->buf_len);
@@ -542,9 +544,8 @@ static int at91_do_twi_transfer(struct at91_twi_dev *dev) }else {at91_twi_write_next_byte (dev);at91_twi_write (dev,AT91_TWI_IER , -AT91_TWI_TXCOMP | -AT91_TWI_NACK | -AT91_TWI_TXRDY ); +AT91_TWI_TXCOMP |AT91_TWI_NACK | + (dev->buf_len ?AT91_TWI_TXRDY :0 )); } }
drivers/i2c/busses/i2c-bcm-iproc.c +6 -4
@@ -403,16 +403,18 @@ static bool bcm_iproc_i2c_slave_isr(struct bcm_iproc_i2c_dev *iproc_i2c,static void bcm_iproc_i2c_read_valid_bytes (struct bcm_iproc_i2c_dev *iproc_i2c) {struct i2c_msg *msg = iproc_i2c->msg; +uint32_t val;/* Read valid data from RX FIFO */ while (iproc_i2c->rx_bytes < msg->len) { -if (!((iproc_i2c_rd_reg (iproc_i2c,M_FIFO_CTRL_OFFSET ) >>M_FIFO_RX_CNT_SHIFT ) - &M_FIFO_RX_CNT_MASK )) + val =iproc_i2c_rd_reg (iproc_i2c,M_RX_OFFSET ); + +/* rx fifo empty */ +if (!((val >>M_RX_STATUS_SHIFT ) &M_RX_STATUS_MASK ))break ; msg->buf[iproc_i2c->rx_bytes] = - (iproc_i2c_rd_reg (iproc_i2c,M_RX_OFFSET ) >> -M_RX_DATA_SHIFT ) &M_RX_DATA_MASK ; + (val >>M_RX_DATA_SHIFT ) &M_RX_DATA_MASK ; iproc_i2c->rx_bytes++; } }
drivers/infiniband/core/device.c +41 -13
105 lines not on this page · raw message
drivers/infiniband/hw/bnxt_re/ib_verbs.c +5 -2
@@ -308,6 +308,7 @@ int bnxt_re_del_gid(const struct ib_gid_attr *attr, void **context)struct bnxt_re_dev *rdev =to_bnxt_re_dev (attr->device, ibdev);struct bnxt_qplib_sgid_tbl *sgid_tbl = &rdev->qplib_res.sgid_tbl;struct bnxt_qplib_gid *gid_to_del; +u16 vlan_id =0xFFFF ;/* Delete the entry from the hardware */ ctx = *context;
@@ -317,7 +318,8 @@ int bnxt_re_del_gid(const struct ib_gid_attr *attr, void **context)if (sgid_tbl && sgid_tbl->active) {if (ctx->idx >= sgid_tbl->max)return -EINVAL ; - gid_to_del = &sgid_tbl->tbl[ctx->idx]; + gid_to_del = &sgid_tbl->tbl[ctx->idx].gid; + vlan_id = sgid_tbl->tbl[ctx->idx].vlan_id;/* DEL_GID is called in WQ context(netdevice_event_work_handler) * or via the ib_unregister_device path. In the former case QP1 * may not be destroyed yet, in which case just return as FW
@@ -335,7 +337,8 @@ int bnxt_re_del_gid(const struct ib_gid_attr *attr, void **context) } ctx->refcnt--;if (!ctx->refcnt) { - rc =bnxt_qplib_del_sgid (sgid_tbl, gid_to_del, true); + rc =bnxt_qplib_del_sgid (sgid_tbl, gid_to_del, + vlan_id, true);if (rc) {dev_err (rdev_to_dev (rdev),"Failed to remove GID: %#x" , rc);
drivers/infiniband/hw/bnxt_re/qplib_res.c +9 -4
@@ -488,7 +488,7 @@ static int bnxt_qplib_alloc_sgid_tbl(struct bnxt_qplib_res *res, struct bnxt_qplib_sgid_tbl *sgid_tbl, u16 max) { - sgid_tbl->tbl =kcalloc (max,sizeof (struct bnxt_qplib_gid ),GFP_KERNEL ); + sgid_tbl->tbl =kcalloc (max,sizeof (*sgid_tbl->tbl),GFP_KERNEL );if (!sgid_tbl->tbl)return -ENOMEM ;
@@ -526,9 +526,10 @@ static void bnxt_qplib_cleanup_sgid_tbl(struct bnxt_qplib_res *res,for (i =0 ; i < sgid_tbl->max; i++) {if (memcmp (&sgid_tbl->tbl[i], &bnxt_qplib_gid_zero,sizeof (bnxt_qplib_gid_zero))) -bnxt_qplib_del_sgid (sgid_tbl, &sgid_tbl->tbl[i], true); +bnxt_qplib_del_sgid (sgid_tbl, &sgid_tbl->tbl[i].gid, + sgid_tbl->tbl[i].vlan_id, true); } -memset (sgid_tbl->tbl,0 ,sizeof (struct bnxt_qplib_gid ) * sgid_tbl->max); +memset (sgid_tbl->tbl,0 ,sizeof (*sgid_tbl->tbl) * sgid_tbl->max);memset (sgid_tbl->hw_id,-1 ,sizeof (u16) * sgid_tbl->max);memset (sgid_tbl->vlan,0 ,sizeof (u8) * sgid_tbl->max); sgid_tbl->active =0 ;
@@ -537,7 +538,11 @@ static void bnxt_qplib_cleanup_sgid_tbl(struct bnxt_qplib_res *res,static void bnxt_qplib_init_sgid_tbl (struct bnxt_qplib_sgid_tbl *sgid_tbl,struct net_device *netdev) { -memset (sgid_tbl->tbl,0 ,sizeof (struct bnxt_qplib_gid ) * sgid_tbl->max); +u32 i; + +for (i =0 ; i < sgid_tbl->max; i++) + sgid_tbl->tbl[i].vlan_id =0xffff ; +memset (sgid_tbl->hw_id,-1 ,sizeof (u16) * sgid_tbl->max); }
drivers/infiniband/hw/bnxt_re/qplib_res.h +1 -1
@@ -111,7 +111,7 @@ struct bnxt_qplib_pd_tbl { };struct bnxt_qplib_sgid_tbl { -struct bnxt_qplib_gid *tbl; +struct bnxt_qplib_gid_info *tbl;u16 *hw_id;u16 max;u16 active;
drivers/infiniband/hw/bnxt_re/qplib_sp.c +9 -5
@@ -213,12 +213,12 @@ int bnxt_qplib_get_sgid(struct bnxt_qplib_res *res, index, sgid_tbl->max);return -EINVAL ; } -memcpy (gid, &sgid_tbl->tbl[index],sizeof (*gid)); +memcpy (gid, &sgid_tbl->tbl[index].gid,sizeof (*gid));return 0 ; }int bnxt_qplib_del_sgid (struct bnxt_qplib_sgid_tbl *sgid_tbl, -struct bnxt_qplib_gid *gid,bool update) +struct bnxt_qplib_gid *gid,u16 vlan_id,bool update) { struct bnxt_qplib_res *res = to_bnxt_qplib(sgid_tbl, struct bnxt_qplib_res,
@@ -236,7 +236,8 @@ int bnxt_qplib_del_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl,return -ENOMEM ; }for (index =0 ; index < sgid_tbl->max; index++) { -if (!memcmp (&sgid_tbl->tbl[index], gid,sizeof (*gid))) +if (!memcmp (&sgid_tbl->tbl[index].gid, gid,sizeof (*gid)) && + vlan_id == sgid_tbl->tbl[index].vlan_id)break ; }if (index == sgid_tbl->max) {
@@ -262,8 +263,9 @@ int bnxt_qplib_del_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl,if (rc)return rc; } -memcpy (&sgid_tbl->tbl[index], &bnxt_qplib_gid_zero, +memcpy (&sgid_tbl->tbl[index].gid, &bnxt_qplib_gid_zero,sizeof (bnxt_qplib_gid_zero)); + sgid_tbl->tbl[index].vlan_id =0xFFFF ; sgid_tbl->vlan[index] =0 ; sgid_tbl->active--; dev_dbg(&res->pdev->dev,
@@ -296,7 +298,8 @@ int bnxt_qplib_add_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, } free_idx = sgid_tbl->max;for (i =0 ; i < sgid_tbl->max; i++) { -if (!memcmp (&sgid_tbl->tbl[i], gid,sizeof (*gid))) { +if (!memcmp (&sgid_tbl->tbl[i], gid,sizeof (*gid)) && + sgid_tbl->tbl[i].vlan_id == vlan_id) {dev_dbg (&res->pdev->dev,"SGID entry already exist in entry %d!\n" , i); *index = i;
@@ -351,6 +354,7 @@ int bnxt_qplib_add_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, }/* Add GID to the sgid_tbl */ memcpy (&sgid_tbl->tbl[free_idx], gid,sizeof (*gid)); + sgid_tbl->tbl[free_idx].vlan_id = vlan_id; sgid_tbl->active++;if (vlan_id !=0xFFFF ) sgid_tbl->vlan[free_idx] =1 ;
drivers/infiniband/hw/bnxt_re/qplib_sp.h +6 -1
@@ -84,6 +84,11 @@ struct bnxt_qplib_gid {u8 data[16 ]; }; +struct bnxt_qplib_gid_info { +struct bnxt_qplib_gid gid; +u16 vlan_id; +}; +struct bnxt_qplib_ah {struct bnxt_qplib_gid dgid;struct bnxt_qplib_pd *pd;
@@ -221,7 +226,7 @@ int bnxt_qplib_get_sgid(struct bnxt_qplib_res *res, struct bnxt_qplib_sgid_tbl *sgid_tbl, int index, struct bnxt_qplib_gid *gid);int bnxt_qplib_del_sgid (struct bnxt_qplib_sgid_tbl *sgid_tbl, -struct bnxt_qplib_gid *gid,bool update); +struct bnxt_qplib_gid *gid,u16 vlan_id,bool update);int bnxt_qplib_add_sgid (struct bnxt_qplib_sgid_tbl *sgid_tbl,struct bnxt_qplib_gid *gid,u8 *mac,u16 vlan_id,bool update,u32 *index);
drivers/infiniband/hw/hfi1/chip.c +9 -2
@@ -14452,7 +14452,7 @@ void hfi1_deinit_vnic_rsm(struct hfi1_devdata *dd)clear_rcvctrl (dd,RCV_CTRL_RCV_RSM_ENABLE_SMASK ); } -static void init_rxe (struct hfi1_devdata *dd) +static int init_rxe (struct hfi1_devdata *dd) {struct rsm_map_table *rmt;u64 val;
@@ -14461,6 +14461,9 @@ static void init_rxe(struct hfi1_devdata *dd)write_csr (dd,RCV_ERR_MASK , ~0ull ); rmt =alloc_rsm_map_table (dd); +if (!rmt) +return -ENOMEM ; +/* set up QOS, including the QPN map table */ init_qos (dd, rmt);init_fecn_handling (dd, rmt);
@@ -14487,6 +14490,7 @@ static void init_rxe(struct hfi1_devdata *dd) val |= ((4ull &RCV_BYPASS_HDR_SIZE_MASK ) <<RCV_BYPASS_HDR_SIZE_SHIFT );write_csr (dd,RCV_BYPASS , val); +return 0 ; }static void init_other (struct hfi1_devdata *dd)
@@ -15024,7 +15028,10 @@ int hfi1_init_dd(struct hfi1_devdata *dd) goto bail_cleanup;/* set initial RXE CSRs */ -init_rxe (dd); + ret =init_rxe (dd); +if (ret) + goto bail_cleanup; +/* set initial TXE CSRs */ init_txe (dd);/* set initial non-RXE, non-TXE CSRs */
drivers/infiniband/hw/hfi1/tid_rdma.c +2 -41
61 lines not on this page · raw message
drivers/infiniband/hw/hfi1/verbs.c +2 -0
@@ -54,6 +54,7 @@#include <linux/mm.h> #include <linux/vmalloc.h> #include <rdma/opa_addr.h> +#include <linux/nospec.h> #include "hfi.h" #include "common.h"
@@ -1536,6 +1537,7 @@ static int hfi1_check_ah(struct ib_device *ibdev, struct rdma_ah_attr *ah_attr) sl =rdma_ah_get_sl (ah_attr);if (sl >=ARRAY_SIZE (ibp->sl_to_sc))return -EINVAL ; + sl =array_index_nospec (sl,ARRAY_SIZE (ibp->sl_to_sc)); sc5 = ibp->sl_to_sc[sl];if (sc_to_vlt (dd, sc5) > num_vls &&sc_to_vlt (dd, sc5) !=0xf )
drivers/infiniband/hw/mlx5/mlx5_ib.h +1 -0
@@ -480,6 +480,7 @@ struct mlx5_umr_wr {u64 length;int access_flags;u32 mkey; + u8 ignore_free_state:1; };static inline const struct mlx5_umr_wr *umr_wr (const struct ib_send_wr *wr)
drivers/infiniband/hw/mlx5/mr.c +14 -9
@@ -545,13 +545,16 @@ void mlx5_mr_cache_free(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr)return ; c =order2idx (dev, mr->order); -if (c <0 || c >=MAX_MR_CACHE_ENTRIES ) { -mlx5_ib_warn (dev,"order %d, cache index %d\n" , mr->order, c); -return ; - } +WARN_ON (c <0 || c >=MAX_MR_CACHE_ENTRIES ); -if (unreg_umr (dev, mr)) +if (unreg_umr (dev, mr)) { + mr->allocated_from_cache = false; +destroy_mkey (dev, mr); + ent = &cache->ent[c]; +if (ent->cur < ent->limit) +queue_work (cache->wq, &ent->work);return ; + } ent = &cache->ent[c];spin_lock_irq (&ent->lock);
@@ -1373,9 +1376,11 @@ static int unreg_umr(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr)return 0 ; umrwr.wr.send_flags =MLX5_IB_SEND_UMR_DISABLE_MR | -MLX5_IB_SEND_UMR_FAIL_IF_FREE ; +MLX5_IB_SEND_UMR_UPDATE_PD_ACCESS ; umrwr.wr.opcode =MLX5_IB_WR_UMR ; + umrwr.pd = dev->umrc.pd; umrwr.mkey = mr->mmkey.key; + umrwr.ignore_free_state =1 ;return mlx5_ib_post_send_wait (dev, &umrwr); }
@@ -1578,10 +1583,10 @@ static void clean_mr(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr) mr->sig =NULL ; } -mlx5_free_priv_descs (mr); - -if (!allocated_from_cache) +if (!allocated_from_cache) {destroy_mkey (dev, mr); +mlx5_free_priv_descs (mr); + } }static void dereg_mr (struct mlx5_ib_dev *dev,struct mlx5_ib_mr *mr)
drivers/infiniband/hw/mlx5/qp.c +8 -5
@@ -1718,7 +1718,6 @@ static int create_rss_raw_qp_tir(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp, }MLX5_SET (tirc, tirc, rx_hash_fn,MLX5_RX_HASH_FN_TOEPLITZ ); -MLX5_SET (tirc, tirc, rx_hash_symmetric,1 );memcpy (rss_key, ucmd.rx_hash_key, len);break ; }
@@ -4262,10 +4261,14 @@ static int set_reg_umr_segment(struct mlx5_ib_dev *dev,memset (umr,0 ,sizeof (*umr)); -if (wr->send_flags &MLX5_IB_SEND_UMR_FAIL_IF_FREE ) - umr->flags =MLX5_UMR_CHECK_FREE ;/* fail if free */ -else - umr->flags =MLX5_UMR_CHECK_NOT_FREE ;/* fail if not free */ +if (!umrwr->ignore_free_state) { +if (wr->send_flags &MLX5_IB_SEND_UMR_FAIL_IF_FREE ) +/* fail if free */ + umr->flags =MLX5_UMR_CHECK_FREE ; +else +/* fail if not free */ + umr->flags =MLX5_UMR_CHECK_NOT_FREE ; + } umr->xlt_octowords =cpu_to_be16 (get_xlt_octo (umrwr->xlt_size));if (wr->send_flags &MLX5_IB_SEND_UMR_UPDATE_XLT ) {
drivers/misc/eeprom/at24.c +1 -1
@@ -719,7 +719,7 @@ static int at24_probe(struct i2c_client *client) nvmem_config.name =dev_name (dev); nvmem_config.dev = dev; nvmem_config.read_only = !writable; - nvmem_config.root_only = true; + nvmem_config.root_only = !(flags &AT24_FLAG_IRUGO ); nvmem_config.owner =THIS_MODULE ; nvmem_config.compat = true; nvmem_config.base_dev = dev;
drivers/mmc/core/queue.c +5 -0
@@ -10,6 +10,7 @@#include <linux/kthread.h> #include <linux/scatterlist.h> #include <linux/dma-mapping.h> +#include <linux/backing-dev.h> #include <linux/mmc/card.h> #include <linux/mmc/host.h>
@@ -430,6 +431,10 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card) goto free_tag_set; } +if (mmc_host_is_spi (host) && host->use_spi_crc) + mq->queue->backing_dev_info->capabilities |= +BDI_CAP_STABLE_WRITES ; + mq->queue->queuedata = mq;blk_queue_rq_timeout (mq->queue,60 *HZ );
drivers/mmc/host/dw_mmc.c +1 -2
@@ -2034,8 +2034,7 @@ static void dw_mci_tasklet_func(unsigned long priv)* delayed. Allowing the transfer to take place * avoids races and keeps things simple. */ -if ((err != -ETIMEDOUT ) && - (cmd->opcode ==MMC_SEND_TUNING_BLOCK )) { +if (err != -ETIMEDOUT ) { state =STATE_SENDING_DATA ;continue ; }
drivers/mmc/host/meson-mx-sdio.c +1 -1
@@ -73,7 +73,7 @@#define MESON_MX_SDIO_IRQC_IF_CONFIG_MASK GENMASK(7, 6)#define MESON_MX_SDIO_IRQC_FORCE_DATA_CLK BIT(8)#define MESON_MX_SDIO_IRQC_FORCE_DATA_CMD BIT(9) -#define MESON_MX_SDIO_IRQC_FORCE_DATA_DAT_MASK GENMASK(10, 13) +#define MESON_MX_SDIO_IRQC_FORCE_DATA_DAT_MASK GENMASK(13, 10)#define MESON_MX_SDIO_IRQC_SOFT_RESET BIT(15)#define MESON_MX_SDIO_IRQC_FORCE_HALT BIT(30)#define MESON_MX_SDIO_IRQC_HALT_HOLE BIT(31)
drivers/mmc/host/sdhci-sprd.c +1 -0
@@ -405,6 +405,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev)sdhci_cleanup_host (host); pm_runtime_disable: +pm_runtime_put_noidle (&pdev->dev);pm_runtime_disable (&pdev->dev);pm_runtime_set_suspended (&pdev->dev);
drivers/mtd/nand/raw/nand_micron.c +11 -3
@@ -390,6 +390,14 @@ static int micron_supports_on_die_ecc(struct nand_chip *chip) (chip->id.data[4] & MICRON_ID_INTERNAL_ECC_MASK) != 0x2)return MICRON_ON_DIE_UNSUPPORTED ; +/* +* It seems that there are devices which do not support ECC officially. +* At least the MT29F2G08ABAGA / MT29F2G08ABBGA devices supports +* enabling the ECC feature but don't reflect that to the READ_ID table. +* So we have to guarantee that we disable the ECC feature directly +* after we did the READ_ID table command. Later we can evaluate the +* ECC_ENABLE support. +*/ ret =micron_nand_on_die_ecc_setup (chip, true);if (ret)return MICRON_ON_DIE_UNSUPPORTED ;
@@ -398,13 +406,13 @@ static int micron_supports_on_die_ecc(struct nand_chip *chip)if (ret)return MICRON_ON_DIE_UNSUPPORTED ; -if (!(id[4 ] &MICRON_ID_ECC_ENABLED )) -return MICRON_ON_DIE_UNSUPPORTED ; - ret =micron_nand_on_die_ecc_setup (chip, false);if (ret)return MICRON_ON_DIE_UNSUPPORTED ; +if (!(id[4 ] &MICRON_ID_ECC_ENABLED )) +return MICRON_ON_DIE_UNSUPPORTED ; + ret =nand_readid_op (chip,0 , id,sizeof (id));if (ret)return MICRON_ON_DIE_UNSUPPORTED ;
drivers/net/ethernet/emulex/benet/be_main.c +5 -1
@@ -4697,8 +4697,12 @@ int be_update_queues(struct be_adapter *adapter)struct net_device *netdev = adapter->netdev;int status; -if (netif_running (netdev)) +if (netif_running (netdev)) { +/* device cannot transmit now, avoid dev_watchdog timeouts */ +netif_carrier_off (netdev); +be_close (netdev); + }be_cancel_worker (adapter);
drivers/pci/of.c +8 -0
@@ -22,12 +22,15 @@ void pci_set_of_node(struct pci_dev *dev)return ; dev->dev.of_node =of_pci_find_child_device (dev->bus->dev.of_node, dev->devfn); +if (dev->dev.of_node) + dev->dev.fwnode = &dev->dev.of_node->fwnode; }void pci_release_of_node (struct pci_dev *dev) {of_node_put (dev->dev.of_node); dev->dev.of_node =NULL ; + dev->dev.fwnode =NULL ; }void pci_set_bus_of_node (struct pci_bus *bus)
@@ -41,13 +44,18 @@ void pci_set_bus_of_node(struct pci_bus *bus)if (node &&of_property_read_bool (node,"external-facing" )) bus->self->untrusted = true; } + bus->dev.of_node = node; + +if (bus->dev.of_node) + bus->dev.fwnode = &bus->dev.of_node->fwnode; }void pci_release_bus_of_node (struct pci_bus *bus) {of_node_put (bus->dev.of_node); bus->dev.of_node =NULL ; + bus->dev.fwnode =NULL ; }struct device_node *__weak pcibios_get_phb_of_node (struct pci_bus *bus)
drivers/perf/arm_pmu.c +1 -1
@@ -723,8 +723,8 @@ static int cpu_pm_pmu_notify(struct notifier_block *b, unsigned long cmd,cpu_pm_pmu_setup (armpmu, cmd);break ;case CPU_PM_EXIT : -cpu_pm_pmu_setup (armpmu, cmd);case CPU_PM_ENTER_FAILED : +cpu_pm_pmu_setup (armpmu, cmd); armpmu->start (armpmu);break ;default :
drivers/rapidio/devices/rio_mport_cdev.c +2 -0
@@ -1686,6 +1686,7 @@ static int rio_mport_add_riodev(struct mport_cdev_priv *priv,if (copy_from_user (&dev_info, arg,sizeof (dev_info)))return -EFAULT ; + dev_info.name[sizeof (dev_info.name) -1 ] ='\0' ;rmcd_debug (RDEV ,"name:%s ct:0x%x did:0x%x hc:0x%x" , dev_info.name, dev_info.comptag, dev_info.destid, dev_info.hopcount);
@@ -1817,6 +1818,7 @@ static int rio_mport_del_riodev(struct mport_cdev_priv *priv, void __user *arg)if (copy_from_user (&dev_info, arg,sizeof (dev_info)))return -EFAULT ; + dev_info.name[sizeof (dev_info.name) -1 ] ='\0' ; mport = priv->md->mport;
drivers/remoteproc/remoteproc_core.c +1 -0
@@ -512,6 +512,7 @@ static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc,/* Initialise vdev subdevice */ snprintf (name,sizeof (name),"vdev%dbuffer" , rvdev->index); rvdev->dev.parent = rproc->dev.parent; + rvdev->dev.dma_pfn_offset = rproc->dev.parent->dma_pfn_offset; rvdev->dev.release = rproc_rvdev_release;dev_set_name (&rvdev->dev,"%s#%s" ,dev_name (rvdev->dev.parent), name);dev_set_drvdata (&rvdev->dev, rvdev);
drivers/s390/block/dasd_alias.c +16 -6
@@ -383,6 +383,20 @@ suborder_not_supported(struct dasd_ccw_req *cqr)char msg_format;char msg_no; +/* +* intrc values ENODEV, ENOLINK and EPERM +* will be optained from sleep_on to indicate that no +* IO operation can be started +*/ +if (cqr->intrc == -ENODEV ) +return 1 ; + +if (cqr->intrc == -ENOLINK ) +return 1 ; + +if (cqr->intrc == -EPERM ) +return 1 ; + sense =dasd_get_sense (&cqr->irb);if (!sense)return 0 ;
@@ -447,12 +461,8 @@ static int read_unit_address_configuration(struct dasd_device *device, lcu->flags &= ~NEED_UAC_UPDATE ;spin_unlock_irqrestore (&lcu->lock, flags); -do { - rc =dasd_sleep_on (cqr); -if (rc &&suborder_not_supported (cqr)) -return -EOPNOTSUPP ; - }while (rc && (cqr->retries >0 )); -if (rc) { + rc =dasd_sleep_on (cqr); +if (rc && !suborder_not_supported (cqr)) {spin_lock_irqsave (&lcu->lock, flags); lcu->flags |=NEED_UAC_UPDATE ;spin_unlock_irqrestore (&lcu->lock, flags);
drivers/s390/scsi/zfcp_erp.c +7 -0
@@ -11,6 +11,7 @@#define pr_fmt (fmt) KMSG_COMPONENT ": " fmt#include <linux/kthread.h> +#include <linux/bug.h> #include "zfcp_ext.h" #include "zfcp_reqlist.h"
@@ -217,6 +218,12 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(enum zfcp_erp_act_type need,struct zfcp_erp_action *erp_action;struct zfcp_scsi_dev *zfcp_sdev; +if (WARN_ON_ONCE (need !=ZFCP_ERP_ACTION_REOPEN_LUN && + need !=ZFCP_ERP_ACTION_REOPEN_PORT && + need !=ZFCP_ERP_ACTION_REOPEN_PORT_FORCED && + need !=ZFCP_ERP_ACTION_REOPEN_ADAPTER )) +return NULL ; +switch (need) {case ZFCP_ERP_ACTION_REOPEN_LUN : zfcp_sdev =sdev_to_zfcp (sdev);
drivers/scsi/mpt3sas/mpt3sas_base.c +7 -5
@@ -2683,6 +2683,8 @@ _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev) {u64 required_mask, coherent_mask;struct sysinfo s; +/* Set 63 bit DMA mask for all SAS3 and SAS35 controllers */ +int dma_mask = (ioc->hba_mpi_version_belonged >MPI2_VERSION ) ?63 :64 ;if (ioc->is_mcpu_endpoint) goto try_32bit;
@@ -2692,17 +2694,17 @@ _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev) goto try_32bit;if (ioc->dma_mask) - coherent_mask =DMA_BIT_MASK (64 ); + coherent_mask =DMA_BIT_MASK (dma_mask);else coherent_mask =DMA_BIT_MASK (32 ); -if (dma_set_mask (&pdev->dev,DMA_BIT_MASK (64 )) || +if (dma_set_mask (&pdev->dev,DMA_BIT_MASK (dma_mask)) ||dma_set_coherent_mask (&pdev->dev, coherent_mask)) goto try_32bit; ioc->base_add_sg_single = &_base_add_sg_single_64; ioc->sge_size =sizeof (Mpi2SGESimple64_t); - ioc->dma_mask =64 ; + ioc->dma_mask = dma_mask; goto out; try_32bit:
@@ -2724,7 +2726,7 @@ static int _base_change_consistent_dma_mask(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev) { - if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) { + if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(ioc->dma_mask))) { if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) return -ENODEV; }
@@ -4631,7 +4633,7 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc) total_sz += sz; }while (ioc->rdpq_array_enable && (++i < ioc->reply_queue_count)); -if (ioc->dma_mask ==64 ) { +if (ioc->dma_mask >32 ) {if (_base_change_consistent_dma_mask (ioc, ioc->pdev) !=0 ) {ioc_warn (ioc,"no suitable consistent DMA mask for %s\n" ,pci_name (ioc->pdev));
drivers/soc/imx/soc-imx8.c +13 -6
@@ -73,7 +73,7 @@ static int __init imx8_soc_init(void) soc_dev_attr =kzalloc (sizeof (*soc_dev_attr),GFP_KERNEL );if (!soc_dev_attr) -return -ENODEV ; +return -ENOMEM ; soc_dev_attr->family ="Freescale i.MX" ;
@@ -83,8 +83,10 @@ static int __init imx8_soc_init(void) goto free_soc; id =of_match_node (imx8_soc_match, root); -if (!id) +if (!id) { + ret = -ENODEV ; goto free_soc; + }of_node_put (root);
@@ -96,20 +98,25 @@ static int __init imx8_soc_init(void) } soc_dev_attr->revision =imx8_revision (soc_rev); -if (!soc_dev_attr->revision) +if (!soc_dev_attr->revision) { + ret = -ENOMEM ; goto free_soc; + } soc_dev =soc_device_register (soc_dev_attr); -if (IS_ERR (soc_dev)) +if (IS_ERR (soc_dev)) { + ret =PTR_ERR (soc_dev); goto free_rev; + }return 0 ; free_rev: -kfree (soc_dev_attr->revision); +if (strcmp (soc_dev_attr->revision,"unknown" )) +kfree (soc_dev_attr->revision); free_soc:kfree (soc_dev_attr);of_node_put (root); -return -ENODEV ; +return ret; }device_initcall (imx8_soc_init);
drivers/soc/qcom/rpmpd.c +1 -1
@@ -226,7 +226,7 @@ static int rpmpd_set_performance(struct generic_pm_domain *domain,struct rpmpd *pd =domain_to_rpmpd (domain);if (state >MAX_RPMPD_STATE ) - goto out; + state =MAX_RPMPD_STATE ;mutex_lock (&rpmpd_lock);
drivers/virtio/virtio_mmio.c +6 -1
@@ -463,9 +463,14 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct irq_affinity *desc) {struct virtio_mmio_device *vm_dev =to_virtio_mmio_device (vdev); -unsigned int irq =platform_get_irq (vm_dev->pdev,0 ); +int irq =platform_get_irq (vm_dev->pdev,0 );int i, err, queue_idx =0 ; +if (irq <0 ) { +dev_err (&vdev->dev,"Cannot get IRQ resource\n" ); +return irq; + } + err =request_irq (irq, vm_interrupt,IRQF_SHARED ,dev_name (&vdev->dev), vm_dev);if (err)
drivers/xen/gntdev.c +1 -1
@@ -1145,7 +1145,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma) goto out_put_map;if (!use_ptemod) { - err =vm_map_pages (vma, map->pages, map->count); + err =vm_map_pages_zero (vma, map->pages, map->count);if (err) goto out_put_map; }else {
drivers/xen/swiotlb-xen.c +3 -3
@@ -361,8 +361,8 @@ xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr,/* Convert the size to actually allocated. */ size =1UL << (order +XEN_PAGE_SHIFT ); -if (((dev_addr + size -1 <= dma_mask)) || -range_straddles_page_boundary (phys, size)) +if (!WARN_ON ((dev_addr + size -1 > dma_mask) || +range_straddles_page_boundary (phys, size)))xen_destroy_contiguous_region (phys, order);xen_free_coherent_pages (hwdev, size, vaddr, (dma_addr_t )phys, attrs);
@@ -402,7 +402,7 @@ static dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, map =swiotlb_tbl_map_single (dev, start_dma_addr, phys, size, dir, attrs); -if (map ==DMA_MAPPING_ERROR ) +if (map == (phys_addr_t )DMA_MAPPING_ERROR )return DMA_MAPPING_ERROR ; dev_addr =xen_phys_to_bus (map);
fs/adfs/super.c +4 -1
@@ -360,6 +360,7 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)struct buffer_head *bh;struct object_info root_obj;unsigned char *b_data; +unsigned int blocksize;struct adfs_sb_info *asb;struct inode *root;int ret = -EINVAL ;
@@ -411,8 +412,10 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent) goto error_free_bh; } + blocksize =1 << dr->log2secsize;brelse (bh); -if (sb_set_blocksize (sb,1 << dr->log2secsize)) { + +if (sb_set_blocksize (sb, blocksize)) { bh =sb_bread (sb,ADFS_DISCRECORD / sb->s_blocksize);if (!bh) { adfs_error(sb, "couldn't read superblock on "
fs/block_dev.c +58 -25
101 lines not on this page · raw message
fs/btrfs/ioctl.c +21 -0
@@ -3999,6 +3999,27 @@ static int btrfs_remap_file_range_prep(struct file *file_in, loff_t pos_in,if (!same_inode)inode_dio_wait (inode_out); +/* +* Workaround to make sure NOCOW buffered write reach disk as NOCOW. +* +* Btrfs' back references do not have a block level granularity, they +* work at the whole extent level. +* NOCOW buffered write without data space reserved may not be able +* to fall back to CoW due to lack of data space, thus could cause +* data loss. +* +* Here we take a shortcut by flushing the whole inode, so that all +* nocow write should reach disk as nocow before we increase the +* reference of the extent. We could do better by only flushing NOCOW +* data, but that needs extra accounting. +* +* Also we don't need to check ASYNC_EXTENT, as async extent will be +* CoWed anyway, not affecting nocow part. +*/ + ret =filemap_flush (inode_in->i_mapping); +if (ret <0 ) +return ret; + ret =btrfs_wait_ordered_range (inode_in,ALIGN_DOWN (pos_in, bs), wb_len);if (ret <0 )
fs/btrfs/qgroup.c +22 -2
@@ -2614,6 +2614,7 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans, u64 srcid,int ret =0 ;int i;u64 *i_qgroups; +bool committing = false;struct btrfs_fs_info *fs_info = trans->fs_info;struct btrfs_root *quota_root;struct btrfs_qgroup *srcgroup;
@@ -2621,7 +2622,25 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans, u64 srcid,u32 level_size =0 ;u64 nums; -mutex_lock (&fs_info->qgroup_ioctl_lock); +/* +* There are only two callers of this function. +* +* One in create_subvol() in the ioctl context, which needs to hold +* the qgroup_ioctl_lock. +* +* The other one in create_pending_snapshot() where no other qgroup +* code can modify the fs as they all need to either start a new trans +* or hold a trans handler, thus we don't need to hold +* qgroup_ioctl_lock. +* This would avoid long and complex lock chain and make lockdep happy. +*/ +spin_lock (&fs_info->trans_lock); +if (trans->transaction->state ==TRANS_STATE_COMMIT_DOING ) + committing = true; +spin_unlock (&fs_info->trans_lock); + +if (!committing) +mutex_lock (&fs_info->qgroup_ioctl_lock);if (!test_bit (BTRFS_FS_QUOTA_ENABLED , &fs_info->flags)) goto out;
@@ -2785,7 +2804,8 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans, u64 srcid, unlock:spin_unlock (&fs_info->qgroup_lock); out: -mutex_unlock (&fs_info->qgroup_ioctl_lock); +if (!committing) +mutex_unlock (&fs_info->qgroup_ioctl_lock);return ret; }
fs/btrfs/send.c +15 -62
83 lines not on this page · raw message
fs/btrfs/transaction.c +10 -0
@@ -2019,6 +2019,16 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans) } }else {spin_unlock (&fs_info->trans_lock); +/* +* The previous transaction was aborted and was already removed +* from the list of transactions at fs_info->trans_list. So we +* abort to prevent writing a new superblock that reflects a +* corrupt state (pointing to trees with unwritten nodes/leafs). +*/ +if (test_bit (BTRFS_FS_STATE_TRANS_ABORTED , &fs_info->fs_state)) { + ret = -EROFS ; + goto cleanup_transaction; + } }extwriter_counter_dec (cur_trans, trans->type);
fs/btrfs/tree-checker.c +11 -0
@@ -132,6 +132,7 @@ static int check_extent_data_item(struct extent_buffer *leaf,struct btrfs_file_extent_item *fi;u32 sectorsize = fs_info->sectorsize;u32 item_size =btrfs_item_size_nr (leaf, slot); +u64 extent_end;if (!IS_ALIGNED (key->offset, sectorsize)) { file_extent_err(leaf, slot,
@@ -207,6 +208,16 @@ static int check_extent_data_item(struct extent_buffer *leaf, CHECK_FE_ALIGNED(leaf, slot, fi, num_bytes, sectorsize))return -EUCLEAN ; +/* Catch extent end overflow */ +if (check_add_overflow (btrfs_file_extent_num_bytes (leaf, fi), + key->offset, &extent_end)) { +file_extent_err (leaf, slot, +"extent end overflow, have file offset %llu extent num bytes %llu" , + key->offset, +btrfs_file_extent_num_bytes (leaf, fi)); +return -EUCLEAN ; + } +/* * Check that no two consecutive file extent items, in the same leaf, * present ranges that overlap each other.
fs/btrfs/volumes.c +1 -2
@@ -5328,8 +5328,7 @@ static inline int btrfs_chunk_max_errors(struct map_lookup *map)if (map->type & (BTRFS_BLOCK_GROUP_RAID1 |BTRFS_BLOCK_GROUP_RAID10 | -BTRFS_BLOCK_GROUP_RAID5 | -BTRFS_BLOCK_GROUP_DUP )) { +BTRFS_BLOCK_GROUP_RAID5 )) { max_errors =1 ; }else if (map->type &BTRFS_BLOCK_GROUP_RAID6 ) { max_errors =2 ;
fs/ceph/dir.c +17 -9
@@ -1512,18 +1512,26 @@ static int __dir_lease_try_check(const struct dentry *dentry)static int dir_lease_is_valid (struct inode *dir,struct dentry *dentry) {struct ceph_inode_info *ci =ceph_inode (dir); -struct ceph_dentry_info *di =ceph_dentry (dentry); -int valid =0 ; +int valid; +int shared_gen;spin_lock (&ci->i_ceph_lock); -if (atomic_read (&ci->i_shared_gen) == di->lease_shared_gen) - valid =__ceph_caps_issued_mask (ci,CEPH_CAP_FILE_SHARED ,1 ); + valid =__ceph_caps_issued_mask (ci,CEPH_CAP_FILE_SHARED ,1 ); + shared_gen =atomic_read (&ci->i_shared_gen);spin_unlock (&ci->i_ceph_lock); -if (valid) -__ceph_dentry_dir_lease_touch (di); -dout ("dir_lease_is_valid dir %p v%u dentry %p v%u = %d\n" , - dir, (unsigned )atomic_read (&ci->i_shared_gen), - dentry, (unsigned )di->lease_shared_gen, valid); +if (valid) { +struct ceph_dentry_info *di; +spin_lock (&dentry->d_lock); + di =ceph_dentry (dentry); +if (dir ==d_inode (dentry->d_parent) && + di && di->lease_shared_gen == shared_gen) +__ceph_dentry_dir_lease_touch (di); +else + valid =0 ; +spin_unlock (&dentry->d_lock); + } +dout ("dir_lease_is_valid dir %p v%u dentry %p = %d\n" , + dir, (unsigned )atomic_read (&ci->i_shared_gen), dentry, valid);return valid; }
fs/ceph/super.h +6 -1
@@ -544,7 +544,12 @@ static inline void __ceph_dir_set_complete(struct ceph_inode_info *ci,long long release_count, long long ordered_count) { -smp_mb__before_atomic (); +/* +* Makes sure operations that setup readdir cache (update page +* cache and i_size) are strongly ordered w.r.t. the following +* atomic64_set() operations. +*/ +smp_mb ();atomic64_set (&ci->i_complete_seq[0 ], release_count);atomic64_set (&ci->i_complete_seq[1 ], ordered_count); }
fs/ceph/xattr.c +7 -7
@@ -79,7 +79,7 @@ static size_t ceph_vxattrcb_layout(struct ceph_inode_info *ci, char *val,const char *ns_field =" pool_namespace=" ;char buf[128 ];size_t len, total_len =0 ; -int ret; +ssize_t ret; pool_ns =ceph_try_get_string (ci->i_layout.pool_ns);
@@ -103,11 +103,8 @@ static size_t ceph_vxattrcb_layout(struct ceph_inode_info *ci, char *val,if (pool_ns) total_len +=strlen (ns_field) + pool_ns->len; -if (!size) { - ret = total_len; - }else if (total_len > size) { - ret = -ERANGE ; - }else { + ret = total_len; +if (size >= total_len) {memcpy (val, buf, len); ret = len;if (pool_name) {
@@ -835,8 +832,11 @@ ssize_t __ceph_getxattr(struct inode *inode, const char *name, void *value,if (err)return err; err = -ENODATA ; -if (!(vxattr->exists_cb && !vxattr->exists_cb (ci))) +if (!(vxattr->exists_cb && !vxattr->exists_cb (ci))) { err = vxattr->getxattr_cb (ci, value, size); +if (size && size < err) + err = -ERANGE ; + }return err; }
fs/cifs/connect.c +16 -8
@@ -706,10 +706,10 @@ static bool server_unresponsive(struct TCP_Server_Info *server) {/* -* We need to wait 2 echo intervals to make sure we handle such +* We need to wait 3 echo intervals to make sure we handle such * situations right: * 1s client sends a normal SMB request -* 2s client gets a response +* 3s client gets a response * 30s echo workqueue job pops, and decides we got a response recently * and don't need to send another * ...
@@ -718,9 +718,9 @@ server_unresponsive(struct TCP_Server_Info *server)*/ if ((server->tcpStatus == CifsGood || server->tcpStatus == CifsNeedNegotiate) && -time_after (jiffies, server->lstrp +2 * server->echo_interval)) { +time_after (jiffies, server->lstrp +3 * server->echo_interval)) {cifs_dbg (VFS ,"Server %s has not responded in %lu seconds. Reconnecting...\n" , - server->hostname, (2 * server->echo_interval) /HZ ); + server->hostname, (3 * server->echo_interval) /HZ );cifs_reconnect (server);wake_up (&server->response_q);return true;
@@ -4463,11 +4463,13 @@ cifs_are_all_path_components_accessible(struct TCP_Server_Info *server,unsigned int xid, struct cifs_tcon *tcon, struct cifs_sb_info *cifs_sb, - char *full_path) + char *full_path, + int added_treename) { int rc;char *s;char sep, tmp; +int skip = added_treename ?1 :0 ; sep =CIFS_DIR_SEP (cifs_sb); s = full_path;
@@ -4482,7 +4484,14 @@ cifs_are_all_path_components_accessible(struct TCP_Server_Info *server,/* next separator */ while (*s && *s != sep) s++; - +/* +* if the treename is added, we then have to skip the first +* part within the separators +*/ +if (skip) { + skip =0 ; +continue ; + }/* * temporarily null-terminate the path at the end of * the current component
@@ -4530,8 +4539,7 @@ static int is_path_remote(struct cifs_sb_info *cifs_sb, struct smb_vol *vol,if (rc != -EREMOTE ) { rc =cifs_are_all_path_components_accessible (server, xid, tcon, - cifs_sb, - full_path); + cifs_sb, full_path, tcon->Flags &SMB_SHARE_IS_IN_DFS );if (rc !=0 ) {cifs_dbg (VFS ,"cannot query dirs between root and final path, " "enabling CIFS_MOUNT_USE_PREFIX_PATH\n" );
fs/coda/psdev.c +4 -1
@@ -182,8 +182,11 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf,if (req->uc_opcode ==CODA_OPEN_BY_FD ) {struct coda_open_by_fd_out *outp = (struct coda_open_by_fd_out *)req->uc_data; -if (!outp->oh.result) +if (!outp->oh.result) { outp->fh =fget (outp->fd); +if (!outp->fh) +return -EBADF ; + } }wake_up (&req->uc_sleep);
fs/dax.c +1 -1
@@ -267,7 +267,7 @@ static void wait_entry_unlocked(struct xa_state *xas, void *entry)static void put_unlocked_entry (struct xa_state *xas,void *entry) {/* If we were the only waiter woken, wake the next one */ -if (entry &&dax_is_conflict (entry)) +if (entry && !dax_is_conflict (entry))dax_wake_entry (xas, entry, false); }
fs/io_uring.c +2 -1
@@ -1692,6 +1692,7 @@ static void io_sq_wq_submit_work(struct work_struct *work) do { struct sqe_submit *s = &req->submit; const struct io_uring_sqe *sqe = s->sqe; + unsigned int flags = req->flags; /* Ensure we clear previously set non-block flag */ req->rw.ki_flags &= ~IOCB_NOWAIT;
@@ -1737,7 +1738,7 @@ static void io_sq_wq_submit_work(struct work_struct *work)kfree (sqe);/* req from defer and link list needn't decrease async cnt */ -if (req->flags & (REQ_F_IO_DRAINED |REQ_F_LINK_DONE )) +if (flags & (REQ_F_IO_DRAINED |REQ_F_LINK_DONE )) goto out;if (!async_list)
include/linux/acpi.h +4 -1
@@ -317,7 +317,10 @@ void acpi_set_irq_model(enum acpi_irq_model_id model,#ifdef CONFIG_X86_IO_APIC extern int acpi_get_override_irq (u32 gsi,int *trigger,int *polarity);#else -#define acpi_get_override_irq (gsi, trigger, polarity) (-1) +static inline int acpi_get_override_irq (u32 gsi,int *trigger,int *polarity) +{ +return -1 ; +}#endif /* * This function undoes the effect of one call to acpi_register_gsi().
include/linux/coda.h +1 -2
@@ -58,8 +58,7 @@ Mellon the rights to redistribute these changes without encumbrance.#ifndef _CODA_HEADER_#define _CODA_HEADER_ -#if defined(__linux__)typedef unsigned long long u_quad_t ; -#endif +#include <uapi/linux/coda.h> #endif
include/linux/coda_psdev.h +11 -0
@@ -19,6 +19,17 @@ struct venus_comm {struct mutex vc_mutex; }; +/* messages between coda filesystem in kernel and Venus */ +struct upc_req { +struct list_head uc_chain; +caddr_t uc_data; +u_short uc_flags; +u_short uc_inSize;/* Size is at most 5000 bytes */ +u_short uc_outSize; +u_short uc_opcode;/* copied from data to save lookup */ +int uc_unique; +wait_queue_head_t uc_sleep;/* process' wait queue */ +};static inline struct venus_comm *coda_vcp (struct super_block *sb) {
include/linux/compiler-gcc.h +2 -0
@@ -170,3 +170,5 @@#else #define __diag_GCC_8 (s)#endif + +#define __no_fgcse __attribute__((optimize("-fno-gcse")))
include/linux/compiler_types.h +4 -0
@@ -187,6 +187,10 @@ struct ftrace_likely_data { #define asm_volatile_goto(x...) asm goto(x)#endif +#ifndef __no_fgcse +# define __no_fgcse
Lines of this file are not shown. View the raw message.
include/linux/gpio/consumer.h +32 -32
64 lines not on this page · raw message
mm/memory_hotplug.c +43 -21
64 lines not on this page · raw message
tools/testing/selftests/cgroup/cgroup_util.c +1 -2
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.
Thanks , a bunch Greg! :)
Quoted 508 lines · Greg KH
I'm announcing the release of the 5.2.7 kernel.
All users of the 5.2 kernel series must upgrade.
The updated 5.2.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.gitlinux-5.2.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=summarythanks,
greg k-h
------------
Documentation/admin-guide/hw-vuln/spectre.rst | 88 ++++++++++++++++- Documentation/admin-guide/kernel-parameters.txt | 8 - Makefile | 5 - arch/arm/boot/dts/rk3288-veyron-mickey.dts | 4 arch/arm/boot/dts/rk3288-veyron-minnie.dts | 4 arch/arm/boot/dts/rk3288.dtsi | 1 arch/arm/mach-exynos/Kconfig | 6 + arch/arm/mach-exynos/Makefile | 2 arch/arm/mach-exynos/suspend.c | 6 - arch/arm/mach-rpc/dma.c | 5 - arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi | 2 arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 2 arch/arm64/boot/dts/qcom/qcs404.dtsi | 1 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 5 - arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 - arch/arm64/include/asm/cpufeature.h | 7 - arch/arm64/kernel/cpufeature.c | 8 + arch/arm64/kernel/hw_breakpoint.c | 7 - arch/mips/lantiq/irq.c | 5 - arch/nds32/include/asm/syscall.h | 27 +++-- arch/parisc/Makefile | 3 arch/parisc/boot/compressed/Makefile | 4 arch/parisc/boot/compressed/vmlinux.lds.S | 4 arch/powerpc/mm/kasan/kasan_init_32.c | 7 + arch/x86/boot/compressed/misc.c | 1 arch/x86/boot/compressed/misc.h | 1 arch/x86/entry/calling.h | 17 +++ arch/x86/entry/entry_64.S | 22 +++- arch/x86/include/asm/apic.h | 2 arch/x86/include/asm/cpufeature.h | 4 arch/x86/include/asm/cpufeatures.h | 20 ++-- arch/x86/include/asm/kvm_host.h | 34 +++--- arch/x86/include/asm/paravirt.h | 1 arch/x86/include/asm/traps.h | 2 arch/x86/kernel/apic/apic.c | 2 arch/x86/kernel/cpu/bugs.c | 105 +++++++++++++++++++-- arch/x86/kernel/cpu/common.c | 96 ++++++++++--------- arch/x86/kernel/cpu/cpuid-deps.c | 3 arch/x86/kernel/cpu/scattered.c | 4 arch/x86/kernel/kvm.c | 1 arch/x86/kvm/cpuid.h | 2 arch/x86/kvm/mmu.c | 6 - arch/x86/kvm/vmx/nested.c | 5 - arch/x86/math-emu/fpu_emu.h | 2 arch/x86/math-emu/reg_constant.c | 2 arch/x86/xen/enlighten_pv.c | 2 arch/x86/xen/xen-asm_64.S | 1 drivers/acpi/blacklist.c | 4 drivers/block/loop.c | 16 +-- drivers/block/nbd.c | 2 drivers/char/tpm/tpm-chip.c | 23 +++- drivers/clk/mediatek/clk-mt8183.c | 46 ++++++--- drivers/clk/meson/clk-mpll.c | 9 + drivers/clk/meson/clk-mpll.h | 1 drivers/clk/sprd/sc9860-clk.c | 5 - drivers/clk/tegra/clk-tegra210.c | 8 - drivers/crypto/ccp/psp-dev.c | 19 ++- drivers/dax/kmem.c | 5 - drivers/dma/sh/rcar-dmac.c | 2 drivers/dma/tegra20-apb-dma.c | 12 ++ drivers/firmware/psci/psci_checker.c | 10 +- drivers/gpio/gpiolib.c | 23 +++- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 drivers/gpu/drm/i915/gvt/kvmgt.c | 12 ++ drivers/gpu/drm/i915/i915_perf.c | 10 +- drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 drivers/gpu/drm/nouveau/nouveau_connector.c | 2 drivers/gpu/drm/nouveau/nouveau_dmem.c | 3 drivers/i2c/busses/i2c-at91-core.c | 2 drivers/i2c/busses/i2c-at91-master.c | 9 + drivers/i2c/busses/i2c-bcm-iproc.c | 10 +- drivers/infiniband/core/device.c | 54 ++++++++-- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 7 + drivers/infiniband/hw/bnxt_re/qplib_res.c | 13 +- drivers/infiniband/hw/bnxt_re/qplib_res.h | 2 drivers/infiniband/hw/bnxt_re/qplib_sp.c | 14 +- drivers/infiniband/hw/bnxt_re/qplib_sp.h | 7 + drivers/infiniband/hw/hfi1/chip.c | 11 +- drivers/infiniband/hw/hfi1/tid_rdma.c | 43 -------- drivers/infiniband/hw/hfi1/verbs.c | 2 drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 drivers/infiniband/hw/mlx5/mr.c | 23 ++-- drivers/infiniband/hw/mlx5/qp.c | 13 +- drivers/misc/eeprom/at24.c | 2 drivers/mmc/core/queue.c | 5 + drivers/mmc/host/dw_mmc.c | 3 drivers/mmc/host/meson-mx-sdio.c | 2 drivers/mmc/host/sdhci-sprd.c | 1 drivers/mtd/nand/raw/nand_micron.c | 14 ++ drivers/net/ethernet/emulex/benet/be_main.c | 6 + drivers/pci/of.c | 8 + drivers/perf/arm_pmu.c | 2 drivers/rapidio/devices/rio_mport_cdev.c | 2 drivers/remoteproc/remoteproc_core.c | 1 drivers/s390/block/dasd_alias.c | 22 +++- drivers/s390/scsi/zfcp_erp.c | 7 + drivers/scsi/mpt3sas/mpt3sas_base.c | 12 +- drivers/soc/imx/soc-imx8.c | 19 ++- drivers/soc/qcom/rpmpd.c | 2 drivers/virtio/virtio_mmio.c | 7 + drivers/xen/gntdev.c | 2 drivers/xen/swiotlb-xen.c | 6 - fs/adfs/super.c | 5 - fs/block_dev.c | 83 +++++++++++----- fs/btrfs/ioctl.c | 21 ++++ fs/btrfs/qgroup.c | 24 ++++ fs/btrfs/send.c | 77 +++------------ fs/btrfs/transaction.c | 10 ++ fs/btrfs/tree-checker.c | 11 ++ fs/btrfs/volumes.c | 3 fs/ceph/dir.c | 26 +++-- fs/ceph/super.h | 7 + fs/ceph/xattr.c | 14 +- fs/cifs/connect.c | 24 +++- fs/coda/psdev.c | 5 - fs/dax.c | 2 fs/io_uring.c | 3 include/linux/acpi.h | 5 - include/linux/coda.h | 3 include/linux/coda_psdev.h | 11 ++ include/linux/compiler-gcc.h | 2 include/linux/compiler_types.h | 4 include/linux/fs.h | 6 + include/linux/gpio/consumer.h | 64 ++++++------ include/linux/memory_hotplug.h | 8 + include/rdma/ib_verbs.h | 3 include/uapi/linux/coda_psdev.h | 13 -- ipc/mqueue.c | 19 ++- kernel/bpf/btf.c | 19 ++- kernel/bpf/core.c | 2 kernel/dma/swiotlb.c | 4 kernel/module.c | 6 - kernel/stacktrace.c | 5 + kernel/trace/ftrace.c | 28 +++-- kernel/trace/trace_functions_graph.c | 17 +-- lib/Makefile | 3 lib/ioremap.c | 9 + lib/test_overflow.c | 11 +- lib/test_string.c | 6 - mm/cma.c | 13 ++ mm/compaction.c | 11 +- mm/memcontrol.c | 22 +++- mm/memory_hotplug.c | 64 ++++++++---- mm/migrate.c | 21 ++-- mm/slab_common.c | 3 mm/vmscan.c | 9 + mm/z3fold.c | 15 ++- scripts/Makefile.modpost | 6 - scripts/kconfig/confdata.c | 4 security/selinux/ss/policydb.c | 6 + sound/hda/hdac_i915.c | 10 +- tools/perf/builtin-version.c | 1 tools/testing/selftests/bpf/Makefile | 13 +- tools/testing/selftests/cgroup/cgroup_util.c | 3 155 files changed, 1239 insertions(+), 631 deletions(-)Andrea Parri (1):
ceph: fix improper use ofsmp_mb__before_atomic()Andreas Koop (1):
mmc:mmc_spi: Enable stable writesAndrii Nakryiko (1):
bpf: fix BTF verifier size resolution logicAndy Gross (1):
arm64: qcom: qcs404: Add reset-cells to GCC nodeAnshuman Khandual (1):
mm/ioremap: check virtual address alignment while creating huge mappingsAnson Huang (2):
soc: imx: soc-imx8: Correct return value of error handle
soc: imx8: Fix potential kernel dump in error pathArnd Bergmann (8):
swiotlb: fixphys_addr_toverflow warning
ARM: exynos: Only build MCPM support if used
ACPI: blacklist: fix clang warning for unused DMI table
x86: kvm: avoid constant-conversion warning
ACPI: fix false-positive -Wuninitialized warningmm/slab_common.c: work around clang bug #42570
x86: math-emu: Hide clang warnings for 16-bit overflow
ubsan: buildubsan.cmore conservativelyBaolin Wang (1):
mmc: host: sdhci-sprd: Fix the missingpm_runtime_put_noidle()Bartosz Golaszewski (1):
gpio: don'tWARN()on NULL descs if gpiolib is disabledBenjamin Block (1):
scsi: zfcp: fix GCC compiler warning emitted with -Wmaybe-uninitializedBenjamin Poirier (1):
be2net: Signal that the device cannot transmit during reconfigurationBorislav Petkov (1):
x86/cpufeatures: Carve out CQM features retrievalChangbin Du (1):
fgraph: Remove redundantftrace_graph_notrace_addr()testCheng Jian (1):
ftrace: Enable trampoline when rec count returns back to oneChris Down (1):
cgroup: kselftest: relaxfs_specchecksChris Packham (1):
gpiolib: Preserve desc->flags when setting stateChristophe Leroy (1):
powerpc/kasan: fix early boot failure on PPC32Chunyan Zhang (1):
clk: sprd: Add check for return value ofsprd_clk_regmap_init()Clement Leger (1):
remoteproc: copy parentdma_pfn_offsetfor vdevDan Carpenter (1):
drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some stringsDavid Rientjes (1):
crypto: ccp - FixSEV_VERSION_GREATER_OR_EQUALDavid Sterba (1):
btrfs: fix minimum number of chunk errors for DUPDmitry Osipenko (1):
dmaengine: tegra-apb: Error out ifDMA_PREP_INTERRUPTflag is unsetDmitry V. Levin (1):
nds32: fixasm/syscall.hDoug Berger (1):
mm/cma.c: fail if fixed declaration can't be honoredDouglas Anderson (4):
ARM: dts: rockchip: Make rk3288-veyron-minnie run at hs200
ARM: dts: rockchip: Make rk3288-veyron-mickey's emmc work again
ARM: dts: rockchip: Mark that the rk3288 timer might stop in suspend
mmc:dw_mmc: Fix occasional hang after tuning on eMMCFenghua Yu (1):
x86/cpufeatures: Combine word 11 and 12 into a new scattered features wordFilipe Manana (2):
Btrfs: fix incremental send failure after deduplication
Btrfs: fix race leading to fs corruption after transaction abortGeert Uytterhoeven (1):
dmaengine: rcar-dmac: Reject zero-length slave DMA requestsGreg Kroah-Hartman (1):
Linux 5.2.7Gustavo A. R. Silva (1):
IB/hfi1: Fix Spectre v1 vulnerabilityHeinrich Schuchardt (1):
arm64: dts: marvell: mcbin: enlarge PCI memory windowHelen Koike (1):
arm64: dts: rockchip: fix isp iommu clocks and power domainHelge Deller (2):
parisc: Strip debug info from kernel before creating compressed vmlinuz
parisc: Fix build of compressed kernel even with debug enabledHenry Burns (1):
mm/z3fold.c: reinitialize zhdr structs after migrationIhor Matushchak (1):
virtio-mmio: add error check forplatform_get_irqIlya Leoshkevich (1):
selftests/bpf: do not ignore clang failuresJC Kuo (1):
clk: tegra210: fix PLLU andPLLU_OUT1Jackie Liu (1):
io_uring: fix KASAN use after free inio_sq_wq_submit_workJames Bottomley (1):
parisc: Add archcleanMakefiletargetJan Kara (3):
dax: Fix missed wakeup input_unlocked_entry()
mm: migrate: fix reference check race between__find_get_block()and migration
loop: Fix mount(2) failure due to race withLOOP_SET_FDJason Gunthorpe (1):
RDMA/devices: Do not deadlock during client removalJean Delvare (1):
eeprom: at24: make spd world-readable againJean-Philippe Brucker (2):
PCI: OF: Initializedev->fwnodeappropriatelyfirmware/psci:psci_checker: Park kthreads before stopping themJeff Layton (1):
ceph: return-ERANGEif virtual xattr value didn't fit in bufferJerome Brunet (1):
clk: meson: mpll: properly handle spread spectrumJoe Perches (1):
mmc: meson-mx-sdio: Fix misuse of GENMASK macroJohn Fleck (1):
IB/hfi1: Check for error on call toalloc_rsm_map_tableJosh Poimboeuf (7):
x86/kvm: Don't callkvm_spurious_fault()from .fixup x86/paravirt: Fix callee-saved function ELF sizes
bpf: Disable GCC -fgcse optimization for___bpf_prog_run()x86/speculation: Prepare entry code for Spectre v1 swapgs mitigations x86/speculation: Enable Spectre v1 swapgs mitigations x86/entry/64: Use JMP instead of JMPQ
Documentation: Add swapgs description to the Spectre v1 documentationJuergen Gross (1):
xen/swiotlb: fix condition for callingxen_destroy_contiguous_region()Kaike Wan (2):
IB/hfi1: Drop all TID RDMA READ RESP packets afterr_next_psnIB/hfi1: Field not zero-ed when allocating TID flow memoryKees Cook (2):
lib/test_overflow.c: avoid tainting the kernel and fix wrap sizeipc/mqueue.c: only perform resource calculation if user validLionel Landwerlin (1):
drm/i915/perf: fix ICL perf register offsetsLiran Alon (1):
KVM: nVMX: Ignore segment base for VMX memory operand when segment not FS or GSLyude Paul (1):
drm/nouveau: Only release VCPI slots on mode changesM. Vefa Bicakci (1):
kconfig: Clear "written" flag to avoid data lossMarco Felsch (1):
mtd: rawnand: micron: handle on-die "ECC-off" devices correctlyMasahiro Yamada (2):
kbuild: initializeCLANG_FLAGScorrectly in the topMakefile
kbuild: modpost: include .*.cmd files only when targets existMel Gorman (1):
mm: compaction: avoid 100% CPU usage during compaction when a task is killedMichael Wu (1):
gpiolib: fix incorrect IRQ requesting of an active-low lineeventMichał Mirosław (2):
i2c: at91: disable TXRDY interrupt after sending data
i2c: at91: fixclk_offsetfor sama5d2Mikko Rapeli (1):
uapilinux/coda_psdev.h: moveupc_reqdefinition from uapi to kernel side headersMilan Broz (1):
tpm: Fix null pointer dereference on chip register error pathMunehisa Kamata (1):
nbd: replacekill_bdev()with__invalidate_device()againNicholas Kazlauskas (1):
drm/amd/display: Expose audio inst from DC to DMNiklas Cassel (1):
arm64: dts: qcom: qcs404-evb: fix l3 min voltageOndrej Mosnacek (1):
selinux: fix memory leak inpolicydb_init()Pavel Tatashin (2):
device-dax: fix memory and resource leak if hotplug fails mm/hotplug: makeremove_memory()interface usablePeter Rosin (1):
lib/test_string.c: avoid masking memset16/32/64 failuresPeter Zijlstra (1):
stacktrace: ForceUSER_DSforstack_trace_save_user()Petr Cvek (1):
MIPS: lantiq: Fix bitfield maskingPrarit Bhargava (1):
kernel/module.c: Only return-EEXISTfor modules that have finished loadingQian Cai (1):
x86/apic: Silence -Wtype-limits compiler warningsQu Wenruo (3):
btrfs: tree-checker: Check if the file extent end overflows
btrfs: Flush before reflinking any extent to prevent NOCOW write falling back to COW without data reservation
btrfs: qgroup: Don't holdqgroup_ioctl_lockinbtrfs_qgroup_inherit()Ralph Campbell (2):
drm/nouveau/dmem: missingmutex_lockin error pathmm/migrate.c: initializepud_entryinmigrate_vma()Ravi Bangoria (1):
perf version: Fix segfault due to missingOPT_END()Rayagonda Kokatanur (1):
i2c: iproc: Fix i2c master read more than 63 bytesRonnie Sahlberg (2):
cifs: Fix a race condition withcifs_echo_request
cifs: fix crash incifs_dfs_do_automountRussell King (2):
ARM: riscpc: fix DMA
fs/adfs: super: fix use-after-free bugSam Protsenko (1):
coda: fix build using bare-metal toolchainSamuel Thibault (1):
ALSA: hda: Fix 1-minute detection delay when i915 module is not availableSelvin Xavier (1):
RDMA/bnxt_re: Honorvlan_idin GID entry comparisonSibi Sankar (1):
soc: qcom: rpmpd: fixup rpmpd set performance stateSouptick Joarder (1):
xen/gntdev.c: Replacevm_map_pages()withvm_map_pages_zero()Stefan Haberland (1):
s390/dasd: fix endless loop after read unit address configurationSuganath Prabu (1):
scsi: mpt3sas: Use 63-bit DMA addressing on SAS35 HBAThomas Gleixner (1):
x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGSVicente Bergas (1):
arm64: dts: rockchip: Fix USB3 Type-C on rk3399-sapphireVitaly Wool (1):
mm/z3fold: don't try to use buddy slots after freeWeiyi Lu (1):
clk: mediatek: mt8183: Register 13MHz clock earlier for clocksourceWill Deacon (3):
drivers/perf:arm_pmu: Fix failure path in PM notifier
arm64: compat: Allow single-byte watchpoints on all addresses
arm64: cpufeature: Fix feature comparison for CTR_EL0.{CWG,ERG}Xiaolin Zhang (1):
drm/i915/gvt: fix incorrect cache entry for guest page mappingYafang Shao (1):
mm/memcontrol.c: keep local VM counters in sync with the hierarchical onesYan, Zheng (1):
ceph: fixdir_lease_is_valid()Yang Shi (1):
mm: vmscan: check if mem cgroup is disabled or not before calling memcg slab shrinkerYishai Hadas (5):
IB/mlx5: Fixunreg_umrto ignore the mkey state
IB/mlx5: Use direct mkey destroy command upon UMR unreg failure IB/mlx5: Move MRs to a kernel PD when freeing them to the MR cache IB/mlx5: Fixclean_mr()to work in the expected order IB/mlx5: Fix RSS Toeplitz setup to be aligned with the HW specificationYongxin Liu (1):
drm/nouveau: fix memory leak innouveau_conn_reset()Zhenzhong Duan (2):
xen/pv: Fix a boot up hang revealed by int3 self test
x86, boot: Remove multiple copy of static functionsanitize_boot_params()Zhouyang Jia (1):
coda: add error handling for fget