On Thu, 22 Apr 2021 16:44:27 +0100 Alex Bennée <alex.ben...@linaro.org> 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.hender...@linaro.org> > Signed-off-by: Alex Bennée <alex.ben...@linaro.org> > Cc: Cornelia Huck <coh...@redhat.com> > Cc: Thomas Huth <th...@redhat.com> > Cc: David Hildenbrand <da...@redhat.com> > Cc: Laurent Vivier <laur...@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 : > PAGE_WRITE_ORG))) { > env->__excp_addr = addr; > flags = (flags & PAGE_VALID) ? PGM_PROTECTION : PGM_ADDRESSING; > if (nonfault) { What's the verdict on this one? I plan to queue this to s390-next; but if we end up doing an -rc5, it might qualify as a regression fix. If this is going to be in 6.1, I'll add cc:stable when queuing.