From: Sergei Trofimovich <slyfox@gentoo.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@redhat.com>,
linux-ia64@vger.kernel.org, "Dmitry V . Levin" <ldv@altlinux.org>
Subject: Re: [PATCH] ia64: fix user_stack_pointer() for ptrace()
Date: Thu, 1 Apr 2021 07:28:46 +0100 [thread overview]
Message-ID: <20210401072846.0cabee26@sf> (raw)
In-Reply-To: <20210331174908.4655f2a41a7b1bbec36fae47@linux-foundation.org>
On Wed, 31 Mar 2021 17:49:08 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Wed, 31 Mar 2021 09:44:47 +0100 Sergei Trofimovich <slyfox@gentoo.org> wrote:
>
> > ia64 has two stacks:
> > - memory stack (or stack), pointed at by by r12
> > - register backing store (register stack), pointed at
> > ar.bsp/ar.bspstore with complications around dirty
> > register frame on CPU.
> >
> > In https://bugs.gentoo.org/769614 Dmitry noticed that
> > PTRACE_GET_SYSCALL_INFO returns register stack instead
> > memory stack.
> >
> > The bug comes from the fact that user_stack_pointer() and
> > current_user_stack_pointer() don't return the same register:
> >
> > ulong user_stack_pointer(struct pt_regs *regs) { return regs->ar_bspstore; }
> > #define current_user_stack_pointer() (current_pt_regs()->r12)
> >
> > The change gets both back in sync.
> >
> > I think ptrace(PTRACE_GET_SYSCALL_INFO) is the only affected user
> > by this bug on ia64.
> >
> > The change fixes 'rt_sigreturn.gen.test' strace test where
> > it was observed initially.
> >
>
> I assume a cc:stable is justified here?
>
> The bug seems to have been there for 10+ years, so there isn't a lot of
> point in looking for the Fixes: reference.
Yes, I think cc:stable is fine.
--
Sergei
prev parent reply other threads:[~2021-04-01 6:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-31 8:44 [PATCH] ia64: fix user_stack_pointer() for ptrace() Sergei Trofimovich
2021-04-01 0:49 ` Andrew Morton
2021-04-01 6:28 ` Sergei Trofimovich [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=20210401072846.0cabee26@sf \
--to=slyfox@gentoo.org \
--cc=akpm@linux-foundation.org \
--cc=ldv@altlinux.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@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