Linux 6.12.57
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.12.57 kernel.
All users of the 6.12 kernel series must upgrade.
The updated 6.12.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.12.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/sphinx/kernel_abi.py | 4 + Documentation/sphinx/kernel_feat.py | 4 + Documentation/sphinx/kernel_include.py | 6 +- Documentation/sphinx/maintainers_include.py | 4 + Makefile | 2 arch/alpha/kernel/asm-offsets.c | 1 arch/arc/kernel/asm-offsets.c | 1 arch/arm/kernel/asm-offsets.c | 2 arch/arm64/kernel/asm-offsets.c | 1 arch/csky/kernel/asm-offsets.c | 1 arch/hexagon/kernel/asm-offsets.c | 1 arch/loongarch/kernel/asm-offsets.c | 2 arch/m68k/kernel/asm-offsets.c | 1 arch/microblaze/kernel/asm-offsets.c | 1 arch/mips/kernel/asm-offsets.c | 2 arch/nios2/kernel/asm-offsets.c | 1 arch/openrisc/kernel/asm-offsets.c | 1 arch/parisc/kernel/asm-offsets.c | 1 arch/powerpc/kernel/asm-offsets.c | 1 arch/riscv/kernel/asm-offsets.c | 1 arch/s390/kernel/asm-offsets.c | 1 arch/sh/kernel/asm-offsets.c | 1 arch/sparc/kernel/asm-offsets.c | 1 arch/um/kernel/asm-offsets.c | 2 arch/x86/events/intel/core.c | 10 +-- arch/x86/include/asm/perf_event.h | 6 +- arch/x86/kernel/cpu/bugs.c | 9 +-- arch/x86/kvm/pmu.h | 2 arch/xtensa/kernel/asm-offsets.c | 1 drivers/dma-buf/udmabuf.c | 2 drivers/edac/edac_mc_sysfs.c | 24 +++++++++ drivers/gpio/gpio-idio-16.c | 5 + drivers/gpio/gpio-regmap.c | 53 ++++++++++++++++++- drivers/iommu/intel/iommu.c | 7 +- drivers/net/bonding/bond_main.c | 11 ++-- drivers/net/bonding/bond_options.c | 3 + drivers/net/ethernet/sfc/ef100_netdev.c | 6 +- drivers/net/ethernet/sfc/ef100_nic.c | 47 +++++++---------- drivers/net/wireless/ath/ath12k/mac.c | 6 +- fs/btrfs/disk-io.c | 2 fs/btrfs/extent-tree.c | 6 +- fs/btrfs/inode.c | 7 +- fs/btrfs/scrub.c | 3 - fs/btrfs/transaction.c | 2 fs/btrfs/tree-checker.c | 37 +++++++++++++ fs/btrfs/tree-log.c | 64 ++++++++++++++++++------ fs/btrfs/zoned.c | 8 +-- fs/btrfs/zoned.h | 9 ++- fs/f2fs/file.c | 8 +-- fs/f2fs/segment.c | 20 +++---- include/linux/audit.h | 2 include/linux/bitops.h | 1 include/linux/bits.h | 38 +++++++++++++- include/linux/gpio/regmap.h | 16 ++++++ include/net/bonding.h | 1 include/net/pkt_sched.h | 25 +++++++++ kernel/cgroup/cpuset.c | 6 -- kernel/events/callchain.c | 16 +++--- kernel/events/core.c | 7 +- kernel/seccomp.c | 32 +++++++++--- net/mptcp/pm_netlink.c | 6 ++ net/sched/sch_api.c | 10 --- net/sched/sch_hfsc.c | 16 ------ net/sched/sch_qfq.c | 2 net/wireless/reg.c | 4 + tools/sched_ext/scx_qmap.bpf.c | 18 ++++++ tools/testing/selftests/net/mptcp/mptcp_join.sh | 3 - 67 files changed, 441 insertions(+), 163 deletions(-)
Aditya Kumar Singh (1):
wifi: ath12k: fix read pointer after free in ath12k_mac_assign_vif_to_vdev()
Alexander Wetzel (1):
wifi: cfg80211: Add missing lock in cfg80211_check_and_end_cac()
Avadhut Naik (1):
EDAC/mc_sysfs: Increase legacy channel support to 16
Chao Yu (1):
f2fs: fix to avoid panic once fallocation fails for pinfile
Chen Ridong (1):
cpuset: Use new excpus for nocpu error check when enabling root partition
Dan Carpenter (1):
btrfs: tree-checker: fix bounds check in check_inode_extref()
Dapeng Mi (1):
perf/x86/intel: Add ICL_FIXED_0_ADAPTIVE bit into INTEL_FIXED_BITS_MASK
David Kaplan (2):
x86/bugs: Report correct retbleed mitigation status x86/bugs: Fix reporting of LFENCE retpoline
Edward Cree (1):
sfc: fix NULL dereferences in ef100_process_design_param()
Filipe Manana (6):
btrfs: abort transaction on specific error places when walking log tree
btrfs: abort transaction in the process_one_buffer() log tree walk callback
btrfs: always drop log root tree reference in btrfs_replay_log()
btrfs: use level argument in log tree walk callback replay_one_buffer()
btrfs: abort transaction if we fail to update inode in log replay dir fixup
btrfs: use smp_mb__after_atomic() when forcing COW in create_pending_snapshot()
Geliang Tang (1):
selftests: mptcp: disable add_addr retrans in endpoint_tests
Greg Kroah-Hartman (1):
Linux 6.12.57
Hangbin Liu (1):
bonding: return detailed error when loading native XDP fails
Ioana Ciornei (1):
gpio: regmap: add the .fixed_direction_output configuration parameter
Jiri Olsa (1):
seccomp: passthrough uprobe systemcall without filtering
Johannes Thumshirn (1):
btrfs: zoned: return error from btrfs_zone_finish_endio()
Jonathan Corbet (1):
docs: kdoc: handle the obsolescensce of docutils.ErrorString()
Josh Poimboeuf (2):
perf: Have get_perf_callchain() return NULL if crosstask and user are set
perf: Skip user unwind if the task is a kernel thread
Kees Bakker (1):
iommu/vt-d: Avoid use of NULL after WARN_ON_ONCE
Mathieu Dubois-Briand (1):
gpio: regmap: Allow to allocate regmap-irq device
Matthieu Baerts (NGI0) (2):
selftests: mptcp: join: mark 'delete re-add signal' as skipped if not supported
mptcp: pm: in-kernel: C-flag: handle late ADD_ADDR
Menglong Dong (1):
arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c
Naohiro Aota (1):
btrfs: zoned: refine extent allocator hint selection
Qu Wenruo (1):
btrfs: tree-checker: add inode extref checks
Richard Guy Briggs (1):
audit: record fanotify event regardless of presence of rules
Steven Rostedt (1):
perf: Use current->flags & PF_KTHREAD|PF_USER_WORKER instead of current->mm == NULL
Tejun Heo (1):
sched_ext: Make qmap dump operation non-destructive
Thorsten Blum (1):
btrfs: scrub: replace max_t()/min_t() with clamp() in scrub_throttle_dev_io()
Vincent Mailhol (2):
bits: add comments and newlines to #if, #else and #endif directives
bits: introduce fixed-type GENMASK_U*()
Wang Liang (1):
bonding: check xdp prog when set bond mode
William Breathitt Gray (1):
gpio: idio-16: Define fixed direction of the GPIO lines
Xiang Mei (1):
net/sched: sch_qfq: Fix null-deref in agg_dequeue
Xiaogang Chen (1):
udmabuf: fix a buf size overflow issue during udmabuf creation
Greg Kroah-Hartman
maintainerDocumentation/sphinx/kernel_abi.py +3 -1
@@ -42,9 +42,11 @@ import kernellog from docutils import nodes, statemachine from docutils.statemachine import ViewList from docutils.parsers.rst import directives, Directive -from docutils.utils.error_reporting import ErrorString from sphinx.util.docutils import switch_source_input +def ErrorString(exc): # Shamelessly stolen from docutils + return f'{exc.__class__.__name}: {exc}' + __version__ = '1.0' def setup(app):
Documentation/sphinx/kernel_feat.py +3 -1
@@ -40,9 +40,11 @@ import sys from docutils import nodes, statemachine from docutils.statemachine import ViewList from docutils.parsers.rst import directives, Directive -from docutils.utils.error_reporting import ErrorString from sphinx.util.docutils import switch_source_input +def ErrorString(exc): # Shamelessly stolen from docutils + return f'{exc.__class__.__name}: {exc}' + __version__ = '1.0' def setup(app):
Documentation/sphinx/kernel_include.py +4 -2
@@ -34,13 +34,15 @@ u""" import os.path from docutils import io, nodes, statemachine -from docutils.utils.error_reporting import SafeString, ErrorString from docutils.parsers.rst import directives from docutils.parsers.rst.directives.body import CodeBlock, NumberLines from docutils.parsers.rst.directives.misc import Include __version__ = '1.0' +def ErrorString(exc): # Shamelessly stolen from docutils + return f'{exc.__class__.__name}: {exc}' + # ============================================================================== def setup(app): # ==============================================================================
@@ -111,7 +113,7 @@ class KernelInclude(Include): raise self.severe('Problems with "%s" directive path:\n' 'Cannot encode input file path "%s" ' '(wrong locale?).' % - (self.name, SafeString(path))) + (self.name, path)) except IOError as error: raise self.severe('Problems with "%s" directive path:\n%s.' % (self.name, ErrorString(error)))
Documentation/sphinx/maintainers_include.py +3 -1
@@ -22,10 +22,12 @@ import re import os.path from docutils import statemachine -from docutils.utils.error_reporting import ErrorString from docutils.parsers.rst import Directive from docutils.parsers.rst.directives.misc import Include +def ErrorString(exc): # Shamelessly stolen from docutils + return f'{exc.__class__.__name}: {exc}' + __version__ = '1.0' def setup(app):
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 12 -SUBLEVEL = 56 +SUBLEVEL = 57 EXTRAVERSION = NAME = Baby Opossum Posse
arch/alpha/kernel/asm-offsets.c +1 -0
@@ -4,6 +4,7 @@* This code generates raw asm output which is post-processed to extract * and format the required data. */ +#define COMPILE_OFFSETS #include <linux/types.h> #include <linux/stddef.h>
arch/arc/kernel/asm-offsets.c +1 -0
@@ -2,6 +2,7 @@/* * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) */ +#define COMPILE_OFFSETS #include <linux/sched.h> #include <linux/mm.h>
arch/arm/kernel/asm-offsets.c +2 -0
@@ -7,6 +7,8 @@* This code generates raw asm output which is post-processed to extract * and format the required data. */ +#define COMPILE_OFFSETS +#include <linux/compiler.h> #include <linux/sched.h> #include <linux/mm.h>
arch/arm64/kernel/asm-offsets.c +1 -0
@@ -6,6 +6,7 @@* 2001-2002 Keith Owens * Copyright (C) 2012 ARM Ltd. */ +#define COMPILE_OFFSETS #include <linux/arm_sdei.h> #include <linux/sched.h>
arch/csky/kernel/asm-offsets.c +1 -0
@@ -1,5 +1,6 @@// SPDX-License-Identifier: GPL-2.0 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. +#define COMPILE_OFFSETS #include <linux/sched.h> #include <linux/kernel_stat.h>
arch/hexagon/kernel/asm-offsets.c +1 -0
@@ -8,6 +8,7 @@* * Copyright (c) 2010-2012, The Linux Foundation. All rights reserved. */ +#define COMPILE_OFFSETS #include <linux/compat.h> #include <linux/types.h>
arch/loongarch/kernel/asm-offsets.c +2 -0
@@ -4,6 +4,8 @@* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ +#define COMPILE_OFFSETS +#include <linux/types.h> #include <linux/sched.h> #include <linux/mm.h>
arch/m68k/kernel/asm-offsets.c +1 -0
@@ -9,6 +9,7 @@* #defines from the assembly-language output. */ +#define COMPILE_OFFSETS #define ASM_OFFSETS_C #include <linux/stddef.h>
arch/microblaze/kernel/asm-offsets.c +1 -0
@@ -7,6 +7,7 @@* License. See the file "COPYING" in the main directory of this archive * for more details. */ +#define COMPILE_OFFSETS #include <linux/init.h> #include <linux/stddef.h>
arch/mips/kernel/asm-offsets.c +2 -0
@@ -9,6 +9,8 @@* Kevin Kissell, [email protected] and Carsten Langgaard, [email protected] * Copyright (C) 2000 MIPS Technologies, Inc. */ +#define COMPILE_OFFSETS +#include <linux/compat.h> #include <linux/types.h> #include <linux/sched.h>
arch/nios2/kernel/asm-offsets.c +1 -0
@@ -2,6 +2,7 @@/* * Copyright (C) 2011 Tobias Klauser <[email protected]> */ +#define COMPILE_OFFSETS #include <linux/stddef.h> #include <linux/sched.h>
arch/openrisc/kernel/asm-offsets.c +1 -0
@@ -18,6 +18,7 @@* compile this file to assembler, and then extract the * #defines from the assembly-language output. */ +#define COMPILE_OFFSETS #include <linux/signal.h> #include <linux/sched.h>
arch/parisc/kernel/asm-offsets.c +1 -0
@@ -13,6 +13,7 @@* Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org> * Copyright (C) 2003 James Bottomley <jejb at parisc-linux.org> */ +#define COMPILE_OFFSETS #include <linux/types.h> #include <linux/sched.h>
arch/powerpc/kernel/asm-offsets.c +1 -0
@@ -8,6 +8,7 @@* compile this file to assembler, and then extract the * #defines from the assembly-language output. */ +#define COMPILE_OFFSETS #include <linux/compat.h> #include <linux/signal.h>
arch/riscv/kernel/asm-offsets.c +1 -0
@@ -3,6 +3,7 @@* Copyright (C) 2012 Regents of the University of California * Copyright (C) 2017 SiFive */ +#define COMPILE_OFFSETS #include <linux/kbuild.h> #include <linux/mm.h>
arch/s390/kernel/asm-offsets.c +1 -0
@@ -4,6 +4,7 @@* This code generates raw asm output which is post-processed to extract * and format the required data. */ +#define COMPILE_OFFSETS #define ASM_OFFSETS_C
arch/sh/kernel/asm-offsets.c +1 -0
@@ -8,6 +8,7 @@* compile this file to assembler, and then extract the * #defines from the assembly-language output. */ +#define COMPILE_OFFSETS #include <linux/stddef.h> #include <linux/types.h>
arch/sparc/kernel/asm-offsets.c +1 -0
@@ -10,6 +10,7 @@* * On sparc, thread_info data is static and TI_XXX offsets are computed by hand. */ +#define COMPILE_OFFSETS #include <linux/sched.h> #include <linux/mm_types.h>
arch/um/kernel/asm-offsets.c +2 -0
@@ -1 +1,3 @@ +#define COMPILE_OFFSETS +#include <sysdep/kernel-offsets.h>
arch/x86/events/intel/core.c +3 -7
@@ -2812,8 +2812,8 @@ static void intel_pmu_enable_fixed(struct perf_event *event) {struct cpu_hw_events *cpuc =this_cpu_ptr (&cpu_hw_events);struct hw_perf_event *hwc = &event->hw; -u64 mask, bits =0 ;int idx = hwc->idx; +u64 bits =0 ;if (is_topdown_idx (idx)) {struct cpu_hw_events *cpuc =this_cpu_ptr (&cpu_hw_events);
@@ -2849,14 +2849,10 @@ static void intel_pmu_enable_fixed(struct perf_event *event) idx -=INTEL_PMC_IDX_FIXED ; bits =intel_fixed_bits_by_idx (idx, bits); - mask =intel_fixed_bits_by_idx (idx,INTEL_FIXED_BITS_MASK ); - -if (x86_pmu.intel_cap.pebs_baseline && event->attr.precise_ip) { +if (x86_pmu.intel_cap.pebs_baseline && event->attr.precise_ip) bits |=intel_fixed_bits_by_idx (idx,ICL_FIXED_0_ADAPTIVE ); - mask |=intel_fixed_bits_by_idx (idx,ICL_FIXED_0_ADAPTIVE ); - } - cpuc->fixed_ctrl_val &= ~mask; + cpuc->fixed_ctrl_val &= ~intel_fixed_bits_by_idx (idx,INTEL_FIXED_BITS_MASK ); cpuc->fixed_ctrl_val |= bits; }
arch/x86/include/asm/perf_event.h +5 -1
@@ -35,7 +35,6 @@#define ARCH_PERFMON_EVENTSEL_EQ (1ULL << 36)#define ARCH_PERFMON_EVENTSEL_UMASK2 (0xFFULL << 40) -#define INTEL_FIXED_BITS_MASK 0xFULL#define INTEL_FIXED_BITS_STRIDE 4#define INTEL_FIXED_0_KERNEL (1ULL << 0)#define INTEL_FIXED_0_USER (1ULL << 1)
@@ -47,6 +46,11 @@#define ICL_EVENTSEL_ADAPTIVE (1ULL << 34)#define ICL_FIXED_0_ADAPTIVE (1ULL << 32) +#define INTEL_FIXED_BITS_MASK \ + (INTEL_FIXED_0_KERNEL | INTEL_FIXED_0_USER | \ + INTEL_FIXED_0_ANYTHREAD | INTEL_FIXED_0_ENABLE_PMI | \ + ICL_FIXED_0_ADAPTIVE) +#define intel_fixed_bits_by_idx (_idx, _bits) \ ((_bits) << ((_idx) * INTEL_FIXED_BITS_STRIDE))
arch/x86/kernel/cpu/bugs.c +4 -5
@@ -1186,8 +1186,10 @@ static void __init retbleed_select_mitigation(void) retbleed_mitigation =RETBLEED_MITIGATION_EIBRS ;break ;default : -if (retbleed_mitigation !=RETBLEED_MITIGATION_STUFF ) +if (retbleed_mitigation !=RETBLEED_MITIGATION_STUFF ) {pr_err (RETBLEED_INTEL_MSG ); + retbleed_mitigation =RETBLEED_MITIGATION_NONE ; + } } }
@@ -1596,7 +1598,7 @@ spectre_v2_user_select_mitigation(void)static const char *const spectre_v2_strings[] = { [SPECTRE_V2_NONE ] ="Vulnerable" , [SPECTRE_V2_RETPOLINE ] ="Mitigation: Retpolines" , - [SPECTRE_V2_LFENCE ] ="Mitigation: LFENCE" , + [SPECTRE_V2_LFENCE ] ="Vulnerable: LFENCE" , [SPECTRE_V2_EIBRS ] ="Mitigation: Enhanced / Automatic IBRS" , [SPECTRE_V2_EIBRS_LFENCE ] ="Mitigation: Enhanced / Automatic IBRS + LFENCE" , [SPECTRE_V2_EIBRS_RETPOLINE ] ="Mitigation: Enhanced / Automatic IBRS + Retpolines" ,
@@ -3249,9 +3251,6 @@ static const char *spectre_bhi_state(void)static ssize_t spectre_v2_show_state (char *buf) { -if (spectre_v2_enabled ==SPECTRE_V2_LFENCE ) -return sysfs_emit (buf,"Vulnerable: LFENCE\n" ); -if (spectre_v2_enabled ==SPECTRE_V2_EIBRS &&unprivileged_ebpf_enabled ())return sysfs_emit (buf,"Vulnerable: eIBRS with unprivileged eBPF\n" );
arch/x86/kvm/pmu.h +1 -1
@@ -13,7 +13,7 @@#define MSR_IA32_MISC_ENABLE_PMU_RO_MASK (MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL | \ MSR_IA32_MISC_ENABLE_BTS_UNAVAIL) -/* retrieve the 4 bits for EN and PMI out of IA32_FIXED_CTR_CTRL */ +/* retrieve a fixed counter bits out of IA32_FIXED_CTR_CTRL */ #define fixed_ctrl_field (ctrl_reg, idx) \ (((ctrl_reg) >> ((idx) * INTEL_FIXED_BITS_STRIDE)) & INTEL_FIXED_BITS_MASK)
arch/xtensa/kernel/asm-offsets.c +1 -0
@@ -11,6 +11,7 @@* * Chris Zankel <[email protected]> */ +#define COMPILE_OFFSETS #include <asm/processor.h> #include <asm/coprocessor.h>
drivers/dma-buf/udmabuf.c +1 -1
@@ -350,7 +350,7 @@ static long udmabuf_create(struct miscdevice *device,return -ENOMEM ;INIT_LIST_HEAD (&ubuf->unpin_list); - pglimit = (size_limit_mb *1024 *1024 ) >>PAGE_SHIFT ; + pglimit = ((u64 )size_limit_mb *1024 *1024 ) >>PAGE_SHIFT ;for (i =0 ; i < head->count; i++) {if (!PAGE_ALIGNED (list[i].offset)) goto err;
drivers/edac/edac_mc_sysfs.c +24 -0
@@ -305,6 +305,14 @@ DEVICE_CHANNEL(ch10_dimm_label, S_IRUGO | S_IWUSR, channel_dimm_label_show, channel_dimm_label_store, 10);DEVICE_CHANNEL (ch11_dimm_label,S_IRUGO |S_IWUSR , channel_dimm_label_show, channel_dimm_label_store,11 ); +DEVICE_CHANNEL (ch12_dimm_label,S_IRUGO |S_IWUSR , + channel_dimm_label_show, channel_dimm_label_store,12 ); +DEVICE_CHANNEL (ch13_dimm_label,S_IRUGO |S_IWUSR , + channel_dimm_label_show, channel_dimm_label_store,13 ); +DEVICE_CHANNEL (ch14_dimm_label,S_IRUGO |S_IWUSR , + channel_dimm_label_show, channel_dimm_label_store,14 ); +DEVICE_CHANNEL (ch15_dimm_label,S_IRUGO |S_IWUSR , + channel_dimm_label_show, channel_dimm_label_store,15 );/* Total possible dynamic DIMM Label attribute file table */ static struct attribute *dynamic_csrow_dimm_attr[] = {
@@ -320,6 +328,10 @@ static struct attribute *dynamic_csrow_dimm_attr[] = { &dev_attr_legacy_ch9_dimm_label.attr.attr, &dev_attr_legacy_ch10_dimm_label.attr.attr, &dev_attr_legacy_ch11_dimm_label.attr.attr, + &dev_attr_legacy_ch12_dimm_label.attr.attr, + &dev_attr_legacy_ch13_dimm_label.attr.attr, + &dev_attr_legacy_ch14_dimm_label.attr.attr, + &dev_attr_legacy_ch15_dimm_label.attr.attr, NULL };
@@ -348,6 +360,14 @@ DEVICE_CHANNEL(ch10_ce_count, S_IRUGO, channel_ce_count_show, NULL, 10);DEVICE_CHANNEL (ch11_ce_count,S_IRUGO , channel_ce_count_show,NULL ,11 ); +DEVICE_CHANNEL (ch12_ce_count,S_IRUGO , + channel_ce_count_show,NULL ,12 ); +DEVICE_CHANNEL (ch13_ce_count,S_IRUGO , + channel_ce_count_show,NULL ,13 ); +DEVICE_CHANNEL (ch14_ce_count,S_IRUGO , + channel_ce_count_show,NULL ,14 ); +DEVICE_CHANNEL (ch15_ce_count,S_IRUGO , + channel_ce_count_show,NULL ,15 );/* Total possible dynamic ce_count attribute file table */ static struct attribute *dynamic_csrow_ce_count_attr[] = {
@@ -363,6 +383,10 @@ static struct attribute *dynamic_csrow_ce_count_attr[] = { &dev_attr_legacy_ch9_ce_count.attr.attr, &dev_attr_legacy_ch10_ce_count.attr.attr, &dev_attr_legacy_ch11_ce_count.attr.attr, + &dev_attr_legacy_ch12_ce_count.attr.attr, + &dev_attr_legacy_ch13_ce_count.attr.attr, + &dev_attr_legacy_ch14_ce_count.attr.attr, + &dev_attr_legacy_ch15_ce_count.attr.attr, NULL };
drivers/gpio/gpio-idio-16.c +5 -0
@@ -3,6 +3,7 @@* GPIO library for the ACCES IDIO-16 family * Copyright (C) 2022 William Breathitt Gray */ +#include <linux/bitmap.h> #include <linux/bits.h> #include <linux/device.h> #include <linux/err.h>
@@ -106,6 +107,7 @@ int devm_idio_16_regmap_register(struct device *const dev,struct idio_16_data *data;struct regmap_irq_chip *chip;struct regmap_irq_chip_data *chip_data; +DECLARE_BITMAP (fixed_direction_output,IDIO_16_NGPIO );if (!config->parent)return -EINVAL ;
@@ -163,6 +165,9 @@ int devm_idio_16_regmap_register(struct device *const dev, gpio_config.irq_domain =regmap_irq_get_domain (chip_data); gpio_config.reg_mask_xlate = idio_16_reg_mask_xlate; +bitmap_from_u64 (fixed_direction_output,GENMASK_U64 (15 ,0 )); + gpio_config.fixed_direction_output = fixed_direction_output; +return PTR_ERR_OR_ZERO (devm_gpio_regmap_register (dev, &gpio_config)); }EXPORT_SYMBOL_GPL (devm_idio_16_regmap_register);
drivers/gpio/gpio-regmap.c +50 -3
93 lines not on this page · raw message
drivers/iommu/intel/iommu.c +4 -3
@@ -4328,13 +4328,14 @@ static void intel_iommu_remove_dev_pasid(struct device *dev, ioasid_t pasid,break ; } } -WARN_ON_ONCE (!dev_pasid);spin_unlock_irqrestore (&dmar_domain->lock, flags);cache_tag_unassign_domain (dmar_domain, dev, pasid);domain_detach_iommu (dmar_domain, iommu); -intel_iommu_debugfs_remove_dev_pasid (dev_pasid); -kfree (dev_pasid); +if (!WARN_ON_ONCE (!dev_pasid)) { +intel_iommu_debugfs_remove_dev_pasid (dev_pasid); +kfree (dev_pasid); + }intel_pasid_tear_down_entry (iommu, dev, pasid, false);intel_drain_pasid_prq (dev, pasid); }
drivers/net/bonding/bond_main.c +7 -4
@@ -322,9 +322,9 @@ static bool bond_sk_check(struct bonding *bond) } } -static bool bond_xdp_check (struct bonding *bond) +bool bond_xdp_check (struct bonding *bond,int mode) { -switch (BOND_MODE (bond)) { +switch (mode) {case BOND_MODE_ROUNDROBIN :case BOND_MODE_ACTIVEBACKUP :return true;
@@ -1930,7 +1930,7 @@ void bond_xdp_set_features(struct net_device *bond_dev)ASSERT_RTNL (); -if (!bond_xdp_check (bond) || !bond_has_slaves (bond)) { +if (!bond_xdp_check (bond,BOND_MODE (bond)) || !bond_has_slaves (bond)) {xdp_clear_features_flag (bond_dev);return ; }
@@ -5699,8 +5699,11 @@ static int bond_xdp_set(struct net_device *dev, struct bpf_prog *prog,ASSERT_RTNL (); -if (!bond_xdp_check (bond)) +if (!bond_xdp_check (bond,BOND_MODE (bond))) { +BOND_NL_ERR (dev, extack, +"No native XDP support for the current bonding mode" );return -EOPNOTSUPP ; + } old_prog = bond->xdp_prog; bond->xdp_prog = prog;
drivers/net/bonding/bond_options.c +3 -0
@@ -868,6 +868,9 @@ static bool bond_set_xfrm_features(struct bonding *bond)static int bond_option_mode_set (struct bonding *bond,const struct bond_opt_value *newval) { +if (bond->xdp_prog && !bond_xdp_check (bond, newval->value)) +return -EOPNOTSUPP ; +if (!bond_mode_uses_arp (newval->value)) {if (bond->params.arp_interval) { netdev_dbg(bond->dev, "%s mode is incompatible with arp monitoring, start mii monitoring\n",
drivers/net/ethernet/sfc/ef100_netdev.c +3 -3
@@ -450,8 +450,9 @@ int ef100_probe_netdev(struct efx_probe_data *probe_data) net_dev->hw_enc_features |= efx->type->offload_features; net_dev->vlan_features |=NETIF_F_HW_CSUM |NETIF_F_SG |NETIF_F_HIGHDMA |NETIF_F_ALL_TSO ; -netif_set_tso_max_segs (net_dev, -ESE_EF100_DP_GZ_TSO_MAX_HDR_NUM_SEGS_DEFAULT ); + nic_data = efx->nic_data; +netif_set_tso_max_size (efx->net_dev, nic_data->tso_max_payload_len); +netif_set_tso_max_segs (efx->net_dev, nic_data->tso_max_payload_num_segs); efx->mdio.dev = net_dev; rc =efx_ef100_init_datapath_caps (efx);
@@ -478,7 +479,6 @@ int ef100_probe_netdev(struct efx_probe_data *probe_data)/* Don't fail init if RSS setup doesn't work. */ efx_mcdi_push_default_indir_table (efx, efx->n_rx_channels); - nic_data = efx->nic_data; rc =ef100_get_mac_address (efx, net_dev->perm_addr,CLIENT_HANDLE_SELF , efx->type->is_vf);if (rc)
drivers/net/ethernet/sfc/ef100_nic.c +21 -26
93 lines not on this page · raw message
drivers/net/wireless/ath/ath12k/mac.c +3 -3
@@ -6733,15 +6733,15 @@ static struct ath12k *ath12k_mac_assign_vif_to_vdev(struct ieee80211_hw *hw,mutex_lock (&ar->conf_mutex); -if (arvif->is_created) - goto flush; -if (vif->type ==NL80211_IFTYPE_AP && ar->num_peers > (ar->max_num_peers -1 )) {ath12k_warn (ab,"failed to create vdev due to insufficient peer entry resource in firmware\n" ); goto unlock; } +if (arvif->is_created) + goto flush; +if (ar->num_created_vdevs > (TARGET_NUM_VDEVS -1 )) {ath12k_warn (ab,"failed to create vdev, reached max vdev limit %d\n" ,TARGET_NUM_VDEVS );
fs/btrfs/disk-io.c +1 -1
@@ -2100,10 +2100,10 @@ static int btrfs_replay_log(struct btrfs_fs_info *fs_info,/* returns with log_tree_root freed on success */ ret =btrfs_recover_log_trees (log_tree_root); +btrfs_put_root (log_tree_root);if (ret) {btrfs_handle_fs_error (fs_info, ret,"Failed to recover log tree" ); -btrfs_put_root (log_tree_root);return ret; }
fs/btrfs/extent-tree.c +4 -2
@@ -4299,7 +4299,8 @@ static int prepare_allocation_clustered(struct btrfs_fs_info *fs_info, }static int prepare_allocation_zoned (struct btrfs_fs_info *fs_info, -struct find_free_extent_ctl *ffe_ctl) +struct find_free_extent_ctl *ffe_ctl, +struct btrfs_space_info *space_info) {if (ffe_ctl->for_treelog) {spin_lock (&fs_info->treelog_bg_lock);
@@ -4323,6 +4324,7 @@ static int prepare_allocation_zoned(struct btrfs_fs_info *fs_info,u64 avail = block_group->zone_capacity - block_group->alloc_offset;if (block_group_bits (block_group, ffe_ctl->flags) && + block_group->space_info == space_info && avail >= ffe_ctl->num_bytes) { ffe_ctl->hint_byte = block_group->start;break ;
@@ -4344,7 +4346,7 @@ static int prepare_allocation(struct btrfs_fs_info *fs_info,return prepare_allocation_clustered (fs_info, ffe_ctl, space_info, ins);case BTRFS_EXTENT_ALLOC_ZONED : -return prepare_allocation_zoned (fs_info, ffe_ctl); +return prepare_allocation_zoned (fs_info, ffe_ctl, space_info);default :BUG (); }
fs/btrfs/inode.c +4 -3
@@ -3174,9 +3174,10 @@ int btrfs_finish_one_ordered(struct btrfs_ordered_extent *ordered_extent) goto out; } -if (btrfs_is_zoned (fs_info)) -btrfs_zone_finish_endio (fs_info, ordered_extent->disk_bytenr, - ordered_extent->disk_num_bytes); + ret =btrfs_zone_finish_endio (fs_info, ordered_extent->disk_bytenr, + ordered_extent->disk_num_bytes); +if (ret) + goto out;if (test_bit (BTRFS_ORDERED_TRUNCATED , &ordered_extent->flags)) { truncated = true;
fs/btrfs/scrub.c +1 -2
@@ -1270,8 +1270,7 @@ static void scrub_throttle_dev_io(struct scrub_ctx *sctx, struct btrfs_device *d* Slice is divided into intervals when the IO is submitted, adjust by * bwlimit and maximum of 64 intervals. */ - div =max_t (u32,1 , (u32)(bwlimit / (16 *1024 *1024 ))); - div =min_t (u32,64 , div); + div =clamp (bwlimit / (16 *1024 *1024 ),1 ,64 );/* Start new epoch, set deadline */ now =ktime_get ();
fs/btrfs/transaction.c +1 -1
@@ -1810,7 +1810,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, }/* see comments in should_cow_block() */ set_bit (BTRFS_ROOT_FORCE_COW , &root->state); -smp_wmb (); +smp_mb__after_atomic ();btrfs_set_root_node (new_root_item, tmp);/* record when the snapshot was created in key.offset */
fs/btrfs/tree-checker.c +37 -0
@@ -183,6 +183,7 @@ static bool check_prev_ino(struct extent_buffer *leaf,/* Only these key->types needs to be checked */ ASSERT (key->type ==BTRFS_XATTR_ITEM_KEY || key->type ==BTRFS_INODE_REF_KEY || + key->type ==BTRFS_INODE_EXTREF_KEY || key->type ==BTRFS_DIR_INDEX_KEY || key->type ==BTRFS_DIR_ITEM_KEY || key->type ==BTRFS_EXTENT_DATA_KEY );
@@ -1770,6 +1771,39 @@ static int check_inode_ref(struct extent_buffer *leaf,return 0 ; } +static int check_inode_extref (struct extent_buffer *leaf, +struct btrfs_key *key,struct btrfs_key *prev_key, +int slot) +{ +unsigned long ptr =btrfs_item_ptr_offset (leaf, slot); +unsigned long end = ptr +btrfs_item_size (leaf, slot); + +if (unlikely (!check_prev_ino (leaf, key, slot, prev_key))) +return -EUCLEAN ; + +while (ptr < end) { +struct btrfs_inode_extref *extref = (struct btrfs_inode_extref *)ptr; +u16 namelen; + +if (unlikely (ptr +sizeof (*extref) > end)) { +inode_ref_err (leaf, slot, +"inode extref overflow, ptr %lu end %lu inode_extref size %zu" , + ptr, end,sizeof (*extref)); +return -EUCLEAN ; + } + + namelen =btrfs_inode_extref_name_len (leaf, extref); +if (unlikely (ptr +sizeof (*extref) + namelen > end)) { +inode_ref_err (leaf, slot, +"inode extref overflow, ptr %lu end %lu namelen %u" , + ptr, end, namelen); +return -EUCLEAN ; + } + ptr +=sizeof (*extref) + namelen; + } +return 0 ; +} +static int check_raid_stripe_extent (const struct extent_buffer *leaf,const struct btrfs_key *key,int slot) {
@@ -1881,6 +1915,9 @@ static enum btrfs_tree_block_status check_leaf_item(struct extent_buffer *leaf,case BTRFS_INODE_REF_KEY : ret =check_inode_ref (leaf, key, prev_key, slot);break ; +case BTRFS_INODE_EXTREF_KEY : + ret =check_inode_extref (leaf, key, prev_key, slot); +break ;case BTRFS_BLOCK_GROUP_ITEM_KEY : ret =check_block_group_item (leaf, key, slot);break ;
fs/btrfs/tree-log.c +49 -15
136 lines not on this page · raw message
fs/btrfs/zoned.c +5 -3
@@ -2384,16 +2384,17 @@ bool btrfs_can_activate_zone(struct btrfs_fs_devices *fs_devices, u64 flags)return ret; } -void btrfs_zone_finish_endio (struct btrfs_fs_info *fs_info,u64 logical,u64 length) +int btrfs_zone_finish_endio (struct btrfs_fs_info *fs_info,u64 logical,u64 length) {struct btrfs_block_group *block_group;u64 min_alloc_bytes;if (!btrfs_is_zoned (fs_info)) -return ; +return 0 ; block_group =btrfs_lookup_block_group (fs_info, logical); -ASSERT (block_group); +if (WARN_ON_ONCE (!block_group)) +return -ENOENT ;/* No MIXED_BG on zoned btrfs. */ if (block_group->flags &BTRFS_BLOCK_GROUP_DATA )
@@ -2410,6 +2411,7 @@ void btrfs_zone_finish_endio(struct btrfs_fs_info *fs_info, u64 logical, u64 len out:btrfs_put_block_group (block_group); +return 0 ; }static void btrfs_zone_finish_endio_workfn (struct work_struct *work)
fs/btrfs/zoned.h +6 -3
@@ -83,7 +83,7 @@ int btrfs_sync_zone_write_pointer(struct btrfs_device *tgt_dev, u64 logical,bool btrfs_zone_activate (struct btrfs_block_group *block_group);int btrfs_zone_finish (struct btrfs_block_group *block_group);bool btrfs_can_activate_zone (struct btrfs_fs_devices *fs_devices,u64 flags); -void btrfs_zone_finish_endio (struct btrfs_fs_info *fs_info,u64 logical, +int btrfs_zone_finish_endio (struct btrfs_fs_info *fs_info,u64 logical,u64 length);void btrfs_schedule_zone_finish_bg (struct btrfs_block_group *bg,struct extent_buffer *eb);
@@ -232,8 +232,11 @@ static inline bool btrfs_can_activate_zone(struct btrfs_fs_devices *fs_devices,return true; } -static inline void btrfs_zone_finish_endio (struct btrfs_fs_info *fs_info, -u64 logical,u64 length) { } +static inline int btrfs_zone_finish_endio (struct btrfs_fs_info *fs_info, +u64 logical,u64 length) +{ +return 0 ; +}static inline void btrfs_schedule_zone_finish_bg (struct btrfs_block_group *bg,struct extent_buffer *eb) { }
fs/f2fs/file.c +5 -3
@@ -1836,18 +1836,20 @@ static int f2fs_expand_inode_data(struct inode *inode, loff_t offset, map.m_len = sec_blks; next_alloc: +f2fs_down_write (&sbi->pin_sem); +if (has_not_enough_free_secs (sbi,0 ,f2fs_sb_has_blkzoned (sbi) ?ZONED_PIN_SEC_REQUIRED_COUNT :GET_SEC_FROM_SEG (sbi,overprovision_segments (sbi)))) {f2fs_down_write (&sbi->gc_lock);stat_inc_gc_call_count (sbi,FOREGROUND ); err =f2fs_gc (sbi, &gc_control); -if (err && err != -ENODATA ) +if (err && err != -ENODATA ) { +f2fs_up_write (&sbi->pin_sem); goto out_err; + } } -f2fs_down_write (&sbi->pin_sem); - err =f2fs_allocate_pinning_section (sbi);if (err) {f2fs_up_write (&sbi->pin_sem);
fs/f2fs/segment.c +10 -10
@@ -2749,7 +2749,7 @@ static int get_new_segment(struct f2fs_sb_info *sbi, MAIN_SECS(sbi));if (secno >=MAIN_SECS (sbi)) { ret = -ENOSPC ; -f2fs_bug_on (sbi,1 ); +f2fs_bug_on (sbi, !pinning); goto out_unlock; } }
@@ -2795,7 +2795,7 @@ static int get_new_segment(struct f2fs_sb_info *sbi, out_unlock:spin_unlock (&free_i->segmap_lock); -if (ret == -ENOSPC ) +if (ret == -ENOSPC && !pinning)f2fs_stop_checkpoint (sbi, false,STOP_CP_REASON_NO_SEGMENT );return ret; }
@@ -2868,6 +2868,13 @@ static unsigned int __get_next_segno(struct f2fs_sb_info *sbi, int type)return curseg->segno; } +static void reset_curseg_fields (struct curseg_info *curseg) +{ + curseg->inited = false; + curseg->segno =NULL_SEGNO ; + curseg->next_segno =0 ; +} +/* * Allocate a current working segment. * This function always allocates a free segment in LFS manner.
@@ -2886,7 +2893,7 @@ static int new_curseg(struct f2fs_sb_info *sbi, int type, bool new_sec) ret =get_new_segment (sbi, &segno, new_sec, pinning);if (ret) {if (ret == -ENOSPC ) - curseg->segno =NULL_SEGNO ; +reset_curseg_fields (curseg);return ret; }
@@ -3640,13 +3647,6 @@ static void f2fs_randomize_chunk(struct f2fs_sb_info *sbi,get_random_u32_inclusive (1 , sbi->max_fragment_hole); } -static void reset_curseg_fields (struct curseg_info *curseg) -{ - curseg->inited = false; - curseg->segno =NULL_SEGNO ; - curseg->next_segno =0 ; -} - int f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct page *page, block_t old_blkaddr, block_t *new_blkaddr, struct f2fs_summary *sum, int type,
include/linux/audit.h +1 -1
@@ -527,7 +527,7 @@ static inline void audit_log_kern_module(const char *name)static inline void audit_fanotify (u32 response,struct fanotify_response_info_audit_rule *friar) { -if (!audit_dummy_context ()) +if (audit_enabled)__audit_fanotify (response, friar); }
include/linux/bitops.h +0 -1
@@ -8,7 +8,6 @@#include <uapi/linux/kernel.h> -#define BITS_PER_TYPE (type) (sizeof(type) * BITS_PER_BYTE)#define BITS_TO_LONGS (nr) __KERNEL_DIV_ROUND_UP(nr, BITS_PER_TYPE(long))#define BITS_TO_U64 (nr) __KERNEL_DIV_ROUND_UP(nr, BITS_PER_TYPE(u64))#define BITS_TO_U32 (nr) __KERNEL_DIV_ROUND_UP(nr, BITS_PER_TYPE(u32))
include/linux/bits.h +36 -2
@@ -12,6 +12,7 @@#define BIT_ULL_MASK (nr) (ULL(1) << ((nr) % BITS_PER_LONG_LONG))#define BIT_ULL_WORD (nr) ((nr) / BITS_PER_LONG_LONG)#define BITS_PER_BYTE 8 +#define BITS_PER_TYPE (type) (sizeof(type) * BITS_PER_BYTE)/* * Create a contiguous bitmask starting at bit position @l and ending at
@@ -19,17 +20,50 @@* GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. */ #if !defined(__ASSEMBLY__) + +/* +* Missing asm support +* +* GENMASK_U*() depend on BITS_PER_TYPE() which relies on sizeof(), +* something not available in asm. Nevertheless, fixed width integers is a C +* concept. Assembly code can rely on the long and long long versions instead. +*/ +#include <linux/build_bug.h> +#include <linux/overflow.h> #define GENMASK_INPUT_CHECK (h, l) \ (BUILD_BUG_ON_ZERO(__builtin_choose_expr( \ __is_constexpr((l) > (h)), (l) > (h), 0))) -#else + +/* +* Generate a mask for the specified type @t. Additional checks are made to +* guarantee the value returned fits in that type, relying on +* -Wshift-count-overflow compiler check to detect incompatible arguments. +* For example, all these create build errors or warnings: +* +* - GENMASK(15, 20): wrong argument order +* - GENMASK(72, 15): doesn't fit unsigned long +* - GENMASK_U32(33, 15): doesn't fit in a u32 +*/ +#define GENMASK_TYPE (t, h, l) \ + ((t)(GENMASK_INPUT_CHECK(h, l) + \ + (type_max(t) << (l) & \ + type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h))))) + +#define GENMASK_U8 (h, l) GENMASK_TYPE(u8, h, l) +#define GENMASK_U16 (h, l) GENMASK_TYPE(u16, h, l) +#define GENMASK_U32 (h, l) GENMASK_TYPE(u32, h, l) +#define GENMASK_U64 (h, l) GENMASK_TYPE(u64, h, l) + +#else /* defined(__ASSEMBLY__) */ +/* * BUILD_BUG_ON_ZERO is not available in h files included from asm files, * disable the input check if that is the case. */ #define GENMASK_INPUT_CHECK (h, l) 0 -#endif + +#endif /* !defined(__ASSEMBLY__) */ #define GENMASK (h, l) \ (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
include/linux/gpio/regmap.h +16 -0
@@ -37,9 +37,18 @@ struct regmap;* offset to a register/bitmask pair. If not * given the default gpio_regmap_simple_xlate() * is used. +* @fixed_direction_output: +* (Optional) Bitmap representing the fixed direction of +* the GPIO lines. Useful when there are GPIO lines with a +* fixed direction mixed together in the same register. * @drvdata: (Optional) Pointer to driver specific data which is * not used by gpio-remap but is provided "as is" to the * driver callback(s). +* @regmap_irq_chip: (Optional) Pointer on an regmap_irq_chip structure. If +* set, a regmap-irq device will be created and the IRQ +* domain will be set accordingly. +* @regmap_irq_line (Optional) The IRQ the device uses to signal interrupts. +* @regmap_irq_flags (Optional) The IRQF_ flags to use for the interrupt. * * The ->reg_mask_xlate translates a given base address and GPIO offset to * register and mask pair. The base address is one of the given register
@@ -77,6 +86,13 @@ struct gpio_regmap_config {int reg_stride;int ngpio_per_reg;struct irq_domain *irq_domain; +unsigned long *fixed_direction_output; + +#ifdef CONFIG_REGMAP_IRQ +struct regmap_irq_chip *regmap_irq_chip; +int regmap_irq_line; +unsigned long regmap_irq_flags; +#endif int (*reg_mask_xlate)(struct gpio_regmap *gpio, unsigned int base, unsigned int offset, unsigned int *reg,
include/net/bonding.h +1 -0
@@ -695,6 +695,7 @@ void bond_debug_register(struct bonding *bond);void bond_debug_unregister (struct bonding *bond);void bond_debug_reregister (struct bonding *bond);const char *bond_mode_name (int mode); +bool bond_xdp_check (struct bonding *bond,int mode);void bond_setup (struct net_device *bond_dev);unsigned int bond_get_num_tx_queues (void );int bond_netlink_init (void );
include/net/pkt_sched.h +24 -1
@@ -114,7 +114,6 @@ struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, struct netlink_ext_ack *extack);void qdisc_put_rtab (struct qdisc_rate_table *tab);void qdisc_put_stab (struct qdisc_size_table *tab); -void qdisc_warn_nonwc (const char *txt,struct Qdisc *qdisc);bool sch_direct_xmit (struct sk_buff *skb,struct Qdisc *q,struct net_device *dev,struct netdev_queue *txq,spinlock_t *root_lock,bool validate);
@@ -290,4 +289,28 @@ static inline bool tc_qdisc_stats_dump(struct Qdisc *sch, return true; } +static inline void qdisc_warn_nonwc (const char *txt,struct Qdisc *qdisc) +{ +if (!(qdisc->flags &TCQ_F_WARN_NONWC )) { +pr_warn ("%s: %s qdisc %X: is non-work-conserving?\n" , + txt, qdisc->ops->id, qdisc->handle >>16 ); + qdisc->flags |=TCQ_F_WARN_NONWC ; + } +} + +static inline unsigned int qdisc_peek_len (struct Qdisc *sch) +{ +struct sk_buff *skb; +unsigned int len; + + skb = sch->ops->peek (sch); +if (unlikely (skb ==NULL )) { +qdisc_warn_nonwc ("qdisc_peek_len" , sch); +return 0 ; + } + len =qdisc_pkt_len (skb); + +return len; +} +#endif
kernel/cgroup/cpuset.c +1 -5
@@ -1679,11 +1679,7 @@ static int update_parent_effective_cpumask(struct cpuset *cs, int cmd,if (prstate_housekeeping_conflict (new_prs, xcpus))return PERR_HKEEPING ; -/* -* A parent can be left with no CPU as long as there is no -* task directly associated with the parent partition. -*/ -if (nocpu) +if (tasks_nocpu_error (parent, cs, xcpus))return PERR_NOCPUS ; deleting =cpumask_and (tmp->delmask, xcpus, parent->effective_xcpus);
kernel/events/callchain.c +8 -8
@@ -223,6 +223,10 @@ get_perf_callchain(struct pt_regs *regs, u32 init_nr, bool kernel, bool user,struct perf_callchain_entry_ctx ctx;int rctx, start_entry_idx; +/* crosstask is not supported for user stacks */ +if (crosstask && user && !kernel) +return NULL ; + entry =get_callchain_entry (&rctx);if (!entry)return NULL ;
@@ -239,18 +243,15 @@ get_perf_callchain(struct pt_regs *regs, u32 init_nr, bool kernel, bool user,perf_callchain_kernel (&ctx, regs); } -if (user) { +if (user && !crosstask) {if (!user_mode (regs)) { -if (current->mm) - regs =task_pt_regs (current); -else +if (current->flags & (PF_KTHREAD |PF_USER_WORKER )) regs =NULL ; +else + regs =task_pt_regs (current); }if (regs) { -if (crosstask) - goto exit_put; -if (add_mark)perf_callchain_store_context (&ctx,PERF_CONTEXT_USER );
@@ -260,7 +261,6 @@ get_perf_callchain(struct pt_regs *regs, u32 init_nr, bool kernel, bool user, } } -exit_put:put_callchain_entry (rctx);return entry;
kernel/events/core.c +4 -3
@@ -7095,7 +7095,7 @@ static void perf_sample_regs_user(struct perf_regs *regs_user,if (user_mode (regs)) { regs_user->abi =perf_reg_abi (current); regs_user->regs = regs; - }else if (!(current->flags &PF_KTHREAD )) { + }else if (!(current->flags & (PF_KTHREAD |PF_USER_WORKER ))) {perf_get_regs_user (regs_user, regs); }else { regs_user->abi =PERF_SAMPLE_REGS_ABI_NONE ;
@@ -7735,7 +7735,7 @@ static u64 perf_virt_to_phys(u64 virt)* Try IRQ-safe get_user_page_fast_only first. * If failed, leave phys_addr as 0. */ -if (current->mm !=NULL ) { +if (!(current->flags & (PF_KTHREAD |PF_USER_WORKER ))) {struct page *p;pagefault_disable ();
@@ -7847,7 +7847,8 @@ struct perf_callchain_entry * perf_callchain(struct perf_event *event, struct pt_regs *regs) { bool kernel = !event->attr.exclude_callchain_kernel; -bool user = !event->attr.exclude_callchain_user; +bool user = !event->attr.exclude_callchain_user && + !(current->flags & (PF_KTHREAD |PF_USER_WORKER ));/* Disallow cross-task user callchains. */ bool crosstask = event->ctx->task && event->ctx->task != current;const u32 max_stack = event->attr.sample_max_stack;
kernel/seccomp.c +25 -7
@@ -733,6 +733,26 @@ seccomp_prepare_user_filter(const char __user *user_filter) }#ifdef SECCOMP_ARCH_NATIVE +static bool seccomp_uprobe_exception (struct seccomp_data *sd) +{ +#if defined __NR_uretprobe || defined __NR_uprobe +#ifdef SECCOMP_ARCH_COMPAT + if (sd->arch == SECCOMP_ARCH_NATIVE) +#endif + { +#ifdef __NR_uretprobe +if (sd->nr == __NR_uretprobe) +return true; +#endif +#ifdef __NR_uprobe +if (sd->nr == __NR_uprobe) +return true; +#endif + } +#endif +return false; +} +/** * seccomp_is_const_allow - check if filter is constant allow with given data * @fprog: The BPF programs
@@ -750,13 +770,8 @@ static bool seccomp_is_const_allow(struct sock_fprog_kern *fprog,return false;/* Our single exception to filtering. */ -#ifdef __NR_uretprobe -#ifdef SECCOMP_ARCH_COMPAT - if (sd->arch == SECCOMP_ARCH_NATIVE) -#endif -if (sd->nr == __NR_uretprobe) -return true; -#endif +if (seccomp_uprobe_exception (sd)) +return true;for (pc =0 ; pc < fprog->len; pc++) {struct sock_filter *insn = &fprog->filter[pc];
@@ -1034,6 +1049,9 @@ static const int mode1_syscalls[] = { __NR_seccomp_read, __NR_seccomp_write, __NR_seccomp_exit, __NR_seccomp_sigreturn, #ifdef __NR_uretprobe __NR_uretprobe, +#endif +#ifdef __NR_uprobe + __NR_uprobe, #endif -1, /* negative terminated */ };
net/mptcp/pm_netlink.c +6 -0
@@ -618,6 +618,10 @@ static void mptcp_pm_create_subflow_or_signal_addr(struct mptcp_sock *msk) } subflow: +/* No need to try establishing subflows to remote id0 if not allowed */ +if (mptcp_pm_add_addr_c_flag_case (msk)) + goto exit; +/* check if should create a new subflow */ while (msk->pm.local_addr_used < local_addr_max && msk->pm.subflows < subflows_max) {
@@ -649,6 +653,8 @@ static void mptcp_pm_create_subflow_or_signal_addr(struct mptcp_sock *msk)__mptcp_subflow_connect (sk, &local, &addrs[i]);spin_lock_bh (&msk->pm.lock); } + +exit:mptcp_pm_nl_check_work_pending (msk); }
net/sched/sch_api.c +0 -10
@@ -599,16 +599,6 @@ void __qdisc_calculate_pkt_len(struct sk_buff *skb,qdisc_skb_cb (skb)->pkt_len = pkt_len; } -void qdisc_warn_nonwc (const char *txt,struct Qdisc *qdisc) -{ -if (!(qdisc->flags &TCQ_F_WARN_NONWC )) { -pr_warn ("%s: %s qdisc %X: is non-work-conserving?\n" , - txt, qdisc->ops->id, qdisc->handle >>16 ); - qdisc->flags |=TCQ_F_WARN_NONWC ; - } -} -EXPORT_SYMBOL (qdisc_warn_nonwc); -static enum hrtimer_restart qdisc_watchdog (struct hrtimer *timer) { struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog,
net/sched/sch_hfsc.c +0 -16
@@ -835,22 +835,6 @@ update_vf(struct hfsc_class *cl, unsigned int len, u64 cur_time) } } -static unsigned int -qdisc_peek_len (struct Qdisc *sch) -{ -struct sk_buff *skb; -unsigned int len; - - skb = sch->ops->peek (sch); -if (unlikely (skb ==NULL )) { -qdisc_warn_nonwc ("qdisc_peek_len" , sch); -return 0 ; - } - len =qdisc_pkt_len (skb); - -return len; -} -static void hfsc_adjust_levels (struct hfsc_class *cl) {
net/sched/sch_qfq.c +1 -1
@@ -1002,7 +1002,7 @@ static struct sk_buff *agg_dequeue(struct qfq_aggregate *agg,if (cl->qdisc->q.qlen ==0 )/* no more packets, remove from list */ list_del_init (&cl->alist); -else if (cl->deficit <qdisc_pkt_len (cl->qdisc->ops->peek (cl->qdisc))) { +else if (cl->deficit <qdisc_peek_len (cl->qdisc)) { cl->deficit += agg->lmax;list_move_tail (&cl->alist, &agg->active); }
net/wireless/reg.c +4 -0
@@ -4234,6 +4234,8 @@ static void cfg80211_check_and_end_cac(struct cfg80211_registered_device *rdev)struct wireless_dev *wdev;unsigned int link_id; +wiphy_lock (&rdev->wiphy); +/* If we finished CAC or received radar, we should end any * CAC running on the same channels. * the check !cfg80211_chandef_dfs_usable contain 2 options:
@@ -4258,6 +4260,8 @@ static void cfg80211_check_and_end_cac(struct cfg80211_registered_device *rdev)rdev_end_cac (rdev, wdev->netdev, link_id); } } + +wiphy_unlock (&rdev->wiphy); } void regulatory_propagate_dfs_state(struct wiphy *wiphy,
tools/sched_ext/scx_qmap.bpf.c +17 -1
@@ -56,7 +56,8 @@ struct qmap { queue1 SEC(".maps"), queue2 SEC(".maps"), queue3 SEC(".maps"), - queue4 SEC(".maps"); + queue4 SEC(".maps"), + dump_store SEC(".maps");struct { __uint(type, BPF_MAP_TYPE_ARRAY_OF_MAPS);
@@ -578,11 +579,26 @@ void BPF_STRUCT_OPS(qmap_dump, struct scx_dump_ctx *dctx)return ;scx_bpf_dump ("QMAP FIFO[%d]:" , i); + +/* +* Dump can be invoked anytime and there is no way to iterate in +* a non-destructive way. Pop and store in dump_store and then +* restore afterwards. If racing against new enqueues, ordering +* can get mixed up. +*/ bpf_repeat(4096) {if (bpf_map_pop_elem (fifo, &pid))break ; +bpf_map_push_elem (&dump_store, &pid,0 );scx_bpf_dump (" %d" , pid); } + + bpf_repeat(4096) { +if (bpf_map_pop_elem (&dump_store, &pid)) +break ; +bpf_map_push_elem (fifo, &pid,0 ); + } +scx_bpf_dump ("\n" ); } }
tools/testing/selftests/net/mptcp/mptcp_join.sh +2 -1
@@ -3823,7 +3823,8 @@ endpoint_tests() # remove and re-add if reset_with_events "delete re-add signal" && - mptcp_lib_kallsyms_has "subflow_rebuild_header$"; then + continue_if mptcp_lib_kallsyms_has "subflow_rebuild_header$"; then + ip netns exec $ns1 sysctl -q net.mptcp.add_addr_timeout=0 pm_nl_set_limits $ns1 0 3 pm_nl_set_limits $ns2 3 3 pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal