Hello, all!
I'm trying to use GRSECURITY with AUFS-enabled kernel (working just fine for me, and I really need it) and after patching it with GRSECURITY getting following errors, even with grsecurity disabled:
- Cut -
fs/aufs/dynop.c: In function ‘dy_aop’:
fs/aufs/dynop.c:179:2: error: assignment of member ‘writepage’ in read-only object
fs/aufs/dynop.c:180:2: error: assignment of member ‘readpage’ in read-only object
fs/aufs/dynop.c:181:2: error: assignment of member ‘writepages’ in read-only object
fs/aufs/dynop.c:182:2: error: assignment of member ‘set_page_dirty’ in read-only object
fs/aufs/dynop.c:183:2: error: assignment of member ‘readpages’ in read-only object
fs/aufs/dynop.c:184:2: error: assignment of member ‘write_begin’ in read-only object
fs/aufs/dynop.c:185:2: error: assignment of member ‘write_end’ in read-only object
fs/aufs/dynop.c:186:2: error: assignment of member ‘bmap’ in read-only object
fs/aufs/dynop.c:187:2: error: assignment of member ‘invalidatepage’ in read-only object
fs/aufs/dynop.c:188:2: error: assignment of member ‘releasepage’ in read-only object
fs/aufs/dynop.c:189:2: error: assignment of member ‘freepage’ in read-only object
fs/aufs/dynop.c:191:2: error: assignment of member ‘direct_IO’ in read-only object
fs/aufs/dynop.c:192:2: error: assignment of member ‘get_xip_mem’ in read-only object
fs/aufs/dynop.c:193:2: error: assignment of member ‘migratepage’ in read-only object
fs/aufs/dynop.c:194:2: error: assignment of member ‘launder_page’ in read-only object
fs/aufs/dynop.c:195:2: error: assignment of member ‘is_partially_uptodate’ in read-only object
fs/aufs/dynop.c:196:2: error: assignment of member ‘error_remove_page’ in read-only object
fs/aufs/dynop.c:197:2: error: assignment of member ‘swap_activate’ in read-only object
fs/aufs/dynop.c:198:2: error: assignment of member ‘swap_deactivate’ in read-only object
fs/aufs/dynop.c: In function ‘dy_adx’:
fs/aufs/dynop.c:272:3: error: assignment of member ‘direct_IO’ in read-only object
fs/aufs/dynop.c:273:3: error: assignment of member ‘get_xip_mem’ in read-only object
fs/aufs/dynop.c:275:3: error: assignment of member ‘direct_IO’ in read-only object
fs/aufs/dynop.c:276:3: error: assignment of member ‘get_xip_mem’ in read-only object
fs/aufs/dynop.c:278:4: error: assignment of member ‘get_xip_mem’ in read-only object
- Cut -
That happens both with 3.2.32 and 3.6.3 kernels (stable and testing branches of GRSECURITY).
Currently I've found that aufs (according to Documentation/filesystems/aufs/design/10dynop.txt) need to redefine operations in struct "address_space_operations", which by default is not const, but something in GRSECURITY makes it const, and I was not able to find - where it happens.
Unfortunately, I'm not that familiar with kernel source code to fix it mysef, does anybody know, how to fix it?
BTW, aufs source taken from latest git at aufs.sourceforge.net.
GRSECURITY have really good features, but this issue prevents it's usage on Live-like systems with aufs (For example, my linux system is loading from squashfs image at secured standalone workstation, with no changes allowed to be done by anybody, except the admin, who creating squashfs image).
Thanks in advance,
Alex