From: Lev Makhlis <mlev@despammed.com>
To: linux-kernel@vger.kernel.org
Subject: PROC_BLOCK_SIZE in proc_info_read()
Date: Fri, 16 Jan 2004 23:10:17 -0500 [thread overview]
Message-ID: <200401162310.17695.mlev@despammed.com> (raw)
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.
reply other threads:[~2004-01-17 4:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200401162310.17695.mlev@despammed.com \
--to=mlev@despammed.com \
--cc=linux-kernel@vger.kernel.org \
/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.