From: Luis Chamberlain <mcgrof@kernel.org>
To: Aaron Tomlin <atomlin@redhat.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>,
"linux-modules@vger.kernel.org" <linux-modules@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] module: Show the last unloaded module's taint flag(s)
Date: Wed, 6 Jul 2022 16:33:34 -0700 [thread overview]
Message-ID: <YsYbzgnO2KL9eFvc@bombadil.infradead.org> (raw)
In-Reply-To: <20220703142218.65dacvxozppgct6y@ava.usersys.com>
On Sun, Jul 03, 2022 at 03:22:18PM +0100, Aaron Tomlin wrote:
> On Tue 2022-06-28 08:47 +0100, Aaron Tomlin wrote:
> > On Tue 2022-06-28 05:54 +0000, Christophe Leroy wrote:
> > > > - /* Store the name of the last unloaded module for diagnostic purposes */
> > > > strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
> > > > + strcat(last_unloaded_module, module_flags(mod, buf, false));
> > >
> > > You replace a bounded string copy by an unbounded strict contat.
> > >
> > > Should you use strlcat() instead ?
> >
> > Hi Christophe,
> >
> > Why? If I understand correctly, both the destination and source string are
> > NULL-terminated (see module_flags()). So, strcat() should be sufficient.
>
> Hi Luis,
>
> Any thoughts on this? As far as I can tell, the destination string cannot
> be overwritten; albeit, I can use the safer option if you prefer.
Yeah I don't like this as-is, it makes it not so easy to follow, I'll
reply in my review of your patch now.
Luis
next prev parent reply other threads:[~2022-07-06 23:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 16:40 [PATCH 1/2] module: Modify module_flags() to accept show_state argument Aaron Tomlin
2022-06-27 16:40 ` [PATCH 2/2] module: Show the last unloaded module's taint flag(s) Aaron Tomlin
2022-06-28 5:54 ` Christophe Leroy
2022-06-28 7:47 ` Aaron Tomlin
2022-06-28 8:16 ` Christophe Leroy
2022-06-28 8:23 ` Aaron Tomlin
2022-07-03 14:22 ` Aaron Tomlin
2022-07-06 23:33 ` Luis Chamberlain [this message]
2022-07-06 23:37 ` Luis Chamberlain
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=YsYbzgnO2KL9eFvc@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=atomlin@redhat.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.