Re: [PATCH 2/2] Fix "kmem -s|-S" not working properly when CONFIG_SLAB_FREELIST_HARDENED is enabled

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

 



On Thu, Aug 17, 2023 at 8:29 AM HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab@xxxxxxx> wrote:
On 2023/08/14 10:54, Lianbo Jiang wrote:
> Currently, crash-utility still depends on detecting the kernel version,
> or the asm instruction 'bswap' on X86 64/X86 architectures to decide how
> to deal with the freelist ptr obfuscation, when kernel option
> CONFIG_SLAB_FREELIST_HARDENED is enabled.
>
> As you known, the bit diffusion for freelist ptr obfuscation has
> experienced the changes several times on the kernel side, For most
> distributions, usually they might backport these kernel patches from
> upstream, especially for the old kernel, the 'kmem -s|-S' will fail with
> an error "invalid freepointer", which can be observed on ppc64le and
> S390x architectures, etc. That is really not friendly.
>
> Given that, let's fix the above issues this time, and it won't rely
> on the linux version number or asm instruction 'bswap' to decide how to
> dereference the freelist ptr.
>
> Reported-by: Lucas Oakley <soakley@xxxxxxxxxx>
> Signed-off-by: Lianbo Jiang <lijiang@xxxxxxxxxx>

Thank you for the fix.

Maybe we don't have to revert that patch and can use both of the bswap
way and this way, but seems no big benefit with it, so agree to revert it.


You are right, Kazu. That is also why I would like to revert the patch first.

Also thank you for helping with the test, Rafael and Lucas.

Thanks.
Lianbo
--
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