Skip to content

Commit 5f20997

Browse files
samitolvanenkees
authored andcommitted
arm64: Drop unneeded __nocfi attributes
With -fsanitize=kcfi, CONFIG_CFI_CLANG no longer has issues with address space confusion in functions that switch to linear mapping. Now that the indirectly called assembly functions have type annotations, drop the __nocfi attributes. Suggested-by: Mark Rutland <[email protected]> Signed-off-by: Sami Tolvanen <[email protected]> Reviewed-by: Kees Cook <[email protected]> Tested-by: Kees Cook <[email protected]> Tested-by: Nathan Chancellor <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Tested-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent b26e484 commit 5f20997

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

arch/arm64/include/asm/mmu_context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static inline void cpu_install_ttbr0(phys_addr_t ttbr0, unsigned long t0sz)
147147
* Atomically replaces the active TTBR1_EL1 PGD with a new VA-compatible PGD,
148148
* avoiding the possibility of conflicting TLB entries being allocated.
149149
*/
150-
static inline void __nocfi cpu_replace_ttbr1(pgd_t *pgdp, pgd_t *idmap)
150+
static inline void cpu_replace_ttbr1(pgd_t *pgdp, pgd_t *idmap)
151151
{
152152
typedef void (ttbr_replace_func)(phys_addr_t);
153153
extern ttbr_replace_func idmap_cpu_replace_ttbr1;

arch/arm64/kernel/alternative.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static void clean_dcache_range_nopatch(u64 start, u64 end)
133133
} while (cur += d_size, cur < end);
134134
}
135135

136-
static void __nocfi __apply_alternatives(struct alt_region *region, bool is_module,
136+
static void __apply_alternatives(struct alt_region *region, bool is_module,
137137
unsigned long *feature_mask)
138138
{
139139
struct alt_instr *alt;

arch/arm64/kernel/cpufeature.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,7 @@ static phys_addr_t kpti_ng_pgd_alloc(int shift)
16851685
return kpti_ng_temp_alloc;
16861686
}
16871687

1688-
static void __nocfi
1688+
static void
16891689
kpti_install_ng_mappings(const struct arm64_cpu_capabilities *__unused)
16901690
{
16911691
typedef void (kpti_remap_fn)(int, int, phys_addr_t, unsigned long);

0 commit comments

Comments
 (0)