Linux 5.19.6
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.19.6 kernel.
All users of the 5.19 kernel series must upgrade.
The updated 5.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.19.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/ABI/testing/sysfs-devices-system-cpu | 1 Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst | 14 Documentation/admin-guide/kernel-parameters.txt | 2 Documentation/admin-guide/sysctl/net.rst | 2 Makefile | 2 arch/arm64/include/asm/fpsimd.h | 4 arch/arm64/include/asm/setup.h | 17 arch/arm64/kernel/cpu_errata.c | 2 arch/arm64/kernel/fpsimd.c | 21 - arch/arm64/kernel/ptrace.c | 6 arch/arm64/kernel/signal.c | 12 arch/arm64/mm/mmu.c | 18 - arch/parisc/Kconfig | 21 - arch/parisc/kernel/unaligned.c | 2 arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts | 3 arch/riscv/boot/dts/microchip/mpfs-polarberry.dts | 3 arch/riscv/boot/dts/microchip/mpfs.dtsi | 5 arch/riscv/include/asm/signal.h | 12 arch/riscv/include/asm/thread_info.h | 2 arch/riscv/kernel/signal.c | 1 arch/riscv/kernel/traps.c | 3 arch/s390/kernel/process.c | 22 - arch/s390/mm/fault.c | 4 arch/x86/boot/compressed/misc.h | 12 arch/x86/boot/compressed/sev.c | 8 arch/x86/entry/entry_64_compat.S | 2 arch/x86/events/intel/ds.c | 12 arch/x86/events/intel/lbr.c | 8 arch/x86/events/intel/uncore_snb.c | 18 - arch/x86/include/asm/cpufeatures.h | 5 arch/x86/include/asm/nospec-branch.h | 92 ++--- arch/x86/kernel/cpu/bugs.c | 14 arch/x86/kernel/cpu/common.c | 42 +- arch/x86/kernel/sev.c | 16 arch/x86/kernel/unwind_orc.c | 15 arch/x86/mm/pat/memtype.c | 10 block/blk-mq.c | 5 drivers/acpi/processor_thermal.c | 2 drivers/android/binder_alloc.c | 31 + drivers/block/loop.c | 5 drivers/block/zram/zram_drv.c | 42 +- drivers/block/zram/zram_drv.h | 1 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 6 drivers/gpu/drm/nouveau/nouveau_bo.c | 9 drivers/md/md.c | 3 drivers/net/bonding/bond_3ad.c | 38 -- drivers/net/dsa/microchip/ksz8795.c | 102 +---- drivers/net/dsa/microchip/ksz8795_reg.h | 16 drivers/net/dsa/microchip/ksz9477.c | 89 +---- drivers/net/dsa/microchip/ksz9477_reg.h | 1 drivers/net/dsa/microchip/ksz_common.c | 173 +++++++++- drivers/net/dsa/microchip/ksz_common.h | 47 ++ drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 1 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 2 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 10 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 drivers/net/ethernet/intel/ice/ice.h | 36 +- drivers/net/ethernet/intel/ice/ice_lib.c | 4 drivers/net/ethernet/intel/ice/ice_main.c | 25 - drivers/net/ethernet/intel/ice/ice_xsk.c | 18 - drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 59 ++- drivers/net/ethernet/lantiq_xrx200.c | 9 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 29 + drivers/net/ethernet/mediatek/mtk_eth_soc.h | 5 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 12 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 3 drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 57 +-- drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c | 9 drivers/net/ethernet/moxa/moxart_ether.c | 11 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 95 +++++ drivers/net/ethernet/pensando/ionic/ionic_main.c | 4 drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 8 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 9 drivers/net/ipa/ipa_mem.c | 2 drivers/net/ipvlan/ipvtap.c | 4 drivers/net/macsec.c | 11 drivers/net/phy/phy_device.c | 8 drivers/net/usb/r8152.c | 27 - drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 2 drivers/net/wireless/mediatek/mt76/mt7921/main.c | 47 ++ drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 5 drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 2 drivers/nfc/pn533/uart.c | 1 drivers/scsi/scsi_lib.c | 3 drivers/scsi/storvsc_drv.c | 2 drivers/video/fbdev/core/fbcon.c | 27 + drivers/xen/privcmd.c | 21 - fs/btrfs/block-group.c | 47 -- fs/btrfs/block-group.h | 4 fs/btrfs/ctree.h | 1 fs/btrfs/dev-replace.c | 5 fs/btrfs/extent-tree.c | 30 - fs/btrfs/file.c | 2 fs/btrfs/root-tree.c | 5 fs/btrfs/volumes.c | 5 fs/btrfs/xattr.c | 3 fs/cifs/smb2ops.c | 12 fs/cifs/smb2pdu.c | 16 fs/fs-writeback.c | 12 fs/namespace.c | 7 fs/nfs/file.c | 15 fs/nfs/inode.c | 1 fs/nfs/nfs4file.c | 6 fs/nfs/write.c | 6 fs/ntfs3/xattr.c | 16 fs/ocfs2/dlmglue.c | 8 fs/ocfs2/super.c | 3 fs/proc/task_mmu.c | 7 fs/userfaultfd.c | 4 include/asm-generic/sections.h | 7 include/linux/memcontrol.h | 15 include/linux/mlx5/driver.h | 1 include/linux/mm.h | 1 include/linux/netdevice.h | 20 - include/linux/netfilter_bridge/ebtables.h | 4 include/linux/nfs_fs.h | 1 include/linux/userfaultfd_k.h | 2 include/net/busy_poll.h | 2 include/net/gro.h | 2 include/net/netfilter/nf_flow_table.h | 3 include/net/netfilter/nf_tables.h | 1 include/ufs/ufshci.h | 6 init/main.c | 18 - io_uring/io_uring.c | 7 kernel/audit_fsnotify.c | 1 kernel/auditsc.c | 4 kernel/bpf/verifier.c | 10 kernel/cgroup/cgroup.c | 1 kernel/kprobes.c | 9 kernel/sys_ni.c | 1 lib/ratelimit.c | 12 mm/backing-dev.c | 10 mm/bootmem_info.c | 2 mm/damon/dbgfs.c | 3 mm/gup.c | 69 ++- mm/huge_memory.c | 65 ++- mm/hugetlb.c | 28 + mm/mmap.c | 8 mm/mprotect.c | 3 mm/page-writeback.c | 6 mm/shmem.c | 1 mm/userfaultfd.c | 29 + net/bridge/netfilter/ebtable_broute.c | 8 net/bridge/netfilter/ebtable_filter.c | 8 net/bridge/netfilter/ebtable_nat.c | 8 net/bridge/netfilter/ebtables.c | 8 net/core/bpf_sk_storage.c | 5 net/core/dev.c | 20 - net/core/filter.c | 13 net/core/gro_cells.c | 2 net/core/skbuff.c | 2 net/core/sock.c | 18 - net/core/sysctl_net_core.c | 15 net/ipv4/devinet.c | 16 net/ipv4/ip_output.c | 2 net/ipv4/ip_sockglue.c | 6 net/ipv4/tcp.c | 4 net/ipv4/tcp_output.c | 2 net/ipv6/addrconf.c | 5 net/ipv6/ipv6_sockglue.c | 4 net/key/af_key.c | 3 net/mptcp/protocol.c | 2 net/netfilter/ipvs/ip_vs_sync.c | 4 net/netfilter/nf_flow_table_core.c | 15 net/netfilter/nf_flow_table_offload.c | 8 net/netfilter/nf_tables_api.c | 14 net/netfilter/nft_osf.c | 18 - net/netfilter/nft_payload.c | 29 + net/netfilter/nft_tproxy.c | 8 net/netfilter/nft_tunnel.c | 1 net/rose/rose_loopback.c | 3 net/rxrpc/call_object.c | 4 net/rxrpc/sendmsg.c | 92 +++-- net/sched/sch_generic.c | 2 net/socket.c | 2 net/sunrpc/clnt.c | 2 net/xfrm/espintcp.c | 2 net/xfrm/xfrm_input.c | 3 net/xfrm/xfrm_output.c | 1 net/xfrm/xfrm_policy.c | 3 net/xfrm/xfrm_state.c | 1 tools/perf/Makefile.config | 2 tools/perf/builtin-stat.c | 1 187 files changed, 1602 insertions(+), 916 deletions(-)
Aleksander Jan Bajkowski (3):
net: lantiq_xrx200: confirm skb is allocated before using
net: lantiq_xrx200: fix lock under memory pressure
net: lantiq_xrx200: restore buffer if memory allocation failed
Alex Elder (1):
net: ipa: don't assume SMEM is page-aligned
Anand Jain (2):
btrfs: replace: drop assert for suspended replace
btrfs: add info when mount fails due to stale replace target
Antony Antony (2):
Revert "xfrm: update SA curlft.use_time"
xfrm: clone missing x->lastused in xfrm_do_migrate
Arun Ramadoss (6):
net: dsa: microchip: ksz9477: cleanup the ksz9477_switch_detect
net: dsa: microchip: move switch chip_id detection to ksz_common
net: dsa: microchip: move tag_protocol to ksz_common
net: dsa: microchip: move vlan functionality to ksz_common
net: dsa: microchip: move the port mirror to ksz_common
net: dsa: microchip: update the ksz_phylink_get_caps
Aya Levin (1):
net/mlx5e: Fix wrong application of the LRO state
Badari Pulavarty (1):
mm/damon/dbgfs: avoid duplicate context directory creation
Bernard Pidoux (1):
rose: check NULL rose_loopback_neigh->loopback
Brian Foster (1):
s390: fix double free of GS and RI CBs on fork() failure
Chen Zhongjin (1):
x86/unwind/orc: Unwind ftrace trampolines with correct ORC entry
Christian Brauner (1):
ntfs: fix acl handling
Conor Dooley (6):
riscv: signal: fix missing prototype warning
riscv: traps: add missing prototype
riscv: dts: microchip: mpfs: fix incorrect pcie child node name
riscv: dts: microchip: mpfs: remove ti,fifo-depth property
riscv: dts: microchip: mpfs: remove bogus card-detect-delay
riscv: dts: microchip: mpfs: remove pci axi address translation property
Daniel Borkmann (1):
bpf: Don't use tnum_range on array range checking for poke descriptors
David Hildenbrand (3):
mm/gup: fix FOLL_FORCE COW security issue and remove FOLL_COW mm/hugetlb: support write-faults in shared mappings mm/hugetlb: fix hugetlb not supporting softdirty tracking
David Howells (2):
rxrpc: Fix locking in rxrpc's sendmsg
smb3: missing inode locks in punch hole
Deren Wu (1):
mt76: mt7921: fix command timeout in AP stop period
Duoming Zhou (1):
nfc: pn533: Fix use-after-free bugs caused by pn532_cmd_timeout
Eli Cohen (2):
net/mlx5: LAG, fix logic over MLX5_LAG_FLAG_NDEVS_READY net/mlx5: Eswitch, Fix forwarding decision to uplink
Filipe Manana (2):
btrfs: fix silent failure when deleting root reference
btrfs: update generation of hole file extent item when merging holes
Florian Westphal (2):
netfilter: ebtables: reject blobs that don't provide all entry points
netfilter: nft_tproxy: restrict to prerouting hook
Gaosheng Cui (1):
audit: fix potential double free on error path from fsnotify_add_inode_mark
Gerald Schaefer (1):
s390/mm: do not trigger write fault when vma does not allow VM_WRITE
Goldwyn Rodrigues (1):
btrfs: check if root is readonly while setting security xattr
Greg Kroah-Hartman (1):
Linux 5.19.6
Guoqing Jiang (2):
Revert "md-raid: destroy the bitmap after destroying the thread"
md: call __md_stop_writes in md_stop
Hayes Wang (2):
r8152: fix the units of some registers for RTL8156A
r8152: fix the RX FIFO settings when suspending
Heiner Kallweit (1):
net: stmmac: work around sporadic tx issue on link-up
Heinrich Schuchardt (1):
riscv: dts: microchip: correct L2 cache interrupts
Helge Deller (2):
parisc: Make CONFIG_64BIT available for ARCH=parisc64 only
parisc: Fix exception handler for fldw and fstw instructions
Heming Zhao (1):
ocfs2: fix freeing uninitialized resource on ocfs2_dlm_shutdown
Herbert Xu (1):
af_key: Do not call xfrm_probe_algs in parallel
Ian Rogers (1):
perf stat: Clear evsel->reset_group for each stat run
Jacob Keller (1):
ixgbe: stop resetting SYSTIME in ixgbe_ptp_start_cyclecounter
James Clark (1):
perf python: Fix build when PYTHON_CONFIG is user supplied
Jan Beulich (1):
x86/PAT: Have pat_enabled() properly reflect state when running on Xen
Jens Axboe (1):
io_uring: fix issue with io_write() not always undoing sb_start_write()
Jing-Ting Wu (1):
cgroup: Fix race condition at rebind_subsystems()
Jiri Slaby (1):
Revert "zram: remove double compression logic"
Jonathan Toppins (1):
bonding: 802.3ad: fix no transmission of LACPDUs
Juergen Gross (2):
x86/entry: Fix entry_INT80_compat for Xen PV guests xen/privcmd: fix error exit of privcmd_ioctl_dm_op()
Kan Liang (2):
perf/x86/intel: Fix pebs event constraints for ADL perf/x86/lbr: Enable the branch type for the Arch LBR by default
Karol Herbst (1):
nouveau: explicitly wait on the fence in nouveau_bo_move_m2mf
Khazhismel Kumykov (1):
writeback: avoid use-after-free after removing device
Kiwoong Kim (1):
scsi: ufs: core: Enable link lost interrupt
Kuniyuki Iwashima (18):
kprobes: don't call disarm_kprobe() for disabled kprobes
net: Fix data-races around sysctl_[rw]mem_(max|default).
net: Fix data-races around weight_p and dev_weight_[rt]x_bias.
net: Fix data-races around netdev_max_backlog.
net: Fix data-races around netdev_tstamp_prequeue.
ratelimit: Fix data-races in ___ratelimit().
net: Fix data-races around sysctl_optmem_max.
net: Fix a data-race around sysctl_tstamp_allow_data.
net: Fix a data-race around sysctl_net_busy_poll.
net: Fix a data-race around sysctl_net_busy_read.
net: Fix a data-race around netdev_budget.
net: Fix data-races around sysctl_max_skb_frags.
net: Fix a data-race around netdev_budget_usecs.
net: Fix data-races around sysctl_fb_tunnels_only_for_init_net.
net: Fix data-races around sysctl_devconf_inherit_init_net.
net: Fix a data-race around gro_normal_batch.
net: Fix a data-race around netdev_unregister_timeout_secs.
net: Fix a data-race around sysctl_somaxconn.
Liam Howlett (1):
binder_alloc: add missing mmap_lock calls when using the VMA
Liu Shixin (1):
bootmem: remove the vmemmap pages from kmemleak in put_page_bootmem
Lorenzo Bianconi (2):
net: ethernet: mtk_eth_soc: enable rx cksum offload for MTK_NETSYS_V2
net: ethernet: mtk_eth_soc: fix hw hash reporting for MTK_NETSYS_V2
Maciej Fijalkowski (2):
ice: xsk: prohibit usage of non-balanced queue id
ice: xsk: use Rx ring's XDP ring when picking NAPI context
Maciej Żenczykowski (1):
net: ipvtap - add __init/__exit annotations to module init/exit funcs
Maor Dickman (1):
net/mlx5e: Fix wrong tc flag used when set hw-tc-offload off
Mark Brown (3):
arm64/signal: Flush FPSIMD register state when disabling streaming mode arm64/sme: Don't flush SVE register state when allocating SME storage arm64/sme: Don't flush SVE register state when handling SME traps
Mark Rutland (1):
arm64: fix rodata=full
Matthew Wilcox (Oracle) (1):
shmem: update folio if shmem_replace_page() updates the page
Miaohe Lin (1):
mm/hugetlb: avoid corrupting page->mapping in hugetlb_mcopy_atomic_pte
Michael Roth (1):
x86/boot: Don't propagate uninitialized boot_params->cc_blob_address
Mike Christie (1):
scsi: core: Fix passthrough retry counter handling
Moshe Shemesh (1):
net/mlx5: Avoid false positive lockdep warning by adding lock_class_key
Nikolay Aleksandrov (1):
xfrm: policy: fix metadata dst->dev xmit null pointer dereference
Olga Kornievskaia (1):
NFSv4.2 fix problems with __nfs42_ssc_open
Omar Sandoval (1):
btrfs: fix space cache corruption and potential double allocations
Pablo Neira Ayuso (10):
netfilter: nf_tables: disallow updates of implicit chain
netfilter: nf_tables: make table handle allocation per-netns friendly
netfilter: nft_payload: report ERANGE for too long offset and length
netfilter: nft_payload: do not truncate csum_offset and csum_type
netfilter: nf_tables: do not leave chain stats enabled on error
netfilter: nft_osf: restrict osf to ipv4, ipv6 and inet families
netfilter: nft_tunnel: restrict it to netdev family
netfilter: nf_tables: disallow binding to already bound chain
netfilter: flowtable: add function to invoke garbage collection immediately
netfilter: flowtable: fix stuck flows on cleanup due to pending work
Paulo Alcantara (1):
cifs: skip extra NULL byte in filenames
Pavan Chebbi (1):
bnxt_en: Use PAGE_SIZE to init buffer when multi buffer XDP is not in use
Pawan Gupta (1):
x86/bugs: Add "unknown" reporting for MMIO Stale Data
Peter Xu (3):
mm/uffd: reset write protection when unregister with wp-mode mm/smaps: don't access young/dirty bit if pte unpresent mm/mprotect: only reference swap pfn page if type match
Peter Zijlstra (2):
x86/nospec: Unwreck the RSB stuffing
x86/nospec: Fix i386 RSB stuffing
Prike Liang (1):
drm/amdkfd: Fix isa version for the GC 10.3.7
Quanyang Wang (1):
asm-generic: sections: refactor memory_intersects
R Mohamed Shah (1):
ionic: VF initial random MAC address if no assigned mac
Randy Dunlap (1):
kernel/sys_ni: add compat entry for fadvise64_64
Richard Guy Briggs (1):
audit: move audit_return_fixup before the filters
Riwen Lu (1):
ACPI: processor: Remove freq Qos request for all CPUs
Roy Novich (1):
net/mlx5: Fix cmd error logging for manage pages cmd
Sabrina Dubroca (1):
Revert "net: macsec: update SCI upon MAC address change."
Salvatore Bonaccorso (1):
Documentation/ABI: Mention retbleed vulnerability info file for sysfs
Saurabh Sengar (1):
scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq
Sergei Antonov (1):
net: moxa: get rid of asymmetry in DMA mapping/unmapping
Seth Forshee (1):
fs: require CAP_SYS_ADMIN in target namespace for idmapped mounts
Shakeel Butt (1):
Revert "memcg: cleanup racy sum avoidance code"
Shannon Nelson (2):
ionic: clear broken state on generation change
ionic: fix up issues with handling EAGAIN on FW cmds
Shigeru Yoshida (1):
fbdev: fbcon: Properly revert changes when vc_resize() failed
Siddh Raman Pant (1):
loop: Check for overflow while configuring loop
Stephane Eranian (2):
perf/x86/intel/uncore: Fix broken read_counter() for SNB IMC PMU perf/x86/intel/ds: Fix precise store latency handling
Sylwester Dziedziuch (1):
i40e: Fix incorrect address type for IPv6 flow rules
Tom Lendacky (1):
x86/sev: Don't use cc_platform_has() for early SEV-SNP calls
Trond Myklebust (2):
NFS: Fix another fsync() issue after a server reboot
SUNRPC: RPC level errors should set task->tk_rpc_status
Vikas Gupta (3):
bnxt_en: set missing reload flag in devlink features
bnxt_en: fix NQ resource accounting during vf creation on 57500 chips
bnxt_en: fix LRO/GRO_HW features in ndo_fix_features callback
Vlad Buslov (2):
net/mlx5e: Properly disable vlan strip on non-UL reps net/mlx5: Disable irq when locking lag_lock
Vladimir Oltean (1):
net: dsa: microchip: keep compatibility with device tree blobs with no phy-mode
Xiaolei Wang (1):
net: phy: Don't WARN for PHY_READY state in mdio_bus_phy_resume()
Xin Xiong (1):
xfrm: fix refcount leak in __xfrm_policy_check()
Yu Kuai (1):
blk-mq: fix io hung due to missing commit_rqs
Zenghui Yu (1):
arm64: Fix match_list for erratum 1286807 on Arm Cortex-A76
Zixuan Fu (1):
btrfs: fix possible memory leak in btrfs_get_dev_args_from_path()
Greg Kroah-Hartman
maintainerDocumentation/ABI/testing/sysfs-devices-system-cpu +1 -0
@@ -527,6 +527,7 @@ What: /sys/devices/system/cpu/vulnerabilities /sys/devices/system/cpu/vulnerabilities/tsx_async_abort /sys/devices/system/cpu/vulnerabilities/itlb_multihit /sys/devices/system/cpu/vulnerabilities/mmio_stale_data + /sys/devices/system/cpu/vulnerabilities/retbleed Date: January 2018 Contact: Linux kernel mailing list <[email protected]> Description: Information about CPU vulnerabilities
Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst +14 -0
@@ -230,6 +230,20 @@ The possible values in this file are: * - 'Mitigation: Clear CPU buffers' - The processor is vulnerable and the CPU buffer clearing mitigation is enabled. + * - 'Unknown: No mitigations' + - The processor vulnerability status is unknown because it is + out of Servicing period. Mitigation is not attempted. + +Definitions: +------------ + +Servicing period: The process of providing functional and security updates to +Intel processors or platforms, utilizing the Intel Platform Update (IPU) +process or other similar mechanisms. + +End of Servicing Updates (ESU): ESU is the date at which Intel will no +longer provide Servicing, such as through IPU or other similar update +processes. ESU dates will typically be aligned to end of quarter. If the processor is vulnerable then the following information is appended to the above information:
Documentation/admin-guide/kernel-parameters.txt +2 -0
@@ -5260,6 +5260,8 @@ rodata= [KNL] on Mark read-only kernel memory as read-only (default). off Leave read-only kernel memory writable for debugging. + full Mark read-only kernel memory and aliases as read-only + [arm64] rockchip.usb_uart Enable the uart passthrough on the designated usb port
Documentation/admin-guide/sysctl/net.rst +1 -1
@@ -271,7 +271,7 @@ poll cycle or the number of packets processed reaches netdev_budget. netdev_max_backlog ------------------ -Maximum number of packets, queued on the INPUT side, when the interface +Maximum number of packets, queued on the INPUT side, when the interface receives packets faster than kernel can process them. netdev_rss_key
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 19 -SUBLEVEL = 5 +SUBLEVEL = 6 EXTRAVERSION = NAME = Superb Owl
arch/arm64/include/asm/fpsimd.h +2 -2
@@ -153,7 +153,7 @@ struct vl_info {#ifdef CONFIG_ARM64_SVE -extern void sve_alloc (struct task_struct *task); +extern void sve_alloc (struct task_struct *task,bool flush);extern void fpsimd_release_task (struct task_struct *task);extern void fpsimd_sync_to_sve (struct task_struct *task);extern void fpsimd_force_sync_to_sve (struct task_struct *task);
@@ -256,7 +256,7 @@ size_t sve_state_size(struct task_struct const *task);#else /* ! CONFIG_ARM64_SVE */ -static inline void sve_alloc (struct task_struct *task) { } +static inline void sve_alloc (struct task_struct *task,bool flush) { }static inline void fpsimd_release_task (struct task_struct *task) { }static inline void sve_sync_to_fpsimd (struct task_struct *task) { }static inline void sve_sync_from_fpsimd_zeropad (struct task_struct *task) { }
arch/arm64/include/asm/setup.h +17 -0
@@ -3,6 +3,8 @@#ifndef __ARM64_ASM_SETUP_H#define __ARM64_ASM_SETUP_H +#include <linux/string.h> +#include <uapi/asm/setup.h> void *get_early_fdt_ptr (void );
@@ -14,4 +16,19 @@ void early_fdt_map(u64 dt_phys);extern phys_addr_t __fdt_pointer__initdata ; extern u64 __cacheline_aligned boot_args[4]; +static inline bool arch_parse_debug_rodata (char *arg) +{ +extern bool rodata_enabled; +extern bool rodata_full; + +if (arg && !strcmp (arg,"full" )) { + rodata_enabled = true; + rodata_full = true; +return true; + } + +return false; +} +#define arch_parse_debug_rodata arch_parse_debug_rodata +#endif
arch/arm64/kernel/cpu_errata.c +2 -0
@@ -208,6 +208,8 @@ static const struct arm64_cpu_capabilities arm64_repeat_tlbi_list[] = { #ifdef CONFIG_ARM64_ERRATUM_1286807 { ERRATA_MIDR_RANGE(MIDR_CORTEX_A76, 0, 0, 3, 0), + }, + { /* Kryo4xx Gold (rcpe to rfpe) => (r0p0 to r3p0) */ ERRATA_MIDR_RANGE(MIDR_QCOM_KRYO_4XX_GOLD, 0xc, 0xe, 0xf, 0xe), },
arch/arm64/kernel/fpsimd.c +6 -15
@@ -716,10 +716,12 @@ size_t sve_state_size(struct task_struct const *task)* do_sve_acc() case, there is no ABI requirement to hide stale data * written previously be task. */ -void sve_alloc (struct task_struct *task) +void sve_alloc (struct task_struct *task,bool flush) {if (task->thread.sve_state) { -memset (task->thread.sve_state,0 ,sve_state_size (task)); +if (flush) +memset (task->thread.sve_state,0 , +sve_state_size (task));return ; }
@@ -1389,7 +1391,7 @@ void do_sve_acc(unsigned long esr, struct pt_regs *regs)return ; } -sve_alloc (current); +sve_alloc (current, true);if (!current->thread.sve_state) {force_sig (SIGKILL );return ;
@@ -1440,7 +1442,7 @@ void do_sme_acc(unsigned long esr, struct pt_regs *regs)return ; } -sve_alloc (current); +sve_alloc (current, false);sme_alloc (current);if (!current->thread.sve_state || !current->thread.za_state) {force_sig (SIGKILL );
@@ -1461,17 +1463,6 @@ void do_sme_acc(unsigned long esr, struct pt_regs *regs)fpsimd_bind_task_to_cpu (); } -/* -* If SVE was not already active initialise the SVE registers, -* any non-shared state between the streaming and regular SVE -* registers is architecturally guaranteed to be zeroed when -* we enter streaming mode. We do not need to initialize ZA -* since ZA must be disabled at this point and enabling ZA is -* architecturally defined to zero ZA. -*/ -if (system_supports_sve () && !test_thread_flag (TIF_SVE )) -sve_init_regs (); -put_cpu_fpsimd_context (); }
arch/arm64/kernel/ptrace.c +3 -3
@@ -882,7 +882,7 @@ static int sve_set_common(struct task_struct *target,* state and ensure there's storage. */ if (target->thread.svcr != old_svcr) -sve_alloc (target); +sve_alloc (target, true); }/* Registers: FPSIMD-only case */
@@ -912,7 +912,7 @@ static int sve_set_common(struct task_struct *target, goto out; } -sve_alloc (target); +sve_alloc (target, true);if (!target->thread.sve_state) { ret = -ENOMEM ;clear_tsk_thread_flag (target,TIF_SVE );
@@ -1082,7 +1082,7 @@ static int za_set(struct task_struct *target,/* Ensure there is some SVE storage for streaming mode */ if (!target->thread.sve_state) { -sve_alloc (target); +sve_alloc (target, false);if (!target->thread.sve_state) {clear_thread_flag (TIF_SME ); ret = -ENOMEM ;
arch/arm64/kernel/signal.c +11 -1
@@ -307,7 +307,7 @@ static int restore_sve_fpsimd_context(struct user_ctxs *user)fpsimd_flush_task_state (current);/* From now, fpsimd_thread_switch() won't touch thread.sve_state */ -sve_alloc (current); +sve_alloc (current, true);if (!current->thread.sve_state) {clear_thread_flag (TIF_SVE );return -ENOMEM ;
@@ -922,6 +922,16 @@ static void setup_return(struct pt_regs *regs, struct k_sigaction *ka,/* Signal handlers are invoked with ZA and streaming mode disabled */ if (system_supports_sme ()) { +/* +* If we were in streaming mode the saved register +* state was SVE but we will exit SM and use the +* FPSIMD register state - flush the saved FPSIMD +* register state in case it gets loaded. +*/ +if (current->thread.svcr &SVCR_SM_MASK ) +memset (¤t->thread.uw.fpsimd_state,0 , +sizeof (current->thread.uw.fpsimd_state)); + current->thread.svcr &= ~(SVCR_ZA_MASK |SVCR_SM_MASK );sme_smstop ();
arch/arm64/mm/mmu.c +0 -18
@@ -625,24 +625,6 @@ static void __init map_kernel_segment(pgd_t *pgdp, void *va_start, void *va_end,vm_area_add_early (vma); } -static int __init parse_rodata (char *arg) -{ -int ret =strtobool (arg, &rodata_enabled); -if (!ret) { - rodata_full = false; -return 0 ; - } - -/* permit 'full' in addition to boolean options */ -if (strcmp (arg,"full" )) -return -EINVAL ; - - rodata_enabled = true; - rodata_full = true; -return 0 ; -} -early_param ("rodata" , parse_rodata); -#ifdef CONFIG_UNMAP_KERNEL_AT_EL0 static int __init map_entry_trampoline (void ) {
arch/parisc/Kconfig +6 -15
@@ -147,10 +147,10 @@ menu "Processor type and features" choice prompt "Processor type" - default PA7000 + default PA7000 if "$(ARCH)" = "parisc" config PA7000 - bool "PA7000/PA7100" + bool "PA7000/PA7100" if "$(ARCH)" = "parisc" help This is the processor type of your CPU. This information is used for optimizing purposes. In order to compile a kernel
@@ -161,21 +161,21 @@ config PA7000 which is required on some machines. config PA7100LC - bool "PA7100LC" + bool "PA7100LC" if "$(ARCH)" = "parisc" help Select this option for the PCX-L processor, as used in the 712, 715/64, 715/80, 715/100, 715/100XC, 725/100, 743, 748, D200, D210, D300, D310 and E-class config PA7200 - bool "PA7200" + bool "PA7200" if "$(ARCH)" = "parisc" help Select this option for the PCX-T' processor, as used in the C100, C110, J100, J110, J210XC, D250, D260, D350, D360, K100, K200, K210, K220, K400, K410 and K420 config PA7300LC - bool "PA7300LC" + bool "PA7300LC" if "$(ARCH)" = "parisc" help Select this option for the PCX-L2 processor, as used in the 744, A180, B132L, B160L, B180L, C132L, C160L, C180L,
@@ -225,17 +225,8 @@ config MLONGCALLS Enabling this option will probably slow down your kernel. config 64BIT - bool "64-bit kernel" + def_bool "$(ARCH)" = "parisc64" depends on PA8X00 - help - Enable this if you want to support 64bit kernel on PA-RISC platform. - - At the moment, only people willing to use more than 2GB of RAM, - or having a 64bit-only capable PA-RISC machine should say Y here. - - Since there is no 64bit userland on PA-RISC, there is no point to - enable this option otherwise. The 64bit kernel is significantly bigger - and slower than the 32bit one. choice prompt "Kernel page size"
arch/parisc/kernel/unaligned.c +1 -1
@@ -93,7 +93,7 @@#define R1 (i) (((i)>>21)&0x1f)#define R2 (i) (((i)>>16)&0x1f)#define R3 (i) ((i)&0x1f) -#define FR3 (i) ((((i)<<1)&0x1f)|(((i)>>6)&1)) +#define FR3 (i) ((((i)&0x1f)<<1)|(((i)>>6)&1))#define IM (i,n) (((i)>>1&((1<<(n-1))-1))|((i)&1?((0-1L)<<(n-1)):0))#define IM5_2 (i) IM((i)>>16,5)#define IM5_3 (i) IM((i),5)
arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts +0 -3
@@ -84,12 +84,10 @@ &mac1 { phy1: ethernet-phy@9 { reg = <9>; - ti,fifo-depth = <0x1>; }; phy0: ethernet-phy@8 { reg = <8>; - ti,fifo-depth = <0x1>; }; };
@@ -102,7 +100,6 @@ &mmc { disable-wp; cap-sd-highspeed; cap-mmc-highspeed; - card-detect-delay = <200>; mmc-ddr-1_8v; mmc-hs200-1_8v; sd-uhs-sdr12;
arch/riscv/boot/dts/microchip/mpfs-polarberry.dts +0 -3
@@ -54,12 +54,10 @@ &mac1 { phy1: ethernet-phy@5 { reg = <5>; - ti,fifo-depth = <0x01>; }; phy0: ethernet-phy@4 { reg = <4>; - ti,fifo-depth = <0x01>; }; };
@@ -72,7 +70,6 @@ &mmc { disable-wp; cap-sd-highspeed; cap-mmc-highspeed; - card-detect-delay = <200>; mmc-ddr-1_8v; mmc-hs200-1_8v; sd-uhs-sdr12;
arch/riscv/boot/dts/microchip/mpfs.dtsi +2 -3
@@ -169,7 +169,7 @@ cctrllr: cache-controller@2010000 { cache-size = <2097152>; cache-unified; interrupt-parent = <&plic>; - interrupts = <1>, <2>, <3>; + interrupts = <1>, <3>, <4>, <2>; }; clint: clint@2000000 {
@@ -446,9 +446,8 @@ pcie: pcie@2000000000 { ranges = <0x3000000 0x0 0x8000000 0x20 0x8000000 0x0 0x80000000>; msi-parent = <&pcie>; msi-controller; - microchip,axi-m-atr0 = <0x10 0x0>; status = "disabled"; - pcie_intc: legacy-interrupt-controller { + pcie_intc: interrupt-controller { #address-cells = <0>; #interrupt-cells = <1>; interrupt-controller;
arch/riscv/include/asm/signal.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef __ASM_SIGNAL_H +#define __ASM_SIGNAL_H + +#include <uapi/asm/signal.h> +#include <uapi/asm/ptrace.h> + +asmlinkage __visible +void do_notify_resume (struct pt_regs *regs,unsigned long thread_info_flags); + +#endif
arch/riscv/include/asm/thread_info.h +2 -0
@@ -42,6 +42,8 @@#ifndef __ASSEMBLY__ +extern long shadow_stack[SHADOW_OVERFLOW_STACK_SIZE /sizeof (long )]; +#include <asm/processor.h> #include <asm/csr.h>
arch/riscv/kernel/signal.c +1 -0
@@ -15,6 +15,7 @@#include <asm/ucontext.h> #include <asm/vdso.h> +#include <asm/signal.h> #include <asm/signal32.h> #include <asm/switch_to.h> #include <asm/csr.h>
arch/riscv/kernel/traps.c +2 -1
@@ -20,9 +20,10 @@#include <asm/asm-prototypes.h> #include <asm/bug.h> +#include <asm/csr.h> #include <asm/processor.h> #include <asm/ptrace.h> -#include <asm/csr.h> +#include <asm/thread_info.h> int show_unhandled_signals =1 ;
arch/s390/kernel/process.c +16 -6
@@ -91,6 +91,18 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)memcpy (dst, src, arch_task_struct_size); dst->thread.fpu.regs = dst->thread.fpu.fprs; + +/* +* Don't transfer over the runtime instrumentation or the guarded +* storage control block pointers. These fields are cleared here instead +* of in copy_thread() to avoid premature freeing of associated memory +* on fork() failure. Wait to clear the RI flag because ->stack still +* refers to the source thread. +*/ + dst->thread.ri_cb =NULL ; + dst->thread.gs_cb =NULL ; + dst->thread.gs_bc_cb =NULL ; +return 0 ; }
@@ -150,13 +162,11 @@ int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) frame->childregs.flags =0 ;if (new_stackp) frame->childregs.gprs[15 ] = new_stackp; - -/* Don't copy runtime instrumentation info */ - p->thread.ri_cb =NULL ; +/* +* Clear the runtime instrumentation flag after the above childregs +* copy. The CB pointer was already cleared in arch_dup_task_struct(). +*/ frame->childregs.psw.mask &= ~PSW_MASK_RI ; -/* Don't copy guarded storage control block */ - p->thread.gs_cb =NULL ; - p->thread.gs_bc_cb =NULL ;/* Set a new TLS ? */ if (clone_flags &CLONE_SETTLS ) {
arch/s390/mm/fault.c +3 -1
@@ -379,7 +379,9 @@ static inline vm_fault_t do_exception(struct pt_regs *regs, int access) flags =FAULT_FLAG_DEFAULT ;if (user_mode (regs)) flags |=FAULT_FLAG_USER ; -if (access ==VM_WRITE || is_write) +if (is_write) + access =VM_WRITE ; +if (access ==VM_WRITE ) flags |=FAULT_FLAG_WRITE ;mmap_read_lock (mm);
arch/x86/boot/compressed/misc.h +11 -1
@@ -132,7 +132,17 @@ void snp_set_page_private(unsigned long paddr);void snp_set_page_shared (unsigned long paddr);void sev_prep_identity_maps (unsigned long top_level_pgt);#else -static inline void sev_enable (struct boot_params *bp) { } +static inline void sev_enable (struct boot_params *bp) +{ +/* +* bp->cc_blob_address should only be set by boot/compressed kernel. +* Initialize it to 0 unconditionally (thus here in this stub too) to +* ensure that uninitialized values from buggy bootloaders aren't +* propagated. +*/ +if (bp) + bp->cc_blob_address =0 ; +}static inline void sev_es_shutdown_ghcb (void ) { }static inline bool sev_es_check_ghcb_fault (unsigned long address) {
arch/x86/boot/compressed/sev.c +8 -0
@@ -276,6 +276,14 @@ void sev_enable(struct boot_params *bp)struct msr m;bool snp; +/* +* bp->cc_blob_address should only be set by boot/compressed kernel. +* Initialize it to 0 to ensure that uninitialized values from +* buggy bootloaders aren't propagated. +*/ +if (bp) + bp->cc_blob_address =0 ; +/* * Setup/preliminary detection of SNP. This will be sanity-checked * against CPUID/MSR values later.
arch/x86/entry/entry_64_compat.S +1 -1
@@ -311,7 +311,7 @@ SYM_CODE_START(entry_INT80_compat) * Interrupts are off on entry. */ ASM_CLAC /* Do this early to minimize exposure */ - SWAPGS + ALTERNATIVE "swapgs", "", X86_FEATURE_XENPV /* * User tracing code (ptrace or signal handlers) might assume that
arch/x86/events/intel/ds.c +10 -2
@@ -291,6 +291,7 @@ static u64 load_latency_data(struct perf_event *event, u64 status)static u64 store_latency_data (struct perf_event *event,u64 status) {union intel_x86_pebs_dse dse; +union perf_mem_data_src src;u64 val; dse.val = status;
@@ -304,7 +305,14 @@ static u64 store_latency_data(struct perf_event *event, u64 status) val |=P (BLK ,NA ); -return val; +/* +* the pebs_data_source table is only for loads +* so override the mem_op to say STORE instead +*/ + src.val = val; + src.mem_op =P (OP ,STORE ); + +return src.val; }struct pebs_record_core {
@@ -822,7 +830,7 @@ struct event_constraint intel_glm_pebs_event_constraints[] = {struct event_constraint intel_grt_pebs_event_constraints[] = {/* Allow all events as PEBS with no flags */ -INTEL_HYBRID_LAT_CONSTRAINT (0x5d0 ,0xf ), +INTEL_HYBRID_LAT_CONSTRAINT (0x5d0 ,0x3 ),INTEL_HYBRID_LAT_CONSTRAINT (0x6d0 ,0xf ),EVENT_CONSTRAINT_END };
arch/x86/events/intel/lbr.c +8 -0
@@ -1097,6 +1097,14 @@ static int intel_pmu_setup_hw_lbr_filter(struct perf_event *event)if (static_cpu_has (X86_FEATURE_ARCH_LBR )) { reg->config = mask; + +/* +* The Arch LBR HW can retrieve the common branch types +* from the LBR_INFO. It doesn't require the high overhead +* SW disassemble. +* Enable the branch type by default for the Arch LBR. +*/ + reg->reg |=X86_BR_TYPE_SAVE ;return 0 ; }
arch/x86/events/intel/uncore_snb.c +17 -1
@@ -841,6 +841,22 @@ int snb_pci2phy_map_init(int devid)return 0 ; } +static u64 snb_uncore_imc_read_counter (struct intel_uncore_box *box,struct perf_event *event) +{ +struct hw_perf_event *hwc = &event->hw; + +/* +* SNB IMC counters are 32-bit and are laid out back to back +* in MMIO space. Therefore we must use a 32-bit accessor function +* using readq() from uncore_mmio_read_counter() causes problems +* because it is reading 64-bit at a time. This is okay for the +* uncore_perf_event_update() function because it drops the upper +* 32-bits but not okay for plain uncore_read_counter() as invoked +* in uncore_pmu_event_start(). +*/ +return (u64 )readl (box->io_addr + hwc->event_base); +} +static struct pmu snb_uncore_imc_pmu = { .task_ctx_nr = perf_invalid_context, .event_init = snb_uncore_imc_event_init,
@@ -860,7 +876,7 @@ static struct intel_uncore_ops snb_uncore_imc_ops = { .disable_event = snb_uncore_imc_disable_event, .enable_event = snb_uncore_imc_enable_event, .hw_config = snb_uncore_imc_hw_config, - .read_counter = uncore_mmio_read_counter, + .read_counter = snb_uncore_imc_read_counter, };static struct intel_uncore_type snb_uncore_imc = {
arch/x86/include/asm/cpufeatures.h +3 -2
@@ -456,7 +456,8 @@#define X86_BUG_ITLB_MULTIHIT X86_BUG(23)/* CPU may incur MCE during certain page attribute changes */ #define X86_BUG_SRBDS X86_BUG(24)/* CPU may leak RNG bits if not mitigated */ #define X86_BUG_MMIO_STALE_DATA X86_BUG(25)/* CPU is affected by Processor MMIO Stale Data vulnerabilities */ -#define X86_BUG_RETBLEED X86_BUG(26)/* CPU is affected by RETBleed */ -#define X86_BUG_EIBRS_PBRSB X86_BUG(27)/* EIBRS is vulnerable to Post Barrier RSB Predictions */ +#define X86_BUG_MMIO_UNKNOWN X86_BUG(26)/* CPU is too old and its MMIO Stale Data status is unknown */ +#define X86_BUG_RETBLEED X86_BUG(27)/* CPU is affected by RETBleed */ +#define X86_BUG_EIBRS_PBRSB X86_BUG(28)/* EIBRS is vulnerable to Post Barrier RSB Predictions */ #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/include/asm/nospec-branch.h +51 -41
112 lines not on this page · raw message
arch/x86/kernel/cpu/bugs.c +12 -2
@@ -433,7 +433,8 @@ static void __init mmio_select_mitigation(void)u64 ia32_cap;if (!boot_cpu_has_bug (X86_BUG_MMIO_STALE_DATA ) || -cpu_mitigations_off ()) { +boot_cpu_has_bug (X86_BUG_MMIO_UNKNOWN ) || +cpu_mitigations_off ()) { mmio_mitigation =MMIO_MITIGATION_OFF ;return ; }
@@ -538,6 +539,8 @@ static void __init md_clear_update_mitigation(void)pr_info ("TAA: %s\n" , taa_strings[taa_mitigation]);if (boot_cpu_has_bug (X86_BUG_MMIO_STALE_DATA ))pr_info ("MMIO Stale Data: %s\n" , mmio_strings[mmio_mitigation]); +else if (boot_cpu_has_bug (X86_BUG_MMIO_UNKNOWN )) +pr_info ("MMIO Stale Data: Unknown: No mitigations\n" ); }static void __init md_clear_select_mitigation (void )
@@ -2275,6 +2278,9 @@ static ssize_t tsx_async_abort_show_state(char *buf)static ssize_t mmio_stale_data_show_state (char *buf) { +if (boot_cpu_has_bug (X86_BUG_MMIO_UNKNOWN )) +return sysfs_emit (buf,"Unknown: No mitigations\n" ); +if (mmio_mitigation ==MMIO_MITIGATION_OFF )return sysfs_emit (buf,"%s\n" , mmio_strings[mmio_mitigation]);
@@ -2421,6 +2427,7 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attrreturn srbds_show_state (buf);case X86_BUG_MMIO_STALE_DATA : +case X86_BUG_MMIO_UNKNOWN :return mmio_stale_data_show_state (buf);case X86_BUG_RETBLEED :
@@ -2480,7 +2487,10 @@ ssize_t cpu_show_srbds(struct device *dev, struct device_attribute *attr, char *ssize_t cpu_show_mmio_stale_data (struct device *dev,struct device_attribute *attr,char *buf) { -return cpu_show_common (dev, attr, buf,X86_BUG_MMIO_STALE_DATA ); +if (boot_cpu_has_bug (X86_BUG_MMIO_UNKNOWN )) +return cpu_show_common (dev, attr, buf,X86_BUG_MMIO_UNKNOWN ); +else +return cpu_show_common (dev, attr, buf,X86_BUG_MMIO_STALE_DATA ); }ssize_t cpu_show_retbleed (struct device *dev,struct device_attribute *attr,char *buf)
arch/x86/kernel/cpu/common.c +27 -15
77 lines not on this page · raw message
arch/x86/kernel/sev.c +14 -2
@@ -701,7 +701,13 @@ static void __init early_set_pages_state(unsigned long paddr, unsigned int npagevoid __init early_snp_set_memory_private (unsigned long vaddr,unsigned long paddr,unsigned int npages) { -if (!cc_platform_has (CC_ATTR_GUEST_SEV_SNP )) +/* +* This can be invoked in early boot while running identity mapped, so +* use an open coded check for SNP instead of using cc_platform_has(). +* This eliminates worries about jump tables or checking boot_cpu_data +* in the cc_platform_has() function. +*/ +if (!(sev_status &MSR_AMD64_SEV_SNP_ENABLED ))return ;/*
@@ -717,7 +723,13 @@ void __init early_snp_set_memory_private(unsigned long vaddr, unsigned long paddvoid __init early_snp_set_memory_shared (unsigned long vaddr,unsigned long paddr,unsigned int npages) { -if (!cc_platform_has (CC_ATTR_GUEST_SEV_SNP )) +/* +* This can be invoked in early boot while running identity mapped, so +* use an open coded check for SNP instead of using cc_platform_has(). +* This eliminates worries about jump tables or checking boot_cpu_data +* in the cc_platform_has() function. +*/ +if (!(sev_status &MSR_AMD64_SEV_SNP_ENABLED ))return ;/* Invalidate the memory pages before they are marked shared in the RMP table. */
arch/x86/kernel/unwind_orc.c +10 -5
@@ -93,22 +93,27 @@ static struct orc_entry *orc_find(unsigned long ip);static struct orc_entry *orc_ftrace_find (unsigned long ip) {struct ftrace_ops *ops; -unsigned long caller; +unsigned long tramp_addr, offset; ops =ftrace_ops_trampoline (ip);if (!ops)return NULL ; +/* Set tramp_addr to the start of the code copied by the trampoline */ if (ops->flags &FTRACE_OPS_FL_SAVE_REGS ) - caller = (unsigned long )ftrace_regs_call; + tramp_addr = (unsigned long )ftrace_regs_caller;else - caller = (unsigned long )ftrace_call; + tramp_addr = (unsigned long )ftrace_caller; + +/* Now place tramp_addr to the location within the trampoline ip is at */ + offset = ip - ops->trampoline; + tramp_addr += offset;/* Prevent unlikely recursion */ -if (ip == caller) +if (ip == tramp_addr)return NULL ; -return orc_find (caller); +return orc_find (tramp_addr); }#else static struct orc_entry *orc_ftrace_find (unsigned long ip)
arch/x86/mm/pat/memtype.c +9 -1
@@ -62,6 +62,7 @@static bool __read_mostly pat_bp_initialized;static bool __read_mostly pat_disabled = !IS_ENABLED (CONFIG_X86_PAT ); +static bool __initdata pat_force_disabled = !IS_ENABLED (CONFIG_X86_PAT );static bool __read_mostly pat_bp_enabled;static bool __read_mostly pat_cm_initialized;
@@ -86,6 +87,7 @@ void pat_disable(const char *msg_reason)static int __init nopat (char *str) {pat_disable ("PAT support disabled via boot option." ); + pat_force_disabled = true;return 0 ; }early_param ("nopat" , nopat);
@@ -272,7 +274,7 @@ static void pat_ap_init(u64 pat)wrmsrl (MSR_IA32_CR_PAT , pat); } -void init_cache_modes (void ) +void __init init_cache_modes (void ) {u64 pat =0 ;
@@ -313,6 +315,12 @@ void init_cache_modes(void)*/ pat =PAT (0 ,WB ) |PAT (1 ,WT ) |PAT (2 ,UC_MINUS ) |PAT (3 ,UC ) |PAT (4 ,WB ) |PAT (5 ,WT ) |PAT (6 ,UC_MINUS ) |PAT (7 ,UC ); + }else if (!pat_force_disabled &&cpu_feature_enabled (X86_FEATURE_HYPERVISOR )) { +/* +* Clearly PAT is enabled underneath. Allow pat_enabled() to +* reflect this. +*/ + pat_bp_enabled = true; }__init_cache_modes (pat);
block/blk-mq.c +3 -2
@@ -1925,7 +1925,8 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list,/* If we didn't flush the entire list, we could have told the driver * there was more coming, but that turned out to be a lie. */ -if ((!list_empty (list) || errors) && q->mq_ops->commit_rqs && queued) +if ((!list_empty (list) || errors || needs_resource || + ret ==BLK_STS_DEV_RESOURCE ) && q->mq_ops->commit_rqs && queued) q->mq_ops->commit_rqs (hctx);/* * Any items that need requeuing? Stuff them into hctx->dispatch,
@@ -2678,6 +2679,7 @@ void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,list_del_init (&rq->queuelist); ret =blk_mq_request_issue_directly (rq,list_empty (list));if (ret !=BLK_STS_OK ) { + errors++;if (ret ==BLK_STS_RESOURCE || ret ==BLK_STS_DEV_RESOURCE ) { blk_mq_request_bypass_insert(rq, false,
@@ -2685,7 +2687,6 @@ void blk_mq_try_issue_list_directly(struct blk_mq_hw_ctx *hctx,break ; }blk_mq_end_request (rq, ret); - errors++; }else queued++; }
drivers/acpi/processor_thermal.c +1 -1
@@ -151,7 +151,7 @@ void acpi_thermal_cpufreq_exit(struct cpufreq_policy *policy)unsigned int cpu;for_each_cpu (cpu, policy->related_cpus) { -struct acpi_processor *pr =per_cpu (processors, policy->cpu); +struct acpi_processor *pr =per_cpu (processors, cpu);if (pr)freq_qos_remove_request (&pr->thermal_req);
drivers/android/binder_alloc.c +21 -10
@@ -395,12 +395,15 @@ static struct binder_buffer *binder_alloc_new_buf_locked(size_t size, data_offsets_size;int ret; +mmap_read_lock (alloc->vma_vm_mm);if (!binder_alloc_get_vma (alloc)) { +mmap_read_unlock (alloc->vma_vm_mm);binder_alloc_debug (BINDER_DEBUG_USER_ERROR ,"%d: binder_alloc_buf, no vma\n" , alloc->pid);return ERR_PTR (-ESRCH ); } +mmap_read_unlock (alloc->vma_vm_mm); data_offsets_size =ALIGN (data_size,sizeof (void *)) +ALIGN (offsets_size,sizeof (void *));
@@ -922,17 +925,25 @@ void binder_alloc_print_pages(struct seq_file *m,* Make sure the binder_alloc is fully initialized, otherwise we might * read inconsistent state. */ -if (binder_alloc_get_vma (alloc) !=NULL ) { -for (i =0 ; i < alloc->buffer_size /PAGE_SIZE ; i++) { - page = &alloc->pages[i]; -if (!page->page_ptr) - free++; -else if (list_empty (&page->lru)) - active++; -else - lru++; - } + +mmap_read_lock (alloc->vma_vm_mm); +if (binder_alloc_get_vma (alloc) ==NULL ) { +mmap_read_unlock (alloc->vma_vm_mm); + goto uninitialized; } + +mmap_read_unlock (alloc->vma_vm_mm); +for (i =0 ; i < alloc->buffer_size /PAGE_SIZE ; i++) { + page = &alloc->pages[i]; +if (!page->page_ptr) + free++; +else if (list_empty (&page->lru)) + active++; +else + lru++; + } + +uninitialized:mutex_unlock (&alloc->mutex);seq_printf (m," pages: %d:%d:%d\n" , active, lru, free);seq_printf (m," pages high watermark: %zu\n" , alloc->pages_high);
drivers/block/loop.c +5 -0
@@ -979,6 +979,11 @@ loop_set_status_from_info(struct loop_device *lo, lo->lo_offset = info->lo_offset; lo->lo_sizelimit = info->lo_sizelimit; + +/* loff_t vars have been assigned __u64 */ +if (lo->lo_offset <0 || lo->lo_sizelimit <0 ) +return -EOVERFLOW ; +memcpy (lo->lo_file_name, info->lo_file_name,LO_NAME_SIZE ); lo->lo_file_name[LO_NAME_SIZE -1 ] =0 ; lo->lo_flags = info->lo_flags;
drivers/block/zram/zram_drv.c +32 -10
78 lines not on this page · raw message
drivers/block/zram/zram_drv.h +1 -0
@@ -81,6 +81,7 @@ struct zram_stats {atomic64_t huge_pages_since;/* no. of huge pages since zram set up */ atomic64_t pages_stored;/* no. of pages currently stored */ atomic_long_t max_used_pages;/* no. of maximum pages stored */ +atomic64_t writestall;/* no. of write slow paths */ atomic64_t miss_free;/* no. of missed free */ #ifdef CONFIG_ZRAM_WRITEBACK atomic64_t bd_count;/* no. of pages in backing device */
drivers/gpu/drm/amd/amdkfd/kfd_device.c +1 -5
@@ -377,12 +377,8 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf) f2g = &gfx_v10_3_kfd2kgd;break ;case IP_VERSION (10 ,3 ,6 ): - gfx_target_version =100306 ; -if (!vf) - f2g = &gfx_v10_3_kfd2kgd; -break ;case IP_VERSION (10 ,3 ,7 ): - gfx_target_version =100307 ; + gfx_target_version =100306 ;if (!vf) f2g = &gfx_v10_3_kfd2kgd;break ;
drivers/gpu/drm/nouveau/nouveau_bo.c +9 -0
@@ -820,6 +820,15 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict,if (ret ==0 ) { ret =nouveau_fence_new (chan, false, &fence);if (ret ==0 ) { +/* TODO: figure out a better solution here +* +* wait on the fence here explicitly as going through +* ttm_bo_move_accel_cleanup somehow doesn't seem to do it. +* +* Without this the operation can timeout and we'll fallback to a +* software copy, which might take several minutes to finish. +*/ +nouveau_fence_wait (fence, false, false); ret = ttm_bo_move_accel_cleanup(bo, &fence->base, evict, false,
drivers/md/md.c +2 -1
@@ -6244,11 +6244,11 @@ static void mddev_detach(struct mddev *mddev)static void __md_stop (struct mddev *mddev) {struct md_personality *pers = mddev->pers; +md_bitmap_destroy (mddev);mddev_detach (mddev);/* Ensure ->event_work is done */ if (mddev->event_work.func)flush_workqueue (md_misc_wq); -md_bitmap_destroy (mddev);spin_lock (&mddev->lock); mddev->pers =NULL ;spin_unlock (&mddev->lock);
@@ -6266,6 +6266,7 @@ void md_stop(struct mddev *mddev)/* stop the array and free an attached data structures. * This is called from dm-raid */ +__md_stop_writes (mddev);__md_stop (mddev);bioset_exit (&mddev->bio_set);bioset_exit (&mddev->sync_set);
drivers/net/bonding/bond_3ad.c +16 -22
@@ -2007,30 +2007,24 @@ void bond_3ad_initiate_agg_selection(struct bonding *bond, int timeout)*/ void bond_3ad_initialize (struct bonding *bond,u16 tick_resolution) { -/* check that the bond is not initialized yet */ -if (!MAC_ADDRESS_EQUAL (&(BOND_AD_INFO (bond).system.sys_mac_addr), - bond->dev->dev_addr)) { - -BOND_AD_INFO (bond).aggregator_identifier =0 ; - -BOND_AD_INFO (bond).system.sys_priority = - bond->params.ad_actor_sys_prio; -if (is_zero_ether_addr (bond->params.ad_actor_system)) -BOND_AD_INFO (bond).system.sys_mac_addr = - *((struct mac_addr *)bond->dev->dev_addr); -else -BOND_AD_INFO (bond).system.sys_mac_addr = - *((struct mac_addr *)bond->params.ad_actor_system); +BOND_AD_INFO (bond).aggregator_identifier =0 ; +BOND_AD_INFO (bond).system.sys_priority = + bond->params.ad_actor_sys_prio; +if (is_zero_ether_addr (bond->params.ad_actor_system)) +BOND_AD_INFO (bond).system.sys_mac_addr = + *((struct mac_addr *)bond->dev->dev_addr); +else +BOND_AD_INFO (bond).system.sys_mac_addr = + *((struct mac_addr *)bond->params.ad_actor_system); -/* initialize how many times this module is called in one -* second (should be about every 100ms) -*/ - ad_ticks_per_sec = tick_resolution; +/* initialize how many times this module is called in one +* second (should be about every 100ms) +*/ + ad_ticks_per_sec = tick_resolution; -bond_3ad_initiate_agg_selection (bond, -AD_AGGREGATOR_SELECTION_TIMER * - ad_ticks_per_sec); - } +bond_3ad_initiate_agg_selection (bond, +AD_AGGREGATOR_SELECTION_TIMER * + ad_ticks_per_sec); }/**
drivers/net/dsa/microchip/ksz8795.c +20 -82
197 lines not on this page · raw message
drivers/net/dsa/microchip/ksz8795_reg.h +0 -16
@@ -14,23 +14,10 @@#define KS_PRIO_M 0x3#define KS_PRIO_S 2 -#define REG_CHIP_ID0 0x00 - -#define KSZ87_FAMILY_ID 0x87 -#define KSZ88_FAMILY_ID 0x88 - -#define REG_CHIP_ID1 0x01 - -#define SW_CHIP_ID_M 0xF0 -#define SW_CHIP_ID_S 4#define SW_REVISION_M 0x0E#define SW_REVISION_S 1#define SW_START 0x01 -#define CHIP_ID_94 0x60 -#define CHIP_ID_95 0x90 -#define CHIP_ID_63 0x30 -#define KSZ8863_REG_SW_RESET 0x43#define KSZ8863_GLOBAL_SOFTWARE_RESET BIT(4)
@@ -217,8 +204,6 @@#define REG_PORT_4_STATUS_0 0x48/* For KSZ8765. */ -#define PORT_FIBER_MODE BIT(7) -#define PORT_REMOTE_ASYM_PAUSE BIT(5)#define PORT_REMOTE_SYM_PAUSE BIT(4)#define PORT_REMOTE_100BTX_FD BIT(3)
@@ -322,7 +307,6 @@#define REG_PORT_CTRL_5 0x05 -#define REG_PORT_STATUS_0 0x08#define REG_PORT_STATUS_1 0x09#define REG_PORT_LINK_MD_CTRL 0x0A#define REG_PORT_LINK_MD_RESULT 0x0B
drivers/net/dsa/microchip/ksz9477.c +25 -64
208 lines not on this page · raw message
drivers/net/dsa/microchip/ksz9477_reg.h +0 -1
@@ -25,7 +25,6 @@#define REG_CHIP_ID2__1 0x0002 -#define CHIP_ID_63 0x63#define CHIP_ID_66 0x66#define CHIP_ID_67 0x67#define CHIP_ID_77 0x77
drivers/net/dsa/microchip/ksz_common.c +168 -5
203 lines not on this page · raw message
drivers/net/dsa/microchip/ksz_common.h +46 -1
74 lines not on this page · raw message
drivers/net/ethernet/broadcom/bnxt/bnxt.c +1 -4
@@ -11183,10 +11183,7 @@ static netdev_features_t bnxt_fix_features(struct net_device *dev,if ((features &NETIF_F_NTUPLE ) && !bnxt_rfs_capable (bp)) features &= ~NETIF_F_NTUPLE ; -if (bp->flags &BNXT_FLAG_NO_AGG_RINGS ) - features &= ~(NETIF_F_LRO |NETIF_F_GRO_HW ); - -if (!(bp->flags &BNXT_FLAG_TPA )) +if ((bp->flags &BNXT_FLAG_NO_AGG_RINGS ) || bp->xdp_prog) features &= ~(NETIF_F_LRO |NETIF_F_GRO_HW );if (!(features &NETIF_F_GRO ))
drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 -0
@@ -2130,6 +2130,7 @@ struct bnxt {#define BNXT_DUMP_CRASH 1struct bpf_prog *xdp_prog; +u8 xdp_has_frags;struct bnxt_ptp_cfg *ptp_cfg;u8 ptp_all_rx_tstamp;
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +1 -0
@@ -1246,6 +1246,7 @@ int bnxt_dl_register(struct bnxt *bp)if (rc) goto err_dl_port_unreg; +devlink_set_features (dl,DEVLINK_F_RELOAD ); out:devlink_register (dl);return 0 ;
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c +1 -1
@@ -623,7 +623,7 @@ static int bnxt_hwrm_func_vf_resc_cfg(struct bnxt *bp, int num_vfs, bool reset) hw_resc->max_stat_ctxs -=le16_to_cpu (req->min_stat_ctx) * n; hw_resc->max_vnics -=le16_to_cpu (req->min_vnics) * n;if (bp->flags &BNXT_FLAG_CHIP_P5 ) - hw_resc->max_irqs -= vf_msix * n; + hw_resc->max_nqs -= vf_msix; rc = pf->active_vfs; }
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c +8 -2
@@ -181,6 +181,7 @@ void bnxt_xdp_buff_init(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, struct xdp_buff *xdp) {struct bnxt_sw_rx_bd *rx_buf; +u32 buflen =PAGE_SIZE ;struct pci_dev *pdev;dma_addr_t mapping;u32 offset;
@@ -192,7 +193,10 @@ void bnxt_xdp_buff_init(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, mapping = rx_buf->mapping - bp->rx_dma_offset;dma_sync_single_for_cpu (&pdev->dev, mapping + offset, *len, bp->rx_dir); -xdp_init_buff (xdp,BNXT_PAGE_MODE_BUF_SIZE + offset, &rxr->xdp_rxq); +if (bp->xdp_has_frags) + buflen =BNXT_PAGE_MODE_BUF_SIZE + offset; + +xdp_init_buff (xdp, buflen, &rxr->xdp_rxq);xdp_prepare_buff (xdp, *data_ptr - offset, offset, *len, false); }
@@ -397,8 +401,10 @@ static int bnxt_xdp_set(struct bnxt *bp, struct bpf_prog *prog)netdev_warn (dev,"ethtool rx/tx channels must be combined to support XDP.\n" );return -EOPNOTSUPP ; } -if (prog) +if (prog) { tx_xdp = bp->rx_nr_rings; + bp->xdp_has_frags = prog->aux->xdp_has_frags; + } tc =netdev_get_num_tc (dev);if (!tc)
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +1 -1
@@ -4395,7 +4395,7 @@ static int i40e_check_fdir_input_set(struct i40e_vsi *vsi, (struct in6_addr *)&ipv6_full_mask)) new_mask |=I40E_L3_V6_DST_MASK ; else if (ipv6_addr_any((struct in6_addr *) - &usr_ip6_spec->ip6src)) + &usr_ip6_spec->ip6dst)) new_mask &= ~I40E_L3_V6_DST_MASK; else return -EOPNOTSUPP;
drivers/net/ethernet/intel/ice/ice.h +23 -13
@@ -684,8 +684,8 @@ static inline void ice_set_ring_xdp(struct ice_tx_ring *ring)* ice_xsk_pool - get XSK buffer pool bound to a ring * @ring: Rx ring to use * -* Returns a pointer to xdp_umem structure if there is a buffer pool present, -* NULL otherwise. +* Returns a pointer to xsk_buff_pool structure if there is a buffer pool +* present, NULL otherwise. */ static inline struct xsk_buff_pool *ice_xsk_pool (struct ice_rx_ring *ring) {
@@ -699,23 +699,33 @@ static inline struct xsk_buff_pool *ice_xsk_pool(struct ice_rx_ring *ring) }/** -* ice_tx_xsk_pool - get XSK buffer pool bound to a ring -* @ring: Tx ring to use +* ice_tx_xsk_pool - assign XSK buff pool to XDP ring +* @vsi: pointer to VSI +* @qid: index of a queue to look at XSK buff pool presence * -* Returns a pointer to xdp_umem structure if there is a buffer pool present, -* NULL otherwise. Tx equivalent of ice_xsk_pool. +* Sets XSK buff pool pointer on XDP ring. +* +* XDP ring is picked from Rx ring, whereas Rx ring is picked based on provided +* queue id. Reason for doing so is that queue vectors might have assigned more +* than one XDP ring, e.g. when user reduced the queue count on netdev; Rx ring +* carries a pointer to one of these XDP rings for its own purposes, such as +* handling XDP_TX action, therefore we can piggyback here on the +* rx_ring->xdp_ring assignment that was done during XDP rings initialization. */ -static inline struct xsk_buff_pool *ice_tx_xsk_pool (struct ice_tx_ring *ring) +static inline void ice_tx_xsk_pool (struct ice_vsi *vsi,u16 qid) { -struct ice_vsi *vsi = ring->vsi; -u16 qid; +struct ice_tx_ring *ring; - qid = ring->q_index - vsi->alloc_txq; + ring = vsi->rx_rings[qid]->xdp_ring; +if (!ring) +return ; -if (!ice_is_xdp_ena_vsi (vsi) || !test_bit (qid, vsi->af_xdp_zc_qps)) -return NULL ; +if (!ice_is_xdp_ena_vsi (vsi) || !test_bit (qid, vsi->af_xdp_zc_qps)) { + ring->xsk_pool =NULL ; +return ; + } -return xsk_get_pool_from_qid (vsi->netdev, qid); + ring->xsk_pool =xsk_get_pool_from_qid (vsi->netdev, qid); }/**
drivers/net/ethernet/intel/ice/ice_lib.c +2 -2
@@ -1983,8 +1983,8 @@ int ice_vsi_cfg_xdp_txqs(struct ice_vsi *vsi)if (ret)return ret; -ice_for_each_xdp_txq (vsi, i) - vsi->xdp_rings[i]->xsk_pool =ice_tx_xsk_pool (vsi->xdp_rings[i]); +ice_for_each_rxq (vsi, i) +ice_tx_xsk_pool (vsi, i);return ret; }
drivers/net/ethernet/intel/ice/ice_main.c +17 -8
@@ -2581,7 +2581,6 @@ static int ice_xdp_alloc_setup_rings(struct ice_vsi *vsi)if (ice_setup_tx_ring (xdp_ring)) goto free_xdp_rings;ice_set_ring_xdp (xdp_ring); - xdp_ring->xsk_pool =ice_tx_xsk_pool (xdp_ring);spin_lock_init (&xdp_ring->tx_lock);for (j =0 ; j < xdp_ring->count; j++) { tx_desc =ICE_TX_DESC (xdp_ring, j);
@@ -2589,13 +2588,6 @@ static int ice_xdp_alloc_setup_rings(struct ice_vsi *vsi) } } -ice_for_each_rxq (vsi, i) { -if (static_key_enabled (&ice_xdp_locking_key)) - vsi->rx_rings[i]->xdp_ring = vsi->xdp_rings[i % vsi->num_xdp_txq]; -else - vsi->rx_rings[i]->xdp_ring = vsi->xdp_rings[i]; - } -return 0 ; free_xdp_rings:
@@ -2685,6 +2677,23 @@ int ice_prepare_xdp_rings(struct ice_vsi *vsi, struct bpf_prog *prog) xdp_rings_rem -= xdp_rings_per_v; } +ice_for_each_rxq (vsi, i) { +if (static_key_enabled (&ice_xdp_locking_key)) { + vsi->rx_rings[i]->xdp_ring = vsi->xdp_rings[i % vsi->num_xdp_txq]; + }else { +struct ice_q_vector *q_vector = vsi->rx_rings[i]->q_vector; +struct ice_tx_ring *ring; + +ice_for_each_tx_ring (ring, q_vector->tx) { +if (ice_ring_is_xdp (ring)) { + vsi->rx_rings[i]->xdp_ring = ring; +break ; + } + } + } +ice_tx_xsk_pool (vsi, i); + } +/* omit the scheduler update if in reset path; XDP queues will be * taken into account at the end of ice_vsi_rebuild, where * ice_cfg_vsi_lan is being called
drivers/net/ethernet/intel/ice/ice_xsk.c +12 -6
@@ -243,7 +243,7 @@ static int ice_qp_ena(struct ice_vsi *vsi, u16 q_idx)if (err) goto free_buf;ice_set_ring_xdp (xdp_ring); - xdp_ring->xsk_pool =ice_tx_xsk_pool (xdp_ring); +ice_tx_xsk_pool (vsi, q_idx); } err =ice_vsi_cfg_rxq (rx_ring);
@@ -329,6 +329,12 @@ int ice_xsk_pool_setup(struct ice_vsi *vsi, struct xsk_buff_pool *pool, u16 qid)bool if_running, pool_present = !!pool;int ret =0 , pool_failure =0 ; +if (qid >= vsi->num_rxq || qid >= vsi->num_txq) { +netdev_err (vsi->netdev,"Please use queue id in scope of combined queues count\n" ); + pool_failure = -EINVAL ; + goto failure; + } +if (!is_power_of_2 (vsi->rx_rings[qid]->count) || !is_power_of_2 (vsi->tx_rings[qid]->count)) {netdev_err (vsi->netdev,"Please align ring sizes to power of 2\n" );
@@ -353,7 +359,7 @@ int ice_xsk_pool_setup(struct ice_vsi *vsi, struct xsk_buff_pool *pool, u16 qid)if (if_running) { ret =ice_qp_ena (vsi, qid);if (!ret && pool_present) -napi_schedule (&vsi->xdp_rings[qid]->q_vector->napi); +napi_schedule (&vsi->rx_rings[qid]->xdp_ring->q_vector->napi);else if (ret)netdev_err (vsi->netdev,"ice_qp_ena error = %d\n" , ret); }
@@ -944,13 +950,13 @@ ice_xsk_wakeup(struct net_device *netdev, u32 queue_id,if (!ice_is_xdp_ena_vsi (vsi))return -EINVAL ; -if (queue_id >= vsi->num_txq) +if (queue_id >= vsi->num_txq || queue_id >= vsi->num_rxq)return -EINVAL ; -if (!vsi->xdp_rings[queue_id]->xsk_pool) -return -EINVAL ; + ring = vsi->rx_rings[queue_id]->xdp_ring; - ring = vsi->xdp_rings[queue_id]; +if (!ring->xsk_pool) +return -EINVAL ;/* The idea here is that if NAPI is running, mark a miss, so * it will run again. If not, trigger an interrupt and
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c +46 -13
83 lines not on this page · raw message
drivers/net/ethernet/lantiq_xrx200.c +8 -1
@@ -193,6 +193,7 @@ static int xrx200_alloc_buf(struct xrx200_chan *ch, void *(*alloc)(unsigned int ch->rx_buff[ch->dma.desc] =alloc (priv->rx_skb_size);if (!ch->rx_buff[ch->dma.desc]) { + ch->rx_buff[ch->dma.desc] = buf; ret = -ENOMEM ; goto skip; }
@@ -239,6 +240,12 @@ static int xrx200_hw_receive(struct xrx200_chan *ch) } skb =build_skb (buf, priv->rx_skb_size); +if (!skb) { +skb_free_frag (buf); + net_dev->stats.rx_dropped++; +return -ENOMEM ; + } +skb_reserve (skb,NET_SKB_PAD );skb_put (skb, len);
@@ -288,7 +295,7 @@ static int xrx200_poll_rx(struct napi_struct *napi, int budget)if (ret ==XRX200_DMA_PACKET_IN_PROGRESS )continue ;if (ret !=XRX200_DMA_PACKET_COMPLETE ) -return ret; +break ; rx++; }else {break ;
drivers/net/ethernet/mediatek/mtk_eth_soc.c +19 -10
@@ -1444,8 +1444,8 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget,int done =0 , bytes =0 ;while (done < budget) { +unsigned int pktlen, *rxdcsum;struct net_device *netdev; -unsigned int pktlen;dma_addr_t dma_addr;u32 hash, reason;int mac =0 ;
@@ -1512,23 +1512,31 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget, pktlen =RX_DMA_GET_PLEN0 (trxd.rxd2); skb->dev = netdev;skb_put (skb, pktlen); -if (trxd.rxd4 & eth->soc->txrx.rx_dma_l4_valid) + +if (MTK_HAS_CAPS (eth->soc->caps,MTK_NETSYS_V2 )) { + hash = trxd.rxd5 &MTK_RXD5_FOE_ENTRY ; +if (hash !=MTK_RXD5_FOE_ENTRY ) +skb_set_hash (skb,jhash_1word (hash,0 ), +PKT_HASH_TYPE_L4 ); + rxdcsum = &trxd.rxd3; + }else { + hash = trxd.rxd4 &MTK_RXD4_FOE_ENTRY ; +if (hash !=MTK_RXD4_FOE_ENTRY ) +skb_set_hash (skb,jhash_1word (hash,0 ), +PKT_HASH_TYPE_L4 ); + rxdcsum = &trxd.rxd4; + } + +if (*rxdcsum & eth->soc->txrx.rx_dma_l4_valid) skb->ip_summed =CHECKSUM_UNNECESSARY ;else skb_checksum_none_assert (skb); skb->protocol =eth_type_trans (skb, netdev); bytes += pktlen; - hash = trxd.rxd4 &MTK_RXD4_FOE_ENTRY ; -if (hash !=MTK_RXD4_FOE_ENTRY ) { - hash =jhash_1word (hash,0 ); -skb_set_hash (skb, hash,PKT_HASH_TYPE_L4 ); - } - reason =FIELD_GET (MTK_RXD4_PPE_CPU_REASON , trxd.rxd4);if (reason ==MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED ) -mtk_ppe_check_skb (eth->ppe, skb, - trxd.rxd4 &MTK_RXD4_FOE_ENTRY ); +mtk_ppe_check_skb (eth->ppe, skb, hash);if (netdev->features &NETIF_F_HW_VLAN_CTAG_RX ) {if (MTK_HAS_CAPS (eth->soc->caps,MTK_NETSYS_V2 )) {
@@ -3761,6 +3769,7 @@ static const struct mtk_soc_data mt7986_data = { .txd_size = sizeof(struct mtk_tx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2), .rx_irq_done_mask = MTK_RX_DONE_INT_V2, + .rx_dma_l4_valid = RX_DMA_L4_VALID_V2, .dma_max_len = MTK_TX_DMA_BUF_LEN_V2, .dma_len_offset = 8, },
drivers/net/ethernet/mediatek/mtk_eth_soc.h +5 -0
@@ -307,6 +307,11 @@#define RX_DMA_L4_VALID_PDMA BIT(30)/* when PDMA is used */ #define RX_DMA_SPECIAL_TAG BIT(22) +/* PDMA descriptor rxd5 */ +#define MTK_RXD5_FOE_ENTRY GENMASK(14, 0) +#define MTK_RXD5_PPE_CPU_REASON GENMASK(22, 18) +#define MTK_RXD5_SRC_PORT GENMASK(29, 26) +#define RX_DMA_GET_SPORT (x) (((x) >> 19) & 0xf)#define RX_DMA_GET_SPORT_V2 (x) (((x) >> 26) & 0x7)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +3 -9
@@ -3678,7 +3678,9 @@ static int set_feature_hw_tc(struct net_device *netdev, bool enable)struct mlx5e_priv *priv =netdev_priv (netdev);#if IS_ENABLED (CONFIG_MLX5_CLS_ACT ) -if (!enable &&mlx5e_tc_num_filters (priv,MLX5_TC_FLAG (NIC_OFFLOAD ))) { +int tc_flag =mlx5e_is_uplink_rep (priv) ?MLX5_TC_FLAG (ESW_OFFLOAD ) : +MLX5_TC_FLAG (NIC_OFFLOAD ); +if (!enable &&mlx5e_tc_num_filters (priv, tc_flag)) {netdev_err (netdev,"Active offloaded tc filters, can't turn hw_tc_offload off\n" );return -EINVAL ;
@@ -4733,14 +4735,6 @@ void mlx5e_build_nic_params(struct mlx5e_priv *priv, struct mlx5e_xsk *xsk, u16/* RQ */ mlx5e_build_rq_params (mdev, params); -/* HW LRO */ -if (MLX5_CAP_ETH (mdev, lro_cap) && - params->rq_wq_type ==MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ ) { -/* No XSK params: checking the availability of striding RQ in general. */ -if (!mlx5e_rx_mpwqe_is_linear_skb (mdev, params,NULL )) - params->packet_merge.type =slow_pci_heuristic (mdev) ? -MLX5E_PACKET_MERGE_NONE :MLX5E_PACKET_MERGE_LRO ; - } params->packet_merge.timeout =mlx5e_choose_lro_timeout (mdev,MLX5E_DEFAULT_LRO_TIMEOUT );/* CQ moderation params */
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +2 -0
@@ -662,6 +662,8 @@ static void mlx5e_build_rep_params(struct net_device *netdev) params->mqprio.num_tc =1 ; params->tunneled_offload_en = false; +if (rep->vport !=MLX5_VPORT_UPLINK ) + params->vlan_strip_disable = true;mlx5_query_min_inline (mdev, ¶ms->tx_min_inline_mode); }
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +2 -1
@@ -427,7 +427,8 @@ esw_setup_vport_dest(struct mlx5_flow_destination *dest, struct mlx5_flow_act *f dest[dest_idx].vport.vhca_id =MLX5_CAP_GEN (esw_attr->dests[attr_idx].mdev, vhca_id); dest[dest_idx].vport.flags |=MLX5_FLOW_DEST_VPORT_VHCA_ID ; -if (mlx5_lag_mpesw_is_activated (esw->dev)) +if (dest[dest_idx].vport.num ==MLX5_VPORT_UPLINK && +mlx5_lag_mpesw_is_activated (esw->dev)) dest[dest_idx].type =MLX5_FLOW_DESTINATION_TYPE_UPLINK ; }if (esw_attr->dests[attr_idx].flags &MLX5_ESW_DEST_ENCAP ) {
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c +34 -23
201 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx5/core/main.c +4 -0
@@ -1472,7 +1472,9 @@ int mlx5_mdev_init(struct mlx5_core_dev *dev, int profile_idx)memcpy (&dev->profile, &profile[profile_idx],sizeof (dev->profile));INIT_LIST_HEAD (&priv->ctx_list);spin_lock_init (&priv->ctx_lock); +lockdep_register_key (&dev->lock_key);mutex_init (&dev->intf_state_mutex); +lockdep_set_class (&dev->intf_state_mutex, &dev->lock_key);mutex_init (&priv->bfregs.reg_head.lock);mutex_init (&priv->bfregs.wc_head.lock);
@@ -1527,6 +1529,7 @@ int mlx5_mdev_init(struct mlx5_core_dev *dev, int profile_idx)mutex_destroy (&priv->bfregs.wc_head.lock);mutex_destroy (&priv->bfregs.reg_head.lock);mutex_destroy (&dev->intf_state_mutex); +lockdep_unregister_key (&dev->lock_key);return err; }
@@ -1545,6 +1548,7 @@ void mlx5_mdev_uninit(struct mlx5_core_dev *dev)mutex_destroy (&priv->bfregs.wc_head.lock);mutex_destroy (&priv->bfregs.reg_head.lock);mutex_destroy (&dev->intf_state_mutex); +lockdep_unregister_key (&dev->lock_key); }static int probe_one (struct pci_dev *pdev,const struct pci_device_id *id)
drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c +6 -3
@@ -376,8 +376,8 @@ static int give_pages(struct mlx5_core_dev *dev, u16 func_id, int npages, goto out_dropped; } } + err =mlx5_cmd_check (dev, err, in, out);if (err) { - err =mlx5_cmd_check (dev, err, in, out);mlx5_core_warn (dev,"func_id 0x%x, npages %d, err %d\n" , func_id, npages, err); goto out_dropped;
@@ -524,10 +524,13 @@ static int reclaim_pages(struct mlx5_core_dev *dev, u16 func_id, int npages, dev->priv.reclaim_pages_discard += npages; }/* if triggered by FW event and failed by FW then ignore */ -if (event && err == -EREMOTEIO ) +if (event && err == -EREMOTEIO ) { err =0 ; + goto out_free; + } + + err =mlx5_cmd_check (dev, err, in, out);if (err) { - err =mlx5_cmd_check (dev, err, in, out);mlx5_core_err (dev,"failed reclaiming pages: err %d\n" , err); goto out_free; }
drivers/net/ethernet/moxa/moxart_ether.c +6 -5
@@ -74,11 +74,6 @@ static int moxart_set_mac_address(struct net_device *ndev, void *addr)static void moxart_mac_free_memory (struct net_device *ndev) {struct moxart_mac_priv_t *priv =netdev_priv (ndev); -int i; - -for (i =0 ; i <RX_DESC_NUM ; i++) -dma_unmap_single (&priv->pdev->dev, priv->rx_mapping[i], - priv->rx_buf_size,DMA_FROM_DEVICE );if (priv->tx_desc_base) dma_free_coherent(&priv->pdev->dev,
@@ -193,6 +188,7 @@ static int moxart_mac_open(struct net_device *ndev)static int moxart_mac_stop (struct net_device *ndev) {struct moxart_mac_priv_t *priv =netdev_priv (ndev); +int i;napi_disable (&priv->napi);
@@ -204,6 +200,11 @@ static int moxart_mac_stop(struct net_device *ndev)/* disable all functions */ writel (0 , priv->base +REG_MAC_CTRL ); +/* unmap areas mapped in moxart_mac_setup_desc_ring() */ +for (i =0 ; i <RX_DESC_NUM ; i++) +dma_unmap_single (&priv->pdev->dev, priv->rx_mapping[i], + priv->rx_buf_size,DMA_FROM_DEVICE ); +return 0 ; }
drivers/net/ethernet/pensando/ionic/ionic_lif.c +90 -5
136 lines not on this page · raw message
drivers/net/ethernet/pensando/ionic/ionic_main.c +3 -1
@@ -474,8 +474,8 @@ static int __ionic_dev_cmd_wait(struct ionic *ionic, unsigned long max_seconds,ionic_opcode_to_str (opcode), opcode, ionic_error_to_str(err), err); -msleep (1000 );iowrite32 (0 , &idev->dev_cmd_regs->done); +msleep (1000 );iowrite32 (1 , &idev->dev_cmd_regs->doorbell); goto try_again; }
@@ -488,6 +488,8 @@ static int __ionic_dev_cmd_wait(struct ionic *ionic, unsigned long max_seconds,return ionic_error_to_errno (err); } +ionic_dev_cmd_clean (ionic); +return 0 ; }
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c +6 -2
@@ -258,14 +258,18 @@ EXPORT_SYMBOL_GPL(stmmac_set_mac_addr);/* Enable disable MAC RX/TX */ void stmmac_set_mac (void __iomem *ioaddr,bool enable) { -u32 value =readl (ioaddr +MAC_CTRL_REG ); +u32 old_val, value; + + old_val =readl (ioaddr +MAC_CTRL_REG ); + value = old_val;if (enable) value |=MAC_ENABLE_RX |MAC_ENABLE_TX ;else value &= ~(MAC_ENABLE_TX |MAC_ENABLE_RX ); -writel (value, ioaddr +MAC_CTRL_REG ); +if (value != old_val) +writel (value, ioaddr +MAC_CTRL_REG ); } void stmmac_get_mac_addr(void __iomem *ioaddr, unsigned char *addr,
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +5 -4
@@ -983,10 +983,10 @@ static void stmmac_mac_link_up(struct phylink_config *config, bool tx_pause, bool rx_pause) {struct stmmac_priv *priv =netdev_priv (to_net_dev (config->dev)); -u32 ctrl; +u32 old_ctrl, ctrl; - ctrl =readl (priv->ioaddr +MAC_CTRL_REG ); - ctrl &= ~priv->hw->link.speed_mask; + old_ctrl =readl (priv->ioaddr +MAC_CTRL_REG ); + ctrl = old_ctrl & ~priv->hw->link.speed_mask;if (interface ==PHY_INTERFACE_MODE_USXGMII ) {switch (speed) {
@@ -1061,7 +1061,8 @@ static void stmmac_mac_link_up(struct phylink_config *config,if (tx_pause && rx_pause)stmmac_mac_flow_ctrl (priv, duplex); -writel (ctrl, priv->ioaddr +MAC_CTRL_REG ); +if (ctrl != old_ctrl) +writel (ctrl, priv->ioaddr +MAC_CTRL_REG );stmmac_mac_set (priv, priv->ioaddr, true);if (phy && priv->dma_cap.eee) {
drivers/net/ipa/ipa_mem.c +1 -1
@@ -568,7 +568,7 @@ static int ipa_smem_init(struct ipa *ipa, u32 item, size_t size) }/* Align the address down and the size up to a page boundary */ - addr =qcom_smem_virt_to_phys (virt) &PAGE_MASK ; + addr =qcom_smem_virt_to_phys (virt); phys = addr &PAGE_MASK ; size =PAGE_ALIGN (size + addr - phys); iova = phys;/* We just want a direct mapping */
drivers/net/ipvlan/ipvtap.c +2 -2
@@ -194,7 +194,7 @@ static struct notifier_block ipvtap_notifier_block __read_mostly = { .notifier_call = ipvtap_device_event, }; -static int ipvtap_init (void ) +static int __init ipvtap_init (void ) {int err;
@@ -228,7 +228,7 @@ static int ipvtap_init(void) }module_init (ipvtap_init); -static void ipvtap_exit (void ) +static void __exit ipvtap_exit(void) {rtnl_link_unregister (&ipvtap_link_ops);unregister_netdevice_notifier (&ipvtap_notifier_block);
drivers/net/macsec.c +5 -6
@@ -449,11 +449,6 @@ static struct macsec_eth_header *macsec_ethhdr(struct sk_buff *skb)return (struct macsec_eth_header *)skb_mac_header (skb); } -static sci_t dev_to_sci (struct net_device *dev,__be16 port) -{ -return make_sci (dev->dev_addr, port); -} -static void __macsec_pn_wrapped (struct macsec_secy *secy,struct macsec_tx_sa *tx_sa) {
@@ -3622,7 +3617,6 @@ static int macsec_set_mac_address(struct net_device *dev, void *p) out:eth_hw_addr_set (dev, addr->sa_data); - macsec->secy.sci =dev_to_sci (dev,MACSEC_PORT_ES );/* If h/w offloading is available, propagate to the device */ if (macsec_is_offloaded (macsec)) {
@@ -3960,6 +3954,11 @@ static bool sci_exists(struct net_device *dev, sci_t sci)return false; } +static sci_t dev_to_sci (struct net_device *dev,__be16 port) +{ +return make_sci (dev->dev_addr, port); +} +static int macsec_add_dev (struct net_device *dev,sci_t sci,u8 icv_len) {struct macsec_dev *macsec =macsec_priv (dev);
drivers/net/phy/phy_device.c +4 -4
@@ -316,11 +316,11 @@ static __maybe_unused int mdio_bus_phy_resume(struct device *dev) phydev->suspended_by_mdio_bus =0 ; -/* If we managed to get here with the PHY state machine in a state other -* than PHY_HALTED this is an indication that something went wrong and -* we should most likely be using MAC managed PM and we are not. +/* If we manged to get here with the PHY state machine in a state neither +* PHY_HALTED nor PHY_READY this is an indication that something went wrong +* and we should most likely be using MAC managed PM and we are not. */ -WARN_ON (phydev->state !=PHY_HALTED && !phydev->mac_managed_pm); +WARN_ON (phydev->state !=PHY_HALTED && phydev->state !=PHY_READY ); ret =phy_init_hw (phydev);if (ret <0 )
drivers/net/usb/r8152.c +12 -15
@@ -5906,6 +5906,11 @@ static void r8153_enter_oob(struct r8152 *tp) ocp_data &= ~NOW_IS_OOB ;ocp_write_byte (tp,MCU_TYPE_PLA ,PLA_OOB_CTRL , ocp_data); +/* RX FIFO settings for OOB */ +ocp_write_dword (tp,MCU_TYPE_PLA ,PLA_RXFIFO_CTRL0 ,RXFIFO_THR1_OOB ); +ocp_write_word (tp,MCU_TYPE_PLA ,PLA_RXFIFO_CTRL1 ,RXFIFO_THR2_OOB ); +ocp_write_word (tp,MCU_TYPE_PLA ,PLA_RXFIFO_CTRL2 ,RXFIFO_THR3_OOB ); +rtl_disable (tp);rtl_reset_bmu (tp);
@@ -6431,21 +6436,8 @@ static void r8156_fc_parameter(struct r8152 *tp)u32 pause_on = tp->fc_pause_on ? tp->fc_pause_on :fc_pause_on_auto (tp);u32 pause_off = tp->fc_pause_off ? tp->fc_pause_off :fc_pause_off_auto (tp); -switch (tp->version) { -case RTL_VER_10 : -case RTL_VER_11 : -ocp_write_word (tp,MCU_TYPE_PLA ,PLA_RX_FIFO_FULL , pause_on /8 ); -ocp_write_word (tp,MCU_TYPE_PLA ,PLA_RX_FIFO_EMPTY , pause_off /8 ); -break ; -case RTL_VER_12 : -case RTL_VER_13 : -case RTL_VER_15 : -ocp_write_word (tp,MCU_TYPE_PLA ,PLA_RX_FIFO_FULL , pause_on /16 ); -ocp_write_word (tp,MCU_TYPE_PLA ,PLA_RX_FIFO_EMPTY , pause_off /16 ); -break ; -default : -break ; - } +ocp_write_word (tp,MCU_TYPE_PLA ,PLA_RX_FIFO_FULL , pause_on /16 ); +ocp_write_word (tp,MCU_TYPE_PLA ,PLA_RX_FIFO_EMPTY , pause_off /16 ); }static void rtl8156_change_mtu (struct r8152 *tp)
@@ -6557,6 +6549,11 @@ static void rtl8156_down(struct r8152 *tp) ocp_data &= ~NOW_IS_OOB ;ocp_write_byte (tp,MCU_TYPE_PLA ,PLA_OOB_CTRL , ocp_data); +/* RX FIFO settings for OOB */ +ocp_write_word (tp,MCU_TYPE_PLA ,PLA_RXFIFO_FULL ,64 /16 ); +ocp_write_word (tp,MCU_TYPE_PLA ,PLA_RX_FIFO_FULL ,1024 /16 ); +ocp_write_word (tp,MCU_TYPE_PLA ,PLA_RX_FIFO_EMPTY ,4096 /16 ); +rtl_disable (tp);rtl_reset_bmu (tp);
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +2 -0
@@ -1403,6 +1403,8 @@ int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,else conn_type =CONNECTION_INFRA_AP ; basic_req.basic.conn_type =cpu_to_le32 (conn_type); +/* Fully active/deactivate BSS network in AP mode only */ + basic_req.basic.active = enable;break ;case NL80211_IFTYPE_STATION :if (vif->p2p)
drivers/net/wireless/mediatek/mt76/mt7921/main.c +38 -9
65 lines not on this page · raw message
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c +1 -4
@@ -1020,7 +1020,7 @@ mt7921_mcu_uni_bss_bcnft(struct mt7921_dev *dev, struct ieee80211_vif *vif, &bcnft_req, sizeof(bcnft_req), true); } -static int +int mt7921_mcu_set_bss_pm (struct mt7921_dev *dev,struct ieee80211_vif *vif,bool enable) {
@@ -1049,9 +1049,6 @@ mt7921_mcu_set_bss_pm(struct mt7921_dev *dev, struct ieee80211_vif *vif, };int err; -if (vif->type !=NL80211_IFTYPE_STATION ) -return 0 ; - err =mt76_mcu_send_msg (&dev->mt76,MCU_CE_CMD (SET_BSS_ABORT ), &req_hdr,sizeof (req_hdr), false);if (err <0 || !enable)
drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h +2 -0
@@ -280,6 +280,8 @@ int mt7921_wpdma_reset(struct mt7921_dev *dev, bool force);int mt7921_wpdma_reinit_cond (struct mt7921_dev *dev);void mt7921_dma_cleanup (struct mt7921_dev *dev);int mt7921_run_firmware (struct mt7921_dev *dev); +int mt7921_mcu_set_bss_pm (struct mt7921_dev *dev,struct ieee80211_vif *vif, +bool enable);int mt7921_mcu_sta_update (struct mt7921_dev *dev,struct ieee80211_sta *sta,struct ieee80211_vif *vif,bool enable,enum mt76_sta_info_state state);
drivers/nfc/pn533/uart.c +1 -0
@@ -310,6 +310,7 @@ static void pn532_uart_remove(struct serdev_device *serdev)pn53x_unregister_nfc (pn532->priv);serdev_device_close (serdev);pn53x_common_clean (pn532->priv); +del_timer_sync (&pn532->cmd_timeout);kfree_skb (pn532->recv_skb);kfree (pn532); }
fs/btrfs/block-group.c +15 -32
47 lines not on this page · raw message
include/linux/netfilter_bridge/ebtables.h +0 -4
Lines of this file are not shown. View the raw message.
mm/gup.c +47 -22
69 lines not on this page · raw message
mm/huge_memory.c +44 -21
65 lines not on this page · raw message
net/rxrpc/sendmsg.c +54 -38
92 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.