linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: "Luis R. Rodriguez" <mcgrof@kernel.org>, cheng.lin130@zte.com.cn
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	zhong.weidong@zte.com.cn, wang.yi59@zte.com.cn,
	Michael Kerrisk <mtk.manpages@gmail.com>
Subject: Re: Re: [PATCH] proc/sysctl: fix return error for proc_doulongvec_minmax
Date: Wed, 5 Dec 2018 15:30:48 -0800	[thread overview]
Message-ID: <CAGXu5jL9MPN1+wWxj9uFK=bG-KzhmOGFLYmyyrEGqs4f=k-u_w@mail.gmail.com> (raw)
In-Reply-To: <20181203201436.GO28501@garbanzo.do-not-panic.com>

On Mon, Dec 3, 2018 at 12:14 PM Luis Chamberlain <mcgrof@kernel.org> wrote:
> Since this worked before I do agree that we need to keep it working now,
> and I can't think of an issue with returning 0 now. Since this is about
> semantics though I'd like a bit more review from at last one more
> person.
>
> Kees, Eric, Andrew?

This is a weird one: it would return an error _AND_ still perform the
write. :( I think this patch is right, and I struggle to imagine a
case where removing the failure is a problem.

A quick question, though, do we want to instead do the reverse? (Not
update, and keep the error?) Are there any examples of doing partial
writes like this in real software?

The proposed change is the safest change, though...

-- 
Kees Cook

      parent reply	other threads:[~2018-12-05 23:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30  6:35 [PATCH] proc/sysctl: fix return error for proc_doulongvec_minmax Cheng Lin
2018-11-30 19:14 ` Luis Chamberlain
     [not found]   ` <201812031312398404610@zte.com.cn>
2018-12-03 20:14     ` Luis Chamberlain
     [not found]       ` <201812051510071985717@zte.com.cn>
2018-12-05 18:08         ` Re: Re: [PATCH] proc/sysctl: fix return error forproc_doulongvec_minmax Luis Chamberlain
2018-12-05 23:30       ` Kees Cook [this message]

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='CAGXu5jL9MPN1+wWxj9uFK=bG-KzhmOGFLYmyyrEGqs4f=k-u_w@mail.gmail.com' \
    --to=keescook@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=cheng.lin130@zte.com.cn \
    --cc=ebiederm@xmission.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=wang.yi59@zte.com.cn \
    --cc=zhong.weidong@zte.com.cn \
    /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).