[U-Boot] [PATCH v5 2/8] ARM: add secure monitor handler to switch to non-secure state

Christoffer Dall
2013-09-20T03:47:18Z

On Fri, Sep 20, 2013 at 08:08:45AM +0530, Mj Embd wrote:
> On Fri, Sep 20, 2013 at 6:12 AM, Christoffer Dall <
> christoffer.dall at linaro.org> wrote:
>
> > On Fri, Sep 20, 2013 at 03:20:15AM +0530, Mj Embd wrote:
> > > Just checking, is the mcr p15,0,r1,c1,c1,0 in sync with the following
> > text
> > > . I could be wrong here, just checking
> >
> > In the future, if you can comment specifically inline on the lines of
> > code you are targeting, it is easier for other people to address your
> > concerns.
> >
> > >
> > > B1.5.1 Arm Arch Ref Manual
> > >
> > > -
> > >
> > > To avoid security holes, software must not:
> > > -
> > >
> > > ? Change from Secure to Non-secure state by using an MSR or CPS
> > > instruction
> > > to switch from Monitor
> >
> > The important part here is that we don't change from S to NS by
> > modifying the SCR, because monitor mode is always in secure mode, so the
> > change only happens on the exception return.
> >
> > So yes, it's safe.
> >
> > -Christoffer
> >
>
> Ok. Good Discussion. Thanks,
> PS: Gmail auto wraps the previous msg in 3 dots, so sometimes I miss
> inlining.
> Thanks for pointing out.
>
No problem, thanks for looking at the code.

-Christoffer