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

J. R. Okajima hooanon05 at yahoo.co.jp
Fri May 28 05:20:31 EDT 2010


pageexec at freemail.hu:
> do you really need to allocate these structures at runtime? if all you need
> is to modify existing ops structures then you can temporarily grant yourself
> write access by using pax_open_kernel/pax_close_kernel. of course it's PaX
> specific, it won't work with DEBUG_RODATA (you can abuse text_poke maybe ;).

My module is a stackable filesystem which refers multiple other fs. For
example, when one of its member fs is ext2 with 'xip' option and the
other is no 'xip', then I should prepare two kinds of
address_space_operations, one has ->get_xip_mem() and the other doesn't.
As you might know, ext2 has several variations of
address_space_operrations (statically) and sets one of them to a file.

My fs cannot prepare all these variations statically since they are
unknown, so allocates address_space_operrations dynamically and sets the
member functions in it following the underlaying ext2's
address_space_operrations.

Finally,
- struct brabra operations in my fs should be set following the
  corresponding data in other fs.
- there is no gurantee when/which fs (and struct) comes to my fs.


J. R. Okajima


More information about the grsecurity mailing list