mm/kasan/report_tags.c
Source file repositories/reference/linux-study-clean/mm/kasan/report_tags.c
File Facts
- System
- Linux kernel
- Corpus path
mm/kasan/report_tags.c- Extension
.c- Size
- 2768 bytes
- Lines
- 108
- Domain
- Core OS
- Bucket
- Memory Management
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/atomic.hkasan.h../slab.h
Detected Declarations
function kasan_complete_mode_report_info
Annotated Snippet
if (entry->is_free) {
/*
* Second free of the same object.
* Give up on trying to find the alloc entry.
*/
if (free_found)
break;
memcpy(&info->free_track, &entry->track,
sizeof(info->free_track));
free_found = true;
/*
* If a free entry is found first, the bug is likely
* a use-after-free.
*/
if (!info->bug_type)
info->bug_type = "slab-use-after-free";
} else {
/* Second alloc of the same object. Give up. */
if (alloc_found)
break;
memcpy(&info->alloc_track, &entry->track,
sizeof(info->alloc_track));
alloc_found = true;
/*
* If an alloc entry is found first, the bug is likely
* an out-of-bounds.
*/
if (!info->bug_type)
info->bug_type = "slab-out-of-bounds";
}
}
write_unlock_irqrestore(&stack_ring.lock, flags);
/* Assign the common bug type if no entries were found. */
if (!info->bug_type)
info->bug_type = get_common_bug_type(info);
}
Annotation
- Immediate include surface: `linux/atomic.h`, `kasan.h`, `../slab.h`.
- Detected declarations: `function kasan_complete_mode_report_info`.
- Atlas domain: Core OS / Memory Management.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.