scripts/leaking_addresses.pl
Source file repositories/reference/linux-study-clean/scripts/leaking_addresses.pl
File Facts
- System
- Linux kernel
- Corpus path
scripts/leaking_addresses.pl- Extension
.pl- Size
- 14937 bytes
- Lines
- 707
- Domain
- Support Tooling And Documentation
- Bucket
- scripts
- Inferred role
- Support Tooling And Documentation: scripts
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
function foreachfunction foreachfunction foreach
Annotated Snippet
if ($addr_text !~ /^0/) {
# TODO: Why is hex() so impossibly slow?
my $addr = hex($addr_text);
my $symbol = $entry[2];
# Only keep kernel text addresses.
my $long = pack("J", $addr);
my $entry = [$long, $symbol];
push @kallsyms, $entry;
}
}
close $fh;
}
parse_dmesg();
walk(@DIRS);
exit 0;
sub dprint
{
printf(STDERR @_) if $debug;
}
sub is_supported_architecture
{
return (is_x86_64() or is_ppc64() or is_ix86_32());
}
sub is_32bit
{
# Allow --32-bit or --page-offset-32-bit to override
if ($opt_32bit or $page_offset_32bit) {
return 1;
}
return is_ix86_32();
}
sub is_ix86_32
{
state $arch = `uname -m`;
chomp $arch;
if ($arch =~ m/i[3456]86/) {
return 1;
}
return 0;
}
sub is_arch
{
my ($desc) = @_;
my $arch = `uname -m`;
chomp $arch;
if ($arch eq $desc) {
return 1;
}
return 0;
}
sub is_x86_64
{
state $is = is_arch('x86_64');
return $is;
}
sub is_ppc64
{
state $is = is_arch('ppc64');
Annotation
- Detected declarations: `function foreach`, `function foreach`, `function foreach`.
- Atlas domain: Support Tooling And Documentation / scripts.
- Implementation status: atlas-only.
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.