From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Jinyang He <hejinyang@loongson.cn>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
Huacai Chen <chenhuacai@kernel.org>,
Xi Zhang <zhangxi@kylinos.cn>,
live-patching@vger.kernel.org, loongarch@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] LoongArch: Return 0 for user tasks in arch_stack_walk_reliable()
Date: Mon, 15 Sep 2025 16:54:47 +0800 [thread overview]
Message-ID: <47be74ad-c01c-cf79-b7a4-3f05f85c2f71@loongson.cn> (raw)
In-Reply-To: <26036193-f570-3a17-e6d3-45ad70704198@loongson.cn>
On 2025/9/12 上午9:55, Jinyang He wrote:
> On 2025-09-11 19:49, Tiezhu Yang wrote:
>
>> On 2025/9/10 上午9:11, Jinyang He wrote:
>>> On 2025-09-09 19:31, Tiezhu Yang wrote:
>>>
>>>> When testing the kernel live patching with "modprobe livepatch-sample",
>>>> there is a timeout over 15 seconds from "starting patching transition"
>>>> to "patching complete", dmesg shows "unreliable stack" for user tasks
>>>> in debug mode. When executing "rmmod livepatch-sample", there exists
>>>> the similar issue.
...
>> for this case, get_stack_info() does not return 0 due to in_task_stack()
>> is not true, then goto error, state->stack_info.type = STACK_TYPE_UNKNOWN
>> and state->error = true. In arch_stack_walk_reliable(), the loop will be
>> break and it returns -EINVAL, thus causing unreliable stack.
> The stop position of a complete stack backtrace on LoongArch should be
> the top of the task stack or until the address is_entry_func.
> Otherwise, it is not a complete stack backtrace, and thus I think it
> is an "unreliable stack".
> I'm curious about what the ORC info at this PC.
The unwind process has problem, I have found the root cause and am
working to fix the "unreliable stack" issue, it should and can find
the last frame, and then the user_mode() check is not necessary.
Thanks,
Tiezhu
next prev parent reply other threads:[~2025-09-15 8:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 11:31 [PATCH v1 0/2] Debug and fix livepatch issues on LoongArch Tiezhu Yang
2025-09-09 11:31 ` [PATCH v1 1/2] livepatch: Add config LIVEPATCH_DEBUG to get debug information Tiezhu Yang
2025-09-11 13:50 ` Miroslav Benes
2025-09-12 2:26 ` Tiezhu Yang
2025-09-12 7:14 ` Miroslav Benes
2025-09-09 11:31 ` [PATCH v1 2/2] LoongArch: Return 0 for user tasks in arch_stack_walk_reliable() Tiezhu Yang
2025-09-10 1:11 ` Jinyang He
2025-09-11 11:49 ` Tiezhu Yang
2025-09-12 1:55 ` Jinyang He
2025-09-15 8:54 ` Tiezhu Yang [this message]
2025-09-11 13:44 ` Miroslav Benes
2025-09-15 8:48 ` 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=47be74ad-c01c-cf79-b7a4-3f05f85c2f71@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=live-patching@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=zhangxi@kylinos.cn \
/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®