mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
97f4f3805fd22bfc9cbdede5a2cfb0c48ee7df1e
Pull probe fixes from Masami Hiramatsu:
"Fix ftrace ops switching and optprobe state transitions:
- Switch an armed ftrace-based kprobe from kprobe_ftrace_ops to
kprobe_ipmodify_ops in register_aggr_kprobe() when adding a probe
with a post_handler, so later disarming does not fail with -ENOENT
and leave the probe armed
- Queue forcibly unoptimized probes onto the generation's
cooling_list in force_unoptimize_kprobe() so unregister_kprobes()
waits for Tasks RCU before freeing the optinsn slot, preventing a
use-after-free
- Skip arch_arm_kprobe() in __arm_kprobe() when a probe is queued for
unoptimization so the active relative jump instruction is not
partially overwritten with a breakpoint before the optimizer runs
- Re-queue any jump-optimized sibling probe covering a disabled
probe's address when that probe finishes cooling in
optprobe_finalize_generation(), matching the freeing_list path
Fix multiprobe lifecycle and boot kprobe setup
- Return early in setup_boot_kprobe_events() when the kprobe_event=
boot buffer is empty to avoid contending on event_mutex with
asynchronous eval-map work during normal boot
- Verify that a multiprobe event is neither enabled nor busy before
unlinking any sibling kprobe, fprobe, uprobe, or eprobe so active
probes cannot be unlinked and freed via dynamic_events
- Register and enable a newly appended fprobe or uprobe immediately
when the target multiprobe event is already enabled so the probe
fires and disable or perf cleanup does not act on an unregistered
probe
- Free the temporary event name string with __free(kfree) in
__trace_uprobe_create() to prevent a memory leak if a subsequent
allocation fails
Fix BTF parsing and string array fetch handling:
- Compute BTF bitfield byte and bit offsets consistently, select the
smallest unsigned fetch type covering the bitfield, and size
FETCH_OP_MOD_BF from that type to prevent an 8-byte out-of-bounds
write on smaller ring buffer slots
- Validate BTF_KIND_PTR and non-NULL BTF_KIND_INT types in
btf_type_is_char_ptr() and btf_type_is_char_array() before reading
inner type metadata to avoid misinterpreting byte sizes as type IDs
or reading out of bounds
- Check for FETCH_OP_UDEREF before advancing the fetch instruction
slot in finalize_fetch_insn() so user-space dereference string
arrays emit FETCH_OP_ST_USTRING instead of reading kernel memory
- Reject string array counts when the preceding fetch operation is
not a memory dereference so non-dereference string sources ($comm,
immediate strings, eprobe fields) do not emit invalid
FETCH_OP_LP_ARRAY loops
Fix signed 1-byte field fetch and fprobe target check:
- Use explicit fixed-width integer types (s8/u8, s16/u16, s32/u32) in
get_event_field() so 1-byte signed event fields are sign-extended
instead of zero-extended under -funsigned-char
- Exclude TRACE_EVENT_FL_FPROBE events in find_and_get_event() so
eprobes cannot attach to fprobe or tprobe events
Fix typo in kprobes documentation:
- Remove a stray closing parenthesis in Documentation/trace/kprobes.rst"
* tag 'probes-fixes-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
tracing/uprobes: Fix memory leak of tail in __trace_uprobe_create()
tracing/probes: Reject array count on non-dereference string sources
tracing/probes: Fix user-space dereference string array store type
tracing/eprobe: Disallow attaching eprobes to fprobe events
tracing/eprobe: Fix 1-byte signed field fetch in get_event_field()
tracing/probes: Fix missing BTF kind checks in char pointer/array helpers
tracing/probes: Fix BTF bitfield parsing and out-of-bounds buffer write
tracing/probes: Enable newly appended probe when target event is enabled
tracing/probes: Check enabled and busy state before unlinking sibling probes
kprobes: Re-optimize blocked sibling probe when cooling finishes
kprobes: Do not overwrite jump instruction when re-arming unoptimizing probe
kprobes: Fix UAF and queue cooling probes on forced unoptimization
kprobes: Switch ftrace ops when adding probe with post_handler
docs, kprobes: Fix bracket
tracing: skip boot kprobe setup when no events were requested
Merge tag 'probes-fixes-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
…
Linux kernel ============ The Linux kernel is the core of any Linux operating system. It manages hardware, system resources, and provides the fundamental services for all other software. Quick Start ----------- * Report a bug: See Documentation/admin-guide/reporting-issues.rst * Get the latest kernel: https://kernel.org * Build the kernel: See Documentation/admin-guide/quickly-build-trimmed-linux.rst * Join the community: https://lore.kernel.org/ Essential Documentation ----------------------- All users should be familiar with: * Building requirements: Documentation/process/changes.rst * Code of Conduct: Documentation/process/code-of-conduct.rst * License: See COPYING Documentation can be built with make htmldocs or viewed online at: https://www.kernel.org/doc/html/latest/ Who Are You? ============ Find your role below: * New Kernel Developer: Getting started with kernel development * Academic Researcher: Studying kernel internals and architecture * Security Expert: Hardening and vulnerability analysis * Backport/Maintenance Engineer: Maintaining stable kernels * System Administrator: Configuring and troubleshooting * Maintainer: Leading subsystems and reviewing patches * Hardware Vendor: Writing drivers for new hardware * Distribution Maintainer: Packaging kernels for distros * AI Coding Assistant: LLMs and AI-powered development tools For Specific Users ================== New Kernel Developer -------------------- Welcome! Start your kernel development journey here: * Getting Started: Documentation/process/development-process.rst * Your First Patch: Documentation/process/submitting-patches.rst * Coding Style: Documentation/process/coding-style.rst * Build System: Documentation/kbuild/index.rst * Development Tools: Documentation/dev-tools/index.rst * Kernel Hacking Guide: Documentation/kernel-hacking/hacking.rst * Core APIs: Documentation/core-api/index.rst Academic Researcher ------------------- Explore the kernel's architecture and internals: * Researcher Guidelines: Documentation/process/researcher-guidelines.rst * Memory Management: Documentation/mm/index.rst * Scheduler: Documentation/scheduler/index.rst * Networking Stack: Documentation/networking/index.rst * Filesystems: Documentation/filesystems/index.rst * RCU (Read-Copy Update): Documentation/RCU/index.rst * Locking Primitives: Documentation/locking/index.rst * Power Management: Documentation/power/index.rst Security Expert --------------- Security documentation and hardening guides: * Security Documentation: Documentation/security/index.rst * LSM Development: Documentation/security/lsm-development.rst * Self Protection: Documentation/security/self-protection.rst * Reporting Vulnerabilities: Documentation/process/security-bugs.rst * CVE Procedures: Documentation/process/cve.rst * Embargoed Hardware Issues: Documentation/process/embargoed-hardware-issues.rst * Security Features: Documentation/userspace-api/seccomp_filter.rst Backport/Maintenance Engineer ----------------------------- Maintain and stabilize kernel versions: * Stable Kernel Rules: Documentation/process/stable-kernel-rules.rst * Backporting Guide: Documentation/process/backporting.rst * Applying Patches: Documentation/process/applying-patches.rst * Subsystem Profile: Documentation/maintainer/maintainer-entry-profile.rst * Git for Maintainers: Documentation/maintainer/configure-git.rst System Administrator -------------------- Configure, tune, and troubleshoot Linux systems: * Admin Guide: Documentation/admin-guide/index.rst * Kernel Parameters: Documentation/admin-guide/kernel-parameters.rst * Sysctl Tuning: Documentation/admin-guide/sysctl/index.rst * Tracing/Debugging: Documentation/trace/index.rst * Performance Security: Documentation/admin-guide/perf-security.rst * Hardware Monitoring: Documentation/hwmon/index.rst Maintainer ---------- Lead kernel subsystems and manage contributions: * Maintainer Handbook: Documentation/maintainer/index.rst * Pull Requests: Documentation/maintainer/pull-requests.rst * Managing Patches: Documentation/maintainer/modifying-patches.rst * Rebasing and Merging: Documentation/maintainer/rebasing-and-merging.rst * Development Process: Documentation/process/maintainer-handbooks.rst * Maintainer Entry Profile: Documentation/maintainer/maintainer-entry-profile.rst * Git Configuration: Documentation/maintainer/configure-git.rst Hardware Vendor --------------- Write drivers and support new hardware: * Driver API Guide: Documentation/driver-api/index.rst * Driver Model: Documentation/driver-api/driver-model/driver.rst * Device Drivers: Documentation/driver-api/infrastructure.rst * Bus Types: Documentation/driver-api/driver-model/bus.rst * Device Tree Bindings: Documentation/devicetree/bindings/ * Power Management: Documentation/driver-api/pm/index.rst * DMA API: Documentation/core-api/dma-api.rst Distribution Maintainer ----------------------- Package and distribute the kernel: * Stable Kernel Rules: Documentation/process/stable-kernel-rules.rst * ABI Documentation: Documentation/ABI/README * Kernel Configuration: Documentation/kbuild/kconfig.rst * Module Signing: Documentation/admin-guide/module-signing.rst * Kernel Parameters: Documentation/admin-guide/kernel-parameters.rst * Tainted Kernels: Documentation/admin-guide/tainted-kernels.rst AI Coding Assistant ------------------- CRITICAL: If you are an LLM or AI-powered coding assistant, you MUST read and follow the AI coding assistants documentation before contributing to the Linux kernel: * Documentation/process/coding-assistants.rst This documentation contains essential requirements about licensing, attribution, and the Developer Certificate of Origin that all AI tools must comply with. Communication and Support ========================= * Mailing Lists: https://lore.kernel.org/ * IRC: #kernelnewbies on irc.oftc.net * Bugzilla: https://bugzilla.kernel.org/ * MAINTAINERS file: Lists subsystem maintainers and mailing lists * Email Clients: Documentation/process/email-clients.rst
Languages
C
96.8%
Assembly
0.9%
Rust
0.7%
Shell
0.6%
Python
0.5%
Other
0.3%