All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] add likely around access_ok for uaccess
Date: Sun, 14 Sep 2003 21:45:30 +0200	[thread overview]
Message-ID: <3F64C55A.10306@colorfullife.com> (raw)
In-Reply-To: <20030914123024.4a261cd3.akpm@osdl.org>

Andrew Morton wrote:

>+#define access_ok(type,addr,size) (likely(__range_ok(addr,size) == 0))
>  
>
I don't know. What happens if access_ok is used outside of an if statement?
One example is

int get_compat_timespec(struct timespec *ts, struct compat_timespec *cts)
{
        return (verify_area(VERIFY_READ, cts, sizeof(*cts)) ||
                        __get_user(ts->tv_sec, &cts->tv_sec) ||
                        __get_user(ts->tv_nsec, &cts->tv_nsec)) ? -EFAULT : 0;
}

And fs/reiserfs/file.c already contains an unlikely marker around access_ok.

Have you tried if the kernel still compiles with your patch?

--
	Manfred 




  reply	other threads:[~2003-09-14 19:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-14 11:17 [PATCH] add likely around access_ok for uaccess Manfred Spraul
2003-09-14 19:30 ` Andrew Morton
2003-09-14 19:45   ` Manfred Spraul [this message]
2003-09-14 19:48     ` Manfred Spraul
2003-09-14 20:00     ` Andrew Morton
2003-09-15 22:59 ` David S. Miller
2003-09-16 19:49 ` Pavel Machek
2003-09-16 20:55   ` Jeff Garzik
2003-09-16 20:59     ` Pavel Machek
2003-09-17 16:57       ` Manfred Spraul
     [not found] <vD5l.6Wt.19@gated-at.bofh.it>
2003-09-14 16:49 ` Andi Kleen

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=3F64C55A.10306@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=akpm@osdl.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.