Commit 6eef8162 authored by Arun Sharma's avatar Arun Sharma Committed by David Mosberger

[PATCH] ia64: make x86 shared programs work again

> It looks like dynamic x86 binaries have a problem once again (or
> still).  If I try to run any shared x86 binaries, I get:
> 
>       $ ls.x86
>       ls.x86: error while loading shared libraries: librt.so.1: cannot map zero-fill pages: Error 14
> 
> Would someone take a look?

We saw this behavior with 2.5.59 also. The attached work around should
take care of the problem temporarily. Last time this happened, IA-32
programs were doing mmaps, whose size was one page bigger than the
size of the underlying file (even after rounding up the file size).

I never got a chance to figure out why glibc was doing mmaps with the
wrong size. Also, I failed to reproduce the problem with a more
recent (RH 8.0) glibc.

Which version of IA-32 glibc were you using ?
parent ee333a0d
...@@ -243,8 +243,7 @@ mmap_subpage (struct file *file, unsigned long start, unsigned long end, int pro ...@@ -243,8 +243,7 @@ mmap_subpage (struct file *file, unsigned long start, unsigned long end, int pro
return -ENOMEM; return -ENOMEM;
if (old_prot) if (old_prot)
if (copy_from_user(page, (void *) PAGE_START(start), PAGE_SIZE)) copy_from_user(page, (void *) PAGE_START(start), PAGE_SIZE);
return -EFAULT;
down_write(&current->mm->mmap_sem); down_write(&current->mm->mmap_sem);
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment