From: Aurelien Jarno <aurelien@aurel32.net>
To: Guo Ren <guoren@kernel.org>
Cc: Palmer Dabbelt <palmerdabbelt@google.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Anup Patel <anup@brainfault.org>,
Greentime Hu <greentime.hu@sifive.com>,
Zong Li <zong.li@sifive.com>, Albert Ou <aou@eecs.berkeley.edu>,
Thomas Gleixner <tglx@linutronix.de>,
Tycho Andersen <tycho@tycho.ws>, Nick Hu <nickhu@andestech.com>,
linux-riscv <linux-riscv@lists.infradead.org>,
Guo Ren <guoren@linux.alibaba.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-csky@vger.kernel.org
Subject: Re: [PATCH V2 1/3] riscv: Fixup static_obj() fail
Date: Mon, 14 Sep 2020 12:38:36 +0200 [thread overview]
Message-ID: <20200914103836.GB2705@aurel32.net> (raw)
In-Reply-To: <CAJF2gTQiLV8sDE5cnvP=aBog4zaiMvMeieg_JtXwRODky1u3Hg@mail.gmail.com>
On 2020-09-12 10:39, Guo Ren wrote:
> It's come from mm/usercopy.c
> /* Is this address range in the kernel text area? */
> static inline void check_kernel_text_object(const unsigned long ptr,
> unsigned long n, bool to_user)
> {
> unsigned long textlow = (unsigned long)_stext;
> unsigned long texthigh = (unsigned long)_etext;
> unsigned long textlow_linear, texthigh_linear;
>
> if (overlaps(ptr, n, textlow, texthigh))
> usercopy_abort("kernel text", NULL, to_user, ptr - textlow, n);
>
> The __init_text/data areas will be freed after bootup, so I think it should be:
> - unsigned long textlow = (unsigned long)_stext;
> + unsigned long textlow = (unsigned long)_text;
>
> That means _stext should include init_text/data and _text is only for freeable.
I have no idea if it is the right thing to do or not, but I can confirm
this fixes the issue.
How should we proceed to get that fixed in time for 5.9? For the older
branches where it has been backported (so far 5.7 and 5.8), should we
just get that commit reverted instead?
Thanks,
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2020-09-14 10:40 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-27 13:57 [PATCH V2 0/3] riscv: Enable LOCKDEP guoren
2020-06-27 13:57 ` [PATCH V2 1/3] riscv: Fixup static_obj() fail guoren
2020-09-11 20:45 ` Aurelien Jarno
2020-09-12 2:39 ` Guo Ren
2020-09-14 10:38 ` Aurelien Jarno [this message]
2020-09-24 7:36 ` Andreas Schwab
2020-09-24 16:19 ` Guo Ren
2020-09-29 18:51 ` Aurelien Jarno
2020-10-05 19:14 ` Atish Patra
2020-10-06 16:46 ` Guo Ren
2020-10-06 20:38 ` Atish Patra
2020-10-07 14:45 ` Guo Ren
2020-10-05 8:25 ` Andreas Schwab
2020-10-05 16:39 ` Palmer Dabbelt
2020-10-05 18:40 ` Andreas Schwab
2020-10-05 19:45 ` Palmer Dabbelt
2020-10-05 21:12 ` Atish Patra
2020-10-05 21:17 ` Palmer Dabbelt
2020-10-06 16:55 ` Guo Ren
2020-06-27 13:57 ` [PATCH V2 2/3] riscv: Fixup lockdep_assert_held with wrong param cpu_running guoren
2020-09-29 22:12 ` Atish Patra
2020-06-27 13:57 ` [PATCH V2 3/3] riscv: Enable LOCKDEP_SUPPORT & fixup TRACE_IRQFLAGS_SUPPORT guoren
2020-07-09 22:06 ` [PATCH V2 0/3] riscv: Enable LOCKDEP Palmer Dabbelt
2020-07-09 23:15 ` Guo Ren
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=20200914103836.GB2705@aurel32.net \
--to=aurelien@aurel32.net \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=greentime.hu@sifive.com \
--cc=guoren@kernel.org \
--cc=guoren@linux.alibaba.com \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=nickhu@andestech.com \
--cc=palmerdabbelt@google.com \
--cc=paul.walmsley@sifive.com \
--cc=tglx@linutronix.de \
--cc=tycho@tycho.ws \
--cc=zong.li@sifive.com \
/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;
as well as URLs for NNTP newsgroup(s).