From: Qian Cai <cai@lca.pw>
To: Baoquan He <bhe@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
Linux MM <linux-mm@kvack.org>,
linux-nvdimm <linux-nvdimm@lists.01.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
kasan-dev@googlegroups.com, Dave Jiang <dave.jiang@intel.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: devm_memremap_pages() triggers a kasan_add_zero_shadow() warning
Date: Wed, 21 Aug 2019 21:52:01 -0400 [thread overview]
Message-ID: <90D5A1E0-24EC-4646-9275-373E43A17A66@lca.pw> (raw)
In-Reply-To: <20190822013100.GC2588@MiWiFi-R3L-srv>
> On Aug 21, 2019, at 9:31 PM, Baoquan He <bhe@redhat.com> wrote:
>
> On 08/21/19 at 05:12pm, Qian Cai wrote:
>>>> Does disabling CONFIG_RANDOMIZE_BASE help? Maybe that workaround has
>>>> regressed. Effectively we need to find what is causing the kernel to
>>>> sometimes be placed in the middle of a custom reserved memmap= range.
>>>
>>> Yes, disabling KASLR works good so far. Assuming the workaround, i.e.,
>>> f28442497b5c
>>> (“x86/boot: Fix KASLR and memmap= collision”) is correct.
>>>
>>> The only other commit that might regress it from my research so far is,
>>>
>>> d52e7d5a952c ("x86/KASLR: Parse all 'memmap=' boot option entries”)
>>>
>>
>> It turns out that the origin commit f28442497b5c (“x86/boot: Fix KASLR and
>> memmap= collision”) has a bug that is unable to handle "memmap=" in
>> CONFIG_CMDLINE instead of a parameter in bootloader because when it (as well as
>> the commit d52e7d5a952c) calls get_cmd_line_ptr() in order to run
>> mem_avoid_memmap(), "boot_params" has no knowledge of CONFIG_CMDLINE. Only later
>> in setup_arch(), the kernel will deal with parameters over there.
>
> Yes, we didn't consider CONFIG_CMDLINE during boot compressing stage. It
> should be a generic issue since other parameters from CONFIG_CMDLINE could
> be ignored too, not only KASLR handling. Would you like to cast a patch
> to fix it? Or I can fix it later, maybe next week.
I think you have more experience than me in this area, so if you have time to fix it, that
would be nice.
prev parent reply other threads:[~2019-08-22 1:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1565991345.8572.28.camel@lca.pw>
2019-08-16 21:48 ` Dan Williams
2019-08-17 3:34 ` Qian Cai
2019-08-17 3:57 ` Dan Williams
2019-08-17 11:12 ` Qian Cai
2019-08-17 16:59 ` Dan Williams
2019-08-18 3:25 ` Qian Cai
2019-08-21 21:12 ` Qian Cai
2019-08-22 1:31 ` Baoquan He
2019-08-22 1:52 ` Qian Cai [this message]
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=90D5A1E0-24EC-4646-9275-373E43A17A66@lca.pw \
--to=cai@lca.pw \
--cc=aryabinin@virtuozzo.com \
--cc=bhe@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
--cc=tglx@linutronix.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