Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1335908
| From | Al Viro <viro@ZenIV.linux.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] vfs: make sure struct filename->iname is word-aligned |
| Date | 2016-02-17 00:00 +0100 |
| Message-ID | <r2WL9-5PS-37@gated-at.bofh.it> (permalink) |
| References | <r2WBs-5LU-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Feb 16, 2016 at 11:49:24PM +0100, 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 on x86_64, unaligned > accesses carry a penalty, especially when done in a loop. > > Let's try to ensure we always pass an aligned destination pointer to > strncpy_from_user. I considered making refcnt a long instead of doing > the union thing, and mostly ended up tossing a coin. Why not swap it with the previous field, then?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] vfs: make sure struct filename->iname is word-aligned Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-02-16 23:50 +0100
[PATCH 2/2] vfs: don't always include audit-specific members of struct filename Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-02-17 00:00 +0100
Re: [PATCH 1/2] vfs: make sure struct filename->iname is word-aligned Al Viro <viro@ZenIV.linux.org.uk> - 2016-02-17 00:00 +0100
Re: [PATCH 1/2] vfs: make sure struct filename->iname is word-aligned Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-02-18 21:20 +0100
Re: [PATCH 1/2] vfs: make sure struct filename->iname is word-aligned Theodore Ts'o <tytso@mit.edu> - 2016-02-19 16:10 +0100
csiph-web