Re: [PATCH] x86/mm: Remove set_pages_x() and set_pages_nx()

2019-09-18 Thread Christoph Hellwig
On Wed, Sep 18, 2019 at 01:17:13PM -0500, Larry Finger wrote: > The external module is vboxdrv, which is part of VirtualBox. The setting of > pages to be executable appears to have been added in kernel 2.4.20. > > I am now testing with the former calls to set_pages_x() and set_pages_nx() > disabl

Re: [PATCH] x86/mm: Remove set_pages_x() and set_pages_nx()

2019-09-18 Thread Larry Finger
On 9/18/19 12:53 PM, Linus Torvalds wrote: On Wed, Sep 18, 2019 at 10:50 AM Larry Finger wrote: Is there approved way for pages to be set to be executable by an external module that would not be a security issue? Point to what external module and why. Honestly, the likely answer is simply "

Re: [PATCH] x86/mm: Remove set_pages_x() and set_pages_nx()

2019-09-18 Thread Linus Torvalds
On Wed, Sep 18, 2019 at 10:50 AM Larry Finger wrote: > > Is there approved way for pages to be set to be executable by an external > module > that would not be a security issue? Point to what external module and why. Honestly, the likely answer is simply "no". Why would an external module ever

Re: [PATCH] x86/mm: Remove set_pages_x() and set_pages_nx()

2019-09-18 Thread Christoph Hellwig
On Wed, Sep 18, 2019 at 12:49:56PM -0500, Larry Finger wrote: > Is there approved way for pages to be set to be executable by an external > module that would not be a security issue? There is approved way for modules to set kernel code executable, because well they shouldn't. And as stated many

Re: [PATCH] x86/mm: Remove set_pages_x() and set_pages_nx()

2019-09-18 Thread Larry Finger
On 9/18/19 11:45 AM, Christoph Hellwig wrote: On Wed, Sep 18, 2019 at 11:41:21AM -0500, Larry Finger wrote: In commit 185be15143aa ("x86/mm: Remove set_pages_x() and set_pages_nx()"), the wrappers were removed as they did not provide a real benefit over set_memory_x() and set_memory_nx(). This c

Re: [PATCH] x86/mm: Remove set_pages_x() and set_pages_nx()

2019-09-18 Thread Christoph Hellwig
On Wed, Sep 18, 2019 at 11:41:21AM -0500, Larry Finger wrote: > In commit 185be15143aa ("x86/mm: Remove set_pages_x() and set_pages_nx()"), > the wrappers were removed as they did not provide a real benefit over > set_memory_x() and set_memory_nx(). This change causes a problem because > the wrappe