Re: [PATCH] Fix kernel version macros for revision numbers over 255

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

 



On 2023/05/11 3:02, Luiz Capitulino wrote:
> 
> 
> On 2023-05-10 03:09, HAGIO KAZUHITO(萩尾 一仁) wrote:
>> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
>>
>>
>>
>> From: Kazuhito Hagio <k-hagio-ab@xxxxxxx>
>>
>> The current comparison macros for kernel version shift minor number only
>> 8 bits.  This can cause an unexpected result on kernels with revision
>> number over 255, e.g. Linux 4.14.314.
>>
>> In fact, on Linux 4.14.314 for x86_64 without CONFIG_RANDOMIZE_BASE=y
>> (KASLR), the following condition became false in x86_64_init().
>>
>>      ((THIS_KERNEL_VERSION >= LINUX(4,14,84)) &&
>>       (THIS_KERNEL_VERSION < LINUX(4,15,0)))
>>
>> As a result, crash used a wrong hard-coded value for PAGE_OFFSET and
>> failed to start a session with the following seek error.
>>
>>    crash: seek error: physical address: 200e000  type: "pud page"
>>
>> Shift the major and minor number by 24 and 16 bits respectively to fix
>> this issue.
> 
> This fixes the issue for me. The only detail is that I couldn't apply
> this patch to latest crash HEAD 2505a65ff5471 so I applied it manually.

oh, what happened.  at my end, the email could be applied cleanly.

> 
> Thank you very much, Kazu!
> 
> Tested-by: Luiz Capitulino <luizcap@xxxxxxxxxx>

Anyway, thank you for the report and test!

Kazu
--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility
Contribution Guidelines: https://github.com/crash-utility/crash/wiki




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux