Thread (4 messages) flat view 4 messages, 4 authors, 2017-06-08

Re: [PATCH] powerpc/kernel: Initialize load_tm on task creation

From: Daniel Axtens <hidden>
Date: 2017-06-05 22:52:35

Hi Breno,

Looks good to me.
Currently tsk->thread.load_tm is not initialized in the task creation
and can contain garbage on a new task.

This is an undesired behaviour, since it affects the timing to enable
and disable the transactional memory laziness (disabling and enabling
the MSR TM bit, which affects TM reclaim and recheckpoint in the
scheduling process).
Is there any chance this uninitialised memory will leak something
interesting/sensitive? (Therefore, should this go to stable?)

Regards,
Daniel

quoted hunk ↗ jump to hunk
CC: Anton Blanchard <redacted>
Fixes: 5d176f751ee3c6eededd984ad409bff201f436a7
Signed-off-by: Breno Leitao <leitao@debian.org>
---
 arch/powerpc/kernel/process.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index a9435397eab8..2ad725ef4368 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -1687,6 +1687,7 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
 	current->thread.tm_tfhar = 0;
 	current->thread.tm_texasr = 0;
 	current->thread.tm_tfiar = 0;
+	current->thread.load_tm = 0;
 #endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
 }
 EXPORT_SYMBOL(start_thread);
-- 
2.11.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help