From: William Lee Irwin III <wli@holomorphy.com>
To: Paul Jackson <pj@sgi.com>
Cc: mochel@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: What keeps drivers/base/sys.c sysdev_show() from overrunning buffer?
Date: Thu, 20 Nov 2003 16:03:35 -0800 [thread overview]
Message-ID: <20031121000335.GP22764@holomorphy.com> (raw)
In-Reply-To: <20031120155211.5cd2897a.pj@sgi.com>
On Thu, Nov 20, 2003 at 03:52:11PM -0800, Paul Jackson wrote:
> The calls in drivers/base/sys.c to sysdev_show(), which seem to resolve
> to the routines node_read_cpumap() and node_read_meminfo() in node.c,
> do not take any buffer count (size). They used to, by Patrick removed
> the count parameter in Jan 2003, from here and other such places.
> What's to keep the node_read_*() sprintf's from overrunning these
> buffers?
> I am developing some changes to the cpumask_t print routines, which
> include using snprintf() instead of sprintf(), and watching buffer
> limits. These changes are motivated by the need to handle such things
> as 512 CPUs.
> I couldn't plug my new routine into read_cpumap() to display the
> node_dev->cpumap (a cpumask_t), for want of a buffer count.
There was some infrastructure erected for this at one point (seq_file);
I wonder why it's not using that. But yes, this needs to get taken
care of one way or another.
-- wli
prev parent reply other threads:[~2003-11-21 0:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-20 23:52 What keeps drivers/base/sys.c sysdev_show() from overrunning buffer? Paul Jackson
2003-11-21 0:03 ` William Lee Irwin III [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=20031121000335.GP22764@holomorphy.com \
--to=wli@holomorphy.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
--cc=pj@sgi.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 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.