Re: [RFC v3 1/2] kernel/sysctl: support setting sysctl parameters from kernel command line

From
Kees Cook <hidden>
Date
2020-03-27 03:50:52
Also in
linux-mm, lkml
Reply to
Vlastimil Babka, 2020-03-26
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. ;)
quoted
quoted
+	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
Thread (7 messages) 7 messages, 3 authors, last reply 2020-03-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help