Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>,
	shuah@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	kirill@shutemov.name, hpa@zytor.com, x86@kernel.org,
	dave.hansen@linux.intel.com, bp@alien8.de, mingo@redhat.com,
	tglx@linutronix.de, Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v5 0/3] selftests/lam: get_user additions and LAM enabled check
Date: Thu, 23 Jan 2025 14:52:51 -0700	[thread overview]
Message-ID: <1cf82baf-1937-42e9-add6-2a161fea434f@linuxfoundation.org> (raw)
In-Reply-To: <7qymrv7tfyt65dtqf6jhy7afkvtqftmpsa4y2hn5u65tusn7h2@3qw5dythjswm>

On 1/15/25 02:06, Maciej Wieczor-Retman wrote:
> Hello Shuah, I'd like to bump this series for visibility and ask if you still
> consider these patches okay to merge?
> 
> Just checked and there were no conflicts after applying it on the newest
> kselftest-next.
> 

This is x86 test and usually goes through x86 tree. I can take this
through kselftest tree if I get an ack from x86 maintainer.

> On 2024-11-27 at 18:35:28 +0100, Maciej Wieczor-Retman wrote:
>> Recent change in how get_user() handles pointers [1] has a specific case
>> for LAM. It assigns a different bitmask that's later used to check
>> whether a pointer comes from userland in get_user().
>>
>> While currently commented out (until LASS [2] is merged into the kernel)
>> it's worth making changes to the LAM selftest ahead of time.
>>
>> Modify cpu_has_la57() so it provides current paging level information
>> instead of the cpuid one.
>>
>> Add test case to LAM that utilizes a ioctl (FIOASYNC) syscall which uses
>> get_user() in its implementation. Execute the syscall with differently
>> tagged pointers to verify that valid user pointers are passing through
>> and invalid kernel/non-canonical pointers are not.
>>
>> Also to avoid unhelpful test failures add a check in main() to skip
>> running tests if LAM was not compiled into the kernel.
>>
>> Code was tested on a Sierra Forest Xeon machine that's LAM capable. The
>> test was ran without issues with both the LAM lines from [1] untouched
>> and commented out. The test was also ran without issues with LAM_SUP
>> both enabled and disabled.
>>
>> 4/5 level pagetables code paths were also successfully tested in Simics
>> on a 5-level capable machine.
>>
>> [1] https://lore.kernel.org/all/20241024013214.129639-1-torvalds@linux-foundation.org/
>> [2] https://lore.kernel.org/all/20241028160917.1380714-1-alexander.shishkin@linux.intel.com/
>>
>> Maciej Wieczor-Retman (3):
>>   selftests/lam: Move cpu_has_la57() to use cpuinfo flag
>>   selftests/lam: Skip test if LAM is disabled
>>   selftests/lam: Test get_user() LAM pointer handling
>>
>> tools/testing/selftests/x86/lam.c | 120 ++++++++++++++++++++++++++++--
>> 1 file changed, 115 insertions(+), 5 deletions(-)
>>
>> -- 
>> 2.47.1
>>
> 

thanks,
-- Shuah


      reply	other threads:[~2025-01-23 21:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-27 17:35 [PATCH v5 0/3] selftests/lam: get_user additions and LAM enabled check Maciej Wieczor-Retman
2024-11-27 17:35 ` [PATCH v5 1/3] selftests/lam: Move cpu_has_la57() to use cpuinfo flag Maciej Wieczor-Retman
2025-01-24 16:14   ` Dave Hansen
2025-01-24 20:17     ` Maciej Wieczor-Retman
2025-01-24 20:24       ` Dave Hansen
2025-01-24 20:29       ` Maciej Wieczor-Retman
2024-11-27 17:35 ` [PATCH v5 2/3] selftests/lam: Skip test if LAM is disabled Maciej Wieczor-Retman
2025-01-24 16:23   ` Dave Hansen
2025-01-24 20:09     ` Maciej Wieczor-Retman
2024-11-27 17:35 ` [PATCH v5 3/3] selftests/lam: Test get_user() LAM pointer handling Maciej Wieczor-Retman
2025-01-24 16:32   ` Dave Hansen
2025-01-24 20:19     ` Maciej Wieczor-Retman
2025-01-15  9:06 ` [PATCH v5 0/3] selftests/lam: get_user additions and LAM enabled check Maciej Wieczor-Retman
2025-01-23 21:52   ` Shuah Khan [this message]

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=1cf82baf-1937-42e9-add6-2a161fea434f@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maciej.wieczor-retman@intel.com \
    --cc=mingo@redhat.com \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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