Re: What keeps drivers/base/sys.c sysdev_show() from overrunning buffer?
From: William Lee Irwin III (wli_at_holomorphy.com)
Date: 11/21/03
- Previous message: Badinter, George: "sungem issues"
- In reply to: Paul Jackson: "What keeps drivers/base/sys.c sysdev_show() from overrunning buffer?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 20 Nov 2003 16:03:35 -0800 To: Paul Jackson <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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Badinter, George: "sungem issues"
- In reply to: Paul Jackson: "What keeps drivers/base/sys.c sysdev_show() from overrunning buffer?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|