From: ebiederm+eric@ccr.net (Eric W. Biederman)
To: Matti Aarnio <matti.aarnio@sonera.fi>
Cc: linux-mm@kvack.org, linux-kernel@vger.rutgers.edu
Subject: RE: Large-File support of 32-bit Linux v0.01 available!
Date: 27 Dec 1998 00:49:38 -0600 [thread overview]
Message-ID: <m167ay5bb1.fsf@flinx.ccr.net> (raw)
Folks keep telling that
1) "we need large file support on intel Linux"
2) "it is too difficult to do efficiently, you must do
lots of rework in kernel"
3) "you will need new system calls, and new libraries"
and
4) nobody *doing* the thing
I started on it a while ago but I've be extremly short on free time.
The following is a patch you will need if you intend to make everything page
aligned in the page cache. It removes the need for old that old a.out binaries
have for unaligned mappings, leaving only the page alinged QMAGIC
a.out binaries still in a position to do code sharing. The rest
continue to work and just print anoying warnings. (Reminding me it's
time I upgrade some of my old slackware 2.2 software...)
I have some other logic mostly complete that keeps offset parameter in
the vm_area struct at 32 bits, and hopefully a greater chunck of the
page cache.
If I have the time I'll finish merging that with your start on the
system calls.
Eric
diff -uNrX linux-ignore-files linux-2.1.132.eb2/fs/binfmt_aout.c linux-2.1.132.eb3.make/fs/binfmt_aout.c
--- linux-2.1.132.eb2/fs/binfmt_aout.c Fri Dec 25 16:42:47 1998
+++ linux-2.1.132.eb3.make/fs/binfmt_aout.c Fri Dec 25 22:42:36 1998
@@ -409,7 +409,14 @@
return fd;
file = fcheck(fd);
- if (!file->f_op || !file->f_op->mmap) {
+ if ((fd_offset & ~PAGE_MASK) != 0) {
+ printk(KERN_WARNING
+ "fd_offset is not page aligned. Please convert program: %s\n",
+ file->f_dentry->d_name.name
+ );
+ }
+
+ if (!file->f_op || !file->f_op->mmap || ((fd_offset & ~PAGE_MASK) != 0)) {
sys_close(fd);
do_mmap(NULL, 0, ex.a_text+ex.a_data,
PROT_READ|PROT_WRITE|PROT_EXEC,
@@ -530,6 +537,24 @@
start_addr = ex.a_entry & 0xfffff000;
+ if ((N_TXTOFF(ex) & ~PAGE_MASK) != 0) {
+ printk(KERN_WARNING
+ "N_TXTOFF is not page aligned. Please convert library: %s\n",
+ file->f_dentry->d_name.name
+ );
+
+ do_mmap(NULL, start_addr & PAGE_MASK, ex.a_text + ex.a_data + ex.a_bss,
+ PROT_READ | PROT_WRITE | PROT_EXEC,
+ MAP_FIXED| MAP_PRIVATE, 0);
+
+ read_exec(file->f_dentry, N_TXTOFF(ex),
+ (char *)start_addr, ex.a_text + ex.a_data, 0);
+ flush_icache_range((unsigned long) start_addr,
+ (unsigned long) start_addr + ex.a_text + ex.a_data);
+
+ retval = 0;
+ goto out_putf;
+ }
/* Now use mmap to map the library into memory. */
error = do_mmap(file, start_addr, ex.a_text + ex.a_data,
PROT_READ | PROT_WRITE | PROT_EXEC,
diff -uNrX linux-ignore-files linux-2.1.132.eb2/mm/filemap.c linux-2.1.132.eb3.make/mm/filemap.c
--- linux-2.1.132.eb2/mm/filemap.c Fri Dec 25 16:48:50 1998
+++ linux-2.1.132.eb3.make/mm/filemap.c Fri Dec 25 23:04:10 1998
@@ -1350,7 +1350,7 @@
return -EINVAL;
} else {
ops = &file_private_mmap;
- if (vma->vm_offset & (inode->i_sb->s_blocksize - 1))
+ if (vma->vm_offset & (PAGE_SIZE - 1))
return -EINVAL;
}
if (!inode->i_sb || !S_ISREG(inode->i_mode))
--
This is a majordomo managed list. To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org
next reply other threads:[~1998-12-27 6:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-27 6:49 Eric W. Biederman [this message]
1998-12-27 22:04 ` Matti Aarnio
1998-12-28 1:01 ` Eric W. Biederman
1998-12-30 17:34 ` Eric W. Biederman
1998-12-30 16:29 ` Matti Aarnio
1998-12-30 20:04 ` Eric W. Biederman
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=m167ay5bb1.fsf@flinx.ccr.net \
--to=ebiederm+eric@ccr.net \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=matti.aarnio@sonera.fi \
/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