Centos-kernel-stream-9/kernel
Maxim Levitsky 32f4a5c83c locking/mutex: implement mutex_lock_killable_nest_lock
JIRA: https://issues.redhat.com/browse/RHEL-95318

commit fb49f07ba1d9d8c9bd8854878ae6b5b21ff9ac45
Author: Maxim Levitsky <mlevitsk@redhat.com>
Date:   Mon May 12 14:04:03 2025 -0400

    locking/mutex: implement mutex_lock_killable_nest_lock

    KVM's SEV intra-host migration code needs to lock all vCPUs
    of the source and the target VM, before it proceeds with the migration.

    The number of vCPUs that belong to each VM is not bounded by anything
    except a self-imposed KVM limit of CONFIG_KVM_MAX_NR_VCPUS vCPUs which is
    significantly larger than the depth of lockdep's lock stack.

    Luckily, the locks in both of the cases mentioned above, are held under
    the 'kvm->lock' of each VM, which means that we can use the little
    known lockdep feature called a "nest_lock" to support this use case in
    a cleaner way, compared to the way it's currently done.

    Implement and expose 'mutex_lock_killable_nest_lock' for this
    purpose.

    Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
    Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Message-ID: <20250512180407.659015-3-mlevitsk@redhat.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-07-16 12:16:05 +02:00
..
bpf bpf: skip non exist keys in generic_map_lookup_batch 2025-07-01 09:49:40 +02:00
cgroup KVM: TDX: Register TDX host key IDs to cgroup misc controller 2025-07-15 19:12:38 +02:00
configs mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED 2024-09-05 20:35:59 -04:00
debug
dma dma-mapping: fix swapped dir/flags arguments to trace_dma_alloc_sgt_err 2025-04-03 09:22:41 -07:00
entry
events perf: Avoid the read if the count is already updated 2025-06-23 14:54:27 +02:00
futex fault-inject: improve build for CONFIG_FAULT_INJECTION=n 2024-12-17 22:59:23 +01:00
gcov
irq genirq/msi: Silence 'set affinity failed' warning 2025-02-18 09:48:09 -07:00
kcsan
livepatch livepatch: Add stack_order sysfs attribute 2025-04-03 13:23:15 -04:00
locking locking/mutex: implement mutex_lock_killable_nest_lock 2025-07-16 12:16:05 +02:00
module module, bpf: Store BTF base pointer in struct module 2024-11-26 15:55:10 +01:00
power arm64: Use SYSTEM_OFF2 PSCI call to power off for hibernate 2025-04-10 08:35:33 -04:00
printk Flush console log from kernel_power_off() 2025-05-02 11:11:41 -04:00
rcu rcu/kvfree: Fix data-race in __mod_timer / kvfree_call_rcu 2025-01-08 17:48:13 -05:00
sched Merge: Sched: late fixes for 9.7 2025-07-07 16:55:57 -03:00
time Merge: Scheduler updates for 9.7 2025-03-12 14:53:01 -03:00
trace bpf: Use preempt_count() directly in bpf_send_signal_common() 2025-07-01 09:49:40 +02:00
.gitignore
Kconfig.freezer
Kconfig.hz
Kconfig.kexec crash: clean up kdump related config items 2024-12-23 09:35:35 +08:00
Kconfig.locks
Kconfig.preempt
Makefile Merge: RHEL9.6 drm backport dependencies 2025-01-06 08:26:14 +00:00
acct.c acct: perform last write from workqueue 2025-04-16 23:24:17 -04:00
async.c
audit.c audit: Reorganize kerneldoc parameter names 2025-05-21 13:27:22 -03:00
audit.h
audit_fsnotify.c
audit_tree.c audit: Annotate struct audit_chunk with __counted_by 2024-07-04 14:52:57 -03:00
audit_watch.c
auditfilter.c audit: fix suffixed '/' filename matching 2025-05-21 13:27:45 -03:00
auditsc.c audit: Use str_yes_no() helper function 2025-05-21 13:27:26 -03:00
backtracetest.c
bounds.c
capability.c fs: port i_{g,u}id_into_vfs{g,u}id() to mnt_idmap 2024-10-16 11:02:01 +08:00
cfi.c
compat.c
configs.c
context_tracking.c
cpu.c lazy tlb: fix hotplug exit race with MMU_LAZY_TLB_SHOOTDOWN 2025-03-13 17:06:59 -03:00
cpu_pm.c
crash_core.c Document/kexec: generalize crash hotplug description 2024-12-23 09:35:36 +08:00
crash_reserve.c crash: add prefix for crash dumping messages 2024-12-23 09:35:36 +08:00
cred.c
delayacct.c delayacct: track delays from IRQ/SOFTIRQ 2024-07-15 11:12:08 -04:00
dma.c
elfcorehdr.c crash: remove dependency of FA_DUMP on CRASH_DUMP 2024-12-23 09:35:35 +08:00
exec_domain.c
exit.c lazy tlb: introduce lazy tlb mm refcount helper functions 2024-11-04 09:14:17 -05:00
exit.h exit: add internal include file with helpers 2024-07-02 09:45:34 -04:00
extable.c
fail_function.c
fork.c cgroup/cpuset: Remove cpuset_slab_spread_rotor 2025-04-28 10:54:33 +01:00
freezer.c
gen_kheaders.sh
groups.c
hung_task.c
iomem.c mm: move is_ioremap_addr() into new header file 2024-10-01 11:17:52 -04:00
irq_work.c
jump_label.c jump_label: Fix static_key_slow_dec() yet again 2025-04-20 20:01:13 -04:00
kallsyms.c
kallsyms_internal.h
kallsyms_selftest.c
kallsyms_selftest.h
kcmp.c
kcov.c
kexec.c crash: add a new kexec flag for hotplug support 2024-12-23 09:35:36 +08:00
kexec_core.c crash: split crash dumping code out from kexec_core.c 2024-12-23 09:35:35 +08:00
kexec_elf.c
kexec_file.c kexec_file: fix elfcorehdr digest exclusion when CONFIG_CRASH_HOTPLUG=y 2024-12-23 09:35:36 +08:00
kexec_internal.h crash: remove dependency of FA_DUMP on CRASH_DUMP 2024-12-23 09:35:35 +08:00
kheaders.c
kprobes.c fprobe: Pass return address to the handlers 2024-10-25 09:07:32 +02:00
ksyms_common.c
ksysfs.c crash: split crash dumping code out from kexec_core.c 2024-12-23 09:35:35 +08:00
kthread.c kthread: unpark only parked kthread 2024-11-25 12:31:48 +00:00
latencytop.c
module_signature.c
notifier.c
nsproxy.c
padata.c padata: avoid UAF for reorder_work 2025-02-28 11:00:53 -05:00
panic.c taint: Add TAINT_FWCTL 2025-06-17 10:30:11 +09:00
params.c
pid.c
pid_namespace.c Revert "rcu-tasks: Fix synchronize_rcu_tasks() VS zap_pid_ns_processes()" 2024-08-26 10:57:50 -04:00
pid_sysctl.h
profile.c
ptrace.c mm: make __access_remote_vm() static 2024-12-09 12:22:45 -05:00
range.c
reboot.c Flush console log from kernel_power_off() 2025-05-02 11:11:41 -04:00
regset.c
relay.c
resource.c resource: fix region_intersects() vs add_memory_driver_managed() 2024-10-29 10:10:23 -06:00
resource_kunit.c
rh_messages.c
rh_messages.h message deprecated state in ahci_xgene, ahci_seattle and hisi_sas_main 2025-06-10 15:14:16 +02:00
rh_shadowman.c
rseq.c
scftorture.c
scs.c
seccomp.c
signal.c signal: restore the override_rlimit logic 2024-12-20 15:33:02 +00:00
smp.c smp,csd: Throw an error if a CSD lock is stuck for too long 2025-05-08 14:55:47 -04:00
smpboot.c kthread: add kthread_stop_put 2024-09-20 12:26:34 -07:00
smpboot.h
softirq.c softirq: Allow raising SCHED_SOFTIRQ from SMP-call-function on RT kernel 2024-12-11 19:37:36 +00:00
stackleak.c
stacktrace.c
static_call.c
static_call_inline.c x86/static-call: provide a way to do very early static-call updates 2025-02-18 17:58:05 +01:00
stop_machine.c
sys.c Merge: CVE-2024-50271: ucounts: Split rlimit and ucount values and max values 2025-02-03 10:00:41 -05:00
sys_ni.c x86/shstk: Introduce map_shadow_stack syscall 2024-10-01 11:17:15 -04:00
sysctl-test.c
sysctl.c mm: hugetlb: move hugeltb sysctls to its own file 2024-07-16 09:29:59 -04:00
task_work.c task_work: Add TWA_NMI_CURRENT as an additional notify mode. 2024-10-14 13:02:40 +02:00
taskstats.c
test_kprobes.c
torture.c
tracepoint.c
tsacct.c
ucount.c signal: restore the override_rlimit logic 2024-12-20 15:33:02 +00:00
uid16.c
uid16.h
umh.c
up.c
user-return-notifier.c
user.c
user_namespace.c Merge: CVE-2024-50271: ucounts: Split rlimit and ucount values and max values 2025-02-03 10:00:41 -05:00
usermode_driver.c
utsname.c
utsname_sysctl.c
vmcore_info.c crash: split vmcoreinfo exporting code out from crash_core.c 2024-12-23 09:35:35 +08:00
watch_queue.c watch_queue: fix pipe accounting mismatch 2025-04-02 10:32:41 +02:00
watchdog.c
watchdog_hld.c
workqueue.c workqueue: Put the pwq after detaching the rescuer from the pool 2025-02-27 22:46:55 +00:00
workqueue_internal.h