linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>
Cc: linux-kernel@vger.kernel.org,
	Luis Chamberlain <mcgrof@kernel.org>,
	Kees Cook <keescook@chromium.org>, Christoph Hellwig <hch@lst.de>,
	Andrey Ignatov <rdna@fb.com>, Al Viro <viro@zeniv.linux.org.uk>,
	Iurii Zaikin <yzaikin@google.com>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] proc_sysctl: clamp sizes using table->maxlen
Date: Tue, 16 Feb 2021 09:47:28 +0100	[thread overview]
Message-ID: <20210216084728.GA23731@lst.de> (raw)
In-Reply-To: <20210215145305.283064-1-alex_y_xu@yahoo.ca>

On Mon, Feb 15, 2021 at 09:53:05AM -0500, Alex Xu (Hello71) wrote:
> Since maxlen is already exposed, we can allocate approximately the right
> amount directly, fixing up those drivers which set a bogus maxlen. These
> drivers were located based on those which had copy_x_user replaced in
> 32927393dc1c, on the basis that other drivers either use builtin proc_*
> handlers, or do not access the data pointer. The latter is OK because
> maxlen only needs to be an upper limit.

Please split this into one patch each each subsystem that sets maxlen
to 0 and the actual change to proc_sysctl.c.

How do these maxlen = 0 entries even survive the sysctl_check_table
check?

  parent reply	other threads:[~2021-02-16  8:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210215145305.283064-1-alex_y_xu.ref@yahoo.ca>
2021-02-15 14:53 ` [PATCH] proc_sysctl: clamp sizes using table->maxlen Alex Xu (Hello71)
2021-02-16  0:49   ` Alex Xu (Hello71)
2021-02-16  8:47   ` Christoph Hellwig [this message]
2021-02-27 14:41     ` Alex Xu (Hello71)
2021-02-16 12:12   ` [proc_sysctl] 459b3085f2: sysctl_table_check_failed kernel test robot

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=20210216084728.GA23731@lst.de \
    --to=hch@lst.de \
    --cc=adobriyan@gmail.com \
    --cc=alex_y_xu@yahoo.ca \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=rdna@fb.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yzaikin@google.com \
    /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;
as well as URLs for NNTP newsgroup(s).