[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <52600D4A.8030506@linux.intel.com>
Date: Thu, 17 Oct 2013 09:16:10 -0700
From: Arjan van de Ven <arjan@...ux.intel.com>
To: Jan Beulich <JBeulich@...e.com>
CC: mingo@...e.hu, tglx@...utronix.de, linux@...ck-us.net,
linux-kernel@...r.kernel.org, hpa@...or.com
Subject: Re: [PATCH] x86: unify copy_from_user() checking
On 10/17/2013 9:08 AM, Jan Beulich wrote:
>>>> On 17.10.13 at 18:04, Arjan van de Ven <arjan@...ux.intel.com> wrote:
>>>
>>> ... and the non-constant case be taken care of at run time.
>>> That's precisely what the patch does.
>>
>> fair enough.
>>
>> I would like to see a comment above the code to describe this reasoning
>> and the objective and what the desired behavior is... so that we don't
>> have to reverse engineer this again 2 years from now ;-)
>
> Will do, and then perhaps mirror the whole behavior to
> copy_to_user().
yeah that certainly makes sense
in hindsight we should have made the copy_*_user prototype take a "type" argument,
so that the sizeof/etc are done inside the macro.
Or at least have this available as an option with a "advanced" version with just a size.
but that's a 20 year old thing at this point...
--
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