[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] target/s390x: fix s390_probe_access to check PAGE_WRITE_ORG

From: David Hildenbrand
Subject: Re: [PATCH] target/s390x: fix s390_probe_access to check PAGE_WRITE_ORG for writeability
Date: Thu, 22 Apr 2021 18:43:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 22.04.21 17:44, Alex Bennée wrote:
We can remove PAGE_WRITE when (internally) marking a page read-only
because it contains translated code. This can get confused when we are
executing signal return code on signal stacks.

Fixes: e56552cf07 ("target/s390x: Implement the MVPG condition-code-option bit")
Found-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Cornelia Huck <cohuck@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Laurent Vivier <laurent@vivier.eu>
  target/s390x/mem_helper.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index 12e84a4285..f6a7d29273 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -145,7 +145,7 @@ static int s390_probe_access(CPUArchState *env, 
target_ulong addr, int size,
#if defined(CONFIG_USER_ONLY)
      flags = page_get_flags(addr);
-    if (!(flags & (access_type == MMU_DATA_LOAD ?  PAGE_READ : PAGE_WRITE))) {
+    if (!(flags & (access_type == MMU_DATA_LOAD ?  PAGE_READ : 
          env->__excp_addr = addr;
          flags = (flags & PAGE_VALID) ? PGM_PROTECTION : PGM_ADDRESSING;
          if (nonfault) {

Reviewed-by: David Hildenbrand <david@redhat.com>


David / dhildenb

reply via email to

[Prev in Thread] Current Thread [Next in Thread]