From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Ryabitsev Date: Thu, 01 Sep 2022 15:28:56 -0400 Subject: [PATCH v5 11/21] arm64: Drop unneeded __nocfi attributes MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20220901-kcfi_support-v5-11-be2007d8da63@linuxfoundation.org> References: <20220901-kcfi_support-v5-0-be2007d8da63@linuxfoundation.org> In-Reply-To: <20220901-kcfi_support-v5-0-be2007d8da63@linuxfoundation.org> To: mricon@kernel.org X-Mailer: b4 0.10.0-dev-03aea X-Developer-Signature: v=1; a=openpgp-sha256; l=2238; i=konstantin@linuxfoundation.org; h=from:subject:message-id; bh=38LFY8rjzQdZtGIgJjAPvNk5sLstBdUbtOy/8M0cwwg=; b=owGbwMvMwCW27YjM47CUmTmMp9WSGJIF2X8lORrdDPaQt0rg/69zfcrebxzmQsytIp1/WR4/2s7Q sFm3o5SFQYyLQVZMkaVsX+ymoMKHHnLpPaYwc1iZQIYwcHEKwESykhn+yn3wPF4YwqHPMUuB73iZTe S86Y8Wnem6Z/rIbKPkb6/KWwz/tA7ulue8OU1zGvMtI36D6NwND1tEPnxetffKWpeNcT27OAA= X-Developer-Key: i=konstantin@linuxfoundation.org; a=openpgp; fpr=DE0E66E32F1FDD0902666B96E63EDCA9329DD07E X-Endpoint-Received: by B4 Submission Endpoint for konstantin@linuxfoundation.org/default with auth_id=3 List-Id: B4 Web Endpoint Patches From: Sami Tolvanen 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 Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Tested-by: Kees Cook diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h index c7ccd82db1d2..bba0e630c8bc 100644 --- a/arch/arm64/include/asm/mmu_context.h +++ b/arch/arm64/include/asm/mmu_context.h @@ -147,7 +147,7 @@ static inline void cpu_install_ttbr0(phys_addr_t ttbr0, unsigned long t0sz) * Atomically replaces the active TTBR1_EL1 PGD with a new VA-compatible PGD, * avoiding the possibility of conflicting TLB entries being allocated. */ -static inline void __nocfi cpu_replace_ttbr1(pgd_t *pgdp, pgd_t *idmap) +static inline void cpu_replace_ttbr1(pgd_t *pgdp, pgd_t *idmap) { typedef void (ttbr_replace_func)(phys_addr_t); extern ttbr_replace_func idmap_cpu_replace_ttbr1; diff --git a/arch/arm64/kernel/alternative.c b/arch/arm64/kernel/alternative.c index 9bcaa5eacf16..d2c66507398d 100644 --- a/arch/arm64/kernel/alternative.c +++ b/arch/arm64/kernel/alternative.c @@ -133,7 +133,7 @@ static void clean_dcache_range_nopatch(u64 start, u64 end) } while (cur += d_size, cur < end); } -static void __nocfi __apply_alternatives(struct alt_region *region, bool is_module, +static void __apply_alternatives(struct alt_region *region, bool is_module, unsigned long *feature_mask) { struct alt_instr *alt; diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index af4de817d712..ca6e5ca7104e 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1685,7 +1685,7 @@ static phys_addr_t kpti_ng_pgd_alloc(int shift) return kpti_ng_temp_alloc; } -static void __nocfi +static void kpti_install_ng_mappings(const struct arm64_cpu_capabilities *__unused) { typedef void (kpti_remap_fn)(int, int, phys_addr_t, unsigned long); -- b4 0.10.0-dev-03aea