lkml.org 
[lkml]   [2007]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] exec: allow > 2GB executables to run on 64-bit systems
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
---
--- 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) {
\
 
 \ /
  Last update: 2007-12-05 16:35    [W:0.198 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site