|
|
Message-ID: <20170213175815.GB16636@leverpostej>
Date: Mon, 13 Feb 2017 17:58:15 +0000
From: Mark Rutland <mark.rutland@....com>
To: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: linux-arm-kernel@...ts.infradead.org, catalin.marinas@....com,
will.deacon@....com, labbott@...oraproject.org,
kvmarm@...ts.cs.columbia.edu, marc.zyngier@....com,
andre.przywara@....com, Suzuki.Poulose@....com, james.morse@....com,
keescook@...omium.org, kernel-hardening@...ts.openwall.com
Subject: Re: [PATCH v2 1/5] arm: kvm: move kvm_vgic_global_state out of .text
section
On Sat, Feb 11, 2017 at 08:23:02PM +0000, Ard Biesheuvel wrote:
> The kvm_vgic_global_state struct contains a static key which is
> written to by jump_label_init() at boot time. So in preparation of
> making .text regions truly (well, almost truly) read-only, mark
> kvm_vgic_global_state __ro_after_init so it moves to the .rodata
> section instead.
>
> Acked-by: Marc Zyngier <marc.zyngier@....com>
> Reviewed-by: Laura Abbott <labbott@...hat.com>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>
With this applied I can boot Juno happily and launch working VMs.
Reviewed-by: Mark Rutland <mark.rutland@....com>
Tested-by: Mark Rutland <mark.rutland@....com>
Mark.
> ---
> virt/kvm/arm/vgic/vgic.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/virt/kvm/arm/vgic/vgic.c b/virt/kvm/arm/vgic/vgic.c
> index 6440b56ec90e..2f373455ed4e 100644
> --- a/virt/kvm/arm/vgic/vgic.c
> +++ b/virt/kvm/arm/vgic/vgic.c
> @@ -29,7 +29,9 @@
> #define DEBUG_SPINLOCK_BUG_ON(p)
> #endif
>
> -struct vgic_global __section(.hyp.text) kvm_vgic_global_state = {.gicv3_cpuif = STATIC_KEY_FALSE_INIT,};
> +struct vgic_global kvm_vgic_global_state __ro_after_init = {
> + .gicv3_cpuif = STATIC_KEY_FALSE_INIT,
> +};
>
> /*
> * Locking order is always:
> --
> 2.7.4
>
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.