I patched OpenAFS to work on Gentoo Hardened 4.4.8-r1; it just required a
few changes in struct initializations to work with struct randomization.
Looking at old messages on the list, the reason these weren't changed
before was for compatibility with old compilers, but there are other struct
initializations in the codebase now that use designated initizalizers, so
it shouldn't be a problem. Additionally, the config options listed at the
end failed to be detected by configure, but I'm not sure why. I don't
really know how to use autoconf, so I had to hardcode them, which is
acceptable for my use but clearly not in the actual codebase. I'm hoping
someone can help me figure this out so it will build normally.

Here's the patch for the structs:
http://web.mit.edu/deywos/www/structs.patch

Here are the config options:
NEW_EXPORT_OPS EXPORT_OP_ENCODE_FH_TAKES_INODES
STRUCT_FILE_OPERATIONS_HAS_READ_ITER STRUCT_KEY_TYPE_HAS_MATCH_PREPARSE
STRUCT_SUPER_OPERATIONS_HAS_ALLOC_INODE
STRUCT_SUPER_OPERATIONS_HAS_EVICT_INODE STRUCT_KEY_TYPE_HAS_PREPARSE
STRUCT_FILE_OPERATIONS_HAS_ITERATE DOP_REVALIDATE_TAKES_UNSIGNED
HAVE_LINUX_INODE_OPERATIONS_FOLLOW_LINK_NO_NAMEIDATA
STRUCT_DENTRY_OPERATIONS_HAS_D_AUTOMOUNT
STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_WRITE_BEGIN IOP_LOOKUP_TAKES_UNSIGNED
IOP_MKDIR_TAKES_UMODE_T
HAVE_LINUX_INODE_OPERATIONS_FOLLOW_LINK_NO_NAMEIDATA
HAVE_LINUX_INODE_OPERATIONS_PUT_LINK_NO_NAMEIDATA
AOP_WRITEPAGE_TAKES_WRITEBACK_CONTROL DOP_D_DELETE_TAKES_CONST

Thanks,
Deven

Reply via email to