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

Re: [PATCH] powerpc/kernel: improve FP and vector registers restoration

From: Breno Leitao <leitao@debian.org>
Date: 2017-06-03 22:42:26

Hi Anton,

On Sat, Jun 03, 2017 at 08:04:11AM +1000, Anton Blanchard wrote:
Hi Breno,
quoted
Currently tsk->thread->load_vec and load_fp are not initialized
during a task creation, which set garbage to these variables
(non-zero value).
Nice catch! It seems like we should zero load_tm too though?
Yes, it seems we need to zero load_tm also, since it does not seem to be
zeroed anywhere else.

But I did some tests, and load_tm is always zero after start_thread()
is being called.

In fact, start_thread() is being called and pt_regs->load_tm is already
zero since the function start.

I also wrote a SystemTap script[1] to investigate it better, and I've
never seen a single load_tm != 0 in a my machine. I tested on both
POWER8 bare metal and KVM guests. (load_vec and load_fp happened to have
garbage all the time)

Any idea if this is just occasional event, or, if there is someone
zeroing it in an obscure code?

[1] https://github.com/leitao/htm_torture/blob/master/systemtap/load_tm_at_start_thread.stap
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help