All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: "Ilya Leoshkevich" <iii@linux.ibm.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 1/2] linux-user: Let sigaction query SIGKILL/SIGSTOP
Date: Sun, 20 Jun 2021 16:21:15 +0200	[thread overview]
Message-ID: <0c34900e-886a-2d27-e0d7-f48e7b3edc9d@vivier.eu> (raw)
In-Reply-To: <20210601145600.3131040-2-iii@linux.ibm.com>

Le 01/06/2021 à 16:55, Ilya Leoshkevich a écrit :
> The kernel allows doing this, so let's allow this in qemu as well.
> Valgrind relies on this.
> 
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
>  linux-user/signal.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/linux-user/signal.c b/linux-user/signal.c
> index 9016896dcd..bc3431708f 100644
> --- a/linux-user/signal.c
> +++ b/linux-user/signal.c
> @@ -851,7 +851,11 @@ int do_sigaction(int sig, const struct target_sigaction *act,
>  
>      trace_signal_do_sigaction_guest(sig, TARGET_NSIG);
>  
> -    if (sig < 1 || sig > TARGET_NSIG || sig == TARGET_SIGKILL || sig == TARGET_SIGSTOP) {
> +    if (sig < 1 || sig > TARGET_NSIG) {
> +        return -TARGET_EINVAL;
> +    }
> +
> +    if (act && (sig == TARGET_SIGKILL || sig == TARGET_SIGSTOP)) {
>          return -TARGET_EINVAL;
>      }
>  
> 

Applied to my linux-user-for-6.1 branch.

Thanks,
Laurent



  parent reply	other threads:[~2021-06-20 14:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 14:55 [PATCH 0/2] linux-user: Let sigaction query SIGKILL/SIGSTOP Ilya Leoshkevich
2021-06-01 14:55 ` [PATCH 1/2] " Ilya Leoshkevich
2021-06-20 14:19   ` Laurent Vivier
2021-06-20 14:21   ` Laurent Vivier [this message]
2021-06-01 14:56 ` [PATCH 2/2] tests/tcg/linux-test: Check that sigaction can " Ilya Leoshkevich
2021-06-20 14:26   ` Laurent Vivier
2021-06-20 14:27   ` 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=0c34900e-886a-2d27-e0d7-f48e7b3edc9d@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=alex.bennee@linaro.org \
    --cc=borntraeger@de.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.