Re: [PATCH v5 05/15] livepatch/powerpc: add TIF_PATCH_PENDING thread flag

2017-03-07 Thread Michael Ellerman
Josh Poimboeuf  writes:

> Add the TIF_PATCH_PENDING thread flag to enable the new livepatch
> per-task consistency model for powerpc.  The bit getting set indicates
> the thread has a pending patch which needs to be applied when the thread
> exits the kernel.
>
> The bit is included in the _TIF_USER_WORK_MASK macro so that
> do_notify_resume() and klp_update_patch_state() get called when the bit
> is set.
>
> Signed-off-by: Josh Poimboeuf 
> Reviewed-by: Petr Mladek 
> Reviewed-by: Miroslav Benes 
> Reviewed-by: Kamalesh Babulal 
> ---
>  arch/powerpc/include/asm/thread_info.h | 4 +++-
>  arch/powerpc/kernel/signal.c   | 4 
>  2 files changed, 7 insertions(+), 1 deletion(-)

The arch changes here seem fine. I haven't tested the whole series
though.

Acked-by: Michael Ellerman  (powerpc)

cheers


Re: [PATCH v5 05/15] livepatch/powerpc: add TIF_PATCH_PENDING thread flag

2017-03-06 Thread Balbir Singh
On Mon, 2017-02-13 at 19:42 -0600, Josh Poimboeuf wrote:
> Add the TIF_PATCH_PENDING thread flag to enable the new livepatch
> per-task consistency model for powerpc.  The bit getting set indicates
> the thread has a pending patch which needs to be applied when the thread
> exits the kernel.
> 
> The bit is included in the _TIF_USER_WORK_MASK macro so that
> do_notify_resume() and klp_update_patch_state() get called when the bit
> is set.
> 
> Signed-off-by: Josh Poimboeuf 
> Reviewed-by: Petr Mladek 
> Reviewed-by: Miroslav Benes 
> Reviewed-by: Kamalesh Babulal 
> ---

Reviewed-by: Balbir Singh 



[PATCH v5 05/15] livepatch/powerpc: add TIF_PATCH_PENDING thread flag

2017-02-13 Thread Josh Poimboeuf
Add the TIF_PATCH_PENDING thread flag to enable the new livepatch
per-task consistency model for powerpc.  The bit getting set indicates
the thread has a pending patch which needs to be applied when the thread
exits the kernel.

The bit is included in the _TIF_USER_WORK_MASK macro so that
do_notify_resume() and klp_update_patch_state() get called when the bit
is set.

Signed-off-by: Josh Poimboeuf 
Reviewed-by: Petr Mladek 
Reviewed-by: Miroslav Benes 
Reviewed-by: Kamalesh Babulal 
---
 arch/powerpc/include/asm/thread_info.h | 4 +++-
 arch/powerpc/kernel/signal.c   | 4 
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/thread_info.h 
b/arch/powerpc/include/asm/thread_info.h
index 87e4b2d..6fc6464 100644
--- a/arch/powerpc/include/asm/thread_info.h
+++ b/arch/powerpc/include/asm/thread_info.h
@@ -92,6 +92,7 @@ static inline struct thread_info *current_thread_info(void)
   TIF_NEED_RESCHED */
 #define TIF_32BIT  4   /* 32 bit binary */
 #define TIF_RESTORE_TM 5   /* need to restore TM FP/VEC/VSX */
+#define TIF_PATCH_PENDING  6   /* pending live patching update */
 #define TIF_SYSCALL_AUDIT  7   /* syscall auditing active */
 #define TIF_SINGLESTEP 8   /* singlestepping active */
 #define TIF_NOHZ   9   /* in adaptive nohz mode */
@@ -115,6 +116,7 @@ static inline struct thread_info *current_thread_info(void)
 #define _TIF_POLLING_NRFLAG(1<