Re: [PATCH] accel/tcg: Assert mmu_idx in range before use in cputlb

2022-04-26 Thread Richard Henderson
On 4/1/22 10:08, Richard Henderson wrote: Coverity reports out-of-bound accesses within cputlb.c. This should be a false positive due to how the index is decoded from MemOpIdx. To be fair, nothing is checking the correct bounds during encoding either. Assert index in range before use, both to

Re: [PATCH] accel/tcg: Assert mmu_idx in range before use in cputlb

2022-04-22 Thread Alex Bennée
Richard Henderson writes: > Coverity reports out-of-bound accesses within cputlb.c. > This should be a false positive due to how the index is > decoded from MemOpIdx. To be fair, nothing is checking > the correct bounds during encoding either. > > Assert index in range before use, both to

Re: [PATCH] accel/tcg: Assert mmu_idx in range before use in cputlb

2022-04-22 Thread Peter Maydell
On Fri, 1 Apr 2022 at 18:08, Richard Henderson wrote: > > Coverity reports out-of-bound accesses within cputlb.c. > This should be a false positive due to how the index is > decoded from MemOpIdx. To be fair, nothing is checking > the correct bounds during encoding either. > > Assert index in

Re: [PATCH] accel/tcg: Assert mmu_idx in range before use in cputlb

2022-04-21 Thread Richard Henderson
Ping. On 4/1/22 10:08, Richard Henderson wrote: Coverity reports out-of-bound accesses within cputlb.c. This should be a false positive due to how the index is decoded from MemOpIdx. To be fair, nothing is checking the correct bounds during encoding either. Assert index in range before use,

[PATCH] accel/tcg: Assert mmu_idx in range before use in cputlb

2022-04-01 Thread Richard Henderson
Coverity reports out-of-bound accesses within cputlb.c. This should be a false positive due to how the index is decoded from MemOpIdx. To be fair, nothing is checking the correct bounds during encoding either. Assert index in range before use, both to catch user errors and to pacify static