Skip to content

Commit 5659b59

Browse files
samitolvanenkees
authored andcommitted
treewide: Drop __cficanonical
CONFIG_CFI_CLANG doesn't use a jump table anymore and therefore, won't change function references to point elsewhere. Remove the __cficanonical attribute and all uses of it. Note that the Clang definition of the attribute was removed earlier, just clean up the no-op definition and users. 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 4b24356 commit 5659b59

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

include/linux/compiler_types.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,6 @@ struct ftrace_likely_data {
265265
# define __nocfi
266266
#endif
267267

268-
#ifndef __cficanonical
269-
# define __cficanonical
270-
#endif
271-
272268
/*
273269
* Any place that could be marked with the "alloc_size" attribute is also
274270
* a place to be marked with the "malloc" attribute. Do this as part of the

include/linux/init.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ extern bool initcall_debug;
220220
__initcall_name(initstub, __iid, id)
221221

222222
#define __define_initcall_stub(__stub, fn) \
223-
int __init __cficanonical __stub(void); \
224-
int __init __cficanonical __stub(void) \
223+
int __init __stub(void); \
224+
int __init __stub(void) \
225225
{ \
226226
return fn(); \
227227
} \

include/linux/pci.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,8 +2019,8 @@ enum pci_fixup_pass {
20192019
#ifdef CONFIG_LTO_CLANG
20202020
#define __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
20212021
class_shift, hook, stub) \
2022-
void __cficanonical stub(struct pci_dev *dev); \
2023-
void __cficanonical stub(struct pci_dev *dev) \
2022+
void stub(struct pci_dev *dev); \
2023+
void stub(struct pci_dev *dev) \
20242024
{ \
20252025
hook(dev); \
20262026
} \

0 commit comments

Comments
 (0)