[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACT4Y+bDz4oSLdy1u9PhS43PGeYE9RbEX7NG-iM-VcvYEWBymw@mail.gmail.com>
Date: Mon, 24 Feb 2025 14:22:53 +0100
From: Dmitry Vyukov <dvyukov@...gle.com>
To: Dave Hansen <dave.hansen@...el.com>
Cc: mathieu.desnoyers@...icios.com, peterz@...radead.org, boqun.feng@...il.com,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, hpa@...or.com, aruna.ramakrishna@...cle.com,
elver@...gle.com, "Paul E. McKenney" <paulmck@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] selftests/rseq: Add test for rseq+pkeys
On Fri, 21 Feb 2025 at 18:24, Dave Hansen <dave.hansen@...el.com> wrote:
>
> On 2/17/25 03:07, Dmitry Vyukov wrote:
> > +++ b/tools/testing/selftests/rseq/pkey_test.c
>
> There's also a:
>
> tools/testing/selftests/mm/protection_keys.c
>
> The main thing that will get you is testing with a bunch of different
> pkey values and also a few different memory types including huge pages.
> It also keeps an eye on PKRU consistency by keeping a shadow. So if, for
> instance, the rseq code forgot to restore PKRU, that code would be
> likely to catch it. It's caught a few bugs during development for me
> when PKRU was getting wrongly-munged.
>
> But, I'm not picky about selftests. Any test is better than no test. So,
> whatever you decide to do:
>
> Acked-by: Dave Hansen <dave.hansen@...ux.intel.com>
I dunno. It also depends on the rseq helper header and helper source
file that is currently compiled into tests only by rseq Makefile.
v2 of the test was already checking that the pkey register wasn't messed with.
But I had to rework the test for v3/v4.
Powered by blists - more mailing lists