Regarding select() on PPC

Sadashiiv, Halesh halesh.sadashiv at
Tue Sep 23 01:15:52 EST 2008

The issue is found only in PPC32.

Please let me if the patch is applicable.

+++ arch/powerpc/kernel/syscalls.c      2008-09-22 20:47:23.885126056
@@ -211,6 +211,9 @@
 ppc_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set
__user *exp, struct timeval __user *tvp)
+   if ( n < 0 )
+       return -EINVAL;
    if ( (unsigned long)n >= 4096 )
        unsigned long __user *buffer = (unsigned long __user *)n;


>-----Original Message-----
>From: Josh Boyer [mailto:jwboyer at]
>Sent: Friday, September 19, 2008 7:49 PM
>To: Sadashiiv, Halesh
>Cc: linuxppc-embedded at
>Subject: Re: Regarding select() on PPC
>On Fri, Sep 19, 2008 at 07:00:07PM +0530, Sadashiiv, Halesh wrote:
>>>For negetive value of n (first argument to select) select fails with
>>>But for the same when I tested for PowerPC it was giving EFAULT,
>>>Its on 2.6.16 kernel.
>2.6.16 is really old.  I tested your testcase on a 2.6.25 based kernel
>a ppc64 machine and it seemed to work fine.

This email is confidential and intended only for the use of the individual or entity named above and may contain information that is privileged. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this email is strictly prohibited. If you have received this email in error, please notify us immediately by return email or telephone and destroy the original message. - This mail is sent via Sony Asia Pacific Mail Gateway.

More information about the Linuxppc-embedded mailing list