Linux 5.4.19
Greg KH
maintainerI'm announcing the release of the 5.4.19 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.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
------------
MAINTAINERS | 6 Makefile | 2 arch/Kconfig | 3 arch/arm/include/asm/kvm_emulate.h | 22 arch/arm/include/asm/kvm_mmio.h | 2 arch/arm/mach-tegra/sleep-tegra30.S | 11 arch/arm/mm/dma-mapping.c | 2 arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 1 arch/arm64/crypto/ghash-ce-glue.c | 2 arch/arm64/include/asm/daifflags.h | 11 arch/arm64/include/asm/kvm_emulate.h | 37 arch/arm64/include/asm/kvm_mmio.h | 6 arch/arm64/include/asm/ptrace.h | 1 arch/arm64/include/uapi/asm/ptrace.h | 1 arch/arm64/kernel/acpi.c | 2 arch/arm64/kvm/inject_fault.c | 70 + arch/mips/Makefile.postlink | 2 arch/mips/boot/Makefile | 2 arch/mips/kernel/syscalls/Makefile | 2 arch/powerpc/Kconfig | 4 arch/powerpc/boot/4xx.c | 2 arch/powerpc/include/asm/book3s/32/kup.h | 22 arch/powerpc/include/asm/book3s/32/pgalloc.h | 8 arch/powerpc/include/asm/book3s/64/kup-radix.h | 14 arch/powerpc/include/asm/book3s/64/pgalloc.h | 2 arch/powerpc/include/asm/futex.h | 10 arch/powerpc/include/asm/kup.h | 36 arch/powerpc/include/asm/nohash/32/kup-8xx.h | 7 arch/powerpc/include/asm/nohash/pgalloc.h | 8 arch/powerpc/include/asm/tlb.h | 11 arch/powerpc/include/asm/uaccess.h | 4 arch/powerpc/kernel/entry_32.S | 3 arch/powerpc/kvm/book3s_hv.c | 4 arch/powerpc/kvm/book3s_pr.c | 4 arch/powerpc/kvm/book3s_xive_native.c | 2 arch/powerpc/mm/book3s64/pgtable.c | 7 arch/powerpc/mm/fault.c | 2 arch/powerpc/mm/ptdump/ptdump.c | 4 arch/powerpc/platforms/pseries/hotplug-memory.c | 4 arch/powerpc/xmon/xmon.c | 9 arch/riscv/net/bpf_jit_comp.c | 13 arch/s390/include/asm/page.h | 2 arch/s390/kvm/kvm-s390.c | 6 arch/s390/mm/hugetlbpage.c | 100 ++ arch/sparc/Kconfig | 1 arch/sparc/include/asm/tlb_64.h | 9 arch/sparc/include/uapi/asm/ipcbuf.h | 22 arch/x86/include/asm/apic.h | 10 arch/x86/include/asm/kvm_host.h | 13 arch/x86/include/asm/x86_init.h | 2 arch/x86/kernel/apic/apic.c | 23 arch/x86/kernel/apic/msi.c | 128 ++ arch/x86/kernel/cpu/tsx.c | 13 arch/x86/kernel/time.c | 12 arch/x86/kernel/x86_init.c | 1 arch/x86/kvm/cpuid.c | 4 arch/x86/kvm/emulate.c | 66 + arch/x86/kvm/hyperv.c | 10 arch/x86/kvm/i8259.c | 6 arch/x86/kvm/ioapic.c | 15 arch/x86/kvm/lapic.c | 13 arch/x86/kvm/mmu.c | 107 +- arch/x86/kvm/mmutrace.h | 12 arch/x86/kvm/mtrr.c | 8 arch/x86/kvm/paging_tmpl.h | 25 arch/x86/kvm/pmu.h | 18 arch/x86/kvm/svm.c | 6 arch/x86/kvm/vmx/capabilities.h | 5 arch/x86/kvm/vmx/nested.c | 4 arch/x86/kvm/vmx/pmu_intel.c | 24 arch/x86/kvm/vmx/vmx.c | 3 arch/x86/kvm/x86.c | 196 +++- arch/x86/kvm/x86.h | 2 arch/x86/xen/enlighten_pv.c | 1 crypto/algapi.c | 46 - crypto/api.c | 7 crypto/internal.h | 1 crypto/pcrypt.c | 37 drivers/acpi/battery.c | 75 + drivers/acpi/video_detect.c | 13 drivers/base/power/main.c | 42 drivers/bluetooth/btusb.c | 6 drivers/clk/tegra/clk-tegra-periph.c | 6 drivers/cpufreq/cppc_cpufreq.c | 2 drivers/cpufreq/cpufreq-nforce2.c | 2 drivers/cpufreq/cpufreq.c | 147 +-- drivers/cpufreq/freq_table.c | 4 drivers/cpufreq/gx-suspmod.c | 2 drivers/cpufreq/intel_pstate.c | 38 drivers/cpufreq/longrun.c | 6 drivers/cpufreq/pcc-cpufreq.c | 2 drivers/cpufreq/sh-cpufreq.c | 2 drivers/cpufreq/unicore2-cpufreq.c | 2 drivers/crypto/atmel-aes.c | 37 drivers/crypto/ccp/ccp-dev-v3.c | 1 drivers/crypto/ccree/cc_aead.c | 2 drivers/crypto/ccree/cc_cipher.c | 48 + drivers/crypto/ccree/cc_driver.h | 1 drivers/crypto/ccree/cc_pm.c | 30 drivers/crypto/ccree/cc_request_mgr.c | 51 - drivers/crypto/ccree/cc_request_mgr.h | 8 drivers/crypto/hisilicon/Kconfig | 1 drivers/crypto/hisilicon/zip/zip.h | 4 drivers/crypto/hisilicon/zip/zip_crypto.c | 92 -- drivers/crypto/picoxcell_crypto.c | 15 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 13 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 18 drivers/gpu/drm/drm_dp_mst_topology.c | 12 drivers/gpu/drm/drm_rect.c | 7 drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c | 2 drivers/hv/hv_balloon.c | 13 drivers/infiniband/core/umem_odp.c | 2 drivers/infiniband/hw/mlx5/gsi.c | 3 drivers/md/bcache/bcache.h | 3 drivers/md/bcache/request.c | 17 drivers/md/bcache/sysfs.c | 22 drivers/md/dm-crypt.c | 12 drivers/md/dm-thin-metadata.c | 10 drivers/md/dm-writecache.c | 42 drivers/md/dm-zoned-metadata.c | 23 drivers/md/dm.c | 9 drivers/md/persistent-data/dm-space-map-common.c | 27 drivers/md/persistent-data/dm-space-map-common.h | 2 drivers/md/persistent-data/dm-space-map-disk.c | 6 drivers/md/persistent-data/dm-space-map-metadata.c | 5 drivers/media/rc/iguanair.c | 2 drivers/media/rc/rc-main.c | 27 drivers/media/usb/uvc/uvc_driver.c | 12 drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 148 +-- drivers/media/v4l2-core/videobuf-dma-sg.c | 5 drivers/mfd/axp20x.c | 2 drivers/mfd/da9062-core.c | 2 drivers/mfd/dln2.c | 13 drivers/mfd/rn5t618.c | 1 drivers/mmc/host/mmc_spi.c | 11 drivers/mmc/host/sdhci-of-at91.c | 9 drivers/mmc/host/sdhci-pci-core.c | 2 drivers/mtd/spi-nor/spi-nor.c | 9 drivers/mtd/ubi/fastmap.c | 23 drivers/net/bonding/bond_alb.c | 44 - drivers/net/dsa/b53/b53_common.c | 2 drivers/net/dsa/bcm_sf2.c | 4 drivers/net/dsa/microchip/ksz9477_spi.c | 6 drivers/net/ethernet/broadcom/bcmsysport.c | 3 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 25 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 1 drivers/net/ethernet/cadence/macb_main.c | 14 drivers/net/ethernet/dec/tulip/dmfe.c | 7 drivers/net/ethernet/dec/tulip/uli526x.c | 4 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 14 drivers/net/ethernet/marvell/mvneta.c | 27 drivers/net/ethernet/mellanox/mlx5/core/accel/tls.h | 2 drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c | 2 drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 3 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 15 drivers/net/ethernet/mellanox/mlx5/core/fw.c | 2 drivers/net/ethernet/pensando/ionic/ionic_if.h | 2 drivers/net/ethernet/qlogic/qed/qed_ptp.c | 4 drivers/net/ethernet/smsc/smc911x.c | 2 drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 1 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 drivers/net/gtp.c | 4 drivers/net/netdevsim/dev.c | 2 drivers/net/ppp/ppp_async.c | 18 drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 1 drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 10 drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 1 drivers/nfc/pn544/pn544.c | 2 drivers/nvme/target/fabrics-cmd.c | 15 drivers/nvmem/core.c | 8 drivers/of/Kconfig | 4 drivers/of/address.c | 6 drivers/pci/controller/dwc/pci-keystone.c | 6 drivers/pci/controller/pci-tegra.c | 2 drivers/phy/qualcomm/phy-qcom-apq8064-sata.c | 2 drivers/platform/x86/intel_scu_ipc.c | 21 drivers/power/supply/axp20x_ac_power.c | 31 drivers/power/supply/ltc2941-battery-gauge.c | 2 drivers/regulator/helpers.c | 14 drivers/scsi/csiostor/csio_scsi.c | 2 drivers/scsi/megaraid/megaraid_sas_base.c | 3 drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 drivers/scsi/megaraid/megaraid_sas_fusion.h | 1 drivers/scsi/qla2xxx/qla_dbg.c | 6 drivers/scsi/qla2xxx/qla_dbg.h | 6 drivers/scsi/qla2xxx/qla_def.h | 5 drivers/scsi/qla2xxx/qla_init.c | 34 drivers/scsi/qla2xxx/qla_isr.c | 12 drivers/scsi/qla2xxx/qla_mbx.c | 3 drivers/scsi/qla2xxx/qla_nx.c | 7 drivers/scsi/qla2xxx/qla_target.c | 1 drivers/scsi/qla4xxx/ql4_os.c | 2 drivers/scsi/ufs/ufshcd.c | 3 drivers/usb/dwc3/core.h | 2 drivers/usb/dwc3/ep0.c | 4 drivers/usb/dwc3/gadget.c | 17 drivers/usb/gadget/function/f_ecm.c | 16 drivers/usb/gadget/function/f_fs.c | 2 drivers/usb/gadget/function/f_ncm.c | 17 drivers/usb/gadget/legacy/cdc2.c | 2 drivers/usb/gadget/legacy/g_ffs.c | 2 drivers/usb/gadget/legacy/multi.c | 2 drivers/usb/gadget/legacy/ncm.c | 2 drivers/usb/typec/tcpm/tcpci.c | 6 drivers/virtio/virtio_balloon.c | 19 drivers/virtio/virtio_pci_common.c | 2 drivers/watchdog/watchdog_core.c | 35 drivers/watchdog/watchdog_dev.c | 36 drivers/xen/xen-balloon.c | 2 fs/aio.c | 20 fs/attr.c | 23 fs/btrfs/ctree.c | 8 fs/btrfs/ctree.h | 6 fs/btrfs/delayed-ref.c | 8 fs/btrfs/disk-io.c | 22 fs/btrfs/extent_io.c | 55 - fs/btrfs/ioctl.c | 3 fs/btrfs/tests/btrfs-tests.c | 1 fs/btrfs/tests/extent-io-tests.c | 9 fs/btrfs/transaction.c | 30 fs/btrfs/tree-log.c | 432 +++------- fs/btrfs/volumes.c | 17 fs/cifs/smb2pdu.c | 10 fs/configfs/inode.c | 9 fs/crypto/keyring.c | 15 fs/erofs/decompressor.c | 22 fs/eventfd.c | 15 fs/ext2/super.c | 6 fs/ext4/dir.c | 9 fs/ext4/page-io.c | 19 fs/f2fs/dir.c | 11 fs/f2fs/file.c | 18 fs/f2fs/super.c | 14 fs/fs-writeback.c | 2 fs/fuse/file.c | 5 fs/gfs2/file.c | 72 - fs/gfs2/lops.c | 2 fs/jbd2/journal.c | 1 fs/nfs/dir.c | 47 - fs/nfsd/filecache.c | 6 fs/nfsd/nfs4layouts.c | 2 fs/nfsd/nfs4state.c | 2 fs/nfsd/state.h | 2 fs/nfsd/vfs.c | 1 fs/ntfs/inode.c | 18 fs/ocfs2/file.c | 14 fs/overlayfs/file.c | 2 fs/overlayfs/readdir.c | 8 fs/read_write.c | 10 fs/ubifs/dir.c | 2 fs/ubifs/file.c | 22 fs/ubifs/ioctl.c | 3 fs/ubifs/sb.c | 2 fs/ubifs/super.c | 2 fs/utimes.c | 4 include/asm-generic/tlb.h | 22 include/linux/backing-dev.h | 10 include/linux/cpufreq.h | 32 include/linux/eventfd.h | 14 include/linux/irq.h | 18 include/linux/irqdomain.h | 7 include/linux/kvm_host.h | 13 include/linux/kvm_types.h | 9 include/linux/mfd/rohm-bd70528.h | 2 include/linux/mlx5/mlx5_ifc.h | 7 include/linux/padata.h | 34 include/linux/percpu-defs.h | 3 include/linux/regulator/consumer.h | 7 include/media/v4l2-rect.h | 8 include/net/ipx.h | 5 include/sound/hdaudio.h | 77 + include/trace/events/writeback.h | 37 ipc/msg.c | 19 kernel/bpf/devmap.c | 3 kernel/events/core.c | 10 kernel/irq/debugfs.c | 1 kernel/irq/irqdomain.c | 1 kernel/irq/msi.c | 5 kernel/padata.c | 275 ++++-- kernel/rcu/srcutree.c | 7 kernel/rcu/tree_exp.h | 19 kernel/rcu/tree_plugin.h | 13 kernel/time/alarmtimer.c | 8 kernel/time/clocksource.c | 11 kernel/trace/ftrace.c | 15 kernel/trace/trace.h | 29 kernel/trace/trace_events_hist.c | 53 - kernel/trace/trace_probe.c | 6 kernel/trace/trace_sched_switch.c | 4 lib/test_kasan.c | 1 mm/backing-dev.c | 1 mm/memcontrol.c | 18 mm/memory_hotplug.c | 9 mm/migrate.c | 25 mm/mmu_gather.c | 16 mm/page_alloc.c | 14 mm/sparse.c | 2 net/core/devlink.c | 6 net/core/drop_monitor.c | 4 net/hsr/hsr_slave.c | 2 net/ipv4/tcp.c | 6 net/ipv6/addrconf.c | 3 net/l2tp/l2tp_core.c | 7 net/netfilter/ipset/ip_set_core.c | 41 net/rxrpc/af_rxrpc.c | 2 net/rxrpc/ar-internal.h | 11 net/rxrpc/call_object.c | 4 net/rxrpc/conn_client.c | 3 net/rxrpc/conn_event.c | 30 net/rxrpc/conn_object.c | 3 net/rxrpc/input.c | 6 net/rxrpc/local_object.c | 23 net/rxrpc/output.c | 27 net/rxrpc/peer_event.c | 42 net/sched/cls_rsvp.h | 6 net/sched/cls_tcindex.c | 43 net/sched/sch_taprio.c | 92 +- net/sunrpc/auth_gss/svcauth_gss.c | 4 samples/bpf/Makefile | 2 samples/bpf/xdp_redirect_cpu_user.c | 59 + scripts/find-unused-docs.sh | 2 security/smack/smack_lsm.c | 41 sound/drivers/dummy.c | 2 sound/pci/hda/hda_intel.c | 4 sound/pci/hda/hda_tegra.c | 1 sound/pci/hda/patch_hdmi.c | 1 sound/soc/codecs/sgtl5000.c | 3 sound/soc/intel/boards/skl_hda_dsp_common.c | 21 sound/soc/meson/axg-fifo.c | 27 sound/soc/meson/axg-fifo.h | 6 sound/soc/meson/axg-frddr.c | 24 sound/soc/meson/axg-toddr.c | 21 sound/soc/sof/core.c | 87 +- sound/soc/sof/intel/hda-loader.c | 1 sound/soc/sof/intel/hda.c | 4 sound/soc/sof/ipc.c | 17 sound/soc/sof/loader.c | 19 sound/soc/sof/pm.c | 25 sound/soc/sof/sof-priv.h | 11 sound/usb/mixer_scarlett_gen2.c | 46 - sound/usb/validate.c | 6 tools/kvm/kvm_stat/kvm_stat | 8 tools/lib/bpf/libbpf.c | 4 tools/objtool/sync-check.sh | 2 tools/power/cpupower/lib/cpufreq.c | 78 + tools/power/cpupower/lib/cpufreq.h | 20 tools/power/cpupower/utils/cpufreq-info.c | 12 tools/testing/selftests/bpf/prog_tests/attach_probe.c | 7 tools/testing/selftests/bpf/prog_tests/perf_buffer.c | 29 tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c | 8 tools/testing/selftests/bpf/progs/test_select_reuseport_kern.c | 6 tools/testing/selftests/bpf/test_sockmap.c | 15 tools/testing/selftests/tc-testing/plugin-lib/buildebpfPlugin.py | 2 virt/kvm/arm/aarch32.c | 117 ++ virt/kvm/arm/mmio.c | 6 virt/kvm/async_pf.c | 10 virt/kvm/kvm_main.c | 117 ++ 357 files changed, 3987 insertions(+), 2197 deletions(-)
Abhi Das (1):
gfs2: fix gfs2_find_jhead that returns uninitialized jhead with seq 0
Alexander Lobakin (3):
MIPS: syscalls: fix indentation of the 'SYSNR' message
MIPS: fix indentation of the 'RELOCS' message
MIPS: boot: fix typo in 'vmlinux.lzma.its' target
Alexei Starovoitov (1):
selftests/bpf: Fix test_attach_probe
Amir Goldstein (2):
utimes: Clamp the timestamps in notify_change()
ovl: fix wrong WARN_ON() in ovl_cache_update_ino()
Amol Grover (3):
tracing: Annotate ftrace_graph_hash pointer with __rcu
tracing: Annotate ftrace_graph_notrace_hash pointer with __rcu bpf, devmap: Pass lockdep expression to RCU lists
Anand Jain (1):
btrfs: use bool argument in free_root_pointers()
Anand Lodnoor (1):
scsi: megaraid_sas: Do not initiate OCR if controller is not in ready state
Andreas Gruenbacher (1):
gfs2: fix O_SYNC write handling
Andreas Kemnade (1):
mfd: rn5t618: Mark ADC control register volatile
Andrii Nakryiko (2):
selftests/bpf: Fix perf_buffer test on systems w/ offline CPUs
libbpf: Fix realloc usage in bpf_core_find_cands
Aneesh Kumar K.V (1):
powerpc/mmu_gather: enable RCU_TABLE_FREE even for !SMP case
Ard Biesheuvel (2):
crypto: ccp - set max RSA modulus size for v3 platform devices as well
crypto: arm64/ghash-neon - bump priority to 150
Arnd Bergmann (4):
sparc32: fix struct ipc64_perm type definition
media: v4l2-core: compat: ignore native command codes
nfsd: fix delay timer on 32-bit architectures
nfsd: fix jiffies/time_t mixup in LRU list
Arun Easi (1):
scsi: qla2xxx: Fix unbound NVME response length
Asutosh Das (1):
scsi: ufs: Recheck bkops level if bkops is disabled
Bart Van Assche (1):
scsi: qla2xxx: Fix the endianness of the qla82xx_get_fw_size() return type
Bitan Biswas (1):
nvmem: core: fix memory abort in cleanup path
Björn Töpel (1):
riscv, bpf: Fix broken BPF tail calls
Boris Ostrovsky (5):
x86/kvm: Be careful not to clear KVM_VCPU_FLUSH_TLB bit x86/kvm: Introduce kvm_(un)map_gfn()
x86/KVM: Make sure KVM_VCPU_FLUSH_TLB flag is not missed x86/kvm: Cache gfn to pfn translation
x86/KVM: Clean up host's steal time structure
Brian Norris (1):
mwifiex: fix unbalanced locking in mwifiex_process_country_ie()
Bryan O'Donoghue (2):
usb: gadget: f_ncm: Use atomic_t to track in-flight request
usb: gadget: f_ecm: Use atomic_t to track in-flight request
Casey Schaufler (1):
broken ping to ipv6 linklocal addresses on debian buster
Cezary Rojewski (1):
ASoC: Intel: skl_hda_dsp_common: Fix global-out-of-bounds bug
Chen-Yu Tsai (1):
ARM: dma-api: fix max_pfn off-by-one error in __dma_supported()
Chengguang Xu (3):
f2fs: choose hardlimit when softlimit is larger than hardlimit in f2fs_statfs_project()
f2fs: fix miscounted block limit in f2fs_statfs_project()
f2fs: code cleanup for f2fs_statfs_project()
Christian Borntraeger (1):
KVM: s390: do not clobber registers during guest reset/store status
Christoffer Dall (1):
KVM: arm64: Only sign-extend MMIO up to register width
Christoph Hellwig (1):
gfs2: move setting current->backing_dev_info
Christophe Leroy (4):
powerpc/ptdump: Fix W+X verification
powerpc/32s: Fix bad_kuap_fault()
powerpc/32s: Fix CPU wake-up from sleep mode powerpc/kuap: Fix set direction in allow/prevent_user_access()
Chuhong Yuan (1):
crypto: picoxcell - adjust the position of tasklet_init and fix missed tasklet_kill
Claudiu Beznea (2):
drm: atmel-hlcdc: use double rate for pixel clock only if supported
drm: atmel-hlcdc: enable clock before configuring timing engine
Colin Ian King (1):
Bluetooth: btusb: fix memory leak on fw
Coly Li (1):
bcache: add readahead cache policy options via sysfs interface
Cong Wang (2):
net_sched: fix an OOB access in cls_tcindex
net_sched: fix a resource leak in tcindex_set_parms()
Dan Carpenter (1):
ubi: Fix an error pointer dereference in error handling code
Dan Williams (1):
mm/memory_hotplug: fix remove_memory() lockdep splat
Daniel Verkamp (2):
virtio-balloon: initialize all vq callbacks
virtio-pci: check name when counting MSI-X vectors
David Engraf (1):
PCI: tegra: Fix return value check of pm_runtime_get_sync()
David Hildenbrand (3):
mm/page_alloc.c: fix uninitialized memmaps on a partially populated last section
virtio-balloon: Fix memory leak when unloading while hinting is in progress
virtio_balloon: Fix memory leaks on errors in virtballoon_probe()
David Howells (5):
rxrpc: Fix use-after-free in rxrpc_put_local()
rxrpc: Fix insufficient receive notification generation
rxrpc: Fix missing active use pinning of rxrpc_local object
rxrpc: Fix NULL pointer deref due to call->conn being cleared on disconnect
rxrpc: Fix service call disconnection
Davide Caratti (1):
tc-testing: fix eBPF tests failure on linux fresh clones
Dejin Zheng (1):
net: stmmac: fix a possible endless loop
Dmitry Fomichev (1):
dm zoned: support zone sizes smaller than 128MiB
Erdem Aktas (1):
percpu: Separate decrypted varaibles anytime encryption can be enabled
Eric Biggers (7):
fscrypt: don't print name of busy file when removing key
ubifs: don't trigger assertion on invalid no-key filename
ubifs: Fix FS_IOC_SETFLAGS unexpectedly clearing encrypt flag
f2fs: fix dcache lookup of !casefolded directories
f2fs: fix race conditions in ->d_compare() and ->d_hash()
ext4: fix deadlock allocating crypto bounce page from mempool
ext4: fix race conditions in ->d_compare() and ->d_hash()
Eric Dumazet (9):
cls_rsvp: fix rsvp_policy
net: hsr: fix possible NULL deref in hsr_handle_frame()
tcp: clear tp->total_retrans in tcp_disconnect()
tcp: clear tp->delivered in tcp_disconnect()
tcp: clear tp->data_segs{in|out} in tcp_disconnect()
tcp: clear tp->segs_{in|out} in tcp_disconnect()
rcu: Avoid data-race in rcu_gp_fqs_check_wake() bonding/alb: properly access headers in bond_alb_xmit() ipv6/addrconf: fix potential NULL deref in inet6_set_link_af()
Filipe Manana (5):
fs: allow deduplication of eof block into the end of the destination file
Btrfs: fix missing hole after hole punching and fsync when using NO_HOLES
Btrfs: make deduplication with range including the last block work
Btrfs: fix infinite loop during fsync after rename operations
Btrfs: fix race between adding and putting tree mod seq elements and nodes
Florian Fainelli (3):
net: dsa: b53: Always use dev->vlan_enabled in b53_configure_vlan()
net: dsa: bcm_sf2: Only 7278 supports 2Gb/sec IMP port
net: systemport: Avoid RBUF stuck in Wake-on-LAN mode
Gang He (1):
ocfs2: fix oops when writing cloned file
Gao Xiang (1):
erofs: fix out-of-bound read for shifted uncompressed block
Gavin Shan (1):
tools/kvm_stat: Fix kvm_exit filter name
Geert Uytterhoeven (1):
scripts/find-unused-docs: Fix massive false positives
Gerald Schaefer (1):
s390/mm: fix dynamic pagetable upgrade for hugetlbfs
Gilad Ben-Yossef (4):
crypto: ccree - fix backlog memory leak
crypto: ccree - fix AEAD decrypt auth fail
crypto: ccree - fix pm wrongful error reporting
crypto: ccree - fix PM race condition
Greg Kroah-Hartman (1):
Linux 5.4.19
Gustavo A. R. Silva (1):
lib/test_kasan.c: fix memory leak in kmalloc_oob_krealloc_more()
Hangbin Liu (1):
selftests/bpf: Skip perf hw events test if the setup disabled it
Hans de Goede (5):
ALSA: hda: Add Clevo W65_67SB the power_save blacklist
ACPI: video: Do not export a non working backlight interface on MSI MS-7721 boards ACPI / battery: Deal with design or full capacity being reported as -1 ACPI / battery: Use design-cap for capacity calculations if full-cap is not available ACPI / battery: Deal better with neither design nor full capacity not being reported
Harini Katakam (2):
net: macb: Remove unnecessary alignment check for TSO
net: macb: Limit maximum GEM TX length in TSO
Helen Koike (1):
media: v4l2-rect.h: fix v4l2_rect_map_inside() top/left adjustments
Herbert Xu (6):
crypto: api - Check spawn->alg under lock in crypto_drop_spawn
padata: Remove broken queue flushing
crypto: pcrypt - Avoid deadlock by using per-instance padata queues
crypto: api - fix unexpectedly getting generic implementation
crypto: pcrypt - Do not clear MAY_SLEEP flag in original request
crypto: api - Fix race condition in crypto_spawn_alg
Ido Schimmel (1):
drop_monitor: Do not cancel uninitialized work item
Israel Rukshin (2):
nvmet: Fix error print message at nvmet_install_queue function
nvmet: Fix controller use after free
Jacob Keller (1):
devlink: report 0 after hitting end in region read
Jens Axboe (2):
eventfd: track eventfd_signal() recursion depth
aio: prevent potential eventfd recursion on poll
Jerome Brunet (1):
ASoC: meson: axg-fifo: fix fifo threshold setup
Jesper Dangaard Brouer (1):
samples/bpf: Xdp_redirect_cpu fix missing tracepoint attach
Joe Thornber (1):
dm space map common: fix to ensure new block isn't already in use
Johan Hovold (1):
media: iguanair: fix endpoint sanity check
John Allen (1):
kvm/svm: PKU not currently supported
John Hubbard (1):
media/v4l2-core: set pages dirty upon releasing DMA buffers
Jonathan Cameron (1):
crypto: hisilicon - Use the offset fields in sqe to avoid need to split scatterlists
Josef Bacik (5):
btrfs: fix improper setting of scanned for range cyclic write cache pages
btrfs: set trans->drity in btrfs_commit_transaction
btrfs: drop log root for dropped roots
btrfs: flush write bio if we loop in extent_write_cache_pages
btrfs: free block groups after free'ing fs trees
Juergen Gross (1):
xen/balloon: Support xend-based toolstack take two
Jun Li (1):
usb: typec: tcpci: mask event interrupts when remove driver
Kadlecsik József (1):
netfilter: ipset: fix suspicious RCU usage in find_set_and_id
Kai-Heng Feng (1):
Bluetooth: btusb: Disable runtime suspend on Realtek devices
Kevin Hao (1):
irqdomain: Fix a memory leak in irq_domain_push_irq()
Kishon Vijay Abraham I (1):
PCI: keystone: Fix error handling when "num-viewport" DT property is not populated
Konstantin Khlebnikov (1):
clocksource: Prevent double add_timer_on() for watchdog_timer
Linus Walleij (1):
mmc: spi: Toggle SPI polarity, do not hardcode it
Lorenz Bauer (2):
selftests: bpf: Use a temporary file in test_sockmap
selftests: bpf: Ignore FIN packets for reuseport tests
Lorenzo Bianconi (1):
net: mvneta: move rx_dropped and rx_errors in per-cpu stats
Lu Shuaibing (1):
ipc/msg.c: consolidate all xxxctl_down() functions
Luca Coelho (1):
iwlwifi: don't throw error when trying to remove IGTK
Lukas Bulwahn (1):
MAINTAINERS: correct entries for ISDN/mISDN section
Lyude Paul (1):
drm/amd/dm/mst: Ignore payload update failures
Madalin Bucur (1):
dpaa_eth: support all modes with rate adapting PHYs
Maor Gottlieb (1):
net/mlx5: Fix deadlock in fs_core
Marco Felsch (1):
mfd: da9062: Fix watchdog compatible string
Marek Vasut (2):
regulator: core: Add regulator_is_equal() helper
ASoC: sgtl5000: Fix VDDA and VDDIO comparison
Marios Pomonis (12):
KVM: x86: Refactor picdev_write() to prevent Spectre-v1/L1TF attacks
KVM: x86: Refactor prefix decoding to prevent Spectre-v1/L1TF attacks
KVM: x86: Protect pmu_intel.c from Spectre-v1/L1TF attacks
KVM: x86: Protect DR-based index computations from Spectre-v1/L1TF attacks
KVM: x86: Protect kvm_lapic_reg_write() from Spectre-v1/L1TF attacks
KVM: x86: Protect kvm_hv_msr_[get|set]_crash_data() from Spectre-v1/L1TF attacks
KVM: x86: Protect ioapic_write_indirect() from Spectre-v1/L1TF attacks
KVM: x86: Protect MSR-based index computations in pmu.h from Spectre-v1/L1TF attacks
KVM: x86: Protect ioapic_read_indirect() from Spectre-v1/L1TF attacks
KVM: x86: Protect MSR-based index computations from Spectre-v1/L1TF attacks in x86.c
KVM: x86: Protect x86_decode_insn from Spectre-v1/L1TF attacks
KVM: x86: Protect MSR-based index computations in fixed_msr_to_seg_unit() from Spectre-v1/L1TF attacks
Mark Rutland (4):
arm64: acpi: fix DAIF manipulation with pNMI
KVM: arm64: Correct PSTATE on exception entry
KVM: arm/arm64: Correct CPSR on exception entry
KVM: arm/arm64: Correct AArch32 SPSR on exception entry
Mathieu Desnoyers (1):
tracing: Fix sched switch start/stop refcount racy updates
Matti Vaittinen (1):
mfd: bd70528: Fix hour register mask
Miaohe Lin (1):
KVM: nVMX: vmread should not set rflags to specify success in case of #PF
Michael Chan (1):
bnxt_en: Fix TC queue mapping.
Michael Ellerman (2):
of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc powerpc/futex: Fix incorrect user access blocking
Michał Mirosław (1):
mmc: sdhci-of-at91: fix memleak on clk_get failure
Mika Westerberg (1):
platform/x86: intel_scu_ipc: Fix interrupt support
Mike Snitzer (2):
dm thin metadata: use pool locking at end of dm_pool_metadata_close
dm: fix potential for q->make_request_fn NULL pointer
Miklos Szeredi (2):
ovl: fix lseek overflow on 32bit
fix up iter on short count in fuse_direct_io()
Mikulas Patocka (2):
dm writecache: fix incorrect flush sequence when doing SSD mode commit dm crypt: fix GFP flags passed to skcipher_request_alloc()
Milan Broz (1):
dm crypt: fix benbi IV constructor crash if used in authenticated mode
Nathan Chancellor (10):
scsi: csiostor: Adjust indentation in csio_device_reset
scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free
phy: qualcomm: Adjust indentation in read_poll_timeout
ext2: Adjust indentation in ext2_fill_super powerpc/44x: Adjust indentation in ibm4xx_denali_fixup_memsize
drm: msm: mdp4: Adjust indentation in mdp4_dsi_encoder_enable
NFC: pn544: Adjust indentation in pn544_hci_check_presence
ppp: Adjust indentation into ppp_async_input
net: smc911x: Adjust indentation in smc911x_phy_configure
net: tulip: Adjust indentation in {dmfe, uli526x}_init_module
Navid Emamdoost (1):
brcmfmac: Fix memory leak in brcmf_usbdev_qinit
Nicolin Chen (1):
net: stmmac: Delete txtimer in suspend()
Niklas Cassel (1):
arm64: dts: qcom: qcs404-evb: Set vdd_apc regulator in high power mode
Nikolay Borisov (2):
btrfs: Handle another split brain scenario with metadata uuid feature
btrfs: Correctly handle empty trees in find_first_clear_extent_bit
Ofir Drang (1):
crypto: ccree - fix FDE descriptor sequence
Oliver Neukum (1):
mfd: dln2: More sanity checking for endpoints
Olof Johansson (1):
objtool: Silence build output
Paolo Bonzini (2):
KVM: x86: use CPUID to locate host page table reserved bits
KVM: x86: fix overlap between SPTE_MMIO_MASK and generation
Paul E. McKenney (3):
rcu: Use *_ONCE() to protect lockless ->expmask accesses
srcu: Apply *_ONCE() to ->srcu_last_gp_end
rcu: Use READ_ONCE() for ->expmask in rcu_read_unlock_special()Pawan Gupta (1):
x86/cpu: Update cached HLE state on write to TSX_CTRL_CPUID_CLEAR
Peter Chen (1):
usb: gadget: f_fs: set req->num_sgs as 0 for non-sg transfer
Peter Rosin (1):
drm: atmel-hlcdc: prefer a lower pixel-clock than requested
Peter Zijlstra (1):
mm/mmu_gather: invalidate TLB correctly on batch allocation failure and flush
Pierre-Louis Bossart (2):
ASoC: SOF: core: free trace on errors
ASoC: SOF: core: release resources on errors in probe_continue
Pingfan Liu (2):
mm/sparse.c: reset section's mem_map when fully deactivated powerpc/pseries: Advance pfn if section is not present in lmb_is_removable()
Prabhath Sajeepa (1):
IB/mlx5: Fix outstanding_pi index for GSI qps
Quanyang Wang (1):
ubifs: Fix memory leak from c->sup_node
Quinn Tran (2):
scsi: qla2xxx: Fix mtcp dump collection failure
scsi: qla2xxx: Fix stuck login session using prli_pend_timer
Raed Salem (2):
net/mlx5: IPsec, Fix esp modify function attribute net/mlx5: IPsec, fix memory leak at mlx5_fpga_ipsec_delete_sa_ctx
Rafael J. Wysocki (2):
PM: core: Fix handling of devices deleted during system-wide resume
cpufreq: Avoid creating excessively large stack frames
Ranjani Sridharan (1):
ASoC: SOF: Introduce state machine for FW boot
Razvan Stefanescu (1):
net: dsa: microchip: enable module autoprobe
Ridge Kennedy (1):
l2tp: Allow duplicate session creation with UDP
Roberto Bergantinos Corpas (1):
sunrpc: expiry_time should be seconds not timeval
Roger Quadros (1):
usb: gadget: legacy: set max_speed to super-speed
Ronnie Sahlberg (1):
cifs: fail i/o on soft mounts if sessionsetup errors out
Samuel Holland (2):
mfd: axp20x: Mark AXP20X_VBUS_IPSOUT_MGMT as volatile
power: supply: axp20x_ac_power: Fix reporting online statusSascha Hauer (2):
ubifs: Fix wrong memory allocation
ubi: fastmap: Fix inverted logic in seen selfcheck
Sean Christopherson (13):
KVM: x86: Fix potential put_fpu() w/o load_fpu() on MPX platform
KVM: PPC: Book3S HV: Uninit vCPU if vcore creation fails
KVM: PPC: Book3S PR: Free shared page if mmu initialization fails
KVM: VMX: Add non-canonical check on writes to RTIT address MSRs
KVM: x86: Don't let userspace set host-reserved cr4 bits
KVM: x86: Free wbinvd_dirty_mask if vCPU creation fails
KVM: x86: Handle TIF_NEED_FPU_LOAD in kvm_{load,put}_guest_fpu()
KVM: x86: Ensure guest's FPU state is loaded when accessing for emulation
KVM: x86: Revert "KVM: X86: Fix fpu state crash in kvm guest"
KVM: x86/mmu: Apply max PA check for MMIO sptes to 32-bit KVM
KVM: x86: Use gpa_t for cr2/gpa to fix TDP support on 32-bit KVM
KVM: Use vcpu-specific gva->hva translation when querying host page size
KVM: Play nice with read-only memslots when querying host page size
Sean Young (1):
media: rc: ensure lirc is initialized before registering input device
Shannon Nelson (1):
ionic: fix rxq comp packet type mask
Song Liu (1):
perf/core: Fix mlock accounting in perf_mmap()
Stephen Boyd (1):
alarmtimer: Unregister wakeup source when module get fails
Stephen Rothwell (1):
regulator fix for "regulator: core: Add regulator_is_equal() helper"
Stephen Warren (2):
ARM: tegra: Enable PLLP bypass during Tegra124 LP1
clk: tegra: Mark fuse clock as critical
Steven Rostedt (VMware) (3):
tracing/kprobes: Have uname use __get_str() in print_fmt
ftrace: Add comment to why rcu_dereference_sched() is open coded
ftrace: Protect ftrace_graph_hash with ftrace_sync
Sudarsana Reddy Kalluru (1):
qed: Fix timestamping issue for L2 unicast ptp packets.
Sukadev Bhattiprolu (1):
powerpc/xmon: don't access ASDR in VMs
Sven Van Asbroeck (1):
power: supply: ltc2941-battery-gauge: fix use-after-free
Taehee Yoo (2):
gtp: use __GFP_NOWARN to avoid memalloc warning
netdevsim: fix stack-out-of-bounds in nsim_dev_debugfs_init()
Takashi Iwai (4):
ALSA: usb-audio: Fix endianess in descriptor validation
ALSA: usb-audio: Annotate endianess in Scarlett gen2 quirk
ALSA: dummy: Fix PCM format loop in proc output
ALSA: hda: Apply aligned MMIO access only conditionally
Tariq Toukan (1):
net/mlx5: Deprecate usage of generic TLS HW capability bit
Theodore Ts'o (1):
memcg: fix a crash in wb_workfn when a device disappears
Thinh Nguyen (2):
usb: dwc3: gadget: Check END_TRANSFER completion
usb: dwc3: gadget: Delay starting transfer
Thomas Gleixner (2):
x86/timer: Don't skip PIT setup when APIC is disabled or in legacy mode x86/apic/msi: Plug non-maskable MSI affinity race
Thomas Renninger (1):
cpupower: Revert library ABI changes from commit ae2917093fb60bdc1ed3e
Tianyu Lan (1):
hv_balloon: Balloon up according to request page number
Toke Høiland-Jørgensen (1):
samples/bpf: Don't try to remove user's homedir on clean
Tom Zanussi (1):
tracing: Fix now invalid var_ref_vals assumption in trace action
Trond Myklebust (4):
NFS: Fix memory leaks and corruption in readdir
NFS: Directory page cache pages need to be locked when read
nfsd: fix filecache lookup
nfsd: Return the correct number of bytes written to the file
Tudor Ambarus (1):
crypto: atmel-aes - Fix counter overflow in CTR mode
Vasily Averin (1):
jbd2_seq_info_next should increase position index
Vasundhara Volam (2):
bnxt_en: Move devlink_register before registering netdev
bnxt_en: Fix logic that disables Bus Master during firmware reset.
Vignesh Raghavendra (1):
mtd: spi-nor: Split mt25qu512a (n25q512a) entry into two
Ville Syrjälä (1):
drm/rect: Avoid division by zero
Vinicius Costa Gomes (5):
taprio: Fix enabling offload with wrong number of traffic classes
taprio: Fix still allowing changing the flags during runtime
taprio: Add missing policy validation for flags
taprio: Use taprio_reset_tc() to reset Traffic Classes configuration
taprio: Fix dropping packets when using taprio + ETF offloading
Vladis Dronov (1):
watchdog: fix UAF in reboot notifier handling in watchdog core code
Wayne Lin (1):
drm/dp_mst: Remove VCPI while disabling topology mgr
Wei Yang (1):
mm: thp: don't need care deferred split queue in memcg charge move path
Will Deacon (1):
media: uvcvideo: Avoid cyclic entity chains due to malformed USB descriptors
Yang Shi (1):
mm: move_pages: report the number of non-attempted pages
Yishai Hadas (1):
IB/core: Fix ODP get user pages flow
Yong Zhi (1):
ALSA: hda: Add JasperLake PCI ID and codec vid
Yurii Monakov (2):
PCI: keystone: Fix outbound region mapping
PCI: keystone: Fix link training retries initiation
Zhihao Cheng (1):
ubifs: Fix deadlock in concurrent bulk-read and writepage
zhengbin (1):
mmc: sdhci-pci: Make function amd_sdhci_reset static
Greg KH
maintainerMAINTAINERS +4 -2
@@ -8704,8 +8704,10 @@ L: [email protected] (subscribers-only) L: [email protected] W: http://www.isdn4linux.de S: Maintained -F: drivers/isdn/mISDN -F: drivers/isdn/hardware +F: drivers/isdn/mISDN/ +F: drivers/isdn/hardware/ +F: drivers/isdn/Kconfig +F: drivers/isdn/Makefile ISDN/CAPI SUBSYSTEM M: Karsten Keil <[email protected]>
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 18 +SUBLEVEL = 19 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/Kconfig +0 -3
@@ -396,9 +396,6 @@ config HAVE_ARCH_JUMP_LABEL_RELATIVE config HAVE_RCU_TABLE_FREE bool -config HAVE_RCU_TABLE_NO_INVALIDATE - bool - config HAVE_MMU_GATHER_PAGE_SIZE bool
arch/arm/include/asm/kvm_emulate.h +22 -0
@@ -14,13 +14,25 @@#include <asm/cputype.h> /* arm64 compatibility macros */ +#define PSR_AA32_MODE_FIQ FIQ_MODE +#define PSR_AA32_MODE_SVC SVC_MODE#define PSR_AA32_MODE_ABT ABT_MODE#define PSR_AA32_MODE_UND UND_MODE#define PSR_AA32_T_BIT PSR_T_BIT +#define PSR_AA32_F_BIT PSR_F_BIT#define PSR_AA32_I_BIT PSR_I_BIT#define PSR_AA32_A_BIT PSR_A_BIT#define PSR_AA32_E_BIT PSR_E_BIT#define PSR_AA32_IT_MASK PSR_IT_MASK +#define PSR_AA32_GE_MASK 0x000f0000 +#define PSR_AA32_DIT_BIT 0x00200000 +#define PSR_AA32_PAN_BIT 0x00400000 +#define PSR_AA32_SSBS_BIT 0x00800000 +#define PSR_AA32_Q_BIT PSR_Q_BIT +#define PSR_AA32_V_BIT PSR_V_BIT +#define PSR_AA32_C_BIT PSR_C_BIT +#define PSR_AA32_Z_BIT PSR_Z_BIT +#define PSR_AA32_N_BIT PSR_N_BITunsigned long *vcpu_reg (struct kvm_vcpu *vcpu,u8 reg_num);
@@ -41,6 +53,11 @@ static inline void vcpu_write_spsr(struct kvm_vcpu *vcpu, unsigned long v) *__vcpu_spsr (vcpu) = v; } +static inline unsigned long host_spsr_to_spsr32 (unsigned long spsr) +{ +return spsr; +} +static inline unsigned long vcpu_get_reg (struct kvm_vcpu *vcpu,u8 reg_num) {
@@ -177,6 +194,11 @@ static inline bool kvm_vcpu_dabt_issext(struct kvm_vcpu *vcpu)return kvm_vcpu_get_hsr (vcpu) &HSR_SSE ; } +static inline bool kvm_vcpu_dabt_issf (const struct kvm_vcpu *vcpu) +{ +return false; +} +static inline int kvm_vcpu_dabt_get_rd (struct kvm_vcpu *vcpu) {return (kvm_vcpu_get_hsr (vcpu) &HSR_SRT_MASK ) >>HSR_SRT_SHIFT ;
arch/arm/include/asm/kvm_mmio.h +2 -0
@@ -14,6 +14,8 @@struct kvm_decode {unsigned long rt;bool sign_extend; +/* Not used on 32-bit arm */ +bool sixty_four; };void kvm_mmio_write_buf (void *buf,unsigned int len,unsigned long data);
arch/arm/mach-tegra/sleep-tegra30.S +11 -0
@@ -370,6 +370,14 @@ _pll_m_c_x_done: pll_locked r1, r0, CLK_RESET_PLLC_BASE pll_locked r1, r0, CLK_RESET_PLLX_BASE + tegra_get_soc_id TEGRA_APB_MISC_BASE, r1 + cmp r1, #TEGRA30 + beq 1f + ldr r1, [r0, #CLK_RESET_PLLP_BASE] + bic r1, r1, #(1<<31) @ disable PllP bypass + str r1, [r0, #CLK_RESET_PLLP_BASE] +1: + mov32 r7, TEGRA_TMRUS_BASE ldr r1, [r7] add r1, r1, #LOCK_DELAY
@@ -630,7 +638,10 @@ tegra30_switch_cpu_to_clk32k: str r0, [r4, #PMC_PLLP_WB0_OVERRIDE] /* disable PLLP, PLLA, PLLC and PLLX */ + tegra_get_soc_id TEGRA_APB_MISC_BASE, r1 + cmp r1, #TEGRA30 ldr r0, [r5, #CLK_RESET_PLLP_BASE] + orrne r0, r0, #(1 << 31) @ enable PllP bypass on fast cluster bic r0, r0, #(1 << 30) str r0, [r5, #CLK_RESET_PLLP_BASE] ldr r0, [r5, #CLK_RESET_PLLA_BASE]
arch/arm/mm/dma-mapping.c +1 -1
@@ -221,7 +221,7 @@ EXPORT_SYMBOL(arm_coherent_dma_ops);static int __dma_supported (struct device *dev,u64 mask,bool warn) { -unsigned long max_dma_pfn =min (max_pfn, arm_dma_pfn_limit); +unsigned long max_dma_pfn =min (max_pfn -1 , arm_dma_pfn_limit);/* * Translate the device's DMA mask to a PFN limit. This
arch/arm64/boot/dts/qcom/qcs404-evb.dtsi +1 -0
@@ -73,6 +73,7 @@ regulator-always-on; regulator-boot-on; regulator-name = "vdd_apc"; + regulator-initial-mode = <1>; regulator-min-microvolt = <1048000>; regulator-max-microvolt = <1384000>; };
arch/arm64/crypto/ghash-ce-glue.c +1 -1
@@ -261,7 +261,7 @@ static int ghash_setkey(struct crypto_shash *tfm,static struct shash_alg ghash_alg[] = {{ .base.cra_name ="ghash" , .base.cra_driver_name ="ghash-neon" , - .base.cra_priority =100 , + .base.cra_priority =150 , .base.cra_blocksize =GHASH_BLOCK_SIZE , .base.cra_ctxsize =sizeof (struct ghash_key ), .base.cra_module =THIS_MODULE ,
arch/arm64/include/asm/daifflags.h +10 -1
@@ -36,7 +36,7 @@ static inline void local_daif_mask(void)trace_hardirqs_off (); } -static inline unsigned long local_daif_save (void ) +static inline unsigned long local_daif_save_flags (void ) {unsigned long flags;
@@ -48,6 +48,15 @@ static inline unsigned long local_daif_save(void) flags |=PSR_I_BIT ; } +return flags; +} + +static inline unsigned long local_daif_save (void ) +{ +unsigned long flags; + + flags =local_daif_save_flags (); +local_daif_mask ();return flags;
arch/arm64/include/asm/kvm_emulate.h +37 -0
@@ -204,6 +204,38 @@ static inline void vcpu_write_spsr(struct kvm_vcpu *vcpu, unsigned long v)vcpu_gp_regs (vcpu)->spsr[KVM_SPSR_EL1 ] = v; } +/* +* The layout of SPSR for an AArch32 state is different when observed from an +* AArch64 SPSR_ELx or an AArch32 SPSR_*. This function generates the AArch32 +* view given an AArch64 view. +* +* In ARM DDI 0487E.a see: +* +* - The AArch64 view (SPSR_EL2) in section C5.2.18, page C5-426 +* - The AArch32 view (SPSR_abt) in section G8.2.126, page G8-6256 +* - The AArch32 view (SPSR_und) in section G8.2.132, page G8-6280 +* +* Which show the following differences: +* +* | Bit | AA64 | AA32 | Notes | +* +-----+------+------+-----------------------------| +* | 24 | DIT | J | J is RES0 in ARMv8 | +* | 21 | SS | DIT | SS doesn't exist in AArch32 | +* +* ... and all other bits are (currently) common. +*/ +static inline unsigned long host_spsr_to_spsr32 (unsigned long spsr) +{ +const unsigned long overlap =BIT (24 ) |BIT (21 ); +unsigned long dit = !!(spsr &PSR_AA32_DIT_BIT ); + + spsr &= ~overlap; + + spsr |= dit <<21 ; + +return spsr; +} +static inline bool vcpu_mode_priv (const struct kvm_vcpu *vcpu) {u32 mode;
@@ -263,6 +295,11 @@ static inline bool kvm_vcpu_dabt_issext(const struct kvm_vcpu *vcpu)return !!(kvm_vcpu_get_hsr (vcpu) & ESR_ELx_SSE); } +static inline bool kvm_vcpu_dabt_issf (const struct kvm_vcpu *vcpu) +{ +return !!(kvm_vcpu_get_hsr (vcpu) & ESR_ELx_SF); +} +static inline int kvm_vcpu_dabt_get_rd (const struct kvm_vcpu *vcpu) {return (kvm_vcpu_get_hsr (vcpu) & ESR_ELx_SRT_MASK) >> ESR_ELx_SRT_SHIFT;
arch/arm64/include/asm/kvm_mmio.h +2 -4
@@ -10,13 +10,11 @@#include <linux/kvm_host.h> #include <asm/kvm_arm.h> -/* -* This is annoying. The mmio code requires this, even if we don't -* need any decoding. To be fixed. -*/ struct kvm_decode {unsigned long rt;bool sign_extend; +/* Witdth of the register accessed by the faulting instruction is 64-bits */ +bool sixty_four; };void kvm_mmio_write_buf (void *buf,unsigned int len,unsigned long data);
arch/arm64/include/asm/ptrace.h +1 -0
@@ -62,6 +62,7 @@#define PSR_AA32_I_BIT 0x00000080#define PSR_AA32_A_BIT 0x00000100#define PSR_AA32_E_BIT 0x00000200 +#define PSR_AA32_PAN_BIT 0x00400000#define PSR_AA32_SSBS_BIT 0x00800000#define PSR_AA32_DIT_BIT 0x01000000#define PSR_AA32_Q_BIT 0x08000000
arch/arm64/include/uapi/asm/ptrace.h +1 -0
@@ -49,6 +49,7 @@#define PSR_SSBS_BIT 0x00001000#define PSR_PAN_BIT 0x00400000#define PSR_UAO_BIT 0x00800000 +#define PSR_DIT_BIT 0x01000000#define PSR_V_BIT 0x10000000#define PSR_C_BIT 0x20000000#define PSR_Z_BIT 0x40000000
arch/arm64/kernel/acpi.c +1 -1
@@ -274,7 +274,7 @@ int apei_claim_sea(struct pt_regs *regs)if (!IS_ENABLED (CONFIG_ACPI_APEI_GHES ))return err; - current_flags =arch_local_save_flags (); + current_flags =local_daif_save_flags ();/* * SEA can interrupt SError, mask it and describe this as an NMI so
arch/arm64/kvm/inject_fault.c +65 -5
94 lines not on this page · raw message
arch/mips/Makefile.postlink +1 -1
@@ -12,7 +12,7 @@ __archpost: include scripts/Kbuild.include CMD_RELOCS = arch/mips/boot/tools/relocs -quiet_cmd_relocs = RELOCS $@ +quiet_cmd_relocs = RELOCS $@ cmd_relocs = $(CMD_RELOCS) $@ # `@true` prevents complaint when there is nothing to be done
arch/mips/boot/Makefile +1 -1
@@ -123,7 +123,7 @@ $(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS targets += vmlinux.its targets += vmlinux.gz.its targets += vmlinux.bz2.its -targets += vmlinux.lzmo.its +targets += vmlinux.lzma.its targets += vmlinux.lzo.its quiet_cmd_cpp_its_S = ITS $@
arch/mips/kernel/syscalls/Makefile +1 -1
@@ -18,7 +18,7 @@ quiet_cmd_syshdr = SYSHDR $@ '$(syshdr_pfx_$(basetarget))' \ '$(syshdr_offset_$(basetarget))' -quiet_cmd_sysnr = SYSNR $@ +quiet_cmd_sysnr = SYSNR $@ cmd_sysnr = $(CONFIG_SHELL) '$(sysnr)' '$<' '$@' \ '$(sysnr_abis_$(basetarget))' \ '$(sysnr_pfx_$(basetarget))' \
arch/powerpc/Kconfig +2 -2
@@ -221,8 +221,7 @@ config PPC select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH select HAVE_PERF_REGS select HAVE_PERF_USER_STACK_DUMP - select HAVE_RCU_TABLE_FREE if SMP - select HAVE_RCU_TABLE_NO_INVALIDATE if HAVE_RCU_TABLE_FREE + select HAVE_RCU_TABLE_FREE select HAVE_MMU_GATHER_PAGE_SIZE select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_RELIABLE_STACKTRACE if PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
@@ -237,6 +236,7 @@ config PPC select NEED_DMA_MAP_STATE if PPC64 || NOT_COHERENT_CACHE select NEED_SG_DMA_LENGTH select OF + select OF_DMA_DEFAULT_COHERENT if !NOT_COHERENT_CACHE select OF_EARLY_FLATTREE select OLD_SIGACTION if PPC32 select OLD_SIGSUSPEND
arch/powerpc/boot/4xx.c +1 -1
@@ -228,7 +228,7 @@ void ibm4xx_denali_fixup_memsize(void) dpath =8 ;/* 64 bits */ /* get address pins (rows) */ - val =SDRAM0_READ (DDR0_42 ); + val =SDRAM0_READ (DDR0_42 ); row =DDR_GET_VAL (val,DDR_APIN ,DDR_APIN_SHIFT );if (row > max_row)
arch/powerpc/include/asm/book3s/32/kup.h +17 -5
@@ -102,11 +102,13 @@ static inline void kuap_update_sr(u32 sr, u32 addr, u32 end)isync ();/* Context sync required after mtsrin() */ } -static inline void allow_user_access (void __user *to,const void __user *from,u32 size) +static __always_inline void allow_user_access(void __user *to, const void __user *from, +u32 size,unsigned long dir) {u32 addr, end; -if (__builtin_constant_p (to) && to ==NULL ) +BUILD_BUG_ON (!__builtin_constant_p (dir)); +if (!(dir &KUAP_WRITE ))return ; addr = (__force u32 )to;
@@ -119,11 +121,16 @@ static inline void allow_user_access(void __user *to, const void __user *from, ukuap_update_sr (mfsrin (addr) & ~SR_KS , addr, end);/* Clear Ks */ } -static inline void prevent_user_access (void __user *to,const void __user *from,u32 size) +static __always_inline void prevent_user_access(void __user *to, const void __user *from, +u32 size,unsigned long dir) {u32 addr = (__force u32 )to;u32 end =min (addr + size,TASK_SIZE ); +BUILD_BUG_ON (!__builtin_constant_p (dir)); +if (!(dir &KUAP_WRITE )) +return ; +if (!addr || addr >=TASK_SIZE || !size)return ;
@@ -131,12 +138,17 @@ static inline void prevent_user_access(void __user *to, const void __user *from, kuap_update_sr(mfsrin(addr) | SR_KS, addr, end); /* set Ks */ } -static inline bool bad_kuap_fault (struct pt_regs *regs,bool is_write) +static inline bool +bad_kuap_fault (struct pt_regs *regs,unsigned long address,bool is_write) { +unsigned long begin = regs->kuap &0xf0000000 ; +unsigned long end = regs->kuap <<28 ; +if (!is_write)return false; -return WARN (!regs->kuap,"Bug: write fault blocked by segment registers !" ); +return WARN (address < begin || address >= end, +"Bug: write fault blocked by segment registers !" ); }#endif /* CONFIG_PPC_KUAP */
arch/powerpc/include/asm/book3s/32/pgalloc.h +0 -8
@@ -49,7 +49,6 @@ static inline void pgtable_free(void *table, unsigned index_size)#define get_hugepd_cache_index (x) (x) -#ifdef CONFIG_SMP static inline void pgtable_free_tlb (struct mmu_gather *tlb,void *table,int shift) {
@@ -66,13 +65,6 @@ static inline void __tlb_remove_table(void *_table)pgtable_free (table, shift); } -#else -static inline void pgtable_free_tlb (struct mmu_gather *tlb, -void *table,int shift) -{ -pgtable_free (table, shift); -} -#endif static inline void __pte_free_tlb (struct mmu_gather *tlb,pgtable_t table,unsigned long address)
arch/powerpc/include/asm/book3s/64/kup-radix.h +8 -6
@@ -77,25 +77,27 @@ static inline void set_kuap(unsigned long value)isync (); } -static inline void allow_user_access (void __user *to,const void __user *from, -unsigned long size) +static __always_inline void allow_user_access(void __user *to, const void __user *from, +unsigned long size,unsigned long dir) {// This is written so we can resolve to a single case at build time -if (__builtin_constant_p (to) && to ==NULL ) +BUILD_BUG_ON (!__builtin_constant_p (dir)); +if (dir ==KUAP_READ )set_kuap (AMR_KUAP_BLOCK_WRITE ); -else if (__builtin_constant_p (from) && from ==NULL ) +else if (dir ==KUAP_WRITE )set_kuap (AMR_KUAP_BLOCK_READ );else set_kuap (0 ); }static inline void prevent_user_access (void __user *to,const void __user *from, -unsigned long size) +unsigned long size,unsigned long dir) {set_kuap (AMR_KUAP_BLOCKED ); } -static inline bool bad_kuap_fault (struct pt_regs *regs,bool is_write) +static inline bool +bad_kuap_fault (struct pt_regs *regs,unsigned long address,bool is_write) { return WARN(mmu_has_feature(MMU_FTR_RADIX_KUAP) && (regs->kuap & (is_write ? AMR_KUAP_BLOCK_WRITE : AMR_KUAP_BLOCK_READ)),
arch/powerpc/include/asm/book3s/64/pgalloc.h +0 -2
@@ -19,9 +19,7 @@ extern struct vmemmap_backing *vmemmap_list;extern pmd_t *pmd_fragment_alloc (struct mm_struct *,unsigned long );extern void pmd_fragment_free (unsigned long *);extern void pgtable_free_tlb (struct mmu_gather *tlb,void *table,int shift); -#ifdef CONFIG_SMP extern void __tlb_remove_table (void *_table); -#endif void pte_frag_destroy (void *pte_frag);static inline pgd_t *radix__pgd_alloc (struct mm_struct *mm)
arch/powerpc/include/asm/futex.h +6 -4
@@ -35,7 +35,7 @@ static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, {int oldval =0 , ret; -allow_write_to_user (uaddr,sizeof (*uaddr)); +allow_read_write_user (uaddr, uaddr,sizeof (*uaddr));pagefault_disable ();switch (op) {
@@ -62,7 +62,7 @@ static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, *oval = oldval; -prevent_write_to_user (uaddr,sizeof (*uaddr)); +prevent_read_write_user (uaddr, uaddr,sizeof (*uaddr));return ret; }
@@ -76,7 +76,8 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,if (!access_ok (uaddr,sizeof (u32)))return -EFAULT ; -allow_write_to_user (uaddr,sizeof (*uaddr)); +allow_read_write_user (uaddr, uaddr,sizeof (*uaddr)); + __asm__ __volatile__ ( PPC_ATOMIC_ENTRY_BARRIER "1: lwarx %1,0,%3 # futex_atomic_cmpxchg_inatomic\n\
@@ -97,7 +98,8 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, : "cc", "memory"); *uval = prev; -prevent_write_to_user (uaddr,sizeof (*uaddr)); +prevent_read_write_user (uaddr, uaddr,sizeof (*uaddr)); +return ret; }
arch/powerpc/include/asm/kup.h +28 -8
@@ -2,6 +2,10 @@#ifndef _ASM_POWERPC_KUP_H_#define _ASM_POWERPC_KUP_H_ +#define KUAP_READ 1 +#define KUAP_WRITE 2 +#define KUAP_READ_WRITE (KUAP_READ | KUAP_WRITE) +#ifdef CONFIG_PPC64 #include <asm/book3s/64/kup-radix.h> #endif
@@ -42,32 +46,48 @@ void setup_kuap(bool disabled);#else static inline void setup_kuap (bool disabled) { }static inline void allow_user_access (void __user *to,const void __user *from, -unsigned long size) { } +unsigned long size,unsigned long dir) { }static inline void prevent_user_access (void __user *to,const void __user *from, -unsigned long size) { } -static inline bool bad_kuap_fault (struct pt_regs *regs,bool is_write) {return false; } +unsigned long size,unsigned long dir) { } +static inline bool +bad_kuap_fault (struct pt_regs *regs,unsigned long address,bool is_write) +{ +return false; +}#endif /* CONFIG_PPC_KUAP */ static inline void allow_read_from_user (const void __user *from,unsigned long size) { -allow_user_access (NULL , from, size); +allow_user_access (NULL , from, size,KUAP_READ ); }static inline void allow_write_to_user (void __user *to,unsigned long size) { -allow_user_access (to,NULL , size); +allow_user_access (to,NULL , size,KUAP_WRITE ); +} + +static inline void allow_read_write_user (void __user *to,const void __user *from, +unsigned long size) +{ +allow_user_access (to, from, size,KUAP_READ_WRITE ); }static inline void prevent_read_from_user (const void __user *from,unsigned long size) { -prevent_user_access (NULL , from, size); +prevent_user_access (NULL , from, size,KUAP_READ ); }static inline void prevent_write_to_user (void __user *to,unsigned long size) { -prevent_user_access (to,NULL , size); +prevent_user_access (to,NULL , size,KUAP_WRITE ); +} + +static inline void prevent_read_write_user (void __user *to,const void __user *from, +unsigned long size) +{ +prevent_user_access (to, from, size,KUAP_READ_WRITE ); }#endif /* !__ASSEMBLY__ */ -#endif /* _ASM_POWERPC_KUP_H_ */ +#endif /* _ASM_POWERPC_KUAP_H_ */
arch/powerpc/include/asm/nohash/32/kup-8xx.h +4 -3
@@ -34,18 +34,19 @@#include <asm/reg.h> static inline void allow_user_access (void __user *to,const void __user *from, -unsigned long size) +unsigned long size,unsigned long dir) {mtspr (SPRN_MD_AP ,MD_APG_INIT ); }static inline void prevent_user_access (void __user *to,const void __user *from, -unsigned long size) +unsigned long size,unsigned long dir) {mtspr (SPRN_MD_AP ,MD_APG_KUAP ); } -static inline bool bad_kuap_fault (struct pt_regs *regs,bool is_write) +static inline bool +bad_kuap_fault (struct pt_regs *regs,unsigned long address,bool is_write) {return WARN (!((regs->kuap ^MD_APG_KUAP ) &0xf0000000 ),"Bug: fault blocked by AP register !" );
arch/powerpc/include/asm/nohash/pgalloc.h +0 -8
@@ -46,7 +46,6 @@ static inline void pgtable_free(void *table, int shift)#define get_hugepd_cache_index (x) (x) -#ifdef CONFIG_SMP static inline void pgtable_free_tlb (struct mmu_gather *tlb,void *table,int shift) {unsigned long pgf = (unsigned long )table;
@@ -64,13 +63,6 @@ static inline void __tlb_remove_table(void *_table)pgtable_free (table, shift); } -#else -static inline void pgtable_free_tlb (struct mmu_gather *tlb,void *table,int shift) -{ -pgtable_free (table, shift); -} -#endif -static inline void __pte_free_tlb (struct mmu_gather *tlb,pgtable_t table,unsigned long address) {
arch/powerpc/include/asm/tlb.h +11 -0
@@ -26,6 +26,17 @@#define tlb_flush tlb_flushextern void tlb_flush (struct mmu_gather *tlb); +/* +* book3s: +* Hash does not use the linux page-tables, so we can avoid +* the TLB invalidate for page-table freeing, Radix otoh does use the +* page-tables and needs the TLBI. +* +* nohash: +* We still do TLB invalidate in the __pte_free_tlb routine before we +* add the page table pages to mmu gather table batch. +*/ +#define tlb_needs_table_invalidate () radix_enabled()/* Get the generic bits... */ #include <asm-generic/tlb.h>
arch/powerpc/include/asm/uaccess.h +2 -2
@@ -313,9 +313,9 @@ raw_copy_in_user(void __user *to, const void __user *from, unsigned long n)unsigned long ret;barrier_nospec (); -allow_user_access (to, from, n); +allow_read_write_user (to, from, n); ret =__copy_tofrom_user (to, from, n); -prevent_user_access (to, from, n); +prevent_read_write_user (to, from, n); return ret; }#endif /* __powerpc64__ */
arch/powerpc/kernel/entry_32.S +2 -1
@@ -179,7 +179,7 @@ transfer_to_handler: 2: /* if from kernel, check interrupted DOZE/NAP mode and * check for stack overflow */ - kuap_save_and_lock r11, r12, r9, r2, r0 + kuap_save_and_lock r11, r12, r9, r2, r6 addi r2, r12, -THREAD lwz r9,KSP_LIMIT(r12) cmplw r1,r9 /* if r1 <= ksp_limit */
@@ -284,6 +284,7 @@ reenable_mmu: rlwinm r9,r9,0,~MSR_EE lwz r12,_LINK(r11) /* and return to address in LR */ kuap_restore r11, r2, r3, r4, r5 + lwz r2, GPR2(r11) b fast_exception_return #endif
arch/powerpc/kvm/book3s_hv.c +3 -1
@@ -2354,7 +2354,7 @@ static struct kvm_vcpu *kvmppc_core_vcpu_create_hv(struct kvm *kvm,mutex_unlock (&kvm->lock);if (!vcore) - goto free_vcpu; + goto uninit_vcpu;spin_lock (&vcore->lock); ++vcore->num_threads;
@@ -2371,6 +2371,8 @@ static struct kvm_vcpu *kvmppc_core_vcpu_create_hv(struct kvm *kvm,return vcpu; +uninit_vcpu: +kvm_vcpu_uninit (vcpu); free_vcpu:kmem_cache_free (kvm_vcpu_cache, vcpu); out:
arch/powerpc/kvm/book3s_pr.c +3 -1
@@ -1769,10 +1769,12 @@ static struct kvm_vcpu *kvmppc_core_vcpu_create_pr(struct kvm *kvm, err =kvmppc_mmu_init (vcpu);if (err <0 ) - goto uninit_vcpu; + goto free_shared_page;return vcpu; +free_shared_page: +free_page ((unsigned long )vcpu->arch.shared); uninit_vcpu:kvm_vcpu_uninit (vcpu); free_shadow_vcpu:
arch/powerpc/kvm/book3s_xive_native.c +1 -1
@@ -638,7 +638,7 @@ static int kvmppc_xive_native_set_queue_config(struct kvmppc_xive *xive, srcu_idx =srcu_read_lock (&kvm->srcu); gfn =gpa_to_gfn (kvm_eq.qaddr); - page_size =kvm_host_page_size (kvm, gfn); + page_size =kvm_host_page_size (vcpu, gfn);if (1ull << kvm_eq.qshift > page_size) {srcu_read_unlock (&kvm->srcu, srcu_idx);pr_warn ("Incompatible host page size %lx!\n" , page_size);
arch/powerpc/mm/book3s64/pgtable.c +0 -7
@@ -378,7 +378,6 @@ static inline void pgtable_free(void *table, int index) } } -#ifdef CONFIG_SMP void pgtable_free_tlb (struct mmu_gather *tlb,void *table,int index) {unsigned long pgf = (unsigned long )table;
@@ -395,12 +394,6 @@ void __tlb_remove_table(void *_table)return pgtable_free (table, index); } -#else -void pgtable_free_tlb (struct mmu_gather *tlb,void *table,int index) -{ -return pgtable_free (table, index); -} -#endif #ifdef CONFIG_PROC_FS atomic_long_t direct_pages_count[MMU_PAGE_COUNT ];
arch/powerpc/mm/fault.c +1 -1
@@ -233,7 +233,7 @@ static bool bad_kernel_fault(struct pt_regs *regs, unsigned long error_code,// Read/write fault in a valid region (the exception table search passed // above), but blocked by KUAP is bad, it can never succeed. -if (bad_kuap_fault (regs, is_write)) +if (bad_kuap_fault (regs, address, is_write))return true;// What's left? Kernel fault on user in well defined regions (extable
arch/powerpc/mm/ptdump/ptdump.c +3 -1
@@ -173,10 +173,12 @@ static void dump_addr(struct pg_state *st, unsigned long addr)static void note_prot_wx (struct pg_state *st,unsigned long addr) { +pte_t pte =__pte (st->current_flags); +if (!IS_ENABLED (CONFIG_PPC_DEBUG_WX ) || !st->check_wx)return ; -if (!((st->current_flags &pgprot_val (PAGE_KERNEL_X )) ==pgprot_val (PAGE_KERNEL_X ))) +if (!pte_write (pte) || !pte_exec (pte))return ; WARN_ONCE(1, "powerpc/mm: Found insecure W+X mapping at address %p/%pS\n",
arch/powerpc/platforms/pseries/hotplug-memory.c +3 -1
@@ -360,8 +360,10 @@ static bool lmb_is_removable(struct drmem_lmb *lmb)for (i =0 ; i < scns_per_block; i++) { pfn =PFN_DOWN (phys_addr); -if (!pfn_present (pfn)) +if (!pfn_present (pfn)) { + phys_addr +=MIN_MEMORY_BLOCK_SIZE ;continue ; + } rc &=is_mem_section_removable (pfn,PAGES_PER_SECTION ); phys_addr +=MIN_MEMORY_BLOCK_SIZE ;
arch/powerpc/xmon/xmon.c +4 -5
@@ -1894,15 +1894,14 @@ static void dump_300_sprs(void)printf ("pidr = %.16lx tidr = %.16lx\n" ,mfspr (SPRN_PID ),mfspr (SPRN_TIDR )); -printf ("asdr = %.16lx psscr = %.16lx\n" , -mfspr (SPRN_ASDR ), hv ?mfspr (SPRN_PSSCR ) - :mfspr (SPRN_PSSCR_PR )); +printf ("psscr = %.16lx\n" , + hv ?mfspr (SPRN_PSSCR ) :mfspr (SPRN_PSSCR_PR ));if (!hv)return ; -printf ("ptcr = %.16lx\n" , -mfspr (SPRN_PTCR )); +printf ("ptcr = %.16lx asdr = %.16lx\n" , +mfspr (SPRN_PTCR ),mfspr (SPRN_ASDR ));#endif }
arch/riscv/net/bpf_jit_comp.c +11 -2
@@ -120,6 +120,11 @@ static bool seen_reg(int reg, struct rv_jit_context *ctx)return false; } +static void mark_fp (struct rv_jit_context *ctx) +{ +__set_bit (RV_CTX_F_SEEN_S5 , &ctx->flags); +} +static void mark_call (struct rv_jit_context *ctx) {__set_bit (RV_CTX_F_SEEN_CALL , &ctx->flags);
@@ -596,7 +601,8 @@ static void __build_epilogue(u8 reg, struct rv_jit_context *ctx)emit (rv_addi (RV_REG_SP ,RV_REG_SP , stack_adjust), ctx);/* Set return value. */ -emit (rv_addi (RV_REG_A0 ,RV_REG_A5 ,0 ), ctx); +if (reg ==RV_REG_RA ) +emit (rv_addi (RV_REG_A0 ,RV_REG_A5 ,0 ), ctx);emit (rv_jalr (RV_REG_ZERO , reg,0 ), ctx); }
@@ -1426,6 +1432,10 @@ static void build_prologue(struct rv_jit_context *ctx) {int stack_adjust =0 , store_offset, bpf_stack_adjust; + bpf_stack_adjust =round_up (ctx->prog->aux->stack_depth,16 ); +if (bpf_stack_adjust) +mark_fp (ctx); +if (seen_reg (RV_REG_RA , ctx)) stack_adjust +=8 ; stack_adjust +=8 ;/* RV_REG_FP */
@@ -1443,7 +1453,6 @@ static void build_prologue(struct rv_jit_context *ctx) stack_adjust +=8 ; stack_adjust =round_up (stack_adjust,16 ); - bpf_stack_adjust =round_up (ctx->prog->aux->stack_depth,16 ); stack_adjust += bpf_stack_adjust; store_offset = stack_adjust -8 ;
arch/s390/include/asm/page.h +2 -0
@@ -33,6 +33,8 @@#define ARCH_HAS_PREPARE_HUGEPAGE #define ARCH_HAS_HUGEPAGE_CLEAR_FLUSH +#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA +#include <asm/setup.h> #ifndef __ASSEMBLY__
arch/s390/kvm/kvm-s390.c +2 -4
@@ -2863,9 +2863,7 @@ static void kvm_s390_vcpu_initial_reset(struct kvm_vcpu *vcpu) vcpu->arch.sie_block->gcr[14 ] =CR14_UNUSED_32 |CR14_UNUSED_33 |CR14_EXTERNAL_DAMAGE_SUBMASK ; -/* make sure the new fpc will be lazily loaded */ -save_fpu_regs (); - current->thread.fpu.fpc =0 ; + vcpu->run->s.regs.fpc =0 ; vcpu->arch.sie_block->gbea =1 ; vcpu->arch.sie_block->pp =0 ; vcpu->arch.sie_block->fpf &= ~FPF_BPBC ;
@@ -4354,7 +4352,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,switch (ioctl) {case KVM_S390_STORE_STATUS : idx =srcu_read_lock (&vcpu->kvm->srcu); - r =kvm_s390_vcpu_store_status (vcpu, arg); + r =kvm_s390_store_status_unloaded (vcpu, arg);srcu_read_unlock (&vcpu->kvm->srcu, idx);break ;case KVM_S390_SET_INITIAL_PSW : {
arch/s390/mm/hugetlbpage.c +99 -1
115 lines not on this page · raw message
arch/sparc/Kconfig +0 -1
@@ -65,7 +65,6 @@ config SPARC64 select HAVE_KRETPROBES select HAVE_KPROBES select HAVE_RCU_TABLE_FREE if SMP - select HAVE_RCU_TABLE_NO_INVALIDATE if HAVE_RCU_TABLE_FREE select HAVE_MEMBLOCK_NODE_MAP select HAVE_ARCH_TRANSPARENT_HUGEPAGE select HAVE_DYNAMIC_FTRACE
arch/sparc/include/asm/tlb_64.h +9 -0
@@ -28,6 +28,15 @@ void flush_tlb_pending(void);#define __tlb_remove_tlb_entry (tlb, ptep, address) do { } while (0)#define tlb_flush (tlb) flush_tlb_pending() +/* +* SPARC64's hardware TLB fill does not use the Linux page-tables +* and therefore we don't need a TLBI when freeing page-table pages. +*/ + +#ifdef CONFIG_HAVE_RCU_TABLE_FREE +#define tlb_needs_table_invalidate () (false) +#endif +#include <asm-generic/tlb.h> #endif /* _SPARC64_TLB_H */
arch/sparc/include/uapi/asm/ipcbuf.h +11 -11
@@ -15,19 +15,19 @@struct ipc64_perm { -__kernel_key_t key; -__kernel_uid_t uid; -__kernel_gid_t gid; -__kernel_uid_t cuid; -__kernel_gid_t cgid; +__kernel_key_t key; +__kernel_uid32_t uid; +__kernel_gid32_t gid; +__kernel_uid32_t cuid; +__kernel_gid32_t cgid;#ifndef __arch64__ -unsigned short __pad0; +unsigned short __pad0;#endif -__kernel_mode_t mode; -unsigned short __pad1; -unsigned short seq; -unsigned long long __unused1; -unsigned long long __unused2; +__kernel_mode_t mode; +unsigned short __pad1; +unsigned short seq; +unsigned long long __unused1; +unsigned long long __unused2; };#endif /* __SPARC_IPCBUF_H */
arch/x86/include/asm/apic.h +10 -0
@@ -140,6 +140,7 @@ extern void apic_soft_disable(void);extern void lapic_shutdown (void );extern void sync_Arb_IDs (void );extern void init_bsp_APIC (void ); +extern void apic_intr_mode_select (void );extern void apic_intr_mode_init (void );extern void init_apic_mappings (void );void register_lapic_address (unsigned long address);
@@ -188,6 +189,7 @@ static inline void disable_local_APIC(void) { }# define setup_secondary_APIC_clock x86_init_noopstatic inline void lapic_update_tsc_freq (void ) { }static inline void init_bsp_APIC (void ) { } +static inline void apic_intr_mode_select (void ) { }static inline void apic_intr_mode_init (void ) { }static inline void lapic_assign_system_vectors (void ) { }static inline void lapic_assign_legacy_vector (unsigned int i,bool r) { }
@@ -452,6 +454,14 @@ static inline void ack_APIC_irq(void)apic_eoi (); } + +static inline bool lapic_vector_set_in_irr (unsigned int vector) +{ +u32 irr =apic_read (APIC_IRR + (vector /32 *0x10 )); + +return !!(irr & (1U << (vector %32 ))); +} +static inline unsigned default_get_apic_id (unsigned long x) {unsigned int ver =GET_APIC_VERSION (apic_read (APIC_LVR ));
arch/x86/include/asm/kvm_host.h +7 -6
@@ -380,12 +380,12 @@ struct kvm_mmu {void (*set_cr3)(struct kvm_vcpu *vcpu,unsigned long root);unsigned long (*get_cr3)(struct kvm_vcpu *vcpu);u64 (*get_pdptr)(struct kvm_vcpu *vcpu,int index); -int (*page_fault)(struct kvm_vcpu *vcpu,gva_t gva,u32 err, +int (*page_fault)(struct kvm_vcpu *vcpu,gpa_t cr2_or_gpa,u32 err,bool prefault);void (*inject_page_fault)(struct kvm_vcpu *vcpu,struct x86_exception *fault); -gpa_t (*gva_to_gpa)(struct kvm_vcpu *vcpu,gva_t gva,u32 access, -struct x86_exception *exception); +gpa_t (*gva_to_gpa)(struct kvm_vcpu *vcpu,gpa_t gva_or_gpa, +u32 access,struct x86_exception *exception);gpa_t (*translate_gpa)(struct kvm_vcpu *vcpu,gpa_t gpa,u32 access,struct x86_exception *exception); int (*sync_page)(struct kvm_vcpu *vcpu,
@@ -667,10 +667,10 @@ struct kvm_vcpu_arch {bool pvclock_set_guest_stopped_request;struct { +u8 preempted;u64 msr_val;u64 last_steal; -struct gfn_to_hva_cache stime; -struct kvm_steal_time steal; +struct gfn_to_pfn_cache cache; } st;u64 tsc_offset;
@@ -1128,6 +1128,7 @@ struct kvm_x86_ops {bool (*xsaves_supported)(void );bool (*umip_emulated)(void );bool (*pt_supported)(void ); +bool (*pku_supported)(void );int (*check_nested_events)(struct kvm_vcpu *vcpu,bool external_intr);void (*request_immediate_exit)(struct kvm_vcpu *vcpu);
@@ -1450,7 +1451,7 @@ void kvm_vcpu_deactivate_apicv(struct kvm_vcpu *vcpu);int kvm_emulate_hypercall (struct kvm_vcpu *vcpu); -int kvm_mmu_page_fault (struct kvm_vcpu *vcpu,gva_t gva,u64 error_code, +int kvm_mmu_page_fault (struct kvm_vcpu *vcpu,gpa_t cr2_or_gpa,u64 error_code,void *insn,int insn_len);void kvm_mmu_invlpg (struct kvm_vcpu *vcpu,gva_t gva);void kvm_mmu_invpcid_gva (struct kvm_vcpu *vcpu,gva_t gva,unsigned long pcid);
arch/x86/include/asm/x86_init.h +2 -0
@@ -51,12 +51,14 @@ struct x86_init_resources {* are set up. * @intr_init: interrupt init code * @trap_init: platform specific trap setup +* @intr_mode_select: interrupt delivery mode selection * @intr_mode_init: interrupt delivery mode setup */ struct x86_init_irqs {void (*pre_vector_init)(void );void (*intr_init)(void );void (*trap_init)(void ); +void (*intr_mode_select)(void );void (*intr_mode_init)(void ); };
arch/x86/kernel/apic/apic.c +18 -5
@@ -830,8 +830,17 @@ bool __init apic_needs_pit(void)if (!tsc_khz || !cpu_khz)return true; -/* Is there an APIC at all? */ -if (!boot_cpu_has (X86_FEATURE_APIC )) +/* Is there an APIC at all or is it disabled? */ +if (!boot_cpu_has (X86_FEATURE_APIC ) || disable_apic) +return true; + +/* +* If interrupt delivery mode is legacy PIC or virtual wire without +* configuration, the local APIC timer wont be set up. Make sure +* that the PIT is initialized. +*/ +if (apic_intr_mode ==APIC_PIC || + apic_intr_mode ==APIC_VIRTUAL_WIRE_NO_CONFIG )return true;/* Virt guests may lack ARAT, but still have DEADLINE */
@@ -1322,7 +1331,7 @@ void __init sync_Arb_IDs(void)enum apic_intr_mode_id apic_intr_mode__ro_after_init ; -static int __init apic_intr_mode_select (void ) +static int __init __apic_intr_mode_select (void ) {/* Check kernel option */ if (disable_apic) {
@@ -1384,6 +1393,12 @@ static int __init apic_intr_mode_select(void)return APIC_SYMMETRIC_IO ; } +/* Select the interrupt delivery mode for the BSP */ +void __init apic_intr_mode_select (void ) +{ + apic_intr_mode =__apic_intr_mode_select (); +} +/* * An initial setup of the virtual wire mode. */
@@ -1440,8 +1455,6 @@ void __init apic_intr_mode_init(void) {bool upmode =IS_ENABLED (CONFIG_UP_LATE_INIT ); - apic_intr_mode =apic_intr_mode_select (); -switch (apic_intr_mode) {case APIC_PIC :pr_info ("APIC: Keep in PIC mode(8259)\n" );
arch/x86/kernel/apic/msi.c +125 -3
153 lines not on this page · raw message
arch/x86/kernel/cpu/tsx.c +7 -6
@@ -115,11 +115,12 @@ void __init tsx_init(void)tsx_disable ();/* -* tsx_disable() will change the state of the -* RTM CPUID bit. Clear it here since it is now -* expected to be not set. +* tsx_disable() will change the state of the RTM and HLE CPUID +* bits. Clear them here since they are now expected to be not +* set. */ setup_clear_cpu_cap (X86_FEATURE_RTM ); +setup_clear_cpu_cap (X86_FEATURE_HLE ); }else if (tsx_ctrl_state ==TSX_CTRL_ENABLE ) {/*
@@ -131,10 +132,10 @@ void __init tsx_init(void)tsx_enable ();/* -* tsx_enable() will change the state of the -* RTM CPUID bit. Force it here since it is now -* expected to be set. +* tsx_enable() will change the state of the RTM and HLE CPUID +* bits. Force them here since they are now expected to be set. */ setup_force_cpu_cap (X86_FEATURE_RTM ); +setup_force_cpu_cap (X86_FEATURE_HLE ); } }
arch/x86/kernel/time.c +10 -2
@@ -91,10 +91,18 @@ void __init hpet_time_init(void)static __init void x86_late_time_init (void ) { +/* +* Before PIT/HPET init, select the interrupt mode. This is required +* to make the decision whether PIT should be initialized correct. +*/ + x86_init.irqs.intr_mode_select (); + +/* Setup the legacy timers */ x86_init.timers.timer_init (); +/* -* After PIT/HPET timers init, select and setup -* the final interrupt mode for delivering IRQs. +* After PIT/HPET timers init, set up the final interrupt mode for +* delivering IRQs. */ x86_init.irqs.intr_mode_init ();tsc_init ();
arch/x86/kernel/x86_init.c +1 -0
@@ -58,6 +58,7 @@ struct x86_init_ops x86_init __initdata = { .pre_vector_init = init_ISA_irqs, .intr_init = native_init_IRQ, .trap_init = x86_init_noop, + .intr_mode_select = apic_intr_mode_select, .intr_mode_init = apic_intr_mode_init },
arch/x86/kvm/cpuid.c +3 -1
@@ -352,6 +352,7 @@ static inline void do_cpuid_7_mask(struct kvm_cpuid_entry2 *entry, int index)unsigned f_umip = kvm_x86_ops->umip_emulated () ?F (UMIP ) :0 ;unsigned f_intel_pt = kvm_x86_ops->pt_supported () ?F (INTEL_PT ) :0 ;unsigned f_la57; +unsigned f_pku = kvm_x86_ops->pku_supported () ?F (PKU ) :0 ;/* cpuid 7.0.ebx */ const u32 kvm_cpuid_7_0_ebx_x86_features =
@@ -363,7 +364,7 @@ static inline void do_cpuid_7_mask(struct kvm_cpuid_entry2 *entry, int index)/* cpuid 7.0.ecx*/ const u32 kvm_cpuid_7_0_ecx_x86_features = -F (AVX512VBMI ) |F (LA57 ) |F (PKU ) |0 /*OSPKE*/ |F (RDPID ) | +F (AVX512VBMI ) |F (LA57 ) |0 /*PKU*/ |0 /*OSPKE*/ |F (RDPID ) |F (AVX512_VPOPCNTDQ ) |F (UMIP ) |F (AVX512_VBMI2 ) |F (GFNI ) |F (VAES ) |F (VPCLMULQDQ ) |F (AVX512_VNNI ) |F (AVX512_BITALG ) |F (CLDEMOTE ) |F (MOVDIRI ) |F (MOVDIR64B ) |0 /*WAITPKG*/ ;
@@ -392,6 +393,7 @@ static inline void do_cpuid_7_mask(struct kvm_cpuid_entry2 *entry, int index)/* Set LA57 based on hardware capability. */ entry->ecx |= f_la57; entry->ecx |= f_umip; + entry->ecx |= f_pku;/* PKU is not yet implemented for shadow paging. */ if (!tdp_enabled || !boot_cpu_has (X86_FEATURE_OSPKE )) entry->ecx &= ~F (PKU );
arch/x86/kvm/emulate.c +61 -5
186 lines not on this page · raw message
arch/x86/kvm/hyperv.c +6 -4
@@ -809,11 +809,12 @@ static int kvm_hv_msr_get_crash_data(struct kvm_vcpu *vcpu, u32 index, u64 *pdata) { struct kvm_hv *hv = &vcpu->kvm->arch.hyperv; +size_t size =ARRAY_SIZE (hv->hv_crash_param); -if (WARN_ON_ONCE (index >=ARRAY_SIZE (hv->hv_crash_param))) +if (WARN_ON_ONCE (index >= size))return -EINVAL ; - *pdata = hv->hv_crash_param[index]; + *pdata = hv->hv_crash_param[array_index_nospec (index, size)];return 0 ; }
@@ -852,11 +853,12 @@ static int kvm_hv_msr_set_crash_data(struct kvm_vcpu *vcpu, u32 index, u64 data) {struct kvm_hv *hv = &vcpu->kvm->arch.hyperv; +size_t size =ARRAY_SIZE (hv->hv_crash_param); -if (WARN_ON_ONCE (index >=ARRAY_SIZE (hv->hv_crash_param))) +if (WARN_ON_ONCE (index >= size))return -EINVAL ; - hv->hv_crash_param[index] = data; + hv->hv_crash_param[array_index_nospec (index, size)] = data;return 0 ; }
arch/x86/kvm/i8259.c +5 -1
@@ -460,10 +460,14 @@ static int picdev_write(struct kvm_pic *s,switch (addr) {case 0x20 :case 0x21 : +pic_lock (s); +pic_ioport_write (&s->pics[0 ], addr, data); +pic_unlock (s); +break ;case 0xa0 :case 0xa1 :pic_lock (s); -pic_ioport_write (&s->pics[addr >>7 ], addr, data); +pic_ioport_write (&s->pics[1 ], addr, data);pic_unlock (s);break ;case 0x4d0 :
arch/x86/kvm/ioapic.c +9 -6
@@ -36,6 +36,7 @@#include <linux/io.h> #include <linux/slab.h> #include <linux/export.h> +#include <linux/nospec.h> #include <asm/processor.h> #include <asm/page.h> #include <asm/current.h>
@@ -68,13 +69,14 @@ static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic,default : {u32 redir_index = (ioapic->ioregsel -0x10 ) >>1 ; -u64 redir_content; +u64 redir_content = ~0ULL ; -if (redir_index <IOAPIC_NUM_PINS ) - redir_content = - ioapic->redirtbl[redir_index].bits; -else - redir_content = ~0ULL ; +if (redir_index <IOAPIC_NUM_PINS ) { +u32 index =array_index_nospec ( + redir_index,IOAPIC_NUM_PINS ); + + redir_content = ioapic->redirtbl[index].bits; + } result = (ioapic->ioregsel &0x1 ) ? (redir_content >> 32) & 0xffffffff :
@@ -291,6 +293,7 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val)if (index >=IOAPIC_NUM_PINS )return ; + index =array_index_nospec (index,IOAPIC_NUM_PINS ); e = &ioapic->redirtbl[index]; mask_before = e->fields.mask;/* Preserve read-only fields */
arch/x86/kvm/lapic.c +9 -4
@@ -1926,15 +1926,20 @@ int kvm_lapic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)case APIC_LVTTHMR :case APIC_LVTPC :case APIC_LVT1 : -case APIC_LVTERR : +case APIC_LVTERR : {/* TODO: Check vector */ +size_t size; +u32 index; +if (!kvm_apic_sw_enabled (apic)) val |=APIC_LVT_MASKED ; - - val &= apic_lvt_mask[(reg -APIC_LVTT ) >>4 ]; + size =ARRAY_SIZE (apic_lvt_mask); + index =array_index_nospec ( + (reg -APIC_LVTT ) >>4 , size); + val &= apic_lvt_mask[index];kvm_lapic_set_reg (apic, reg, val); -break ; + }case APIC_LVTT :if (!kvm_apic_sw_enabled (apic))
arch/x86/kvm/mmu.c +61 -46
307 lines not on this page · raw message
arch/x86/kvm/mmutrace.h +6 -6
@@ -249,13 +249,13 @@ TRACE_EVENT( TRACE_EVENT( fast_page_fault, - TP_PROTO(struct kvm_vcpu *vcpu, gva_t gva, u32 error_code, + TP_PROTO(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa, u32 error_code, u64 *sptep, u64 old_spte, bool retry), - TP_ARGS(vcpu, gva, error_code, sptep, old_spte, retry), + TP_ARGS(vcpu, cr2_or_gpa, error_code, sptep, old_spte, retry), TP_STRUCT__entry( __field(int, vcpu_id) - __field(gva_t, gva) + __field(gpa_t, cr2_or_gpa) __field(u32, error_code) __field(u64 *, sptep) __field(u64, old_spte)
@@ -265,7 +265,7 @@ TRACE_EVENT(TP_fast_assign ( __entry->vcpu_id = vcpu->vcpu_id; - __entry->gva = gva; + __entry->cr2_or_gpa = cr2_or_gpa; __entry->error_code = error_code; __entry->sptep = sptep; __entry->old_spte = old_spte;
@@ -273,9 +273,9 @@ TRACE_EVENT( __entry->retry = retry; ), -TP_printk ("vcpu %d gva %lx error_code %s sptep %p old %#llx" +TP_printk ("vcpu %d gva %llx error_code %s sptep %p old %#llx" " new %llx spurious %d fixed %d" , __entry->vcpu_id, - __entry->gva,__print_flags (__entry->error_code,"|" , + __entry->cr2_or_gpa,__print_flags (__entry->error_code,"|" , kvm_mmu_trace_pferr_flags), __entry->sptep, __entry->old_spte, __entry->new_spte, __spte_satisfied(old_spte), __spte_satisfied(new_spte)
arch/x86/kvm/mtrr.c +6 -2
@@ -192,11 +192,15 @@ static bool fixed_msr_to_seg_unit(u32 msr, int *seg, int *unit)break ; case MSR_MTRRfix16K_80000 ... MSR_MTRRfix16K_A0000: *seg =1 ; - *unit = msr - MSR_MTRRfix16K_80000; + *unit =array_index_nospec ( + msr - MSR_MTRRfix16K_80000, + MSR_MTRRfix16K_A0000 - MSR_MTRRfix16K_80000 +1 );break ; case MSR_MTRRfix4K_C0000 ... MSR_MTRRfix4K_F8000: *seg =2 ; - *unit = msr - MSR_MTRRfix4K_C0000; + *unit =array_index_nospec ( + msr - MSR_MTRRfix4K_C0000, + MSR_MTRRfix4K_F8000 - MSR_MTRRfix4K_C0000 +1 );break ;default :return false;
arch/x86/kvm/paging_tmpl.h +16 -9
@@ -291,11 +291,11 @@ static inline unsigned FNAME(gpte_pkeys)(struct kvm_vcpu *vcpu, u64 gpte) }/* -* Fetch a guest pte for a guest virtual address +* Fetch a guest pte for a guest virtual address, or for an L2's GPA. */ static int FNAME (walk_addr_generic )(struct guest_walker *walker,struct kvm_vcpu *vcpu,struct kvm_mmu *mmu, -gva_t addr,u32 access) +gpa_t addr,u32 access) {int ret;pt_element_t pte;
@@ -496,7 +496,7 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker, }static int FNAME (walk_addr )(struct guest_walker *walker, -struct kvm_vcpu *vcpu,gva_t addr,u32 access) +struct kvm_vcpu *vcpu,gpa_t addr,u32 access) {return FNAME (walk_addr_generic)(walker, vcpu, vcpu->arch.mmu, addr, access);
@@ -611,7 +611,7 @@ static void FNAME(pte_prefetch)(struct kvm_vcpu *vcpu, struct guest_walker *gw,* If the guest tries to write a write-protected page, we need to * emulate this operation, return 1 to indicate this case. */ -static int FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr, +static int FNAME(fetch)(struct kvm_vcpu *vcpu, gpa_t addr, struct guest_walker *gw, int write_fault, int hlevel, kvm_pfn_t pfn, bool map_writable, bool prefault,
@@ -765,7 +765,7 @@ FNAME(is_self_change_mapping)(struct kvm_vcpu *vcpu,* Returns: 1 if we need to emulate the instruction, 0 otherwise, or * a negative value on error. */ -static int FNAME (page_fault )(struct kvm_vcpu *vcpu,gva_t addr,u32 error_code, +static int FNAME (page_fault )(struct kvm_vcpu *vcpu,gpa_t addr,u32 error_code,bool prefault) {int write_fault = error_code &PFERR_WRITE_MASK ;
@@ -945,18 +945,19 @@ static void FNAME(invlpg)(struct kvm_vcpu *vcpu, gva_t gva, hpa_t root_hpa)spin_unlock (&vcpu->kvm->mmu_lock); } -static gpa_t FNAME (gva_to_gpa )(struct kvm_vcpu *vcpu,gva_t vaddr,u32 access, +/* Note, @addr is a GPA when gva_to_gpa() translates an L2 GPA to an L1 GPA. */ +static gpa_t FNAME (gva_to_gpa )(struct kvm_vcpu *vcpu,gpa_t addr,u32 access,struct x86_exception *exception) {struct guest_walker walker;gpa_t gpa =UNMAPPED_GVA ;int r; - r =FNAME (walk_addr)(&walker, vcpu, vaddr, access); + r =FNAME (walk_addr)(&walker, vcpu, addr, access);if (r) { gpa =gfn_to_gpa (walker.gfn); - gpa |= vaddr & ~PAGE_MASK ; + gpa |= addr & ~PAGE_MASK ; }else if (exception) *exception = walker.fault;
@@ -964,7 +965,8 @@ static gpa_t FNAME(gva_to_gpa)(struct kvm_vcpu *vcpu, gva_t vaddr, u32 access, }#if PTTYPE !=PTTYPE_EPT -static gpa_t FNAME (gva_to_gpa_nested )(struct kvm_vcpu *vcpu,gva_t vaddr, +/* Note, gva_to_gpa_nested() is only used to translate L2 GVAs. */ +static gpa_t FNAME (gva_to_gpa_nested )(struct kvm_vcpu *vcpu,gpa_t vaddr,u32 access,struct x86_exception *exception) {
@@ -972,6 +974,11 @@ static gpa_t FNAME(gva_to_gpa_nested)(struct kvm_vcpu *vcpu, gva_t vaddr,gpa_t gpa =UNMAPPED_GVA ;int r; +#ifndef CONFIG_X86_64 +/* A 64-bit GVA should be impossible on 32-bit KVM. */ +WARN_ON_ONCE (vaddr >>32 ); +#endif + r =FNAME (walk_addr_nested)(&walker, vcpu, vaddr, access);if (r) {
arch/x86/kvm/pmu.h +14 -4
@@ -2,6 +2,8 @@#ifndef __KVM_X86_PMU_H#define __KVM_X86_PMU_H +#include <linux/nospec.h> +#define vcpu_to_pmu (vcpu) (&(vcpu)->arch.pmu)#define pmu_to_vcpu (pmu) (container_of((pmu), struct kvm_vcpu, arch.pmu))#define pmc_to_pmu (pmc) (&(pmc)->vcpu->arch.pmu)
@@ -86,8 +88,12 @@ static inline bool pmc_is_enabled(struct kvm_pmc *pmc)static inline struct kvm_pmc *get_gp_pmc (struct kvm_pmu *pmu,u32 msr,u32 base) { -if (msr >= base && msr < base + pmu->nr_arch_gp_counters) -return &pmu->gp_counters[msr - base]; +if (msr >= base && msr < base + pmu->nr_arch_gp_counters) { +u32 index =array_index_nospec (msr - base, + pmu->nr_arch_gp_counters); + +return &pmu->gp_counters[index]; + }return NULL ; }
@@ -97,8 +103,12 @@ static inline struct kvm_pmc *get_fixed_pmc(struct kvm_pmu *pmu, u32 msr) {int base =MSR_CORE_PERF_FIXED_CTR0 ; -if (msr >= base && msr < base + pmu->nr_arch_fixed_counters) -return &pmu->fixed_counters[msr - base]; +if (msr >= base && msr < base + pmu->nr_arch_fixed_counters) { +u32 index =array_index_nospec (msr - base, + pmu->nr_arch_fixed_counters); + +return &pmu->fixed_counters[index]; + }return NULL ; }
arch/x86/kvm/svm.c +6 -0
@@ -5986,6 +5986,11 @@ static bool svm_has_wbinvd_exit(void)return true; } +static bool svm_pku_supported (void ) +{ +return false; +} +#define PRE_EX (exit) { .exit_code = (exit), \ .stage = X86_ICPT_PRE_EXCEPT, }#define POST_EX (exit) { .exit_code = (exit), \
@@ -7278,6 +7283,7 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = { .xsaves_supported = svm_xsaves_supported, .umip_emulated = svm_umip_emulated, .pt_supported = svm_pt_supported, + .pku_supported = svm_pku_supported, .set_supported_cpuid = svm_set_supported_cpuid,
arch/x86/kvm/vmx/capabilities.h +5 -0
@@ -145,6 +145,11 @@ static inline bool vmx_umip_emulated(void)SECONDARY_EXEC_DESC ; } +static inline bool vmx_pku_supported (void ) +{ +return boot_cpu_has (X86_FEATURE_PKU ); +} +static inline bool cpu_has_vmx_rdtscp (void ) { return vmcs_config.cpu_based_2nd_exec_ctrl &
arch/x86/kvm/vmx/nested.c +3 -1
@@ -4663,8 +4663,10 @@ static int handle_vmread(struct kvm_vcpu *vcpu) vmx_instruction_info, true, len, &gva))return 1 ;/* _system ok, nested_vmx_check_permission has verified cpl=0 */ -if (kvm_write_guest_virt_system (vcpu, gva, &field_value, len, &e)) +if (kvm_write_guest_virt_system (vcpu, gva, &field_value, len, &e)) {kvm_inject_page_fault (vcpu, &e); +return 1 ; + } }return nested_vmx_succeed (vcpu);
arch/x86/kvm/vmx/pmu_intel.c +16 -8
@@ -84,10 +84,14 @@ static unsigned intel_find_arch_event(struct kvm_pmu *pmu,static unsigned intel_find_fixed_event (int idx) { -if (idx >=ARRAY_SIZE (fixed_pmc_events)) +u32 event; +size_t size =ARRAY_SIZE (fixed_pmc_events); + +if (idx >= size)return PERF_COUNT_HW_MAX ; -return intel_arch_events[fixed_pmc_events[idx]].event_type; + event = fixed_pmc_events[array_index_nospec (idx, size)]; +return intel_arch_events[event].event_type; }/* check if a PMC is enabled by comparing it with globl_ctrl bits. */
@@ -128,16 +132,20 @@ static struct kvm_pmc *intel_msr_idx_to_pmc(struct kvm_vcpu *vcpu,struct kvm_pmu *pmu =vcpu_to_pmu (vcpu);bool fixed = idx & (1u <<30 );struct kvm_pmc *counters; +unsigned int num_counters; idx &= ~(3u <<30 ); -if (!fixed && idx >= pmu->nr_arch_gp_counters) -return NULL ; -if (fixed && idx >= pmu->nr_arch_fixed_counters) +if (fixed) { + counters = pmu->fixed_counters; + num_counters = pmu->nr_arch_fixed_counters; + }else { + counters = pmu->gp_counters; + num_counters = pmu->nr_arch_gp_counters; + } +if (idx >= num_counters)return NULL ; - counters = fixed ? pmu->fixed_counters : pmu->gp_counters; *mask &= pmu->counter_bitmask[fixed ?KVM_PMC_FIXED :KVM_PMC_GP ]; - -return &counters[idx]; +return &counters[array_index_nospec (idx, num_counters)]; }static bool intel_is_valid_msr (struct kvm_vcpu *vcpu,u32 msr)
arch/x86/kvm/vmx/vmx.c +3 -0
@@ -2140,6 +2140,8 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) (index >= 2 * intel_pt_validate_cap(vmx->pt_desc.caps, PT_CAP_num_address_ranges)))return 1 ; +if (is_noncanonical_address (data, vcpu)) +return 1 ;if (index %2 ) vmx->pt_desc.guest.addr_b[index /2 ] = data;else
@@ -7865,6 +7867,7 @@ static struct kvm_x86_ops vmx_x86_ops __ro_after_init = { .xsaves_supported = vmx_xsaves_supported, .umip_emulated = vmx_umip_emulated, .pt_supported = vmx_pt_supported, + .pku_supported = vmx_pku_supported, .request_immediate_exit = vmx_request_immediate_exit,
arch/x86/kvm/x86.c +135 -61
435 lines not on this page · raw message
arch/x86/kvm/x86.h +1 -1
@@ -286,7 +286,7 @@ int kvm_mtrr_get_msr(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata);bool kvm_mtrr_check_gfn_range_consistency (struct kvm_vcpu *vcpu,gfn_t gfn,int page_num);bool kvm_vector_hashing_enabled (void ); -int x86_emulate_instruction (struct kvm_vcpu *vcpu,unsigned long cr2, +int x86_emulate_instruction (struct kvm_vcpu *vcpu,gpa_t cr2_or_gpa,int emulation_type,void *insn,int insn_len);#define KVM_SUPPORTED_XCR0 (XFEATURE_MASK_FP | XFEATURE_MASK_SSE \
arch/x86/xen/enlighten_pv.c +1 -0
@@ -1215,6 +1215,7 @@ asmlinkage __visible void __init xen_start_kernel(void) x86_platform.get_nmi_reason = xen_get_nmi_reason; x86_init.resources.memory_setup = xen_memory_setup; + x86_init.irqs.intr_mode_select = x86_init_noop; x86_init.irqs.intr_mode_init = x86_init_noop; x86_init.oem.arch_setup = xen_arch_setup; x86_init.oem.banner = xen_banner;
crypto/algapi.c +28 -18
83 lines not on this page · raw message
crypto/api.c +4 -3
@@ -97,7 +97,7 @@ static void crypto_larval_destroy(struct crypto_alg *alg)struct crypto_larval *larval = (void *)alg;BUG_ON (!crypto_is_larval (alg)); -if (larval->adult) +if (!IS_ERR_OR_NULL (larval->adult))crypto_mod_put (larval->adult);kfree (larval); }
@@ -178,6 +178,8 @@ static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg) alg =ERR_PTR (-ETIMEDOUT ); else if (!alg) alg =ERR_PTR (-ENOENT ); + else if (IS_ERR(alg)) + ; else if (crypto_is_test_larval(larval) && !(alg->cra_flags & CRYPTO_ALG_TESTED)) alg =ERR_PTR (-EAGAIN );
@@ -344,13 +346,12 @@ static unsigned int crypto_ctxsize(struct crypto_alg *alg, u32 type, u32 mask)return len; } -void crypto_shoot_alg (struct crypto_alg *alg) +static void crypto_shoot_alg (struct crypto_alg *alg) {down_write (&crypto_alg_sem); alg->cra_flags |=CRYPTO_ALG_DYING ;up_write (&crypto_alg_sem); } -EXPORT_SYMBOL_GPL (crypto_shoot_alg);struct crypto_tfm *__crypto_alloc_tfm (struct crypto_alg *alg,u32 type,u32 mask)
crypto/internal.h +0 -1
@@ -68,7 +68,6 @@ void crypto_alg_tested(const char *name, int err);void crypto_remove_spawns (struct crypto_alg *alg,struct list_head *list,struct crypto_alg *nalg);void crypto_remove_final (struct list_head *list); -void crypto_shoot_alg (struct crypto_alg *alg);struct crypto_tfm *__crypto_alloc_tfm (struct crypto_alg *alg,u32 type,u32 mask); void *crypto_create_tfm(struct crypto_alg *alg,
crypto/pcrypt.c +33 -4
@@ -24,6 +24,8 @@ static struct kset *pcrypt_kset;struct pcrypt_instance_ctx {struct crypto_aead_spawn spawn; +struct padata_shell *psenc; +struct padata_shell *psdec;atomic_t tfm_count; };
@@ -32,6 +34,12 @@ struct pcrypt_aead_ctx {unsigned int cb_cpu; }; +static inline struct pcrypt_instance_ctx *pcrypt_tfm_ictx ( +struct crypto_aead *tfm) +{ +return aead_instance_ctx (aead_alg_instance (tfm)); +} +static int pcrypt_aead_setkey (struct crypto_aead *parent,const u8 *key,unsigned int keylen) {
@@ -63,7 +71,6 @@ static void pcrypt_aead_done(struct crypto_async_request *areq, int err)struct padata_priv *padata =pcrypt_request_padata (preq); padata->info = err; - req->base.flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ;padata_do_serial (padata); }
@@ -90,6 +97,9 @@ static int pcrypt_aead_encrypt(struct aead_request *req)struct crypto_aead *aead =crypto_aead_reqtfm (req);struct pcrypt_aead_ctx *ctx =crypto_aead_ctx (aead);u32 flags =aead_request_flags (req); +struct pcrypt_instance_ctx *ictx; + + ictx =pcrypt_tfm_ictx (aead);memset (padata,0 ,sizeof (struct padata_priv ));
@@ -103,7 +113,7 @@ static int pcrypt_aead_encrypt(struct aead_request *req) req->cryptlen, req->iv);aead_request_set_ad (creq, req->assoclen); - err =padata_do_parallel (pencrypt, padata, &ctx->cb_cpu); + err =padata_do_parallel (ictx->psenc, padata, &ctx->cb_cpu);if (!err)return -EINPROGRESS ;
@@ -132,6 +142,9 @@ static int pcrypt_aead_decrypt(struct aead_request *req)struct crypto_aead *aead =crypto_aead_reqtfm (req);struct pcrypt_aead_ctx *ctx =crypto_aead_ctx (aead);u32 flags =aead_request_flags (req); +struct pcrypt_instance_ctx *ictx; + + ictx =pcrypt_tfm_ictx (aead);memset (padata,0 ,sizeof (struct padata_priv ));
@@ -145,7 +158,7 @@ static int pcrypt_aead_decrypt(struct aead_request *req) req->cryptlen, req->iv);aead_request_set_ad (creq, req->assoclen); - err =padata_do_parallel (pdecrypt, padata, &ctx->cb_cpu); + err =padata_do_parallel (ictx->psdec, padata, &ctx->cb_cpu);if (!err)return -EINPROGRESS ;
@@ -192,6 +205,8 @@ static void pcrypt_free(struct aead_instance *inst)struct pcrypt_instance_ctx *ctx =aead_instance_ctx (inst);crypto_drop_aead (&ctx->spawn); +padata_free_shell (ctx->psdec); +padata_free_shell (ctx->psenc);kfree (inst); }
@@ -233,12 +248,22 @@ static int pcrypt_create_aead(struct crypto_template *tmpl, struct rtattr **tb,if (!inst)return -ENOMEM ; + err = -ENOMEM ; + ctx =aead_instance_ctx (inst); + ctx->psenc =padata_alloc_shell (pencrypt); +if (!ctx->psenc) + goto out_free_inst; + + ctx->psdec =padata_alloc_shell (pdecrypt); +if (!ctx->psdec) + goto out_free_psenc; +crypto_set_aead_spawn (&ctx->spawn,aead_crypto_instance (inst)); err =crypto_grab_aead (&ctx->spawn, name,0 ,0 );if (err) - goto out_free_inst; + goto out_free_psdec; alg =crypto_spawn_aead_alg (&ctx->spawn); err =pcrypt_init_instance (aead_crypto_instance (inst), &alg->base);
@@ -271,6 +296,10 @@ static int pcrypt_create_aead(struct crypto_template *tmpl, struct rtattr **tb, out_drop_aead:crypto_drop_aead (&ctx->spawn); +out_free_psdec: +padata_free_shell (ctx->psdec); +out_free_psenc: +padata_free_shell (ctx->psenc); out_free_inst:kfree (inst); goto out;
drivers/acpi/battery.c +56 -19
92 lines not on this page · raw message
drivers/base/power/main.c +37 -5
42 lines not on this page · raw message
drivers/cpufreq/cpufreq.c +70 -77
147 lines not on this page · raw message
drivers/crypto/ccree/cc_cipher.c +45 -3
48 lines not on this page · raw message
drivers/crypto/ccree/cc_request_mgr.c +1 -50
51 lines not on this page · raw message
drivers/crypto/hisilicon/zip/zip_crypto.c +23 -69
92 lines not on this page · raw message
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +4 -9
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +12 -6
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/md/dm-writecache.c +21 -21
42 lines not on this page · raw message
drivers/md/persistent-data/dm-space-map-common.c +27 -0
Lines of this file are not shown. View the raw message.
drivers/md/persistent-data/dm-space-map-common.h +2 -0
Lines of this file are not shown. View the raw message.
drivers/md/persistent-data/dm-space-map-disk.c +4 -2
Lines of this file are not shown. View the raw message.
drivers/md/persistent-data/dm-space-map-metadata.c +4 -1
Lines of this file are not shown. View the raw message.
drivers/media/v4l2-core/v4l2-compat-ioctl32.c +75 -73
148 lines not on this page · raw message
drivers/media/v4l2-core/videobuf-dma-sg.c +4 -1
Lines of this file are not shown. View the raw message.
drivers/net/bonding/bond_alb.c +32 -12
44 lines not on this page · raw message
drivers/net/dsa/microchip/ksz9477_spi.c +6 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/broadcom/bcmsysport.c +3 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/broadcom/bnxt/bnxt.c +16 -9
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +0 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/cadence/macb_main.c +8 -6
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/dec/tulip/uli526x.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +11 -3
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mellanox/mlx5/core/accel/tls.h +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +8 -7
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mellanox/mlx5/core/fw.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/pensando/ionic/ionic_if.h +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/qlogic/qed/qed_ptp.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +4 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +7 -3
Lines of this file are not shown. View the raw message.
drivers/net/wireless/marvell/mwifiex/sta_ioctl.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/pci/controller/dwc/pci-keystone.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/phy/qualcomm/phy-qcom-apq8064-sata.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/power/supply/axp20x_ac_power.c +25 -6
Lines of this file are not shown. View the raw message.
drivers/power/supply/ltc2941-battery-gauge.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/scsi/megaraid/megaraid_sas_base.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/scsi/megaraid/megaraid_sas_fusion.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/scsi/megaraid/megaraid_sas_fusion.h +1 -0
Lines of this file are not shown. View the raw message.
fs/btrfs/extent_io.c +38 -17
55 lines not on this page · raw message
fs/btrfs/tree-log.c +144 -288
432 lines not on this page · raw message
fs/gfs2/file.c +31 -41
72 lines not on this page · raw message
fs/nfs/dir.c +34 -13
47 lines not on this page · raw message
include/sound/hdaudio.h +53 -24
77 lines not on this page · raw message
kernel/padata.c +175 -100
275 lines not on this page · raw message
kernel/trace/trace_events_hist.c +38 -15
53 lines not on this page · raw message
net/netfilter/ipset/ip_set_core.c +21 -20
41 lines not on this page · raw message
net/rxrpc/peer_event.c +23 -19
42 lines not on this page · raw message
net/sched/cls_tcindex.c +21 -22
43 lines not on this page · raw message
net/sched/sch_taprio.c +57 -35
92 lines not on this page · raw message
samples/bpf/xdp_redirect_cpu_user.c +55 -4
59 lines not on this page · raw message
security/smack/smack_lsm.c +19 -22
41 lines not on this page · raw message
sound/soc/intel/boards/skl_hda_dsp_common.c +12 -9
Lines of this file are not shown. View the raw message.
sound/soc/sof/core.c +64 -23
87 lines not on this page · raw message
sound/usb/mixer_scarlett_gen2.c +23 -23
46 lines not on this page · raw message
tools/power/cpupower/lib/cpufreq.c +68 -10
78 lines not on this page · raw message
tools/power/cpupower/utils/cpufreq-info.c +6 -6
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/prog_tests/attach_probe.c +4 -3
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/prog_tests/perf_buffer.c +24 -5
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c +6 -2
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/progs/test_select_reuseport_kern.c +6 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/test_sockmap.c +5 -10
Lines of this file are not shown. View the raw message.
tools/testing/selftests/tc-testing/plugin-lib/buildebpfPlugin.py +1 -1
Lines of this file are not shown. View the raw message.
virt/kvm/arm/aarch32.c +104 -13
117 lines not on this page · raw message
virt/kvm/kvm_main.c +98 -19
117 lines not on this page · 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.