From: Chris Dearman <chris@mips.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH] Avoid potential hazard on Context register
Date: Sun, 11 Oct 2009 13:26:58 -0700 [thread overview]
Message-ID: <4AD23F92.8030902@mips.com> (raw)
In-Reply-To: <20091011145330.GA23369@linux-mips.org>
Ralf Baechle wrote:
> There is no hazard barrier between writes to c0_context and subsequent
> read accesses. This is a fairly theoretical hole as c0_context is only
> written on CPU bootup and other, unrelated code will almost certainly
It was actually in the bootup code where I saw the problem, and this
patch doesn't deal with that case:
> MTC0 zero, CP0_CONTEXT # clear context register
> PTR_LA $28, init_thread_union
> /* Set the SP after an empty pt_regs. */
> PTR_LI sp, _THREAD_SIZE - 32 - PT_SIZE
> PTR_ADDU sp, $28
> back_to_back_c0_hazard
> set_saved_sp sp, t0, t1
The problem I observed is that the Context valuse used by set_saved_sp
is whatever it inherits from YAMON.
Chris
--
Chris Dearman Desk: +1 408 530 5092 Cell: +1 650 224 8603
MIPS Technologies Inc 955 East Arques Ave, Sunnyvale CA 94085
next prev parent reply other threads:[~2009-10-11 20:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-11 6:07 [PATCH] Avoid potential hazard on Context register Chris Dearman
2009-10-11 13:39 ` Ralf Baechle
2009-10-11 14:53 ` Ralf Baechle
2009-10-11 20:26 ` Chris Dearman [this message]
2009-10-12 3:20 ` Ralf Baechle
2009-10-11 20:05 ` Chris Dearman
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=4AD23F92.8030902@mips.com \
--to=chris@mips.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.