From: Rusty Russell <rusty@rustcorp.com.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: DM <dm.n9107@gmail.com>, Arjan van de Ven <arjan@infradead.org>,
linux-kernel@vger.kernel.org, ak@suse.de
Subject: Re: [patch 2/2] track and print last unloaded module in the oops trace
Date: Wed, 9 Jan 2008 08:20:27 +1100 [thread overview]
Message-ID: <200801090820.28440.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20080108161846.GD32273@elte.hu>
On Wednesday 09 January 2008 03:18:46 Ingo Molnar wrote:
> * DM <dm.n9107@gmail.com> wrote:
> > On Jan 8, 2008 3:26 PM, Arjan van de Ven <arjan@infradead.org> wrote:
> > > > Why use sprintf? If a module name contains the % character we could
> > > > overflow the buffer. Or is module-unloading root-only and we don't
> > > > care?
> > >
> > > module loading isn't just root only; the name comes from an already
> > > loaded module. If you can load kernel modules of your choice you own
> > > the entire kernel already anway
> >
> > Still, strcpy seems like a better choice IMHO.
>
> agreed, this just isnt obvious IMO:
>
> + sprintf(last_unloaded_module, mod->name);
>
> Ingo
Yes, I've changed it to:
+ strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
In my tree.
Thanks,
Rusty.
prev parent reply other threads:[~2008-01-08 21:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-06 23:19 [patch 2/2] track and print last unloaded module in the oops trace Arjan van de Ven
2008-01-07 1:25 ` Rusty Russell
2008-01-08 11:23 ` Ingo Molnar
2008-01-08 11:52 ` Rusty Russell
2008-01-08 13:51 ` DM
2008-01-08 14:26 ` Arjan van de Ven
2008-01-08 14:39 ` DM
2008-01-08 16:18 ` Ingo Molnar
2008-01-08 21:20 ` Rusty Russell [this message]
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=200801090820.28440.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=ak@suse.de \
--cc=arjan@infradead.org \
--cc=dm.n9107@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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