[LITMUS^RT] RFC control page & test suite fixes

Christopher Kenna cjk at cs.unc.edu
Tue Oct 30 03:06:06 CET 2012


On Thu, Jun 28, 2012 at 8:56 AM, Björn Brandenburg <bbb at mpi-sws.org> wrote:
>
> On Jun 27, 2012, at 2:04 PM, Andrea Bastoni wrote:
>
>> On 06/27/2012 08:35 AM, Björn Brandenburg wrote:
>>>
>>> Good point, I wasn't sure about this. A quick search reveals that PAGE_SHARED is defined by most (all?) architectures, but that it is not used in architecture-indepdendent code (couldn't find it anywhere in include/, kernel/, mm/, net/, ipc/, or fs/). In contrast, __S011 is used in mm/mmap.c, so it has to be defined by all architectures. So I went with __S011.
>>
>> Yep. I checked a bit, and it seems that the idea of PAGE_SHARED (NX,r/w) is not
>> the same across different architectures. For example, on microblaze or motorola
>> m68k, even if you'd like to have a 011 page, you end up with an executable page...
>>

> Chris, Andrea, thanks a lot for looking through the patches. The proper way to handle __S011 is still not entirely clear to me, but I think what's implemented works for now. Let me know if you think another way would be better, otherwise I'll merge the branch next week.
>
> Thanks,
> Björn

To resurrect this thread: I just spent all day fixing a bug that came
up because __S011 is actually different than PAGE_SHARED. On the
ODROID-X, __S011 is 0x303, but PAGE_SHARED is 0x71f (comes from
read|write|share in the protection_map).

This suggests to me that Andrea is right, and that these protection
values are modified at runtime somewhere (it looks like
arch/arm/mm/mmu.c does this, at least). I believe that that using
__S011 is surely not the correct thing to do. I'm not sure if this is
the source of my other control-page issues yet.

Here's a full dump of the protection map and the __[SP][0,1]{3} macros
on my system:

prot_map[0] = 69f
prot_map[1] = 79f
prot_map[2] = 79f
prot_map[3] = 79f
prot_map[4] = 59f
prot_map[5] = 59f
prot_map[6] = 59f
prot_map[7] = 59f
prot_map[8] = 69f
prot_map[9] = 79f
prot_map[10] = 71f
prot_map[11] = 71f
prot_map[12] = 59f
prot_map[13] = 59f
prot_map[14] = 51f
prot_map[15] = 51f
__P000 = 283
__P001 = 383
__P010 = 383
__P011 = 383
__P100 = 183
__P101 = 183
__P110 = 183
__P111 = 183
__S000 = 283
__S001 = 383
__S010 = 303
__S011 = 303
__S100 = 183
__S101 = 183
__S110 = 103
__S111 = 103




More information about the litmus-dev mailing list