Re: [PATCH] vfs: make sure struct filename->iname is word-aligned

2018-03-18 Thread Rasmus Villemoes
On 2018-03-01 00:19, Rasmus Villemoes wrote: > I noticed that offsetof(struct filename, iname) is actually 28 on 64 > bit platforms, so we always pass an unaligned pointer to > strncpy_from_user. This is mostly a problem for those 64 bit platforms > without HAVE_EFFICIENT_UNALIGNED_ACCESS, but even

[PATCH] vfs: make sure struct filename->iname is word-aligned

2018-02-28 Thread Rasmus Villemoes
I noticed that offsetof(struct filename, iname) is actually 28 on 64 bit platforms, so we always pass an unaligned pointer to strncpy_from_user. This is mostly a problem for those 64 bit platforms without HAVE_EFFICIENT_UNALIGNED_ACCESS, but even on x86_64, unaligned accesses carry a penalty. A us