Re: possible virtual aliasing issues on parisc ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 2, 2012 at 4:08 AM, James Bottomley
<James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 2012-11-02 at 09:34 +0000, James Bottomley wrote:
>> > Looking at the arch/parisc/kernel/sys_parisc.c implementation of
>> > get_shared_area(), I do have a concern though. The function basically
>> > ignores the pgoff argument, so that if one creates a shared mapping of
>> > pages 0-N of a file, and then a separate shared mapping of pages 1-N
>> > of that same file, both will have the same cache offset for their
>> > starting address.
>> >
>> > This looks like this would create obvious aliasing issues. Am I
>> > misreading this ? I can't understand how this could work good enough
>> > to be undetected, so there must be something I'm missing here ???
>>
>> No, I think it does.
>>
>> I also think the pgoff != 0 case is rare, so it doesn't show very often.
>> To test this, I booted up with a printk for every pgoff != 0 and it
>> didn't trigger, so it's probably not seen in the ordinary course of
>> events.
>
> I got it to show: Git uses mmap2 with large page offsets.  However, it
> seems to use offsets with a granularity of 16MB which is 4x our aliasing
> congruency, so an equivalency problem still wouldn't show up.

All right. Thanks for looking it up - I just wasn't sure if my reading
of the code was correct (and, I am surprised this isn't more common :)

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux