From: Andries Brouwer <aebr@win.tue.nl>
To: Jesper Juhl <juhl-lkml@dif.dk>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH][3/4] let's kill verify_area - convert kernel/compat.c to access_ok()
Date: Fri, 7 Jan 2005 02:58:28 +0100 [thread overview]
Message-ID: <20050107015828.GA4396@pclin040.win.tue.nl> (raw)
In-Reply-To: <Pine.LNX.4.61.0501070155050.3430@dragon.hygekrogen.localhost>
On Fri, Jan 07, 2005 at 02:18:44AM +0100, Jesper Juhl wrote:
> Here's a patch to convert verify_area to access_ok in kernel/compat.c
>
> diff -up linux-2.6.10-bk9-orig/kernel/compat.c linux-2.6.10-bk9/kernel/compat.c
> --- linux-2.6.10-bk9-orig/kernel/compat.c 2005-01-06 22:19:13.000000000 +0100
> +++ linux-2.6.10-bk9/kernel/compat.c 2005-01-07 02:06:00.000000000 +0100
> @@ -26,16 +26,16 @@
>
> int get_compat_timespec(struct timespec *ts, const struct compat_timespec __user *cts)
> {
> - return (verify_area(VERIFY_READ, cts, sizeof(*cts)) ||
> + return (access_ok(VERIFY_READ, cts, sizeof(*cts)) ||
> __get_user(ts->tv_sec, &cts->tv_sec) ||
> - __get_user(ts->tv_nsec, &cts->tv_nsec)) ? -EFAULT : 0;
> + __get_user(ts->tv_nsec, &cts->tv_nsec)) ? 0 : -EFAULT;
> }
This is not an equivalent transformation.
next prev parent reply other threads:[~2005-01-07 1:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-07 1:18 Jesper Juhl
2005-01-07 1:58 ` Andries Brouwer [this message]
2005-01-07 10:02 Peter Kjellerstedt
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=20050107015828.GA4396@pclin040.win.tue.nl \
--to=aebr@win.tue.nl \
--cc=akpm@osdl.org \
--cc=juhl-lkml@dif.dk \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®