linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Xiaoming Ni <nixiaoming@huawei.com>
Cc: linux-kernel@vger.kernel.org, mcgrof@kernel.org,
	yzaikin@google.com, adobriyan@gmail.com, vbabka@suse.cz,
	linux-fsdevel@vger.kernel.org, mhocko@suse.com,
	mhiramat@kernel.org, wangle6@huawei.com
Subject: Re: [PATCH] proc_sysclt: fix oops caused by incorrect command parameters.
Date: Thu, 7 Jan 2021 13:08:13 -0800	[thread overview]
Message-ID: <202101071307.6E0CF2FCA@keescook> (raw)
In-Reply-To: <5ad6d160-3a4e-28bd-4e89-cb01a1815861@huawei.com>

On Thu, Jan 07, 2021 at 02:14:18PM +0800, Xiaoming Ni wrote:
> On 2021/1/7 7:46, Kees Cook wrote:
> > subject typo: "sysclt" -> "sysctl"
> > 
> > On Thu, Dec 24, 2020 at 03:42:56PM +0800, Xiaoming Ni wrote:
> > > [...]
> > > +	if (!val)
> > > +		return 0;
> > > +
> > >   	if (strncmp(param, "sysctl", sizeof("sysctl") - 1) == 0) {
> > >   		param += sizeof("sysctl") - 1;
> > 
> > Otherwise, yeah, this is a good test to add. I would make it more
> > verbose, though:
> > 
> > 	if (!val) {
> > 		pr_err("Missing param value! Expected '%s=...value...'\n", param);
> > 		return 0;
> > 	}
> > 
> Yes, it's better to add log output.
> Thank you for your review.
> Do I need to send V2 patch based on review comments?

Yes please. :)

-- 
Kees Cook

      reply	other threads:[~2021-01-07 21:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-24  7:42 Xiaoming Ni
2021-01-04  6:19 ` ping //Re: " Xiaoming Ni
2021-01-06 23:46 ` Kees Cook
2021-01-07  6:14   ` Xiaoming Ni
2021-01-07 21:08     ` 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=202101071307.6E0CF2FCA@keescook \
    --to=keescook@chromium.org \
    --cc=adobriyan@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mhocko@suse.com \
    --cc=nixiaoming@huawei.com \
    --cc=vbabka@suse.cz \
    --cc=wangle6@huawei.com \
    --cc=yzaikin@google.com \
    --subject='Re: [PATCH] proc_sysclt: fix oops caused by incorrect command parameters.' \
    /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

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).