mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
PPC: booke206: Check for TLB overrun
Our internal helpers to fetch TLB entries were not able to tell us that an entry doesn't even exist. Pass an error out if we hit such a case to not accidently pass beyond the TLB array. Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
6d3db821c1
commit
3f162d119e
4 changed files with 29 additions and 1 deletions
|
@ -1448,6 +1448,9 @@ static int mmubooke206_get_physical_address(CPUState *env, mmu_ctx_t *ctx,
|
|||
|
||||
for (j = 0; j < ways; j++) {
|
||||
tlb = booke206_get_tlbm(env, i, address, j);
|
||||
if (!tlb) {
|
||||
continue;
|
||||
}
|
||||
ret = mmubooke206_check_tlb(env, tlb, &raddr, &ctx->prot, address,
|
||||
rw, access_type);
|
||||
if (ret != -1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue