On 06/03/18 19:20, J Freyensee wrote:
On 2/28/18 12:06 PM, Igor Stoppa wrote:[...]
Not strictly. It's just a function declaration.void __init lkdtm_perms_init(void);Does this need some sort of #ifdef too?
void lkdtm_WRITE_RO(void);
void lkdtm_WRITE_RO_AFTER_INIT(void);
+void lkdtm_WRITE_RO_PMALLOC(void);
As long as it is not used, the linker will not complain.
The #ifdef placed around the use and definition is sufficient, from a
correctness perspective.
But it's a different question if there is any standard in linux about
hiding also the declaration.
I am not very fond of #ifdefs, so when I can I try to avoid them.