Bug in 2.1.127-pre7 in fs/binfmt_elf.c ?

Rainer Keller (Rainer.Keller@studbox.uni-stuttgart.de)
Tue, 10 Nov 1998 14:45:30 +0100


Hi, I sent this Mail some days ago, but it didnīt hit the list .... ?!

So I resent it just to make sure - Iīve seen reports on this in the
meantime...

Hello Yīall.

Iīm seeing very strange behaviour in 2.1.127-pre7 !

Sometimes, my load becomes suddenly very high, one time I may watch it
go up, the other I may not even see this, because eventually the system
becomes not very usable anymore. I may log out from Shells, but not
START new ones...

Trying to start new processes always ends up in nirvana - not strace
even strace, just the time spend in kernel mode goes way up !

Well, the first three times, it happened was, when playing mp3 - so
first I thought it ought to do with that. Then the last time, it
happened when opening a file.

Now, the thing is, I always got scared to loose data, so I sync discs
with sys-req and remount all drives ro with sys-req - thatīs why I
unfortunately canīt provide any task-list / dump of registers (which
probably would be very helpful.
The next time it happens, I will dump regs, though !

Now, I took a shy look at the changes, pre7 made, and something in
fs/binfmt_elf.c cought my eye (donīt know, whether itīs a real bugfix):
- error = do_mmap(file,
- ELF_PAGESTART(load_bias +
vaddr),
- (elf_ppnt->p_filesz +
-
ELF_PAGEOFFSET(elf_ppnt->p_vaddr)),
- elf_prot, elf_flags,
- (elf_ppnt->p_offset -
-
ELF_PAGEOFFSET(elf_ppnt->p_vaddr)));
-
- if (!load_addr_set) {
- load_addr_set = 1;
- load_addr = (elf_ppnt->p_vaddr -
- elf_ppnt->p_offset);
- if (elf_ex.e_type == ET_DYN) {
- load_bias = error -
ELF_PAGESTART(load_bias + vaddr);
- load_addr += error;
- }
+ error = do_mmap(file, ELF_PAGESTART(load_bias + vaddr),
+ (elf_ppnt->p_filesz +
+ ELF_PAGEOFFSET(elf_ppnt->p_vaddr)),
+ elf_prot, elf_flags, (elf_ppnt->p_offset
-
+ ELF_PAGEOFFSET(elf_ppnt->p_vaddr)));
+
+ if (!load_addr_set) {
+ load_addr_set = 1;
+ load_addr = (elf_ppnt->p_vaddr -
elf_ppnt->p_offset);
+ if (elf_ex.e_type == ET_DYN) {
+ load_bias += error -
+ ELF_PAGESTART(load_bias +
vaddr);
+ load_addr += error;

Now, You may notice the two lines, where load_bias is += :
- load_bias = error -
ELF_PAGESTART(load_bias + vaddr);
+ load_bias += error -
+ ELF_PAGESTART(load_bias +
vaddr);

Is this a fix to a bug or a bug in the fix ,-) ?!

BTW, it already was in pre3.

Thanks a lot,
Rainer

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/