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

From: David Mosberger
Date: Thu Apr 15 2004 - 13:00:04 EST


>>>>> On Thu, 15 Apr 2004 16:26:00 +0100, Jamie Lokier <jamie@xxxxxxxxxxxxx> said:

>> 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

Jamie> The stack is mapped executable, and the data segment is mapped
Jamie> non-executable, according to /proc/self/maps which reflects the
Jamie> PROT_EXEC request. But in fact because of hardware limitations,
Jamie> despite the "rw-p" my data segment is actually executable.

Yes, but Alpha doesn't have this limitation.

Jamie> If you map a segment without PROT_EXEC on Alpha, using a kernel newer
Jamie> than 1.1.84, you'll get a non-executable mapping.

Sure.

Jamie> That's what I mean when I say the Alpha maps data without
Jamie> executable permission. The ELF loader appears to ask for
Jamie> exec permission anyway, which is another thing entirely.

It's not the ELF loader, it's the kernel. See VM_DATA_DEFAULT_FLAGS
in asm-alpha/page.h.

--david
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/