Re: [PATCH RFC] usercopy: optimize stack check flow when the page-spanning test is disabled

2018-08-15 Thread Yuanxiaofeng (XiAn)
On 8/15/2018 2:54 AM, Kees Cook wrote: > (Please use contextual quoting in replies... mixing contextual with > top-posting becomes very hard to read...) > > On Tue, Aug 14, 2018 at 6:02 AM, Yuanxiaofeng (XiAn) > wrote: >> On Tue, Aug 14, 2018 at 8:35PM Matthew Wilcox wrote: >>> On Tue, Aug 14,

Re: [PATCH RFC] usercopy: optimize stack check flow when the page-spanning test is disabled

2018-08-14 Thread Kees Cook
(Please use contextual quoting in replies... mixing contextual with top-posting becomes very hard to read...) On Tue, Aug 14, 2018 at 6:02 AM, Yuanxiaofeng (XiAn) wrote: > On Tue, Aug 14, 2018 at 8:35PM Matthew Wilcox wrote: >> On Tue, Aug 14, 2018 at 08:17:31PM +0800, Xiaofeng Yuan wrote: >>> Th

Re: [PATCH RFC] usercopy: optimize stack check flow when the page-spanning test is disabled

2018-08-14 Thread Matthew Wilcox
e the useful check will not be skipped. > > -Original Message- > From: Matthew Wilcox [mailto:wi...@infradead.org] > Sent: Tuesday, August 14, 2018 8:35 PM > To: Yuanxiaofeng (XiAn) > Cc: keesc...@chromium.org; linux...@kvack.org; linux-kernel@vger.kernel.org > Subje

RE: [PATCH RFC] usercopy: optimize stack check flow when the page-spanning test is disabled

2018-08-14 Thread Yuanxiaofeng (XiAn)
t: Re: [PATCH RFC] usercopy: optimize stack check flow when the On Tue, Aug 14, 2018 at 08:17:31PM +0800, Xiaofeng Yuan wrote: > The check_heap_object() checks the spanning multiple pages and slab. > When the page-spanning test is disabled, the check_heap_object() is > redundant for spa

Re: [PATCH RFC] usercopy: optimize stack check flow when the

2018-08-14 Thread Matthew Wilcox
On Tue, Aug 14, 2018 at 08:17:31PM +0800, Xiaofeng Yuan wrote: > The check_heap_object() checks the spanning multiple pages and slab. > When the page-spanning test is disabled, the check_heap_object() is > redundant for spanning multiple pages. However, the kernel stacks are > multiple pages under

[PATCH RFC] usercopy: optimize stack check flow when the page-spanning test is disabled

2018-08-14 Thread Xiaofeng Yuan
The check_heap_object() checks the spanning multiple pages and slab. When the page-spanning test is disabled, the check_heap_object() is redundant for spanning multiple pages. However, the kernel stacks are multiple pages under certain conditions: CONFIG_ARCH_THREAD_STACK_ALLOCATOR is not defined a

[PATCH RFC] usercopy: optimize stack check flow when the

2018-08-14 Thread Xiaofeng Yuan
The check_heap_object() checks the spanning multiple pages and slab. When the page-spanning test is disabled, the check_heap_object() is redundant for spanning multiple pages. However, the kernel stacks are multiple pages under certain conditions: CONFIG_ARCH_THREAD_STACK_ALLOCATOR is not defined a