Re: [PATCH V2] mips: kernel: fix detect_memory_region() function
From: Thomas Bogendoerfer
Date: Tue Jun 25 2024 - 03:53:01 EST
On Tue, Jun 25, 2024 at 09:44:44AM +0800, Shiji Yang wrote:
> The detect_memory_region() has been broken on 6.6 kernel[1]. This
> patch fixes it by:
> 1. Do not use memcmp() on unallocated memory, as the new introduced
> fortify dynamic object size check[2] will return unexpected result.
hmm, so there should a new way for doing memory probing without
triggering this fortify check. How do other platforms deal with this ?
> 2. Use a fixed pattern instead of a random function pointer as the
> magic value.
why is this better ?
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]