mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Der Herr Hofrat <der.herr@hofr.at>
Cc: der.herr@hofr.at, linux-kernel@vger.kernel.org
Subject: Re: bug in kernel/sysctl.c (SYSIPC) ?
Date: Tue, 18 Mar 2003 14:00:19 -0800	[thread overview]
Message-ID: <20030318140019.368003f5.rddunlap@osdl.org> (raw)
In-Reply-To: <200303181856.h2IIu6b16953@hofr.at>

On Tue, 18 Mar 2003 19:55:36 +0100 (CET) Der Herr Hofrat <der.herr@hofr.at> wrote:

| > On Tue, 18 Mar 2003 08:51:17 +0100 (CET) Der Herr Hofrat <der.herr@hofr.at> wrote:
| > 
| > |  atleast in kernel 2.4.19 and 2.4.20 in kernel/sysctl.c shmmax and shmall use
| > |  the proc_dointvec_minmax callback without passing a min/max value - is there
| > |  a reson for this or is this a simple bug ?
| > | 
| > | linux/kenrel/sysctl.c (line 221 for 2.4.19/20)
| > | 
| > | #ifdef CONFIG_SYSVIPC
| > | 	{KERN_SHMMAX, "shmmax", &shm_ctlmax, sizeof (size_t),
| > | 	 0644, NULL, &proc_doulongvec_minmax},
| > | 	{KERN_SHMALL, "shmall", &shm_ctlall, sizeof (size_t),
| > | 	 0644, NULL, &proc_doulongvec_minmax},
| > | 	...
| > | #endif
| > 
| > The min and max values default to 0 if not specified (initialized),
| > and the _minmax functions have code to handle those cases.
| > 
| > so as long as the intended min/max values were 0, I don't see a
| > problem.  Are you seeing a problem?
| >
| 
| not directly a problem - my assumption was that shmmax would be bounded in some
| way - currently you can write any value into /proc/sys/kernel/shmmax - and I
| don't think that the inteded behavior of this is to permit any value - or if 
| it is - what is the point of using the _minimax and not simple proc_doulongvec ?

Good observation.  Yes, shmmax is unbounded, root can write any value to it.
I don't know why proc_doulongvec_minmax is used there, except that I don't
see a proc_doulongvec() without _minmax on it.

--
~Randy

      reply	other threads:[~2003-03-18 21:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-18  7:51 Der Herr Hofrat
2003-03-18 18:40 ` Randy.Dunlap
2003-03-18 18:55   ` Der Herr Hofrat
2003-03-18 22:00     ` Randy.Dunlap [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=20030318140019.368003f5.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=der.herr@hofr.at \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®