mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
arm64/kernel: Move 'nokaslr' parsing out of early idreg code
Parsing and ignoring 'nokaslr' can be done from anywhere, except from the code that runs very early and is therefore built with limitations on the kind of relocations it is permitted to use. So move it to a source file that is part of the ordinary kernel build. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20231129111555.3594833-63-ardb@google.com Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
ea48626f8f
commit
50f176175e
@ -199,13 +199,6 @@ static const struct {
|
|||||||
{ "nokaslr", "arm64_sw.nokaslr=1" },
|
{ "nokaslr", "arm64_sw.nokaslr=1" },
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init parse_nokaslr(char *unused)
|
|
||||||
{
|
|
||||||
/* nokaslr param handling is done by early cpufeature code */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
early_param("nokaslr", parse_nokaslr);
|
|
||||||
|
|
||||||
static int __init parse_hexdigit(const char *p, u64 *v)
|
static int __init parse_hexdigit(const char *p, u64 *v)
|
||||||
{
|
{
|
||||||
// skip "0x" if it comes next
|
// skip "0x" if it comes next
|
||||||
|
@ -36,3 +36,10 @@ void __init kaslr_init(void)
|
|||||||
pr_info("KASLR enabled\n");
|
pr_info("KASLR enabled\n");
|
||||||
__kaslr_is_enabled = true;
|
__kaslr_is_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int __init parse_nokaslr(char *unused)
|
||||||
|
{
|
||||||
|
/* nokaslr param handling is done by early cpufeature code */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
early_param("nokaslr", parse_nokaslr);
|
||||||
|
Loading…
Reference in New Issue
Block a user