[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 06/26] target/ppc: Improve logging in Radix MMU
From: |
Peter Maydell |
Subject: |
Re: [PULL 06/26] target/ppc: Improve logging in Radix MMU |
Date: |
Tue, 11 Jan 2022 16:51:16 +0000 |
On Tue, 4 Jan 2022 at 07:31, Cédric Le Goater <clg@kaod.org> wrote:
>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Message-Id: <20211222071002.1568894-1-clg@kaod.org>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
> target/ppc/mmu-radix64.c | 55 +++++++++++++++++++++++++++++++++++++---
> 1 file changed, 52 insertions(+), 3 deletions(-)
Hi; Coverity reports that this change introduces a use of
an uninitialized variable:
> @@ -306,6 +321,15 @@ static int ppc_radix64_partition_scoped_xlate(PowerPCCPU
> *cpu,
> hwaddr pte_addr;
> uint64_t pte;
>
> + qemu_log_mask(CPU_LOG_MMU, "%s for %s @0x%"VADDR_PRIx
> + " mmu_idx %u (prot %c%c%c) 0x%"HWADDR_PRIx"\n",
> + __func__, access_str(access_type),
> + eaddr, mmu_idx,
> + *h_prot & PAGE_READ ? 'r' : '-',
> + *h_prot & PAGE_WRITE ? 'w' : '-',
> + *h_prot & PAGE_EXEC ? 'x' : '-',
> + g_raddr);
At the top of this function we now read the value at h_prot to
do this logging, but all the callsites pass in an uninitialized
value:
int h_prot;
...
ret = ppc_radix64_partition_scoped_xlate(cpu, 0, eaddr, prtbe_addr,
pate, &h_raddr, &h_prot, etc);
Are the callsites wrong (should be initializing h_prot), or is the
logging wrong (and it's this function itself which is supposed to
initialize *h_prot as an extra return value) ?
This is CID 1468942.
thanks
-- PMM
- [PULL 24/26] target/ppc: Rewrite pmu_increment_insns, (continued)
- [PULL 24/26] target/ppc: Rewrite pmu_increment_insns, Cédric Le Goater, 2022/01/04
- [PULL 16/26] ppc/ppc405: Dump specific registers, Cédric Le Goater, 2022/01/04
- [PULL 07/26] target/ppc: Check effective address validity, Cédric Le Goater, 2022/01/04
- [PULL 21/26] target/ppc: powerpc_excp: Move system call vectored code together, Cédric Le Goater, 2022/01/04
- [PULL 17/26] target/ppc: do not silence snan in xscvspdpn, Cédric Le Goater, 2022/01/04
- [PULL 14/26] ppc/ppc405: Fix timer initialization, Cédric Le Goater, 2022/01/04
- [PULL 20/26] target/ppc: powerpc_excp: Set vector earlier, Cédric Le Goater, 2022/01/04
- [PULL 11/26] ppc/ppc405: Activate MMU logs, Cédric Le Goater, 2022/01/04
- [PULL 05/26] pnv_phb4.c: do not set 'root-bus' as bus name, Cédric Le Goater, 2022/01/04
- [PULL 06/26] target/ppc: Improve logging in Radix MMU, Cédric Le Goater, 2022/01/04
- Re: [PULL 06/26] target/ppc: Improve logging in Radix MMU,
Peter Maydell <=
- [PULL 13/26] ppc/ppc405: Rework ppc_40x_timers_init() to use a PowerPCCPU, Cédric Le Goater, 2022/01/04
- [PULL 12/26] ppc/ppc405: Restore TCR and STR write handlers, Cédric Le Goater, 2022/01/04
- [PULL 10/26] ppc/ppc4xx: Convert printfs(), Cédric Le Goater, 2022/01/04
- [PULL 18/26] target/ppc: powerpc_excp: Set alternate SRRs directly, Cédric Le Goater, 2022/01/04
- [PULL 08/26] target/ppc: Remove static inline, Cédric Le Goater, 2022/01/04
- [PULL 09/26] target/ppc: Print out literal exception names in logs, Cédric Le Goater, 2022/01/04
- [PULL 02/26] ppc/pnv: Remove PHB4 reset handler, Cédric Le Goater, 2022/01/04
- [PULL 23/26] target/ppc: Cache per-pmc insn and cycle count settings, Cédric Le Goater, 2022/01/04
- [PULL 15/26] ppc/ppc405: Introduce a store helper for SPR_40x_PID, Cédric Le Goater, 2022/01/04