From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: David Miller <davem@davemloft.net>,
torvalds@linux-foundation.org, linux-arch@vger.kernel.org
Subject: Re: Arch maintainers Ahoy!
Date: Wed, 23 May 2012 10:40:25 +0100 [thread overview]
Message-ID: <1337766025.3013.3.camel@dabdike.int.hansenpartnership.com> (raw)
In-Reply-To: <CAMuHMdUdxrGqn9sRgwrNgX4teV_ivHSeBn3hKnvgxZRxQE_krQ@mail.gmail.com>
On Wed, 2012-05-23 at 10:02 +0200, Geert Uytterhoeven wrote:
> On Wed, May 23, 2012 at 7:46 AM, David Miller <davem@davemloft.net> wrote:
> > [PATCH] sparc: Add full proper error handling to strncpy_from_user().
> >
> > Linus removed the end-of-address-space hackery from
> > fs/namei.c:do_getname() so we really have to validate these edge
> > conditions and cannot cheat any more (as x86 used to as well).
> >
> > Move to a common C implementation like x86 did. And if both
> > src and dst are sufficiently aligned we'll do word at a time
> > copies and checks as well.
>
> Now everybody is rewriting this in plain C, perhaps it make sense to
> have it in lib/, so I don't have to write anything myself?
I think the sparc version will work for everybody (it will certainly
work on parisc). The only thing that might be necessary is to add these
guards:
#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
if (((long) dst | (long) src) & (sizeof(long) - 1))
goto byte_at_a_time;
#endif
Dave, did you want to add it to lib/ ?
James
next prev parent reply other threads:[~2012-05-23 9:40 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-21 16:50 Arch maintainers Ahoy! (was Re: x86: faster strncpy_from_user()) Linus Torvalds
2012-05-23 5:46 ` Arch maintainers Ahoy! David Miller
2012-05-23 8:02 ` Geert Uytterhoeven
2012-05-23 9:40 ` James Bottomley [this message]
2012-05-23 15:15 ` Linus Torvalds
2012-05-23 17:21 ` David Miller
2012-05-23 17:32 ` Linus Torvalds
2012-05-23 18:16 ` David Miller
2012-05-23 18:27 ` Linus Torvalds
2012-05-23 18:35 ` David Miller
2012-05-23 18:44 ` Linus Torvalds
2012-05-23 18:46 ` Linus Torvalds
2012-05-23 20:36 ` David Miller
2012-05-23 21:01 ` Linus Torvalds
2012-05-24 2:11 ` David Miller
2012-05-24 5:25 ` Paul Mackerras
2012-05-24 5:56 ` David Miller
2012-05-24 9:40 ` David Howells
2012-05-24 15:53 ` Linus Torvalds
2012-06-13 11:08 ` Michael Cree
2012-06-13 14:51 ` Linus Torvalds
2012-05-24 16:45 ` David Howells
2012-05-24 16:56 ` Linus Torvalds
2012-05-24 17:16 ` David Howells
2012-05-23 17:19 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337766025.3013.3.camel@dabdike.int.hansenpartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=davem@davemloft.net \
--cc=geert@linux-m68k.org \
--cc=linux-arch@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).