mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-02 08:21:05 +00:00
target/arm: Fix output of PAuth Auth
The ARM pseudocode installs the error_code into the original pointer, not the encrypted pointer. The difference applies within the 7 bits of pac data; the result should be the sign extension of bit 55. Add a testcase to that effect. Backports commit d67ebada159148bfdfde84871338738e4465e985 from qemu
This commit is contained in:
parent
230f8a091a
commit
afaea6a291
|
@ -344,9 +344,9 @@ static uint64_t pauth_auth(CPUARMState *env, uint64_t ptr, uint64_t modifier,
|
|||
if (unlikely(extract64(test, bot_bit, top_bit - bot_bit))) {
|
||||
int error_code = (keynumber << 1) | (keynumber ^ 1);
|
||||
if (param.tbi) {
|
||||
return deposit64(ptr, 53, 2, error_code);
|
||||
return deposit64(orig_ptr, 53, 2, error_code);
|
||||
} else {
|
||||
return deposit64(ptr, 61, 2, error_code);
|
||||
return deposit64(orig_ptr, 61, 2, error_code);
|
||||
}
|
||||
}
|
||||
return orig_ptr;
|
||||
|
|
Loading…
Reference in a new issue