From: Kees Cook <keescook@chromium.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Luis Chamberlain <mcgrof@kernel.org>,
Iurii Zaikin <yzaikin@google.com>,
linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
linux-mm@kvack.org, Ivan Teterevkov <ivan.teterevkov@nutanix.com>,
Michal Hocko <mhocko@kernel.org>,
David Rientjes <rientjes@google.com>,
Matthew Wilcox <willy@infradead.org>,
"Eric W . Biederman" <ebiederm@xmission.com>,
"Guilherme G . Piccoli" <gpiccoli@canonical.com>
Subject: Re: [RFC v3 1/2] kernel/sysctl: support setting sysctl parameters from kernel command line
Date: Thu, 26 Mar 2020 20:50:47 -0700 [thread overview]
Message-ID: <202003262048.70D845CDF@keescook> (raw)
In-Reply-To: <8afebb97-db51-5744-dca9-840dc60cd396@suse.cz>
On Thu, Mar 26, 2020 at 11:08:40PM +0100, Vlastimil Babka wrote:
> On 3/26/20 9:24 PM, Kees Cook wrote:
> I didn't want to modify param for the sake of error prints, but perhaps
> the replacements won't confuse system admin too much?
Ah, fair enough. Should be fine to do it against "path" then. Ignore
that bit from me. ;)
> >> + filp_close(file, NULL);
> >
> > Please check the return value of filp_close() and treat that as an error
> > for this function too.
>
> Well I could print it, but not much else? The unmount will probably fail
> in that case?
Maybe? This is just a nit of mine from tracking horrible bugs that
turned out to be unreported 'close' failures. :)
> But I guess the "mount on first applicable argument" approach would work
> with this scheme as well:
>
> struct vfsmount *proc_mnt = NULL;
> parse_args(..., &proc_mnt, ...)
Yes please! That would be perfect. (And yeah, it's a sensible
optimization to do it "as needed"; I hadn't thought of that.)
--
Kees Cook
prev parent reply other threads:[~2020-03-27 3:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 18:16 [RFC v3 1/2] kernel/sysctl: support setting sysctl parameters from kernel command line Vlastimil Babka
2020-03-26 18:16 ` [RFC v3 2/2] kernel/sysctl: support handling command line aliases Vlastimil Babka
2020-03-26 20:34 ` Kees Cook
2020-03-26 21:29 ` Christian Brauner
2020-03-26 20:24 ` [RFC v3 1/2] kernel/sysctl: support setting sysctl parameters from kernel command line Kees Cook
2020-03-26 22:08 ` Vlastimil Babka
2020-03-27 3:50 ` 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=202003262048.70D845CDF@keescook \
--to=keescook@chromium.org \
--cc=ebiederm@xmission.com \
--cc=gpiccoli@canonical.com \
--cc=ivan.teterevkov@nutanix.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mcgrof@kernel.org \
--cc=mhocko@kernel.org \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--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).