Thread (107 messages) 107 messages, 7 authors, 2020-04-08

Re: [RFC PATCH v9 15/27] mm: Handle THP/HugeTLB Shadow Stack page fault

From: Yu-cheng Yu <hidden>
Date: 2020-03-13 22:00:25
Also in: linux-arch, linux-doc, linux-mm, lkml

On Tue, 2020-02-25 at 12:59 -0800, Kees Cook wrote:
On Wed, Feb 05, 2020 at 10:19:23AM -0800, Yu-cheng Yu wrote:
quoted
This patch implements THP Shadow Stack (SHSTK) copying in the same way as
in the previous patch for regular PTE.

In copy_huge_pmd(), clear the dirty bit from the PMD to cause a page fault
upon the next SHSTK access to the PMD.  At that time, fix the PMD and
copy/re-use the page.
Now is as good a time as any to ask: do you have selftests for all this?
It seems like it would be really nice to have a way to verify SHSTK is
working correctly.
Yes, I have some simple tests at https://github.com/yyu168/cet-smoke-test.
I also run Linux/tools/testing/selftests/x86 and GLIBC tests with CET and THP
combinations.

Yu-cheng

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help