linux/include/asm-generic
Linus Torvalds c6439bfaab Deferred unwind changes for 6.17
This is the core infrastructure for the deferred unwinder that is required
 for sframes[1]. Several other patch series is based on this work although
 those patch series are not dependent on each other. In order to simplify the
 development, having this core series upstream will allow the other series to
 be worked on in parallel. The other series are:
 
 - The two patches to implement x86:
   https://lore.kernel.org/linux-trace-kernel/20250717004958.260781923@kernel.org/
   https://lore.kernel.org/linux-trace-kernel/20250717004958.432327787@kernel.org/
 
 - The s390 work:
   https://lore.kernel.org/linux-trace-kernel/20250710163522.3195293-1-jremus@linux.ibm.com/
 
 - The perf work:
   https://lore.kernel.org/linux-trace-kernel/20250718164119.089692174@kernel.org/
 
 - The ftrace work:
   https://lore.kernel.org/linux-trace-kernel/20250424192612.505622711@goodmis.org/
 
 - The sframe work:
   https://lore.kernel.org/linux-trace-kernel/20250717012848.927473176@kernel.org/
 
 And more is on the way.
 
 The core infrastructure adds the following in kernel APIs:
 
 - int unwind_user_faultable(struct unwind_stacktrace *trace);
 
     Performs a user space stack trace that may fault user pages in.
 
 - int unwind_deferred_init(struct unwind_work *work, unwind_callback_t func);
 
     Allows a tracer to register with the unwind deferred infrastructure.
 
 - int unwind_deferred_request(struct unwind_work *work, u64 *cookie);
 
     Used when a tracer request a deferred trace. Can be called from interrupt
     or NMI context.
 
 - void unwind_deferred_cancel(struct unwind_work *work);
 
     Called by a tracer to unregister from the deferred unwind infrastructure.
 
 - void unwind_deferred_task_exit(struct task_struct *task);
 
     Called by task exit code to flush any pending unwind requests.
 
 - void unwind_task_init(struct task_struct *task);
 
     Called by do_fork() to initialize the task struct for the deferred
     unwinder.
 
 - void unwind_task_free(struct task_struct *task);
 
     Called by do_exit() to free up any resources used by the deferred
     unwinder.
 
 None of the above is actually compiled unless an architecture enables it,
 which none currently do.
 
 [1] https://sourceware.org/binutils/wiki/sframe
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYKADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCaIt9IhQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qqqzAQCMT/6qmSq7O746JF0MuGC6fTZnSbAc
 XGz4JigEqLTRewEA2kaJmD7PBsSRzFdiK2gvyKn95l+PZyWtE9MjTsqeSAc=
 =Lsbm
 -----END PGP SIGNATURE-----

Merge tag 'trace-deferred-unwind-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull initial deferred unwind infrastructure from Steven Rostedt:
 "This is the core infrastructure for the deferred unwinder that is
  required for sframes[1]. Several other patch series are based on this
  work although those patch series are not dependent on each other. In
  order to simplify the development, having this core series upstream
  will allow the other series to be worked on in parallel. The other
  series are:

    - The two patches to implement x86 support [2] [3]

    - The s390 work [4]

    - The perf work [5]

    - The ftrace work [6]

    - The sframe work [7]

  And more is on the way.

  The core infrastructure adds the following in kernel APIs:

    - int unwind_user_faultable(struct unwind_stacktrace *trace);

        Performs a user space stack trace that may fault user pages in.

    - int unwind_deferred_init(struct unwind_work *work, unwind_callback_t func);

        Allows a tracer to register with the unwind deferred
        infrastructure.

    - int unwind_deferred_request(struct unwind_work *work, u64 *cookie);

        Used when a tracer request a deferred trace. Can be called from
        interrupt or NMI context.

    - void unwind_deferred_cancel(struct unwind_work *work);

        Called by a tracer to unregister from the deferred unwind
        infrastructure.

    - void unwind_deferred_task_exit(struct task_struct *task);

        Called by task exit code to flush any pending unwind requests.

    - void unwind_task_init(struct task_struct *task);

        Called by do_fork() to initialize the task struct for the
        deferred unwinder.

    - void unwind_task_free(struct task_struct *task);

        Called by do_exit() to free up any resources used by the
        deferred unwinder.

    None of the above is actually compiled unless an architecture enables it,
    which none currently do"

Link: https://sourceware.org/binutils/wiki/sframe [1]
Link: https://lore.kernel.org/linux-trace-kernel/20250717004958.260781923@kernel.org/ [2]
Link: https://lore.kernel.org/linux-trace-kernel/20250717004958.432327787@kernel.org/ [3]
Link: https://lore.kernel.org/linux-trace-kernel/20250710163522.3195293-1-jremus@linux.ibm.com/ [4]
Link: https://lore.kernel.org/linux-trace-kernel/20250718164119.089692174@kernel.org/ [5]
Link: https://lore.kernel.org/linux-trace-kernel/20250424192612.505622711@goodmis.org/ [6]
Link: https://lore.kernel.org/linux-trace-kernel/20250717012848.927473176@kernel.org/ [7]

* tag 'trace-deferred-unwind-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  unwind: Finish up unwind when a task exits
  unwind deferred: Use SRCU unwind_deferred_task_work()
  unwind: Add USED bit to only have one conditional on way back to user space
  unwind deferred: Add unwind_completed mask to stop spurious callbacks
  unwind deferred: Use bitmask to determine which callbacks to call
  unwind_user/deferred: Make unwind deferral requests NMI-safe
  unwind_user/deferred: Add deferred unwinding interface
  unwind_user/deferred: Add unwind cache
  unwind_user/deferred: Add unwind_user_faultable()
  unwind_user: Add user space unwinding API with frame pointer support
2025-08-01 09:46:24 -07:00
..
bitops bitops: Change function return types from long to int 2024-05-03 17:04:50 +02:00
vdso vdso/vsyscall: Split up __arch_update_vsyscall() into __arch_update_vdso_clock() 2025-07-09 11:52:34 +02:00
access_ok.h
agp.h char/agp: introduce asm-generic/agp.h 2023-02-13 22:13:29 +01:00
archrandom.h
asm-offsets.h
asm-prototypes.h
atomic.h locking/atomic: make atomic*_{cmp,}xchg optional 2023-06-05 09:57:14 +02:00
atomic64.h
audit_change_attr.h fs/xattr: add *at family syscalls 2024-11-06 12:59:44 -05:00
audit_dir_write.h
audit_read.h
audit_signal.h
audit_write.h
barrier.h sched: Add missing memory barrier in switch_mm_cid 2024-04-16 13:59:45 +02:00
bitops.h
bitsperlong.h
bug.h bug: Improve comment 2024-05-07 14:20:48 +02:00
cache.h
cacheflush.h mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
cfi.h cfi: Flip headers 2023-12-15 16:25:55 -08:00
checksum.h asm-generic: Improve csum_fold 2024-01-17 17:52:29 -08:00
cmpxchg-local.h asm-generic: Fix 32 bit __generic_cmpxchg_local 2024-01-05 23:19:14 +01:00
cmpxchg.h asm-generic: avoid __generic_cmpxchg_local warnings 2023-04-04 17:58:11 +02:00
codetag.lds.h codetag: avoid unused alloc_tags sections/symbols 2025-07-09 22:42:14 -07:00
compat.h asm-generic: compat: fix compat_arg_u64() and compat_arg_u64_dual() 2022-11-01 10:20:11 +11:00
current.h asm-generic: current: Don't include thread-info.h if building asm 2023-08-26 22:38:49 +02:00
delay.h delay: Fix ndelay() spuriously treated as udelay() 2024-11-29 11:40:22 +01:00
device.h
div64.h __arch_xprod64(): make __always_inline when optimizing for performance 2024-10-28 21:44:28 +00:00
dma-mapping.h dma-mapping: no need to pass a bus_type into get_arch_dma_ops() 2023-02-15 12:35:20 +01:00
dma.h
early_ioremap.h mm/early_ioremap: add null pointer checks to prevent NULL-pointer dereference 2025-01-13 22:40:59 -08:00
emergency-restart.h
error-injection.h docs: fault-injection: add requirements of error injectable functions 2023-02-02 22:50:00 -08:00
exec.h
extable.h
fixmap.h fixmap: Remove unused set_fixmap_offset_io() 2024-07-11 17:41:23 +02:00
flat.h
fprobe.h fprobe: Add fprobe_header encoding feature 2024-12-26 10:50:05 -05:00
ftrace.h
futex.h
getorder.h
hardirq.h
hugetlb.h mm: drop hugetlb_free_pgd_range() 2025-07-24 19:12:32 -07:00
hw_irq.h asm-generic: add legacy I/O header files 2009-06-11 21:02:42 +02:00
int-ll64.h
io.h - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
ioctl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iomap.h asm-generic/io.h: rework split ioread64/iowrite64 helpers 2025-03-01 21:00:22 +01:00
irq.h
irq_regs.h
irq_work.h
irqflags.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kbuild unwind_user: Add user space unwinding API with frame pointer support 2025-07-29 14:46:07 -04:00
kdebug.h
kmap_size.h mm/highmem: Provide and use CONFIG_DEBUG_KMAP_LOCAL 2020-11-24 14:42:08 +01:00
kprobes.h
kvm_para.h
kvm_types.h
linkage.h
local.h locking/generic: Wire up local{,64}_try_cmpxchg() 2023-04-29 09:09:09 +02:00
local64.h locking/generic: Wire up local{,64}_try_cmpxchg() 2023-04-29 09:09:09 +02:00
logic_io.h
mcs_spinlock.h locking: Move MCS struct definition to public header 2025-03-18 10:28:21 -07:00
memory_model.h mm: implement for_each_valid_pfn() for CONFIG_FLATMEM 2025-05-12 23:50:43 -07:00
mm_hooks.h mm: remove arch_unmap() 2024-09-01 20:26:13 -07:00
mmiowb.h
mmiowb_types.h
mmu.h
mmu_context.h
mmzone.h arch, mm: move definition of node_data to generic code 2024-09-03 21:15:28 -07:00
module.h asm-generic: Always define Elf_Rel and Elf_Rela 2025-03-26 15:56:43 -07:00
module.lds.h
mshyperv.h Drivers: hv: Remove hv_alloc/free_* helpers 2025-05-23 16:30:56 +00:00
msi.h irqchip/gic-v5: Add GICv5 IWB support 2025-07-08 18:35:52 +01:00
nommu_context.h
numa.h arch_numa: switch over to numa_memblks 2024-09-03 21:15:32 -07:00
param.h alpha: regularize the situation with asm/param.h 2025-06-24 22:02:05 -04:00
parport.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci.h
pci_iomap.h
percpu.h percpu: repurpose __percpu tag as a named address space qualifier 2025-03-16 22:05:53 -07:00
pgalloc.h mm: call ctor/dtor for kernel PTEs 2025-05-11 17:48:21 -07:00
pgtable-nop4d.h
pgtable-nopmd.h mm: recover pud_leaf() definitions in nopmd case 2024-03-13 12:12:21 -07:00
pgtable-nopud.h
pgtable_uffd.h
preempt.h riscv: support PREEMPT_DYNAMIC with static keys 2023-08-31 00:18:34 -07:00
qrwlock.h
qrwlock_types.h
qspinlock.h riscv: Add qspinlock support 2024-11-11 07:33:20 -08:00
qspinlock_types.h
resource.h
rqspinlock.h bpf: Introduce rqspinlock kfuncs 2025-03-19 08:03:06 -07:00
runtime-const.h runtime constants: add default dummy infrastructure 2024-06-19 12:34:34 -07:00
rwonce.h rwonce: fix crash by removing READ_ONCE() for unaligned read 2025-03-26 22:16:50 +01:00
seccomp.h
sections.h percpu: Remove __per_cpu_load 2025-02-18 10:16:00 +01:00
serial.h
set_memory.h
shmparam.h
signal.h asm-generic: Remove empty #ifdef SA_RESTORER 2022-09-10 09:56:53 +02:00
simd.h asm-generic: Add sched.h inclusion in simd.h 2025-05-30 20:56:48 +08:00
softirq_stack.h
spinlock.h asm-generic: ticket-lock: Add separate ticket-lock.h 2024-11-11 07:33:17 -08:00
spinlock_types.h asm-generic: ticket-lock: Reuse arch_spinlock_t of qspinlock 2024-11-11 07:33:16 -08:00
statfs.h
string.h
switch_to.h
syscall.h syscall.h: introduce syscall_set_nr() 2025-05-11 17:48:15 -07:00
syscalls.h syscalls: mmap(): use unsigned offset type consistently 2024-06-25 15:57:38 +02:00
text-patching.h asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
ticket_spinlock.h riscv: Add qspinlock support 2024-11-11 07:33:20 -08:00
timex.h
tlb.h mmu_gather: move tlb flush for VM_PFNMAP/VM_MIXEDMAP vmas into free_pgtables() 2025-05-31 22:46:12 -07:00
tlbflush.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
topology.h
trace_clock.h
uaccess.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
unwind_user.h unwind_user: Add user space unwinding API with frame pointer support 2025-07-29 14:46:07 -04:00
user.h
vermagic.h
vga.h empty include/asm-generic/vga.h 2024-11-11 21:51:42 +01:00
video.h arch: Rename fbdev header and source files 2024-05-03 17:07:50 +02:00
vmlinux.lds.h tracing: Remove redundant config HAVE_FTRACE_MCOUNT_RECORD 2025-07-22 20:15:56 -04:00
word-at-a-time.h kernel.h: removed REPEAT_BYTE from kernel.h 2024-02-01 09:47:59 -08:00
xor.h