[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200811111551.GA3958@lst.de>
Date: Tue, 11 Aug 2020 13:15:51 +0200
From: Christoph Hellwig <hch@....de>
To: Miles Chen <miles.chen@...iatek.com>
Cc: Christoph Hellwig <hch@....de>,
"David S . Miller" <davem@...emloft.net>,
linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org,
wsd_upstream@...iatek.com
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@...iatek.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.
Powered by blists - more mailing lists