linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] exec: allow > 2GB executables to run on 64-bit systems
@ 2007-12-05 15:36 Dave Anderson
  2007-12-05 19:41 ` Andi Kleen
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Anderson @ 2007-12-05 15:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: anderson

[-- Attachment #1: Type: text/plain, Size: 342 bytes --]

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().

Signed-off-by: anderson@redhat.com
---

[-- Attachment #2: LKML_open_exec.patch --]
[-- Type: text/plain, Size: 437 bytes --]

--- linux-2.6.24-rc3/fs/exec.c.orig
+++ linux-2.6.24-rc3/fs/exec.c
@@ -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, force_o_largefile() ?
+					O_RDONLY|O_LARGEFILE : O_RDONLY);
 				if (!IS_ERR(file)) {
 					err = deny_write_access(file);
 					if (err) {

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-12-06 22:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-05 15:36 [PATCH] exec: allow > 2GB executables to run on 64-bit systems Dave Anderson
2007-12-05 19:41 ` Andi Kleen
2007-12-05 19:58   ` Dave Anderson
2007-12-05 19:56     ` Andi Kleen
2007-12-05 20:33       ` Dave Anderson
2007-12-06 22:15         ` [NEW-PATCH] " Andi Kleen
2007-12-06 22:37           ` Dave Anderson
2007-12-06 22:40             ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).