[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: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [PATCH 01/18] armv7m: MRS/MSR handle unprivileged access |
Date: |
Tue, 17 Nov 2015 17:09:35 +0000 |
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.
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
thanks
-- PMM
- [Qemu-arm] [PATCH 10/18] armv7m: NVIC initialization, (continued)
- [Qemu-arm] [PATCH 10/18] armv7m: NVIC initialization, Michael Davidsaver, 2015/11/09
- [Qemu-arm] [PATCH 11/18] armv7m: fix I and F flag handling, Michael Davidsaver, 2015/11/09
- [Qemu-arm] [PATCH 17/18] armv7m: implement CCR, Michael Davidsaver, 2015/11/09
- [Qemu-arm] [PATCH 07/18] armv7m: Update NVIC registers, Michael Davidsaver, 2015/11/09
- [Qemu-arm] [PATCH 04/18] armv7m: Explicit error for bad vector table, Michael Davidsaver, 2015/11/09
- [Qemu-arm] [PATCH 12/18] armv7m: simpler/faster exception start, Michael Davidsaver, 2015/11/09
- [Qemu-arm] [PATCH 13/18] armv7m: implement CFSR and HFSR, Michael Davidsaver, 2015/11/09
- [Qemu-arm] [PATCH 01/18] armv7m: MRS/MSR handle unprivileged access, Michael Davidsaver, 2015/11/09
- Re: [Qemu-arm] [PATCH 01/18] armv7m: MRS/MSR handle unprivileged access,
Peter Maydell <=
- [Qemu-arm] [PATCH 18/18] armv7m: prevent unprivileged write to STIR, Michael Davidsaver, 2015/11/09
- [Qemu-arm] [PATCH 16/18] armv7m: check exception return consistency, Michael Davidsaver, 2015/11/09
- Re: [Qemu-arm] [PATCH 00/18] Fix exception handling and msr/mrs access, Peter Maydell, 2015/11/17