[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YwdAknZFyKxCXZuL@alley>
Date: Thu, 25 Aug 2022 11:27:46 +0200
From: Petr Mladek <pmladek@...e.com>
To: Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc: linux-kernel@...r.kernel.org, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...gle.com>,
Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
Tejun Heo <tj@...nel.org>, Zefan Li <lizefan.x@...edance.com>,
Johannes Weiner <hannes@...xchg.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
John Ogness <john.ogness@...utronix.de>,
John Stultz <jstultz@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Stephen Boyd <sboyd@...nel.org>, bpf@...r.kernel.org,
cgroups@...r.kernel.org, linux-perf-users@...r.kernel.org
Subject: Re: [PATCH] kernel: move from strlcpy with unused retval to strscpy
On Thu 2022-08-18 23:02:01, Wolfram Sang wrote:
> Follow the advice of the below link and prefer 'strscpy' in this
> subsystem. Conversion is 1:1 because the return value is not used.
> Generated by a coccinelle script.
>
> Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
> Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
>
> ---
> kernel/acct.c | 2 +-
> kernel/bpf/preload/bpf_preload_kern.c | 4 ++--
> kernel/cgroup/cgroup-v1.c | 4 ++--
> kernel/events/core.c | 6 +++---
> kernel/kallsyms.c | 4 ++--
> kernel/params.c | 2 +-
> kernel/printk/printk.c | 2 +-
> kernel/relay.c | 4 ++--
> kernel/time/clocksource.c | 2 +-
> kernel/trace/ftrace.c | 18 +++++++++---------
> kernel/trace/trace.c | 8 ++++----
> kernel/trace/trace_events.c | 2 +-
> kernel/trace/trace_events_inject.c | 4 ++--
> kernel/trace/trace_kprobe.c | 2 +-
> kernel/trace/trace_probe.c | 2 +-
> 15 files changed, 33 insertions(+), 33 deletions(-)
This fixes only small part of the kernel code. It would make sense to
do a tree-wide change using a script.
Would you mind to create one and send it to Linus?
You might want to use Coccinelle if a simple sed/awk gets too
complicated. See
https://www.kernel.org/doc/html/v4.15/dev-tools/coccinelle.html
Best Regards,
Petr
Powered by blists - more mailing lists