[grsec] Q. 'const'antify the members of a structure

pageexec at freemail.hu pageexec at freemail.hu
Fri May 28 05:52:33 EDT 2010


On 28 May 2010 at 18:20, J. R. Okajima wrote:


> My fs cannot prepare all these variations statically since they are
> unknown,

i guess you could do that but it'd soon run into some sort of combinatorial explosion ;).

so in this case what you can do is similar to what PaX does in drivers/ata/libata-core.c:

-       ops->inherits = NULL;
+       ((struct ata_port_operations *)ops)->inherits = NULL;

this cast is a good way to document that you're doing something special (kernel
devs would say 'fishy' probably ;).



More information about the grsecurity mailing list