Re: [PATCH 2/2] kexec: add a pmd huge entry condition during the page table

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

 



zhong jiang <zhongjiang@xxxxxxxxxx> writes:

> On 2016/7/12 23:46, Eric W. Biederman wrote:
>> zhongjiang <zhongjiang@xxxxxxxxxx> writes:
>>
>>> From: zhong jiang <zhongjiang@xxxxxxxxxx>
>>>
>>> when image is loaded into kernel, we need set up page table for it. and 
>>> all valid pfn also set up new mapping. it will tend to establish a pmd 
>>> page table in the form of a large page if pud_present is true. relocate_kernel 
>>> points to code segment can locate in the pmd huge entry in init_transtion_pgtable. 
>>> therefore, we need to take the situation into account.
>> I can see how in theory this might be necessary but when is a kernel virtual
>> address on x86_64 that is above 0x8000000000000000 in conflict with an
>> identity mapped physicall address that are all below 0x8000000000000000?
>>
>> If anything the code could be simplified to always assume those mappings
>> are unoccupied.
>>
>> Did you run into an actual failure somewhere?
>>
>> Eric
>>
>    I  do not understand what you trying to say,  Maybe I miss your point.
>   
>   The key is how to ensure that relocate_kernel points to the pmd
>   entry is not huge page.

Kernel virtual addresses are in the negative half of the address space.
Identity mapped physical addresses are in the positive half of the
address space.

As the entire negative half of the address space at the time that page
table entry is being created the are no huge pages present.

Even testing pmd_present is a redundant, and that is probably the bug.

Eric

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]