[PATCH] cxl: fix setting of _PAGE_USER bit when handling page faults

Matthew R. Ochs mrochs at linux.vnet.ibm.com
Wed Mar 30 09:08:10 AEDT 2016


> On Mar 17, 2016, at 11:01 PM, Andrew Donnellan <andrew.donnellan at au1.ibm.com> wrote:
> 
> When handling page faults, cxl_handle_page_fault() checks whether the page
> should be accessible by userspace and have its _PAGE_USER access bit set.
> _PAGE_USER should be set if the context's kernel flag isn't set, or if the
> page falls outside of kernel memory.
> 
> However, the check currently uses the wrong operator, causing it to always
> evalute to true. As such, we always set the _PAGE_USER bit, even when it
> should be restricted to the kernel.
> 
> Fix the check so that the _PAGE_USER bit is set only as intended.
> 
> Fixes: f204e0b8cedd ("cxl: Driver code for powernv PCIe based cards for
> userspace access")
> Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

Per Ian's suggestion, I went ahead and tried this with cxlflash.

Tested-by: Matthew R. Ochs <mrochs at linux.vnet.ibm.com>



More information about the Linuxppc-dev mailing list