Re: [PATCH] ipc: Limit sysctl value to IPCMNI

2018-06-18 Thread Andrew Morton
On Mon, 18 Jun 2018 13:27:24 +0800 Waiman Long wrote: > >> > >> 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 print

Re: [PATCH] ipc: Limit sysctl value to IPCMNI

2018-06-17 Thread Waiman Long
On 06/13/2018 07:36 AM, Andrew Morton wrote: > On Tue, 12 Jun 2018 08:36:32 +0200 Takashi Iwai 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; >>> kgi

Re: [PATCH] ipc: Limit sysctl value to IPCMNI

2018-06-12 Thread Andrew Morton
On Tue, 12 Jun 2018 08:36:32 +0200 Takashi Iwai 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

Re: [PATCH] ipc: Limit sysctl value to IPCMNI

2018-06-11 Thread Takashi Iwai
On Tue, 12 Jun 2018 01:18:45 +0200, Andrew Morton wrote: > > On Sat, 09 Jun 2018 08:48:48 +0200 Takashi Iwai wrote: > > > On Fri, 08 Jun 2018 23:16:59 +0200, > > Andrew Morton wrote: > > > > > > On Fri, 8 Jun 2018 15:49:49 +0200 Takashi Iwai wrote: > > > > > > > Currently shmmni proc entry a

Re: [PATCH] ipc: Limit sysctl value to IPCMNI

2018-06-11 Thread Takashi Iwai
On Mon, 11 Jun 2018 23:27:08 +0200, Waiman Long wrote: > > On 06/08/2018 05:16 PM, Andrew Morton wrote: > > On Fri, 8 Jun 2018 15:49:49 +0200 Takashi Iwai wrote: > > > >> Currently shmmni proc entry accepts all entered integer values, but > >> the practical limit is IPCMNI (32768). This confuse

Re: [PATCH] ipc: Limit sysctl value to IPCMNI

2018-06-11 Thread Andrew Morton
On Sat, 09 Jun 2018 08:48:48 +0200 Takashi Iwai wrote: > On Fri, 08 Jun 2018 23:16:59 +0200, > Andrew Morton wrote: > > > > On Fri, 8 Jun 2018 15:49:49 +0200 Takashi Iwai wrote: > > > > > Currently shmmni proc entry accepts all entered integer values, but > > > the practical limit is IPCMNI (

Re: [PATCH] ipc: Limit sysctl value to IPCMNI

2018-06-11 Thread Waiman Long
On 06/08/2018 05:16 PM, Andrew Morton wrote: > On Fri, 8 Jun 2018 15:49:49 +0200 Takashi Iwai wrote: > >> Currently shmmni proc entry accepts all entered integer values, but >> the practical limit is IPCMNI (32768). This confuses user as if a >> bigger value were accepted but not applied correct

Re: [PATCH] ipc: Limit sysctl value to IPCMNI

2018-06-08 Thread Takashi Iwai
On Fri, 08 Jun 2018 23:16:59 +0200, Andrew Morton wrote: > > On Fri, 8 Jun 2018 15:49:49 +0200 Takashi Iwai wrote: > > > Currently shmmni proc entry accepts all entered integer values, but > > the practical limit is IPCMNI (32768). This confuses user as if a > > bigger value were accepted but

Re: [PATCH] ipc: Limit sysctl value to IPCMNI

2018-06-08 Thread Andrew Morton
On Fri, 8 Jun 2018 15:49:49 +0200 Takashi Iwai wrote: > Currently shmmni proc entry accepts all entered integer values, but > the practical limit is IPCMNI (32768). This confuses user as if a > bigger value were accepted but not applied correctly. > > This patch changes the proc entry to use *

[PATCH] ipc: Limit sysctl value to IPCMNI

2018-06-08 Thread Takashi Iwai
Currently shmmni proc entry accepts all entered integer values, but the practical limit is IPCMNI (32768). This confuses user as if a bigger value were accepted but not applied correctly. This patch changes the proc entry to use *_minmax variant to limit the accepted values accordingly. Signed-o