* PROC_BLOCK_SIZE in proc_info_read()
@ 2004-01-17 4:10 Lev Makhlis
0 siblings, 0 replies; only message in thread
From: Lev Makhlis @ 2004-01-17 4:10 UTC (permalink / raw)
To: linux-kernel
proc_info_read() (in fs/proc/base.c) uses this macro to limit the size
of a single read:
#define PROC_BLOCK_SIZE (3*1024) /* 4K page size but our output
routines use some slack for overruns */
It seems to me like it's a legacy from array_read() in 2.2.x and can be
safely removed. Besides an outdated assumption about the page size,
the value is not passed down to (*proc_read)(), so it cannot guard
against any overruns, and serves no useful purpose.
Am I missing anything?
(This is not to be confused with PROC_BLOCK_SIZE in fs/proc/generic.c)
The reason it bothers me is that if you have a process with a really long
command line, then /proc/<pid>/cmdline "contains" up to PAGE_SIZE bytes,
but sys_read() only returns 3072, and needs to be called repeatedly.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-01-17 4:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-17 4:10 PROC_BLOCK_SIZE in proc_info_read() Lev Makhlis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).