lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:  <loom.20080923T042402-626@post.gmane.org>
Date:	Tue, 23 Sep 2008 04:25:08 +0000 (UTC)
From:	Halesh S <halesh.sadashiv@...sony.com>
To:	linux-kernel@...r.kernel.org
Subject:  Re: Regarding select() on PPC

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ