Re: [PATCH] cxl: fix setting of _PAGE_USER bit when handling page faults
From: Matthew R. Ochs <hidden>
Date: 2016-03-29 22:08:17
From: Matthew R. Ochs <hidden>
Date: 2016-03-29 22:08:17
On Mar 17, 2016, at 11:01 PM, Andrew Donnellan =
[off-list ref] wrote:
=20 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. =20 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.
=20
Fix the check so that the _PAGE_USER bit is set only as intended.
=20
Fixes: f204e0b8cedd ("cxl: Driver code for powernv PCIe based cards =for
userspace access") Signed-off-by: Andrew Donnellan <redacted>
Per Ian's suggestion, I went ahead and tried this with cxlflash. Tested-by: Matthew R. Ochs <redacted>