2004-06-16 17:53:30

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH] aacraid 32/64 ioctl support (update)

> > Although the compat_alloc_user_space implementations I looked at don't fail I
> > think a check for NULL wouldn't hurt.
>
> The places that I looked where they check the return value use
> access_ok(). What do you think?


> > > + f = compat_alloc_user_space(sizeof(*f));
>
> I just noticed this. Can we use memset on a user pointer? If not, what
> would be the best way to handle this?


Good question. Maybe the architecture-folks know an answer?


2004-06-16 18:02:04

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] aacraid 32/64 ioctl support (update)

On Wed, 16 Jun 2004 18:53:25 +0100
Christoph Hellwig <[email protected]> wrote:

> > I just noticed this. Can we use memset on a user pointer? If not, what
> > would be the best way to handle this?
>
>
> Good question. Maybe the architecture-folks know an answer?

Use clear_user()