[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 01/18] armv7m: MRS/MSR handle unprivileged access
From: |
Michael Davidsaver |
Subject: |
Re: [Qemu-arm] [PATCH 01/18] armv7m: MRS/MSR handle unprivileged access |
Date: |
Wed, 02 Dec 2015 17:51:32 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.8.0 |
On 11/17/2015 12:09 PM, Peter Maydell wrote:
> On 9 November 2015 at 01:11, Michael Davidsaver <address@hidden> wrote:
>> The MRS and MSR instruction handling isn't checking
>> the current permission level.
>>
>> Signed-off-by: Michael Davidsaver <address@hidden>
>> ---
>> target-arm/helper.c | 79
>> +++++++++++++++++++++++++----------------------------
>> 1 file changed, 37 insertions(+), 42 deletions(-)
>
> This patch looks good overall, but there's one style nit:
>
>> + case 0 ... 7: /* xPSR sub-fields */
>> + mask = 0;
>> + if ((reg&1) && el) {
>
> you want spaces around operators, so "reg & 1" here and elsewhere.
Would be nice if checkpatch.pl caught these, but I understand that this would
be quite difficult to do well. I've tried to catch this with grep and sort
through the false positives. I think I got them all.
> It would also be good to mention in the commit message the
> other things this patch is fixing:
> * privileged attempts to write EPSR should do nothing
> * accessing an unknown special register now triggers a
> guest-error warning rather than aborting QEMU
Will do.
- Re: [Qemu-arm] [PATCH 01/18] armv7m: MRS/MSR handle unprivileged access,
Michael Davidsaver <=