Re: cvs commit: src/sys/vm vm_unix.c (fwd)

Date view Thread view Subject view Author view

From: Godmar Back (gback@cs.utah.edu)
Date: Sun Feb 07 1999 - 22:29:21 EST


 Matt, Archie,

let me add another comment:
>
> If Kaffe is using malloc() and it reallocates the space later or modifies
> the space later after having executed something in it, Kaffe is broken.
>
> It sounds to me like Kaffe needs to be fixed. Maybe they developed Kaffe
> on an IA32 platform where execute perms don't matter? Even so, it would
> be total luck if they were actually rewriting a data space in which they
> had previous executed something for the L1 cache to not get corrupted.
>

Are you referring to the need to flush the data cache after writing out
instructions so that you don't read stale code from your instruction cache
in a Harvard architecture?

This is indeed a problem Kaffe addresses on architectures that require it,
such as the Sparc or StrongARM, but it's not a problem on the x86, whose
instruction fetch mechanism is designed to snoop on the datapath somehow.
(Don't ask me how, I only remember that it does and that it is ridiculed
by RISC designers as one of the legacy problems that the x86 architecture
has to deal with because of the big amount of self-modifying code out there.)

Do I misunderstand what this discussion is about?

        - Godmar


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:58:00 EDT