Re: [3.9-rc1 x86] Bug in ioremap code?

From: Dave Hansen
Date: Wed Mar 06 2013 - 18:19:58 EST


On 03/06/2013 10:15 AM, Dave Hansen wrote:
> Does anybody know what this business is in __cpa_process_fault()?
>
>> /*
>> * Ignore the NULL PTE for kernel identity mapping, as it is expected
>> * to have holes.
>> * Also set numpages to '1' indicating that we processed cpa req for
>> * one virtual address page and its pfn. TBD: numpages can be set based
>> * on the initial value and the level returned by lookup_address().
>> */
>
> If this is expecting the identity mapping to have holes, then the
> BUG_ON() is wrong. But how would it _get_ holes?

The holes in question were part of the PCI space. The ioremap code was
trying to keep the kernel identity map in sync with the mappings that it
had made. But, in the process, it called __pa() on a virtual address
that was part of one of those holes. I'm not _quite_ sure what the
fallout is from trying to sync a nonexistent map, but it surely wasn't
an intended or good thing to be doing.

A patch to fix it should be on the way. Tetsuo, can you apply it and
see if it helps you?

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