Kernel
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- 47 participants
- 21988 discussions
Jiri Olsa (2):
bpf: Add missed value to kprobe perf link info
bpf: Add cookie to perf_event bpf_link_info records
Zicheng Qu (2):
bpf: Fix kabi for missed in bpf_link_info
bpf: Fix kabi for cookie in bpf_link_info
include/linux/trace_events.h | 6 ++++--
include/uapi/linux/bpf.h | 15 +++++++++++++++
kernel/bpf/syscall.c | 18 ++++++++++++------
kernel/trace/bpf_trace.c | 5 +++--
kernel/trace/trace_kprobe.c | 14 +++++++++++---
tools/include/uapi/linux/bpf.h | 7 +++++++
6 files changed, 52 insertions(+), 13 deletions(-)
--
2.34.1
2
5
Aboorva Devarajan (2):
sched_ext: Documentation: Remove mentions of scx_bpf_switch_all
sched: Pass correct scheduling policy to __setscheduler_class
Alexander Lobakin (1):
bitops: make BYTES_TO_BITS() treewide-available
Alexei Starovoitov (1):
selftests/bpf: modify test_loader that didn't support running
bpf_prog_type_syscall programs
Andrea Righi (32):
sched_ext: fix typo in set_weight() description
sched_ext: add CONFIG_DEBUG_INFO_BTF dependency
sched_ext: Provide a sysfs enable_seq counter
sched_ext: improve WAKE_SYNC behavior for default idle CPU selection
sched_ext: Clarify ops.select_cpu() for single-CPU tasks
sched_ext: Introduce LLC awareness to the default idle selection
policy
sched_ext: Introduce NUMA awareness to the default idle selection
policy
sched_ext: Do not enable LLC/NUMA optimizations when domains overlap
sched_ext: Fix incorrect use of bitwise AND
MAINTAINERS: add self as reviewer for sched_ext
sched_ext: idle: Refresh idle masks during idle-to-idle transitions
sched_ext: Use the NUMA scheduling domain for NUMA optimizations
sched_ext: idle: use assign_cpu() to update the idle cpumask
sched_ext: idle: clarify comments
sched_ext: idle: introduce check_builtin_idle_enabled() helper
sched_ext: idle: small CPU iteration refactoring
sched_ext: update scx_bpf_dsq_insert() doc for SCX_DSQ_LOCAL_ON
sched_ext: Include remaining task time slice in error state dump
sched_ext: Include task weight in the error state dump
selftests/sched_ext: Fix enum resolution
tools/sched_ext: Add helper to check task migration state
sched_ext: selftests/dsp_local_on: Fix selftest on UP systems
sched_ext: Fix lock imbalance in dispatch_to_local_dsq()
selftests/sched_ext: Fix exit selftest hang on UP
sched_ext: Move built-in idle CPU selection policy to a separate file
sched_ext: Track currently locked rq
sched_ext: Make scx_locked_rq() inline
sched_ext: Fix missing rq lock in scx_bpf_cpuperf_set()
sched/ext: Fix invalid task state transitions on class switch
sched_ext: Make scx_kf_allowed_if_unlocked() available outside ext.c
sched_ext: Remove duplicate BTF_ID_FLAGS definitions
sched_ext: Fix rq lock state in hotplug ops
Andrii Nakryiko (7):
bpf: extract iterator argument type and name validation logic
bpf: allow passing struct bpf_iter_<type> as kfunc arguments
selftests/bpf: test passing iterator to a kfunc
bpf: Emit global subprog name in verifier logs
bpf: Validate global subprogs lazily
selftests/bpf: Add lazy global subprog validation tests
selftests/bpf: validate eliminated global subprog is not freplaceable
Arnaldo Carvalho de Melo (1):
tools include UAPI: Sync linux/sched.h copy with the kernel sources
Atul Kumar Pant (1):
sched_ext: Fixes typos in comments
Benjamin Tissoires (1):
bpf: introduce in_sleepable() helper
Bitao Hu (4):
genirq: Convert kstat_irqs to a struct
genirq: Provide a snapshot mechanism for interrupt statistics
watchdog/softlockup: Low-overhead detection of interrupt storm
watchdog/softlockup: Report the most frequent interrupts
Björn Töpel (1):
selftests: sched_ext: Add sched_ext as proper selftest target
Breno Leitao (3):
rhashtable: Fix potential deadlock by moving schedule_work outside
lock
sched_ext: Use kvzalloc for large exit_dump allocation
sched/ext: Prevent update_locked_rq() calls with NULL rq
Changwoo Min (11):
sched_ext: Clarify sched_ext_ops table for userland scheduler
sched_ext: add a missing rcu_read_lock/unlock pair at
scx_select_cpu_dfl()
MAINTAINERS: add me as reviewer for sched_ext
sched_ext: Replace rq_lock() to raw_spin_rq_lock() in scx_ops_bypass()
sched_ext: Relocate scx_enabled() related code
sched_ext: Implement scx_bpf_now()
sched_ext: Add scx_bpf_now() for BPF scheduler
sched_ext: Add time helpers for BPF schedulers
sched_ext: Replace bpf_ktime_get_ns() to scx_bpf_now()
sched_ext: Use time helpers in BPF schedulers
sched_ext: Fix incorrect time delta calculation in time_delta()
Christian Brauner (1):
file: add take_fd() cleanup helper
Christian Loehle (1):
sched/fair: Remove stale FREQUENCY_UTIL comment
Chuyi Zhou (15):
cgroup: Prepare for using css_task_iter_*() in BPF
bpf: Introduce css_task open-coded iterator kfuncs
bpf: Introduce task open coded iterator kfuncs
bpf: Introduce css open-coded iterator kfuncs
bpf: teach the verifier to enforce css_iter and task_iter in RCU CS
bpf: Let bpf_iter_task_new accept null task ptr
selftests/bpf: rename bpf_iter_task.c to bpf_iter_tasks.c
selftests/bpf: Add tests for open-coded task and css iter
bpf: Let verifier consider {task,cgroup} is trusted in bpf_iter_reg
bpf: Relax allowlist for css_task iter
selftests/bpf: Add tests for css_task iter combining with cgroup iter
selftests/bpf: Add test for using css_task iter in sleepable progs
selftests/bpf: get trusted cgrp from bpf_iter__cgroup directly
sched_ext: Fix the incorrect bpf_list kfunc API in common.bpf.h.
sched_ext: Use SCX_CALL_OP_TASK in task_tick_scx
Colin Ian King (1):
sched_ext: Fix spelling mistake: "intead" -> "instead"
Daniel Xu (3):
bpf: btf: Support flags for BTF_SET8 sets
bpf: btf: Add BTF_KFUNCS_START/END macro pair
bpf: treewide: Annotate BPF kfuncs in BTF
Dave Marchevsky (5):
bpf: Don't explicitly emit BTF for struct btf_iter_num
selftests/bpf: Rename bpf_iter_task_vma.c to bpf_iter_task_vmas.c
bpf: Introduce task_vma open-coded iterator kfuncs
selftests/bpf: Add tests for open-coded task_vma iter
bpf: Add __bpf_kfunc_{start,end}_defs macros
David Vernet (15):
bpf: Add ability to pin bpf timer to calling CPU
selftests/bpf: Test pinning bpf timer to a core
sched_ext: Implement runnable task stall watchdog
sched_ext: Print sched_ext info when dumping stack
sched_ext: Implement SCX_KICK_WAIT
sched_ext: Implement sched_ext_ops.cpu_acquire/release()
sched_ext: Add selftests
bpf: Load vmlinux btf for any struct_ops map
sched_ext: Make scx_bpf_cpuperf_set() @cpu arg signed
scx: Allow calling sleepable kfuncs from BPF_PROG_TYPE_SYSCALL
scx/selftests: Verify we can call create_dsq from prog_run
sched_ext: Remove unnecessary cpu_relax()
scx: Fix exit selftest to use custom DSQ
scx: Fix raciness in scx_ops_bypass()
scx: Fix maximal BPF selftest prog
Dawei Li (1):
genirq: Deduplicate interrupt descriptor initialization
Devaansh Kumar (1):
sched_ext: selftests: Fix grammar in tests description
Devaansh-Kumar (1):
sched_ext: Documentation: Update instructions for running example
schedulers
Geliang Tang (1):
bpf, btf: Check btf for register_bpf_struct_ops
Henry Huang (2):
sched_ext: initialize kit->cursor.flags
sched_ext: keep running prev when prev->scx.slice != 0
Herbert Xu (1):
rhashtable: Fix rhashtable_try_insert test
Honglei Wang (3):
sched_ext: use correct function name in pick_task_scx() warning
message
sched_ext: Add __weak to fix the build errors
sched_ext: switch class when preempted by higher priority scheduler
Hongyan Xia (1):
sched/ext: Add BPF function to fetch rq
Hou Tao (7):
bpf: Free dynamically allocated bits in bpf_iter_bits_destroy()
bpf: Add bpf_mem_alloc_check_size() helper
bpf: Check the validity of nr_words in bpf_iter_bits_new()
bpf: Use __u64 to save the bits in bits iterator
selftests/bpf: Add three test cases for bits_iter
selftests/bpf: Use -4095 as the bad address for bits iterator
selftests/bpf: Export map_update_retriable()
Ihor Solodrai (2):
selftests/sched_ext: add order-only dependency of runner.o on BPFOBJ
selftests/sched_ext: fix build after renames in sched_ext API
Ilpo Järvinen (1):
<linux/cleanup.h>: Allow the passing of both iomem and non-iomem
pointers to no_free_ptr()
Ingo Molnar (3):
sched/syscalls: Split out kernel/sched/syscalls.c from
kernel/sched/core.c
sched/fair: Rename check_preempt_wakeup() to
check_preempt_wakeup_fair()
sched/fair: Rename check_preempt_curr() to wakeup_preempt()
Jake Hillion (1):
sched_ext: create_dsq: Return -EEXIST on duplicate request
Jiapeng Chong (1):
sched_ext: Fixes incorrect type in bpf_scx_init()
Jiayuan Chen (1):
selftests/bpf: Fixes for test_maps test
Jiri Olsa (2):
bpf: Add missed value to kprobe perf link info
bpf: Add cookie to perf_event bpf_link_info records
Kui-Feng Lee (28):
bpf: refactory struct_ops type initialization to a function.
bpf: get type information with BTF_ID_LIST
bpf, net: introduce bpf_struct_ops_desc.
bpf: add struct_ops_tab to btf.
bpf: make struct_ops_map support btfs other than btf_vmlinux.
bpf: pass btf object id in bpf_map_info.
bpf: lookup struct_ops types from a given module BTF.
bpf: pass attached BTF to the bpf_struct_ops subsystem
bpf: hold module refcnt in bpf_struct_ops map creation and prog
verification.
bpf: validate value_type
bpf, net: switch to dynamic registration
libbpf: Find correct module BTFs for struct_ops maps and progs.
bpf: export btf_ctx_access to modules.
selftests/bpf: test case for register_bpf_struct_ops().
bpf: Fix error checks against bpf_get_btf_vmlinux().
bpf: Move __kfunc_param_match_suffix() to btf.c.
bpf: Remove an unnecessary check.
bpf: add btf pointer to struct bpf_ctx_arg_aux.
bpf: Create argument information for nullable arguments.
selftests/bpf: Suppress warning message of an unused variable.
selftests/bpf: Test PTR_MAYBE_NULL arguments of struct_ops operators.
libbpf: Set btf_value_type_id of struct bpf_map for struct_ops.
libbpf: Convert st_ops->data to shadow type.
bpftool: Generated shadow variables for struct_ops maps.
bpftool: Add an example for struct_ops map and shadow type.
selftests/bpf: Test if shadow types work correctly.
bpf, net: validate struct_ops when updating value.
bpf: struct_ops supports more than one page for trampolines.
Kumar Kartikeya Dwivedi (4):
bpf: Allow calling static subprogs while holding a bpf_spin_lock
selftests/bpf: Add test for static subprog call in lock cs
bpf: Transfer RCU lock state between subprog calls
selftests/bpf: Add tests for RCU lock transfer between subprogs
Liang Jie (1):
sched_ext: Use sizeof_field for key_len in dsq_hash_params
Manu Bretelle (1):
sched_ext: define missing cfi stubs for sched_ext
Martin KaFai Lau (3):
libbpf: Ensure undefined bpf_attr field stays 0
bpf: Reject struct_ops registration that uses module ptr and the
module btf_id is missing
bpf: Use kallsyms to find the function name of a struct_ops's stub
function
Matthieu Baerts (1):
bpf: fix compilation error without CGROUPS
Peter Zijlstra (20):
cleanup: Make no_free_ptr() __must_check
sched: Simplify set_user_nice()
sched: Simplify syscalls
sched: Simplify sched_{set,get}affinity()
sched: Simplify yield_to()
sched: Simplify sched_rr_get_interval()
sched: Simplify sched_move_task()
sched: Misc cleanups
sched/deadline: Move bandwidth accounting into {en,de}queue_dl_entity
sched: Allow sched_class::dequeue_task() to fail
sched: Unify runtime accounting across classes
sched: Use set_next_task(.first) where required
sched/fair: Cleanup pick_task_fair() vs throttle
sched/fair: Cleanup pick_task_fair()'s curr
sched/fair: Unify pick_{,next_}_task_fair()
sched: Fixup set_next_task() implementations
sched: Split up put_prev_task_balance()
sched: Rework pick_next_task()
sched: Combine the last put_prev_task() and the first set_next_task()
sched: Add put_prev_task(.next)
Pu Lehui (1):
riscv, bpf: Fix out-of-bounds issue when preparing trampoline image
Randy Dunlap (1):
sched_ext: fix kernel-doc warnings
Shizhao Chen (1):
sched_ext: Add option -l in selftest runner to list all available
tests
Song Liu (8):
bpf: Charge modmem for struct_ops trampoline
bpf: Let bpf_prog_pack_free handle any pointer
bpf: Adjust argument names of arch_prepare_bpf_trampoline()
bpf: Add helpers for trampoline image management
bpf, x86: Adjust arch_prepare_bpf_trampoline return value
bpf: Add arch_bpf_trampoline_size()
bpf: Use arch_bpf_trampoline_size
x86, bpf: Use bpf_prog_pack for bpf trampoline
T.J. Mercier (1):
bpf, docs: Fix broken link to renamed bpf_iter_task_vmas.c
Tejun Heo (148):
sched: Restructure sched_class order sanity checks in sched_init()
sched: Allow sched_cgroup_fork() to fail and introduce
sched_cancel_fork()
sched: Add sched_class->reweight_task()
sched: Add sched_class->switching_to() and expose
check_class_changing/changed()
sched: Factor out cgroup weight conversion functions
sched: Factor out update_other_load_avgs() from
__update_blocked_others()
sched: Add normal_policy()
sched_ext: Add boilerplate for extensible scheduler class
sched_ext: Implement BPF extensible scheduler class
sched_ext: Add scx_simple and scx_example_qmap example schedulers
sched_ext: Add sysrq-S which disables the BPF scheduler
sched_ext: Allow BPF schedulers to disallow specific tasks from
joining SCHED_EXT
sched_ext: Print debug dump after an error exit
tools/sched_ext: Add scx_show_state.py
sched_ext: Implement scx_bpf_kick_cpu() and task preemption support
sched_ext: Add a central scheduler which makes all scheduling
decisions on one CPU
sched_ext: Make watchdog handle ops.dispatch() looping stall
sched_ext: Add task state tracking operations
sched_ext: Implement tickless support
sched_ext: Track tasks that are subjects of the in-flight SCX
operation
sched_ext: Implement sched_ext_ops.cpu_online/offline()
sched_ext: Bypass BPF scheduler while PM events are in progress
sched_ext: Implement core-sched support
sched_ext: Add vtime-ordered priority queue to dispatch_q's
sched_ext: Documentation: scheduler: Document extensible scheduler
class
sched, sched_ext: Replace scx_next_task_picked() with
sched_class->switch_class()
cpufreq_schedutil: Refactor sugov_cpu_is_busy()
sched_ext: Add cpuperf support
sched_ext: Drop tools_clean target from the top-level Makefile
sched_ext: Swap argument positions in kcalloc() call to avoid compiler
warning
sched, sched_ext: Simplify dl_prio() case handling in sched_fork()
sched_ext: Account for idle policy when setting p->scx.weight in
scx_ops_enable_task()
sched_ext: Disallow loading BPF scheduler if isolcpus= domain
isolation is in effect
sched_ext: Minor cleanups in kernel/sched/ext.h
sched, sched_ext: Open code for_balance_class_range()
sched, sched_ext: Move some declarations from kernel/sched/ext.h to
sched.h
sched_ext: Take out ->priq and ->flags from scx_dsq_node
sched_ext: Implement DSQ iterator
sched_ext/scx_qmap: Add an example usage of DSQ iterator
sched_ext: Reimplement scx_bpf_reenqueue_local()
sched_ext: Make scx_bpf_reenqueue_local() skip tasks that are being
migrated
sched: Move struct balance_callback definition upward
sched_ext: Unpin and repin rq lock from balance_scx()
sched_ext: s/SCX_RQ_BALANCING/SCX_RQ_IN_BALANCE/ and add
SCX_RQ_IN_WAKEUP
sched_ext: Allow SCX_DSQ_LOCAL_ON for direct dispatches
sched_ext/scx_qmap: Pick idle CPU for direct dispatch on !wakeup
enqueues
sched_ext: Build fix on !CONFIG_STACKTRACE[_SUPPORT]
sched_ext: Allow p->scx.disallow only while loading
sched_ext: Simplify scx_can_stop_tick() invocation in
sched_can_stop_tick()
sched_ext: Add scx_enabled() test to @start_class promotion in
put_prev_task_balance()
sched_ext: Use update_curr_common() in update_curr_scx()
sched_ext: Simplify UP support by enabling sched_class->balance() in
UP
sched_ext: Improve comment on idle_sched_class exception in
scx_task_iter_next_locked()
sched_ext: Make task_can_run_on_remote_rq() use common
task_allowed_on_cpu()
sched_ext: Fix unsafe list iteration in process_ddsp_deferred_locals()
sched_ext: Make scx_rq_online() also test cpu_active() in addition to
SCX_RQ_ONLINE
sched_ext: Improve logging around enable/disable
sched_ext: Don't use double locking to migrate tasks across CPUs
scx_central: Fix smatch checker warning
sched_ext: Add missing cfi stub for ops.tick
sched_ext: Use task_can_run_on_remote_rq() test in
dispatch_to_local_dsq()
sched_ext: Use sched_clock_cpu() instead of rq_clock_task() in
touch_core_sched()
sched_ext: Don't call put_prev_task_scx() before picking the next task
sched_ext: Replace SCX_TASK_BAL_KEEP with SCX_RQ_BAL_KEEP
sched_ext: Unify regular and core-sched pick task paths
sched_ext: Relocate functions in kernel/sched/ext.c
sched_ext: Remove switch_class_scx()
sched_ext: Remove sched_class->switch_class()
sched_ext: TASK_DEAD tasks must be switched out of SCX on ops_disable
sched_ext: TASK_DEAD tasks must be switched into SCX on ops_enable
sched: Expose css_tg()
sched: Make cpu_shares_read_u64() use tg_weight()
sched: Introduce CONFIG_GROUP_SCHED_WEIGHT
sched_ext: Add cgroup support
sched_ext: Add a cgroup scheduler which uses flattened hierarchy
sched_ext: Temporarily work around pick_task_scx() being called
without balance_scx()
sched_ext: Add missing static to scx_has_op[]
sched_ext: Add missing static to scx_dump_data
sched_ext: Rename scx_kfunc_set_sleepable to unlocked and relocate
sched_ext: Refactor consume_remote_task()
sched_ext: Make find_dsq_for_dispatch() handle SCX_DSQ_LOCAL_ON
sched_ext: Fix processs_ddsp_deferred_locals() by unifying DTL_INVALID
handling
sched_ext: Restructure dispatch_to_local_dsq()
sched_ext: Reorder args for consume_local/remote_task()
sched_ext: Move sanity check and dsq_mod_nr() into
task_unlink_from_dsq()
sched_ext: Move consume_local_task() upward
sched_ext: Replace consume_local_task() with
move_local_task_to_local_dsq()
sched_ext: Compact struct bpf_iter_scx_dsq_kern
sched_ext: Implement scx_bpf_dispatch[_vtime]_from_dsq()
scx_qmap: Implement highpri boosting
sched_ext: Synchronize bypass state changes with rq lock
sched_ext: Don't trigger ops.quiescent/runnable() on migrations
sched_ext: Fix build when !CONFIG_STACKTRACE
sched_ext: Build fix for !CONFIG_SMP
sched_ext: Add __COMPAT helpers for features added during v6.12 devel
cycle
tools/sched_ext: Receive misc updates from SCX repo
scx_flatcg: Use a user DSQ for fallback instead of SCX_DSQ_GLOBAL
sched_ext: Allow only user DSQs for scx_bpf_consume(),
scx_bpf_dsq_nr_queued() and bpf_iter_scx_dsq_new()
sched_ext: Relocate find_user_dsq()
sched_ext: Split the global DSQ per NUMA node
sched_ext: Use shorter slice while bypassing
sched_ext: Relocate check_hotplug_seq() call in scx_ops_enable()
sched_ext: Remove SCX_OPS_PREPPING
sched_ext: Initialize in bypass mode
sched_ext: Fix SCX_TASK_INIT -> SCX_TASK_READY transitions in
scx_ops_enable()
sched_ext: Enable scx_ops_init_task() separately
sched_ext: Add scx_cgroup_enabled to gate cgroup operations and fix
scx_tg_online()
sched_ext: Decouple locks in scx_ops_disable_workfn()
sched_ext: Decouple locks in scx_ops_enable()
sched_ext: Improve error reporting during loading
sched_ext: scx_cgroup_exit() may be called without successful
scx_cgroup_init()
sched/core: Make select_task_rq() take the pointer to wake_flags
instead of value
sched/core: Add ENQUEUE_RQ_SELECTED to indicate whether
->select_task_rq() was called
sched_ext, scx_qmap: Add and use SCX_ENQ_CPU_SELECTED
Revert "sched_ext: Use shorter slice while bypassing"
sched_ext: Start schedulers with consistent p->scx.slice values
sched_ext: Move scx_buildin_idle_enabled check to
scx_bpf_select_cpu_dfl()
sched_ext: bypass mode shouldn't depend on ops.select_cpu()
sched_ext: Move scx_tasks_lock handling into scx_task_iter helpers
sched_ext: Don't hold scx_tasks_lock for too long
sched_ext: Make cast_mask() inline
sched_ext: Fix enq_last_no_enq_fails selftest
sched_ext: Add a missing newline at the end of an error message
sched_ext: Update scx_show_state.py to match scx_ops_bypass_depth's
new type
sched_ext: Handle cases where pick_task_scx() is called without
preceding balance_scx()
sched_ext: ops.cpu_acquire() should be called with SCX_KF_REST
sched_ext: Factor out move_task_between_dsqs() from
scx_dispatch_from_dsq()
sched_ext: Rename CFI stubs to names that are recognized by BPF
sched_ext: Replace set_arg_maybe_null() with __nullable CFI stub tags
sched_ext: Avoid live-locking bypass mode switching
sched_ext: Enable the ops breather and eject BPF scheduler on
softlockup
sched_ext: scx_bpf_dispatch_from_dsq_set_*() are allowed from unlocked
context
sched_ext: Rename scx_bpf_dispatch[_vtime]() to
scx_bpf_dsq_insert[_vtime]()
sched_ext: Rename scx_bpf_consume() to scx_bpf_dsq_move_to_local()
sched_ext: Rename scx_bpf_dispatch[_vtime]_from_dsq*() ->
scx_bpf_dsq_move[_vtime]*()
sched_ext: Fix invalid irq restore in scx_ops_bypass()
sched_ext: Fix dsq_local_on selftest
tools/sched_ext: Receive updates from SCX repo
sched_ext: selftests/dsp_local_on: Fix sporadic failures
sched_ext: Fix incorrect autogroup migration detection
sched_ext: Implement auto local dispatching of migration disabled
tasks
sched_ext: Fix migration disabled handling in targeted dispatches
sched_ext: Fix incorrect assumption about migration disabled tasks in
task_can_run_on_remote_rq()
sched_ext: Fix pick_task_scx() picking non-queued tasks when it's
called without balance()
sched_ext: Implement SCX_OPS_ALLOW_QUEUED_WAKEUP
sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator
sched_ext: Make scx_group_set_weight() always update tg->scx.weight
sched_ext, sched/core: Don't call scx_group_set_weight() prematurely
from sched_create_group()
Thomas Gleixner (1):
sched/ext: Remove sched_fork() hack
Thorsten Blum (1):
sched_ext: Use str_enabled_disabled() helper in
update_selcpu_topology()
Tianchen Ding (1):
sched_ext: Use btf_ids to resolve task_struct
Vincent Guittot (3):
sched/cpufreq: Rework schedutil governor performance estimation
sched/fair: Fix frequency selection for non-invariant case
sched/fair: Fix sched_can_stop_tick() for fair tasks
Vishal Chourasia (2):
sched_ext: Add __weak markers to BPF helper function decalarations
sched_ext: Fix function pointer type mismatches in BPF selftests
Wenyu Huang (1):
sched/doc: Update documentation after renames and synchronize Chinese
version
Yafang Shao (2):
bpf: Add bits iterator
selftests/bpf: Add selftest for bits iter
Yipeng Zou (1):
sched_ext: Allow dequeue_task_scx to fail
Yiwei Lin (1):
sched/fair: Remove unused 'curr' argument from pick_next_entity()
Yu Liao (2):
sched: Put task_group::idle under CONFIG_GROUP_SCHED_WEIGHT
sched: Add dummy version of sched_group_set_idle()
Yury Norov (1):
cpumask: introduce assign_cpu() macro
Zhang Qiao (3):
sched_ext: Remove redundant p->nr_cpus_allowed checker
sched/ext: Fix unmatch trailing comment of CONFIG_EXT_GROUP_SCHED
sched/ext: Use tg_cgroup() to elieminate duplicate code
Zhao Mengmeng (1):
sched_ext: Replace scx_next_task_picked() with switch_class() in
comment
Zicheng Qu (25):
bpf: Fix kabi for missed in bpf_link_info
bpf: Fix kabi for cookie in bpf_link_info
bpf: Fix kabi for value_type_btf_obj_fd in union bpf_attr
bpf: Fix kabi for struct bpf_verifier_env
selftest/bpf: Fix task_vma iter verification error
bpf: Fix kabi for btf in struct bpf_ctx_arg_aux
bpf: Fix kabi for called and verified in struct bpf_func_info_aux
sched: Fix kabi for reweight_task in struct sched_class
sched/syscalls: Fix kabi for EXPORT_SYMBOL moved from core.c to
syscalls.c
sched: Fix kabi for switching_to in struct sched_class
sched/fair: Fix kabi for check_preempt_curr and wakeup_preempt in
struct sched_class
sched: Fix kabi for dequeue_task in struct sched_class
sched_ext: Fix kabi for scx in struct task_struct
sched_ext: Fix kabi for switch_class in struct sched_class
sched: Fix kabi for exec_max in struct sched_statistics
sched_ext: Fix kabi for balance in struct sched_class
sched_ext: Fix kabi for header in kernel/sched/sched.h
sched: Fix kabi pick_task in struct sched_class
sched: Fix kabi for put_prev_task in struct sched_class
sched_ext: Fix kabi for scx_flags and scx_weight in struct task_group
sched: Fix kabi for int idle in struct task_group
sched: Add __setscheduler_class() for sched_ext
genirq: Fix kabi for kstat_irqs in struct irq_desc
bpf: Fix kabi for size in struct bpf_tramp_image
sched_ext: Enable sched_ext configs on arm64
guanjing (1):
sched_ext: fix application of sizeof to pointer
Documentation/bpf/bpf_iterators.rst | 2 +-
Documentation/bpf/kfuncs.rst | 14 +-
Documentation/scheduler/index.rst | 1 +
Documentation/scheduler/sched-design-CFS.rst | 8 +-
Documentation/scheduler/sched-ext.rst | 325 +
.../zh_CN/scheduler/sched-design-CFS.rst | 8 +-
MAINTAINERS | 14 +
arch/arm64/configs/openeuler_defconfig | 2 +
arch/arm64/net/bpf_jit_comp.c | 55 +-
arch/mips/dec/setup.c | 2 +-
arch/parisc/kernel/smp.c | 2 +-
arch/powerpc/kvm/book3s_hv_rm_xics.c | 2 +-
arch/riscv/net/bpf_jit_comp64.c | 43 +-
arch/s390/net/bpf_jit_comp.c | 56 +-
arch/x86/net/bpf_jit_comp.c | 130 +-
drivers/hid/bpf/hid_bpf_dispatch.c | 8 +-
drivers/tty/sysrq.c | 1 +
include/asm-generic/vmlinux.lds.h | 1 +
include/linux/bitops.h | 2 +
include/linux/bpf.h | 101 +-
include/linux/bpf_mem_alloc.h | 3 +
include/linux/bpf_verifier.h | 22 +-
include/linux/btf.h | 39 +
include/linux/btf_ids.h | 21 +-
include/linux/cgroup.h | 14 +-
include/linux/cleanup.h | 42 +-
include/linux/cpumask.h | 41 +-
include/linux/energy_model.h | 1 -
include/linux/file.h | 20 +
include/linux/filter.h | 2 +-
include/linux/irqdesc.h | 17 +-
include/linux/kernel_stat.h | 8 +
include/linux/sched.h | 8 +-
include/linux/sched/ext.h | 216 +
include/linux/sched/task.h | 8 +-
include/linux/trace_events.h | 6 +-
include/trace/events/sched_ext.h | 32 +
include/uapi/linux/bpf.h | 32 +-
include/uapi/linux/sched.h | 1 +
init/Kconfig | 10 +
init/init_task.c | 12 +
kernel/Kconfig.preempt | 27 +-
kernel/bpf/bpf_iter.c | 8 +-
kernel/bpf/bpf_struct_ops.c | 730 +-
kernel/bpf/bpf_struct_ops_types.h | 12 -
kernel/bpf/btf.c | 254 +-
kernel/bpf/cgroup_iter.c | 65 +-
kernel/bpf/core.c | 21 +-
kernel/bpf/cpumask.c | 10 +-
kernel/bpf/dispatcher.c | 7 +-
kernel/bpf/helpers.c | 186 +-
kernel/bpf/map_iter.c | 10 +-
kernel/bpf/memalloc.c | 14 +-
kernel/bpf/syscall.c | 22 +-
kernel/bpf/task_iter.c | 242 +-
kernel/bpf/trampoline.c | 101 +-
kernel/bpf/verifier.c | 309 +-
kernel/cgroup/cgroup.c | 18 +-
kernel/cgroup/rstat.c | 4 +-
kernel/fork.c | 17 +-
kernel/irq/Kconfig | 4 +
kernel/irq/internals.h | 2 +-
kernel/irq/irqdesc.c | 144 +-
kernel/irq/proc.c | 5 +-
kernel/sched/autogroup.c | 4 +-
kernel/sched/build_policy.c | 13 +
kernel/sched/core.c | 2492 +-----
kernel/sched/cpufreq_schedutil.c | 89 +-
kernel/sched/deadline.c | 175 +-
kernel/sched/debug.c | 3 +
kernel/sched/ext.c | 7242 +++++++++++++++++
kernel/sched/ext.h | 119 +
kernel/sched/ext_idle.c | 752 ++
kernel/sched/ext_idle.h | 39 +
kernel/sched/fair.c | 306 +-
kernel/sched/idle.c | 31 +-
kernel/sched/rt.c | 40 +-
kernel/sched/sched.h | 473 +-
kernel/sched/stop_task.c | 35 +-
kernel/sched/syscalls.c | 1713 ++++
kernel/trace/bpf_trace.c | 15 +-
kernel/trace/trace_kprobe.c | 14 +-
kernel/trace/trace_probe.c | 2 -
kernel/watchdog.c | 223 +-
lib/Kconfig.debug | 14 +
lib/dump_stack.c | 1 +
lib/rhashtable.c | 12 +-
net/bpf/bpf_dummy_struct_ops.c | 60 +-
net/bpf/test_run.c | 15 +-
net/core/filter.c | 29 +-
net/core/xdp.c | 10 +-
net/ipv4/bpf_tcp_ca.c | 93 +-
net/ipv4/fou_bpf.c | 10 +-
net/ipv4/tcp_bbr.c | 4 +-
net/ipv4/tcp_cong.c | 6 +-
net/ipv4/tcp_cubic.c | 4 +-
net/ipv4/tcp_dctcp.c | 4 +-
net/netfilter/nf_conntrack_bpf.c | 10 +-
net/netfilter/nf_nat_bpf.c | 10 +-
net/xfrm/xfrm_interface_bpf.c | 10 +-
scripts/gdb/linux/interrupts.py | 6 +-
tools/Makefile | 10 +-
.../bpf/bpftool/Documentation/bpftool-gen.rst | 58 +-
tools/bpf/bpftool/gen.c | 237 +-
tools/include/linux/bitops.h | 2 +
tools/include/uapi/linux/bpf.h | 21 +-
tools/include/uapi/linux/sched.h | 1 +
tools/lib/bpf/bpf.c | 4 +-
tools/lib/bpf/bpf.h | 4 +-
tools/lib/bpf/libbpf.c | 97 +-
tools/lib/bpf/libbpf_probes.c | 1 +
tools/perf/util/probe-finder.c | 4 +-
tools/sched_ext/.gitignore | 2 +
tools/sched_ext/Makefile | 246 +
tools/sched_ext/README.md | 270 +
.../sched_ext/include/bpf-compat/gnu/stubs.h | 11 +
tools/sched_ext/include/scx/common.bpf.h | 620 ++
tools/sched_ext/include/scx/common.h | 81 +
tools/sched_ext/include/scx/compat.bpf.h | 143 +
tools/sched_ext/include/scx/compat.h | 187 +
.../sched_ext/include/scx/enums.autogen.bpf.h | 105 +
tools/sched_ext/include/scx/enums.autogen.h | 41 +
tools/sched_ext/include/scx/enums.bpf.h | 12 +
tools/sched_ext/include/scx/enums.h | 27 +
tools/sched_ext/include/scx/user_exit_info.h | 118 +
tools/sched_ext/scx_central.bpf.c | 356 +
tools/sched_ext/scx_central.c | 136 +
tools/sched_ext/scx_flatcg.bpf.c | 954 +++
tools/sched_ext/scx_flatcg.c | 234 +
tools/sched_ext/scx_flatcg.h | 51 +
tools/sched_ext/scx_qmap.bpf.c | 827 ++
tools/sched_ext/scx_qmap.c | 155 +
tools/sched_ext/scx_show_state.py | 42 +
tools/sched_ext/scx_simple.bpf.c | 151 +
tools/sched_ext/scx_simple.c | 107 +
tools/testing/selftests/Makefile | 9 +-
.../testing/selftests/bpf/bpf_experimental.h | 27 +
.../selftests/bpf/bpf_testmod/bpf_testmod.c | 108 +-
.../selftests/bpf/bpf_testmod/bpf_testmod.h | 17 +
.../selftests/bpf/prog_tests/bpf_iter.c | 44 +-
.../selftests/bpf/prog_tests/cgroup_iter.c | 33 +
.../bpf/prog_tests/global_func_dead_code.c | 60 +
.../testing/selftests/bpf/prog_tests/iters.c | 209 +
.../selftests/bpf/prog_tests/rcu_read_lock.c | 6 +
.../selftests/bpf/prog_tests/spin_lock.c | 2 +
.../prog_tests/test_struct_ops_maybe_null.c | 46 +
.../bpf/prog_tests/test_struct_ops_module.c | 86 +
.../testing/selftests/bpf/prog_tests/timer.c | 4 +
.../selftests/bpf/prog_tests/verifier.c | 4 +
...f_iter_task_vma.c => bpf_iter_task_vmas.c} | 0
.../{bpf_iter_task.c => bpf_iter_tasks.c} | 0
.../bpf/progs/freplace_dead_global_func.c | 11 +
tools/testing/selftests/bpf/progs/iters_css.c | 72 +
.../selftests/bpf/progs/iters_css_task.c | 102 +
.../testing/selftests/bpf/progs/iters_task.c | 41 +
.../selftests/bpf/progs/iters_task_failure.c | 105 +
.../selftests/bpf/progs/iters_task_vma.c | 54 +
.../selftests/bpf/progs/iters_testmod_seq.c | 50 +
.../selftests/bpf/progs/rcu_read_lock.c | 120 +
.../bpf/progs/struct_ops_maybe_null.c | 29 +
.../bpf/progs/struct_ops_maybe_null_fail.c | 24 +
.../selftests/bpf/progs/struct_ops_module.c | 37 +
.../selftests/bpf/progs/test_global_func12.c | 4 +-
.../selftests/bpf/progs/test_spin_lock.c | 65 +
.../selftests/bpf/progs/test_spin_lock_fail.c | 44 +
tools/testing/selftests/bpf/progs/timer.c | 63 +-
.../selftests/bpf/progs/verifier_bits_iter.c | 232 +
.../bpf/progs/verifier_global_subprogs.c | 101 +
.../selftests/bpf/progs/verifier_spin_lock.c | 2 +-
.../bpf/progs/verifier_subprog_precision.c | 4 +-
tools/testing/selftests/bpf/test_loader.c | 9 +-
tools/testing/selftests/bpf/test_maps.c | 18 +-
tools/testing/selftests/bpf/test_maps.h | 5 +
tools/testing/selftests/sched_ext/.gitignore | 6 +
tools/testing/selftests/sched_ext/Makefile | 211 +
tools/testing/selftests/sched_ext/config | 9 +
.../selftests/sched_ext/create_dsq.bpf.c | 58 +
.../testing/selftests/sched_ext/create_dsq.c | 57 +
.../sched_ext/ddsp_bogus_dsq_fail.bpf.c | 42 +
.../selftests/sched_ext/ddsp_bogus_dsq_fail.c | 60 +
.../sched_ext/ddsp_vtimelocal_fail.bpf.c | 39 +
.../sched_ext/ddsp_vtimelocal_fail.c | 59 +
.../selftests/sched_ext/dsp_local_on.bpf.c | 68 +
.../selftests/sched_ext/dsp_local_on.c | 60 +
.../sched_ext/enq_last_no_enq_fails.bpf.c | 29 +
.../sched_ext/enq_last_no_enq_fails.c | 64 +
.../sched_ext/enq_select_cpu_fails.bpf.c | 43 +
.../sched_ext/enq_select_cpu_fails.c | 61 +
tools/testing/selftests/sched_ext/exit.bpf.c | 86 +
tools/testing/selftests/sched_ext/exit.c | 64 +
tools/testing/selftests/sched_ext/exit_test.h | 20 +
.../testing/selftests/sched_ext/hotplug.bpf.c | 61 +
tools/testing/selftests/sched_ext/hotplug.c | 170 +
.../selftests/sched_ext/hotplug_test.h | 15 +
.../sched_ext/init_enable_count.bpf.c | 53 +
.../selftests/sched_ext/init_enable_count.c | 157 +
.../testing/selftests/sched_ext/maximal.bpf.c | 166 +
tools/testing/selftests/sched_ext/maximal.c | 54 +
.../selftests/sched_ext/maybe_null.bpf.c | 36 +
.../testing/selftests/sched_ext/maybe_null.c | 49 +
.../sched_ext/maybe_null_fail_dsp.bpf.c | 25 +
.../sched_ext/maybe_null_fail_yld.bpf.c | 28 +
.../testing/selftests/sched_ext/minimal.bpf.c | 21 +
tools/testing/selftests/sched_ext/minimal.c | 58 +
.../selftests/sched_ext/prog_run.bpf.c | 33 +
tools/testing/selftests/sched_ext/prog_run.c | 78 +
.../testing/selftests/sched_ext/reload_loop.c | 74 +
tools/testing/selftests/sched_ext/runner.c | 212 +
tools/testing/selftests/sched_ext/scx_test.h | 131 +
.../selftests/sched_ext/select_cpu_dfl.bpf.c | 40 +
.../selftests/sched_ext/select_cpu_dfl.c | 75 +
.../sched_ext/select_cpu_dfl_nodispatch.bpf.c | 89 +
.../sched_ext/select_cpu_dfl_nodispatch.c | 75 +
.../sched_ext/select_cpu_dispatch.bpf.c | 41 +
.../selftests/sched_ext/select_cpu_dispatch.c | 73 +
.../select_cpu_dispatch_bad_dsq.bpf.c | 37 +
.../sched_ext/select_cpu_dispatch_bad_dsq.c | 59 +
.../select_cpu_dispatch_dbl_dsp.bpf.c | 38 +
.../sched_ext/select_cpu_dispatch_dbl_dsp.c | 59 +
.../sched_ext/select_cpu_vtime.bpf.c | 92 +
.../selftests/sched_ext/select_cpu_vtime.c | 62 +
.../selftests/sched_ext/test_example.c | 49 +
tools/testing/selftests/sched_ext/util.c | 71 +
tools/testing/selftests/sched_ext/util.h | 13 +
224 files changed, 24754 insertions(+), 3360 deletions(-)
create mode 100644 Documentation/scheduler/sched-ext.rst
create mode 100644 include/linux/sched/ext.h
create mode 100644 include/trace/events/sched_ext.h
delete mode 100644 kernel/bpf/bpf_struct_ops_types.h
create mode 100644 kernel/sched/ext.c
create mode 100644 kernel/sched/ext.h
create mode 100644 kernel/sched/ext_idle.c
create mode 100644 kernel/sched/ext_idle.h
create mode 100644 kernel/sched/syscalls.c
create mode 100644 tools/sched_ext/.gitignore
create mode 100644 tools/sched_ext/Makefile
create mode 100644 tools/sched_ext/README.md
create mode 100644 tools/sched_ext/include/bpf-compat/gnu/stubs.h
create mode 100644 tools/sched_ext/include/scx/common.bpf.h
create mode 100644 tools/sched_ext/include/scx/common.h
create mode 100644 tools/sched_ext/include/scx/compat.bpf.h
create mode 100644 tools/sched_ext/include/scx/compat.h
create mode 100644 tools/sched_ext/include/scx/enums.autogen.bpf.h
create mode 100644 tools/sched_ext/include/scx/enums.autogen.h
create mode 100644 tools/sched_ext/include/scx/enums.bpf.h
create mode 100644 tools/sched_ext/include/scx/enums.h
create mode 100644 tools/sched_ext/include/scx/user_exit_info.h
create mode 100644 tools/sched_ext/scx_central.bpf.c
create mode 100644 tools/sched_ext/scx_central.c
create mode 100644 tools/sched_ext/scx_flatcg.bpf.c
create mode 100644 tools/sched_ext/scx_flatcg.c
create mode 100644 tools/sched_ext/scx_flatcg.h
create mode 100644 tools/sched_ext/scx_qmap.bpf.c
create mode 100644 tools/sched_ext/scx_qmap.c
create mode 100644 tools/sched_ext/scx_show_state.py
create mode 100644 tools/sched_ext/scx_simple.bpf.c
create mode 100644 tools/sched_ext/scx_simple.c
create mode 100644 tools/testing/selftests/bpf/prog_tests/global_func_dead_code.c
create mode 100644 tools/testing/selftests/bpf/prog_tests/test_struct_ops_maybe_null.c
create mode 100644 tools/testing/selftests/bpf/prog_tests/test_struct_ops_module.c
rename tools/testing/selftests/bpf/progs/{bpf_iter_task_vma.c => bpf_iter_task_vmas.c} (100%)
rename tools/testing/selftests/bpf/progs/{bpf_iter_task.c => bpf_iter_tasks.c} (100%)
create mode 100644 tools/testing/selftests/bpf/progs/freplace_dead_global_func.c
create mode 100644 tools/testing/selftests/bpf/progs/iters_css.c
create mode 100644 tools/testing/selftests/bpf/progs/iters_css_task.c
create mode 100644 tools/testing/selftests/bpf/progs/iters_task.c
create mode 100644 tools/testing/selftests/bpf/progs/iters_task_failure.c
create mode 100644 tools/testing/selftests/bpf/progs/iters_task_vma.c
create mode 100644 tools/testing/selftests/bpf/progs/struct_ops_maybe_null.c
create mode 100644 tools/testing/selftests/bpf/progs/struct_ops_maybe_null_fail.c
create mode 100644 tools/testing/selftests/bpf/progs/struct_ops_module.c
create mode 100644 tools/testing/selftests/bpf/progs/verifier_bits_iter.c
create mode 100644 tools/testing/selftests/bpf/progs/verifier_global_subprogs.c
create mode 100644 tools/testing/selftests/sched_ext/.gitignore
create mode 100644 tools/testing/selftests/sched_ext/Makefile
create mode 100644 tools/testing/selftests/sched_ext/config
create mode 100644 tools/testing/selftests/sched_ext/create_dsq.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/create_dsq.c
create mode 100644 tools/testing/selftests/sched_ext/ddsp_bogus_dsq_fail.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/ddsp_bogus_dsq_fail.c
create mode 100644 tools/testing/selftests/sched_ext/ddsp_vtimelocal_fail.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/ddsp_vtimelocal_fail.c
create mode 100644 tools/testing/selftests/sched_ext/dsp_local_on.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/dsp_local_on.c
create mode 100644 tools/testing/selftests/sched_ext/enq_last_no_enq_fails.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/enq_last_no_enq_fails.c
create mode 100644 tools/testing/selftests/sched_ext/enq_select_cpu_fails.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/enq_select_cpu_fails.c
create mode 100644 tools/testing/selftests/sched_ext/exit.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/exit.c
create mode 100644 tools/testing/selftests/sched_ext/exit_test.h
create mode 100644 tools/testing/selftests/sched_ext/hotplug.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/hotplug.c
create mode 100644 tools/testing/selftests/sched_ext/hotplug_test.h
create mode 100644 tools/testing/selftests/sched_ext/init_enable_count.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/init_enable_count.c
create mode 100644 tools/testing/selftests/sched_ext/maximal.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/maximal.c
create mode 100644 tools/testing/selftests/sched_ext/maybe_null.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/maybe_null.c
create mode 100644 tools/testing/selftests/sched_ext/maybe_null_fail_dsp.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/maybe_null_fail_yld.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/minimal.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/minimal.c
create mode 100644 tools/testing/selftests/sched_ext/prog_run.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/prog_run.c
create mode 100644 tools/testing/selftests/sched_ext/reload_loop.c
create mode 100644 tools/testing/selftests/sched_ext/runner.c
create mode 100644 tools/testing/selftests/sched_ext/scx_test.h
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dfl.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dfl.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dfl_nodispatch.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dfl_nodispatch.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dispatch.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dispatch.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dispatch_bad_dsq.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dispatch_bad_dsq.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dispatch_dbl_dsp.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dispatch_dbl_dsp.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_vtime.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_vtime.c
create mode 100644 tools/testing/selftests/sched_ext/test_example.c
create mode 100644 tools/testing/selftests/sched_ext/util.c
create mode 100644 tools/testing/selftests/sched_ext/util.h
--
2.34.1
1
399
[openeuler:openEuler-1.0-LTS 1943/1943] arch/x86/events/zhaoxin/core.c:505:1: warning: attribute declaration must precede definition
by kernel test robot 16 Dec '25
by kernel test robot 16 Dec '25
16 Dec '25
Hi LeoLiu-oc,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 49bc452fdcb1e9ec3f9bb20cd3e15b865a2933fd
commit: 0ce7c3b6e8a986ee9ef92a07ae18964835446c07 [1943/1943] x86/perf: Add hardware performance events support for Zhaoxin CPU.
config: x86_64-randconfig-005-20251216 (https://download.01.org/0day-ci/archive/20251216/202512161945.q1Ihd2Pk-lkp@…)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 1335a05ab8bc8339ce24be3a9da89d8c3f4e0571)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251216/202512161945.q1Ihd2Pk-lkp@…)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512161945.q1Ihd2Pk-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from <built-in>:2:
In file included from include/linux/compiler_types.h:59:
include/linux/compiler-clang.h:20:9: warning: '__SANITIZE_ADDRESS__' macro redefined [-Wmacro-redefined]
20 | #define __SANITIZE_ADDRESS__
| ^
<built-in>:354:9: note: previous definition is here
354 | #define __SANITIZE_ADDRESS__ 1
| ^
>> arch/x86/events/zhaoxin/core.c:505:1: warning: attribute declaration must precede definition [-Wignored-attributes]
505 | __init int zhaoxin_pmu_init(void)
| ^
include/linux/init.h:50:17: note: expanded from macro '__init'
50 | #define __init __section(.init.text) __cold __latent_entropy __noinitretpoline
| ^
include/linux/compiler_types.h:222:38: note: expanded from macro '__section'
222 | #define __section(S) __attribute__((__section__(#S)))
| ^
arch/x86/events/zhaoxin/../perf_event.h:1054:19: note: previous definition is here
1054 | static inline int zhaoxin_pmu_init(void)
| ^
>> arch/x86/events/zhaoxin/core.c:505:1: warning: attribute declaration must precede definition [-Wignored-attributes]
505 | __init int zhaoxin_pmu_init(void)
| ^
include/linux/init.h:50:39: note: expanded from macro '__init'
50 | #define __init __section(.init.text) __cold __latent_entropy __noinitretpoline
| ^
include/linux/compiler_types.h:221:33: note: expanded from macro '__cold'
221 | #define __cold __attribute__((cold))
| ^
arch/x86/events/zhaoxin/../perf_event.h:1054:19: note: previous definition is here
1054 | static inline int zhaoxin_pmu_init(void)
| ^
arch/x86/events/zhaoxin/core.c:505:12: error: redefinition of 'zhaoxin_pmu_init'
505 | __init int zhaoxin_pmu_init(void)
| ^
arch/x86/events/zhaoxin/../perf_event.h:1054:19: note: previous definition is here
1054 | static inline int zhaoxin_pmu_init(void)
| ^
3 warnings and 1 error generated.
vim +505 arch/x86/events/zhaoxin/core.c
504
> 505 __init int zhaoxin_pmu_init(void)
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0
Jiri Olsa (2):
bpf: Add missed value to kprobe perf link info
bpf: Add cookie to perf_event bpf_link_info records
Zicheng Qu (2):
bpf: Fix kabi for missed in bpf_link_info
bpf: Fix kabi for cookie in bpf_link_info
include/linux/trace_events.h | 6 ++++--
include/uapi/linux/bpf.h | 15 +++++++++++++++
kernel/bpf/syscall.c | 18 ++++++++++++------
kernel/trace/bpf_trace.c | 5 +++--
kernel/trace/trace_kprobe.c | 14 +++++++++++---
tools/include/uapi/linux/bpf.h | 7 +++++++
6 files changed, 52 insertions(+), 13 deletions(-)
--
2.34.1
1
4
[PATCH openEuler-1.0-LTS] ip6_vti: fix slab-use-after-free in decode_session6
by Wang Liang 16 Dec '25
by Wang Liang 16 Dec '25
16 Dec '25
From: Zhengchao Shao <shaozhengchao(a)huawei.com>
stable inclusion
from stable-v4.19.293
commit fa6c6c04f6c9b21b315023f487e5a07ae7fcf647
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IDBOS5
CVE: CVE-2023-53821
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
[ Upstream commit 9fd41f1ba638938c9a1195d09bc6fa3be2712f25 ]
When ipv6_vti device is set to the qdisc of the sfb type, the cb field
of the sent skb may be modified during enqueuing. Then,
slab-use-after-free may occur when ipv6_vti device sends IPv6 packets.
The stack information is as follows:
BUG: KASAN: slab-use-after-free in decode_session6+0x103f/0x1890
Read of size 1 at addr ffff88802e08edc2 by task swapper/0/0
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.4.0-next-20230707-00001-g84e2cad7f979 #410
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 04/01/2014
Call Trace:
<IRQ>
dump_stack_lvl+0xd9/0x150
print_address_description.constprop.0+0x2c/0x3c0
kasan_report+0x11d/0x130
decode_session6+0x103f/0x1890
__xfrm_decode_session+0x54/0xb0
vti6_tnl_xmit+0x3e6/0x1ee0
dev_hard_start_xmit+0x187/0x700
sch_direct_xmit+0x1a3/0xc30
__qdisc_run+0x510/0x17a0
__dev_queue_xmit+0x2215/0x3b10
neigh_connected_output+0x3c2/0x550
ip6_finish_output2+0x55a/0x1550
ip6_finish_output+0x6b9/0x1270
ip6_output+0x1f1/0x540
ndisc_send_skb+0xa63/0x1890
ndisc_send_rs+0x132/0x6f0
addrconf_rs_timer+0x3f1/0x870
call_timer_fn+0x1a0/0x580
expire_timers+0x29b/0x4b0
run_timer_softirq+0x326/0x910
__do_softirq+0x1d4/0x905
irq_exit_rcu+0xb7/0x120
sysvec_apic_timer_interrupt+0x97/0xc0
</IRQ>
Allocated by task 9176:
kasan_save_stack+0x22/0x40
kasan_set_track+0x25/0x30
__kasan_slab_alloc+0x7f/0x90
kmem_cache_alloc_node+0x1cd/0x410
kmalloc_reserve+0x165/0x270
__alloc_skb+0x129/0x330
netlink_sendmsg+0x9b1/0xe30
sock_sendmsg+0xde/0x190
____sys_sendmsg+0x739/0x920
___sys_sendmsg+0x110/0x1b0
__sys_sendmsg+0xf7/0x1c0
do_syscall_64+0x39/0xb0
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Freed by task 9176:
kasan_save_stack+0x22/0x40
kasan_set_track+0x25/0x30
kasan_save_free_info+0x2b/0x40
____kasan_slab_free+0x160/0x1c0
slab_free_freelist_hook+0x11b/0x220
kmem_cache_free+0xf0/0x490
skb_free_head+0x17f/0x1b0
skb_release_data+0x59c/0x850
consume_skb+0xd2/0x170
netlink_unicast+0x54f/0x7f0
netlink_sendmsg+0x926/0xe30
sock_sendmsg+0xde/0x190
____sys_sendmsg+0x739/0x920
___sys_sendmsg+0x110/0x1b0
__sys_sendmsg+0xf7/0x1c0
do_syscall_64+0x39/0xb0
entry_SYSCALL_64_after_hwframe+0x63/0xcd
The buggy address belongs to the object at ffff88802e08ed00
which belongs to the cache skbuff_small_head of size 640
The buggy address is located 194 bytes inside of
freed 640-byte region [ffff88802e08ed00, ffff88802e08ef80)
As commit f855691975bb ("xfrm6: Fix the nexthdr offset in
_decode_session6.") showed, xfrm_decode_session was originally intended
only for the receive path. IP6CB(skb)->nhoff is not set during
transmission. Therefore, set the cb field in the skb to 0 before
sending packets.
Fixes: f855691975bb ("xfrm6: Fix the nexthdr offset in _decode_session6.")
Signed-off-by: Zhengchao Shao <shaozhengchao(a)huawei.com>
Signed-off-by: Steffen Klassert <steffen.klassert(a)secunet.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
Signed-off-by: Wang Liang <wangliang74(a)huawei.com>
---
net/ipv6/ip6_vti.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c
index 866ce815625e..a64050e77588 100644
--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -562,12 +562,12 @@ vti6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
vti6_addr_conflict(t, ipv6_hdr(skb)))
goto tx_err;
- xfrm_decode_session(skb, &fl, AF_INET6);
memset(IP6CB(skb), 0, sizeof(*IP6CB(skb)));
+ xfrm_decode_session(skb, &fl, AF_INET6);
break;
case htons(ETH_P_IP):
- xfrm_decode_session(skb, &fl, AF_INET);
memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
+ xfrm_decode_session(skb, &fl, AF_INET);
break;
default:
goto tx_err;
--
2.34.1
2
1
[openeuler:openEuler-1.0-LTS 1941/1941] sound/soc/codecs/simple-amplifier.o: warning: objtool: missing symbol for section .init.text
by kernel test robot 16 Dec '25
by kernel test robot 16 Dec '25
16 Dec '25
Hi Mark,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 05226913813ed71f46a7f726a6c73813d8d0b0d7
commit: 4aa5db22d35588e1a5d2ee88472348ea73d9fb23 [1941/1941] Merge branch 'asoc-4.19' into asoc-next
config: x86_64-buildonly-randconfig-006-20251212 (https://download.01.org/0day-ci/archive/20251216/202512161723.lgbkIZyg-lkp@…)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 1335a05ab8bc8339ce24be3a9da89d8c3f4e0571)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251216/202512161723.lgbkIZyg-lkp@…)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512161723.lgbkIZyg-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> sound/soc/codecs/simple-amplifier.o: warning: objtool: missing symbol for section .init.text
--
sound/soc/codecs/es7241.c:206:33: warning: unused variable 'es7241_chip' [-Wunused-const-variable]
206 | static const struct es7241_chip es7241_chip = {
| ^~~~~~~~~~~
1 warning generated.
>> sound/soc/codecs/es7241.o: warning: objtool: missing symbol for section .init.text
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0
Aboorva Devarajan (2):
sched_ext: Documentation: Remove mentions of scx_bpf_switch_all
sched: Pass correct scheduling policy to __setscheduler_class
Alexander Lobakin (1):
bitops: make BYTES_TO_BITS() treewide-available
Alexei Starovoitov (1):
selftests/bpf: modify test_loader that didn't support running
bpf_prog_type_syscall programs
Andrea Righi (32):
sched_ext: fix typo in set_weight() description
sched_ext: add CONFIG_DEBUG_INFO_BTF dependency
sched_ext: Provide a sysfs enable_seq counter
sched_ext: improve WAKE_SYNC behavior for default idle CPU selection
sched_ext: Clarify ops.select_cpu() for single-CPU tasks
sched_ext: Introduce LLC awareness to the default idle selection
policy
sched_ext: Introduce NUMA awareness to the default idle selection
policy
sched_ext: Do not enable LLC/NUMA optimizations when domains overlap
sched_ext: Fix incorrect use of bitwise AND
MAINTAINERS: add self as reviewer for sched_ext
sched_ext: idle: Refresh idle masks during idle-to-idle transitions
sched_ext: Use the NUMA scheduling domain for NUMA optimizations
sched_ext: idle: use assign_cpu() to update the idle cpumask
sched_ext: idle: clarify comments
sched_ext: idle: introduce check_builtin_idle_enabled() helper
sched_ext: idle: small CPU iteration refactoring
sched_ext: update scx_bpf_dsq_insert() doc for SCX_DSQ_LOCAL_ON
sched_ext: Include remaining task time slice in error state dump
sched_ext: Include task weight in the error state dump
selftests/sched_ext: Fix enum resolution
tools/sched_ext: Add helper to check task migration state
sched_ext: selftests/dsp_local_on: Fix selftest on UP systems
sched_ext: Fix lock imbalance in dispatch_to_local_dsq()
selftests/sched_ext: Fix exit selftest hang on UP
sched_ext: Move built-in idle CPU selection policy to a separate file
sched_ext: Track currently locked rq
sched_ext: Make scx_locked_rq() inline
sched_ext: Fix missing rq lock in scx_bpf_cpuperf_set()
sched/ext: Fix invalid task state transitions on class switch
sched_ext: Make scx_kf_allowed_if_unlocked() available outside ext.c
sched_ext: Remove duplicate BTF_ID_FLAGS definitions
sched_ext: Fix rq lock state in hotplug ops
Andrii Nakryiko (7):
bpf: extract iterator argument type and name validation logic
bpf: allow passing struct bpf_iter_<type> as kfunc arguments
selftests/bpf: test passing iterator to a kfunc
bpf: Emit global subprog name in verifier logs
bpf: Validate global subprogs lazily
selftests/bpf: Add lazy global subprog validation tests
selftests/bpf: validate eliminated global subprog is not freplaceable
Arnaldo Carvalho de Melo (1):
tools include UAPI: Sync linux/sched.h copy with the kernel sources
Atul Kumar Pant (1):
sched_ext: Fixes typos in comments
Benjamin Tissoires (1):
bpf: introduce in_sleepable() helper
Bitao Hu (4):
genirq: Convert kstat_irqs to a struct
genirq: Provide a snapshot mechanism for interrupt statistics
watchdog/softlockup: Low-overhead detection of interrupt storm
watchdog/softlockup: Report the most frequent interrupts
Björn Töpel (1):
selftests: sched_ext: Add sched_ext as proper selftest target
Breno Leitao (3):
rhashtable: Fix potential deadlock by moving schedule_work outside
lock
sched_ext: Use kvzalloc for large exit_dump allocation
sched/ext: Prevent update_locked_rq() calls with NULL rq
Changwoo Min (11):
sched_ext: Clarify sched_ext_ops table for userland scheduler
sched_ext: add a missing rcu_read_lock/unlock pair at
scx_select_cpu_dfl()
MAINTAINERS: add me as reviewer for sched_ext
sched_ext: Replace rq_lock() to raw_spin_rq_lock() in scx_ops_bypass()
sched_ext: Relocate scx_enabled() related code
sched_ext: Implement scx_bpf_now()
sched_ext: Add scx_bpf_now() for BPF scheduler
sched_ext: Add time helpers for BPF schedulers
sched_ext: Replace bpf_ktime_get_ns() to scx_bpf_now()
sched_ext: Use time helpers in BPF schedulers
sched_ext: Fix incorrect time delta calculation in time_delta()
Christian Brauner (1):
file: add take_fd() cleanup helper
Christian Loehle (1):
sched/fair: Remove stale FREQUENCY_UTIL comment
Chuyi Zhou (15):
cgroup: Prepare for using css_task_iter_*() in BPF
bpf: Introduce css_task open-coded iterator kfuncs
bpf: Introduce task open coded iterator kfuncs
bpf: Introduce css open-coded iterator kfuncs
bpf: teach the verifier to enforce css_iter and task_iter in RCU CS
bpf: Let bpf_iter_task_new accept null task ptr
selftests/bpf: rename bpf_iter_task.c to bpf_iter_tasks.c
selftests/bpf: Add tests for open-coded task and css iter
bpf: Let verifier consider {task,cgroup} is trusted in bpf_iter_reg
bpf: Relax allowlist for css_task iter
selftests/bpf: Add tests for css_task iter combining with cgroup iter
selftests/bpf: Add test for using css_task iter in sleepable progs
selftests/bpf: get trusted cgrp from bpf_iter__cgroup directly
sched_ext: Fix the incorrect bpf_list kfunc API in common.bpf.h.
sched_ext: Use SCX_CALL_OP_TASK in task_tick_scx
Colin Ian King (1):
sched_ext: Fix spelling mistake: "intead" -> "instead"
Daniel Xu (3):
bpf: btf: Support flags for BTF_SET8 sets
bpf: btf: Add BTF_KFUNCS_START/END macro pair
bpf: treewide: Annotate BPF kfuncs in BTF
Dave Marchevsky (5):
bpf: Don't explicitly emit BTF for struct btf_iter_num
selftests/bpf: Rename bpf_iter_task_vma.c to bpf_iter_task_vmas.c
bpf: Introduce task_vma open-coded iterator kfuncs
selftests/bpf: Add tests for open-coded task_vma iter
bpf: Add __bpf_kfunc_{start,end}_defs macros
David Vernet (15):
bpf: Add ability to pin bpf timer to calling CPU
selftests/bpf: Test pinning bpf timer to a core
sched_ext: Implement runnable task stall watchdog
sched_ext: Print sched_ext info when dumping stack
sched_ext: Implement SCX_KICK_WAIT
sched_ext: Implement sched_ext_ops.cpu_acquire/release()
sched_ext: Add selftests
bpf: Load vmlinux btf for any struct_ops map
sched_ext: Make scx_bpf_cpuperf_set() @cpu arg signed
scx: Allow calling sleepable kfuncs from BPF_PROG_TYPE_SYSCALL
scx/selftests: Verify we can call create_dsq from prog_run
sched_ext: Remove unnecessary cpu_relax()
scx: Fix exit selftest to use custom DSQ
scx: Fix raciness in scx_ops_bypass()
scx: Fix maximal BPF selftest prog
Dawei Li (1):
genirq: Deduplicate interrupt descriptor initialization
Devaansh Kumar (1):
sched_ext: selftests: Fix grammar in tests description
Devaansh-Kumar (1):
sched_ext: Documentation: Update instructions for running example
schedulers
Geliang Tang (1):
bpf, btf: Check btf for register_bpf_struct_ops
Henry Huang (2):
sched_ext: initialize kit->cursor.flags
sched_ext: keep running prev when prev->scx.slice != 0
Herbert Xu (1):
rhashtable: Fix rhashtable_try_insert test
Honglei Wang (3):
sched_ext: use correct function name in pick_task_scx() warning
message
sched_ext: Add __weak to fix the build errors
sched_ext: switch class when preempted by higher priority scheduler
Hongyan Xia (1):
sched/ext: Add BPF function to fetch rq
Hou Tao (7):
bpf: Free dynamically allocated bits in bpf_iter_bits_destroy()
bpf: Add bpf_mem_alloc_check_size() helper
bpf: Check the validity of nr_words in bpf_iter_bits_new()
bpf: Use __u64 to save the bits in bits iterator
selftests/bpf: Add three test cases for bits_iter
selftests/bpf: Use -4095 as the bad address for bits iterator
selftests/bpf: Export map_update_retriable()
Ihor Solodrai (2):
selftests/sched_ext: add order-only dependency of runner.o on BPFOBJ
selftests/sched_ext: fix build after renames in sched_ext API
Ilpo Järvinen (1):
<linux/cleanup.h>: Allow the passing of both iomem and non-iomem
pointers to no_free_ptr()
Ingo Molnar (3):
sched/syscalls: Split out kernel/sched/syscalls.c from
kernel/sched/core.c
sched/fair: Rename check_preempt_wakeup() to
check_preempt_wakeup_fair()
sched/fair: Rename check_preempt_curr() to wakeup_preempt()
Jake Hillion (1):
sched_ext: create_dsq: Return -EEXIST on duplicate request
Jiapeng Chong (1):
sched_ext: Fixes incorrect type in bpf_scx_init()
Jiayuan Chen (1):
selftests/bpf: Fixes for test_maps test
Jiri Olsa (2):
bpf: Add missed value to kprobe perf link info
bpf: Add cookie to perf_event bpf_link_info records
Kui-Feng Lee (28):
bpf: refactory struct_ops type initialization to a function.
bpf: get type information with BTF_ID_LIST
bpf, net: introduce bpf_struct_ops_desc.
bpf: add struct_ops_tab to btf.
bpf: make struct_ops_map support btfs other than btf_vmlinux.
bpf: pass btf object id in bpf_map_info.
bpf: lookup struct_ops types from a given module BTF.
bpf: pass attached BTF to the bpf_struct_ops subsystem
bpf: hold module refcnt in bpf_struct_ops map creation and prog
verification.
bpf: validate value_type
bpf, net: switch to dynamic registration
libbpf: Find correct module BTFs for struct_ops maps and progs.
bpf: export btf_ctx_access to modules.
selftests/bpf: test case for register_bpf_struct_ops().
bpf: Fix error checks against bpf_get_btf_vmlinux().
bpf: Move __kfunc_param_match_suffix() to btf.c.
bpf: Remove an unnecessary check.
bpf: add btf pointer to struct bpf_ctx_arg_aux.
bpf: Create argument information for nullable arguments.
selftests/bpf: Suppress warning message of an unused variable.
selftests/bpf: Test PTR_MAYBE_NULL arguments of struct_ops operators.
libbpf: Set btf_value_type_id of struct bpf_map for struct_ops.
libbpf: Convert st_ops->data to shadow type.
bpftool: Generated shadow variables for struct_ops maps.
bpftool: Add an example for struct_ops map and shadow type.
selftests/bpf: Test if shadow types work correctly.
bpf, net: validate struct_ops when updating value.
bpf: struct_ops supports more than one page for trampolines.
Kumar Kartikeya Dwivedi (4):
bpf: Allow calling static subprogs while holding a bpf_spin_lock
selftests/bpf: Add test for static subprog call in lock cs
bpf: Transfer RCU lock state between subprog calls
selftests/bpf: Add tests for RCU lock transfer between subprogs
Liang Jie (1):
sched_ext: Use sizeof_field for key_len in dsq_hash_params
Manu Bretelle (1):
sched_ext: define missing cfi stubs for sched_ext
Martin KaFai Lau (3):
libbpf: Ensure undefined bpf_attr field stays 0
bpf: Reject struct_ops registration that uses module ptr and the
module btf_id is missing
bpf: Use kallsyms to find the function name of a struct_ops's stub
function
Matthieu Baerts (1):
bpf: fix compilation error without CGROUPS
Peter Zijlstra (20):
cleanup: Make no_free_ptr() __must_check
sched: Simplify set_user_nice()
sched: Simplify syscalls
sched: Simplify sched_{set,get}affinity()
sched: Simplify yield_to()
sched: Simplify sched_rr_get_interval()
sched: Simplify sched_move_task()
sched: Misc cleanups
sched/deadline: Move bandwidth accounting into {en,de}queue_dl_entity
sched: Allow sched_class::dequeue_task() to fail
sched: Unify runtime accounting across classes
sched: Use set_next_task(.first) where required
sched/fair: Cleanup pick_task_fair() vs throttle
sched/fair: Cleanup pick_task_fair()'s curr
sched/fair: Unify pick_{,next_}_task_fair()
sched: Fixup set_next_task() implementations
sched: Split up put_prev_task_balance()
sched: Rework pick_next_task()
sched: Combine the last put_prev_task() and the first set_next_task()
sched: Add put_prev_task(.next)
Pu Lehui (1):
riscv, bpf: Fix out-of-bounds issue when preparing trampoline image
Randy Dunlap (1):
sched_ext: fix kernel-doc warnings
Shizhao Chen (1):
sched_ext: Add option -l in selftest runner to list all available
tests
Song Liu (8):
bpf: Charge modmem for struct_ops trampoline
bpf: Let bpf_prog_pack_free handle any pointer
bpf: Adjust argument names of arch_prepare_bpf_trampoline()
bpf: Add helpers for trampoline image management
bpf, x86: Adjust arch_prepare_bpf_trampoline return value
bpf: Add arch_bpf_trampoline_size()
bpf: Use arch_bpf_trampoline_size
x86, bpf: Use bpf_prog_pack for bpf trampoline
T.J. Mercier (1):
bpf, docs: Fix broken link to renamed bpf_iter_task_vmas.c
Tejun Heo (148):
sched: Restructure sched_class order sanity checks in sched_init()
sched: Allow sched_cgroup_fork() to fail and introduce
sched_cancel_fork()
sched: Add sched_class->reweight_task()
sched: Add sched_class->switching_to() and expose
check_class_changing/changed()
sched: Factor out cgroup weight conversion functions
sched: Factor out update_other_load_avgs() from
__update_blocked_others()
sched: Add normal_policy()
sched_ext: Add boilerplate for extensible scheduler class
sched_ext: Implement BPF extensible scheduler class
sched_ext: Add scx_simple and scx_example_qmap example schedulers
sched_ext: Add sysrq-S which disables the BPF scheduler
sched_ext: Allow BPF schedulers to disallow specific tasks from
joining SCHED_EXT
sched_ext: Print debug dump after an error exit
tools/sched_ext: Add scx_show_state.py
sched_ext: Implement scx_bpf_kick_cpu() and task preemption support
sched_ext: Add a central scheduler which makes all scheduling
decisions on one CPU
sched_ext: Make watchdog handle ops.dispatch() looping stall
sched_ext: Add task state tracking operations
sched_ext: Implement tickless support
sched_ext: Track tasks that are subjects of the in-flight SCX
operation
sched_ext: Implement sched_ext_ops.cpu_online/offline()
sched_ext: Bypass BPF scheduler while PM events are in progress
sched_ext: Implement core-sched support
sched_ext: Add vtime-ordered priority queue to dispatch_q's
sched_ext: Documentation: scheduler: Document extensible scheduler
class
sched, sched_ext: Replace scx_next_task_picked() with
sched_class->switch_class()
cpufreq_schedutil: Refactor sugov_cpu_is_busy()
sched_ext: Add cpuperf support
sched_ext: Drop tools_clean target from the top-level Makefile
sched_ext: Swap argument positions in kcalloc() call to avoid compiler
warning
sched, sched_ext: Simplify dl_prio() case handling in sched_fork()
sched_ext: Account for idle policy when setting p->scx.weight in
scx_ops_enable_task()
sched_ext: Disallow loading BPF scheduler if isolcpus= domain
isolation is in effect
sched_ext: Minor cleanups in kernel/sched/ext.h
sched, sched_ext: Open code for_balance_class_range()
sched, sched_ext: Move some declarations from kernel/sched/ext.h to
sched.h
sched_ext: Take out ->priq and ->flags from scx_dsq_node
sched_ext: Implement DSQ iterator
sched_ext/scx_qmap: Add an example usage of DSQ iterator
sched_ext: Reimplement scx_bpf_reenqueue_local()
sched_ext: Make scx_bpf_reenqueue_local() skip tasks that are being
migrated
sched: Move struct balance_callback definition upward
sched_ext: Unpin and repin rq lock from balance_scx()
sched_ext: s/SCX_RQ_BALANCING/SCX_RQ_IN_BALANCE/ and add
SCX_RQ_IN_WAKEUP
sched_ext: Allow SCX_DSQ_LOCAL_ON for direct dispatches
sched_ext/scx_qmap: Pick idle CPU for direct dispatch on !wakeup
enqueues
sched_ext: Build fix on !CONFIG_STACKTRACE[_SUPPORT]
sched_ext: Allow p->scx.disallow only while loading
sched_ext: Simplify scx_can_stop_tick() invocation in
sched_can_stop_tick()
sched_ext: Add scx_enabled() test to @start_class promotion in
put_prev_task_balance()
sched_ext: Use update_curr_common() in update_curr_scx()
sched_ext: Simplify UP support by enabling sched_class->balance() in
UP
sched_ext: Improve comment on idle_sched_class exception in
scx_task_iter_next_locked()
sched_ext: Make task_can_run_on_remote_rq() use common
task_allowed_on_cpu()
sched_ext: Fix unsafe list iteration in process_ddsp_deferred_locals()
sched_ext: Make scx_rq_online() also test cpu_active() in addition to
SCX_RQ_ONLINE
sched_ext: Improve logging around enable/disable
sched_ext: Don't use double locking to migrate tasks across CPUs
scx_central: Fix smatch checker warning
sched_ext: Add missing cfi stub for ops.tick
sched_ext: Use task_can_run_on_remote_rq() test in
dispatch_to_local_dsq()
sched_ext: Use sched_clock_cpu() instead of rq_clock_task() in
touch_core_sched()
sched_ext: Don't call put_prev_task_scx() before picking the next task
sched_ext: Replace SCX_TASK_BAL_KEEP with SCX_RQ_BAL_KEEP
sched_ext: Unify regular and core-sched pick task paths
sched_ext: Relocate functions in kernel/sched/ext.c
sched_ext: Remove switch_class_scx()
sched_ext: Remove sched_class->switch_class()
sched_ext: TASK_DEAD tasks must be switched out of SCX on ops_disable
sched_ext: TASK_DEAD tasks must be switched into SCX on ops_enable
sched: Expose css_tg()
sched: Make cpu_shares_read_u64() use tg_weight()
sched: Introduce CONFIG_GROUP_SCHED_WEIGHT
sched_ext: Add cgroup support
sched_ext: Add a cgroup scheduler which uses flattened hierarchy
sched_ext: Temporarily work around pick_task_scx() being called
without balance_scx()
sched_ext: Add missing static to scx_has_op[]
sched_ext: Add missing static to scx_dump_data
sched_ext: Rename scx_kfunc_set_sleepable to unlocked and relocate
sched_ext: Refactor consume_remote_task()
sched_ext: Make find_dsq_for_dispatch() handle SCX_DSQ_LOCAL_ON
sched_ext: Fix processs_ddsp_deferred_locals() by unifying DTL_INVALID
handling
sched_ext: Restructure dispatch_to_local_dsq()
sched_ext: Reorder args for consume_local/remote_task()
sched_ext: Move sanity check and dsq_mod_nr() into
task_unlink_from_dsq()
sched_ext: Move consume_local_task() upward
sched_ext: Replace consume_local_task() with
move_local_task_to_local_dsq()
sched_ext: Compact struct bpf_iter_scx_dsq_kern
sched_ext: Implement scx_bpf_dispatch[_vtime]_from_dsq()
scx_qmap: Implement highpri boosting
sched_ext: Synchronize bypass state changes with rq lock
sched_ext: Don't trigger ops.quiescent/runnable() on migrations
sched_ext: Fix build when !CONFIG_STACKTRACE
sched_ext: Build fix for !CONFIG_SMP
sched_ext: Add __COMPAT helpers for features added during v6.12 devel
cycle
tools/sched_ext: Receive misc updates from SCX repo
scx_flatcg: Use a user DSQ for fallback instead of SCX_DSQ_GLOBAL
sched_ext: Allow only user DSQs for scx_bpf_consume(),
scx_bpf_dsq_nr_queued() and bpf_iter_scx_dsq_new()
sched_ext: Relocate find_user_dsq()
sched_ext: Split the global DSQ per NUMA node
sched_ext: Use shorter slice while bypassing
sched_ext: Relocate check_hotplug_seq() call in scx_ops_enable()
sched_ext: Remove SCX_OPS_PREPPING
sched_ext: Initialize in bypass mode
sched_ext: Fix SCX_TASK_INIT -> SCX_TASK_READY transitions in
scx_ops_enable()
sched_ext: Enable scx_ops_init_task() separately
sched_ext: Add scx_cgroup_enabled to gate cgroup operations and fix
scx_tg_online()
sched_ext: Decouple locks in scx_ops_disable_workfn()
sched_ext: Decouple locks in scx_ops_enable()
sched_ext: Improve error reporting during loading
sched_ext: scx_cgroup_exit() may be called without successful
scx_cgroup_init()
sched/core: Make select_task_rq() take the pointer to wake_flags
instead of value
sched/core: Add ENQUEUE_RQ_SELECTED to indicate whether
->select_task_rq() was called
sched_ext, scx_qmap: Add and use SCX_ENQ_CPU_SELECTED
Revert "sched_ext: Use shorter slice while bypassing"
sched_ext: Start schedulers with consistent p->scx.slice values
sched_ext: Move scx_buildin_idle_enabled check to
scx_bpf_select_cpu_dfl()
sched_ext: bypass mode shouldn't depend on ops.select_cpu()
sched_ext: Move scx_tasks_lock handling into scx_task_iter helpers
sched_ext: Don't hold scx_tasks_lock for too long
sched_ext: Make cast_mask() inline
sched_ext: Fix enq_last_no_enq_fails selftest
sched_ext: Add a missing newline at the end of an error message
sched_ext: Update scx_show_state.py to match scx_ops_bypass_depth's
new type
sched_ext: Handle cases where pick_task_scx() is called without
preceding balance_scx()
sched_ext: ops.cpu_acquire() should be called with SCX_KF_REST
sched_ext: Factor out move_task_between_dsqs() from
scx_dispatch_from_dsq()
sched_ext: Rename CFI stubs to names that are recognized by BPF
sched_ext: Replace set_arg_maybe_null() with __nullable CFI stub tags
sched_ext: Avoid live-locking bypass mode switching
sched_ext: Enable the ops breather and eject BPF scheduler on
softlockup
sched_ext: scx_bpf_dispatch_from_dsq_set_*() are allowed from unlocked
context
sched_ext: Rename scx_bpf_dispatch[_vtime]() to
scx_bpf_dsq_insert[_vtime]()
sched_ext: Rename scx_bpf_consume() to scx_bpf_dsq_move_to_local()
sched_ext: Rename scx_bpf_dispatch[_vtime]_from_dsq*() ->
scx_bpf_dsq_move[_vtime]*()
sched_ext: Fix invalid irq restore in scx_ops_bypass()
sched_ext: Fix dsq_local_on selftest
tools/sched_ext: Receive updates from SCX repo
sched_ext: selftests/dsp_local_on: Fix sporadic failures
sched_ext: Fix incorrect autogroup migration detection
sched_ext: Implement auto local dispatching of migration disabled
tasks
sched_ext: Fix migration disabled handling in targeted dispatches
sched_ext: Fix incorrect assumption about migration disabled tasks in
task_can_run_on_remote_rq()
sched_ext: Fix pick_task_scx() picking non-queued tasks when it's
called without balance()
sched_ext: Implement SCX_OPS_ALLOW_QUEUED_WAKEUP
sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator
sched_ext: Make scx_group_set_weight() always update tg->scx.weight
sched_ext, sched/core: Don't call scx_group_set_weight() prematurely
from sched_create_group()
Thomas Gleixner (1):
sched/ext: Remove sched_fork() hack
Thorsten Blum (1):
sched_ext: Use str_enabled_disabled() helper in
update_selcpu_topology()
Tianchen Ding (1):
sched_ext: Use btf_ids to resolve task_struct
Vincent Guittot (3):
sched/cpufreq: Rework schedutil governor performance estimation
sched/fair: Fix frequency selection for non-invariant case
sched/fair: Fix sched_can_stop_tick() for fair tasks
Vishal Chourasia (2):
sched_ext: Add __weak markers to BPF helper function decalarations
sched_ext: Fix function pointer type mismatches in BPF selftests
Wenyu Huang (1):
sched/doc: Update documentation after renames and synchronize Chinese
version
Yafang Shao (2):
bpf: Add bits iterator
selftests/bpf: Add selftest for bits iter
Yipeng Zou (1):
sched_ext: Allow dequeue_task_scx to fail
Yiwei Lin (1):
sched/fair: Remove unused 'curr' argument from pick_next_entity()
Yu Liao (2):
sched: Put task_group::idle under CONFIG_GROUP_SCHED_WEIGHT
sched: Add dummy version of sched_group_set_idle()
Yury Norov (1):
cpumask: introduce assign_cpu() macro
Zhang Qiao (3):
sched_ext: Remove redundant p->nr_cpus_allowed checker
sched/ext: Fix unmatch trailing comment of CONFIG_EXT_GROUP_SCHED
sched/ext: Use tg_cgroup() to elieminate duplicate code
Zhao Mengmeng (1):
sched_ext: Replace scx_next_task_picked() with switch_class() in
comment
Zicheng Qu (25):
bpf: Fix kabi for missed in bpf_link_info
bpf: Fix kabi for cookie in bpf_link_info
bpf: Fix kabi for value_type_btf_obj_fd in union bpf_attr
bpf: Fix kabi for struct bpf_verifier_env
selftest/bpf: Fix task_vma iter verification error
bpf: Fix kabi for btf in struct bpf_ctx_arg_aux
bpf: Fix kabi for called and verified in struct bpf_func_info_aux
sched: Fix kabi for reweight_task in struct sched_class
sched/syscalls: Fix kabi for EXPORT_SYMBOL moved from core.c to
syscalls.c
sched: Fix kabi for switching_to in struct sched_class
sched/fair: Fix kabi for check_preempt_curr and wakeup_preempt in
struct sched_class
sched: Fix kabi for dequeue_task in struct sched_class
sched_ext: Fix kabi for scx in struct task_struct
sched_ext: Fix kabi for switch_class in struct sched_class
sched: Fix kabi for exec_max in struct sched_statistics
sched_ext: Fix kabi for balance in struct sched_class
sched_ext: Fix kabi for header in kernel/sched/sched.h
sched: Fix kabi pick_task in struct sched_class
sched: Fix kabi for put_prev_task in struct sched_class
sched_ext: Fix kabi for scx_flags and scx_weight in struct task_group
sched: Fix kabi for int idle in struct task_group
sched: Add __setscheduler_class() for sched_ext
genirq: Fix kabi for kstat_irqs in struct irq_desc
bpf: Fix kabi for size in struct bpf_tramp_image
sched_ext: Enable sched_ext configs on arm64
guanjing (1):
sched_ext: fix application of sizeof to pointer
Documentation/bpf/bpf_iterators.rst | 2 +-
Documentation/bpf/kfuncs.rst | 14 +-
Documentation/scheduler/index.rst | 1 +
Documentation/scheduler/sched-design-CFS.rst | 8 +-
Documentation/scheduler/sched-ext.rst | 325 +
.../zh_CN/scheduler/sched-design-CFS.rst | 8 +-
MAINTAINERS | 14 +
arch/arm64/configs/openeuler_defconfig | 2 +
arch/arm64/net/bpf_jit_comp.c | 55 +-
arch/mips/dec/setup.c | 2 +-
arch/parisc/kernel/smp.c | 2 +-
arch/powerpc/kvm/book3s_hv_rm_xics.c | 2 +-
arch/riscv/net/bpf_jit_comp64.c | 43 +-
arch/s390/net/bpf_jit_comp.c | 56 +-
arch/x86/net/bpf_jit_comp.c | 130 +-
drivers/hid/bpf/hid_bpf_dispatch.c | 8 +-
drivers/tty/sysrq.c | 1 +
include/asm-generic/vmlinux.lds.h | 1 +
include/linux/bitops.h | 2 +
include/linux/bpf.h | 101 +-
include/linux/bpf_mem_alloc.h | 3 +
include/linux/bpf_verifier.h | 22 +-
include/linux/btf.h | 39 +
include/linux/btf_ids.h | 21 +-
include/linux/cgroup.h | 14 +-
include/linux/cleanup.h | 42 +-
include/linux/cpumask.h | 41 +-
include/linux/energy_model.h | 1 -
include/linux/file.h | 20 +
include/linux/filter.h | 2 +-
include/linux/irqdesc.h | 17 +-
include/linux/kernel_stat.h | 8 +
include/linux/sched.h | 8 +-
include/linux/sched/ext.h | 216 +
include/linux/sched/task.h | 8 +-
include/linux/trace_events.h | 6 +-
include/trace/events/sched_ext.h | 32 +
include/uapi/linux/bpf.h | 32 +-
include/uapi/linux/sched.h | 1 +
init/Kconfig | 10 +
init/init_task.c | 12 +
kernel/Kconfig.preempt | 27 +-
kernel/bpf/bpf_iter.c | 8 +-
kernel/bpf/bpf_struct_ops.c | 730 +-
kernel/bpf/bpf_struct_ops_types.h | 12 -
kernel/bpf/btf.c | 254 +-
kernel/bpf/cgroup_iter.c | 65 +-
kernel/bpf/core.c | 21 +-
kernel/bpf/cpumask.c | 10 +-
kernel/bpf/dispatcher.c | 7 +-
kernel/bpf/helpers.c | 186 +-
kernel/bpf/map_iter.c | 10 +-
kernel/bpf/memalloc.c | 14 +-
kernel/bpf/syscall.c | 22 +-
kernel/bpf/task_iter.c | 242 +-
kernel/bpf/trampoline.c | 101 +-
kernel/bpf/verifier.c | 309 +-
kernel/cgroup/cgroup.c | 18 +-
kernel/cgroup/rstat.c | 4 +-
kernel/fork.c | 17 +-
kernel/irq/Kconfig | 4 +
kernel/irq/internals.h | 2 +-
kernel/irq/irqdesc.c | 144 +-
kernel/irq/proc.c | 5 +-
kernel/sched/autogroup.c | 4 +-
kernel/sched/build_policy.c | 13 +
kernel/sched/core.c | 2492 +-----
kernel/sched/cpufreq_schedutil.c | 89 +-
kernel/sched/deadline.c | 175 +-
kernel/sched/debug.c | 3 +
kernel/sched/ext.c | 7242 +++++++++++++++++
kernel/sched/ext.h | 119 +
kernel/sched/ext_idle.c | 752 ++
kernel/sched/ext_idle.h | 39 +
kernel/sched/fair.c | 306 +-
kernel/sched/idle.c | 31 +-
kernel/sched/rt.c | 40 +-
kernel/sched/sched.h | 473 +-
kernel/sched/stop_task.c | 35 +-
kernel/sched/syscalls.c | 1713 ++++
kernel/trace/bpf_trace.c | 15 +-
kernel/trace/trace_kprobe.c | 14 +-
kernel/trace/trace_probe.c | 2 -
kernel/watchdog.c | 223 +-
lib/Kconfig.debug | 14 +
lib/dump_stack.c | 1 +
lib/rhashtable.c | 12 +-
net/bpf/bpf_dummy_struct_ops.c | 60 +-
net/bpf/test_run.c | 15 +-
net/core/filter.c | 29 +-
net/core/xdp.c | 10 +-
net/ipv4/bpf_tcp_ca.c | 93 +-
net/ipv4/fou_bpf.c | 10 +-
net/ipv4/tcp_bbr.c | 4 +-
net/ipv4/tcp_cong.c | 6 +-
net/ipv4/tcp_cubic.c | 4 +-
net/ipv4/tcp_dctcp.c | 4 +-
net/netfilter/nf_conntrack_bpf.c | 10 +-
net/netfilter/nf_nat_bpf.c | 10 +-
net/xfrm/xfrm_interface_bpf.c | 10 +-
scripts/gdb/linux/interrupts.py | 6 +-
tools/Makefile | 10 +-
.../bpf/bpftool/Documentation/bpftool-gen.rst | 58 +-
tools/bpf/bpftool/gen.c | 237 +-
tools/include/linux/bitops.h | 2 +
tools/include/uapi/linux/bpf.h | 21 +-
tools/include/uapi/linux/sched.h | 1 +
tools/lib/bpf/bpf.c | 4 +-
tools/lib/bpf/bpf.h | 4 +-
tools/lib/bpf/libbpf.c | 97 +-
tools/lib/bpf/libbpf_probes.c | 1 +
tools/perf/util/probe-finder.c | 4 +-
tools/sched_ext/.gitignore | 2 +
tools/sched_ext/Makefile | 246 +
tools/sched_ext/README.md | 270 +
.../sched_ext/include/bpf-compat/gnu/stubs.h | 11 +
tools/sched_ext/include/scx/common.bpf.h | 620 ++
tools/sched_ext/include/scx/common.h | 81 +
tools/sched_ext/include/scx/compat.bpf.h | 143 +
tools/sched_ext/include/scx/compat.h | 187 +
.../sched_ext/include/scx/enums.autogen.bpf.h | 105 +
tools/sched_ext/include/scx/enums.autogen.h | 41 +
tools/sched_ext/include/scx/enums.bpf.h | 12 +
tools/sched_ext/include/scx/enums.h | 27 +
tools/sched_ext/include/scx/user_exit_info.h | 118 +
tools/sched_ext/scx_central.bpf.c | 356 +
tools/sched_ext/scx_central.c | 136 +
tools/sched_ext/scx_flatcg.bpf.c | 954 +++
tools/sched_ext/scx_flatcg.c | 234 +
tools/sched_ext/scx_flatcg.h | 51 +
tools/sched_ext/scx_qmap.bpf.c | 827 ++
tools/sched_ext/scx_qmap.c | 155 +
tools/sched_ext/scx_show_state.py | 42 +
tools/sched_ext/scx_simple.bpf.c | 151 +
tools/sched_ext/scx_simple.c | 107 +
tools/testing/selftests/Makefile | 9 +-
.../testing/selftests/bpf/bpf_experimental.h | 27 +
.../selftests/bpf/bpf_testmod/bpf_testmod.c | 108 +-
.../selftests/bpf/bpf_testmod/bpf_testmod.h | 17 +
.../selftests/bpf/prog_tests/bpf_iter.c | 44 +-
.../selftests/bpf/prog_tests/cgroup_iter.c | 33 +
.../bpf/prog_tests/global_func_dead_code.c | 60 +
.../testing/selftests/bpf/prog_tests/iters.c | 209 +
.../selftests/bpf/prog_tests/rcu_read_lock.c | 6 +
.../selftests/bpf/prog_tests/spin_lock.c | 2 +
.../prog_tests/test_struct_ops_maybe_null.c | 46 +
.../bpf/prog_tests/test_struct_ops_module.c | 86 +
.../testing/selftests/bpf/prog_tests/timer.c | 4 +
.../selftests/bpf/prog_tests/verifier.c | 4 +
...f_iter_task_vma.c => bpf_iter_task_vmas.c} | 0
.../{bpf_iter_task.c => bpf_iter_tasks.c} | 0
.../bpf/progs/freplace_dead_global_func.c | 11 +
tools/testing/selftests/bpf/progs/iters_css.c | 72 +
.../selftests/bpf/progs/iters_css_task.c | 102 +
.../testing/selftests/bpf/progs/iters_task.c | 41 +
.../selftests/bpf/progs/iters_task_failure.c | 105 +
.../selftests/bpf/progs/iters_task_vma.c | 54 +
.../selftests/bpf/progs/iters_testmod_seq.c | 50 +
.../selftests/bpf/progs/rcu_read_lock.c | 120 +
.../bpf/progs/struct_ops_maybe_null.c | 29 +
.../bpf/progs/struct_ops_maybe_null_fail.c | 24 +
.../selftests/bpf/progs/struct_ops_module.c | 37 +
.../selftests/bpf/progs/test_global_func12.c | 4 +-
.../selftests/bpf/progs/test_spin_lock.c | 65 +
.../selftests/bpf/progs/test_spin_lock_fail.c | 44 +
tools/testing/selftests/bpf/progs/timer.c | 63 +-
.../selftests/bpf/progs/verifier_bits_iter.c | 232 +
.../bpf/progs/verifier_global_subprogs.c | 101 +
.../selftests/bpf/progs/verifier_spin_lock.c | 2 +-
.../bpf/progs/verifier_subprog_precision.c | 4 +-
tools/testing/selftests/bpf/test_loader.c | 9 +-
tools/testing/selftests/bpf/test_maps.c | 18 +-
tools/testing/selftests/bpf/test_maps.h | 5 +
tools/testing/selftests/sched_ext/.gitignore | 6 +
tools/testing/selftests/sched_ext/Makefile | 211 +
tools/testing/selftests/sched_ext/config | 9 +
.../selftests/sched_ext/create_dsq.bpf.c | 58 +
.../testing/selftests/sched_ext/create_dsq.c | 57 +
.../sched_ext/ddsp_bogus_dsq_fail.bpf.c | 42 +
.../selftests/sched_ext/ddsp_bogus_dsq_fail.c | 60 +
.../sched_ext/ddsp_vtimelocal_fail.bpf.c | 39 +
.../sched_ext/ddsp_vtimelocal_fail.c | 59 +
.../selftests/sched_ext/dsp_local_on.bpf.c | 68 +
.../selftests/sched_ext/dsp_local_on.c | 60 +
.../sched_ext/enq_last_no_enq_fails.bpf.c | 29 +
.../sched_ext/enq_last_no_enq_fails.c | 64 +
.../sched_ext/enq_select_cpu_fails.bpf.c | 43 +
.../sched_ext/enq_select_cpu_fails.c | 61 +
tools/testing/selftests/sched_ext/exit.bpf.c | 86 +
tools/testing/selftests/sched_ext/exit.c | 64 +
tools/testing/selftests/sched_ext/exit_test.h | 20 +
.../testing/selftests/sched_ext/hotplug.bpf.c | 61 +
tools/testing/selftests/sched_ext/hotplug.c | 170 +
.../selftests/sched_ext/hotplug_test.h | 15 +
.../sched_ext/init_enable_count.bpf.c | 53 +
.../selftests/sched_ext/init_enable_count.c | 157 +
.../testing/selftests/sched_ext/maximal.bpf.c | 166 +
tools/testing/selftests/sched_ext/maximal.c | 54 +
.../selftests/sched_ext/maybe_null.bpf.c | 36 +
.../testing/selftests/sched_ext/maybe_null.c | 49 +
.../sched_ext/maybe_null_fail_dsp.bpf.c | 25 +
.../sched_ext/maybe_null_fail_yld.bpf.c | 28 +
.../testing/selftests/sched_ext/minimal.bpf.c | 21 +
tools/testing/selftests/sched_ext/minimal.c | 58 +
.../selftests/sched_ext/prog_run.bpf.c | 33 +
tools/testing/selftests/sched_ext/prog_run.c | 78 +
.../testing/selftests/sched_ext/reload_loop.c | 74 +
tools/testing/selftests/sched_ext/runner.c | 212 +
tools/testing/selftests/sched_ext/scx_test.h | 131 +
.../selftests/sched_ext/select_cpu_dfl.bpf.c | 40 +
.../selftests/sched_ext/select_cpu_dfl.c | 75 +
.../sched_ext/select_cpu_dfl_nodispatch.bpf.c | 89 +
.../sched_ext/select_cpu_dfl_nodispatch.c | 75 +
.../sched_ext/select_cpu_dispatch.bpf.c | 41 +
.../selftests/sched_ext/select_cpu_dispatch.c | 73 +
.../select_cpu_dispatch_bad_dsq.bpf.c | 37 +
.../sched_ext/select_cpu_dispatch_bad_dsq.c | 59 +
.../select_cpu_dispatch_dbl_dsp.bpf.c | 38 +
.../sched_ext/select_cpu_dispatch_dbl_dsp.c | 59 +
.../sched_ext/select_cpu_vtime.bpf.c | 92 +
.../selftests/sched_ext/select_cpu_vtime.c | 62 +
.../selftests/sched_ext/test_example.c | 49 +
tools/testing/selftests/sched_ext/util.c | 71 +
tools/testing/selftests/sched_ext/util.h | 13 +
224 files changed, 24754 insertions(+), 3360 deletions(-)
create mode 100644 Documentation/scheduler/sched-ext.rst
create mode 100644 include/linux/sched/ext.h
create mode 100644 include/trace/events/sched_ext.h
delete mode 100644 kernel/bpf/bpf_struct_ops_types.h
create mode 100644 kernel/sched/ext.c
create mode 100644 kernel/sched/ext.h
create mode 100644 kernel/sched/ext_idle.c
create mode 100644 kernel/sched/ext_idle.h
create mode 100644 kernel/sched/syscalls.c
create mode 100644 tools/sched_ext/.gitignore
create mode 100644 tools/sched_ext/Makefile
create mode 100644 tools/sched_ext/README.md
create mode 100644 tools/sched_ext/include/bpf-compat/gnu/stubs.h
create mode 100644 tools/sched_ext/include/scx/common.bpf.h
create mode 100644 tools/sched_ext/include/scx/common.h
create mode 100644 tools/sched_ext/include/scx/compat.bpf.h
create mode 100644 tools/sched_ext/include/scx/compat.h
create mode 100644 tools/sched_ext/include/scx/enums.autogen.bpf.h
create mode 100644 tools/sched_ext/include/scx/enums.autogen.h
create mode 100644 tools/sched_ext/include/scx/enums.bpf.h
create mode 100644 tools/sched_ext/include/scx/enums.h
create mode 100644 tools/sched_ext/include/scx/user_exit_info.h
create mode 100644 tools/sched_ext/scx_central.bpf.c
create mode 100644 tools/sched_ext/scx_central.c
create mode 100644 tools/sched_ext/scx_flatcg.bpf.c
create mode 100644 tools/sched_ext/scx_flatcg.c
create mode 100644 tools/sched_ext/scx_flatcg.h
create mode 100644 tools/sched_ext/scx_qmap.bpf.c
create mode 100644 tools/sched_ext/scx_qmap.c
create mode 100644 tools/sched_ext/scx_show_state.py
create mode 100644 tools/sched_ext/scx_simple.bpf.c
create mode 100644 tools/sched_ext/scx_simple.c
create mode 100644 tools/testing/selftests/bpf/prog_tests/global_func_dead_code.c
create mode 100644 tools/testing/selftests/bpf/prog_tests/test_struct_ops_maybe_null.c
create mode 100644 tools/testing/selftests/bpf/prog_tests/test_struct_ops_module.c
rename tools/testing/selftests/bpf/progs/{bpf_iter_task_vma.c => bpf_iter_task_vmas.c} (100%)
rename tools/testing/selftests/bpf/progs/{bpf_iter_task.c => bpf_iter_tasks.c} (100%)
create mode 100644 tools/testing/selftests/bpf/progs/freplace_dead_global_func.c
create mode 100644 tools/testing/selftests/bpf/progs/iters_css.c
create mode 100644 tools/testing/selftests/bpf/progs/iters_css_task.c
create mode 100644 tools/testing/selftests/bpf/progs/iters_task.c
create mode 100644 tools/testing/selftests/bpf/progs/iters_task_failure.c
create mode 100644 tools/testing/selftests/bpf/progs/iters_task_vma.c
create mode 100644 tools/testing/selftests/bpf/progs/struct_ops_maybe_null.c
create mode 100644 tools/testing/selftests/bpf/progs/struct_ops_maybe_null_fail.c
create mode 100644 tools/testing/selftests/bpf/progs/struct_ops_module.c
create mode 100644 tools/testing/selftests/bpf/progs/verifier_bits_iter.c
create mode 100644 tools/testing/selftests/bpf/progs/verifier_global_subprogs.c
create mode 100644 tools/testing/selftests/sched_ext/.gitignore
create mode 100644 tools/testing/selftests/sched_ext/Makefile
create mode 100644 tools/testing/selftests/sched_ext/config
create mode 100644 tools/testing/selftests/sched_ext/create_dsq.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/create_dsq.c
create mode 100644 tools/testing/selftests/sched_ext/ddsp_bogus_dsq_fail.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/ddsp_bogus_dsq_fail.c
create mode 100644 tools/testing/selftests/sched_ext/ddsp_vtimelocal_fail.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/ddsp_vtimelocal_fail.c
create mode 100644 tools/testing/selftests/sched_ext/dsp_local_on.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/dsp_local_on.c
create mode 100644 tools/testing/selftests/sched_ext/enq_last_no_enq_fails.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/enq_last_no_enq_fails.c
create mode 100644 tools/testing/selftests/sched_ext/enq_select_cpu_fails.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/enq_select_cpu_fails.c
create mode 100644 tools/testing/selftests/sched_ext/exit.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/exit.c
create mode 100644 tools/testing/selftests/sched_ext/exit_test.h
create mode 100644 tools/testing/selftests/sched_ext/hotplug.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/hotplug.c
create mode 100644 tools/testing/selftests/sched_ext/hotplug_test.h
create mode 100644 tools/testing/selftests/sched_ext/init_enable_count.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/init_enable_count.c
create mode 100644 tools/testing/selftests/sched_ext/maximal.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/maximal.c
create mode 100644 tools/testing/selftests/sched_ext/maybe_null.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/maybe_null.c
create mode 100644 tools/testing/selftests/sched_ext/maybe_null_fail_dsp.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/maybe_null_fail_yld.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/minimal.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/minimal.c
create mode 100644 tools/testing/selftests/sched_ext/prog_run.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/prog_run.c
create mode 100644 tools/testing/selftests/sched_ext/reload_loop.c
create mode 100644 tools/testing/selftests/sched_ext/runner.c
create mode 100644 tools/testing/selftests/sched_ext/scx_test.h
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dfl.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dfl.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dfl_nodispatch.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dfl_nodispatch.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dispatch.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dispatch.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dispatch_bad_dsq.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dispatch_bad_dsq.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dispatch_dbl_dsp.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_dispatch_dbl_dsp.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_vtime.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/select_cpu_vtime.c
create mode 100644 tools/testing/selftests/sched_ext/test_example.c
create mode 100644 tools/testing/selftests/sched_ext/util.c
create mode 100644 tools/testing/selftests/sched_ext/util.h
--
2.34.1
1
399
[PATCH openEuler-1.0-LTS v2 0/2] xfs: fix stale imap reuse during page writeback
by Long Li 16 Dec '25
by Long Li 16 Dec '25
16 Dec '25
During page write-back operations, a copy of the imap is stored in
wpc->imap. Even if the file's imap mapping changes during this process,
the subsequent operations continue to reuse wpc->imap, causing data to
be written to incorrect blocks that are not mapped to that file.
Brian Foster (2):
xfs: update fork seq counter on data fork changes
xfs: remove superfluous writeback mapping eof trimming
fs/xfs/libxfs/xfs_bmap.c | 11 -----------
fs/xfs/libxfs/xfs_bmap.h | 1 -
fs/xfs/libxfs/xfs_iext_tree.c | 13 ++++++-------
fs/xfs/libxfs/xfs_inode_fork.h | 2 +-
fs/xfs/xfs_aops.c | 15 ---------------
5 files changed, 7 insertions(+), 35 deletions(-)
--
2.39.2
2
3
16 Dec '25
hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IDCSJV
-----------------------------------------
When I test xfs with fsstress, got the following assert message:
XFS (sda): ino 1a0b0a data fork has delalloc extent at [0x186:0x1]
XFS: Assertion failed: 0, file: fs/xfs/xfs_icache.c, line: 1819
------------[ cut here ]------------
kernel BUG at fs/xfs/xfs_message.c:102!
invalid opcode: 0000 [#1] PREEMPT SMP
CPU: 3 PID: 940 Comm: kworker/3:1 Not tainted 6.6.0-g3697dae9bfac #192
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.1-2.fc37 04/01/2014
Workqueue: xfs-inodegc/sda xfs_inodegc_worker
RIP: 0010:assfail+0x54/0x60
RSP: 0018:ffffc90003113e08 EFLAGS: 00010202
RAX: 0000000000000000 RBX: ffff8880651dd800 RCX: 000000007fffffff
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff82a12e0c
RBP: ffffffffffffff20 R08: 00000000000025c2 R09: 0000000000000000
R10: 000000000000000a R11: 000000000000000a R12: 0000000000000000
R13: ffffffffffffff20 R14: ffff888077948000 R15: 0000000004208060
FS: 0000000000000000(0000) GS:ffff8880bcb80000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000561be0e1cf30 CR3: 0000000075fa4000 CR4: 00000000000006e0
Call Trace:
<TASK>
xfs_inodegc_set_reclaimable+0x1f1/0x220
xfs_inodegc_worker+0x10b/0x2e0
process_scheduled_works+0x1a5/0x5e0
worker_thread+0x1d1/0x4f0
? apply_workqueue_attrs+0x70/0x70
kthread+0x149/0x1c0
? kthread_exit+0x50/0x50
ret_from_fork+0x52/0x70
? kthread_exit+0x50/0x50
ret_from_fork_asm+0x11/0x20
</TASK>
Fix the incorrect dirty range tracking in iomap_folio_mkwrite_iter()
which could lead to blocks being missed during writeback. Previously,
iomap_set_range_dirty() was called with a wrong offset (0), which may
cause some modified blocks not being marked as dirty and thus skip
writeback.
Calculate the correct offset within the folio from the iterator position
to ensure all modified blocks are properly marked dirty and written back.
Fixes: 0b4d2d8fba90 ("iomap: correct the dirty length in page mkwrite")
Signed-off-by: Long Li <leo.lilong(a)huawei.com>
---
fs/iomap/buffered-io.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 7a417bd8a9f3..33fbb3f8d45f 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -1562,10 +1562,12 @@ static loff_t iomap_folio_mkwrite_iter(struct iomap_iter *iter,
return ret;
block_commit_write(&folio->page, 0, length);
} else {
+ size_t poff = offset_in_folio(folio, iter->pos);
+
WARN_ON_ONCE(!folio_test_uptodate(folio));
ifs_alloc(iter->inode, folio, 0);
- iomap_set_range_dirty(folio, 0, length);
+ iomap_set_range_dirty(folio, poff, length);
}
return length;
--
2.39.2
2
1
From: Jacob Keller <jacob.e.keller(a)intel.com>
mainline inclusion
from mainline-v6.17-rc5
commit 9fcdb1c3c4ba134434694c001dbff343f1ffa319
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/ID0R34
CVE: CVE-2025-39901
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
--------------------------------
The 'command' and 'netdev_ops' debugfs files are a legacy debugging
interface supported by the i40e driver since its early days by commit
02e9c290814c ("i40e: debugfs interface").
Both of these debugfs files provide a read handler which is mostly useless,
and which is implemented with questionable logic. They both use a static
256 byte buffer which is initialized to the empty string. In the case of
the 'command' file this buffer is literally never used and simply wastes
space. In the case of the 'netdev_ops' file, the last command written is
saved here.
On read, the files contents are presented as the name of the device
followed by a colon and then the contents of their respective static
buffer. For 'command' this will always be "<device>: ". For 'netdev_ops',
this will be "<device>: <last command written>". But note the buffer is
shared between all devices operated by this module. At best, it is mostly
meaningless information, and at worse it could be accessed simultaneously
as there doesn't appear to be any locking mechanism.
We have also recently received multiple reports for both read functions
about their use of snprintf and potential overflow that could result in
reading arbitrary kernel memory. For the 'command' file, this is definitely
impossible, since the static buffer is always zero and never written to.
For the 'netdev_ops' file, it does appear to be possible, if the user
carefully crafts the command input, it will be copied into the buffer,
which could be large enough to cause snprintf to truncate, which then
causes the copy_to_user to read beyond the length of the buffer allocated
by kzalloc.
A minimal fix would be to replace snprintf() with scnprintf() which would
cap the return to the number of bytes written, preventing an overflow. A
more involved fix would be to drop the mostly useless static buffers,
saving 512 bytes and modifying the read functions to stop needing those as
input.
Instead, lets just completely drop the read access to these files. These
are debug interfaces exposed as part of debugfs, and I don't believe that
dropping read access will break any script, as the provided output is
pretty useless. You can find the netdev name through other more standard
interfaces, and the 'netdev_ops' interface can easily result in garbage if
you issue simultaneous writes to multiple devices at once.
In order to properly remove the i40e_dbg_netdev_ops_buf, we need to
refactor its write function to avoid using the static buffer. Instead, use
the same logic as the i40e_dbg_command_write, with an allocated buffer.
Update the code to use this instead of the static buffer, and ensure we
free the buffer on exit. This fixes simultaneous writes to 'netdev_ops' on
multiple devices, and allows us to remove the now unused static buffer
along with removing the read access.
Fixes: 02e9c290814c ("i40e: debugfs interface")
Reported-by: Kunwu Chan <chentao(a)kylinos.cn>
Closes: https://lore.kernel.org/intel-wired-lan/20231208031950.47410-1-chentao@kyli…
Reported-by: Wang Haoran <haoranwangsec(a)gmail.com>
Closes: https://lore.kernel.org/all/CANZ3JQRRiOdtfQJoP9QM=6LS1Jto8PGBGw6y7-TL=BcnzH…
Reported-by: Amir Mohammad Jahangirzad <a.jahangirzad(a)gmail.com>
Closes: https://lore.kernel.org/all/20250722115017.206969-1-a.jahangirzad@gmail.com/
Signed-off-by: Jacob Keller <jacob.e.keller(a)intel.com>
Reviewed-by: Dawid Osuchowski <dawid.osuchowski(a)linux.intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov(a)intel.com>
Reviewed-by: Simon Horman <horms(a)kernel.org>
Reviewed-by: Kunwu Chan <kunwu.chan(a)linux.dev>
Tested-by: Rinitha S <sx.rinitha(a)intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen(a)intel.com>
Conflicts:
drivers/net/ethernet/intel/i40e/i40e_debugfs.c
[conflicts due to not merge 43f4466ca91d ("i40e: Add helper to access main VSI")]
Signed-off-by: Wang Liang <wangliang74(a)huawei.com>
---
.../net/ethernet/intel/i40e/i40e_debugfs.c | 121 +++---------------
1 file changed, 19 insertions(+), 102 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
index a2fca58a91c3..35ce578dd6f3 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
@@ -58,47 +58,6 @@ static struct i40e_veb *i40e_dbg_find_veb(struct i40e_pf *pf, int seid)
* setup, adding or removing filters, or other things. Many of
* these will be useful for some forms of unit testing.
**************************************************************/
-static char i40e_dbg_command_buf[256] = "";
-
-/**
- * i40e_dbg_command_read - read for command datum
- * @filp: the opened file
- * @buffer: where to write the data for the user to read
- * @count: the size of the user's buffer
- * @ppos: file position offset
- **/
-static ssize_t i40e_dbg_command_read(struct file *filp, char __user *buffer,
- size_t count, loff_t *ppos)
-{
- struct i40e_pf *pf = filp->private_data;
- int bytes_not_copied;
- int buf_size = 256;
- char *buf;
- int len;
-
- /* don't allow partial reads */
- if (*ppos != 0)
- return 0;
- if (count < buf_size)
- return -ENOSPC;
-
- buf = kzalloc(buf_size, GFP_KERNEL);
- if (!buf)
- return -ENOSPC;
-
- len = snprintf(buf, buf_size, "%s: %s\n",
- pf->vsi[pf->lan_vsi]->netdev->name,
- i40e_dbg_command_buf);
-
- bytes_not_copied = copy_to_user(buffer, buf, len);
- kfree(buf);
-
- if (bytes_not_copied)
- return -EFAULT;
-
- *ppos = len;
- return len;
-}
static char *i40e_filter_state_string[] = {
"INVALID",
@@ -1637,7 +1596,6 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
static const struct file_operations i40e_dbg_command_fops = {
.owner = THIS_MODULE,
.open = simple_open,
- .read = i40e_dbg_command_read,
.write = i40e_dbg_command_write,
};
@@ -1646,47 +1604,6 @@ static const struct file_operations i40e_dbg_command_fops = {
* The netdev_ops entry in debugfs is for giving the driver commands
* to be executed from the netdev operations.
**************************************************************/
-static char i40e_dbg_netdev_ops_buf[256] = "";
-
-/**
- * i40e_dbg_netdev_ops_read - read for netdev_ops datum
- * @filp: the opened file
- * @buffer: where to write the data for the user to read
- * @count: the size of the user's buffer
- * @ppos: file position offset
- **/
-static ssize_t i40e_dbg_netdev_ops_read(struct file *filp, char __user *buffer,
- size_t count, loff_t *ppos)
-{
- struct i40e_pf *pf = filp->private_data;
- int bytes_not_copied;
- int buf_size = 256;
- char *buf;
- int len;
-
- /* don't allow partal reads */
- if (*ppos != 0)
- return 0;
- if (count < buf_size)
- return -ENOSPC;
-
- buf = kzalloc(buf_size, GFP_KERNEL);
- if (!buf)
- return -ENOSPC;
-
- len = snprintf(buf, buf_size, "%s: %s\n",
- pf->vsi[pf->lan_vsi]->netdev->name,
- i40e_dbg_netdev_ops_buf);
-
- bytes_not_copied = copy_to_user(buffer, buf, len);
- kfree(buf);
-
- if (bytes_not_copied)
- return -EFAULT;
-
- *ppos = len;
- return len;
-}
/**
* i40e_dbg_netdev_ops_write - write into netdev_ops datum
@@ -1700,35 +1617,36 @@ static ssize_t i40e_dbg_netdev_ops_write(struct file *filp,
size_t count, loff_t *ppos)
{
struct i40e_pf *pf = filp->private_data;
+ char *cmd_buf, *buf_tmp;
int bytes_not_copied;
struct i40e_vsi *vsi;
- char *buf_tmp;
int vsi_seid;
int i, cnt;
/* don't allow partial writes */
if (*ppos != 0)
return 0;
- if (count >= sizeof(i40e_dbg_netdev_ops_buf))
- return -ENOSPC;
- memset(i40e_dbg_netdev_ops_buf, 0, sizeof(i40e_dbg_netdev_ops_buf));
- bytes_not_copied = copy_from_user(i40e_dbg_netdev_ops_buf,
- buffer, count);
- if (bytes_not_copied)
+ cmd_buf = kzalloc(count + 1, GFP_KERNEL);
+ if (!cmd_buf)
+ return count;
+ bytes_not_copied = copy_from_user(cmd_buf, buffer, count);
+ if (bytes_not_copied) {
+ kfree(cmd_buf);
return -EFAULT;
- i40e_dbg_netdev_ops_buf[count] = '\0';
+ }
+ cmd_buf[count] = '\0';
- buf_tmp = strchr(i40e_dbg_netdev_ops_buf, '\n');
+ buf_tmp = strchr(cmd_buf, '\n');
if (buf_tmp) {
*buf_tmp = '\0';
- count = buf_tmp - i40e_dbg_netdev_ops_buf + 1;
+ count = buf_tmp - cmd_buf + 1;
}
- if (strncmp(i40e_dbg_netdev_ops_buf, "change_mtu", 10) == 0) {
+ if (strncmp(cmd_buf, "change_mtu", 10) == 0) {
int mtu;
- cnt = sscanf(&i40e_dbg_netdev_ops_buf[11], "%i %i",
+ cnt = sscanf(&cmd_buf[11], "%i %i",
&vsi_seid, &mtu);
if (cnt != 2) {
dev_info(&pf->pdev->dev, "change_mtu <vsi_seid> <mtu>\n");
@@ -1750,8 +1668,8 @@ static ssize_t i40e_dbg_netdev_ops_write(struct file *filp,
dev_info(&pf->pdev->dev, "Could not acquire RTNL - please try again\n");
}
- } else if (strncmp(i40e_dbg_netdev_ops_buf, "set_rx_mode", 11) == 0) {
- cnt = sscanf(&i40e_dbg_netdev_ops_buf[11], "%i", &vsi_seid);
+ } else if (strncmp(cmd_buf, "set_rx_mode", 11) == 0) {
+ cnt = sscanf(&cmd_buf[11], "%i", &vsi_seid);
if (cnt != 1) {
dev_info(&pf->pdev->dev, "set_rx_mode <vsi_seid>\n");
goto netdev_ops_write_done;
@@ -1771,8 +1689,8 @@ static ssize_t i40e_dbg_netdev_ops_write(struct file *filp,
dev_info(&pf->pdev->dev, "Could not acquire RTNL - please try again\n");
}
- } else if (strncmp(i40e_dbg_netdev_ops_buf, "napi", 4) == 0) {
- cnt = sscanf(&i40e_dbg_netdev_ops_buf[4], "%i", &vsi_seid);
+ } else if (strncmp(cmd_buf, "napi", 4) == 0) {
+ cnt = sscanf(&cmd_buf[4], "%i", &vsi_seid);
if (cnt != 1) {
dev_info(&pf->pdev->dev, "napi <vsi_seid>\n");
goto netdev_ops_write_done;
@@ -1790,21 +1708,20 @@ static ssize_t i40e_dbg_netdev_ops_write(struct file *filp,
dev_info(&pf->pdev->dev, "napi called\n");
}
} else {
- dev_info(&pf->pdev->dev, "unknown command '%s'\n",
- i40e_dbg_netdev_ops_buf);
+ dev_info(&pf->pdev->dev, "unknown command '%s'\n", cmd_buf);
dev_info(&pf->pdev->dev, "available commands\n");
dev_info(&pf->pdev->dev, " change_mtu <vsi_seid> <mtu>\n");
dev_info(&pf->pdev->dev, " set_rx_mode <vsi_seid>\n");
dev_info(&pf->pdev->dev, " napi <vsi_seid>\n");
}
netdev_ops_write_done:
+ kfree(cmd_buf);
return count;
}
static const struct file_operations i40e_dbg_netdev_ops_fops = {
.owner = THIS_MODULE,
.open = simple_open,
- .read = i40e_dbg_netdev_ops_read,
.write = i40e_dbg_netdev_ops_write,
};
--
2.34.1
2
1