[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B47C984.1080903@zytor.com>
Date: Fri, 08 Jan 2010 16:10:44 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Arnd Bergmann <arnd@...db.de>
CC: Arjan van de Ven <arjan@...radead.org>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Ingo Molnar <mingo@...e.hu>,
David Miller <davem@...emloft.net>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: strict copy_from_user checks issues?
On 01/08/2010 04:07 PM, Arnd Bergmann wrote:
>
> Also, the calling conventions require you to write slightly more when
> you want to pass down an error value, e.g.
>
> return copy_to_user(uptr, &data, sizeof(data)) ? -EFAULT : 0;
>
> instead of
>
> return put_user(data, uptr);
>
> The latter form requires a macro instead of a function for the user copy,
> but we now have that anyway because of the size check.
>
Well... we already have the latter form?
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists