qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: thuth@redhat.com, qemu-s390x@nongnu.org, cohuck@redhat.com,
	laurent@vivier.eu
Subject: Re: [PATCH v2 11/15] linux-user/s390x: Add stub sigframe argument for last_break
Date: Thu, 29 Apr 2021 09:21:05 +0200	[thread overview]
Message-ID: <06f6587a-6ccb-29a7-ffd4-4b4cd56fdde3@redhat.com> (raw)
In-Reply-To: <20210428193408.233706-12-richard.henderson@linaro.org>

On 28.04.21 21:34, Richard Henderson wrote:
> In order to properly present these arguments, we need to add
> code to target/s390x to record LowCore parameters for user-only.
> 
> But in the meantime, at least zero the missing last_break
> argument, and fixup the comment style in the vicinity.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   linux-user/s390x/signal.c | 16 ++++++++++------
>   1 file changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c
> index 17f617c655..bc41b01c5d 100644
> --- a/linux-user/s390x/signal.c
> +++ b/linux-user/s390x/signal.c
> @@ -167,13 +167,16 @@ void setup_frame(int sig, struct target_sigaction *ka,
>                     | (env->psw.mask & ~PSW_MASK_ASC);
>       env->psw.addr = ka->_sa_handler;
>   
> -    env->regs[2] = sig; //map_signal(sig);
> +    env->regs[2] = sig;
>       env->regs[3] = frame_addr += offsetof(typeof(*frame), sc);
>   
> -    /* We forgot to include these in the sigcontext.
> -       To avoid breaking binary compatibility, they are passed as args. */
> -    env->regs[4] = 0; // FIXME: no clue... current->thread.trap_no;
> -    env->regs[5] = 0; // FIXME: no clue... current->thread.prot_addr;
> +    /*
> +     * We forgot to include these in the sigcontext.
> +     * To avoid breaking binary compatibility, they are passed as args.
> +     */
> +    env->regs[4] = 0; /* FIXME: regs->int_code & 127 */
> +    env->regs[5] = 0; /* FIXME: regs->int_parm_long */
> +    env->regs[6] = 0; /* FIXME: current->thread.last_break */
>   
>       /* Place signal number on stack to allow backtrace from handler.  */
>       __put_user(env->regs[2], &frame->signo);
> @@ -223,9 +226,10 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
>                     | (env->psw.mask & ~PSW_MASK_ASC);
>       env->psw.addr = ka->_sa_handler;
>   
> -    env->regs[2] = sig; //map_signal(sig);
> +    env->regs[2] = sig;
>       env->regs[3] = frame_addr + offsetof(typeof(*frame), info);
>       env->regs[4] = frame_addr + offsetof(typeof(*frame), uc);
> +    env->regs[5] = 0; /* FIXME: current->thread.last_break */
>   }
>   
>   static void restore_sigregs(CPUS390XState *env, target_sigregs *sc)
> 

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

-- 
Thanks,

David / dhildenb



  reply	other threads:[~2021-04-29  7:23 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 19:33 [PATCH v2 00/15] linux-user/s390x: some signal fixes Richard Henderson
2021-04-28 19:33 ` [PATCH v2 01/15] linux-user/s390x: Fix sigframe types Richard Henderson
2021-04-29  7:10   ` David Hildenbrand
2021-04-28 19:33 ` [PATCH v2 02/15] linux-user/s390x: Use uint16_t for signal retcode Richard Henderson
2021-04-29  7:10   ` David Hildenbrand
2021-04-28 19:33 ` [PATCH v2 03/15] linux-user/s390x: Remove PSW_ADDR_AMODE Richard Henderson
2021-04-29  7:11   ` David Hildenbrand
2021-04-28 19:33 ` [PATCH v2 04/15] linux-user/s390x: Remove restore_sigregs return value Richard Henderson
2021-04-29  7:11   ` David Hildenbrand
2021-04-28 19:33 ` [PATCH v2 05/15] linux-user/s390x: Fix trace in restore_regs Richard Henderson
2021-04-29  7:12   ` David Hildenbrand
2021-04-28 19:33 ` [PATCH v2 06/15] linux-user/s390x: Fix sigcontext sregs value Richard Henderson
2021-04-29  7:13   ` David Hildenbrand
2021-04-28 19:34 ` [PATCH v2 07/15] linux-user/s390x: Use tswap_sigset in setup_rt_frame Richard Henderson
2021-04-29  7:14   ` David Hildenbrand
2021-04-28 19:34 ` [PATCH v2 08/15] linux-user/s390x: Tidy save_sigregs Richard Henderson
2021-04-29  7:14   ` David Hildenbrand
2021-04-28 19:34 ` [PATCH v2 09/15] linux-user/s390x: Clean up single-use gotos in signal.c Richard Henderson
2021-04-29  7:15   ` David Hildenbrand
2021-04-28 19:34 ` [PATCH v2 10/15] linux-user/s390x: Set psw.mask properly for the signal handler Richard Henderson
2021-04-29  7:20   ` David Hildenbrand
2021-04-28 19:34 ` [PATCH v2 11/15] linux-user/s390x: Add stub sigframe argument for last_break Richard Henderson
2021-04-29  7:21   ` David Hildenbrand [this message]
2021-04-28 19:34 ` [PATCH v2 12/15] linux-user/s390x: Fix frame_addr corruption in setup_frame Richard Henderson
2021-04-29  7:21   ` David Hildenbrand
2021-04-28 19:34 ` [PATCH v2 13/15] linux-user/s390x: Add build asserts for sigset sizes Richard Henderson
2021-04-29  7:21   ` David Hildenbrand
2021-04-28 19:34 ` [PATCH v2 14/15] linux-user/s390x: Clean up signal.c Richard Henderson
2021-04-29  7:29   ` David Hildenbrand
2021-04-28 19:34 ` [PATCH v2 15/15] linux-user/s390x: Handle vector regs in signal stack Richard Henderson
2021-04-29  7:32   ` David Hildenbrand
2021-04-28 19:40 ` [PATCH v2 00/15] linux-user/s390x: some signal fixes Richard Henderson
2021-04-29  7:33 ` David Hildenbrand
2021-05-06 11:54 ` Cornelia Huck
2021-05-06 13:31   ` Laurent Vivier
2021-05-15 19:44 ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06f6587a-6ccb-29a7-ffd4-4b4cd56fdde3@redhat.com \
    --to=david@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).