Live Patching
 help / color / mirror / Atom feed
From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Miroslav Benes <mbenes@suse.cz>
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:48:18 +0800	[thread overview]
Message-ID: <2b3235b7-87a5-9146-9f31-4668dda207b2@loongson.cn> (raw)
In-Reply-To: <alpine.LSU.2.21.2509111541590.29971@pobox.suse.cz>

On 2025/9/11 下午9:44, Miroslav Benes wrote:
> Hi,
> 
> On Tue, 9 Sep 2025, 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.
>>
>> Like x86, arch_stack_walk_reliable() should return 0 for user tasks.
>> It is necessary to set regs->csr_prmd as task->thread.csr_prmd first,
>> then use user_mode() to check whether the task is in userspace.
> 
> it is a nice optimization for sure, but "unreliable stack" messages point
> to a fact that the unwinding of these tasks is probably suboptimal and
> could be improved, no?

Yes, makes sense, I will fix "unreliable stack" in the next version.

> It would also be nice to include these messages (not for all tasks) to the
> commit message.

OK, will do it.

Thanks,
Tiezhu


      reply	other threads:[~2025-09-15  8:48 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
2025-09-11 13:44   ` Miroslav Benes
2025-09-15  8:48     ` Tiezhu Yang [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=2b3235b7-87a5-9146-9f31-4668dda207b2@loongson.cn \
    --to=yangtiezhu@loongson.cn \
    --cc=chenhuacai@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=mbenes@suse.cz \
    --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