|
From: | Thomas Huth |
Subject: | Re: [PATCH v2 for-8.0] target/s390x/tcg: Fix and improve the SACF instruction |
Date: | Fri, 2 Dec 2022 08:41:16 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 |
On 01/12/2022 21.51, Richard Henderson wrote:
On 12/1/22 10:44, Thomas Huth wrote:The SET ADDRESS SPACE CONTROL FAST instruction is not privileged, it can be used from problem space, too. Just the switching to the home address space is privileged and should still generate a privilege exception. This bug is e.g. causing programs like Java that use the "getcpu" vdso kernel function to crash (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990417#26 ). While we're at it, also check if DAT is not enabled. In that case the instruction is supposed to generate a special operation exception. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/655 Signed-off-by: Thomas Huth <thuth@redhat.com> ---Looks ok, as far as it goes. We appear to be missing the check for CR0_SECONDARY, which is unpredictable for SACF but mandatory for SAC.
Yes, but if I got our sources right, we do not implement SAC yet. Looks like Linux does not use it, so nobody bothered to implement it yet. Since it should be very similar to SACF, it should be easy to add - I can try to come up with an additional patch for it later.
I'll give you Reviewed-by: Richard Henderson <richard.henderson@linaro.org>for fixing the incorrect IF_PRIV check, which by itself should be enough to fix the Java issue.
Thanks! ThomasPS: We might have a similar bug with the MVCP and MVCS instructions ... seems like they could be called from userspace in certain situations, too.
[Prev in Thread] | Current Thread | [Next in Thread] |