From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BFEDC021A0 for ; Thu, 13 Feb 2025 11:32:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7733E6B007B; Thu, 13 Feb 2025 06:32:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 723476B0083; Thu, 13 Feb 2025 06:32:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5C3566B0085; Thu, 13 Feb 2025 06:32:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 407836B007B for ; Thu, 13 Feb 2025 06:32:36 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id EEA371405C2 for ; Thu, 13 Feb 2025 11:32:35 +0000 (UTC) X-FDA: 83114708670.09.E4EE1E1 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf13.hostedemail.com (Postfix) with ESMTP id A804020011 for ; Thu, 13 Feb 2025 11:32:33 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=TSln4mql; spf=pass (imf13.hostedemail.com: domain of liwan@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=liwan@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1739446353; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=5b/Z9vED6TjUAxztRUWYOswGC0vTW0HAvCPLc/gmISk=; b=la7ob39tSoMzk9ZXX0jG7m6mo0K5piHsUS2okjIQyzDDEkogDUF+QDAkkP+erSTfsVrJHY qxN3EEa1EtQ9StWD4tzvdzppIj3rYscKhSsydMgiEWtwwjtZpAxx2vKi3fgF0Wuc2+qceH uNOGMq/4qERrZT6Lul51Idy+JEBxvrE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1739446353; a=rsa-sha256; cv=none; b=w/4bU8+sdHVmH224A0CJtj467bLs4bxH5sZAGkqZnwz9nQyzdbxVQzGxKRIpTNvCXLZNJ7 ZMI83BkkD5gt0+W69lb9YzgW4WvaUqg/8K4PCxNN4+GVoohmBspPhP/VO9vxEEspEVO/4w r9wXvHzz/ZcYhNlavyFm3aLWEPkLRsQ= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=TSln4mql; spf=pass (imf13.hostedemail.com: domain of liwan@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=liwan@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739446353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5b/Z9vED6TjUAxztRUWYOswGC0vTW0HAvCPLc/gmISk=; b=TSln4mqlVVw3P/5dqu2V5kXXZTpmFX79MbqMFk3jmflj5Z3onXbYt3S3iStePY5YHn2mWZ fDIFxO//SLd8a67k5M1QXRkn8mBjlNk2hlUCIoookSO87kp7ez1wUp4uMxXheWKFqaYCRi 8MQJ7mvpbjnuuX6z/NwQaj5r2RdGqw0= Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-336-J0O5LS88PxKviwoL4s9XHg-1; Thu, 13 Feb 2025 06:32:31 -0500 X-MC-Unique: J0O5LS88PxKviwoL4s9XHg-1 X-Mimecast-MFC-AGG-ID: J0O5LS88PxKviwoL4s9XHg_1739446350 Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-2fa440e16ddso2041389a91.0 for ; Thu, 13 Feb 2025 03:32:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739446350; x=1740051150; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5b/Z9vED6TjUAxztRUWYOswGC0vTW0HAvCPLc/gmISk=; b=oSxDsydZaf7H5Y77f8h5gBzF8tEkArZKIHMRjfc7bwfO/14XG6xIYf05rrZAh14c3J pU2tmlFmZFmcw+WoPV/57rzvw45hosqudrv7cXOjl4hmfeCmSEc7X1uN7dw4Ud+6eRGd 6EnFZ3PCzqNAgYLjFgT/ATU1obumCZN7nLirR2GTICP7ZUmd0dmDbcasSvX0DhPuqVmE OezVXphAxZ6mA/EX0jqBCZajd3Og8RhMYM4CGEjzq/VWuZcU96lBeGTw6CzHk6ytpykO i4TFJ1iMjEB5pb+lD6q6EOsGkRjrMq0NDXoMI/ad/naqzjJt5qnzwFEHr9nt1Wfeu6Fa QKIg== X-Forwarded-Encrypted: i=1; AJvYcCXUo65I+bf0OEBwPp7RJiBJSljPmuZikhMEYGjDRhvnof3quan5CWL/08e+BK2N7l1GvdJWvNYzpA==@kvack.org X-Gm-Message-State: AOJu0YwOeMQkldUAeBTogxq3Y8j9ALPWddoPVUr8mH6W9AVnbiMYXBAx WNi6SICccT7m989GblOAwnsJFZb445KVLud+uaTVlJbknkWpJhJw1qeWIbDPihU6ElQLvyNmVyc UNPpjNyNcGzir7LIrxOdrxynnRgVn7KEfBuWO72w01RvK3zxzZSdUOexDRze6+ljWs1BTPN1CLe Ew/yHrLjPMAxfaNyutxYIILvc= X-Gm-Gg: ASbGncuF43gPbsdmpVXuqQ13fd/S1BaVvLIPIShHmkjN+24qVfYZj7K08chEkqRYMoG t5vXIz8It+7r7BXqqlFiLwzuC1YutP6e5RETmsIUip2hHK+ZhWqBFtLw3godQrxA= X-Received: by 2002:a17:90b:2705:b0:2ee:44ec:e524 with SMTP id 98e67ed59e1d1-2fbf5c70760mr9979520a91.35.1739446350243; Thu, 13 Feb 2025 03:32:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHc3xZs3vCJ1T0Q10rQLGhyp8YyoK3U1mF/XlGOkrHj+LKJVdVfzmbvS9kvFsLpybQ1UtZgWSHL+LasPTioOoU= X-Received: by 2002:a17:90b:2705:b0:2ee:44ec:e524 with SMTP id 98e67ed59e1d1-2fbf5c70760mr9979497a91.35.1739446349963; Thu, 13 Feb 2025 03:32:29 -0800 (PST) MIME-Version: 1.0 References: <20240614023009.221547-1-jhubbard@nvidia.com> <20240614023009.221547-7-jhubbard@nvidia.com> <12502c05-be51-4c9d-9cb7-5a40ba1fe307@nvidia.com> In-Reply-To: <12502c05-be51-4c9d-9cb7-5a40ba1fe307@nvidia.com> From: Li Wang Date: Thu, 13 Feb 2025 19:32:18 +0800 X-Gm-Features: AWEUYZlaAYWGKkMfBB0DeZE4ACJVQbBdLF1e1AVN4w4I0omoU08Tx9ZB_jYOqJA Message-ID: Subject: Re: [PATCH v2 6/6] selftests/mm: remove local __NR_* definitions To: John Hubbard , Nico Pache Cc: Dave Hansen , Andrew Morton , Jeff Xu , Shuah Khan , Andrei Vagin , Axel Rasmussen , Christian Brauner , David Hildenbrand , Kees Cook , Kent Overstreet , "Liam R . Howlett" , Muhammad Usama Anjum , Peter Xu , Rich Felker , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: QH18OjMoKh8sidlestmxJLrWqumsnnV5xbLQxPIvNBw_1739446350 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000cbb8de062e0469fd" X-Rspam-User: X-Rspamd-Queue-Id: A804020011 X-Rspamd-Server: rspam07 X-Stat-Signature: t6stsb9ggytmwis77b79pytxcik5uz8w X-HE-Tag: 1739446353-277650 X-HE-Meta: U2FsdGVkX18ubK9lgh0vUbP1e7Q+45xry9KLPixCLPHbTKjWo6uiOgAVpPjZ7lQv2yNyB1SIvc5+ec06MxIDYaCZN0nOe5Y/qP4X1rJC8277S+ELl9aHW1rf9rXKGAgHNTQ4ISw8/ZuBI/TK1OE+GJBleiRfxn1bQnnFKeDlmSGcEXloZlul9rqnE5Tb5uklSqWTD7idqh80o3VTg1UOYqp1EW1KVDrnEyBzE0g/Xyo0yTohzidFwYzfrOJbsCSKlo+16VlTvIYtuaoY3BcbQbzfaQ1/L07cFbR3Gn3gm2YfcZkt2ODF//8RKtf1FXsA6rxVO8V19Rt1v3h1whzVYF2otYvohnmH7HkJJUPpxY2DAHI1u1pY5OGdJAD1cwmUxIC0WdMRFTVvvDLBMuU/myZeZBX85MaS8FeGpugwrdwX5+2ekGAwOXMhSWWh74wzI+DyEPU6IWfIro89+VlLXnf16v3rWkzYq/gp/8F38SZMXkrhHsCkRQzQ56YxZaiFfCxNekcl0E4Fhpt4VW8bHQhspY10Q8UR0otcQBDLdjPqhTw7y+c7dI3EK1kfW8+kZhuT2iAppQKJJ4HdrVrz/qxHpzLqMT80fWsbW4McaERAUc1qMHJfu22fUKyQ2xbXjn3RsXaf207Lx8O8QSNB7jMKNRmcHdKd0ir4VuqswJTdw6IdlTlXsphNeu5McHJRAs0VT23IbArdc2RwMgqSMoaAvnfAe51MJvS02ByTeqqkuna5VY/xmsBHR5pkIo3uUpX29FYjEVNolDvkuaBUvmovVnlGgTNDO6PDOljKj/Y/547117k9KCr7lfo7x8JpRNiFzJhMDpD/q5DrVLoww+2vLxj/knw0Bh+8du9roX1x1TEzsa0INUQJMgb+1YUm8spq8e2N1H99CKZSTzyp93ff/XhlVxZQxn0Z0hb4/3hRh561jDqv1Z4Jwib9wczMRHhpJNv+Wo7igLx4B1+ oOnjdcae L4Ok/qKI8qYvbXa01V70gpGKrlTrbX5Czfs6LvakifrIFWwOVXaUcAykNk063s0yyBWBQf305lkBoCRAKuSEa0IArIIObgmxdrQgeuU4bbq3OhpgjwphGEwe2wqXPPFz35gLzy4MD7i0vhFDYgzf6GZQZOhs3TQA22E1yO7k/EKYneltYz2skexIL/GBdVIAUbyX/5XpRlWJkPhXH05QJBKW3iatl0S8JNaFb7Kg21bGYQ0QmorUtGsIbkcxN8R241c04A8wDMVNUfjeO1CA3X2U4CiIvlNayDW9GnDpbOInYCyxx0oUym47pDE4Prw02ED4zikE9fPcyiPxbWHyEthlWi4K9nccCkwieCw824e2SHchk5wAEXURm5YoRa/JXDEZwDlbSZ7MpuLutw8YUM4FpvvCtGr6q0Frmwui6BNMqFn6SwT/10ficwHCMIqDSgad+cVSQZci4IfiGVrZ9xTefSwcZfAMRU/S+kwV1KKGrWbAFWWmIRxGck9dxvd8LJZvDwTuQ3NHQCYL3yb1bHgrcyA87IIDULs71rt9wHvYY4co= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000016, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: --000000000000cbb8de062e0469fd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi John, On Thu, Feb 13, 2025 at 6:31=E2=80=AFAM John Hubbard = wrote: > On 2/12/25 12:34 PM, Dave Hansen wrote: > > Hi John, > > > > On 6/13/24 19:30, John Hubbard wrote: > >> --- a/tools/testing/selftests/mm/protection_keys.c > >> +++ b/tools/testing/selftests/mm/protection_keys.c > >> @@ -42,7 +42,7 @@ > >> #include > >> #include > >> #include > >> -#include > >> +#include > >> #include > >> #include > > > > I'm not quite sure how but this broke the protection_keys.c selftest fo= r > > me. Before this commit (a5c6bc590094a1a73cf6fa3f505e1945d2bf2461) thing= s > > are fine. But after, I get: > > > > running PKEY tests for unsupported CPU/OS > > > > The "unsupported" test just makes a pkey_alloc() syscall. It's probably > > calling the wrong syscall number or something. > > > > I think it's still broken in mainline. What's the right fix? > > omg I think this is an asm-generic include mistake, I'll check > on it in an hour or so, in more depth. > I just found that mlock2_() return a wrong value in mlock2-test, I guess that was caused by including the wrong header file , which might define a different syscall number than what the kernel uses on the test system. Shouldn't we make use of directly? --=20 Regards, Li Wang --000000000000cbb8de062e0469fd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi John,

On Thu, Feb 13, 2025 at 6= :31=E2=80=AFAM John Hubbard <jhub= bard@nvidia.com> wrote:
On 2/12/25 12:34 PM, Dave Hansen wrote:
> Hi John,
>
> On 6/13/24 19:30, John Hubbard wrote:
>> --- a/tools/testing/selftests/mm/protection_keys.c
>> +++ b/tools/testing/selftests/mm/protection_keys.c
>> @@ -42,7 +42,7 @@
>>=C2=A0 =C2=A0#include <sys/wait.h>
>>=C2=A0 =C2=A0#include <sys/stat.h>
>>=C2=A0 =C2=A0#include <fcntl.h>
>> -#include <unistd.h>
>> +#include <linux/unistd.h>
>>=C2=A0 =C2=A0#include <sys/ptrace.h>
>>=C2=A0 =C2=A0#include <setjmp.h>
>
> I'm not quite sure how but this broke the protection_keys.c selfte= st for
> me. Before this commit (a5c6bc590094a1a73cf6fa3f505e1945d2bf2461) thin= gs
> are fine.=C2=A0 But after, I get:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0running PKEY tests for unsupported CPU/OS >
> The "unsupported" test just makes a pkey_alloc() syscall. It= 's probably
> calling the wrong syscall number or something.
>
> I think it's still broken in mainline. What's the right fix?
omg I think this is an asm-generic include mistake, I'll check
on it in an hour or so, in more depth.

I just=C2=A0found= that mlock2_() return a wrong value in mlock2-test,
I=C2=A0guess that was caused by including the wrong header file
<asm-generic/unistd.h= >,=C2=A0w= hich might define a different syscall
number than what the kernel uses on=C2=A0the test system.

=
Shouldn't we mak= e use of <unistd.h> directly?
=C2=A0

--
Regards,
Li Wa= ng
--000000000000cbb8de062e0469fd--