tools/testing/selftests/kexec/test_kexec_jump.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/kexec/test_kexec_jump.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/kexec/test_kexec_jump.sh- Extension
.sh- Size
- 1033 bytes
- Lines
- 43
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: tools
- 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
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
#
# Prevent loading a kernel image via the kexec_load syscall when
# signatures are required. (Dependent on CONFIG_IMA_ARCH_POLICY.)
TEST="$0"
. ./kexec_common_lib.sh
# kexec requires root privileges
require_root_privileges
# get the kernel config
get_kconfig
kconfig_enabled "CONFIG_KEXEC_JUMP=y" "kexec_jump is enabled"
if [ $? -eq 0 ]; then
log_skip "kexec_jump is not enabled"
fi
kconfig_enabled "CONFIG_IMA_APPRAISE=y" "IMA enabled"
ima_appraise=$?
kconfig_enabled "CONFIG_IMA_ARCH_POLICY=y" \
"IMA architecture specific policy enabled"
arch_policy=$?
get_secureboot_mode
secureboot=$?
if [ $secureboot -eq 1 ] && [ $arch_policy -eq 1 ]; then
log_skip "Secure boot and CONFIG_IMA_ARCH_POLICY are enabled"
fi
./test_kexec_jump
if [ $? -eq 0 ]; then
log_pass "kexec_jump succeeded"
else
# The more likely failure mode if anything went wrong is that the
# kernel just crashes. But if we get back here, sure, whine anyway.
log_fail "kexec_jump failed"
fi
Annotation
- Atlas domain: Support Tooling And Documentation / tools.
- 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.