Re: verify_area(...) possible problem.

Gilbert, Douglas (douglas.gilbert@rbcds.com)
Tue, 13 Apr 1999 11:21:10 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01BE85C1.43089BD4
Content-Type: text/plain;
charset="ISO-8859-1"

Linus Thorvalds wrote:

> ... you can do
>
> error = access_ok(VERIFY_READ, p, 3*sizeof(*p));
> if (!error) {
> __put_user(a, p);
> __put_user(b, p+1);
> __put_user(c, p+2);
> }
>
> where the __xxx versions are faster but "unsafe" unless you have
> verified the area by hand first.

Can this be extended to:

error = access_ok(VERIFY_READ, p, 3*sizeof(*p));
if (! error) {
interruptible_sleep_on(&some_wait_queue);
...
__put_user(a, p);
__put_user(b, p+1);
__put_user(c, p+2);
}
??

Doug Gilbert

------_=_NextPart_001_01BE85C1.43089BD4
Content-Type: text/html;
charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
Re: verify_area(...) possible problem.

Linus Thorvalds wrote:

> ... you can do
>
>        error = =3D access_ok(VERIFY_READ, p, 3*sizeof(*p));
>        if = (!error) {
>          = ;      __put_user(a, p);
>          = ;      __put_user(b, p+1);
>          = ;      __put_user(c, p+2);
>        = }
>
> where the __xxx versions are faster but = "unsafe" unless you have
> verified the area by hand first.

Can this be extended to:

        error =3D = access_ok(VERIFY_READ, p, 3*sizeof(*p));
        if (! = error) {
        =       interruptible_sleep_on(&some_wait_queue);
        =       ...
        =       __put_user(a, p);
        =       __put_user(b, = p+1);
        =       __put_user(c, = p+2);
        }
??

Doug Gilbert

------_=_NextPart_001_01BE85C1.43089BD4--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/