[net.micro.68k] Execute only and the 68000

gnu (05/10/83)

Relay-Version:version B 3/9/83; site harpo.UUCP
Message-ID:<266@sun.UUCP>
Date:Tue, 10-May-83 02:13:39 EDT

The problem with using "execute only" on the 68000 is not that the CPU
tries to fetch code with a "data" function code.  It's the other way
around -- if you use a PC-relative fetch, the CPU fetches data with an
"instruction" function code.  This means that execute-only code can be
read if the user can inject her own code and is clever enough.

This behaviour is unchanged on the 68010.  It's a tradeoff.  It allows
you to put constant data or arrays (eg, a case statement jump vector)
in "execute only" memory and fetch them with PC-relative instructions.
If your memory map separates I- and D-space, this can be a win, too.

All in all, it's not a big problem.  If you had a system with a
misdesigned memory map (that knew the difference between read &
execute, say, but not kernel versus user) it could cause minor
trouble.  (Considering the number of losing map schemes for the 68000,
including Motorola's, anything is possible.)