diff mbox series

[RFC,v2,21/21] init: Drop __nocfi from __init

Message ID 20220513202159.1550547-22-samitolvanen@google.com (mailing list archive)
State Superseded
Headers show
Series KCFI support | expand

Commit Message

Sami Tolvanen May 13, 2022, 8:21 p.m. UTC
It's no longer necessary to disable CFI checking for all __init
functions. Drop the __nocfi attribute.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
---
 include/linux/init.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kees Cook May 14, 2022, 10:03 p.m. UTC | #1
On Fri, May 13, 2022 at 01:21:59PM -0700, Sami Tolvanen wrote:
> It's no longer necessary to disable CFI checking for all __init
> functions. Drop the __nocfi attribute.
> 
> Signed-off-by: Sami Tolvanen <samitolvanen@google.com>

Maybe move this up after patch 11 (the arm64-wide __nocfi removal)?

Reviewed-by: Kees Cook <keescook@chromium.org>
Sami Tolvanen May 16, 2022, 5:16 p.m. UTC | #2
On Sat, May 14, 2022 at 3:03 PM Kees Cook <keescook@chromium.org> wrote:
>
> On Fri, May 13, 2022 at 01:21:59PM -0700, Sami Tolvanen wrote:
> > It's no longer necessary to disable CFI checking for all __init
> > functions. Drop the __nocfi attribute.
> >
> > Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
>
> Maybe move this up after patch 11 (the arm64-wide __nocfi removal)?

Yes, that makes sense. I'll move it.

Sami
diff mbox series

Patch

diff --git a/include/linux/init.h b/include/linux/init.h
index 76058c9e0399..a0a90cd73ebe 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -47,7 +47,7 @@ 
 
 /* These are for everybody (although not all archs will actually
    discard it in modules) */
-#define __init		__section(".init.text") __cold  __latent_entropy __noinitretpoline __nocfi
+#define __init		__section(".init.text") __cold  __latent_entropy __noinitretpoline
 #define __initdata	__section(".init.data")
 #define __initconst	__section(".init.rodata")
 #define __exitdata	__section(".exit.data")