Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932252AbbFQNUM (ORCPT ); Wed, 17 Jun 2015 09:20:12 -0400 Received: from cantor2.suse.de ([195.135.220.15]:40463 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755176AbbFQNUF (ORCPT ); Wed, 17 Jun 2015 09:20:05 -0400 Date: Wed, 17 Jun 2015 15:20:03 +0200 (CEST) From: Miroslav Benes To: Li Bin cc: Josh Poimboeuf , Seth Jennings , Jiri Kosina , Vojtech Pavlik , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, xiexiuqi@huawei.com Subject: Re: [PATCH] livepatch: add sysfs interface /sys/kernel/livepatch/state In-Reply-To: <55813BAF.5030904@huawei.com> Message-ID: References: <1434522671-31951-1-git-send-email-huawei.libin@huawei.com> <55813BAF.5030904@huawei.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1369 Lines: 33 On Wed, 17 Jun 2015, Li Bin wrote: > On 2015/6/17 16:13, Miroslav Benes wrote: > > On Wed, 17 Jun 2015, Li Bin wrote: > > > 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. I meant with the current means. It is correct that we do not export information about stacking order anywhere. What we do in kGraft is that there is something like refcount for each patch. When the patch is being applied the refcount of all the previous patches is increased. Only the patch with the refcount equal to 0 can be removed. This information is exported and gives one a clue about the order. So if there is a need to have something like this there would certainly be a way (or ways to be precise) how to do it. The question is if we need it right now. Regards, Miroslav -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/