Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-24 Thread Miroslav Benes
On Wed, 24 May 2017, Petr Mladek wrote: > On Thu 2017-05-18 14:00:43, Miroslav Benes wrote: > > If a task sleeps in a set of patched functions uninterruptibly, it could > > block the whole transition process indefinitely. Thus it may be useful > > to clear its TIF_P

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-24 Thread Miroslav Benes
On Tue, 23 May 2017, Josh Poimboeuf wrote: > On Thu, May 18, 2017 at 02:00:43PM +0200, Miroslav Benes wrote: > > If a task sleeps in a set of patched functions uninterruptibly, it could > > block the whole transition process indefinitely. Thus it may be useful > > to clear

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-24 Thread Miroslav Benes
On Tue, 23 May 2017, Josh Poimboeuf wrote: > On Thu, May 18, 2017 at 02:00:43PM +0200, Miroslav Benes wrote: > > If a task sleeps in a set of patched functions uninterruptibly, it could > > block the whole transition process indefinitely. Thus it may be useful > > to clear

Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks

2017-05-24 Thread Miroslav Benes
On Tue, 23 May 2017, Josh Poimboeuf wrote: > On Thu, May 18, 2017 at 02:00:42PM +0200, Miroslav Benes wrote: > > @@ -551,3 +551,43 @@ void klp_copy_process(struct task_struct *child) > > > > /* TIF_PATCH_PENDING gets copied in setup_thread_stack() */ > > }

Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks

2017-05-24 Thread Miroslav Benes
On Tue, 23 May 2017, Josh Poimboeuf wrote: > On Thu, May 18, 2017 at 02:00:42PM +0200, Miroslav Benes wrote: > > @@ -551,3 +551,43 @@ void klp_copy_process(struct task_struct *child) > > > > /* TIF_PATCH_PENDING gets copied in setup_thread_stack() */ > > }

Re: [PATCH 2/6] module: use list_for_each_entry_rcu() on find_module_all()

2017-05-23 Thread Miroslav Benes
On Thu, 18 May 2017, Luis R. Rodriguez wrote: > The module list has been using RCU in a lot of other calls > for a while now, we just overlooked changing this one over to > use RCU. > > Signed-off-by: Luis R. Rodriguez > --- > kernel/module.c | 2 +- > 1 file changed, 1

Re: [PATCH 2/6] module: use list_for_each_entry_rcu() on find_module_all()

2017-05-23 Thread Miroslav Benes
On Thu, 18 May 2017, Luis R. Rodriguez wrote: > The module list has been using RCU in a lot of other calls > for a while now, we just overlooked changing this one over to > use RCU. > > Signed-off-by: Luis R. Rodriguez > --- > kernel/module.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks

2017-05-19 Thread Miroslav Benes
> > If not, we get back to exit_to_usermode_loop() and TIF_PATCH_PENDING is > > cleared. Yes, it is true that TIF_SIGPENDING is still set and we get to > > do_signal() once more. But for the last time. > > Yes, slightly sub-optimal but not really wrong and you can swap > do_signal() and

Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks

2017-05-19 Thread Miroslav Benes
> > If not, we get back to exit_to_usermode_loop() and TIF_PATCH_PENDING is > > cleared. Yes, it is true that TIF_SIGPENDING is still set and we get to > > do_signal() once more. But for the last time. > > Yes, slightly sub-optimal but not really wrong and you can swap > do_signal() and

Re: [PATCH v2] tracing: Make sure RCU is watching before calling a stack trace

2017-05-18 Thread Miroslav Benes
On Thu, 18 May 2017, Steven Rostedt wrote: > On Thu, 18 May 2017 15:48:55 +0200 (CEST) > Miroslav Benes <mbe...@suse.cz> wrote: > > > On Thu, 18 May 2017, Steven Rostedt wrote: > > > > > > > > From: "Steven Rostedt (VMware)" <rost...@go

Re: [PATCH v2] tracing: Make sure RCU is watching before calling a stack trace

2017-05-18 Thread Miroslav Benes
On Thu, 18 May 2017, Steven Rostedt wrote: > On Thu, 18 May 2017 15:48:55 +0200 (CEST) > Miroslav Benes wrote: > > > On Thu, 18 May 2017, Steven Rostedt wrote: > > > > > > > > From: "Steven Rostedt (VMware)" > > > > > > As

Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks

2017-05-18 Thread Miroslav Benes
On Thu, 18 May 2017, Oleg Nesterov wrote: > I didn't see other patches in series, not sure I understand... There is nothing relevant to this patch, I think. I did not want to bother you with it. > On 05/18, Miroslav Benes wrote: > > > > The very safe marking is done in

Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks

2017-05-18 Thread Miroslav Benes
On Thu, 18 May 2017, Oleg Nesterov wrote: > I didn't see other patches in series, not sure I understand... There is nothing relevant to this patch, I think. I did not want to bother you with it. > On 05/18, Miroslav Benes wrote: > > > > The very safe marking is done in

Re: [PATCH v2] tracing: Make sure RCU is watching before calling a stack trace

2017-05-18 Thread Miroslav Benes
On Thu, 18 May 2017, Steven Rostedt wrote: > > From: "Steven Rostedt (VMware)" > > As stack tracing now requires "rcu watching", force RCU to be watching when > recording a stack trace. > > Link: http://lkml.kernel.org/r/20170512172449.879684...@goodmis.org > > Cc: "Paul

Re: [PATCH v2] tracing: Make sure RCU is watching before calling a stack trace

2017-05-18 Thread Miroslav Benes
On Thu, 18 May 2017, Steven Rostedt wrote: > > From: "Steven Rostedt (VMware)" > > As stack tracing now requires "rcu watching", force RCU to be watching when > recording a stack trace. > > Link: http://lkml.kernel.org/r/20170512172449.879684...@goodmis.org > > Cc: "Paul E. McKenney" >

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-18 Thread Miroslav Benes
On Thu, 18 May 2017, Libor Pechacek wrote: > On Thu 18-05-17 14:00:43, Miroslav Benes wrote: > [...] > > Admin can do that now by writing 2 to force sysfs attribute in livepatch > > sysfs directory. TIF_PATCH_PENDING is then cleared for all tasks and the > > transition

Re: [PATCH 3/3] livepatch: force transition process to finish

2017-05-18 Thread Miroslav Benes
On Thu, 18 May 2017, Libor Pechacek wrote: > On Thu 18-05-17 14:00:43, Miroslav Benes wrote: > [...] > > Admin can do that now by writing 2 to force sysfs attribute in livepatch > > sysfs directory. TIF_PATCH_PENDING is then cleared for all tasks and the > > transition

Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks

2017-05-18 Thread Miroslav Benes
On Thu, 18 May 2017, Libor Pechacek wrote: > On Thu 18-05-17 14:00:42, Miroslav Benes wrote: > [...] > > --- a/include/linux/livepatch.h > > +++ b/include/linux/livepatch.h > > @@ -29,6 +29,9 @@ > > > > #include > > > > +/* values for sysf

Re: [PATCH 2/3] livepatch: send a fake signal to all blocking tasks

2017-05-18 Thread Miroslav Benes
On Thu, 18 May 2017, Libor Pechacek wrote: > On Thu 18-05-17 14:00:42, Miroslav Benes wrote: > [...] > > --- a/include/linux/livepatch.h > > +++ b/include/linux/livepatch.h > > @@ -29,6 +29,9 @@ > > > > #include > > > > +/* values for sysf

Re: [PATCH 1/3] livepatch: Add force sysfs attribute

2017-05-18 Thread Miroslav Benes
On Thu, 18 May 2017, Libor Pechacek wrote: > On Thu 18-05-17 14:00:41, Miroslav Benes wrote: > > > > + pr_info("no patching in progress. Force not allowed\n"); > > proposing smoother wording and information sharing > pr_info("no patching in p

Re: [PATCH 1/3] livepatch: Add force sysfs attribute

2017-05-18 Thread Miroslav Benes
On Thu, 18 May 2017, Libor Pechacek wrote: > On Thu 18-05-17 14:00:41, Miroslav Benes wrote: > > > > + pr_info("no patching in progress. Force not allowed\n"); > > proposing smoother wording and information sharing > pr_info("no patching in p

[PATCH 2/3] livepatch: send a fake signal to all blocking tasks

2017-05-18 Thread Miroslav Benes
till it continues again (is not traced anymore). Last, sending the fake signal is not automatic. It is done only when admin requests it by writing 1 to force sysfs attribute in livepatch sysfs directory. Cc: Oleg Nesterov <o...@redhat.com> Signed-off-by: Miroslav Benes <mbe...@suse.cz>

[PATCH 3/3] livepatch: force transition process to finish

2017-05-18 Thread Miroslav Benes
-by: Miroslav Benes <mbe...@suse.cz> --- include/linux/livepatch.h | 1 + kernel/livepatch/core.c | 3 +++ kernel/livepatch/transition.c | 16 kernel/livepatch/transition.h | 1 + 4 files changed, 21 insertions(+) diff --git a/include/linux/livepatch.h b/include

[PATCH 2/3] livepatch: send a fake signal to all blocking tasks

2017-05-18 Thread Miroslav Benes
till it continues again (is not traced anymore). Last, sending the fake signal is not automatic. It is done only when admin requests it by writing 1 to force sysfs attribute in livepatch sysfs directory. Cc: Oleg Nesterov Signed-off-by: Miroslav Benes --- include/linux/livepatch.h | 3

[PATCH 3/3] livepatch: force transition process to finish

2017-05-18 Thread Miroslav Benes
-by: Miroslav Benes --- include/linux/livepatch.h | 1 + kernel/livepatch/core.c | 3 +++ kernel/livepatch/transition.c | 16 kernel/livepatch/transition.h | 1 + 4 files changed, 21 insertions(+) diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h index

[PATCH 0/3] livepatch: Introduce force sysfs attribute

2017-05-18 Thread Miroslav Benes
clearing of the flag. Miroslav Benes (3): livepatch: Add force sysfs attribute livepatch: send a fake signal to all blocking tasks livepatch: force transition process to finish Documentation/ABI/testing/sysfs-kernel-livepatch | 9 include/linux/livepatch.h| 4

[PATCH 0/3] livepatch: Introduce force sysfs attribute

2017-05-18 Thread Miroslav Benes
clearing of the flag. Miroslav Benes (3): livepatch: Add force sysfs attribute livepatch: send a fake signal to all blocking tasks livepatch: force transition process to finish Documentation/ABI/testing/sysfs-kernel-livepatch | 9 include/linux/livepatch.h| 4

[PATCH 1/3] livepatch: Add force sysfs attribute

2017-05-18 Thread Miroslav Benes
we omit the lock here. The resulting race window is harmless (using force when there is no transaction running). Signed-off-by: Miroslav Benes <mbe...@suse.cz> --- Documentation/ABI/testing/sysfs-kernel-livepatch | 9 + kernel/livepatch/core.c

[PATCH 1/3] livepatch: Add force sysfs attribute

2017-05-18 Thread Miroslav Benes
we omit the lock here. The resulting race window is harmless (using force when there is no transaction running). Signed-off-by: Miroslav Benes --- Documentation/ABI/testing/sysfs-kernel-livepatch | 9 + kernel/livepatch/core.c | 45 2 files

Re: [PATCH 2/3] livepatch/rcu: Warn when system consistency is broken in RCU code

2017-05-11 Thread Miroslav Benes
On Mon, 8 May 2017, Steven Rostedt wrote: > On Mon, 8 May 2017 14:47:29 -0500 > Josh Poimboeuf wrote: > > > > Although you should have: > > > > > > if (WARN_ONCE(!rcu_is_watching, > > > "Livepatch ...")) > > > return; > > > > > > or something

Re: [PATCH 2/3] livepatch/rcu: Warn when system consistency is broken in RCU code

2017-05-11 Thread Miroslav Benes
On Mon, 8 May 2017, Steven Rostedt wrote: > On Mon, 8 May 2017 14:47:29 -0500 > Josh Poimboeuf wrote: > > > > Although you should have: > > > > > > if (WARN_ONCE(!rcu_is_watching, > > > "Livepatch ...")) > > > return; > > > > > > or something to not cause any

Re: [PATCH 2/3] livepatch/rcu: Warn when system consistency is broken in RCU code

2017-05-11 Thread Miroslav Benes
Being somewhat late to the party I missed all the fun... On Wed, 10 May 2017, Josh Poimboeuf wrote: > On Wed, May 10, 2017 at 06:04:23PM +0200, Petr Mladek wrote: > > > IMHO, the point is that RCU must be aware when we call > > rcu_read_lock()/unlock(). > > > > My understanding is that

Re: [PATCH 2/3] livepatch/rcu: Warn when system consistency is broken in RCU code

2017-05-11 Thread Miroslav Benes
Being somewhat late to the party I missed all the fun... On Wed, 10 May 2017, Josh Poimboeuf wrote: > On Wed, May 10, 2017 at 06:04:23PM +0200, Petr Mladek wrote: > > > IMHO, the point is that RCU must be aware when we call > > rcu_read_lock()/unlock(). > > > > My understanding is that

Re: [PATCH] livepatch: Cancel transition a safe way for immediate patches

2017-04-11 Thread Miroslav Benes
ransition even for immediate patches/funcs. But for now, removing the code is the best. Acked-by: Miroslav Benes <mbe...@suse.cz> Jiri, this (obviously) needs to go to 4.12 with the patch set... Miroslav > kernel/livepatch/transition.c | 20 > 1 file cha

Re: [PATCH] livepatch: Cancel transition a safe way for immediate patches

2017-04-11 Thread Miroslav Benes
for immediate patches/funcs. But for now, removing the code is the best. Acked-by: Miroslav Benes Jiri, this (obviously) needs to go to 4.12 with the patch set... Miroslav > kernel/livepatch/transition.c | 20 > 1 file changed, 20 deletions(-) > > diff --git

Re: [PATCH v2] livepatch: Reduce the time of finding module symbols

2017-03-30 Thread Miroslav Benes
0m1.007s > user 0m0.032s > sys 0m0.924s > > Signed-off-by: Zhou Chengming <zhouchengmi...@huawei.com> We are the only user of kallsyms_on_each_symbol() interface right now, so it is not that bad to optimize here. Temporarily :) Acked-by: Miroslav Benes <mbe...@suse.cz> Miroslav

Re: [PATCH v2] livepatch: Reduce the time of finding module symbols

2017-03-30 Thread Miroslav Benes
0m1.007s > user 0m0.032s > sys 0m0.924s > > Signed-off-by: Zhou Chengming We are the only user of kallsyms_on_each_symbol() interface right now, so it is not that bad to optimize here. Temporarily :) Acked-by: Miroslav Benes Miroslav

Re: [PATCH v2] module: check if memory leak by module.

2017-03-29 Thread Miroslav Benes
On Wed, 29 Mar 2017, Michal Hocko wrote: > On Wed 29-03-17 11:32:02, Maninder Singh wrote: > > This patch checks if any module which is going to be unloaded > > is doing vmalloc memory leak or not. > > Hmm, how can you track _all_ vmalloc allocations done on behalf of the > module? It is quite

Re: [PATCH v2] module: check if memory leak by module.

2017-03-29 Thread Miroslav Benes
On Wed, 29 Mar 2017, Michal Hocko wrote: > On Wed 29-03-17 11:32:02, Maninder Singh wrote: > > This patch checks if any module which is going to be unloaded > > is doing vmalloc memory leak or not. > > Hmm, how can you track _all_ vmalloc allocations done on behalf of the > module? It is quite

Re: [PATCH] reduce the time of finding symbols for module

2017-03-28 Thread Miroslav Benes
On Tue, 28 Mar 2017, zhouchengming wrote: > On 2017/3/28 17:00, Miroslav Benes wrote: > > > > Hi, > > > > On Tue, 28 Mar 2017, Zhou Chengming wrote: > > > > > It's reported that the time of insmoding a klp.ko for one of our > > > out-tree m

Re: [PATCH] reduce the time of finding symbols for module

2017-03-28 Thread Miroslav Benes
On Tue, 28 Mar 2017, zhouchengming wrote: > On 2017/3/28 17:00, Miroslav Benes wrote: > > > > Hi, > > > > On Tue, 28 Mar 2017, Zhou Chengming wrote: > > > > > It's reported that the time of insmoding a klp.ko for one of our > > > out-tree m

Re: [PATCH] reduce the time of finding symbols for module

2017-03-28 Thread Miroslav Benes
Hi, On Tue, 28 Mar 2017, Zhou Chengming wrote: > It's reported that the time of insmoding a klp.ko for one of our > out-tree modules is too long. > > ~ time sudo insmod klp.ko > real 0m23.799s > user 0m0.036s > sys 0m21.256s Is this stable through several (>=10) runs? 23 seconds are

Re: [PATCH] reduce the time of finding symbols for module

2017-03-28 Thread Miroslav Benes
Hi, On Tue, 28 Mar 2017, Zhou Chengming wrote: > It's reported that the time of insmoding a klp.ko for one of our > out-tree modules is too long. > > ~ time sudo insmod klp.ko > real 0m23.799s > user 0m0.036s > sys 0m21.256s Is this stable through several (>=10) runs? 23 seconds are

Re: [PATCH] audit: log module name on delete_module

2017-03-09 Thread Miroslav Benes
On Thu, 9 Mar 2017, Richard Guy Briggs wrote: > Record the module name of a delete_module call. > > See: https://github.com/linux-audit/audit-kernel/issues/37 > > Signed-off-by: Richard Guy Briggs Could you improve the changelog, please? I don't think that a link to a github

Re: [PATCH] audit: log module name on delete_module

2017-03-09 Thread Miroslav Benes
On Thu, 9 Mar 2017, Richard Guy Briggs wrote: > Record the module name of a delete_module call. > > See: https://github.com/linux-audit/audit-kernel/issues/37 > > Signed-off-by: Richard Guy Briggs Could you improve the changelog, please? I don't think that a link to a github issue can and

Re: [PATCH v2] livepatch: make klp_mutex proper part of API

2017-03-08 Thread Miroslav Benes
; This also silences sparse warning (wrongly) suggesting that klp_mutex > should be defined static. > > Signed-off-by: Jiri Kosina <jkos...@suse.cz> Acked-by: Miroslav Benes <mbe...@suse.cz> Miroslav

Re: [PATCH v2] livepatch: make klp_mutex proper part of API

2017-03-08 Thread Miroslav Benes
arse warning (wrongly) suggesting that klp_mutex > should be defined static. > > Signed-off-by: Jiri Kosina Acked-by: Miroslav Benes Miroslav

Re: [PATCH] livepatch: make klp_mutex proper part of API

2017-03-08 Thread Miroslav Benes
On Wed, 8 Mar 2017, Josh Poimboeuf wrote: > On Wed, Mar 08, 2017 at 10:16:00AM +0100, Jiri Kosina wrote: > > From: Jiri Kosina > > > > klp_mutex is shared between core.c and transition.c, and as such would > > rather be properly located in livepatch.h so that we don't have to

Re: [PATCH] livepatch: make klp_mutex proper part of API

2017-03-08 Thread Miroslav Benes
On Wed, 8 Mar 2017, Josh Poimboeuf wrote: > On Wed, Mar 08, 2017 at 10:16:00AM +0100, Jiri Kosina wrote: > > From: Jiri Kosina > > > > klp_mutex is shared between core.c and transition.c, and as such would > > rather be properly located in livepatch.h so that we don't have to play > >

Re: [PATCH] livepatch: make klp_mutex proper part of API

2017-03-08 Thread Miroslav Benes
_mutex; > - A nit, but could you also include "linux/livepatch.h" in transition.c to make the dependency explicit (and not through patch.h or transition.h)? Anyway, not a big deal and you can add my Acked-by: Miroslav Benes <mbe...@suse.cz> Miroslav

Re: [PATCH] livepatch: make klp_mutex proper part of API

2017-03-08 Thread Miroslav Benes
ude "linux/livepatch.h" in transition.c to make the dependency explicit (and not through patch.h or transition.h)? Anyway, not a big deal and you can add my Acked-by: Miroslav Benes Miroslav

Re: [PATCH v5.1 15/15] livepatch: allow removal of a disabled patch

2017-03-07 Thread Miroslav Benes
ay and prevent these > races by design. But it made the patch definition more complicated > and opened another can of worms. See > https://lkml.kernel.org/r/1464018848-4303-1-git-send-email-pmla...@suse.com > > [Thanks to Petr Mladek for improving the commit message.] > > Signed-off-by: Mi

Re: [PATCH v5.1 15/15] livepatch: allow removal of a disabled patch

2017-03-07 Thread Miroslav Benes
ay and prevent these > races by design. But it made the patch definition more complicated > and opened another can of worms. See > https://lkml.kernel.org/r/1464018848-4303-1-git-send-email-pmla...@suse.com > > [Thanks to Petr Mladek for improving the commit message.] > > Signe

Re: [PATCH v5 13/15] livepatch: change to a per-task consistency model

2017-03-07 Thread Miroslav Benes
e /sys/kernel/livepatch//enabled file while > the transition is in progress. Then all the tasks will attempt to > converge back to the original patch state. > > [1] https://lkml.kernel.org/r/20141107140458.ga21...@suse.cz > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> I looked at the patch again and could not see any problem with it. I tested it with a couple of live patches too and it worked as expected. Good job. Acked-by: Miroslav Benes <mbe...@suse.cz> Thanks, Miroslav

Re: [PATCH v5 13/15] livepatch: change to a per-task consistency model

2017-03-07 Thread Miroslav Benes
the /sys/kernel/livepatch//enabled file while > the transition is in progress. Then all the tasks will attempt to > converge back to the original patch state. > > [1] https://lkml.kernel.org/r/20141107140458.ga21...@suse.cz > > Signed-off-by: Josh Poimboeuf I looked at the patch again and could not see any problem with it. I tested it with a couple of live patches too and it worked as expected. Good job. Acked-by: Miroslav Benes Thanks, Miroslav

Re: [PATCH RFC 0/2] livepatch: patch creation tooling proposal

2017-03-01 Thread Miroslav Benes
On Thu, 27 Oct 2016, Josh Poimboeuf wrote: > TODO: > - support .klp.arch.objname..altinstructions/parainstructions > - split up the patches better > - patch creation documentation > - more tooling support for detecting missing relocations? or > automatically converting them if a sympos isn't

Re: [PATCH RFC 0/2] livepatch: patch creation tooling proposal

2017-03-01 Thread Miroslav Benes
On Thu, 27 Oct 2016, Josh Poimboeuf wrote: > TODO: > - support .klp.arch.objname..altinstructions/parainstructions > - split up the patches better > - patch creation documentation > - more tooling support for detecting missing relocations? or > automatically converting them if a sympos isn't

Re: [PATCH v5 13/15] livepatch: change to a per-task consistency model

2017-02-22 Thread Miroslav Benes
On Tue, 21 Feb 2017, Josh Poimboeuf wrote: > On Fri, Feb 17, 2017 at 09:51:29AM +0100, Miroslav Benes wrote: > > On Thu, 16 Feb 2017, Josh Poimboeuf wrote: > > > What do you think about the following? I tried to put the logic in > > > klp_complete_transition(),

Re: [PATCH v5 13/15] livepatch: change to a per-task consistency model

2017-02-22 Thread Miroslav Benes
On Tue, 21 Feb 2017, Josh Poimboeuf wrote: > On Fri, Feb 17, 2017 at 09:51:29AM +0100, Miroslav Benes wrote: > > On Thu, 16 Feb 2017, Josh Poimboeuf wrote: > > > What do you think about the following? I tried to put the logic in > > > klp_complete_transition(),

Re: [PATCH v5 00/15] livepatch: hybrid consistency model

2017-02-17 Thread Miroslav Benes
On Mon, 13 Feb 2017, Josh Poimboeuf wrote: > Here's v5 of the consistency model, targeted for 4.12. Only a few minor > changes this time. > > v5: > - return -EINVAL in __save_stack_trace_reliable() > - only call show_stack() once > - add save_stack_trace_tsk_reliable() define for

Re: [PATCH v5 00/15] livepatch: hybrid consistency model

2017-02-17 Thread Miroslav Benes
On Mon, 13 Feb 2017, Josh Poimboeuf wrote: > Here's v5 of the consistency model, targeted for 4.12. Only a few minor > changes this time. > > v5: > - return -EINVAL in __save_stack_trace_reliable() > - only call show_stack() once > - add save_stack_trace_tsk_reliable() define for

Re: [PATCH v5 13/15] livepatch: change to a per-task consistency model

2017-02-17 Thread Miroslav Benes
On Thu, 16 Feb 2017, Josh Poimboeuf wrote: > On Thu, Feb 16, 2017 at 03:33:26PM +0100, Miroslav Benes wrote: > > > > > @@ -347,22 +356,36 @@ static int __klp_enable_patch(struct klp_patch > > > *patch) > > > > > > pr_not

Re: [PATCH v5 13/15] livepatch: change to a per-task consistency model

2017-02-17 Thread Miroslav Benes
On Thu, 16 Feb 2017, Josh Poimboeuf wrote: > On Thu, Feb 16, 2017 at 03:33:26PM +0100, Miroslav Benes wrote: > > > > > @@ -347,22 +356,36 @@ static int __klp_enable_patch(struct klp_patch > > > *patch) > > > > > > pr_not

Re: [PATCH v5 13/15] livepatch: change to a per-task consistency model

2017-02-16 Thread Miroslav Benes
> @@ -347,22 +356,36 @@ static int __klp_enable_patch(struct klp_patch *patch) > > pr_notice("enabling patch '%s'\n", patch->mod->name); > > + klp_init_transition(patch, KLP_PATCHED); > + > + /* > + * Enforce the order of the func->transition writes in > + *

Re: [PATCH v5 13/15] livepatch: change to a per-task consistency model

2017-02-16 Thread Miroslav Benes
> @@ -347,22 +356,36 @@ static int __klp_enable_patch(struct klp_patch *patch) > > pr_notice("enabling patch '%s'\n", patch->mod->name); > > + klp_init_transition(patch, KLP_PATCHED); > + > + /* > + * Enforce the order of the func->transition writes in > + *

Re: [PATCH v5 01/15] stacktrace/x86: add function for detecting reliable stack traces

2017-02-15 Thread Miroslav Benes
tries array > > Such issues are reported by checking unwind_error() and !unwind_done(). > > Also add CONFIG_HAVE_RELIABLE_STACKTRACE so arch-independent code can > determine at build time whether the function is implemented. > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.c

Re: [PATCH v5 01/15] stacktrace/x86: add function for detecting reliable stack traces

2017-02-15 Thread Miroslav Benes
tries array > > Such issues are reported by checking unwind_error() and !unwind_done(). > > Also add CONFIG_HAVE_RELIABLE_STACKTRACE so arch-independent code can > determine at build time whether the function is implemented. > > Signed-off-by: Josh Poimboeuf I do not se

Re: [PATCH v4 13/15] livepatch: change to a per-task consistency model

2017-02-07 Thread Miroslav Benes
> > And finally, the section "Limitations" has this text under the first > > bullet: > > > > + The patch must not change the semantic of the patched functions. > > > > The current implementation guarantees only that either the old > > or the new function is called. The functions are

Re: [PATCH v4 13/15] livepatch: change to a per-task consistency model

2017-02-07 Thread Miroslav Benes
> > And finally, the section "Limitations" has this text under the first > > bullet: > > > > + The patch must not change the semantic of the patched functions. > > > > The current implementation guarantees only that either the old > > or the new function is called. The functions are

Re: [PATCH v4 15/15] livepatch: allow removal of a disabled patch

2017-02-03 Thread Miroslav Benes
On Thu, 19 Jan 2017, Josh Poimboeuf wrote: > From: Miroslav Benes <mbe...@suse.cz> > > Currently we do not allow patch module to unload since there is no > method to determine if a task is still running in the patched code. > > The consistency model gives us the way bec

Re: [PATCH v4 15/15] livepatch: allow removal of a disabled patch

2017-02-03 Thread Miroslav Benes
On Thu, 19 Jan 2017, Josh Poimboeuf wrote: > From: Miroslav Benes > > Currently we do not allow patch module to unload since there is no > method to determine if a task is still running in the patched code. > > The consistency model gives us the way because when the unpatc

Re: [PATCH v4 13/15] livepatch: change to a per-task consistency model

2017-02-03 Thread Miroslav Benes
Petr has already mentioned majority of things I too found out, so only couple of nits... > diff --git a/Documentation/ABI/testing/sysfs-kernel-livepatch > b/Documentation/ABI/testing/sysfs-kernel-livepatch > index da87f43..24b6570 100644 > --- a/Documentation/ABI/testing/sysfs-kernel-livepatch

Re: [PATCH v4 13/15] livepatch: change to a per-task consistency model

2017-02-03 Thread Miroslav Benes
Petr has already mentioned majority of things I too found out, so only couple of nits... > diff --git a/Documentation/ABI/testing/sysfs-kernel-livepatch > b/Documentation/ABI/testing/sysfs-kernel-livepatch > index da87f43..24b6570 100644 > --- a/Documentation/ABI/testing/sysfs-kernel-livepatch

Re: [PATCH v4 13/15] livepatch: change to a per-task consistency model

2017-02-03 Thread Miroslav Benes
On Thu, 2 Feb 2017, Petr Mladek wrote: > > diff --git a/Documentation/livepatch/livepatch.txt > > b/Documentation/livepatch/livepatch.txt > > index 7f04e13..fb00d66 100644 > > --- a/Documentation/livepatch/livepatch.txt > > +++ b/Documentation/livepatch/livepatch.txt > > > + In that case,

Re: [PATCH v4 13/15] livepatch: change to a per-task consistency model

2017-02-03 Thread Miroslav Benes
On Thu, 2 Feb 2017, Petr Mladek wrote: > > diff --git a/Documentation/livepatch/livepatch.txt > > b/Documentation/livepatch/livepatch.txt > > index 7f04e13..fb00d66 100644 > > --- a/Documentation/livepatch/livepatch.txt > > +++ b/Documentation/livepatch/livepatch.txt > > > + In that case,

Re: [PATCH] modules: mark __inittest/__exittest as __maybe_unused

2017-02-02 Thread Miroslav Benes
t' > [-Wunused-function] > > As these appear in every single module, let's just disable the warnings by > marking the > two functions as __maybe_unused. > > Signed-off-by: Arnd Bergmann <a...@arndb.de> Makes sense. Reviewed-by: Miroslav Benes <mbe...@suse.cz> Regards, Miroslav

Re: [PATCH] modules: mark __inittest/__exittest as __maybe_unused

2017-02-02 Thread Miroslav Benes
t' > [-Wunused-function] > > As these appear in every single module, let's just disable the warnings by > marking the > two functions as __maybe_unused. > > Signed-off-by: Arnd Bergmann Makes sense. Reviewed-by: Miroslav Benes Regards, Miroslav

Re: [PATCH v4.1 01/15] stacktrace/x86: add function for detecting reliable stack traces

2017-02-02 Thread Miroslav Benes
tries array > > Such issues are reported by checking unwind_error() and !unwind_done(). > > Also add CONFIG_HAVE_RELIABLE_STACKTRACE so arch-independent code can > determine at build time whether the function is implemented. > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Looks good to me. Reviewed-by: Miroslav Benes <mbe...@suse.cz> Miroslav

Re: [PATCH v4.1 01/15] stacktrace/x86: add function for detecting reliable stack traces

2017-02-02 Thread Miroslav Benes
tries array > > Such issues are reported by checking unwind_error() and !unwind_done(). > > Also add CONFIG_HAVE_RELIABLE_STACKTRACE so arch-independent code can > determine at build time whether the function is implemented. > > Signed-off-by: Josh Poimboeuf Looks good to me. Reviewed-by: Miroslav Benes Miroslav

Re: [PATCH v4 00/15] livepatch: hybrid consistency model

2017-02-01 Thread Miroslav Benes
On Wed, 1 Feb 2017, Josh Poimboeuf wrote: > On Thu, Jan 19, 2017 at 09:46:08AM -0600, Josh Poimboeuf wrote: > > Here's v4, based on linux-next/master. Mostly minor changes this time, > > primarily due to Petr's v3 comments. > > So far, the only review comments have been related to the first

Re: [PATCH v4 00/15] livepatch: hybrid consistency model

2017-02-01 Thread Miroslav Benes
On Wed, 1 Feb 2017, Josh Poimboeuf wrote: > On Thu, Jan 19, 2017 at 09:46:08AM -0600, Josh Poimboeuf wrote: > > Here's v4, based on linux-next/master. Mostly minor changes this time, > > primarily due to Petr's v3 comments. > > So far, the only review comments have been related to the first

Re: [PATCH v4 14/15] livepatch: add /proc//patch_state

2017-02-01 Thread Miroslav Benes
On Tue, 31 Jan 2017, Josh Poimboeuf wrote: > On Tue, Jan 31, 2017 at 03:31:39PM +0100, Miroslav Benes wrote: > > On Thu, 19 Jan 2017, Josh Poimboeuf wrote: > > > > > Expose the per-task patch state value so users can determine which tasks > > > are holding up c

Re: [PATCH v4 14/15] livepatch: add /proc//patch_state

2017-02-01 Thread Miroslav Benes
On Tue, 31 Jan 2017, Josh Poimboeuf wrote: > On Tue, Jan 31, 2017 at 03:31:39PM +0100, Miroslav Benes wrote: > > On Thu, 19 Jan 2017, Josh Poimboeuf wrote: > > > > > Expose the per-task patch state value so users can determine which tasks > > > are holding up c

Re: [PATCH v4 14/15] livepatch: add /proc//patch_state

2017-01-31 Thread Miroslav Benes
On Thu, 19 Jan 2017, Josh Poimboeuf wrote: > Expose the per-task patch state value so users can determine which tasks > are holding up completion of a patching operation. > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> > Reviewed-by: Petr Mladek <pmla...@suse.com&

Re: [PATCH v4 14/15] livepatch: add /proc//patch_state

2017-01-31 Thread Miroslav Benes
On Thu, 19 Jan 2017, Josh Poimboeuf wrote: > Expose the per-task patch state value so users can determine which tasks > are holding up completion of a patching operation. > > Signed-off-by: Josh Poimboeuf > Reviewed-by: Petr Mladek > Reviewed-by: Miroslav Benes >

Re: [PATCH v4 03/15] livepatch: create temporary klp_update_patch_state() stub

2017-01-27 Thread Miroslav Benes
; > Reviewed-by: Petr Mladek <pmla...@suse.com> Acked-by: Miroslav Benes <mbe...@suse.cz> Miroslav

Re: [PATCH v4 03/15] livepatch: create temporary klp_update_patch_state() stub

2017-01-27 Thread Miroslav Benes
etr Mladek Acked-by: Miroslav Benes Miroslav

Re: [PATCH v4 01/15] stacktrace/x86: add function for detecting reliable stack traces

2017-01-27 Thread Miroslav Benes
> diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h > index 0a34489..8e8b67b 100644 > --- a/include/linux/stacktrace.h > +++ b/include/linux/stacktrace.h > @@ -18,6 +18,8 @@ extern void save_stack_trace_regs(struct pt_regs *regs, > struct

Re: [PATCH v4 01/15] stacktrace/x86: add function for detecting reliable stack traces

2017-01-27 Thread Miroslav Benes
> diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h > index 0a34489..8e8b67b 100644 > --- a/include/linux/stacktrace.h > +++ b/include/linux/stacktrace.h > @@ -18,6 +18,8 @@ extern void save_stack_trace_regs(struct pt_regs *regs, > struct

Re: [PATCH] livepatch: add missing printk newlines

2017-01-25 Thread Miroslav Benes
On Tue, 24 Jan 2017, Josh Poimboeuf wrote: > Add missing newlines to some pr_err() strings. > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Acked-by: Miroslav Benes <mbe...@suse.cz> Miroslav

Re: [PATCH] livepatch: add missing printk newlines

2017-01-25 Thread Miroslav Benes
On Tue, 24 Jan 2017, Josh Poimboeuf wrote: > Add missing newlines to some pr_err() strings. > > Signed-off-by: Josh Poimboeuf Acked-by: Miroslav Benes Miroslav

Re: [PATCH 7/7] arm: Add livepatch necessary arch selects into Kconfig

2017-01-18 Thread Miroslav Benes
On Tue, 6 Dec 2016, Abel Vesa wrote: > This adds HAVE_LIVEPATCH, MODULES_USE_ELF_RELA and HAVE_LIVEPATCH > to arm Kconfig. > > Signed-off-by: Abel Vesa > --- > arch/arm/Kconfig | 4 > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig

Re: [PATCH 7/7] arm: Add livepatch necessary arch selects into Kconfig

2017-01-18 Thread Miroslav Benes
On Tue, 6 Dec 2016, Abel Vesa wrote: > This adds HAVE_LIVEPATCH, MODULES_USE_ELF_RELA and HAVE_LIVEPATCH > to arm Kconfig. > > Signed-off-by: Abel Vesa > --- > arch/arm/Kconfig | 4 > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index

Re: [PATCH 6/7] arm: Add livepatch to build if CONFIG_LIVEPATCH

2017-01-18 Thread Miroslav Benes
On Tue, 6 Dec 2016, Abel Vesa wrote: > Necessary livepatch file added to makefile. > > Signed-off-by: Abel Vesa > --- > arch/arm/kernel/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile > index

Re: [PATCH 6/7] arm: Add livepatch to build if CONFIG_LIVEPATCH

2017-01-18 Thread Miroslav Benes
On Tue, 6 Dec 2016, Abel Vesa wrote: > Necessary livepatch file added to makefile. > > Signed-off-by: Abel Vesa > --- > arch/arm/kernel/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile > index ad325a8..9e70220 100644 > ---

Re: arm: module: Add apply_relocate_add

2017-01-18 Thread Miroslav Benes
On Mon, 16 Jan 2017, Jessica Yu wrote: > +++ Abel Vesa [06/12/16 17:06 +]: > > It was only added to fix compiler error. It is not implemented > > yet. > > > > Signed-off-by: Abel Vesa > > --- > > arch/arm/kernel/module.c | 9 + > > 1 file changed, 9 insertions(+)

Re: arm: module: Add apply_relocate_add

2017-01-18 Thread Miroslav Benes
On Mon, 16 Jan 2017, Jessica Yu wrote: > +++ Abel Vesa [06/12/16 17:06 +]: > > It was only added to fix compiler error. It is not implemented > > yet. > > > > Signed-off-by: Abel Vesa > > --- > > arch/arm/kernel/module.c | 9 + > > 1 file changed, 9 insertions(+) > > > > diff --git

Re: arm: Add livepatch arch specific code

2017-01-17 Thread Miroslav Benes
> > But apply_relocate_add() is not implemented on arm yet. I guess it would > > nice to have it... otherwise we could get to an unpleasant situation. > > Livepatch module can rely on its livepatching relocations (that is, there > > are some). apply_relocate_add() returns 0 on arm, so everything

Re: arm: Add livepatch arch specific code

2017-01-17 Thread Miroslav Benes
> > But apply_relocate_add() is not implemented on arm yet. I guess it would > > nice to have it... otherwise we could get to an unpleasant situation. > > Livepatch module can rely on its livepatching relocations (that is, there > > are some). apply_relocate_add() returns 0 on arm, so everything

Re: [PATCH 1/7] arm: Add livepatch arch specific code

2017-01-16 Thread Miroslav Benes
bd182a1..d43b790 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -7466,12 +7466,15 @@ M:Josh Poimboeuf <jpoim...@redhat.com> > M: Jessica Yu <j...@redhat.com> > M: Jiri Kosina <ji...@kernel.org> > M: Miroslav Benes <mbe...@suse.cz> > +

<    3   4   5   6   7   8   9   10   11   12   >