From: Matthew Wilcox <willy@infradead.org>
To: Xiaofeng Yuan <yuanxiaofeng1@huawei.com>
Cc: keescook@chromium.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] usercopy: optimize stack check flow when the
Date: Tue, 14 Aug 2018 05:34:54 -0700 [thread overview]
Message-ID: <20180814123454.GA25328@bombadil.infradead.org> (raw)
In-Reply-To: <1534249051-56879-1-git-send-email-yuanxiaofeng1@huawei.com>
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 certain conditions: CONFIG_ARCH_THREAD_STACK_ALLOCATOR
> is not defined and (THREAD_SIZE >= PAGE_SIZE). At this point, We can skip
> the check_heap_object() for kernel stacks to improve performance.
> Similarly, the virtually-mapped stack can skip check_heap_object() also,
> beacause virt_addr_valid() will return.
Why not just check_stack_object() first, then check_heap_object() second?
next prev parent reply other threads:[~2018-08-14 12:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-14 12:17 [PATCH RFC] usercopy: optimize stack check flow when the Xiaofeng Yuan
2018-08-14 12:34 ` Matthew Wilcox [this message]
2018-08-14 13:02 ` [PATCH RFC] usercopy: optimize stack check flow when the page-spanning test is disabled Yuanxiaofeng (XiAn)
2018-08-14 13:09 ` Matthew Wilcox
2018-08-14 18:54 ` Kees Cook
2018-08-15 11:59 ` Yuanxiaofeng (XiAn)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180814123454.GA25328@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=yuanxiaofeng1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).