Re: [PATCH] exec: allow > 2GB executables to run on 64-bit systems

From: Dave Anderson
Date: Wed Dec 05 2007 - 14:53:10 EST


Andi Kleen wrote:
Dave Anderson <anderson@xxxxxxxxxx> writes:


When a executable that is greater than 2GB in size is attempted on a 64-bit
system on a file system that calls, or uses generic_file_open() as its
open handler, it fails with an EOVERFLOW erro. This patch adds a call
to force_o_largefile() call in open_exec(), as done in sys_open() and
sys_openat().


Wouldn't it be better to just always pass O_LARGEFILE unconditionally
there? e.g. in theory a 2.5GB executable should work on i386 and binfmt_*
shouldn't have any problems with a large file.
That would simplify your patch.

-Andi


I agree in theory. We've only seen instances on 64-bitters...

Dave

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