From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Jinyang He <hejinyang@loongson.cn>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Huacai Chen <chenhuacai@kernel.org>
Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] objtool/LoongArch: Restrict stack operation instruction
Date: Tue, 30 Jul 2024 17:49:14 +0800 [thread overview]
Message-ID: <6ee45e77-eb22-c4ac-ee47-6a329236eeb7@loongson.cn> (raw)
In-Reply-To: <4ac60afc-de6b-acf6-c9e6-1f45c0680dbe@loongson.cn>
On 07/30/2024 05:28 PM, Jinyang He wrote:
> On 2024-07-30 14:19, Tiezhu Yang wrote:
>
>> After commit a0f7085f6a63 ("LoongArch: Add RANDOMIZE_KSTACK_OFFSET
>> support"), the code flow of do_syscall() was changed when compiled
>> with GCC due to the secondary stack of add_random_kstack_offset(),
>> something like this:
>>
>> addi.d $sp, $sp, -32
>> st.d $fp, $sp, 16
>> st.d $ra, $sp, 24
>> addi.d $fp, $sp, 32
>> ...
>> sub.d $sp, $sp, $t1
> Have you checked the ORC info whether is right or tried backtrace which
> passed do_syscall? The "sub.d $sp, $sp, $t1" has modified the $sp so the
> $sp cannot express CFA here. This patch just clear the warning but ignore
> the validity of ORC info. The wrong ORC info may cause illegally access
> memory when backtrace.
I did testing many times before submitting, the call trace is
expected when testing "echo l > /proc/sysrq-trigger".
Thanks,
Tiezhu
next prev parent reply other threads:[~2024-07-30 9:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 6:18 [PATCH 0/2] Fix objtool warning about do_syscall() on LoongArch Tiezhu Yang
2024-07-30 6:19 ` [PATCH 1/2] objtool/LoongArch: Restrict stack operation instruction Tiezhu Yang
2024-07-30 8:59 ` Huacai Chen
2024-07-30 14:59 ` Tiezhu Yang
2024-07-30 9:28 ` Jinyang He
2024-07-30 9:49 ` Tiezhu Yang [this message]
2024-07-30 10:57 ` Jinyang He
2024-07-30 14:54 ` Tiezhu Yang
2024-07-30 6:19 ` [PATCH 2/2] LoongArch: Remove STACK_FRAME_NON_STANDARD(do_syscall) Tiezhu Yang
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=6ee45e77-eb22-c4ac-ee47-6a329236eeb7@loongson.cn \
--to=yangtiezhu@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=hejinyang@loongson.cn \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=peterz@infradead.org \
/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®