Blaisorblade wrote:
On Thursday 28 July 2005 16:25, Jeff Dike wrote:
There's a rather nasty bug in elf_aux.c which was uncovered by the
#if/#ifdef patch in -mm2. We have the following:
#if ELF_CLASS == ELFCLASS32
typedef Elf32_auxv_t elf_auxv_t;
#else
typedef Elf64_auxv_t elf_auxv_t;
#endif
Unfortunately, ELFCLASS32 is never defined, so we end up with
Elf64_aux_v_t. The patch correctly added an include of <asm/elf.h> to
define it. However, with Elf32_auxv_t, never file systems don't boot.
Which ones? Also, /lib/tls is normally disabled, and the normal glibc is for
2.4 kernels, so how does that matter?
Yes, with /lib/tls enabled most things usually work anyway, but are you in
that config?
This is because UML then recognizes the presence of the vsyscall page
and sets __kernel_vsyscall, vsyscall_ehdr, and vsyscall_end
accordingly.
These seem to end up in UML process' ELF tables, which segfault
endlessly on the non-existant vsyscall page.
Why is it non-existant? The problem here is that, on 2.6 host kernels, a
process cannot avoid having that page mapped in his address space. So Bodo
decided that the better thing to do was to recognize this, allow processes to
use it and allow copy_from_user to read from there, since that is used to
check for possible syscalls. At least IIRC.
Yes, you are right.
But from a discussion on #uml I know, Jeff is using a Fedora, which seems to
have another mechanism for vsyscall implementation. The base address of
vsyscall is 0xa6b000 there. That is below TASK_SIZE, and user can unmap it!
So we have to check for that case in elf_aux.c. Such variant of vsyscall
should not be made visible to UML-user. Since it is unmapped by UML implicitly,
we simply should avoid to insert vsyscall info into auxv in this case.
Bodo
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user