From: Andrew Morton <akpm@linux-foundation.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: Davidlohr Bueso <dbueso@suse.de>,
linux-kernel@vger.kernel.org, Waiman Long <longman@redhat.com>
Subject: Re: [PATCH] ipc: Limit sysctl value to IPCMNI
Date: Tue, 12 Jun 2018 16:36:01 -0700 [thread overview]
Message-ID: <20180612163601.bef7f58dadda2832b36db3f6@linux-foundation.org> (raw)
In-Reply-To: <s5htvq8zf2n.wl-tiwai@suse.de>
On Tue, 12 Jun 2018 08:36:32 +0200 Takashi Iwai <tiwai@suse.de> wrote:
> > Well the present behaviour is to convert higher values downwards, yes?
> >
> > int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int limit)
> > {
> > kuid_t euid;
> > kgid_t egid;
> > int id, err;
> >
> > if (limit > IPCMNI)
> > limit = IPCMNI;
> >
> > So if someone out there is presently setting this to 999999 then their
> > kernel will work just fine. After your proposed change, it will no
> > longer do so - the tuning attempt will fail with -EINVAL.
> >
> > It really does us no good to say "you shouldn't have been doing that".
> > The fact that they *are* doing it and that it works OK is the kernel
> > developers' fault for not applying suitable checking on day one. I
> > think we're stuck with continuing to accept such input.
>
> Hm, that's one concern, yes.
>
> OTOH, we do secretly ignore the input value, and this isn't what's
> expected by user, either. Moreover, user-space has no slightest idea
> which value can be accepted and which not.
>
> Actually I posted it just because of requests from customers who
> needed to raise the bar, but didn't notice the effect.
>
> Maybe another possible solution would be to add another proc entry to
> handle this correctly, and make the old one only for compatibility.
Yes, I guess so. Just leave the old tunable alone. Possibly we
could add a printk_once("please switch to the new interface").
next prev parent reply other threads:[~2018-06-12 23:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-08 13:49 [PATCH] ipc: Limit sysctl value to IPCMNI Takashi Iwai
2018-06-08 21:16 ` Andrew Morton
2018-06-09 6:48 ` Takashi Iwai
2018-06-11 23:18 ` Andrew Morton
2018-06-12 6:36 ` Takashi Iwai
2018-06-12 23:36 ` Andrew Morton [this message]
2018-06-18 5:27 ` Waiman Long
2018-06-18 21:51 ` Andrew Morton
2018-06-11 21:27 ` Waiman Long
2018-06-12 6:31 ` Takashi Iwai
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=20180612163601.bef7f58dadda2832b36db3f6@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dbueso@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=tiwai@suse.de \
/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