Re: [PATCH] (IA64) Fix ugly __[PS]* macros in <asm-ia64/pgtable.h>

David Mosberger
2004-04-14T23:13:20Z

>>>>> On Wed, 14 Apr 2004 22:05:38 +0100, Jamie Lokier <jamie@shareable.org> said:

Jamie> David Mosberger wrote:

>> No, Alpha Linux didn't map data without execute permission.

Jamie> That was true from Linux 1.1.67 (when Alpha was introduced)
Jamie> to 1.1.84 (when __[PS]* was introduced). I'm not sure the
Jamie> Alpha target even worked during those versions. Since Linux
Jamie> 1.1.84, it has mapped pages on the Alpha without execute
Jamie> permission: the _PAGE_FOE (fault on exec) bit is set for
Jamie> mappings which don't have PROT_EXEC.

$ uname -a
Linux hostname 2.2.20 #2 Wed Mar 20 19:57:28 EST 2002 alpha GNU/Linux
$ cat /proc/self/maps | grep cat
0000000120000000-0000000120006000 r-xp 0000000000000000 08:01 309740 /bin/cat
0000000120014000-0000000120016000 rwxp 0000000000004000 08:01 309740 /bin/cat

As you can see, the data-segment is mapped with EXEC bit turned on.
Ditto for the stack segment, which I think is this one:

000000011fffe000-0000000120000000 rwxp 0000000000000000 00:00 0

--david