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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 06 Dec 2007 17:37:09 -0500
From:	Dave Anderson <anderson@...hat.com>
To:	Andi Kleen <andi@...stfloor.org>
CC:	linux-kernel@...r.kernel.org, anderson@...hat.com
Subject: Re: [NEW-PATCH] exec: allow > 2GB executables to run on 64-bit systems

Andi Kleen wrote:
> Since Dave didn't post an updated patch. This is how I think what
> the patch should be. I also changed sys_uselib just to be complete.
> 

Thanks Andi -- I just tested open_exec() w/O_LARGEFILE on an
i386 with a 2.5GB+ binary (mostly debuginfo), and it works as
expected.  Interesting to note that the test binary couldn't
be compiled with i386 gcc, but it could be built with x86_64
gcc -m32.

Dave


> ----
> 
> 
> Always use O_LARGEFILE for opening executables
> 
> This allows to use executables >2GB.
> 
> Based on a patch by Dave Anderson
> 
> Signed-off-by: Andi Kleen <ak@...e.de>
> 
> Index: linux-2.6.24-rc3/fs/exec.c
> ===================================================================
> --- linux-2.6.24-rc3.orig/fs/exec.c
> +++ linux-2.6.24-rc3/fs/exec.c
> @@ -119,7 +119,7 @@ asmlinkage long sys_uselib(const char __
>  	if (error)
>  		goto exit;
>  
> -	file = nameidata_to_filp(&nd, O_RDONLY);
> +	file = nameidata_to_filp(&nd, O_RDONLY|O_LARGEFILE);
>  	error = PTR_ERR(file);
>  	if (IS_ERR(file))
>  		goto out;
> @@ -658,7 +658,8 @@ struct file *open_exec(const char *name)
>  			int err = vfs_permission(&nd, MAY_EXEC);
>  			file = ERR_PTR(err);
>  			if (!err) {
> -				file = nameidata_to_filp(&nd, O_RDONLY);
> +				file = nameidata_to_filp(&nd,
> +							O_RDONLY|O_LARGEFILE);
>  				if (!IS_ERR(file)) {
>  					err = deny_write_access(file);
>  					if (err) {


--
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