lkml.org 
[lkml]   [1998]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: copy_from_user() fix
Hello,

> > SIGSEGV is an appropriate response.
>
> But so is EFAULT. And EFAULT has legitimate advantages.

To be honest, I see more legitimate advantages in SIGSEGV than in EFAULT.
The only advantage of EFAULT is easy checking by callers which is IMHO used
rarely. On the other hand, if you use SIGSEGV, you can get the faulting address
and you get all accesses to invalid addresses trapped, making such (potentially
dangerous, especially in security sensitive apps) cases easy to spot.

Have a nice fortnight
--
Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"System going down at 1:45 for disk crashing."

-
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.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.579 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site