Re: DNAME_INLINE_LEN versus CONFIG_GENERIC_LOCKBREAK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> writes:

> In dcache.h, DNAME_INLINE_LEN is carefully chosen so that sizeof(struct
> dentry) is a (specific) multiple of 64 bytes. Obviously this breaks when
> certain debug options are chosen (DEBUG_LOCK_ALLOC and DEBUG_SPINLOCK),
> but also, AFAICT, on architectures with CONFIG_GENERIC_LOCKBREAK.
>
> I'm not sure it matters, but if it does, I'd suggest putting a
> BUILD_BUG_ON somewhere, protected by suitable #ifdefs, so that the code
> documents the assumptions that went into the particular choice of
> DNAME_INLINE_LEN (this would also help catch changes to some of the
> structures embedded in struct dentry which would violate those
> assumptions). 

The right fix would be to pad it correctly for these other variants
too.

Checking for magic numbers would be nasty though.

-Andi

-- 
ak@xxxxxxxxxxxxxxx -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux