From: Michael Ellerman <mpe@ellerman•id.au>
To: Oleg Nesterov <oleg@redhat•com>,
Christophe Leroy <christophe.leroy@csgroup•eu>
Cc: Christophe Leroy <christophe.leroy@c-s•fr>,
Madhavan Srinivasan <maddy@linux•vnet.ibm.com>,
linuxppc-dev@lists•ozlabs.org,
Nicholas Piggin <npiggin@gmail•com>,
linux-kernel@vger•kernel.org, Paul Mackerras <paulus@samba•org>,
Al Viro <viro@zeniv•linux.org.uk>,
"Aneesh Kumar K.V" <aneesh.kumar@linux•ibm.com>,
Jan Kratochvil <jan.kratochvil@redhat•com>
Subject: Re: [PATCH v3 2/2] powerpc/ptrace: Hard wire PT_SOFTE value to 1 in gpr_get() too
Date: Tue, 24 Nov 2020 11:53:03 +1100 [thread overview]
Message-ID: <87360z1spc.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20201123180142.GB20279@redhat.com>
Oleg Nesterov <oleg@redhat•com> writes:
> Christophe, et al,
>
> So what?
>
> Are you going to push your change or should I re-send 1-2 without
> whitespace cleanups?
I'll take your 1 & 2 and fixup the whitespace issues when applying.
cheers
> On 11/19, Oleg Nesterov wrote:
>>
>> On 11/19, Christophe Leroy wrote:
>> >
>> > I think the following should work, and not require the first patch (compile
>> > tested only).
>> >
>> > --- a/arch/powerpc/kernel/ptrace/ptrace-view.c
>> > +++ b/arch/powerpc/kernel/ptrace/ptrace-view.c
>> > @@ -234,9 +234,21 @@ static int gpr_get(struct task_struct *target, const
>> > struct user_regset *regset,
>> > BUILD_BUG_ON(offsetof(struct pt_regs, orig_gpr3) !=
>> > offsetof(struct pt_regs, msr) + sizeof(long));
>> >
>> > +#ifdef CONFIG_PPC64
>> > + membuf_write(&to, &target->thread.regs->orig_gpr3,
>> > + offsetof(struct pt_regs, softe) - offsetof(struct pt_regs,
>> > orig_gpr3));
>> > + membuf_store(&to, 1UL);
>> > +
>> > + BUILD_BUG_ON(offsetof(struct pt_regs, trap) !=
>> > + offsetof(struct pt_regs, softe) + sizeof(long));
>> > +
>> > + membuf_write(&to, &target->thread.regs->trap,
>> > + sizeof(struct user_pt_regs) - offsetof(struct pt_regs, trap));
>> > +#else
>> > membuf_write(&to, &target->thread.regs->orig_gpr3,
>> > sizeof(struct user_pt_regs) -
>> > offsetof(struct pt_regs, orig_gpr3));
>> > +#endif
>> > return membuf_zero(&to, ELF_NGREG * sizeof(unsigned long) -
>> > sizeof(struct user_pt_regs));
>> > }
>>
>> Probably yes.
>>
>> This mirrors the previous patch I sent (https://lore.kernel.org/lkml/20190917143753.GA12300@redhat.com/)
>> and this is exactly what I tried to avoid, we can make a simpler fix now.
>>
>> But let me repeat, I agree with any fix even if imp my version simplifies the code, just
>> commit this change and lets forget this problem.
>>
>> Oleg.
next prev parent reply other threads:[~2020-11-24 0:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 16:01 [PATCH v3 0/2] powerpc/ptrace: Hard wire PT_SOFTE value to 1 in gpr_get() too Oleg Nesterov
2020-11-19 16:02 ` [PATCH v3 1/2] powerpc/ptrace: simplify gpr_get/tm_cgpr_get Oleg Nesterov
2020-11-19 17:16 ` Christophe Leroy
2020-11-19 18:18 ` Oleg Nesterov
2020-11-19 16:02 ` [PATCH v3 2/2] powerpc/ptrace: Hard wire PT_SOFTE value to 1 in gpr_get() too Oleg Nesterov
2020-11-19 16:05 ` Oleg Nesterov
2020-11-19 17:18 ` Christophe Leroy
2020-11-19 21:10 ` Christophe Leroy
2020-11-19 22:43 ` Oleg Nesterov
2020-11-23 18:01 ` Oleg Nesterov
2020-11-24 0:53 ` Michael Ellerman [this message]
2020-11-19 17:19 ` [PATCH v3 0/2] " Christophe Leroy
2020-11-19 18:22 ` Oleg Nesterov
2020-12-10 11:30 ` Michael Ellerman
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=87360z1spc.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman$(echo .)id.au \
--cc=aneesh.kumar@linux$(echo .)ibm.com \
--cc=christophe.leroy@c-s$(echo .)fr \
--cc=christophe.leroy@csgroup$(echo .)eu \
--cc=jan.kratochvil@redhat$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=maddy@linux$(echo .)vnet.ibm.com \
--cc=npiggin@gmail$(echo .)com \
--cc=oleg@redhat$(echo .)com \
--cc=paulus@samba$(echo .)org \
--cc=viro@zeniv$(echo .)linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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