From: Li Bin <huawei.libin@huawei.com>
To: Miroslav Benes <mbenes@suse.cz>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
Seth Jennings <sjenning@redhat.com>,
Jiri Kosina <jkosina@suse.cz>, Vojtech Pavlik <vojtech@suse.cz>,
<live-patching@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<xiexiuqi@huawei.com>
Subject: Re: [PATCH] livepatch: add sysfs interface /sys/kernel/livepatch/state
Date: Wed, 17 Jun 2015 17:19:43 +0800 [thread overview]
Message-ID: <55813BAF.5030904@huawei.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1506171012440.19134@pobox.suse.cz>
On 2015/6/17 16:13, Miroslav Benes wrote:
> On Wed, 17 Jun 2015, Li Bin wrote:
>
>> The added sysfs interface /sys/kernel/livepatch/state is read-only,
>> it shows the patches that have been applied, incluing the stack index
>> and the state of each patch.
>>
>> $ cat /sys/kernel/livepatch/state
>> Index Patch State
>> -----------------------------------------------
>> 1 klp_test1 enabled
>> 2 klp_test2 enabled
>> 3 klp_test3 enabled
>> -----------------------------------------------
>>
>> $ echo 0 > /sys/kernel/livepatch/klp_test3/enabled
>> $ cat /sys/kernel/livepatch/state
>> Index Patch State
>> -----------------------------------------------
>> 1 klp_test1 enabled
>> 2 klp_test2 enabled
>> 3 klp_test3 disabled
>> -----------------------------------------------
>>
>> Signed-off-by: Li Bin <huawei.libin@huawei.com>
>> ---
>
> Hi,
>
> I think we should comply with sysfs policy and keep 'one value per
> attribute' as mentioned in the Documentation/filesystems/sysfs.txt:
>
> "
> Attributes should be ASCII text files, preferably with only one value
> per file. It is noted that it may not be efficient to contain only one
> value per file, so it is socially acceptable to express an array of
> values of the same type.
>
> Mixing types, expressing multiple lines of data, and doing fancy
> formatting of data is heavily frowned upon. Doing these things may get
> you publicly humiliated and your code rewritten without notice.
> "
Hi Miroslav Benes,
Thanks for your comments.
> The list of applied patches can be obtained just by 'ls
> /sys/kernel/livepatch' and their state is in enabled attribute in each
> respective patch (no, you cannot obtain the order in the stack).
But why we cannot obtain it? I think We indeed need the stack order when we
will disable one patch, at least, we can find out whether it is on the top of
the stack if failed to disable one patch.
Thanks,
Li Bin
>
> Thanks,
>
> Miroslav Benes
> SUSE Labs
>
> .
>
next prev parent reply other threads:[~2015-06-17 9:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 6:31 [PATCH] livepatch: add sysfs interface /sys/kernel/livepatch/state Li Bin
2015-06-17 8:13 ` Miroslav Benes
2015-06-17 9:19 ` Li Bin [this message]
2015-06-17 13:20 ` Miroslav Benes
2015-06-18 1:59 ` Li Bin
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=55813BAF.5030904@huawei.com \
--to=huawei.libin@huawei.com \
--cc=jkosina@suse.cz \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=sjenning@redhat.com \
--cc=vojtech@suse.cz \
--cc=xiexiuqi@huawei.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