[lkml]   [2003]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectelf loader and differing inode mappings..

first off I'm running a stock 2.4.19 and have the RH8.0 glibc and
linker and toolchain..

I have modified my kernel to do some CRC'ing of text segments and it seems
to be working fine.. except when I load a program which hasn't been
stripped and I can't understand this..

I've locked all pages in memory by setting def_flags to VM_LOCKED in
fork.c, and I'm using the inode of the file (gotten from do_mmap_pgoff) to
give me the physical pages of where the file is actually mapped,
(i_mapping->clean_pages), and CRCing the pages mapped with
PROT_READ|PROT_EXEC. This was fine until I realised kernel loaded objects
(executable, dynamic linker) don't work quite so well with this due to
relocations and things.. so I then put some hooks in to load_elf_binary
and load_elf_interpreter along with some ELF header reading code to store
the start and end of the text segment within the inode,

This works for all cases except where the executable has not been
stripped, for some reason the clean_pages list changes between the kernel
loading the binary and my CRC thread coming along later and checking it ..
but *only* for unstripped binaries.. which as far as I can see should make
no difference whatsoever...

Any ideas?

David Airlie, Software Engineer /
pam_smb / Linux DecStation / Linux VAX / ILUG person

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.027 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site