lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 17 Jun 2015 17:19:43 +0800
From:	Li Bin <huawei.libin@...wei.com>
To:	Miroslav Benes <mbenes@...e.cz>
CC:	Josh Poimboeuf <jpoimboe@...hat.com>,
	Seth Jennings <sjenning@...hat.com>,
	Jiri Kosina <jkosina@...e.cz>,
	Vojtech Pavlik <vojtech@...e.cz>,
	<live-patching@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<xiexiuqi@...wei.com>
Subject: Re: [PATCH] livepatch: add sysfs interface /sys/kernel/livepatch/state

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@...wei.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
> 
> .
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ