From b25103cc9c50ae37fa265d4d8562964a70dd06d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 31 May 2021 18:10:50 +0200 Subject: [PATCH] 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 Tested-by: Commit checker robot --- headers/private/kernel/arch/generic/user_memory.h | 1 + 1 file changed, 1 insertion(+) diff --git a/headers/private/kernel/arch/generic/user_memory.h b/headers/private/kernel/arch/generic/user_memory.h index 83caff4b95..02b88f76a8 100644 --- a/headers/private/kernel/arch/generic/user_memory.h +++ b/headers/private/kernel/arch/generic/user_memory.h @@ -70,6 +70,7 @@ bool user_access(Function function) clear_ac(); return true; } + clear_ac(); return false; }