mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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: Fri, 8 Jun 2018 14:16:59 -0700	[thread overview]
Message-ID: <20180608141659.8a517b128c756b4d0b813c9e@linux-foundation.org> (raw)
In-Reply-To: <20180608134949.12672-1-tiwai@suse.de>

On Fri,  8 Jun 2018 15:49:49 +0200 Takashi Iwai <tiwai@suse.de> 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 *_minmax variant to limit the
> accepted values accordingly.

Waiman Long was working on a (vastly more complicated) patchset to
address this.

> --- a/ipc/ipc_sysctl.c
> +++ b/ipc/ipc_sysctl.c
> @@ -99,6 +99,7 @@ static int proc_ipc_auto_msgmni(struct ctl_table *table, int write,
>  static int zero;
>  static int one = 1;
>  static int int_max = INT_MAX;
> +static int ipcmni = IPCMNI;
>  
>  static struct ctl_table ipc_kern_table[] = {
>  	{
> @@ -120,7 +121,9 @@ static struct ctl_table ipc_kern_table[] = {
>  		.data		= &init_ipc_ns.shm_ctlmni,
>  		.maxlen		= sizeof(init_ipc_ns.shm_ctlmni),
>  		.mode		= 0644,
> -		.proc_handler	= proc_ipc_dointvec,
> +		.proc_handler	= proc_ipc_dointvec_minmax,
> +		.extra1		= &zero,
> +		.extra2		= &ipcmni,
>  	},
>  	{
>  		.procname	= "shm_rmid_forced",

What is the back-compatibility situation here?

  reply	other threads:[~2018-06-08 21:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 13:49 Takashi Iwai
2018-06-08 21:16 ` Andrew Morton [this message]
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
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=20180608141659.8a517b128c756b4d0b813c9e@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

all inboxes | Powered by JetHome®