lkml.org 
[lkml]   [2018]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] ipc: Limit sysctl value to IPCMNI
    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").

    \
     
     \ /
      Last update: 2018-06-13 01:36    [W:3.842 / U:0.196 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site