Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-05 Thread Chris J Arges
On Thu, Nov 05, 2015 at 09:56:56AM -0600, Josh Poimboeuf wrote: > On Thu, Nov 05, 2015 at 04:18:12PM +0100, Miroslav Benes wrote: > > On Wed, 4 Nov 2015, Josh Poimboeuf wrote: > > > > > On Wed, Nov 04, 2015 at 10:52:52AM +0100, Miroslav Benes wrote: > > > > On Tue, 3 Nov 2015, Josh Poimboeuf wrote

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-05 Thread Josh Poimboeuf
On Thu, Nov 05, 2015 at 04:18:12PM +0100, Miroslav Benes wrote: > On Wed, 4 Nov 2015, Josh Poimboeuf wrote: > > > On Wed, Nov 04, 2015 at 10:52:52AM +0100, Miroslav Benes wrote: > > > On Tue, 3 Nov 2015, Josh Poimboeuf wrote: > > > > > Object entry would be empty for not loaded object. I would not

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-05 Thread Miroslav Benes
On Wed, 4 Nov 2015, Josh Poimboeuf wrote: > On Wed, Nov 04, 2015 at 10:52:52AM +0100, Miroslav Benes wrote: > > On Tue, 3 Nov 2015, Josh Poimboeuf wrote: > > > > Object entry would be empty for not loaded object. I would not > > > > dare to propose to remove such object entries. It would make thi

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-04 Thread Chris J Arges
On 11/04/2015 10:03 AM, Josh Poimboeuf wrote: > On Wed, Nov 04, 2015 at 10:52:52AM +0100, Miroslav Benes wrote: >> On Tue, 3 Nov 2015, Josh Poimboeuf wrote: Object entry would be empty for not loaded object. I would not dare to propose to remove such object entries. It would make thing

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-04 Thread Josh Poimboeuf
On Wed, Nov 04, 2015 at 10:52:52AM +0100, Miroslav Benes wrote: > On Tue, 3 Nov 2015, Josh Poimboeuf wrote: > > > Object entry would be empty for not loaded object. I would not > > > dare to propose to remove such object entries. It would make things > > > worse. > > > > Why would removing an e

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-04 Thread Miroslav Benes
On Tue, 3 Nov 2015, Josh Poimboeuf wrote: > On Tue, Nov 03, 2015 at 05:09:48PM +0100, Miroslav Benes wrote: > > On Tue, 3 Nov 2015, Josh Poimboeuf wrote: > > > > > On Tue, Nov 03, 2015 at 11:52:08AM +0100, Miroslav Benes wrote: > > > > > > > > There is a problem which I missed before. klp_init_f

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-03 Thread Chris J Arges
On 11/03/2015 10:50 AM, Josh Poimboeuf wrote: > On Tue, Nov 03, 2015 at 05:09:48PM +0100, Miroslav Benes wrote: >> On Tue, 3 Nov 2015, Josh Poimboeuf wrote: >> >>> On Tue, Nov 03, 2015 at 11:52:08AM +0100, Miroslav Benes wrote: On Mon, 2 Nov 2015, Chris J Arges wrote: [...] >

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-03 Thread Josh Poimboeuf
On Tue, Nov 03, 2015 at 08:57:24PM +0100, Jiri Kosina wrote: > On Tue, 3 Nov 2015, Petr Mladek wrote: > > > Also I would omit the suffix at all when it is the first occurrence. It > > will cause that unique symbols will not be numbered. > > That'd mean that the names (including suffixes) are not

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-03 Thread Jiri Kosina
On Tue, 3 Nov 2015, Petr Mladek wrote: > Also I would omit the suffix at all when it is the first occurrence. It > will cause that unique symbols will not be numbered. That'd mean that the names (including suffixes) are not stable, because a particular name that has originally been unique can l

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-03 Thread Josh Poimboeuf
On Tue, Nov 03, 2015 at 05:09:48PM +0100, Miroslav Benes wrote: > On Tue, 3 Nov 2015, Josh Poimboeuf wrote: > > > On Tue, Nov 03, 2015 at 11:52:08AM +0100, Miroslav Benes wrote: > > > On Mon, 2 Nov 2015, Chris J Arges wrote: > > > > > > [...] > > > > > > > +static int klp_get_func_pos_callback(v

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-03 Thread Miroslav Benes
On Tue, 3 Nov 2015, Josh Poimboeuf wrote: > On Tue, Nov 03, 2015 at 11:52:08AM +0100, Miroslav Benes wrote: > > On Mon, 2 Nov 2015, Chris J Arges wrote: > > > > [...] > > > > > +static int klp_get_func_pos_callback(void *data, const char *name, > > > + struct module

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-03 Thread Josh Poimboeuf
On Tue, Nov 03, 2015 at 10:50:05AM +0100, Miroslav Benes wrote: > On Mon, 2 Nov 2015, Chris J Arges wrote: > > > The following directory structure will allow for cases when the same > > function name exists in a single object. > > /sys/kernel/livepatch/// > > There is still a period here and

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-03 Thread Josh Poimboeuf
On Tue, Nov 03, 2015 at 01:44:41PM +0100, Petr Mladek wrote: > Also I would omit the suffix at all when it is the first occurrence. > It will cause that unique symbols will not be numbered. That would make parsing the entry unnecessarily harder and more error-prone. I think it should always have

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-03 Thread Josh Poimboeuf
On Tue, Nov 03, 2015 at 11:52:08AM +0100, Miroslav Benes wrote: > On Mon, 2 Nov 2015, Chris J Arges wrote: > > [...] > > > +static int klp_get_func_pos_callback(void *data, const char *name, > > + struct module *mod, unsigned long addr) > > +{ > > + struct klp_fi

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-03 Thread Petr Mladek
On Tue 2015-11-03 11:52:08, Miroslav Benes wrote: > On Mon, 2 Nov 2015, Chris J Arges wrote: > > [...] > > > +static int klp_get_func_pos_callback(void *data, const char *name, > > + struct module *mod, unsigned long addr) > > +{ > > + struct klp_find_arg *args =

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-03 Thread Miroslav Benes
On Mon, 2 Nov 2015, Chris J Arges wrote: [...] > +static int klp_get_func_pos_callback(void *data, const char *name, > + struct module *mod, unsigned long addr) > +{ > + struct klp_find_arg *args = data; > + > + if ((mod && !args->objname) || (!mod && arg

Re: [PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-03 Thread Miroslav Benes
On Mon, 2 Nov 2015, Chris J Arges wrote: > The following directory structure will allow for cases when the same > function name exists in a single object. > /sys/kernel/livepatch/// There is still a period here and in the documentation :) > The number corresponds to the nth occurrence of t

[PATCH v2] livepatch: old_name.number scheme in livepatch sysfs directory

2015-11-02 Thread Chris J Arges
The following directory structure will allow for cases when the same function name exists in a single object. /sys/kernel/livepatch/// The number corresponds to the nth occurrence of the symbol name in kallsyms for the patched object. An example of this issue is documented here: h