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]
Date:   Tue, 16 Jun 2020 16:42:11 +1000
From:   Michael Ellerman <mpe@...erman.id.au>
To:     Christophe Leroy <christophe.leroy@...roup.eu>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>
Cc:     linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] powerpc/ptdump: Fix build failure in hashpagetable.c

Christophe Leroy <christophe.leroy@...roup.eu> writes:
> H_SUCCESS is only defined when CONFIG_PPC_PSERIES is defined.

It's always defined in hvcall.h, but it doesn't always get included via
plpar_wrappers.h.

It looks to be CONFIG_SMP=n that causes that, for SMP=y we get a copy
via asm/spinlock.h

> != H_SUCCESS means != 0. Modify the test accordingly.

I guess that's an OK solution.

> Reported-by: kernel test robot <lkp@...el.com>
> Fixes: 65e701b2d2a8 ("powerpc/ptdump: drop non vital #ifdefs")
> Cc: stable@...r.kernel.org

I don't think it needs to go to stable, none of the defconfigs hit it,
we don't even really support SMP=n for 64-bit book3s.

cheers

> Signed-off-by: Christophe Leroy <christophe.leroy@...roup.eu>
> ---
>  arch/powerpc/mm/ptdump/hashpagetable.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/mm/ptdump/hashpagetable.c b/arch/powerpc/mm/ptdump/hashpagetable.c
> index a2c33efc7ce8..5b8bd34cd3a1 100644
> --- a/arch/powerpc/mm/ptdump/hashpagetable.c
> +++ b/arch/powerpc/mm/ptdump/hashpagetable.c
> @@ -258,7 +258,7 @@ static int pseries_find(unsigned long ea, int psize, bool primary, u64 *v, u64 *
>  	for (i = 0; i < HPTES_PER_GROUP; i += 4, hpte_group += 4) {
>  		lpar_rc = plpar_pte_read_4(0, hpte_group, (void *)ptes);
>  
> -		if (lpar_rc != H_SUCCESS)
> +		if (lpar_rc)
>  			continue;
>  		for (j = 0; j < 4; j++) {
>  			if (HPTE_V_COMPARE(ptes[j].v, want_v) &&
> -- 
> 2.25.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ