Messages in this thread | | | Date | Tue, 11 Aug 2020 13:15:51 +0200 | From | Christoph Hellwig <> | Subject | Re: [PATCH] net: untag pointer in sockptr_is_kernel |
| |
On Tue, Aug 11, 2020 at 06:27:04PM +0800, Miles Chen wrote: > From: Miles Chen <miles.chen@mediatek.com> > > sockptr_is_kernel() uses (sockptr.kernel >= TASK_SIZE) to tell > if the pointer is kernel space or user space. When user space uses > the "top byte ignored" feature such as HWAsan, we must untag > the pointer before checking against TASK_SIZE. > > sockptr_is_kernel() will view a tagged user pointer as a kernel pointer > and use memcpy directly and causes a kernel crash.
Dave merged a patch from me to rever the optimized sockptr implementation for now. If we bring it back we should fold in your fix.
| |