a.out non demand page fix

Jes Sorensen (Jes.Sorensen@cern.ch)
Wed, 2 Sep 1998 13:40:29 GMT


Hi

I have an old patch pending for making non demand page executables
work properly on architectures which are not cache coherent.

Its for old code and probably a not very used file format these days,
but it is actually a bugfix ;-)

Jes

diff -urN -X /home/jes/exclude-linux /var/tmp/native-2.1.119/fs/binfmt_aout.c linux/fs/binfmt_aout.c
--- /var/tmp/native-2.1.119/fs/binfmt_aout.c Thu Aug 20 22:13:00 1998
+++ linux/fs/binfmt_aout.c Sun Aug 30 18:34:58 1998
@@ -397,6 +397,8 @@
MAP_FIXED|MAP_PRIVATE, 0);
read_exec(bprm->dentry, 32, (char *) 0, ex.a_text+ex.a_data, 0);
#endif
+ flush_icache_range((unsigned long) 0,
+ (unsigned long) ex.a_text+ex.a_data);
} else {
if ((ex.a_text & 0xfff || ex.a_data & 0xfff) &&
(N_MAGIC(ex) != NMAGIC))
@@ -414,6 +416,9 @@
MAP_FIXED|MAP_PRIVATE, 0);
read_exec(bprm->dentry, fd_offset,
(char *) N_TXTADDR(ex), ex.a_text+ex.a_data, 0);
+ flush_icache_range((unsigned long) N_TXTADDR(ex),
+ (unsigned long) N_TXTADDR(ex) +
+ ex.a_text+ex.a_data);
goto beyond_if;
}

-
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.altern.org/andrebalsa/doc/lkml-faq.html