RE: Regarding select() on PPC
From: Sadashiiv, Halesh <hidden>
Date: 2008-09-22 15:16:14
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
+0530@@ -211,6 +211,9 @@ int 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 >=3D 4096 )
{
unsigned long __user *buffer =3D (unsigned long __user *)n;
Thanks,
Halesh
-----Original Message----- From: Josh Boyer [mailto:<redacted>] Sent: Friday, September 19, 2008 7:49 PM To: Sadashiiv, Halesh Cc: <redacted> Subject: Re: Regarding select() on PPC On Fri, Sep 19, 2008 at 07:00:07PM +0530, Sadashiiv, Halesh wrote:quoted
quoted
For negetive value of n (first argument to select) select fails withEINVALquoted
error, 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
on
a ppc64 machine and it seemed to work fine. josh
------------------------------------------------------------------- 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. -------------------------------------------------------------------