[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d4115146-966a-61a5-6bdd-0cd7092fd3b4@loongson.cn>
Date: Fri, 6 May 2022 11:24:06 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Steven Rostedt <rostedt@...dmis.org>,
Shuah Khan <shuah@...nel.org>,
Xuefeng Li <lixuefeng@...ngson.cn>, linux-mips@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] MIPS: Use NOKPROBE_SYMBOL() instead of __kprobes
annotation
On 05/06/2022 09:45 AM, Masami Hiramatsu wrote:
> On Thu, 5 May 2022 20:19:08 +0800
> Tiezhu Yang <yangtiezhu@...ngson.cn> wrote:
>
>> If define CONFIG_KPROBES, __kprobes annotation forces the whole function
>> into the ".kprobes.text" section, NOKPROBE_SYMBOL() just stores the given
>> function address in the "_kprobe_blacklist" section which is introduced
>> to maintain kprobes blacklist.
>>
>> Modify the related code to use NOKPROBE_SYMBOL() to protect functions from
>> kprobes instead of __kprobes annotation under arch/mips.
>
> So you added some non '__kprobes' annotated functions to NOKPROBE_SYMBOL()
> in this patch. Those caused the kernel panic, right?
Oh, no, this patch is not related with the kernel panic, what it does
is just to use NOKPROBE_SYMBOL() instead of __kprobes annotation, and
also add some non '__kprobes' annotated functions in kprobes.c to
NOKPROBE_SYMBOL() because they can not be probed too.
> If so, please add such
> comment on this description too. Or, split this into 2 patches, one fixes
> the kernel panic by adding those functions to NOKPROBE_SYMBOL() and the
> other is replacing __kprobes with NOKPROBE_SYMBOL().
>
> Also, could you also find the commit which introduces the kernel panic?
> It is worth to backport such fix to stable trees.
I did some work to find some other functions lead to kernel panic,
mark them as notrace function can avoid the problems, but I am not
quite sure the root cause, so I do not submit the changes now.
Thanks,
Tiezhu
Powered by blists - more mailing lists