* [PATCH for-4.5] xen/arm: Correct the opcode for BUG_INSTR on arm32
@ 2014-12-04 19:26 Julien Grall
2014-12-04 19:34 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 5+ messages in thread
From: Julien Grall @ 2014-12-04 19:26 UTC (permalink / raw)
To: xen-devel; +Cc: stefano.stabellini, Julien Grall, tim, ian.campbell
A 0 was forgotten when the arm32 BUG instruction opcode has been added in commit
3e802c6ca1fb9a9549258c2855a57cad483f3cbd "xen/arm: Correctly support WARN_ON".
This will result to use a valid instruction (mcreq 0, 3, r0, cr15, cr0, {7}),
and inhibit usage of BUG/WARN_ON and co.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
Not sure, why I dropped the 0 when I implemented the patch...
This is a bug fixed for Xen 4.5. This is only affected ARM32 where the
BUG opcode was malformed.
With the malformed opcode, the ASSERT/BUG_ON is skipped and the
processor may execute another patch (because the compiler has optimized
due the unreachable in both macro).
The code modified is only executed when Xen is in bad state.
---
xen/include/asm-arm/arm32/bug.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/include/asm-arm/arm32/bug.h b/xen/include/asm-arm/arm32/bug.h
index 155b420..3e66f35 100644
--- a/xen/include/asm-arm/arm32/bug.h
+++ b/xen/include/asm-arm/arm32/bug.h
@@ -6,7 +6,7 @@
/* ARMv7 provides a list of undefined opcode (see A8.8.247 DDI 0406C.b)
* Use one them encoding A1 to go in exception mode
*/
-#define BUG_OPCODE 0xe7f00f0
+#define BUG_OPCODE 0xe7f000f0
#define BUG_INSTR ".word " __stringify(BUG_OPCODE)
--
2.1.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH for-4.5] xen/arm: Correct the opcode for BUG_INSTR on arm32
2014-12-04 19:26 [PATCH for-4.5] xen/arm: Correct the opcode for BUG_INSTR on arm32 Julien Grall
@ 2014-12-04 19:34 ` Konrad Rzeszutek Wilk
2014-12-05 10:53 ` Julien Grall
2014-12-05 10:54 ` Ian Campbell
0 siblings, 2 replies; 5+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-12-04 19:34 UTC (permalink / raw)
To: Julien Grall; +Cc: xen-devel, tim, ian.campbell, stefano.stabellini
On Thu, Dec 04, 2014 at 07:26:55PM +0000, Julien Grall wrote:
> A 0 was forgotten when the arm32 BUG instruction opcode has been added in commit
> 3e802c6ca1fb9a9549258c2855a57cad483f3cbd "xen/arm: Correctly support WARN_ON".
>
> This will result to use a valid instruction (mcreq 0, 3, r0, cr15, cr0, {7}),
> and inhibit usage of BUG/WARN_ON and co.
>
> Signed-off-by: Julien Grall <julien.grall@linaro.org>
>
> ---
>
> Not sure, why I dropped the 0 when I implemented the patch...
> This is a bug fixed for Xen 4.5. This is only affected ARM32 where the
> BUG opcode was malformed.
>
> With the malformed opcode, the ASSERT/BUG_ON is skipped and the
> processor may execute another patch (because the compiler has optimized
s/patch/path/ ?
> due the unreachable in both macro).
>
> The code modified is only executed when Xen is in bad state.
Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> xen/include/asm-arm/arm32/bug.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/include/asm-arm/arm32/bug.h b/xen/include/asm-arm/arm32/bug.h
> index 155b420..3e66f35 100644
> --- a/xen/include/asm-arm/arm32/bug.h
> +++ b/xen/include/asm-arm/arm32/bug.h
> @@ -6,7 +6,7 @@
> /* ARMv7 provides a list of undefined opcode (see A8.8.247 DDI 0406C.b)
> * Use one them encoding A1 to go in exception mode
> */
> -#define BUG_OPCODE 0xe7f00f0
> +#define BUG_OPCODE 0xe7f000f0
>
> #define BUG_INSTR ".word " __stringify(BUG_OPCODE)
>
> --
> 2.1.3
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH for-4.5] xen/arm: Correct the opcode for BUG_INSTR on arm32
2014-12-04 19:34 ` Konrad Rzeszutek Wilk
@ 2014-12-05 10:53 ` Julien Grall
2014-12-05 10:54 ` Ian Campbell
1 sibling, 0 replies; 5+ messages in thread
From: Julien Grall @ 2014-12-05 10:53 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: xen-devel, tim, ian.campbell, stefano.stabellini
Hi Konrad,
On 04/12/2014 19:34, Konrad Rzeszutek Wilk wrote:
> On Thu, Dec 04, 2014 at 07:26:55PM +0000, Julien Grall wrote:
>> A 0 was forgotten when the arm32 BUG instruction opcode has been added in commit
>> 3e802c6ca1fb9a9549258c2855a57cad483f3cbd "xen/arm: Correctly support WARN_ON".
>>
>> This will result to use a valid instruction (mcreq 0, 3, r0, cr15, cr0, {7}),
>> and inhibit usage of BUG/WARN_ON and co.
>>
>> Signed-off-by: Julien Grall <julien.grall@linaro.org>
>>
>> ---
>>
>> Not sure, why I dropped the 0 when I implemented the patch...
>> This is a bug fixed for Xen 4.5. This is only affected ARM32 where the
>> BUG opcode was malformed.
>>
>> With the malformed opcode, the ASSERT/BUG_ON is skipped and the
>> processor may execute another patch (because the compiler has optimized
>
> s/patch/path/ ?
Yes.
>> due the unreachable in both macro).
>>
>> The code modified is only executed when Xen is in bad state.
>
> Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thanks!
Regards,
--
Julien Grall
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH for-4.5] xen/arm: Correct the opcode for BUG_INSTR on arm32
2014-12-04 19:34 ` Konrad Rzeszutek Wilk
2014-12-05 10:53 ` Julien Grall
@ 2014-12-05 10:54 ` Ian Campbell
2014-12-09 15:06 ` Ian Campbell
1 sibling, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2014-12-05 10:54 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: xen-devel, Julien Grall, tim, stefano.stabellini
On Thu, 2014-12-04 at 14:34 -0500, Konrad Rzeszutek Wilk wrote:
> On Thu, Dec 04, 2014 at 07:26:55PM +0000, Julien Grall wrote:
> > A 0 was forgotten when the arm32 BUG instruction opcode has been added in commit
> > 3e802c6ca1fb9a9549258c2855a57cad483f3cbd "xen/arm: Correctly support WARN_ON".
> >
> > This will result to use a valid instruction (mcreq 0, 3, r0, cr15, cr0, {7}),
> > and inhibit usage of BUG/WARN_ON and co.
Doh!
> >
> > Signed-off-by: Julien Grall <julien.grall@linaro.org>
> >
> > ---
> >
> > Not sure, why I dropped the 0 when I implemented the patch...
> > This is a bug fixed for Xen 4.5. This is only affected ARM32 where the
> > BUG opcode was malformed.
> >
> > With the malformed opcode, the ASSERT/BUG_ON is skipped and the
> > processor may execute another patch (because the compiler has optimized
>
> s/patch/path/ ?
Will fix on commit.
> > due the unreachable in both macro).
> >
> > The code modified is only executed when Xen is in bad state.
>
> Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
>
> > ---
> > xen/include/asm-arm/arm32/bug.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/xen/include/asm-arm/arm32/bug.h b/xen/include/asm-arm/arm32/bug.h
> > index 155b420..3e66f35 100644
> > --- a/xen/include/asm-arm/arm32/bug.h
> > +++ b/xen/include/asm-arm/arm32/bug.h
> > @@ -6,7 +6,7 @@
> > /* ARMv7 provides a list of undefined opcode (see A8.8.247 DDI 0406C.b)
> > * Use one them encoding A1 to go in exception mode
> > */
> > -#define BUG_OPCODE 0xe7f00f0
> > +#define BUG_OPCODE 0xe7f000f0
> >
> > #define BUG_INSTR ".word " __stringify(BUG_OPCODE)
> >
> > --
> > 2.1.3
> >
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH for-4.5] xen/arm: Correct the opcode for BUG_INSTR on arm32
2014-12-05 10:54 ` Ian Campbell
@ 2014-12-09 15:06 ` Ian Campbell
0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2014-12-09 15:06 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: xen-devel, Julien Grall, tim, stefano.stabellini
On Fri, 2014-12-05 at 10:54 +0000, Ian Campbell wrote:
> > > Not sure, why I dropped the 0 when I implemented the patch...
> > > This is a bug fixed for Xen 4.5. This is only affected ARM32 where the
> > > BUG opcode was malformed.
> > >
> > > With the malformed opcode, the ASSERT/BUG_ON is skipped and the
> > > processor may execute another patch (because the compiler has optimized
> >
> > s/patch/path/ ?
>
> Will fix on commit.
Oh, this isn't in the main body of the commit log.
>
> > > due the unreachable in both macro).
> > >
> > > The code modified is only executed when Xen is in bad state.
> >
> > Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Applied (with no changes).
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-12-09 15:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-04 19:26 [PATCH for-4.5] xen/arm: Correct the opcode for BUG_INSTR on arm32 Julien Grall
2014-12-04 19:34 ` Konrad Rzeszutek Wilk
2014-12-05 10:53 ` Julien Grall
2014-12-05 10:54 ` Ian Campbell
2014-12-09 15:06 ` Ian Campbell
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.