RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2018-02-13 Thread Aleksandar Markovic
> > > From: James Hogan [jho...@kernel.org] > Sent: Thursday, February 8, 2018 12:55 PM > > Hi, > > On Thu, Dec 07, 2017 at 11:33:47AM +, Miodrag Dinic wrote: > > > On Wed, Dec 06, 2017 at 05:50:52PM +, Maciej W. Rozycki wrote: > > > > What

RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2018-02-13 Thread Aleksandar Markovic
> > > From: James Hogan [jho...@kernel.org] > Sent: Thursday, February 8, 2018 12:55 PM > > Hi, > > On Thu, Dec 07, 2017 at 11:33:47AM +, Miodrag Dinic wrote: > > > On Wed, Dec 06, 2017 at 05:50:52PM +, Maciej W. Rozycki wrote: > > > > What

Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2018-02-08 Thread James Hogan
Hi, On Thu, Dec 07, 2017 at 11:33:47AM +, Miodrag Dinic wrote: > > On Wed, Dec 06, 2017 at 05:50:52PM +, Maciej W. Rozycki wrote: > > > What problem are you trying to solve anyway? Is it not something that > > > can be handled with the `execstack' utility? > > > > The commit message

Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2018-02-08 Thread James Hogan
Hi, On Thu, Dec 07, 2017 at 11:33:47AM +, Miodrag Dinic wrote: > > On Wed, Dec 06, 2017 at 05:50:52PM +, Maciej W. Rozycki wrote: > > > What problem are you trying to solve anyway? Is it not something that > > > can be handled with the `execstack' utility? > > > > The commit message

RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2018-01-02 Thread Maciej W. Rozycki
Hi Miodrag, > > I presume what you > > actually want here is for the kernel to lie & indicate to whatever part > > of Android that performs this check that the stack is non-executable > > even when it is really executable? > > Basically yes, because we do not have other options at this point.

RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2018-01-02 Thread Maciej W. Rozycki
Hi Miodrag, > > I presume what you > > actually want here is for the kernel to lie & indicate to whatever part > > of Android that performs this check that the stack is non-executable > > even when it is really executable? > > Basically yes, because we do not have other options at this point.

RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-12-07 Thread Miodrag Dinic
Maciej Rozycki; Aleksandar Markovic; Aleksandar Markovic Cc: Miodrag Dinic; James Hogan; David Daney; linux-m...@linux-mips.org; Andrew Morton; DengCheng Zhu; Ding Tianhong; Douglas Leung; Frederic Weisbecker; Goran Ferenc; Ingo Molnar; James Cowgill; Jonathan Corbet; linux-...@vger.kernel.org;

RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-12-07 Thread Miodrag Dinic
Maciej Rozycki; Aleksandar Markovic; Aleksandar Markovic Cc: Miodrag Dinic; James Hogan; David Daney; linux-m...@linux-mips.org; Andrew Morton; DengCheng Zhu; Ding Tianhong; Douglas Leung; Frederic Weisbecker; Goran Ferenc; Ingo Molnar; James Cowgill; Jonathan Corbet; linux-...@vger.kernel.org;

Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-12-06 Thread Paul Burton
Hi Maciej, Aleksandar, On Wed, Dec 06, 2017 at 05:50:52PM +, Maciej W. Rozycki wrote: > What problem are you trying to solve anyway? Is it not something that > can be handled with the `execstack' utility? The commit message states that for Android "non-exec stack is required". Is Android

Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-12-06 Thread Paul Burton
Hi Maciej, Aleksandar, On Wed, Dec 06, 2017 at 05:50:52PM +, Maciej W. Rozycki wrote: > What problem are you trying to solve anyway? Is it not something that > can be handled with the `execstack' utility? The commit message states that for Android "non-exec stack is required". Is Android

RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-12-06 Thread Maciej W. Rozycki
Hi Miodrag, > When kernel is detecting the type of mapping it should apply : > > fs/binfmt_elf.c: > ... > if (elf_read_implies_exec(loc->elf_ex, executable_stack)) > current->personality |= READ_IMPLIES_EXEC; > ... > > this effectively calls mips_elf_read_implies_exec()

RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-12-06 Thread Maciej W. Rozycki
Hi Miodrag, > When kernel is detecting the type of mapping it should apply : > > fs/binfmt_elf.c: > ... > if (elf_read_implies_exec(loc->elf_ex, executable_stack)) > current->personality |= READ_IMPLIES_EXEC; > ... > > this effectively calls mips_elf_read_implies_exec()

Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-12-01 Thread David Daney
On 11/30/2017 05:06 AM, Miodrag Dinic wrote: Hi James, We do have PT_GNU_STACK flags set correctly, this feature is required to workaround CPU revisions which do not have RIXI support. RIXI support can be discovered programatically from CP0_Config3.RXI (cpu_has_rixi in asm/cpu-features.h),

Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-12-01 Thread David Daney
On 11/30/2017 05:06 AM, Miodrag Dinic wrote: Hi James, We do have PT_GNU_STACK flags set correctly, this feature is required to workaround CPU revisions which do not have RIXI support. RIXI support can be discovered programatically from CP0_Config3.RXI (cpu_has_rixi in asm/cpu-features.h),

RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-12-01 Thread Miodrag Dinic
; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; Marc Zyngier; Matt Redfearn; Mimi Zohar; Paul Burton; Paul E. McKenney; Petar Jovanovic; Raghu Gandham; Ralf Baechle; Thomas Gleixner; Tom Saeger Subject: RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter Hi James, > > We d

RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-12-01 Thread Miodrag Dinic
; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; Marc Zyngier; Matt Redfearn; Mimi Zohar; Paul Burton; Paul E. McKenney; Petar Jovanovic; Raghu Gandham; Ralf Baechle; Thomas Gleixner; Tom Saeger Subject: RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter Hi James, > > We d

RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-11-30 Thread Miodrag Dinic
Paul Burton; Paul E. McKenney; Petar Jovanovic; Raghu Gandham; Ralf Baechle; Thomas Gleixner; Tom Saeger Subject: Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter On Thu, Nov 30, 2017 at 09:34:15AM +, Miodrag Dinic wrote: > Hi David, > > Sorry for a late response, please fi

RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-11-30 Thread Miodrag Dinic
rg; Marc Zyngier; Matt Redfearn; Mimi Zohar; Paul Burton; Paul E. McKenney; Petar Jovanovic; Raghu Gandham; Ralf Baechle; Thomas Gleixner; Tom Saeger Subject: Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter On Thu, Nov 30, 2017 at 09:34:15AM +, Miodrag Dinic wrote: > Hi David,

Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-11-30 Thread James Hogan
; linux-...@vger.kernel.org; > linux-kernel@vger.kernel.org; Marc Zyngier; Matt Redfearn; Mimi Zohar; Paul > Burton; Paul E. McKenney; Petar Jovanovic; Raghu Gandham; Ralf Baechle; > Thomas Gleixner; Tom Saeger > Subject: Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter >

Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-11-30 Thread James Hogan
; linux-...@vger.kernel.org; > linux-kernel@vger.kernel.org; Marc Zyngier; Matt Redfearn; Mimi Zohar; Paul > Burton; Paul E. McKenney; Petar Jovanovic; Raghu Gandham; Ralf Baechle; > Thomas Gleixner; Tom Saeger > Subject: Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter >

RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-11-30 Thread Miodrag Dinic
f Baechle; Thomas Gleixner; Tom Saeger Subject: Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter On 11/21/2017 05:56 AM, Aleksandar Markovic wrote: > From: Miodrag Dinic <miodrag.di...@mips.com> > > Add a new kernel parameter to override the default behavior related >

RE: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-11-30 Thread Miodrag Dinic
f Baechle; Thomas Gleixner; Tom Saeger Subject: Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter On 11/21/2017 05:56 AM, Aleksandar Markovic wrote: > From: Miodrag Dinic > > Add a new kernel parameter to override the default behavior related > to the decision whether to set up s

Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-11-21 Thread David Daney
On 11/21/2017 05:56 AM, Aleksandar Markovic wrote: From: Miodrag Dinic Add a new kernel parameter to override the default behavior related to the decision whether to set up stack as non-executable in function mips_elf_read_implies_exec(). The new parameter is used to

Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-11-21 Thread David Daney
On 11/21/2017 05:56 AM, Aleksandar Markovic wrote: From: Miodrag Dinic Add a new kernel parameter to override the default behavior related to the decision whether to set up stack as non-executable in function mips_elf_read_implies_exec(). The new parameter is used to control non executable

Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-11-21 Thread Randy Dunlap
On 11/21/2017 05:56 AM, Aleksandar Markovic wrote: > From: Miodrag Dinic > > Add a new kernel parameter to override the default behavior related > to the decision whether to set up stack as non-executable in function > mips_elf_read_implies_exec(). > > The new parameter

Re: [PATCH v2] MIPS: Add nonxstack=on|off kernel parameter

2017-11-21 Thread Randy Dunlap
On 11/21/2017 05:56 AM, Aleksandar Markovic wrote: > From: Miodrag Dinic > > Add a new kernel parameter to override the default behavior related > to the decision whether to set up stack as non-executable in function > mips_elf_read_implies_exec(). > > The new parameter is used to control non