Mistake in IBM’s developerWorks
Posted on April 3rd, 2008 at 22:47 by fr3@K

Some months ago, I came across a mistake in Kernel command using Linux system calls, published by IBM’s developerWorks.

In the article, a listing of prototypes of two memory copy functions were as shown below:

unsigned long copy_from_user (
    void *to,
    const void __user *from, unsigned long n );
unsigned long copy_to_user (
    void *to,
    const void __user *from, unsigned long n );

The __user annotation, in the second function declaration (copy_to_user), should’ve been preceded by the first argument (to), but not by the second argument (from). Like this:

unsigned long copy_to_user(
    void __user * to,
    const void * from, unsigned long n);

I had submitted a comment regarding the mistake months ago. However, it remains uncorrected at the time of posting.

del.icio.us:Mistake in IBM's developerWorks digg:Mistake in IBM's developerWorks spurl:Mistake in IBM's developerWorks newsvine:Mistake in IBM's developerWorks furl:Mistake in IBM's developerWorks Y!:Mistake in IBM's developerWorks 黑米共享書籤:Mistake in IBM's developerWorks 推推王:Mistake in IBM's developerWorks
Previous Post
« 懷舊: WRC 2001 Teaser «
Next Post
» Knock Knock, You’ve Been Hacked! »

Zero Comments »

No comments yet.

Comments RSS TrackBack URI

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>