Re: [PATCH] ARM: uaccess: Implement strict user copy checks

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stephen Boyd
Date: Tuesday, August 10, 2010 - 5:27 pm

On 08/10/2010 03:55 PM, Russell King - ARM Linux wrote:

Ok. I'll add more info and resend. Do you mind testing ;-)


So far I've tested it with gcc-4.4.0 and 4.3.1


With older compilers (pre 4.4) __compiletime_object_size() will be 
replaced with -1 causing this code to be optimized away. Also, 
__compiletime_warning() and __compiletime_error() aren't defined to be 
anything except in include/linux/compiler-gcc4.h so users of older 
compilers shouldn't see any warnings or errors regardless of the config 
option being enabled.

People will start seeing warnings if they use gcc 4.4 or later though.
It's debatable whether or not to have both the warning and the error 
when you consider -Werror. I went this way since x86 and parisc opted 
for warnings and errors. Furthermore, I don't see any warnings or errors 
with this patch in my builds.

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] ARM: uaccess: Implement strict user copy checks, Russell King - ARM Linux, (Tue Aug 10, 3:55 pm)
Re: [PATCH] ARM: uaccess: Implement strict user copy checks, Stephen Boyd, (Tue Aug 10, 5:27 pm)