diff options
| author | Heiko Carstens <hca@linux.ibm.com> | 2025-02-07 15:49:09 +0100 |
|---|---|---|
| committer | Vasily Gorbik <gor@linux.ibm.com> | 2025-03-04 17:18:07 +0100 |
| commit | 841f35a08d4ae58322ed4e7fd68a50817d122602 (patch) | |
| tree | 436700bf99d3628fcea4c065707d5c88bd4fb1e6 /arch/s390/mm/dump_pagetables.c | |
| parent | s390/vx: Convert cpu_has_vx() to cpu feature function (diff) | |
| download | linux-841f35a08d4ae58322ed4e7fd68a50817d122602.tar.gz linux-841f35a08d4ae58322ed4e7fd68a50817d122602.zip | |
s390/bear: Convert cpu_has_bear() to cpu feature function
Get rid of the cpu_has_bear jump label and convert cpu_has_bear() to a cpu
feature function using test_facility() and with that use a static branch.
Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/mm/dump_pagetables.c')
| -rw-r--r-- | arch/s390/mm/dump_pagetables.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/mm/dump_pagetables.c b/arch/s390/mm/dump_pagetables.c index b60bc2b42871..d3e943752fa0 100644 --- a/arch/s390/mm/dump_pagetables.c +++ b/arch/s390/mm/dump_pagetables.c @@ -84,7 +84,7 @@ static void note_prot_wx(struct pg_state *st, unsigned long addr) * in which case we have two lpswe instructions in lowcore that need * to be executable. */ - if (addr == PAGE_SIZE && (nospec_uses_trampoline() || !static_key_enabled(&cpu_has_bear))) + if (addr == PAGE_SIZE && (nospec_uses_trampoline() || !cpu_has_bear())) return; WARN_ONCE(IS_ENABLED(CONFIG_DEBUG_WX), "s390/mm: Found insecure W+X mapping at address %pS\n", @@ -178,7 +178,7 @@ bool ptdump_check_wx(void) return false; } else { pr_info("Checked W+X mappings: passed, no %sW+X pages found\n", - (nospec_uses_trampoline() || !static_key_enabled(&cpu_has_bear)) ? + (nospec_uses_trampoline() || !cpu_has_bear()) ? "unexpected " : ""); return true; |
