* [PATCH] target/ppc: Fix radix logging
@ 2022-02-03 14:21 Cédric Le Goater
2022-02-03 14:39 ` Greg Kurz
2022-02-09 7:43 ` Cédric Le Goater
0 siblings, 2 replies; 4+ messages in thread
From: Cédric Le Goater @ 2022-02-03 14:21 UTC (permalink / raw)
To: qemu-ppc, qemu-devel
Cc: Cédric Le Goater, Daniel Henrique Barboza, Greg Kurz,
David Gibson
ppc_radix64_partition_scoped_xlate() logs the host page protection
bits variable but it is uninitialized since it is set later in
ppc_radix64_check_prot(). Remove the
Fixes: Coverity CID 1468942
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
target/ppc/mmu-radix64.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/target/ppc/mmu-radix64.c b/target/ppc/mmu-radix64.c
index 040c055bff65..d4e16bd7db50 100644
--- a/target/ppc/mmu-radix64.c
+++ b/target/ppc/mmu-radix64.c
@@ -327,13 +327,9 @@ static int ppc_radix64_partition_scoped_xlate(PowerPCCPU *cpu,
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",
+ " mmu_idx %u 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);
+ eaddr, mmu_idx, g_raddr);
*h_page_size = PRTBE_R_GET_RTS(pate.dw0);
/* No valid pte or access denied due to protection */
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] target/ppc: Fix radix logging
2022-02-03 14:21 [PATCH] target/ppc: Fix radix logging Cédric Le Goater
@ 2022-02-03 14:39 ` Greg Kurz
2022-02-03 14:45 ` Cédric Le Goater
2022-02-09 7:43 ` Cédric Le Goater
1 sibling, 1 reply; 4+ messages in thread
From: Greg Kurz @ 2022-02-03 14:39 UTC (permalink / raw)
To: Cédric Le Goater
Cc: Daniel Henrique Barboza, qemu-ppc, qemu-devel, David Gibson
On Thu, 3 Feb 2022 15:21:45 +0100
Cédric Le Goater <clg@kaod.org> wrote:
> ppc_radix64_partition_scoped_xlate() logs the host page protection
> bits variable but it is uninitialized since it is set later in
> ppc_radix64_check_prot(). Remove the
>
Remove the what ?
> Fixes: Coverity CID 1468942
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
LGTM apart from that.
Reviewed-by: Greg Kurz <groug@kaod.org>
> target/ppc/mmu-radix64.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/target/ppc/mmu-radix64.c b/target/ppc/mmu-radix64.c
> index 040c055bff65..d4e16bd7db50 100644
> --- a/target/ppc/mmu-radix64.c
> +++ b/target/ppc/mmu-radix64.c
> @@ -327,13 +327,9 @@ static int ppc_radix64_partition_scoped_xlate(PowerPCCPU *cpu,
> 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",
> + " mmu_idx %u 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);
> + eaddr, mmu_idx, g_raddr);
>
> *h_page_size = PRTBE_R_GET_RTS(pate.dw0);
> /* No valid pte or access denied due to protection */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] target/ppc: Fix radix logging
2022-02-03 14:39 ` Greg Kurz
@ 2022-02-03 14:45 ` Cédric Le Goater
0 siblings, 0 replies; 4+ messages in thread
From: Cédric Le Goater @ 2022-02-03 14:45 UTC (permalink / raw)
To: Greg Kurz; +Cc: Daniel Henrique Barboza, qemu-ppc, qemu-devel, David Gibson
On 2/3/22 15:39, Greg Kurz wrote:
> On Thu, 3 Feb 2022 15:21:45 +0100
> Cédric Le Goater <clg@kaod.org> wrote:
>
>> ppc_radix64_partition_scoped_xlate() logs the host page protection
>> bits variable but it is uninitialized since it is set later in
>> ppc_radix64_check_prot(). Remove the
>>
>
> Remove the what ?
Arg ...
Changed to :
ppc_radix64_partition_scoped_xlate() logs the host page protection
bits variable but it is uninitialized. The value is set later on in
ppc_radix64_check_prot(). Remove the output.
Thanks,
C.
>
>> Fixes: Coverity CID 1468942
>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
>> ---
>
> LGTM apart from that.
>
> Reviewed-by: Greg Kurz <groug@kaod.org>
>
>> target/ppc/mmu-radix64.c | 8 ++------
>> 1 file changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/target/ppc/mmu-radix64.c b/target/ppc/mmu-radix64.c
>> index 040c055bff65..d4e16bd7db50 100644
>> --- a/target/ppc/mmu-radix64.c
>> +++ b/target/ppc/mmu-radix64.c
>> @@ -327,13 +327,9 @@ static int ppc_radix64_partition_scoped_xlate(PowerPCCPU *cpu,
>> 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",
>> + " mmu_idx %u 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);
>> + eaddr, mmu_idx, g_raddr);
>>
>> *h_page_size = PRTBE_R_GET_RTS(pate.dw0);
>> /* No valid pte or access denied due to protection */
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] target/ppc: Fix radix logging
2022-02-03 14:21 [PATCH] target/ppc: Fix radix logging Cédric Le Goater
2022-02-03 14:39 ` Greg Kurz
@ 2022-02-09 7:43 ` Cédric Le Goater
1 sibling, 0 replies; 4+ messages in thread
From: Cédric Le Goater @ 2022-02-09 7:43 UTC (permalink / raw)
To: qemu-ppc, qemu-devel; +Cc: Daniel Henrique Barboza, Greg Kurz, David Gibson
On 2/3/22 15:21, Cédric Le Goater wrote:
> ppc_radix64_partition_scoped_xlate() logs the host page protection
> bits variable but it is uninitialized since it is set later in
> ppc_radix64_check_prot(). Remove the
>
> Fixes: Coverity CID 1468942
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Applied to ppc-7.0 (with a commit log update)
Thanks,
C.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-09 8:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-03 14:21 [PATCH] target/ppc: Fix radix logging Cédric Le Goater
2022-02-03 14:39 ` Greg Kurz
2022-02-03 14:45 ` Cédric Le Goater
2022-02-09 7:43 ` Cédric Le Goater
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).