Thread (33 messages) flat view 33 messages, 5 authors, 2018-03-12

[PATCH 6/7] lkdtm: crash on overwriting protected pmalloc var

From: J Freyensee <hidden>
Date: 2018-03-07 17:27:02
Also in: linux-mm, lkml


On 3/7/18 5:18 AM, Igor Stoppa wrote:
On 06/03/18 19:20, J Freyensee wrote:
quoted
On 2/28/18 12:06 PM, Igor Stoppa wrote:
[...]
quoted
quoted
   void __init lkdtm_perms_init(void);
   void lkdtm_WRITE_RO(void);
   void lkdtm_WRITE_RO_AFTER_INIT(void);
+void lkdtm_WRITE_RO_PMALLOC(void);
Does this need some sort of #ifdef too?
Not strictly. It's just a function declaration.
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'd prefer hiding it if it's contents are being ifdef'ed out, but I 
really think it's more of a maintainer preference question.

I am not very fond of #ifdefs, so when I can I try to avoid them.

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help