From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Petr Mladek <pmladek@suse.com>, Borislav Petkov <bp@suse.de>
Cc: Rabin Vincent <rabin.vincent@axis.com>,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [PATCH] printk: fix printk.devkmsg sysctl
Date: Thu, 2 Feb 2017 13:50:31 +0900 [thread overview]
Message-ID: <20170202045031.GG1954@jagdpanzerIV.localdomain> (raw)
In-Reply-To: <20170131135501.GT20462@pathway.suse.cz>
Hello,
sorry, catching up with the emails.
there seems to be two independent patches. I'll just comment in one
thread.
On (01/31/17 14:55), Petr Mladek wrote:
[..]
> From 0ce6125caf314270cb48202390d8a0938fdf316e Mon Sep 17 00:00:00 2001
> From: Petr Mladek <pmladek@suse.com>
> Date: Tue, 31 Jan 2017 12:00:13 +0100
> Subject: [PATCH] printk: Fix printk.devkmsg sysctl
>
> The code handling write into /proc/sys/kernel/printk_devkmsg expects
> a new line at the end of the string but does not check it. As a result
> it allows:
>
> # echo -n offX > /proc/sys/kernel/printk_devkmsg
> #
>
> while at the same time it rejects legitimate uses:
>
> # echo -n off > /proc/sys/kernel/printk_devkmsg
> -sh: echo: write error: Invalid argument
>
for these cases (echo/echo -n/echo -e/etc. etc.) I usually use
sysfs_streq() from lib/string.c
wouldn't sysfs_streq() do the trick here?
-ss
next prev parent reply other threads:[~2017-02-02 4:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 13:11 Rabin Vincent
2017-01-27 15:01 ` Borislav Petkov
2017-01-27 15:42 ` Rabin Vincent
2017-01-27 18:19 ` Borislav Petkov
2017-01-30 13:38 ` Petr Mladek
2017-01-30 17:03 ` Borislav Petkov
2017-01-30 22:39 ` Borislav Petkov
2017-01-31 13:55 ` Petr Mladek
2017-02-02 4:50 ` Sergey Senozhatsky [this message]
2017-01-30 17:31 ` Rabin Vincent
2017-01-30 17:40 ` Borislav Petkov
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=20170202045031.GG1954@jagdpanzerIV.localdomain \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bp@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rabin.vincent@axis.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
all inboxes | Powered by JetHome®