lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <29e6c483b71dcf28e9b140f4edfe566d@kernel.org>
Date:   Wed, 05 Feb 2020 12:43:51 +0000
From:   Marc Zyngier <maz@...nel.org>
To:     Zenghui Yu <yuzenghui@...wei.com>
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        kvmarm@...ts.cs.columbia.edu, tglx@...utronix.de,
        jason@...edaemon.net, wanghaibin.wang@...wei.com
Subject: Re: [PATCH 1/5] irqchip/gic-v4.1: Fix programming of
 GICR_VPROPBASER_4_1_SIZE

On 2020-02-04 09:09, Zenghui Yu wrote:
> The Size field of GICv4.1 VPROPBASER register indicates number of
> pages minus one and together Page_Size and Size control the vPEID
> width. Let's respect this requirement of the architecture.
> 
> Signed-off-by: Zenghui Yu <yuzenghui@...wei.com>
> ---
>  drivers/irqchip/irq-gic-v3-its.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-gic-v3-its.c 
> b/drivers/irqchip/irq-gic-v3-its.c
> index e5a25d97f8db..992bc72cab6f 100644
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -2531,7 +2531,7 @@ static int allocate_vpe_l1_table(void)
>  		npg = 1;
>  	}
> 
> -	val |= FIELD_PREP(GICR_VPROPBASER_4_1_SIZE, npg);
> +	val |= FIELD_PREP(GICR_VPROPBASER_4_1_SIZE, npg - 1);
> 
>  	/* Right, that's the number of CPU pages we need for L1 */
>  	np = DIV_ROUND_UP(npg * psz, PAGE_SIZE);

Indeed, nice catch.

         M.
-- 
Jazz is not dead. It just smells funny...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ