Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Shiji Yang <yangshiji66@outlook.com>
To: jiaxun.yang@flygoat.com
Cc: arnd@arndb.de, bhe@redhat.com, fancer.lancer@gmail.com,
	gregkh@linuxfoundation.org, javierm@redhat.com,
	khalid@gonehiking.org, linux-kernel@vger.kernel.org,
	linux-mips@vger.kernel.org, namiltd@yahoo.com,
	tsbogend@alpha.franken.de, yangshiji66@outlook.com
Subject: Re: [PATCH V2] mips: kernel: fix detect_memory_region() function
Date: Sat, 29 Jun 2024 12:56:39 +0800	[thread overview]
Message-ID: <TYCP286MB08959A6EA0BCB900503BA18EBCD12@TYCP286MB0895.JPNP286.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <0ffe69cc-3a82-4d2c-86d8-5ab9b176ce4a@app.fastmail.com>

On Tue, 25 Jun 2024 02:58:54 +0100, Jiaxun 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.
>> 2. Use a fixed pattern instead of a random function pointer as the
>>    magic value.
>> 3. Flip magic value and double check it.
>> 4. Enable this feature only for 32-bit CPUs. Currently, only ath79 and
>>    ralink CPUs are using it. And 64-bit CPU doesn't have the KSEG1ADDR
>>    definition.
>
>Hi Shiji,
>
>Thanks for your patch.
>
>Please don't break 64bit system.
>Use CKSEG1ADDR_OR_64BIT instead.
>
>Thanks
>- Jiaxun

Thanks. I've updated and tested it in v2 patch.
https://lore.kernel.org/linux-mips/TYCP286MB0895F65439037ED134FEA7DDBCD12@TYCP286MB0895.JPNP286.PROD.OUTLOOK.COM/

Regards,
Shiji Yang

  reply	other threads:[~2024-06-29  4:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25  1:44 [PATCH V2] mips: kernel: fix detect_memory_region() function Shiji Yang
2024-06-25  1:58 ` Jiaxun Yang
2024-06-29  4:56   ` Shiji Yang [this message]
2024-06-25  7:46 ` Thomas Bogendoerfer
2024-06-25  7:52 ` Thomas Bogendoerfer
2024-06-29  5:19   ` Shiji Yang
2024-06-28 16:07 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=TYCP286MB08959A6EA0BCB900503BA18EBCD12@TYCP286MB0895.JPNP286.PROD.OUTLOOK.COM \
    --to=yangshiji66@outlook.com \
    --cc=arnd@arndb.de \
    --cc=bhe@redhat.com \
    --cc=fancer.lancer@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=javierm@redhat.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=khalid@gonehiking.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=namiltd@yahoo.com \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox