[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANpmjNM-DHav6B7h4ZeTQd9KERY0dKD9qYQ1RT966aLTvbYnfw@mail.gmail.com>
Date: Tue, 1 Oct 2024 15:57:02 +0200
From: Marco Elver <elver@...gle.com>
To: ran xiaokai <ranxiaokai627@....com>
Cc: tglx@...utronix.de, dvyukov@...gle.com, kasan-dev@...glegroups.com,
linux-kernel@...r.kernel.org, Ran Xiaokai <ran.xiaokai@....com.cn>
Subject: Re: [PATCH 1/4] kcsan, debugfs: Remove redundant call of kallsyms_lookup_name()
On Wed, 25 Sept 2024 at 16:32, ran xiaokai <ranxiaokai627@....com> wrote:
>
> From: Ran Xiaokai <ran.xiaokai@....com.cn>
>
> There is no need to repeatedly call kallsyms_lookup_name, we can
> reuse the return value of this function.
>
> Signed-off-by: Ran Xiaokai <ran.xiaokai@....com.cn>
Reviewed-by: Marco Elver <elver@...gle.com>
> ---
> kernel/kcsan/debugfs.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/kernel/kcsan/debugfs.c b/kernel/kcsan/debugfs.c
> index 53b21ae30e00..ed483987869e 100644
> --- a/kernel/kcsan/debugfs.c
> +++ b/kernel/kcsan/debugfs.c
> @@ -181,8 +181,7 @@ static ssize_t insert_report_filterlist(const char *func)
> }
>
> /* Note: deduplicating should be done in userspace. */
> - report_filterlist.addrs[report_filterlist.used++] =
> - kallsyms_lookup_name(func);
> + report_filterlist.addrs[report_filterlist.used++] = addr;
> report_filterlist.sorted = false;
>
> out:
> --
> 2.15.2
>
>
Powered by blists - more mailing lists