From: Andi Kleen <andi@firstfloor.org>
To: Dave Anderson <anderson@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>, linux-kernel@vger.kernel.org
Subject: [NEW-PATCH] exec: allow > 2GB executables to run on 64-bit systems
Date: Thu, 6 Dec 2007 23:15:20 +0100 [thread overview]
Message-ID: <20071206221520.GG20595@one.firstfloor.org> (raw)
In-Reply-To: <47570B0A.6040404@redhat.com>
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.
----
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@suse.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) {
next prev parent reply other threads:[~2007-12-06 22:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Andi Kleen [this message]
2007-12-06 22:37 ` [NEW-PATCH] " Dave Anderson
2007-12-06 22:40 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071206221520.GG20595@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=anderson@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox