mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jinyang He <hejinyang@loongson.cn>
To: Xi Ruoyao <xry111@xry111.site>,
	Youling Tang <tangyouling@loongson.cn>,
	Huacai Chen <chenhuacai@kernel.org>
Cc: Xuerui Wang <kernel@xen0n.name>,
	loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/5] LoongArch: Use la.pcrel instead of la.abs for exception handlers
Date: Wed, 8 Feb 2023 08:59:19 +0800	[thread overview]
Message-ID: <eb21dd1b-e318-e9ac-7926-873ed35c06f9@loongson.cn> (raw)
In-Reply-To: <657d46fa2290ccfacdf5ae0f8e313870405293bb.camel@xry111.site>


On 2023-02-07 22:39, Xi Ruoyao wrote:
> On Tue, 2023-02-07 at 22:28 +0800, Xi Ruoyao wrote:
>> +struct handler_reloc *eentry_reloc[128] = {
>> +       [0] = NULL, /* merr handler */
> Self review:
>
> This is actually incorrect.  Currently the merr handler (except_vec_cex)
> is coded as:
>
> SYM_FUNC_START(except_vec_cex)
>          b       cache_parity_error
> SYM_FUNC_END(except_vec_cex)
>
> Once this is copied into the per-cpu handler page, the offset (coded in
> the b instruction) will be absolutely wrong.  But it's already incorrect
> in the current mainline, and I'm not familiar with CSR.CRMD.DA=1
> configuration so I'm not sure how to fix it.
>
It bothers me, too. And I've mentioned it to Huacai offline before.
Besides, after fixing this issue I'll support a series of patches
to fix the cfi note in asm files.



  reply	other threads:[~2023-02-08  0:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 14:28 [PATCH v2 0/5] LoongArch: Add kernel relocation and KASLR support Xi Ruoyao
2023-02-07 14:28 ` [PATCH v2 1/5] LoongArch: Use la.pcrel instead of la.abs when it's trivially possible Xi Ruoyao
2023-02-07 14:28 ` [PATCH v2 2/5] LoongArch: Use la.pcrel instead of la.abs for exception handlers Xi Ruoyao
2023-02-07 14:39   ` Xi Ruoyao
2023-02-08  0:59     ` Jinyang He [this message]
2023-02-07 14:28 ` [PATCH v2 3/5] LoongArch: Add JUMP_LINK_ADDR macro implementation to avoid using la.abs Xi Ruoyao
2023-02-07 14:28 ` [PATCH v2 4/5] LoongArch: Add support for kernel relocation Xi Ruoyao
2023-02-07 14:28 ` [PATCH v2 5/5] LoongArch: Add support for kernel address space layout randomization (KASLR) Xi Ruoyao
2023-02-08  4:37 ` [PATCH v2 0/5] LoongArch: Add kernel relocation and KASLR support Youling Tang
2023-02-08  8:27   ` Xi Ruoyao
2023-02-09  6:34     ` Youling Tang

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=eb21dd1b-e318-e9ac-7926-873ed35c06f9@loongson.cn \
    --to=hejinyang@loongson.cn \
    --cc=chenhuacai@kernel.org \
    --cc=kernel@xen0n.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=tangyouling@loongson.cn \
    --cc=xry111@xry111.site \
    /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

all inboxes | Powered by JetHome®