From: Daniel Axtens <dja@axtens•net>
To: Breno Leitao <leitao@debian•org>, linuxppc-dev@lists•ozlabs.org
Cc: Anton Blanchard <anton@samba•org>
Subject: Re: [PATCH] powerpc/kernel: Initialize load_tm on task creation
Date: Tue, 06 Jun 2017 08:52:28 +1000 [thread overview]
Message-ID: <87k24q11zn.fsf@linkitivity.dja.id.au> (raw)
In-Reply-To: <1496673659-18499-1-git-send-email-leitao@debian.org>
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
> CC: Anton Blanchard <anton@samba•org>
> 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
next prev parent reply other threads:[~2017-06-05 22:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-05 14:40 [PATCH] powerpc/kernel: Initialize load_tm on task creation Breno Leitao
2017-06-05 22:52 ` Daniel Axtens [this message]
2017-06-06 4:47 ` Michael Ellerman
2017-06-08 4:05 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k24q11zn.fsf@linkitivity.dja.id.au \
--to=dja@axtens$(echo .)net \
--cc=anton@samba$(echo .)org \
--cc=leitao@debian$(echo .)org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox