All of lore.kernel.org
 help / color / mirror / Atom feed
* What keeps drivers/base/sys.c sysdev_show() from overrunning buffer?
@ 2003-11-20 23:52 Paul Jackson
  2003-11-21  0:03 ` William Lee Irwin III
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Jackson @ 2003-11-20 23:52 UTC (permalink / raw)
  To: mochel; +Cc: linux-kernel, wli

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.

-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-21  0:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.