public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: He Zhe <zhe.he@windriver.com>
Cc: David Laight <David.Laight@ACULAB.COM>,
	Paul Moore <paul@paul-moore.com>, Eric Paris <eparis@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] ptrace: is_syscall_success: Add syscall return code handling for compat task
Date: Thu, 15 Apr 2021 07:48:51 +0200	[thread overview]
Message-ID: <20210415054846.GA25776@redhat.com> (raw)
In-Reply-To: <8288f70d-4c3e-9b51-0794-369ca73579d8@windriver.com>

On 04/15, He Zhe wrote:
>
>
> On 4/15/21 12:55 AM, Oleg Nesterov wrote:
> > I think in_compat_syscall() should be used instead.
> >
> > But this doesn't matter, I still can't understand the problem.
>
> Sorry for not enough clarification.
>
> This was found on an arm64 kernel running with 32-bit user-space application.

OK, but then I think you should add the arm64 version of is_syscall_success()
into arch/arm4/include/asm/ptrace.h and do not touch the generic version ?

Something like arch/arm64/include/asm/syscall.h:syscall_get_error() which uses
is_compat_thread(). Perhaps you can even do

	#define is_syscall_success(regs)	\
		(syscall_get_error(current, regs) == 0)

Oleg.


      reply	other threads:[~2021-04-15  5:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14  8:02 [PATCH 2/2] ptrace: is_syscall_success: Add syscall return code handling for compat task He Zhe
2021-04-14 15:08 ` Oleg Nesterov
2021-04-14 16:17   ` David Laight
2021-04-14 16:55     ` Oleg Nesterov
2021-04-14 21:39       ` David Laight
2021-04-15  5:12       ` He Zhe
2021-04-15  5:48         ` Oleg Nesterov [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=20210415054846.GA25776@redhat.com \
    --to=oleg@redhat.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=zhe.he@windriver.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