From: Halesh S <halesh.sadashiv@ap.sony.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Regarding select() on PPC
Date: Tue, 23 Sep 2008 04:25:08 +0000 (UTC) [thread overview]
Message-ID: <loom.20080923T042402-626@post.gmane.org> (raw)
In-Reply-To: loom.20080922T154432-962@post.gmane.org
Halesh S <halesh.sadashiv <at> ap.sony.com> writes:
>
> Andreas Schwab <schwab <at> suse.de> writes:
>
> >
> > Halesh S <halesh.sadashiv <at> ap.sony.com> writes:
> >
> > > What is the purpose of Argument check only for PPC32, is ther any
specific
> > > reason?
> >
> > Probably long obsolete, it predates linux 2.2.0.
>
> Than do you mean by this is not required in later versions.
>
> >
> > Andreas.
> >
>
> Thanks,
> Halesh
>
>
Halesh S <halesh.sadashiv <at> ap.sony.com> writes:
>
> Andreas Schwab <schwab <at> suse.de> writes:
>
> >
> > Halesh S <halesh.sadashiv <at> ap.sony.com> writes:
> >
> > > What is the purpose of Argument check only for PPC32, is ther any
specific
> > > reason?
> >
> > Probably long obsolete, it predates linux 2.2.0.
>
> Than do you mean by this is not required in later versions.
>
> >
> > Andreas.
> >
>
> Thanks,
> Halesh
>
>
Please check this patch be applied for latest linux kernel??
--- arch/powerpc/kernel.old/syscalls.c 2008-09-22 20:47:06.000000000 +0530
+++ arch/powerpc/kernel/syscalls.c 2008-09-23 09:38:31.841327576 +0530
@@ -203,25 +203,13 @@
#ifdef CONFIG_PPC32
/*
- * Due to some executables calling the wrong select we sometimes
- * get wrong args. This determines how the args are being passed
- * (a single ptr to them all args passed) then calls
- * sys_select() with the appropriate args. -- Cort
+ * The argument checking is long obselete, the code was carried from
+ * kernel version 2.2.0, so removing obselete code and directly call
+ * to sys_select()
*/
int
ppc_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user
*exp, struct timeval __user *tvp)
{
- if ( (unsigned long)n >= 4096 )
- {
- unsigned long __user *buffer = (unsigned long __user *)n;
- if (!access_ok(VERIFY_READ, buffer, 5*sizeof(unsigned long))
- || __get_user(n, buffer)
- || __get_user(inp, ((fd_set __user * __user *)(buffer+1)))
- || __get_user(outp, ((fd_set __user * __user *)(buffer+2)))
- || __get_user(exp, ((fd_set __user * __user *)(buffer+3)))
- || __get_user(tvp, ((struct timeval __user * __user *)
(buffer+4))))
- return -EFAULT;
- }
return sys_select(n, inp, outp, exp, tvp);
}
#endif
Tested on PPC32. Works fine with provided testcase.
Thanks,
Halesh
next prev parent reply other threads:[~2008-09-23 4:25 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-19 14:04 Regarding select() on PPC Halesh S
2008-09-22 14:47 ` Halesh S
2008-09-22 15:36 ` Andreas Schwab
2008-09-22 15:45 ` Halesh S
2008-09-23 4:25 ` Halesh S [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-23 9:31 Sadashiiv, Halesh
2008-09-23 7:16 Sadashiiv, Halesh
2008-09-23 9:07 ` Benjamin Herrenschmidt
2008-09-24 6:23 ` Arnd Bergmann
2008-09-24 6:28 ` Benjamin Herrenschmidt
2008-09-24 6:45 ` Arnd Bergmann
2008-09-24 7:08 ` Benjamin Herrenschmidt
2008-09-24 21:46 ` Benjamin Herrenschmidt
2008-09-23 5:27 Sadashiiv, Halesh
2008-09-23 5:01 Sadashiiv, Halesh
2008-09-23 5:11 ` Benjamin Herrenschmidt
2008-09-23 5:46 ` Arnd Bergmann
2008-09-23 5:56 ` Benjamin Herrenschmidt
2008-09-23 6:01 ` Arnd Bergmann
2008-09-23 6:29 ` Benjamin Herrenschmidt
2008-09-23 4:50 Sadashiiv, Halesh
2008-09-23 4:55 ` Benjamin Herrenschmidt
2008-09-22 15:30 Sadashiiv, Halesh
2008-09-22 15:15 Sadashiiv, Halesh
2008-09-22 15:24 ` Josh Boyer
2008-09-23 4:42 ` Benjamin Herrenschmidt
2008-09-19 14:28 Sadashiiv, Halesh
2008-09-19 13:30 Sadashiiv, Halesh
2008-09-19 14:19 ` Josh Boyer
2008-09-19 11:50 Sadashiiv, Halesh
2008-09-19 14:53 ` Dale Farnsworth
2008-09-19 16:53 ` Dale Farnsworth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20080923T042402-626@post.gmane.org \
--to=halesh.sadashiv@ap.sony.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.