lkml.org 
[lkml]   [2002]   [Apr]   [11]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 11 Apr 2002 07:01:25 -0400
FromBrian Gerst <>
SubjectRe: put_user_byte()
blesson paul wrote:
> Hi all
>                I need to copy some data from kernel memory space to user 
> memory space. When I investigated, the command for that purpose is 
> put_user_byte(). But in kernel2.4, I can't find the implementation of 
> this command. I want to know the command which replaced put_user_byte() 
> in 2.4 kernel. Also I want to know whether there is any synonyms for 
> verify_area() in kernel 2.4
> regards
> Blesson Paul

Use put_user(val, uaddr).  val must be of type unsigned char (or casted 
to it).  It will return 0 on success or -EFAULT on fault.  verify_area() 
is normally not needed in 2.4, unless you are copying many values to 
user space and only want to do the priviledge check once on the whole range.

-- 

						Brian Gerst

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:25    [from the cache]
©2003-2008