Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Michael Holzheu <holzheu@linux.vnet.ibm.com>, stable@vger.kernel.org
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: Re: [PATCH] s390/seccomp: fix error return for filtered system calls
Date: Sun, 08 Oct 2017 22:24:10 +0100	[thread overview]
Message-ID: <1507497850.2677.98.camel@decadent.org.uk> (raw)
In-Reply-To: <20160725161616.5bb17866@TP-holzheu>

[-- Attachment #1: Type: text/plain, Size: 1495 bytes --]

On Mon, 2016-07-25 at 16:16 +0200, Michael Holzheu wrote:
> commit dc295880c6752076f8b94ba3885d0bfff09e3e82 upstream
> 
> The syscall_set_return_value function of s390 negates the error argument
> before storing the value to the return register gpr2. This is incorrect,
> the seccomp code already passes the negative error value.
> Store the unmodified error value to gpr2.
> 
> Signed-off-by: Jan Willeke <willeke@de.ibm.com>
> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
> ---
> * Requested versions for stable: v2.6.28 - v3.16

Belatedly queued this up for 3.16.

Ben.

> * Justification: Patch is needed e.g. for Docker seccomp support on
>   kernels with version < 3.17.
> * Bug was introduced by commit: 753c4dd6a2fa2af "[S390] ptrace changes" 
> ---
>  arch/s390/include/asm/syscall.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/include/asm/syscall.h
> b/arch/s390/include/asm/syscall.h index abad78d..5bc1259 100644
> --- a/arch/s390/include/asm/syscall.h
> +++ b/arch/s390/include/asm/syscall.h
> @@ -54,7 +54,7 @@ static inline void syscall_set_return_value(struct
> task_struct *task, struct pt_regs *regs,
>  					    int error, long val)
>  {
> -	regs->gprs[2] = error ? -error : val;
> +	regs->gprs[2] = error ? error : val;
>  }
>  
>  static inline void syscall_get_arguments(struct task_struct *task,
-- 
Ben Hutchings
compatible: Gracefully accepts erroneous data from any source


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2017-10-08 21:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-25 14:16 [PATCH] s390/seccomp: fix error return for filtered system calls Michael Holzheu
2017-10-08 21:24 ` Ben Hutchings [this message]

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=1507497850.2677.98.camel@decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=heiko.carstens@de.ibm.com \
    --cc=holzheu@linux.vnet.ibm.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox