Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-12-11 Thread Maciej W. Rozycki
On Wed, 6 Dec 2017, Maciej W. Rozycki wrote: > > > 2. Actually assert what we rely on having been enforced by generic code, > > >i.e.: > > > > > > BUG_ON(*count % sizeof(elf_fpreg_t)); > > > for (i = 0; i < NUM_FPU_REGS && *count > 0; i++) { > > > err = user_regset_copyin(pos,

Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-12-11 Thread Maciej W. Rozycki
On Wed, 6 Dec 2017, Maciej W. Rozycki wrote: > > > 2. Actually assert what we rely on having been enforced by generic code, > > >i.e.: > > > > > > BUG_ON(*count % sizeof(elf_fpreg_t)); > > > for (i = 0; i < NUM_FPU_REGS && *count > 0; i++) { > > > err = user_regset_copyin(pos,

Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-12-06 Thread Maciej W. Rozycki
On Fri, 1 Dec 2017, Dave Martin wrote: > > You are of course right about the (partially) uninitialised variable, and > > I think there are two ways to address it: > > > > 1. By preinitialising it, i.e.: > > > > for (i = 0; i < NUM_FPU_REGS && *count > 0; i++) { > > fpr_val =

Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-12-06 Thread Maciej W. Rozycki
On Fri, 1 Dec 2017, Dave Martin wrote: > > You are of course right about the (partially) uninitialised variable, and > > I think there are two ways to address it: > > > > 1. By preinitialising it, i.e.: > > > > for (i = 0; i < NUM_FPU_REGS && *count > 0; i++) { > > fpr_val =

Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-12-06 Thread Maciej W. Rozycki
On Fri, 1 Dec 2017, Dave Martin wrote: > > That wasn't actually clarified in the referred commit's description, > > which it should in the first place, and I wasn't able to track down any > > review of your change as submitted, which would be the potential second > > source of such support

Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-12-06 Thread Maciej W. Rozycki
On Fri, 1 Dec 2017, Dave Martin wrote: > > That wasn't actually clarified in the referred commit's description, > > which it should in the first place, and I wasn't able to track down any > > review of your change as submitted, which would be the potential second > > source of such support

Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-12-01 Thread Dave Martin
From: Dave Martin <dave.mar...@arm.com> To: "Maciej W. Rozycki" <ma...@mips.com> Cc: Ralf Baechle <r...@linux-mips.org>, James Hogan <james.ho...@mips.com>, Subject: Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_

Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-12-01 Thread Dave Martin
From: Dave Martin To: "Maciej W. Rozycki" Cc: Ralf Baechle , James Hogan , Subject: Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET In-Reply-To: On Thu, Nov 30, 2017 at 07:38:25PM +, Maciej W. Rozycki wrote: [...] > >

Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-12-01 Thread Dave Martin
On Thu, Nov 30, 2017 at 07:38:25PM +, Maciej W. Rozycki wrote: > Hi Dave, > > > > linux-mips-nt-prfpreg-count.diff > > > Index: linux-sfr-test/arch/mips/kernel/ptrace.c > > > === > > > ---

Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-12-01 Thread Dave Martin
On Thu, Nov 30, 2017 at 07:38:25PM +, Maciej W. Rozycki wrote: > Hi Dave, > > > > linux-mips-nt-prfpreg-count.diff > > > Index: linux-sfr-test/arch/mips/kernel/ptrace.c > > > === > > > ---

Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-11-30 Thread Maciej W. Rozycki
Hi Dave, > > linux-mips-nt-prfpreg-count.diff > > Index: linux-sfr-test/arch/mips/kernel/ptrace.c > > === > > --- linux-sfr-test.orig/arch/mips/kernel/ptrace.c 2017-11-21 > > 22:12:00.0 + > > +++

Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-11-30 Thread Maciej W. Rozycki
Hi Dave, > > linux-mips-nt-prfpreg-count.diff > > Index: linux-sfr-test/arch/mips/kernel/ptrace.c > > === > > --- linux-sfr-test.orig/arch/mips/kernel/ptrace.c 2017-11-21 > > 22:12:00.0 + > > +++

Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-11-30 Thread Dave Martin
On Wed, Nov 29, 2017 at 03:21:14PM +, Maciej W. Rozycki wrote: > Fix a commit d614fd58a283 ("mips/ptrace: Preserve previous registers for > short regset write") bug and allow the last register requested with a > ptrace(2) PTRACE_SETREGSET call to be partially written if supplied this > way

Re: [PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-11-30 Thread Dave Martin
On Wed, Nov 29, 2017 at 03:21:14PM +, Maciej W. Rozycki wrote: > Fix a commit d614fd58a283 ("mips/ptrace: Preserve previous registers for > short regset write") bug and allow the last register requested with a > ptrace(2) PTRACE_SETREGSET call to be partially written if supplied this > way

[PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-11-29 Thread Maciej W. Rozycki
Fix a commit d614fd58a283 ("mips/ptrace: Preserve previous registers for short regset write") bug and allow the last register requested with a ptrace(2) PTRACE_SETREGSET call to be partially written if supplied this way by the caller, like with other register sets. Cc: sta...@vger.kernel.org #

[PATCH 4/5] MIPS: Execute any partial write of the last register with PTRACE_SETREGSET

2017-11-29 Thread Maciej W. Rozycki
Fix a commit d614fd58a283 ("mips/ptrace: Preserve previous registers for short regset write") bug and allow the last register requested with a ptrace(2) PTRACE_SETREGSET call to be partially written if supplied this way by the caller, like with other register sets. Cc: sta...@vger.kernel.org #