From: Andrew Morton <akpm@osdl.org>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] s390: speedup strn{cpy,len}_from_user.
Date: Fri, 11 Jun 2004 15:19:18 -0700 [thread overview]
Message-ID: <20040611151918.00f47792.akpm@osdl.org> (raw)
In-Reply-To: <20040611173204.GB3279@mschwid3.boeblingen.de.ibm.com>
Martin Schwidefsky <schwidefsky@de.ibm.com> wrote:
>
> [PATCH] s390: speedup strn{cpy,len}_from_user.
>
> From: Martin Schwidefsky <schwidefsky@de.ibm.com>
>
> Speedup strncpy_from_user and strnlen_from_user by using
> the search string instruction in the secondary space mode.
There were a few conflicts with Arnd's sparse annotation, which I fixed up.
Please check that next the -mm has it all right.
> static inline long
> strncpy_from_user(char *dst, const char *src, long count)
> {
> long res = -EFAULT;
> might_sleep();
> - if (access_ok(VERIFY_READ, src, 1))
> - res = __strncpy_from_user_asm(dst, src, count);
> + if (access_ok(VERIFY_READ, src, 1)) {
> + res = __strncpy_from_user_asm(count, dst, src);
> + }
> return res;
> }
Shouldn't the access_ok() check be passed `count', rather than `1'?
next prev parent reply other threads:[~2004-06-11 22:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-11 17:32 Martin Schwidefsky
2004-06-11 22:19 ` Andrew Morton [this message]
2004-06-14 8:40 ` Martin Schwidefsky
2004-06-11 23:49 linux
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=20040611151918.00f47792.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
/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
all inboxes | Powered by JetHome®