kernel: generic user_memcpy() should clear_ac after the fault handler returns

the AC flag in eflags/rflags, pushed in the iframe by the CPU, is kept intact after handling the exception, since the fault handler is run with the faulted iframe and does a simple jump. The AC flag would otherwise be set until the syscall returns to userland.

Change-Id: I24f763032ab98029dd162fb411e1541586451606
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4040
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
Jérôme Duval
2021-06-01 12:24:54 +00:00
committed by Axel Dörfler
parent 4d0359955f
commit b25103cc9c
@@ -70,6 +70,7 @@ bool user_access(Function function)
clear_ac();
return true;
}
clear_ac();
return false;
}