From: David Woodhouse <[EMAIL PROTECTED]> Date: Thu, 03 May 2007 08:48:59 +0100
> [PATCH] Increase slab redzone to 64 bits. > > There are two problems with the existing redzone implementation. > > Firstly, it's causing misalignment of structures which contain a 64-bit > integer, such as netfilter's 'struct ipt_entry' -- causing netfilter > modules to fail to load because of the misalignment. (In particular, the > first check in net/ipv4/netfilter/ip_tables.c::check_entry_size_and_hooks()) > > I considered just fixing this by setting ARCH_KMALLOC_MINALIGN to > __alignof__(uint64_t) in the default case where the architecture hasn't > already set it -- but that would disable redzone checks on those > architectures. > > When investigating this, I noticed that on 64-bit platforms we're using > a 32-bit value of RED_ACTIVE/RED_INACTIVE in the 64-bit memory location > set aside for the redzone. Which means that the four bytes immediately > either before or after the allocated object are 0x00,0x00,0x00,0x00 for > LE and BE machines, respectively. Which is probably not the most useful > choice of poison value. > > One way to fix both of those at once is just to switch to 64-bit > redzones in all cases. Patch below; better ideas on a postcard to... > > Signed-off-by: David Woodhouse <[EMAIL PROTECTED]> This looks good to me, I hope this gets merged soon. Signed-off-by: David S. Miller <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
