From: Steven Rostedt <rostedt@goodmis.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-kernel@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>, Tejun Heo <tj@kernel.org>,
Zefan Li <lizefan.x@bytedance.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Namhyung Kim <namhyung@kernel.org>,
Petr Mladek <pmladek@suse.com>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
John Ogness <john.ogness@linutronix.de>,
John Stultz <jstultz@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Stephen Boyd <sboyd@kernel.org>,
bpf@vger.kernel.org, cgroups@vger.kernel.org,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] kernel: move from strlcpy with unused retval to strscpy
Date: Thu, 18 Aug 2022 18:15:06 -0400 [thread overview]
Message-ID: <20220818181506.0d838d02@gandalf.local.home> (raw)
In-Reply-To: <20220818210202.8227-1-wsa+renesas@sang-engineering.com>
On Thu, 18 Aug 2022 23:02:01 +0200
Wolfram Sang <wsa+renesas@sang-engineering.com> 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/
Grumble.
"So it's a completely useless function if you can't implicitly trust
the source string - but that is almost always why people think they
should use it!"
But in my cases I actually do trust the source string. They are all
generated from the kernel (not user input). With the exception of the
trace_inject, which I didn't write, and that should definitely be converted.
But eh, I'm not going to argue this one.
-- Steve
next prev parent reply other threads:[~2022-08-18 22:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 21:02 [PATCH] kernel: move from strlcpy with unused retval to strscpy Wolfram Sang
2022-08-18 22:15 ` Steven Rostedt [this message]
2022-08-19 5:53 ` Wolfram Sang
2022-08-19 16:23 ` Steven Rostedt
2022-08-25 9:27 ` Petr Mladek
2022-08-25 12:40 ` Wolfram Sang
2022-08-25 13:52 ` Petr Mladek
2022-08-25 20:53 ` Wolfram Sang
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=20220818181506.0d838d02@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=hannes@cmpxchg.org \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=john.ogness@linutronix.de \
--cc=jolsa@kernel.org \
--cc=jstultz@google.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=mark.rutland@arm.com \
--cc=martin.lau@linux.dev \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=sboyd@kernel.org \
--cc=sdf@google.com \
--cc=senozhatsky@chromium.org \
--cc=song@kernel.org \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=wsa+renesas@sang-engineering.com \
--cc=yhs@fb.com \
/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;
as well as URLs for NNTP newsgroup(s).