]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop all of Jason's selftest patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Oct 2024 07:30:44 +0000 (09:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Oct 2024 07:30:44 +0000 (09:30 +0200)
45 files changed:
queue-4.19/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch [deleted file]
queue-4.19/series
queue-5.10/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch [deleted file]
queue-5.10/series
queue-5.15/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch [deleted file]
queue-5.15/selftests-vdso-fix-vdso-name-for-powerpc.patch [deleted file]
queue-5.15/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch [deleted file]
queue-5.15/selftests-vdso-fix-vdso_config-for-powerpc.patch [deleted file]
queue-5.15/selftests-vdso-fix-vdso_config-for-s390.patch [deleted file]
queue-5.15/series
queue-5.4/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch [deleted file]
queue-5.4/series
queue-6.1/powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch [deleted file]
queue-6.1/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch [deleted file]
queue-6.1/selftests-vdso-fix-vdso-name-for-powerpc.patch [deleted file]
queue-6.1/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch [deleted file]
queue-6.1/selftests-vdso-fix-vdso_config-for-powerpc.patch [deleted file]
queue-6.1/selftests-vdso-fix-vdso_config-for-s390.patch [deleted file]
queue-6.1/series
queue-6.10/powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch [deleted file]
queue-6.10/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch [deleted file]
queue-6.10/selftests-vdso-fix-vdso-name-for-powerpc.patch [deleted file]
queue-6.10/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch [deleted file]
queue-6.10/selftests-vdso-fix-vdso_config-for-powerpc.patch [deleted file]
queue-6.10/selftests-vdso-fix-vdso_config-for-s390.patch [deleted file]
queue-6.10/series
queue-6.11/powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch [deleted file]
queue-6.11/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch [deleted file]
queue-6.11/selftests-vdso-fix-the-way-vdso-functions-are-called.patch [deleted file]
queue-6.11/selftests-vdso-fix-vdso-name-for-powerpc.patch [deleted file]
queue-6.11/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch [deleted file]
queue-6.11/selftests-vdso-fix-vdso_config-for-powerpc.patch [deleted file]
queue-6.11/selftests-vdso-fix-vdso_config-for-s390.patch [deleted file]
queue-6.11/selftests-vdso-look-for-arch-specific-function-name-.patch [deleted file]
queue-6.11/selftests-vdso-simplify-getrandom-thread-local-stora.patch [deleted file]
queue-6.11/selftests-vdso-skip-getrandom-test-if-architecture-i.patch [deleted file]
queue-6.11/selftests-vdso-use-parse_vdso.h-in-vdso_test_abi.patch [deleted file]
queue-6.11/series
queue-6.6/powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch [deleted file]
queue-6.6/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch [deleted file]
queue-6.6/selftests-vdso-fix-vdso-name-for-powerpc.patch [deleted file]
queue-6.6/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch [deleted file]
queue-6.6/selftests-vdso-fix-vdso_config-for-powerpc.patch [deleted file]
queue-6.6/selftests-vdso-fix-vdso_config-for-s390.patch [deleted file]
queue-6.6/series

diff --git a/queue-4.19/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch b/queue-4.19/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
deleted file mode 100644 (file)
index 3c1bfbf..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-From 4f25d91c6fa317f332c5dce98a3ca2a5faa3a18a Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:37 +0200
-Subject: selftests: vDSO: fix vDSO symbols lookup for powerpc64
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit ba83b3239e657469709d15dcea5f9b65bf9dbf34 ]
-
-On powerpc64, following tests fail locating vDSO functions:
-
-  ~ # ./vdso_test_abi
-  TAP version 13
-  1..16
-  # [vDSO kselftest] VDSO_VERSION: LINUX_2.6.15
-  # Couldn't find __kernel_gettimeofday
-  ok 1 # SKIP __kernel_gettimeofday
-  # clock_id: CLOCK_REALTIME
-  # Couldn't find __kernel_clock_gettime
-  ok 2 # SKIP __kernel_clock_gettime CLOCK_REALTIME
-  # Couldn't find __kernel_clock_getres
-  ok 3 # SKIP __kernel_clock_getres CLOCK_REALTIME
-  ...
-  # Couldn't find __kernel_time
-  ok 16 # SKIP __kernel_time
-  # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:16 error:0
-
-  ~ # ./vdso_test_getrandom
-  __kernel_getrandom is missing!
-
-  ~ # ./vdso_test_gettimeofday
-  Could not find __kernel_gettimeofday
-
-  ~ # ./vdso_test_getcpu
-  Could not find __kernel_getcpu
-
-On powerpc64, as shown below by readelf, vDSO functions symbols have
-type NOTYPE, so also accept that type when looking for symbols.
-
-$ powerpc64-linux-gnu-readelf -a arch/powerpc/kernel/vdso/vdso64.so.dbg
-ELF Header:
-  Magic:   7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
-  Class:                             ELF64
-  Data:                              2's complement, big endian
-  Version:                           1 (current)
-  OS/ABI:                            UNIX - System V
-  ABI Version:                       0
-  Type:                              DYN (Shared object file)
-  Machine:                           PowerPC64
-  Version:                           0x1
-...
-
-Symbol table '.dynsym' contains 12 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
-     1: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     2: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     3: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     4: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-     5: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     6: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     7: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     8: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     9: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    10: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    11: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-
-Symbol table '.symtab' contains 56 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-...
-    45: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-    46: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __kernel_getcpu
-    47: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_getres
-    48: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_tbfreq
-    49: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_gettimeofday
-    50: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __kernel_sync_dicache
-    51: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_getrandom
-    52: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __kernel_sigtram[...]
-    53: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __kernel_time
-    54: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_g[...]
-    55: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_sys[...]
-
-Fixes: 98eedc3a9dbf ("Document the vDSO and add a reference parser")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/parse_vdso.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
-index 9ef3ad3789c17..540f9a284e9f0 100644
---- a/tools/testing/selftests/vDSO/parse_vdso.c
-+++ b/tools/testing/selftests/vDSO/parse_vdso.c
-@@ -238,7 +238,8 @@ void *vdso_sym(const char *version, const char *name)
-               ELF(Sym) *sym = &vdso_info.symtab[chain];
-               /* Check for a defined global or weak function w/ right name. */
--              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC)
-+              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC &&
-+                  ELF64_ST_TYPE(sym->st_info) != STT_NOTYPE)
-                       continue;
-               if (ELF64_ST_BIND(sym->st_info) != STB_GLOBAL &&
-                   ELF64_ST_BIND(sym->st_info) != STB_WEAK)
--- 
-2.43.0
-
index 96db9a6a846af6142a19be6caef842e64b9ae44c..e087598d532ec5999a01828b8040a8f30770ad83 100644 (file)
@@ -56,7 +56,6 @@ drm-radeon-properly-handle-vbios-fake-edid-sizing.patch
 drm-rockchip-vop-allow-4096px-width-scaling.patch
 drm-radeon-evergreen_cs-fix-int-overflow-errors-in-c.patch
 jfs-fix-out-of-bounds-in-dbnextag-and-dialloc.patch
-selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
 drm-msm-a5xx-properly-clear-preemption-records-on-re.patch
 drm-msm-a5xx-fix-races-in-preemption-evaluation-stag.patch
 ipmi-docs-don-t-advertise-deprecated-sysfs-entries.patch
diff --git a/queue-5.10/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch b/queue-5.10/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
deleted file mode 100644 (file)
index 9938c62..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-From 92012d865561dcc6638cbea26f6fb58e46484dab Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:37 +0200
-Subject: selftests: vDSO: fix vDSO symbols lookup for powerpc64
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit ba83b3239e657469709d15dcea5f9b65bf9dbf34 ]
-
-On powerpc64, following tests fail locating vDSO functions:
-
-  ~ # ./vdso_test_abi
-  TAP version 13
-  1..16
-  # [vDSO kselftest] VDSO_VERSION: LINUX_2.6.15
-  # Couldn't find __kernel_gettimeofday
-  ok 1 # SKIP __kernel_gettimeofday
-  # clock_id: CLOCK_REALTIME
-  # Couldn't find __kernel_clock_gettime
-  ok 2 # SKIP __kernel_clock_gettime CLOCK_REALTIME
-  # Couldn't find __kernel_clock_getres
-  ok 3 # SKIP __kernel_clock_getres CLOCK_REALTIME
-  ...
-  # Couldn't find __kernel_time
-  ok 16 # SKIP __kernel_time
-  # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:16 error:0
-
-  ~ # ./vdso_test_getrandom
-  __kernel_getrandom is missing!
-
-  ~ # ./vdso_test_gettimeofday
-  Could not find __kernel_gettimeofday
-
-  ~ # ./vdso_test_getcpu
-  Could not find __kernel_getcpu
-
-On powerpc64, as shown below by readelf, vDSO functions symbols have
-type NOTYPE, so also accept that type when looking for symbols.
-
-$ powerpc64-linux-gnu-readelf -a arch/powerpc/kernel/vdso/vdso64.so.dbg
-ELF Header:
-  Magic:   7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
-  Class:                             ELF64
-  Data:                              2's complement, big endian
-  Version:                           1 (current)
-  OS/ABI:                            UNIX - System V
-  ABI Version:                       0
-  Type:                              DYN (Shared object file)
-  Machine:                           PowerPC64
-  Version:                           0x1
-...
-
-Symbol table '.dynsym' contains 12 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
-     1: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     2: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     3: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     4: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-     5: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     6: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     7: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     8: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     9: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    10: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    11: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-
-Symbol table '.symtab' contains 56 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-...
-    45: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-    46: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __kernel_getcpu
-    47: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_getres
-    48: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_tbfreq
-    49: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_gettimeofday
-    50: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __kernel_sync_dicache
-    51: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_getrandom
-    52: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __kernel_sigtram[...]
-    53: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __kernel_time
-    54: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_g[...]
-    55: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_sys[...]
-
-Fixes: 98eedc3a9dbf ("Document the vDSO and add a reference parser")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/parse_vdso.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
-index 4ae417372e9eb..d9ccc5acac182 100644
---- a/tools/testing/selftests/vDSO/parse_vdso.c
-+++ b/tools/testing/selftests/vDSO/parse_vdso.c
-@@ -216,7 +216,8 @@ void *vdso_sym(const char *version, const char *name)
-               ELF(Sym) *sym = &vdso_info.symtab[chain];
-               /* Check for a defined global or weak function w/ right name. */
--              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC)
-+              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC &&
-+                  ELF64_ST_TYPE(sym->st_info) != STT_NOTYPE)
-                       continue;
-               if (ELF64_ST_BIND(sym->st_info) != STB_GLOBAL &&
-                   ELF64_ST_BIND(sym->st_info) != STB_WEAK)
--- 
-2.43.0
-
index 0831fb1356b20eb9cd3408c9a5b04e811e8599e7..937b19dbe93e401922c6d44bb498ef5d6cbced05 100644 (file)
@@ -120,7 +120,6 @@ drm-rockchip-vop-allow-4096px-width-scaling.patch
 drm-rockchip-dw_hdmi-fix-reading-edid-when-using-a-f.patch
 drm-radeon-evergreen_cs-fix-int-overflow-errors-in-c.patch
 jfs-fix-out-of-bounds-in-dbnextag-and-dialloc.patch
-selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
 drm-msm-fix-incorrect-file-name-output-in-adreno_req.patch
 drm-msm-a5xx-disable-preemption-in-submits-by-defaul.patch
 drm-msm-a5xx-properly-clear-preemption-records-on-re.patch
diff --git a/queue-5.15/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch b/queue-5.15/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch
deleted file mode 100644 (file)
index 874291c..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-From 6aefdfbbfc231cda9dd43bbc770af702cc747e55 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 11 Sep 2024 10:50:14 +0200
-Subject: selftests: vDSO: fix ELF hash table entry size for s390x
-
-From: Jens Remus <jremus@linux.ibm.com>
-
-[ Upstream commit 14be4e6f35221c4731b004553ecf7cbc6dc1d2d8 ]
-
-The vDSO self tests fail on s390x for a vDSO linked with the GNU linker
-ld as follows:
-
-  # ./vdso_test_gettimeofday
-  Floating point exception (core dumped)
-
-On s390x the ELF hash table entries are 64 bits instead of 32 bits in
-size (see Glibc sysdeps/unix/sysv/linux/s390/bits/elfclass.h).
-
-Fixes: 40723419f407 ("kselftest: Enable vDSO test on non x86 platforms")
-Reported-by: Heiko Carstens <hca@linux.ibm.com>
-Tested-by: Heiko Carstens <hca@linux.ibm.com>
-Signed-off-by: Jens Remus <jremus@linux.ibm.com>
-Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/parse_vdso.c | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
-index d9ccc5acac182..7dd5668ea8a6e 100644
---- a/tools/testing/selftests/vDSO/parse_vdso.c
-+++ b/tools/testing/selftests/vDSO/parse_vdso.c
-@@ -36,6 +36,12 @@
- #define ELF_BITS_XFORM(bits, x) ELF_BITS_XFORM2(bits, x)
- #define ELF(x) ELF_BITS_XFORM(ELF_BITS, x)
-+#ifdef __s390x__
-+#define ELF_HASH_ENTRY ELF(Xword)
-+#else
-+#define ELF_HASH_ENTRY ELF(Word)
-+#endif
-+
- static struct vdso_info
- {
-       bool valid;
-@@ -47,8 +53,8 @@ static struct vdso_info
-       /* Symbol table */
-       ELF(Sym) *symtab;
-       const char *symstrings;
--      ELF(Word) *bucket, *chain;
--      ELF(Word) nbucket, nchain;
-+      ELF_HASH_ENTRY *bucket, *chain;
-+      ELF_HASH_ENTRY nbucket, nchain;
-       /* Version table */
-       ELF(Versym) *versym;
-@@ -115,7 +121,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
-       /*
-        * Fish out the useful bits of the dynamic table.
-        */
--      ELF(Word) *hash = 0;
-+      ELF_HASH_ENTRY *hash = 0;
-       vdso_info.symstrings = 0;
-       vdso_info.symtab = 0;
-       vdso_info.versym = 0;
-@@ -133,7 +139,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
-                                + vdso_info.load_offset);
-                       break;
-               case DT_HASH:
--                      hash = (ELF(Word) *)
-+                      hash = (ELF_HASH_ENTRY *)
-                               ((uintptr_t)dyn[i].d_un.d_ptr
-                                + vdso_info.load_offset);
-                       break;
--- 
-2.43.0
-
diff --git a/queue-5.15/selftests-vdso-fix-vdso-name-for-powerpc.patch b/queue-5.15/selftests-vdso-fix-vdso-name-for-powerpc.patch
deleted file mode 100644 (file)
index d2128d9..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From a06343ed71e9bc7998204cfd27db2fe9c0380db5 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:35 +0200
-Subject: selftests: vDSO: fix vDSO name for powerpc
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit 59eb856c3ed9b3552befd240c0c339f22eed3fa1 ]
-
-Following error occurs when running vdso_test_correctness on powerpc:
-
-~ # ./vdso_test_correctness
-[WARN] failed to find vDSO
-[SKIP] No vDSO, so skipping clock_gettime() tests
-[SKIP] No vDSO, so skipping clock_gettime64() tests
-[RUN]  Testing getcpu...
-[OK]   CPU 0: syscall: cpu 0, node 0
-
-On powerpc, vDSO is neither called linux-vdso.so.1 nor linux-gate.so.1
-but linux-vdso32.so.1 or linux-vdso64.so.1.
-
-Also search those two names before giving up.
-
-Fixes: c7e5789b24d3 ("kselftest: Move test_vdso to the vDSO test suite")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_test_correctness.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_test_correctness.c b/tools/testing/selftests/vDSO/vdso_test_correctness.c
-index c4aea794725a7..739cd83f3dfb7 100644
---- a/tools/testing/selftests/vDSO/vdso_test_correctness.c
-+++ b/tools/testing/selftests/vDSO/vdso_test_correctness.c
-@@ -113,6 +113,12 @@ static void fill_function_pointers()
-       if (!vdso)
-               vdso = dlopen("linux-gate.so.1",
-                             RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-+      if (!vdso)
-+              vdso = dlopen("linux-vdso32.so.1",
-+                            RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-+      if (!vdso)
-+              vdso = dlopen("linux-vdso64.so.1",
-+                            RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-       if (!vdso) {
-               printf("[WARN]\tfailed to find vDSO\n");
-               return;
--- 
-2.43.0
-
diff --git a/queue-5.15/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch b/queue-5.15/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
deleted file mode 100644 (file)
index 76925bc..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-From d6be3b87b8f4fd69c72adfaed50f40fcc3e2c9e5 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:37 +0200
-Subject: selftests: vDSO: fix vDSO symbols lookup for powerpc64
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit ba83b3239e657469709d15dcea5f9b65bf9dbf34 ]
-
-On powerpc64, following tests fail locating vDSO functions:
-
-  ~ # ./vdso_test_abi
-  TAP version 13
-  1..16
-  # [vDSO kselftest] VDSO_VERSION: LINUX_2.6.15
-  # Couldn't find __kernel_gettimeofday
-  ok 1 # SKIP __kernel_gettimeofday
-  # clock_id: CLOCK_REALTIME
-  # Couldn't find __kernel_clock_gettime
-  ok 2 # SKIP __kernel_clock_gettime CLOCK_REALTIME
-  # Couldn't find __kernel_clock_getres
-  ok 3 # SKIP __kernel_clock_getres CLOCK_REALTIME
-  ...
-  # Couldn't find __kernel_time
-  ok 16 # SKIP __kernel_time
-  # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:16 error:0
-
-  ~ # ./vdso_test_getrandom
-  __kernel_getrandom is missing!
-
-  ~ # ./vdso_test_gettimeofday
-  Could not find __kernel_gettimeofday
-
-  ~ # ./vdso_test_getcpu
-  Could not find __kernel_getcpu
-
-On powerpc64, as shown below by readelf, vDSO functions symbols have
-type NOTYPE, so also accept that type when looking for symbols.
-
-$ powerpc64-linux-gnu-readelf -a arch/powerpc/kernel/vdso/vdso64.so.dbg
-ELF Header:
-  Magic:   7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
-  Class:                             ELF64
-  Data:                              2's complement, big endian
-  Version:                           1 (current)
-  OS/ABI:                            UNIX - System V
-  ABI Version:                       0
-  Type:                              DYN (Shared object file)
-  Machine:                           PowerPC64
-  Version:                           0x1
-...
-
-Symbol table '.dynsym' contains 12 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
-     1: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     2: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     3: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     4: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-     5: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     6: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     7: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     8: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     9: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    10: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    11: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-
-Symbol table '.symtab' contains 56 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-...
-    45: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-    46: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __kernel_getcpu
-    47: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_getres
-    48: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_tbfreq
-    49: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_gettimeofday
-    50: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __kernel_sync_dicache
-    51: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_getrandom
-    52: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __kernel_sigtram[...]
-    53: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __kernel_time
-    54: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_g[...]
-    55: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_sys[...]
-
-Fixes: 98eedc3a9dbf ("Document the vDSO and add a reference parser")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/parse_vdso.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
-index 4ae417372e9eb..d9ccc5acac182 100644
---- a/tools/testing/selftests/vDSO/parse_vdso.c
-+++ b/tools/testing/selftests/vDSO/parse_vdso.c
-@@ -216,7 +216,8 @@ void *vdso_sym(const char *version, const char *name)
-               ELF(Sym) *sym = &vdso_info.symtab[chain];
-               /* Check for a defined global or weak function w/ right name. */
--              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC)
-+              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC &&
-+                  ELF64_ST_TYPE(sym->st_info) != STT_NOTYPE)
-                       continue;
-               if (ELF64_ST_BIND(sym->st_info) != STB_GLOBAL &&
-                   ELF64_ST_BIND(sym->st_info) != STB_WEAK)
--- 
-2.43.0
-
diff --git a/queue-5.15/selftests-vdso-fix-vdso_config-for-powerpc.patch b/queue-5.15/selftests-vdso-fix-vdso_config-for-powerpc.patch
deleted file mode 100644 (file)
index f16b101..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From 407d64571e13a6334233584504fec13509eb7e00 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:36 +0200
-Subject: selftests: vDSO: fix vdso_config for powerpc
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit 7d297c419b08eafa69ce27243ee9bbecab4fcaa4 ]
-
-Running vdso_test_correctness on powerpc64 gives the following warning:
-
-  ~ # ./vdso_test_correctness
-  Warning: failed to find clock_gettime64 in vDSO
-
-This is because vdso_test_correctness was built with VDSO_32BIT defined.
-
-__powerpc__ macro is defined on both powerpc32 and powerpc64 so
-__powerpc64__ needs to be checked first in vdso_config.h
-
-Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_config.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
-index 6188b16827d1d..446eb9737273b 100644
---- a/tools/testing/selftests/vDSO/vdso_config.h
-+++ b/tools/testing/selftests/vDSO/vdso_config.h
-@@ -18,13 +18,13 @@
- #elif defined(__aarch64__)
- #define VDSO_VERSION          3
- #define VDSO_NAMES            0
--#elif defined(__powerpc__)
-+#elif defined(__powerpc64__)
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
--#define VDSO_32BIT            1
--#elif defined(__powerpc64__)
-+#elif defined(__powerpc__)
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
-+#define VDSO_32BIT            1
- #elif defined (__s390__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
--- 
-2.43.0
-
diff --git a/queue-5.15/selftests-vdso-fix-vdso_config-for-s390.patch b/queue-5.15/selftests-vdso-fix-vdso_config-for-s390.patch
deleted file mode 100644 (file)
index a65cbb1..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-From a90697001256a9051200004183d456ff9f555448 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 11 Sep 2024 10:50:15 +0200
-Subject: selftests: vDSO: fix vdso_config for s390
-
-From: Heiko Carstens <hca@linux.ibm.com>
-
-[ Upstream commit a6e23fb8d3c0e3904da70beaf5d7e840a983c97f ]
-
-Running vdso_test_correctness on s390x (aka s390 64 bit) emits a warning:
-
-Warning: failed to find clock_gettime64 in vDSO
-
-This is caused by the "#elif defined (__s390__)" check in vdso_config.h
-which the defines VDSO_32BIT.
-
-If __s390x__ is defined also __s390__ is defined. Therefore the correct
-check must make sure that only __s390__ is defined.
-
-Therefore add the missing !defined(__s390x__). Also use common
-__s390x__ define instead of __s390X__.
-
-Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_config.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
-index 446eb9737273b..a6868ca0e4f89 100644
---- a/tools/testing/selftests/vDSO/vdso_config.h
-+++ b/tools/testing/selftests/vDSO/vdso_config.h
-@@ -25,11 +25,11 @@
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
- #define VDSO_32BIT            1
--#elif defined (__s390__)
-+#elif defined (__s390__) && !defined(__s390x__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
- #define VDSO_32BIT            1
--#elif defined (__s390X__)
-+#elif defined (__s390x__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
- #elif defined(__mips__)
--- 
-2.43.0
-
index fca26dfc81ea025e5f9710bdaad3de8d901be366..dd50f033997540659e0f2b97ae30c74bf7f7676b 100644 (file)
@@ -162,9 +162,6 @@ powerpc-32-remove-the-nobats-kernel-parameter.patch
 powerpc-32-remove-noltlbs-kernel-parameter.patch
 powerpc-8xx-fix-initial-memory-mapping.patch
 powerpc-8xx-fix-kernel-vs-user-address-comparison.patch
-selftests-vdso-fix-vdso-name-for-powerpc.patch
-selftests-vdso-fix-vdso_config-for-powerpc.patch
-selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
 drm-msm-fix-incorrect-file-name-output-in-adreno_req.patch
 drm-msm-a5xx-disable-preemption-in-submits-by-defaul.patch
 drm-msm-a5xx-properly-clear-preemption-records-on-re.patch
@@ -180,8 +177,6 @@ minmax-avoid-overly-complex-min-max-macro-arguments-.patch
 xen-introduce-generic-helper-checking-for-memory-map.patch
 xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-add-capability-to-remap-non-ram-pages-to-differe.patch
-selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch
-selftests-vdso-fix-vdso_config-for-s390.patch
 xen-swiotlb-add-alignment-check-for-dma-buffers.patch
 tpm-clean-up-tpm-space-after-command-failure.patch
 selftests-bpf-fix-compile-error-from-rlim_t-in-sk_st.patch
diff --git a/queue-5.4/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch b/queue-5.4/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
deleted file mode 100644 (file)
index 1170987..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-From e5d14dd91f71ff65cabe4316b341c061e4a7190f Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:37 +0200
-Subject: selftests: vDSO: fix vDSO symbols lookup for powerpc64
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit ba83b3239e657469709d15dcea5f9b65bf9dbf34 ]
-
-On powerpc64, following tests fail locating vDSO functions:
-
-  ~ # ./vdso_test_abi
-  TAP version 13
-  1..16
-  # [vDSO kselftest] VDSO_VERSION: LINUX_2.6.15
-  # Couldn't find __kernel_gettimeofday
-  ok 1 # SKIP __kernel_gettimeofday
-  # clock_id: CLOCK_REALTIME
-  # Couldn't find __kernel_clock_gettime
-  ok 2 # SKIP __kernel_clock_gettime CLOCK_REALTIME
-  # Couldn't find __kernel_clock_getres
-  ok 3 # SKIP __kernel_clock_getres CLOCK_REALTIME
-  ...
-  # Couldn't find __kernel_time
-  ok 16 # SKIP __kernel_time
-  # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:16 error:0
-
-  ~ # ./vdso_test_getrandom
-  __kernel_getrandom is missing!
-
-  ~ # ./vdso_test_gettimeofday
-  Could not find __kernel_gettimeofday
-
-  ~ # ./vdso_test_getcpu
-  Could not find __kernel_getcpu
-
-On powerpc64, as shown below by readelf, vDSO functions symbols have
-type NOTYPE, so also accept that type when looking for symbols.
-
-$ powerpc64-linux-gnu-readelf -a arch/powerpc/kernel/vdso/vdso64.so.dbg
-ELF Header:
-  Magic:   7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
-  Class:                             ELF64
-  Data:                              2's complement, big endian
-  Version:                           1 (current)
-  OS/ABI:                            UNIX - System V
-  ABI Version:                       0
-  Type:                              DYN (Shared object file)
-  Machine:                           PowerPC64
-  Version:                           0x1
-...
-
-Symbol table '.dynsym' contains 12 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
-     1: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     2: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     3: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     4: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-     5: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     6: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     7: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     8: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     9: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    10: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    11: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-
-Symbol table '.symtab' contains 56 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-...
-    45: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-    46: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __kernel_getcpu
-    47: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_getres
-    48: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_tbfreq
-    49: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_gettimeofday
-    50: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __kernel_sync_dicache
-    51: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_getrandom
-    52: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __kernel_sigtram[...]
-    53: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __kernel_time
-    54: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_g[...]
-    55: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_sys[...]
-
-Fixes: 98eedc3a9dbf ("Document the vDSO and add a reference parser")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/parse_vdso.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
-index 9ef3ad3789c17..540f9a284e9f0 100644
---- a/tools/testing/selftests/vDSO/parse_vdso.c
-+++ b/tools/testing/selftests/vDSO/parse_vdso.c
-@@ -238,7 +238,8 @@ void *vdso_sym(const char *version, const char *name)
-               ELF(Sym) *sym = &vdso_info.symtab[chain];
-               /* Check for a defined global or weak function w/ right name. */
--              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC)
-+              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC &&
-+                  ELF64_ST_TYPE(sym->st_info) != STT_NOTYPE)
-                       continue;
-               if (ELF64_ST_BIND(sym->st_info) != STB_GLOBAL &&
-                   ELF64_ST_BIND(sym->st_info) != STB_WEAK)
--- 
-2.43.0
-
index f3556daf917d8035d245718376b414bfcd3e2862..e50f83b10fd760fb55f8cf8b3a662e066ddc6ac8 100644 (file)
@@ -75,7 +75,6 @@ drm-rockchip-vop-allow-4096px-width-scaling.patch
 drm-rockchip-dw_hdmi-fix-reading-edid-when-using-a-f.patch
 drm-radeon-evergreen_cs-fix-int-overflow-errors-in-c.patch
 jfs-fix-out-of-bounds-in-dbnextag-and-dialloc.patch
-selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
 drm-msm-fix-incorrect-file-name-output-in-adreno_req.patch
 drm-msm-a5xx-disable-preemption-in-submits-by-defaul.patch
 drm-msm-a5xx-properly-clear-preemption-records-on-re.patch
diff --git a/queue-6.1/powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch b/queue-6.1/powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch
deleted file mode 100644 (file)
index 39d551a..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-From 06216467a4fd418383ceeb60922ae907d8454279 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 6 Sep 2024 10:33:43 +0200
-Subject: powerpc/vdso: Fix VDSO data access when running in a non-root time
- namespace
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit c73049389e58c01e2e3bbfae900c8daeee177191 ]
-
-When running in a non-root time namespace, the global VDSO data page
-is replaced by a dedicated namespace data page and the global data
-page is mapped next to it. Detailed explanations can be found at
-commit 660fd04f9317 ("lib/vdso: Prepare for time namespace support").
-
-When it happens, __kernel_get_syscall_map and __kernel_get_tbfreq
-and __kernel_sync_dicache don't work anymore because they read 0
-instead of the data they need.
-
-To address that, clock_mode has to be read. When it is set to
-VDSO_CLOCKMODE_TIMENS, it means it is a dedicated namespace data page
-and the global data is located on the following page.
-
-Add a macro called get_realdatapage which reads clock_mode and add
-PAGE_SIZE to the pointer provided by get_datapage macro when
-clock_mode is equal to VDSO_CLOCKMODE_TIMENS. Use this new macro
-instead of get_datapage macro except for time functions as they handle
-it internally.
-
-Fixes: 74205b3fc2ef ("powerpc/vdso: Add support for time namespaces")
-Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Closes: https://lore.kernel.org/all/ZtnYqZI-nrsNslwy@zx2c4.com/
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Michael Ellerman <mpe@ellerman.id.au>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/powerpc/include/asm/vdso_datapage.h | 15 +++++++++++++++
- arch/powerpc/kernel/asm-offsets.c        |  2 ++
- arch/powerpc/kernel/vdso/cacheflush.S    |  2 +-
- arch/powerpc/kernel/vdso/datapage.S      |  4 ++--
- 4 files changed, 20 insertions(+), 3 deletions(-)
-
-diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch/powerpc/include/asm/vdso_datapage.h
-index a585c8e538ff0..939daf6b695ef 100644
---- a/arch/powerpc/include/asm/vdso_datapage.h
-+++ b/arch/powerpc/include/asm/vdso_datapage.h
-@@ -111,6 +111,21 @@ extern struct vdso_arch_data *vdso_data;
-       addi    \ptr, \ptr, (_vdso_datapage - 999b)@l
- .endm
-+#include <asm/asm-offsets.h>
-+#include <asm/page.h>
-+
-+.macro get_realdatapage ptr scratch
-+      get_datapage \ptr
-+#ifdef CONFIG_TIME_NS
-+      lwz     \scratch, VDSO_CLOCKMODE_OFFSET(\ptr)
-+      xoris   \scratch, \scratch, VDSO_CLOCKMODE_TIMENS@h
-+      xori    \scratch, \scratch, VDSO_CLOCKMODE_TIMENS@l
-+      cntlzw  \scratch, \scratch
-+      rlwinm  \scratch, \scratch, PAGE_SHIFT - 5, 1 << PAGE_SHIFT
-+      add     \ptr, \ptr, \scratch
-+#endif
-+.endm
-+
- #endif /* __ASSEMBLY__ */
- #endif /* __KERNEL__ */
-diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
-index 4ce2a4aa39854..65d79dd0c92ce 100644
---- a/arch/powerpc/kernel/asm-offsets.c
-+++ b/arch/powerpc/kernel/asm-offsets.c
-@@ -347,6 +347,8 @@ int main(void)
- #else
-       OFFSET(CFG_SYSCALL_MAP32, vdso_arch_data, syscall_map);
- #endif
-+      OFFSET(VDSO_CLOCKMODE_OFFSET, vdso_arch_data, data[0].clock_mode);
-+      DEFINE(VDSO_CLOCKMODE_TIMENS, VDSO_CLOCKMODE_TIMENS);
- #ifdef CONFIG_BUG
-       DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry));
-diff --git a/arch/powerpc/kernel/vdso/cacheflush.S b/arch/powerpc/kernel/vdso/cacheflush.S
-index 0085ae464dac9..3b2479bd2f9a1 100644
---- a/arch/powerpc/kernel/vdso/cacheflush.S
-+++ b/arch/powerpc/kernel/vdso/cacheflush.S
-@@ -30,7 +30,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
- #ifdef CONFIG_PPC64
-       mflr    r12
-   .cfi_register lr,r12
--      get_datapage    r10
-+      get_realdatapage        r10, r11
-       mtlr    r12
-   .cfi_restore        lr
- #endif
-diff --git a/arch/powerpc/kernel/vdso/datapage.S b/arch/powerpc/kernel/vdso/datapage.S
-index db8e167f01667..2b19b6201a33a 100644
---- a/arch/powerpc/kernel/vdso/datapage.S
-+++ b/arch/powerpc/kernel/vdso/datapage.S
-@@ -28,7 +28,7 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
-       mflr    r12
-   .cfi_register lr,r12
-       mr.     r4,r3
--      get_datapage    r3
-+      get_realdatapage        r3, r11
-       mtlr    r12
- #ifdef __powerpc64__
-       addi    r3,r3,CFG_SYSCALL_MAP64
-@@ -52,7 +52,7 @@ V_FUNCTION_BEGIN(__kernel_get_tbfreq)
-   .cfi_startproc
-       mflr    r12
-   .cfi_register lr,r12
--      get_datapage    r3
-+      get_realdatapage        r3, r11
- #ifndef __powerpc64__
-       lwz     r4,(CFG_TB_TICKS_PER_SEC + 4)(r3)
- #endif
--- 
-2.43.0
-
diff --git a/queue-6.1/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch b/queue-6.1/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch
deleted file mode 100644 (file)
index f22e26d..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-From 5a5c45df0c8587683a5562737f174cb54d08a30b Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 11 Sep 2024 10:50:14 +0200
-Subject: selftests: vDSO: fix ELF hash table entry size for s390x
-
-From: Jens Remus <jremus@linux.ibm.com>
-
-[ Upstream commit 14be4e6f35221c4731b004553ecf7cbc6dc1d2d8 ]
-
-The vDSO self tests fail on s390x for a vDSO linked with the GNU linker
-ld as follows:
-
-  # ./vdso_test_gettimeofday
-  Floating point exception (core dumped)
-
-On s390x the ELF hash table entries are 64 bits instead of 32 bits in
-size (see Glibc sysdeps/unix/sysv/linux/s390/bits/elfclass.h).
-
-Fixes: 40723419f407 ("kselftest: Enable vDSO test on non x86 platforms")
-Reported-by: Heiko Carstens <hca@linux.ibm.com>
-Tested-by: Heiko Carstens <hca@linux.ibm.com>
-Signed-off-by: Jens Remus <jremus@linux.ibm.com>
-Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/parse_vdso.c | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
-index d9ccc5acac182..7dd5668ea8a6e 100644
---- a/tools/testing/selftests/vDSO/parse_vdso.c
-+++ b/tools/testing/selftests/vDSO/parse_vdso.c
-@@ -36,6 +36,12 @@
- #define ELF_BITS_XFORM(bits, x) ELF_BITS_XFORM2(bits, x)
- #define ELF(x) ELF_BITS_XFORM(ELF_BITS, x)
-+#ifdef __s390x__
-+#define ELF_HASH_ENTRY ELF(Xword)
-+#else
-+#define ELF_HASH_ENTRY ELF(Word)
-+#endif
-+
- static struct vdso_info
- {
-       bool valid;
-@@ -47,8 +53,8 @@ static struct vdso_info
-       /* Symbol table */
-       ELF(Sym) *symtab;
-       const char *symstrings;
--      ELF(Word) *bucket, *chain;
--      ELF(Word) nbucket, nchain;
-+      ELF_HASH_ENTRY *bucket, *chain;
-+      ELF_HASH_ENTRY nbucket, nchain;
-       /* Version table */
-       ELF(Versym) *versym;
-@@ -115,7 +121,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
-       /*
-        * Fish out the useful bits of the dynamic table.
-        */
--      ELF(Word) *hash = 0;
-+      ELF_HASH_ENTRY *hash = 0;
-       vdso_info.symstrings = 0;
-       vdso_info.symtab = 0;
-       vdso_info.versym = 0;
-@@ -133,7 +139,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
-                                + vdso_info.load_offset);
-                       break;
-               case DT_HASH:
--                      hash = (ELF(Word) *)
-+                      hash = (ELF_HASH_ENTRY *)
-                               ((uintptr_t)dyn[i].d_un.d_ptr
-                                + vdso_info.load_offset);
-                       break;
--- 
-2.43.0
-
diff --git a/queue-6.1/selftests-vdso-fix-vdso-name-for-powerpc.patch b/queue-6.1/selftests-vdso-fix-vdso-name-for-powerpc.patch
deleted file mode 100644 (file)
index 093c493..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From cd3a2a359f0e98c910c105c86b8ae8e62750097e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:35 +0200
-Subject: selftests: vDSO: fix vDSO name for powerpc
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit 59eb856c3ed9b3552befd240c0c339f22eed3fa1 ]
-
-Following error occurs when running vdso_test_correctness on powerpc:
-
-~ # ./vdso_test_correctness
-[WARN] failed to find vDSO
-[SKIP] No vDSO, so skipping clock_gettime() tests
-[SKIP] No vDSO, so skipping clock_gettime64() tests
-[RUN]  Testing getcpu...
-[OK]   CPU 0: syscall: cpu 0, node 0
-
-On powerpc, vDSO is neither called linux-vdso.so.1 nor linux-gate.so.1
-but linux-vdso32.so.1 or linux-vdso64.so.1.
-
-Also search those two names before giving up.
-
-Fixes: c7e5789b24d3 ("kselftest: Move test_vdso to the vDSO test suite")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_test_correctness.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_test_correctness.c b/tools/testing/selftests/vDSO/vdso_test_correctness.c
-index e691a3cf14911..cdb697ae8343c 100644
---- a/tools/testing/selftests/vDSO/vdso_test_correctness.c
-+++ b/tools/testing/selftests/vDSO/vdso_test_correctness.c
-@@ -114,6 +114,12 @@ static void fill_function_pointers()
-       if (!vdso)
-               vdso = dlopen("linux-gate.so.1",
-                             RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-+      if (!vdso)
-+              vdso = dlopen("linux-vdso32.so.1",
-+                            RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-+      if (!vdso)
-+              vdso = dlopen("linux-vdso64.so.1",
-+                            RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-       if (!vdso) {
-               printf("[WARN]\tfailed to find vDSO\n");
-               return;
--- 
-2.43.0
-
diff --git a/queue-6.1/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch b/queue-6.1/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
deleted file mode 100644 (file)
index d92d892..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-From caecd01d9c51cf9413169493cce94e355e9a60f1 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:37 +0200
-Subject: selftests: vDSO: fix vDSO symbols lookup for powerpc64
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit ba83b3239e657469709d15dcea5f9b65bf9dbf34 ]
-
-On powerpc64, following tests fail locating vDSO functions:
-
-  ~ # ./vdso_test_abi
-  TAP version 13
-  1..16
-  # [vDSO kselftest] VDSO_VERSION: LINUX_2.6.15
-  # Couldn't find __kernel_gettimeofday
-  ok 1 # SKIP __kernel_gettimeofday
-  # clock_id: CLOCK_REALTIME
-  # Couldn't find __kernel_clock_gettime
-  ok 2 # SKIP __kernel_clock_gettime CLOCK_REALTIME
-  # Couldn't find __kernel_clock_getres
-  ok 3 # SKIP __kernel_clock_getres CLOCK_REALTIME
-  ...
-  # Couldn't find __kernel_time
-  ok 16 # SKIP __kernel_time
-  # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:16 error:0
-
-  ~ # ./vdso_test_getrandom
-  __kernel_getrandom is missing!
-
-  ~ # ./vdso_test_gettimeofday
-  Could not find __kernel_gettimeofday
-
-  ~ # ./vdso_test_getcpu
-  Could not find __kernel_getcpu
-
-On powerpc64, as shown below by readelf, vDSO functions symbols have
-type NOTYPE, so also accept that type when looking for symbols.
-
-$ powerpc64-linux-gnu-readelf -a arch/powerpc/kernel/vdso/vdso64.so.dbg
-ELF Header:
-  Magic:   7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
-  Class:                             ELF64
-  Data:                              2's complement, big endian
-  Version:                           1 (current)
-  OS/ABI:                            UNIX - System V
-  ABI Version:                       0
-  Type:                              DYN (Shared object file)
-  Machine:                           PowerPC64
-  Version:                           0x1
-...
-
-Symbol table '.dynsym' contains 12 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
-     1: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     2: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     3: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     4: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-     5: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     6: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     7: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     8: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     9: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    10: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    11: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-
-Symbol table '.symtab' contains 56 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-...
-    45: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-    46: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __kernel_getcpu
-    47: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_getres
-    48: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_tbfreq
-    49: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_gettimeofday
-    50: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __kernel_sync_dicache
-    51: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_getrandom
-    52: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __kernel_sigtram[...]
-    53: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __kernel_time
-    54: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_g[...]
-    55: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_sys[...]
-
-Fixes: 98eedc3a9dbf ("Document the vDSO and add a reference parser")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/parse_vdso.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
-index 4ae417372e9eb..d9ccc5acac182 100644
---- a/tools/testing/selftests/vDSO/parse_vdso.c
-+++ b/tools/testing/selftests/vDSO/parse_vdso.c
-@@ -216,7 +216,8 @@ void *vdso_sym(const char *version, const char *name)
-               ELF(Sym) *sym = &vdso_info.symtab[chain];
-               /* Check for a defined global or weak function w/ right name. */
--              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC)
-+              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC &&
-+                  ELF64_ST_TYPE(sym->st_info) != STT_NOTYPE)
-                       continue;
-               if (ELF64_ST_BIND(sym->st_info) != STB_GLOBAL &&
-                   ELF64_ST_BIND(sym->st_info) != STB_WEAK)
--- 
-2.43.0
-
diff --git a/queue-6.1/selftests-vdso-fix-vdso_config-for-powerpc.patch b/queue-6.1/selftests-vdso-fix-vdso_config-for-powerpc.patch
deleted file mode 100644 (file)
index b26ee95..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From 32da8020739266b4334de22d28a7c1735993d10f Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:36 +0200
-Subject: selftests: vDSO: fix vdso_config for powerpc
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit 7d297c419b08eafa69ce27243ee9bbecab4fcaa4 ]
-
-Running vdso_test_correctness on powerpc64 gives the following warning:
-
-  ~ # ./vdso_test_correctness
-  Warning: failed to find clock_gettime64 in vDSO
-
-This is because vdso_test_correctness was built with VDSO_32BIT defined.
-
-__powerpc__ macro is defined on both powerpc32 and powerpc64 so
-__powerpc64__ needs to be checked first in vdso_config.h
-
-Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_config.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
-index cdfed403ba13f..f9890584f6fb4 100644
---- a/tools/testing/selftests/vDSO/vdso_config.h
-+++ b/tools/testing/selftests/vDSO/vdso_config.h
-@@ -18,13 +18,13 @@
- #elif defined(__aarch64__)
- #define VDSO_VERSION          3
- #define VDSO_NAMES            0
--#elif defined(__powerpc__)
-+#elif defined(__powerpc64__)
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
--#define VDSO_32BIT            1
--#elif defined(__powerpc64__)
-+#elif defined(__powerpc__)
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
-+#define VDSO_32BIT            1
- #elif defined (__s390__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
--- 
-2.43.0
-
diff --git a/queue-6.1/selftests-vdso-fix-vdso_config-for-s390.patch b/queue-6.1/selftests-vdso-fix-vdso_config-for-s390.patch
deleted file mode 100644 (file)
index d29e7fb..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-From 4d2b1a420aa0d8ef7d96c07ed092c6fe49dab73d Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 11 Sep 2024 10:50:15 +0200
-Subject: selftests: vDSO: fix vdso_config for s390
-
-From: Heiko Carstens <hca@linux.ibm.com>
-
-[ Upstream commit a6e23fb8d3c0e3904da70beaf5d7e840a983c97f ]
-
-Running vdso_test_correctness on s390x (aka s390 64 bit) emits a warning:
-
-Warning: failed to find clock_gettime64 in vDSO
-
-This is caused by the "#elif defined (__s390__)" check in vdso_config.h
-which the defines VDSO_32BIT.
-
-If __s390x__ is defined also __s390__ is defined. Therefore the correct
-check must make sure that only __s390__ is defined.
-
-Therefore add the missing !defined(__s390x__). Also use common
-__s390x__ define instead of __s390X__.
-
-Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_config.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
-index f9890584f6fb4..72de45f587b2c 100644
---- a/tools/testing/selftests/vDSO/vdso_config.h
-+++ b/tools/testing/selftests/vDSO/vdso_config.h
-@@ -25,11 +25,11 @@
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
- #define VDSO_32BIT            1
--#elif defined (__s390__)
-+#elif defined (__s390__) && !defined(__s390x__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
- #define VDSO_32BIT            1
--#elif defined (__s390X__)
-+#elif defined (__s390x__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
- #elif defined(__mips__)
--- 
-2.43.0
-
index 89e7c92f38589374714c6f340a9be98af36b48dd..df257ca92a477021b0fe367a9b57763b0bcf56f5 100644 (file)
@@ -121,9 +121,6 @@ drm-mediatek-fix-missing-configuration-flags-in-mtk_.patch
 drm-mediatek-use-spin_lock_irqsave-for-crtc-event-lo.patch
 powerpc-8xx-fix-initial-memory-mapping.patch
 powerpc-8xx-fix-kernel-vs-user-address-comparison.patch
-selftests-vdso-fix-vdso-name-for-powerpc.patch
-selftests-vdso-fix-vdso_config-for-powerpc.patch
-selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
 drm-msm-fix-incorrect-file-name-output-in-adreno_req.patch
 drm-msm-a5xx-disable-preemption-in-submits-by-defaul.patch
 drm-msm-a5xx-properly-clear-preemption-records-on-re.patch
@@ -139,9 +136,6 @@ minmax-avoid-overly-complex-min-max-macro-arguments-.patch
 xen-introduce-generic-helper-checking-for-memory-map.patch
 xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-add-capability-to-remap-non-ram-pages-to-differe.patch
-powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch
-selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch
-selftests-vdso-fix-vdso_config-for-s390.patch
 xen-swiotlb-add-alignment-check-for-dma-buffers.patch
 xen-swiotlb-fix-allocated-size.patch
 tpm-clean-up-tpm-space-after-command-failure.patch
diff --git a/queue-6.10/powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch b/queue-6.10/powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch
deleted file mode 100644 (file)
index e0db76e..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-From 929d5cd7458d50c8de5b59b7e56d379a7852a96c Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 6 Sep 2024 10:33:43 +0200
-Subject: powerpc/vdso: Fix VDSO data access when running in a non-root time
- namespace
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit c73049389e58c01e2e3bbfae900c8daeee177191 ]
-
-When running in a non-root time namespace, the global VDSO data page
-is replaced by a dedicated namespace data page and the global data
-page is mapped next to it. Detailed explanations can be found at
-commit 660fd04f9317 ("lib/vdso: Prepare for time namespace support").
-
-When it happens, __kernel_get_syscall_map and __kernel_get_tbfreq
-and __kernel_sync_dicache don't work anymore because they read 0
-instead of the data they need.
-
-To address that, clock_mode has to be read. When it is set to
-VDSO_CLOCKMODE_TIMENS, it means it is a dedicated namespace data page
-and the global data is located on the following page.
-
-Add a macro called get_realdatapage which reads clock_mode and add
-PAGE_SIZE to the pointer provided by get_datapage macro when
-clock_mode is equal to VDSO_CLOCKMODE_TIMENS. Use this new macro
-instead of get_datapage macro except for time functions as they handle
-it internally.
-
-Fixes: 74205b3fc2ef ("powerpc/vdso: Add support for time namespaces")
-Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Closes: https://lore.kernel.org/all/ZtnYqZI-nrsNslwy@zx2c4.com/
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Michael Ellerman <mpe@ellerman.id.au>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/powerpc/include/asm/vdso_datapage.h | 15 +++++++++++++++
- arch/powerpc/kernel/asm-offsets.c        |  2 ++
- arch/powerpc/kernel/vdso/cacheflush.S    |  2 +-
- arch/powerpc/kernel/vdso/datapage.S      |  4 ++--
- 4 files changed, 20 insertions(+), 3 deletions(-)
-
-diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch/powerpc/include/asm/vdso_datapage.h
-index a585c8e538ff0..939daf6b695ef 100644
---- a/arch/powerpc/include/asm/vdso_datapage.h
-+++ b/arch/powerpc/include/asm/vdso_datapage.h
-@@ -111,6 +111,21 @@ extern struct vdso_arch_data *vdso_data;
-       addi    \ptr, \ptr, (_vdso_datapage - 999b)@l
- .endm
-+#include <asm/asm-offsets.h>
-+#include <asm/page.h>
-+
-+.macro get_realdatapage ptr scratch
-+      get_datapage \ptr
-+#ifdef CONFIG_TIME_NS
-+      lwz     \scratch, VDSO_CLOCKMODE_OFFSET(\ptr)
-+      xoris   \scratch, \scratch, VDSO_CLOCKMODE_TIMENS@h
-+      xori    \scratch, \scratch, VDSO_CLOCKMODE_TIMENS@l
-+      cntlzw  \scratch, \scratch
-+      rlwinm  \scratch, \scratch, PAGE_SHIFT - 5, 1 << PAGE_SHIFT
-+      add     \ptr, \ptr, \scratch
-+#endif
-+.endm
-+
- #endif /* __ASSEMBLY__ */
- #endif /* __KERNEL__ */
-diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
-index f029755f9e69a..0c5c0fbf62417 100644
---- a/arch/powerpc/kernel/asm-offsets.c
-+++ b/arch/powerpc/kernel/asm-offsets.c
-@@ -346,6 +346,8 @@ int main(void)
- #else
-       OFFSET(CFG_SYSCALL_MAP32, vdso_arch_data, syscall_map);
- #endif
-+      OFFSET(VDSO_CLOCKMODE_OFFSET, vdso_arch_data, data[0].clock_mode);
-+      DEFINE(VDSO_CLOCKMODE_TIMENS, VDSO_CLOCKMODE_TIMENS);
- #ifdef CONFIG_BUG
-       DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry));
-diff --git a/arch/powerpc/kernel/vdso/cacheflush.S b/arch/powerpc/kernel/vdso/cacheflush.S
-index 0085ae464dac9..3b2479bd2f9a1 100644
---- a/arch/powerpc/kernel/vdso/cacheflush.S
-+++ b/arch/powerpc/kernel/vdso/cacheflush.S
-@@ -30,7 +30,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
- #ifdef CONFIG_PPC64
-       mflr    r12
-   .cfi_register lr,r12
--      get_datapage    r10
-+      get_realdatapage        r10, r11
-       mtlr    r12
-   .cfi_restore        lr
- #endif
-diff --git a/arch/powerpc/kernel/vdso/datapage.S b/arch/powerpc/kernel/vdso/datapage.S
-index db8e167f01667..2b19b6201a33a 100644
---- a/arch/powerpc/kernel/vdso/datapage.S
-+++ b/arch/powerpc/kernel/vdso/datapage.S
-@@ -28,7 +28,7 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
-       mflr    r12
-   .cfi_register lr,r12
-       mr.     r4,r3
--      get_datapage    r3
-+      get_realdatapage        r3, r11
-       mtlr    r12
- #ifdef __powerpc64__
-       addi    r3,r3,CFG_SYSCALL_MAP64
-@@ -52,7 +52,7 @@ V_FUNCTION_BEGIN(__kernel_get_tbfreq)
-   .cfi_startproc
-       mflr    r12
-   .cfi_register lr,r12
--      get_datapage    r3
-+      get_realdatapage        r3, r11
- #ifndef __powerpc64__
-       lwz     r4,(CFG_TB_TICKS_PER_SEC + 4)(r3)
- #endif
--- 
-2.43.0
-
diff --git a/queue-6.10/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch b/queue-6.10/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch
deleted file mode 100644 (file)
index 40bd2a4..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-From 0c7a5802d289530b44f3023fcead22ecff5e24f9 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 11 Sep 2024 10:50:14 +0200
-Subject: selftests: vDSO: fix ELF hash table entry size for s390x
-
-From: Jens Remus <jremus@linux.ibm.com>
-
-[ Upstream commit 14be4e6f35221c4731b004553ecf7cbc6dc1d2d8 ]
-
-The vDSO self tests fail on s390x for a vDSO linked with the GNU linker
-ld as follows:
-
-  # ./vdso_test_gettimeofday
-  Floating point exception (core dumped)
-
-On s390x the ELF hash table entries are 64 bits instead of 32 bits in
-size (see Glibc sysdeps/unix/sysv/linux/s390/bits/elfclass.h).
-
-Fixes: 40723419f407 ("kselftest: Enable vDSO test on non x86 platforms")
-Reported-by: Heiko Carstens <hca@linux.ibm.com>
-Tested-by: Heiko Carstens <hca@linux.ibm.com>
-Signed-off-by: Jens Remus <jremus@linux.ibm.com>
-Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/parse_vdso.c | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
-index d9ccc5acac182..7dd5668ea8a6e 100644
---- a/tools/testing/selftests/vDSO/parse_vdso.c
-+++ b/tools/testing/selftests/vDSO/parse_vdso.c
-@@ -36,6 +36,12 @@
- #define ELF_BITS_XFORM(bits, x) ELF_BITS_XFORM2(bits, x)
- #define ELF(x) ELF_BITS_XFORM(ELF_BITS, x)
-+#ifdef __s390x__
-+#define ELF_HASH_ENTRY ELF(Xword)
-+#else
-+#define ELF_HASH_ENTRY ELF(Word)
-+#endif
-+
- static struct vdso_info
- {
-       bool valid;
-@@ -47,8 +53,8 @@ static struct vdso_info
-       /* Symbol table */
-       ELF(Sym) *symtab;
-       const char *symstrings;
--      ELF(Word) *bucket, *chain;
--      ELF(Word) nbucket, nchain;
-+      ELF_HASH_ENTRY *bucket, *chain;
-+      ELF_HASH_ENTRY nbucket, nchain;
-       /* Version table */
-       ELF(Versym) *versym;
-@@ -115,7 +121,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
-       /*
-        * Fish out the useful bits of the dynamic table.
-        */
--      ELF(Word) *hash = 0;
-+      ELF_HASH_ENTRY *hash = 0;
-       vdso_info.symstrings = 0;
-       vdso_info.symtab = 0;
-       vdso_info.versym = 0;
-@@ -133,7 +139,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
-                                + vdso_info.load_offset);
-                       break;
-               case DT_HASH:
--                      hash = (ELF(Word) *)
-+                      hash = (ELF_HASH_ENTRY *)
-                               ((uintptr_t)dyn[i].d_un.d_ptr
-                                + vdso_info.load_offset);
-                       break;
--- 
-2.43.0
-
diff --git a/queue-6.10/selftests-vdso-fix-vdso-name-for-powerpc.patch b/queue-6.10/selftests-vdso-fix-vdso-name-for-powerpc.patch
deleted file mode 100644 (file)
index 7488859..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From 86fa3660a5ae159ec4492dfed98c6debb10dc304 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:35 +0200
-Subject: selftests: vDSO: fix vDSO name for powerpc
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit 59eb856c3ed9b3552befd240c0c339f22eed3fa1 ]
-
-Following error occurs when running vdso_test_correctness on powerpc:
-
-~ # ./vdso_test_correctness
-[WARN] failed to find vDSO
-[SKIP] No vDSO, so skipping clock_gettime() tests
-[SKIP] No vDSO, so skipping clock_gettime64() tests
-[RUN]  Testing getcpu...
-[OK]   CPU 0: syscall: cpu 0, node 0
-
-On powerpc, vDSO is neither called linux-vdso.so.1 nor linux-gate.so.1
-but linux-vdso32.so.1 or linux-vdso64.so.1.
-
-Also search those two names before giving up.
-
-Fixes: c7e5789b24d3 ("kselftest: Move test_vdso to the vDSO test suite")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_test_correctness.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_test_correctness.c b/tools/testing/selftests/vDSO/vdso_test_correctness.c
-index e691a3cf14911..cdb697ae8343c 100644
---- a/tools/testing/selftests/vDSO/vdso_test_correctness.c
-+++ b/tools/testing/selftests/vDSO/vdso_test_correctness.c
-@@ -114,6 +114,12 @@ static void fill_function_pointers()
-       if (!vdso)
-               vdso = dlopen("linux-gate.so.1",
-                             RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-+      if (!vdso)
-+              vdso = dlopen("linux-vdso32.so.1",
-+                            RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-+      if (!vdso)
-+              vdso = dlopen("linux-vdso64.so.1",
-+                            RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-       if (!vdso) {
-               printf("[WARN]\tfailed to find vDSO\n");
-               return;
--- 
-2.43.0
-
diff --git a/queue-6.10/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch b/queue-6.10/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
deleted file mode 100644 (file)
index c632a63..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-From ce4b83b9beaaad1ef52414ed9ab6760d9a57d48a Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:37 +0200
-Subject: selftests: vDSO: fix vDSO symbols lookup for powerpc64
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit ba83b3239e657469709d15dcea5f9b65bf9dbf34 ]
-
-On powerpc64, following tests fail locating vDSO functions:
-
-  ~ # ./vdso_test_abi
-  TAP version 13
-  1..16
-  # [vDSO kselftest] VDSO_VERSION: LINUX_2.6.15
-  # Couldn't find __kernel_gettimeofday
-  ok 1 # SKIP __kernel_gettimeofday
-  # clock_id: CLOCK_REALTIME
-  # Couldn't find __kernel_clock_gettime
-  ok 2 # SKIP __kernel_clock_gettime CLOCK_REALTIME
-  # Couldn't find __kernel_clock_getres
-  ok 3 # SKIP __kernel_clock_getres CLOCK_REALTIME
-  ...
-  # Couldn't find __kernel_time
-  ok 16 # SKIP __kernel_time
-  # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:16 error:0
-
-  ~ # ./vdso_test_getrandom
-  __kernel_getrandom is missing!
-
-  ~ # ./vdso_test_gettimeofday
-  Could not find __kernel_gettimeofday
-
-  ~ # ./vdso_test_getcpu
-  Could not find __kernel_getcpu
-
-On powerpc64, as shown below by readelf, vDSO functions symbols have
-type NOTYPE, so also accept that type when looking for symbols.
-
-$ powerpc64-linux-gnu-readelf -a arch/powerpc/kernel/vdso/vdso64.so.dbg
-ELF Header:
-  Magic:   7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
-  Class:                             ELF64
-  Data:                              2's complement, big endian
-  Version:                           1 (current)
-  OS/ABI:                            UNIX - System V
-  ABI Version:                       0
-  Type:                              DYN (Shared object file)
-  Machine:                           PowerPC64
-  Version:                           0x1
-...
-
-Symbol table '.dynsym' contains 12 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
-     1: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     2: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     3: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     4: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-     5: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     6: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     7: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     8: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     9: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    10: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    11: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-
-Symbol table '.symtab' contains 56 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-...
-    45: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-    46: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __kernel_getcpu
-    47: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_getres
-    48: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_tbfreq
-    49: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_gettimeofday
-    50: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __kernel_sync_dicache
-    51: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_getrandom
-    52: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __kernel_sigtram[...]
-    53: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __kernel_time
-    54: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_g[...]
-    55: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_sys[...]
-
-Fixes: 98eedc3a9dbf ("Document the vDSO and add a reference parser")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/parse_vdso.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
-index 4ae417372e9eb..d9ccc5acac182 100644
---- a/tools/testing/selftests/vDSO/parse_vdso.c
-+++ b/tools/testing/selftests/vDSO/parse_vdso.c
-@@ -216,7 +216,8 @@ void *vdso_sym(const char *version, const char *name)
-               ELF(Sym) *sym = &vdso_info.symtab[chain];
-               /* Check for a defined global or weak function w/ right name. */
--              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC)
-+              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC &&
-+                  ELF64_ST_TYPE(sym->st_info) != STT_NOTYPE)
-                       continue;
-               if (ELF64_ST_BIND(sym->st_info) != STB_GLOBAL &&
-                   ELF64_ST_BIND(sym->st_info) != STB_WEAK)
--- 
-2.43.0
-
diff --git a/queue-6.10/selftests-vdso-fix-vdso_config-for-powerpc.patch b/queue-6.10/selftests-vdso-fix-vdso_config-for-powerpc.patch
deleted file mode 100644 (file)
index d746982..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From a0523d2789beb9a6530d45bedd734c426ee104cf Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:36 +0200
-Subject: selftests: vDSO: fix vdso_config for powerpc
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit 7d297c419b08eafa69ce27243ee9bbecab4fcaa4 ]
-
-Running vdso_test_correctness on powerpc64 gives the following warning:
-
-  ~ # ./vdso_test_correctness
-  Warning: failed to find clock_gettime64 in vDSO
-
-This is because vdso_test_correctness was built with VDSO_32BIT defined.
-
-__powerpc__ macro is defined on both powerpc32 and powerpc64 so
-__powerpc64__ needs to be checked first in vdso_config.h
-
-Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_config.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
-index 7b543e7f04d7b..00bfed6e4922e 100644
---- a/tools/testing/selftests/vDSO/vdso_config.h
-+++ b/tools/testing/selftests/vDSO/vdso_config.h
-@@ -18,13 +18,13 @@
- #elif defined(__aarch64__)
- #define VDSO_VERSION          3
- #define VDSO_NAMES            0
--#elif defined(__powerpc__)
-+#elif defined(__powerpc64__)
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
--#define VDSO_32BIT            1
--#elif defined(__powerpc64__)
-+#elif defined(__powerpc__)
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
-+#define VDSO_32BIT            1
- #elif defined (__s390__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
--- 
-2.43.0
-
diff --git a/queue-6.10/selftests-vdso-fix-vdso_config-for-s390.patch b/queue-6.10/selftests-vdso-fix-vdso_config-for-s390.patch
deleted file mode 100644 (file)
index 3cdeb25..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-From d1317e4064c757f6ca152c43a46739d59bff95ca Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 11 Sep 2024 10:50:15 +0200
-Subject: selftests: vDSO: fix vdso_config for s390
-
-From: Heiko Carstens <hca@linux.ibm.com>
-
-[ Upstream commit a6e23fb8d3c0e3904da70beaf5d7e840a983c97f ]
-
-Running vdso_test_correctness on s390x (aka s390 64 bit) emits a warning:
-
-Warning: failed to find clock_gettime64 in vDSO
-
-This is caused by the "#elif defined (__s390__)" check in vdso_config.h
-which the defines VDSO_32BIT.
-
-If __s390x__ is defined also __s390__ is defined. Therefore the correct
-check must make sure that only __s390__ is defined.
-
-Therefore add the missing !defined(__s390x__). Also use common
-__s390x__ define instead of __s390X__.
-
-Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_config.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
-index 00bfed6e4922e..fe0b3ec48c8d8 100644
---- a/tools/testing/selftests/vDSO/vdso_config.h
-+++ b/tools/testing/selftests/vDSO/vdso_config.h
-@@ -25,11 +25,11 @@
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
- #define VDSO_32BIT            1
--#elif defined (__s390__)
-+#elif defined (__s390__) && !defined(__s390x__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
- #define VDSO_32BIT            1
--#elif defined (__s390X__)
-+#elif defined (__s390x__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
- #elif defined(__mips__)
--- 
-2.43.0
-
index d7da4a6a9cea03e71e24a703914344cfdb810ea9..d8691fe1d5c989f281dddf200e699c9430d68f77 100644 (file)
@@ -196,9 +196,6 @@ drm-mediatek-use-spin_lock_irqsave-for-crtc-event-lo.patch
 powerpc-8xx-fix-initial-memory-mapping.patch
 powerpc-8xx-fix-kernel-vs-user-address-comparison.patch
 powerpc-vdso-inconditionally-use-cfunc-macro.patch
-selftests-vdso-fix-vdso-name-for-powerpc.patch
-selftests-vdso-fix-vdso_config-for-powerpc.patch
-selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
 drm-msm-use-a7xx-family-directly-in-gpu_state.patch
 drm-msm-dump-correct-dbgahb-clusters-on-a750.patch
 drm-msm-fix-cp_bv_draw_state_addr-name.patch
@@ -224,9 +221,6 @@ xen-introduce-generic-helper-checking-for-memory-map.patch
 xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-add-capability-to-remap-non-ram-pages-to-differe.patch
 xen-tolerate-acpi-nvs-memory-overlapping-with-xen-al.patch
-powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch
-selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch
-selftests-vdso-fix-vdso_config-for-s390.patch
 xen-swiotlb-add-alignment-check-for-dma-buffers.patch
 xen-swiotlb-fix-allocated-size.patch
 tpm-clean-up-tpm-space-after-command-failure.patch
diff --git a/queue-6.11/powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch b/queue-6.11/powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch
deleted file mode 100644 (file)
index 8bf9230..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-From cdfa8e2d2c9ad94c9e738932d34a21591e41ebb5 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 6 Sep 2024 10:33:43 +0200
-Subject: powerpc/vdso: Fix VDSO data access when running in a non-root time
- namespace
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit c73049389e58c01e2e3bbfae900c8daeee177191 ]
-
-When running in a non-root time namespace, the global VDSO data page
-is replaced by a dedicated namespace data page and the global data
-page is mapped next to it. Detailed explanations can be found at
-commit 660fd04f9317 ("lib/vdso: Prepare for time namespace support").
-
-When it happens, __kernel_get_syscall_map and __kernel_get_tbfreq
-and __kernel_sync_dicache don't work anymore because they read 0
-instead of the data they need.
-
-To address that, clock_mode has to be read. When it is set to
-VDSO_CLOCKMODE_TIMENS, it means it is a dedicated namespace data page
-and the global data is located on the following page.
-
-Add a macro called get_realdatapage which reads clock_mode and add
-PAGE_SIZE to the pointer provided by get_datapage macro when
-clock_mode is equal to VDSO_CLOCKMODE_TIMENS. Use this new macro
-instead of get_datapage macro except for time functions as they handle
-it internally.
-
-Fixes: 74205b3fc2ef ("powerpc/vdso: Add support for time namespaces")
-Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Closes: https://lore.kernel.org/all/ZtnYqZI-nrsNslwy@zx2c4.com/
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Michael Ellerman <mpe@ellerman.id.au>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/powerpc/include/asm/vdso_datapage.h | 15 +++++++++++++++
- arch/powerpc/kernel/asm-offsets.c        |  2 ++
- arch/powerpc/kernel/vdso/cacheflush.S    |  2 +-
- arch/powerpc/kernel/vdso/datapage.S      |  4 ++--
- 4 files changed, 20 insertions(+), 3 deletions(-)
-
-diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch/powerpc/include/asm/vdso_datapage.h
-index a585c8e538ff0..939daf6b695ef 100644
---- a/arch/powerpc/include/asm/vdso_datapage.h
-+++ b/arch/powerpc/include/asm/vdso_datapage.h
-@@ -111,6 +111,21 @@ extern struct vdso_arch_data *vdso_data;
-       addi    \ptr, \ptr, (_vdso_datapage - 999b)@l
- .endm
-+#include <asm/asm-offsets.h>
-+#include <asm/page.h>
-+
-+.macro get_realdatapage ptr scratch
-+      get_datapage \ptr
-+#ifdef CONFIG_TIME_NS
-+      lwz     \scratch, VDSO_CLOCKMODE_OFFSET(\ptr)
-+      xoris   \scratch, \scratch, VDSO_CLOCKMODE_TIMENS@h
-+      xori    \scratch, \scratch, VDSO_CLOCKMODE_TIMENS@l
-+      cntlzw  \scratch, \scratch
-+      rlwinm  \scratch, \scratch, PAGE_SHIFT - 5, 1 << PAGE_SHIFT
-+      add     \ptr, \ptr, \scratch
-+#endif
-+.endm
-+
- #endif /* __ASSEMBLY__ */
- #endif /* __KERNEL__ */
-diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
-index 23733282de4d9..7b3feb6bc2103 100644
---- a/arch/powerpc/kernel/asm-offsets.c
-+++ b/arch/powerpc/kernel/asm-offsets.c
-@@ -346,6 +346,8 @@ int main(void)
- #else
-       OFFSET(CFG_SYSCALL_MAP32, vdso_arch_data, syscall_map);
- #endif
-+      OFFSET(VDSO_CLOCKMODE_OFFSET, vdso_arch_data, data[0].clock_mode);
-+      DEFINE(VDSO_CLOCKMODE_TIMENS, VDSO_CLOCKMODE_TIMENS);
- #ifdef CONFIG_BUG
-       DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry));
-diff --git a/arch/powerpc/kernel/vdso/cacheflush.S b/arch/powerpc/kernel/vdso/cacheflush.S
-index 0085ae464dac9..3b2479bd2f9a1 100644
---- a/arch/powerpc/kernel/vdso/cacheflush.S
-+++ b/arch/powerpc/kernel/vdso/cacheflush.S
-@@ -30,7 +30,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
- #ifdef CONFIG_PPC64
-       mflr    r12
-   .cfi_register lr,r12
--      get_datapage    r10
-+      get_realdatapage        r10, r11
-       mtlr    r12
-   .cfi_restore        lr
- #endif
-diff --git a/arch/powerpc/kernel/vdso/datapage.S b/arch/powerpc/kernel/vdso/datapage.S
-index db8e167f01667..2b19b6201a33a 100644
---- a/arch/powerpc/kernel/vdso/datapage.S
-+++ b/arch/powerpc/kernel/vdso/datapage.S
-@@ -28,7 +28,7 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
-       mflr    r12
-   .cfi_register lr,r12
-       mr.     r4,r3
--      get_datapage    r3
-+      get_realdatapage        r3, r11
-       mtlr    r12
- #ifdef __powerpc64__
-       addi    r3,r3,CFG_SYSCALL_MAP64
-@@ -52,7 +52,7 @@ V_FUNCTION_BEGIN(__kernel_get_tbfreq)
-   .cfi_startproc
-       mflr    r12
-   .cfi_register lr,r12
--      get_datapage    r3
-+      get_realdatapage        r3, r11
- #ifndef __powerpc64__
-       lwz     r4,(CFG_TB_TICKS_PER_SEC + 4)(r3)
- #endif
--- 
-2.43.0
-
diff --git a/queue-6.11/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch b/queue-6.11/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch
deleted file mode 100644 (file)
index e2dccf0..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-From bdcb58890971ff66f676f261f20dfb19e678b071 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 11 Sep 2024 10:50:14 +0200
-Subject: selftests: vDSO: fix ELF hash table entry size for s390x
-
-From: Jens Remus <jremus@linux.ibm.com>
-
-[ Upstream commit 14be4e6f35221c4731b004553ecf7cbc6dc1d2d8 ]
-
-The vDSO self tests fail on s390x for a vDSO linked with the GNU linker
-ld as follows:
-
-  # ./vdso_test_gettimeofday
-  Floating point exception (core dumped)
-
-On s390x the ELF hash table entries are 64 bits instead of 32 bits in
-size (see Glibc sysdeps/unix/sysv/linux/s390/bits/elfclass.h).
-
-Fixes: 40723419f407 ("kselftest: Enable vDSO test on non x86 platforms")
-Reported-by: Heiko Carstens <hca@linux.ibm.com>
-Tested-by: Heiko Carstens <hca@linux.ibm.com>
-Signed-off-by: Jens Remus <jremus@linux.ibm.com>
-Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/parse_vdso.c | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
-index d9ccc5acac182..7dd5668ea8a6e 100644
---- a/tools/testing/selftests/vDSO/parse_vdso.c
-+++ b/tools/testing/selftests/vDSO/parse_vdso.c
-@@ -36,6 +36,12 @@
- #define ELF_BITS_XFORM(bits, x) ELF_BITS_XFORM2(bits, x)
- #define ELF(x) ELF_BITS_XFORM(ELF_BITS, x)
-+#ifdef __s390x__
-+#define ELF_HASH_ENTRY ELF(Xword)
-+#else
-+#define ELF_HASH_ENTRY ELF(Word)
-+#endif
-+
- static struct vdso_info
- {
-       bool valid;
-@@ -47,8 +53,8 @@ static struct vdso_info
-       /* Symbol table */
-       ELF(Sym) *symtab;
-       const char *symstrings;
--      ELF(Word) *bucket, *chain;
--      ELF(Word) nbucket, nchain;
-+      ELF_HASH_ENTRY *bucket, *chain;
-+      ELF_HASH_ENTRY nbucket, nchain;
-       /* Version table */
-       ELF(Versym) *versym;
-@@ -115,7 +121,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
-       /*
-        * Fish out the useful bits of the dynamic table.
-        */
--      ELF(Word) *hash = 0;
-+      ELF_HASH_ENTRY *hash = 0;
-       vdso_info.symstrings = 0;
-       vdso_info.symtab = 0;
-       vdso_info.versym = 0;
-@@ -133,7 +139,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
-                                + vdso_info.load_offset);
-                       break;
-               case DT_HASH:
--                      hash = (ELF(Word) *)
-+                      hash = (ELF_HASH_ENTRY *)
-                               ((uintptr_t)dyn[i].d_un.d_ptr
-                                + vdso_info.load_offset);
-                       break;
--- 
-2.43.0
-
diff --git a/queue-6.11/selftests-vdso-fix-the-way-vdso-functions-are-called.patch b/queue-6.11/selftests-vdso-fix-the-way-vdso-functions-are-called.patch
deleted file mode 100644 (file)
index 6e10072..0000000
+++ /dev/null
@@ -1,353 +0,0 @@
-From 768c397f50d08415807c129965abcf7d920afd1f Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:38 +0200
-Subject: selftests: vDSO: fix the way vDSO functions are called for powerpc
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit 6eda706a535c3d0119eaefaad5fc119609639ed2 ]
-
-vdso_test_correctness test fails on powerpc:
-
-~ # ./vdso_test_correctness
-...
-[RUN]  Testing clock_gettime for clock CLOCK_REALTIME_ALARM (8)...
-[FAIL] No such clock, but __vdso_clock_gettime returned 22
-[RUN]  Testing clock_gettime for clock CLOCK_BOOTTIME_ALARM (9)...
-[FAIL] No such clock, but __vdso_clock_gettime returned 22
-[RUN]  Testing clock_gettime for clock CLOCK_SGI_CYCLE (10)...
-[FAIL] No such clock, but __vdso_clock_gettime returned 22
-...
-[RUN]  Testing clock_gettime for clock invalid (-1)...
-[FAIL] No such clock, but __vdso_clock_gettime returned 22
-[RUN]  Testing clock_gettime for clock invalid (-2147483648)...
-[FAIL] No such clock, but __vdso_clock_gettime returned 22
-[RUN]  Testing clock_gettime for clock invalid (2147483647)...
-[FAIL] No such clock, but __vdso_clock_gettime returned 22
-
-On powerpc, a call to a VDSO function is not an ordinary C function
-call. Unlike several architectures which returns a negative error code
-in case of an error, powerpc sets CR[SO] and returns the error code
-as a positive value.
-
-Define and use a macro called VDSO_CALL() which takes a pointer
-to the function to call, the number of arguments and the arguments.
-
-Also update ABI vdso documentation to reflect this subtlety.
-
-Provide a specific version of VDSO_CALL() for powerpc that negates
-the error code on return when CR[SO] is set.
-
-Fixes: c7e5789b24d3 ("kselftest: Move test_vdso to the vDSO test suite")
-Fixes: 2e9a97256616 ("selftests: vdso: Add a selftest for vDSO getcpu()")
-Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
-Fixes: b2f1c3db2887 ("kselftest: Extend vdso correctness test to clock_gettime64")
-Fixes: 4920a2590e91 ("selftests/vDSO: add tests for vgetrandom")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- Documentation/ABI/stable/vdso                 |  8 ++-
- tools/testing/selftests/vDSO/vdso_call.h      | 70 +++++++++++++++++++
- tools/testing/selftests/vDSO/vdso_test_abi.c  |  9 +--
- .../selftests/vDSO/vdso_test_correctness.c    | 15 ++--
- .../testing/selftests/vDSO/vdso_test_getcpu.c |  3 +-
- .../selftests/vDSO/vdso_test_getrandom.c      |  5 +-
- .../selftests/vDSO/vdso_test_gettimeofday.c   |  3 +-
- 7 files changed, 95 insertions(+), 18 deletions(-)
- create mode 100644 tools/testing/selftests/vDSO/vdso_call.h
-
-diff --git a/Documentation/ABI/stable/vdso b/Documentation/ABI/stable/vdso
-index 951838d427811..85dbb6a160df8 100644
---- a/Documentation/ABI/stable/vdso
-+++ b/Documentation/ABI/stable/vdso
-@@ -9,9 +9,11 @@ maps an ELF DSO into that program's address space.  This DSO is called
- the vDSO and it often contains useful and highly-optimized alternatives
- to real syscalls.
--These functions are called just like ordinary C function according to
--your platform's ABI.  Call them from a sensible context.  (For example,
--if you set CS on x86 to something strange, the vDSO functions are
-+These functions are called according to your platform's ABI. On many
-+platforms they are called just like ordinary C function. On other platforms
-+(ex: powerpc) they are called with the same convention as system calls which
-+is different from ordinary C functions. Call them from a sensible context.
-+(For example, if you set CS on x86 to something strange, the vDSO functions are
- within their rights to crash.)  In addition, if you pass a bad
- pointer to a vDSO function, you might get SIGSEGV instead of -EFAULT.
-diff --git a/tools/testing/selftests/vDSO/vdso_call.h b/tools/testing/selftests/vDSO/vdso_call.h
-new file mode 100644
-index 0000000000000..bb237d771051b
---- /dev/null
-+++ b/tools/testing/selftests/vDSO/vdso_call.h
-@@ -0,0 +1,70 @@
-+/* SPDX-License-Identifier: GPL-2.0 */
-+/*
-+ * Macro to call vDSO functions
-+ *
-+ * Copyright (C) 2024 Christophe Leroy <christophe.leroy@csgroup.eu>, CS GROUP France
-+ */
-+#ifndef __VDSO_CALL_H__
-+#define __VDSO_CALL_H__
-+
-+#ifdef __powerpc__
-+
-+#define LOADARGS_1(fn, __arg1) do {                                   \
-+      _r0 = fn;                                                       \
-+      _r3 = (long)__arg1;                                             \
-+} while (0)
-+
-+#define LOADARGS_2(fn, __arg1, __arg2) do {                           \
-+      _r0 = fn;                                                       \
-+      _r3 = (long)__arg1;                                             \
-+      _r4 = (long)__arg2;                                             \
-+} while (0)
-+
-+#define LOADARGS_3(fn, __arg1, __arg2, __arg3) do {                   \
-+      _r0 = fn;                                                       \
-+      _r3 = (long)__arg1;                                             \
-+      _r4 = (long)__arg2;                                             \
-+      _r5 = (long)__arg3;                                             \
-+} while (0)
-+
-+#define LOADARGS_5(fn, __arg1, __arg2, __arg3, __arg4, __arg5) do {   \
-+      _r0 = fn;                                                       \
-+      _r3 = (long)__arg1;                                             \
-+      _r4 = (long)__arg2;                                             \
-+      _r5 = (long)__arg3;                                             \
-+      _r6 = (long)__arg4;                                             \
-+      _r7 = (long)__arg5;                                             \
-+} while (0)
-+
-+#define VDSO_CALL(fn, nr, args...) ({                                 \
-+      register void *_r0 asm ("r0");                                  \
-+      register long _r3 asm ("r3");                                   \
-+      register long _r4 asm ("r4");                                   \
-+      register long _r5 asm ("r5");                                   \
-+      register long _r6 asm ("r6");                                   \
-+      register long _r7 asm ("r7");                                   \
-+      register long _r8 asm ("r8");                                   \
-+      register long _rval asm ("r3");                                 \
-+                                                                      \
-+      LOADARGS_##nr(fn, args);                                        \
-+                                                                      \
-+      asm volatile(                                                   \
-+              "       mtctr %0\n"                                     \
-+              "       bctrl\n"                                        \
-+              "       bns+    1f\n"                                   \
-+              "       neg     3, 3\n"                                 \
-+              "1:"                                                    \
-+              : "+r" (_r0), "=r" (_r3), "+r" (_r4), "+r" (_r5),       \
-+                "+r" (_r6), "+r" (_r7), "+r" (_r8)                    \
-+              : "r" (_rval)                                           \
-+              : "r9", "r10", "r11", "r12", "cr0", "cr1", "cr5",       \
-+                "cr6", "cr7", "xer", "lr", "ctr", "memory"            \
-+      );                                                              \
-+      _rval;                                                          \
-+})
-+
-+#else
-+#define VDSO_CALL(fn, nr, args...)    fn(args)
-+#endif
-+
-+#endif
-diff --git a/tools/testing/selftests/vDSO/vdso_test_abi.c b/tools/testing/selftests/vDSO/vdso_test_abi.c
-index 96d32fd65b42b..00034208c4c64 100644
---- a/tools/testing/selftests/vDSO/vdso_test_abi.c
-+++ b/tools/testing/selftests/vDSO/vdso_test_abi.c
-@@ -20,6 +20,7 @@
- #include "../kselftest.h"
- #include "vdso_config.h"
-+#include "vdso_call.h"
- extern void *vdso_sym(const char *version, const char *name);
- extern void vdso_init_from_sysinfo_ehdr(uintptr_t base);
-@@ -61,7 +62,7 @@ static void vdso_test_gettimeofday(void)
-       }
-       struct timeval tv;
--      long ret = vdso_gettimeofday(&tv, 0);
-+      long ret = VDSO_CALL(vdso_gettimeofday, 2, &tv, 0);
-       if (ret == 0) {
-               ksft_print_msg("The time is %lld.%06lld\n",
-@@ -86,7 +87,7 @@ static void vdso_test_clock_gettime(clockid_t clk_id)
-       }
-       struct timespec ts;
--      long ret = vdso_clock_gettime(clk_id, &ts);
-+      long ret = VDSO_CALL(vdso_clock_gettime, 2, clk_id, &ts);
-       if (ret == 0) {
-               ksft_print_msg("The time is %lld.%06lld\n",
-@@ -111,7 +112,7 @@ static void vdso_test_time(void)
-               return;
-       }
--      long ret = vdso_time(NULL);
-+      long ret = VDSO_CALL(vdso_time, 1, NULL);
-       if (ret > 0) {
-               ksft_print_msg("The time in hours since January 1, 1970 is %lld\n",
-@@ -138,7 +139,7 @@ static void vdso_test_clock_getres(clockid_t clk_id)
-       }
-       struct timespec ts, sys_ts;
--      long ret = vdso_clock_getres(clk_id, &ts);
-+      long ret = VDSO_CALL(vdso_clock_getres, 2, clk_id, &ts);
-       if (ret == 0) {
-               ksft_print_msg("The vdso resolution is %lld %lld\n",
-diff --git a/tools/testing/selftests/vDSO/vdso_test_correctness.c b/tools/testing/selftests/vDSO/vdso_test_correctness.c
-index cdb697ae8343c..5fb97ad67eeaf 100644
---- a/tools/testing/selftests/vDSO/vdso_test_correctness.c
-+++ b/tools/testing/selftests/vDSO/vdso_test_correctness.c
-@@ -20,6 +20,7 @@
- #include <limits.h>
- #include "vdso_config.h"
-+#include "vdso_call.h"
- #include "../kselftest.h"
- static const char **name;
-@@ -186,7 +187,7 @@ static void test_getcpu(void)
-               ret_sys = sys_getcpu(&cpu_sys, &node_sys, 0);
-               if (vdso_getcpu)
--                      ret_vdso = vdso_getcpu(&cpu_vdso, &node_vdso, 0);
-+                      ret_vdso = VDSO_CALL(vdso_getcpu, 3, &cpu_vdso, &node_vdso, 0);
-               if (vgetcpu)
-                       ret_vsys = vgetcpu(&cpu_vsys, &node_vsys, 0);
-@@ -269,7 +270,7 @@ static void test_one_clock_gettime(int clock, const char *name)
-       if (sys_clock_gettime(clock, &start) < 0) {
-               if (errno == EINVAL) {
--                      vdso_ret = vdso_clock_gettime(clock, &vdso);
-+                      vdso_ret = VDSO_CALL(vdso_clock_gettime, 2, clock, &vdso);
-                       if (vdso_ret == -EINVAL) {
-                               printf("[OK]\tNo such clock.\n");
-                       } else {
-@@ -282,7 +283,7 @@ static void test_one_clock_gettime(int clock, const char *name)
-               return;
-       }
--      vdso_ret = vdso_clock_gettime(clock, &vdso);
-+      vdso_ret = VDSO_CALL(vdso_clock_gettime, 2, clock, &vdso);
-       end_ret = sys_clock_gettime(clock, &end);
-       if (vdso_ret != 0 || end_ret != 0) {
-@@ -331,7 +332,7 @@ static void test_one_clock_gettime64(int clock, const char *name)
-       if (sys_clock_gettime64(clock, &start) < 0) {
-               if (errno == EINVAL) {
--                      vdso_ret = vdso_clock_gettime64(clock, &vdso);
-+                      vdso_ret = VDSO_CALL(vdso_clock_gettime64, 2, clock, &vdso);
-                       if (vdso_ret == -EINVAL) {
-                               printf("[OK]\tNo such clock.\n");
-                       } else {
-@@ -344,7 +345,7 @@ static void test_one_clock_gettime64(int clock, const char *name)
-               return;
-       }
--      vdso_ret = vdso_clock_gettime64(clock, &vdso);
-+      vdso_ret = VDSO_CALL(vdso_clock_gettime64, 2, clock, &vdso);
-       end_ret = sys_clock_gettime64(clock, &end);
-       if (vdso_ret != 0 || end_ret != 0) {
-@@ -401,7 +402,7 @@ static void test_gettimeofday(void)
-               return;
-       }
--      vdso_ret = vdso_gettimeofday(&vdso, &vdso_tz);
-+      vdso_ret = VDSO_CALL(vdso_gettimeofday, 2, &vdso, &vdso_tz);
-       end_ret = sys_gettimeofday(&end, NULL);
-       if (vdso_ret != 0 || end_ret != 0) {
-@@ -431,7 +432,7 @@ static void test_gettimeofday(void)
-       }
-       /* And make sure that passing NULL for tz doesn't crash. */
--      vdso_gettimeofday(&vdso, NULL);
-+      VDSO_CALL(vdso_gettimeofday, 2, &vdso, NULL);
- }
- int main(int argc, char **argv)
-diff --git a/tools/testing/selftests/vDSO/vdso_test_getcpu.c b/tools/testing/selftests/vDSO/vdso_test_getcpu.c
-index b758f68c6c9c2..cdeaed45fb26c 100644
---- a/tools/testing/selftests/vDSO/vdso_test_getcpu.c
-+++ b/tools/testing/selftests/vDSO/vdso_test_getcpu.c
-@@ -14,6 +14,7 @@
- #include "../kselftest.h"
- #include "parse_vdso.h"
- #include "vdso_config.h"
-+#include "vdso_call.h"
- struct getcpu_cache;
- typedef long (*getcpu_t)(unsigned int *, unsigned int *,
-@@ -42,7 +43,7 @@ int main(int argc, char **argv)
-               return KSFT_SKIP;
-       }
--      ret = get_cpu(&cpu, &node, 0);
-+      ret = VDSO_CALL(get_cpu, 3, &cpu, &node, 0);
-       if (ret == 0) {
-               printf("Running on CPU %u node %u\n", cpu, node);
-       } else {
-diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
-index 5db8ac8999cd0..351daeb649c84 100644
---- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c
-+++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
-@@ -22,6 +22,7 @@
- #include "../kselftest.h"
- #include "parse_vdso.h"
- #include "vdso_config.h"
-+#include "vdso_call.h"
- #ifndef timespecsub
- #define       timespecsub(tsp, usp, vsp)                                      \
-@@ -116,7 +117,7 @@ static void vgetrandom_init(void)
-               printf("%s is missing!\n", name);
-               exit(KSFT_FAIL);
-       }
--      ret = vgrnd.fn(NULL, 0, 0, &vgrnd.params, ~0UL);
-+      ret = VDSO_CALL(vgrnd.fn, 5, NULL, 0, 0, &vgrnd.params, ~0UL);
-       if (ret == -ENOSYS) {
-               printf("unsupported architecture\n");
-               exit(KSFT_SKIP);
-@@ -137,7 +138,7 @@ static ssize_t vgetrandom(void *buf, size_t len, unsigned long flags)
-                       exit(KSFT_FAIL);
-               }
-       }
--      return vgrnd.fn(buf, len, flags, state, vgrnd.params.size_of_opaque_state);
-+      return VDSO_CALL(vgrnd.fn, 5, buf, len, flags, state, vgrnd.params.size_of_opaque_state);
- }
- enum { TRIALS = 25000000, THREADS = 256 };
-diff --git a/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c b/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c
-index ee4f1ca56a71a..e31b18ffae338 100644
---- a/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c
-+++ b/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c
-@@ -19,6 +19,7 @@
- #include "../kselftest.h"
- #include "parse_vdso.h"
- #include "vdso_config.h"
-+#include "vdso_call.h"
- int main(int argc, char **argv)
- {
-@@ -43,7 +44,7 @@ int main(int argc, char **argv)
-       }
-       struct timeval tv;
--      long ret = gtod(&tv, 0);
-+      long ret = VDSO_CALL(gtod, 2, &tv, 0);
-       if (ret == 0) {
-               printf("The time is %lld.%06lld\n",
--- 
-2.43.0
-
diff --git a/queue-6.11/selftests-vdso-fix-vdso-name-for-powerpc.patch b/queue-6.11/selftests-vdso-fix-vdso-name-for-powerpc.patch
deleted file mode 100644 (file)
index 0aee161..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From b06597d5c47cdbac1858263bb0e4facb5e8a53f1 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:35 +0200
-Subject: selftests: vDSO: fix vDSO name for powerpc
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit 59eb856c3ed9b3552befd240c0c339f22eed3fa1 ]
-
-Following error occurs when running vdso_test_correctness on powerpc:
-
-~ # ./vdso_test_correctness
-[WARN] failed to find vDSO
-[SKIP] No vDSO, so skipping clock_gettime() tests
-[SKIP] No vDSO, so skipping clock_gettime64() tests
-[RUN]  Testing getcpu...
-[OK]   CPU 0: syscall: cpu 0, node 0
-
-On powerpc, vDSO is neither called linux-vdso.so.1 nor linux-gate.so.1
-but linux-vdso32.so.1 or linux-vdso64.so.1.
-
-Also search those two names before giving up.
-
-Fixes: c7e5789b24d3 ("kselftest: Move test_vdso to the vDSO test suite")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_test_correctness.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_test_correctness.c b/tools/testing/selftests/vDSO/vdso_test_correctness.c
-index e691a3cf14911..cdb697ae8343c 100644
---- a/tools/testing/selftests/vDSO/vdso_test_correctness.c
-+++ b/tools/testing/selftests/vDSO/vdso_test_correctness.c
-@@ -114,6 +114,12 @@ static void fill_function_pointers()
-       if (!vdso)
-               vdso = dlopen("linux-gate.so.1",
-                             RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-+      if (!vdso)
-+              vdso = dlopen("linux-vdso32.so.1",
-+                            RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-+      if (!vdso)
-+              vdso = dlopen("linux-vdso64.so.1",
-+                            RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-       if (!vdso) {
-               printf("[WARN]\tfailed to find vDSO\n");
-               return;
--- 
-2.43.0
-
diff --git a/queue-6.11/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch b/queue-6.11/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
deleted file mode 100644 (file)
index 24aebd6..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-From 1abf0182089b9f372b0ca10f2dc384b4b04f339b Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:37 +0200
-Subject: selftests: vDSO: fix vDSO symbols lookup for powerpc64
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit ba83b3239e657469709d15dcea5f9b65bf9dbf34 ]
-
-On powerpc64, following tests fail locating vDSO functions:
-
-  ~ # ./vdso_test_abi
-  TAP version 13
-  1..16
-  # [vDSO kselftest] VDSO_VERSION: LINUX_2.6.15
-  # Couldn't find __kernel_gettimeofday
-  ok 1 # SKIP __kernel_gettimeofday
-  # clock_id: CLOCK_REALTIME
-  # Couldn't find __kernel_clock_gettime
-  ok 2 # SKIP __kernel_clock_gettime CLOCK_REALTIME
-  # Couldn't find __kernel_clock_getres
-  ok 3 # SKIP __kernel_clock_getres CLOCK_REALTIME
-  ...
-  # Couldn't find __kernel_time
-  ok 16 # SKIP __kernel_time
-  # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:16 error:0
-
-  ~ # ./vdso_test_getrandom
-  __kernel_getrandom is missing!
-
-  ~ # ./vdso_test_gettimeofday
-  Could not find __kernel_gettimeofday
-
-  ~ # ./vdso_test_getcpu
-  Could not find __kernel_getcpu
-
-On powerpc64, as shown below by readelf, vDSO functions symbols have
-type NOTYPE, so also accept that type when looking for symbols.
-
-$ powerpc64-linux-gnu-readelf -a arch/powerpc/kernel/vdso/vdso64.so.dbg
-ELF Header:
-  Magic:   7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
-  Class:                             ELF64
-  Data:                              2's complement, big endian
-  Version:                           1 (current)
-  OS/ABI:                            UNIX - System V
-  ABI Version:                       0
-  Type:                              DYN (Shared object file)
-  Machine:                           PowerPC64
-  Version:                           0x1
-...
-
-Symbol table '.dynsym' contains 12 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
-     1: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     2: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     3: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     4: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-     5: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     6: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     7: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     8: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     9: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    10: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    11: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-
-Symbol table '.symtab' contains 56 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-...
-    45: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-    46: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __kernel_getcpu
-    47: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_getres
-    48: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_tbfreq
-    49: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_gettimeofday
-    50: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __kernel_sync_dicache
-    51: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_getrandom
-    52: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __kernel_sigtram[...]
-    53: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __kernel_time
-    54: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_g[...]
-    55: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_sys[...]
-
-Fixes: 98eedc3a9dbf ("Document the vDSO and add a reference parser")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/parse_vdso.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
-index 4ae417372e9eb..d9ccc5acac182 100644
---- a/tools/testing/selftests/vDSO/parse_vdso.c
-+++ b/tools/testing/selftests/vDSO/parse_vdso.c
-@@ -216,7 +216,8 @@ void *vdso_sym(const char *version, const char *name)
-               ELF(Sym) *sym = &vdso_info.symtab[chain];
-               /* Check for a defined global or weak function w/ right name. */
--              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC)
-+              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC &&
-+                  ELF64_ST_TYPE(sym->st_info) != STT_NOTYPE)
-                       continue;
-               if (ELF64_ST_BIND(sym->st_info) != STB_GLOBAL &&
-                   ELF64_ST_BIND(sym->st_info) != STB_WEAK)
--- 
-2.43.0
-
diff --git a/queue-6.11/selftests-vdso-fix-vdso_config-for-powerpc.patch b/queue-6.11/selftests-vdso-fix-vdso_config-for-powerpc.patch
deleted file mode 100644 (file)
index 9aa4139..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From 9d04144347dcebeaa3d46c7a849e62094938c296 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:36 +0200
-Subject: selftests: vDSO: fix vdso_config for powerpc
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit 7d297c419b08eafa69ce27243ee9bbecab4fcaa4 ]
-
-Running vdso_test_correctness on powerpc64 gives the following warning:
-
-  ~ # ./vdso_test_correctness
-  Warning: failed to find clock_gettime64 in vDSO
-
-This is because vdso_test_correctness was built with VDSO_32BIT defined.
-
-__powerpc__ macro is defined on both powerpc32 and powerpc64 so
-__powerpc64__ needs to be checked first in vdso_config.h
-
-Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_config.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
-index 7b543e7f04d7b..00bfed6e4922e 100644
---- a/tools/testing/selftests/vDSO/vdso_config.h
-+++ b/tools/testing/selftests/vDSO/vdso_config.h
-@@ -18,13 +18,13 @@
- #elif defined(__aarch64__)
- #define VDSO_VERSION          3
- #define VDSO_NAMES            0
--#elif defined(__powerpc__)
-+#elif defined(__powerpc64__)
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
--#define VDSO_32BIT            1
--#elif defined(__powerpc64__)
-+#elif defined(__powerpc__)
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
-+#define VDSO_32BIT            1
- #elif defined (__s390__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
--- 
-2.43.0
-
diff --git a/queue-6.11/selftests-vdso-fix-vdso_config-for-s390.patch b/queue-6.11/selftests-vdso-fix-vdso_config-for-s390.patch
deleted file mode 100644 (file)
index 5ad93a7..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-From b6f9476396bb83c400ccd96aa40bc07ee73bb61f Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 11 Sep 2024 10:50:15 +0200
-Subject: selftests: vDSO: fix vdso_config for s390
-
-From: Heiko Carstens <hca@linux.ibm.com>
-
-[ Upstream commit a6e23fb8d3c0e3904da70beaf5d7e840a983c97f ]
-
-Running vdso_test_correctness on s390x (aka s390 64 bit) emits a warning:
-
-Warning: failed to find clock_gettime64 in vDSO
-
-This is caused by the "#elif defined (__s390__)" check in vdso_config.h
-which the defines VDSO_32BIT.
-
-If __s390x__ is defined also __s390__ is defined. Therefore the correct
-check must make sure that only __s390__ is defined.
-
-Therefore add the missing !defined(__s390x__). Also use common
-__s390x__ define instead of __s390X__.
-
-Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_config.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
-index 740ce8c98d2e7..722260f975619 100644
---- a/tools/testing/selftests/vDSO/vdso_config.h
-+++ b/tools/testing/selftests/vDSO/vdso_config.h
-@@ -25,11 +25,11 @@
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
- #define VDSO_32BIT            1
--#elif defined (__s390__)
-+#elif defined (__s390__) && !defined(__s390x__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
- #define VDSO_32BIT            1
--#elif defined (__s390X__)
-+#elif defined (__s390x__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
- #elif defined(__mips__)
--- 
-2.43.0
-
diff --git a/queue-6.11/selftests-vdso-look-for-arch-specific-function-name-.patch b/queue-6.11/selftests-vdso-look-for-arch-specific-function-name-.patch
deleted file mode 100644 (file)
index 69690ac..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-From f424ad78d98cddf6bc24eec245423c258e40c88e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 22 Aug 2024 09:13:22 +0200
-Subject: selftests: vDSO: look for arch-specific function name in getrandom
- test
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit e1bbcab496f745d963e43a6e0f669359e82c4934 ]
-
-Don't hard-code x86 specific names. Rather, use vdso_config definitions
-to find the correct function matching the architecture.
-
-Add random VDSO function names in names[][]. Remove the #ifdef
-CONFIG_VDSO32, as having the name there all the time is harmless and
-guaranties a steady index for following strings.
-
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-[Jason: add [6] to variable declaration rather than each usage site.]
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Stable-dep-of: 6eda706a535c ("selftests: vDSO: fix the way vDSO functions are called for powerpc")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_config.h         | 8 +++-----
- tools/testing/selftests/vDSO/vdso_test_getrandom.c | 8 ++++++--
- 2 files changed, 9 insertions(+), 7 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
-index 00bfed6e4922e..740ce8c98d2e7 100644
---- a/tools/testing/selftests/vDSO/vdso_config.h
-+++ b/tools/testing/selftests/vDSO/vdso_config.h
-@@ -68,16 +68,15 @@ static const char *versions[7] = {
-       "LINUX_5.10"
- };
--static const char *names[2][6] = {
-+static const char *names[2][7] = {
-       {
-               "__kernel_gettimeofday",
-               "__kernel_clock_gettime",
-               "__kernel_time",
-               "__kernel_clock_getres",
-               "__kernel_getcpu",
--#if defined(VDSO_32BIT)
-               "__kernel_clock_gettime64",
--#endif
-+              "__kernel_getrandom",
-       },
-       {
-               "__vdso_gettimeofday",
-@@ -85,9 +84,8 @@ static const char *names[2][6] = {
-               "__vdso_time",
-               "__vdso_clock_getres",
-               "__vdso_getcpu",
--#if defined(VDSO_32BIT)
-               "__vdso_clock_gettime64",
--#endif
-+              "__vdso_getrandom",
-       },
- };
-diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
-index 89c961175956d..20bbef992c486 100644
---- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c
-+++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
-@@ -21,6 +21,7 @@
- #include "../kselftest.h"
- #include "parse_vdso.h"
-+#include "vdso_config.h"
- #ifndef timespecsub
- #define       timespecsub(tsp, usp, vsp)                                      \
-@@ -100,15 +101,18 @@ static void vgetrandom_put_state(void *state)
- static void vgetrandom_init(void)
- {
-+      const char *version = versions[VDSO_VERSION];
-+      const char *name = names[VDSO_NAMES][6];
-       unsigned long sysinfo_ehdr = getauxval(AT_SYSINFO_EHDR);
-+
-       if (!sysinfo_ehdr) {
-               printf("AT_SYSINFO_EHDR is not present!\n");
-               exit(KSFT_SKIP);
-       }
-       vdso_init_from_sysinfo_ehdr(sysinfo_ehdr);
--      vgrnd.fn = (__typeof__(vgrnd.fn))vdso_sym("LINUX_2.6", "__vdso_getrandom");
-+      vgrnd.fn = (__typeof__(vgrnd.fn))vdso_sym(version, name);
-       if (!vgrnd.fn) {
--              printf("__vdso_getrandom is missing!\n");
-+              printf("%s is missing!\n", name);
-               exit(KSFT_FAIL);
-       }
-       if (vgrnd.fn(NULL, 0, 0, &vgrnd.params, ~0UL) != 0) {
--- 
-2.43.0
-
diff --git a/queue-6.11/selftests-vdso-simplify-getrandom-thread-local-stora.patch b/queue-6.11/selftests-vdso-simplify-getrandom-thread-local-stora.patch
deleted file mode 100644 (file)
index 75930bd..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-From c9b50796cf3a4d36922dd89158ddbf65c0d2009c Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 29 Jul 2024 18:02:11 +0200
-Subject: selftests: vDSO: simplify getrandom thread local storage and structs
-
-From: Jason A. Donenfeld <Jason@zx2c4.com>
-
-[ Upstream commit 01b52f01c5a6bdc3b3e4229dccc84ed667e6867b ]
-
-Rather than using pthread_get/set_specific, just use gcc's __thread
-annotation, which is noticeably faster and makes the code more obvious.
-
-Also, just have one simplified struct called vgrnd, instead of trying to
-split things up semantically. Those divisions were useful when this code
-was split across several commit *messages*, but doesn't make as much
-sense within a single file. This should make the code more clear and
-provide a better example for implementers.
-
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Stable-dep-of: 6eda706a535c ("selftests: vDSO: fix the way vDSO functions are called for powerpc")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- .../selftests/vDSO/vdso_test_getrandom.c      | 67 ++++++++-----------
- 1 file changed, 27 insertions(+), 40 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
-index 05122425a873f..89c961175956d 100644
---- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c
-+++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
-@@ -38,50 +38,43 @@ static struct {
-       pthread_mutex_t lock;
-       void **states;
-       size_t len, cap;
--} grnd_allocator = {
--      .lock = PTHREAD_MUTEX_INITIALIZER
--};
--
--static struct {
-       ssize_t(*fn)(void *, size_t, unsigned long, void *, size_t);
--      pthread_key_t key;
--      pthread_once_t initialized;
-       struct vgetrandom_opaque_params params;
--} grnd_ctx = {
--      .initialized = PTHREAD_ONCE_INIT
-+} vgrnd = {
-+      .lock = PTHREAD_MUTEX_INITIALIZER
- };
- static void *vgetrandom_get_state(void)
- {
-       void *state = NULL;
--      pthread_mutex_lock(&grnd_allocator.lock);
--      if (!grnd_allocator.len) {
-+      pthread_mutex_lock(&vgrnd.lock);
-+      if (!vgrnd.len) {
-               size_t page_size = getpagesize();
-               size_t new_cap;
-               size_t alloc_size, num = sysconf(_SC_NPROCESSORS_ONLN); /* Just a decent heuristic. */
-               void *new_block, *new_states;
--              alloc_size = (num * grnd_ctx.params.size_of_opaque_state + page_size - 1) & (~(page_size - 1));
--              num = (page_size / grnd_ctx.params.size_of_opaque_state) * (alloc_size / page_size);
--              new_block = mmap(0, alloc_size, grnd_ctx.params.mmap_prot, grnd_ctx.params.mmap_flags, -1, 0);
-+              alloc_size = (num * vgrnd.params.size_of_opaque_state + page_size - 1) & (~(page_size - 1));
-+              num = (page_size / vgrnd.params.size_of_opaque_state) * (alloc_size / page_size);
-+              new_block = mmap(0, alloc_size, vgrnd.params.mmap_prot, vgrnd.params.mmap_flags, -1, 0);
-               if (new_block == MAP_FAILED)
-                       goto out;
--              new_cap = grnd_allocator.cap + num;
--              new_states = reallocarray(grnd_allocator.states, new_cap, sizeof(*grnd_allocator.states));
-+              new_cap = vgrnd.cap + num;
-+              new_states = reallocarray(vgrnd.states, new_cap, sizeof(*vgrnd.states));
-               if (!new_states)
-                       goto unmap;
--              grnd_allocator.cap = new_cap;
--              grnd_allocator.states = new_states;
-+              vgrnd.cap = new_cap;
-+              vgrnd.states = new_states;
-               for (size_t i = 0; i < num; ++i) {
--                      if (((uintptr_t)new_block & (page_size - 1)) + grnd_ctx.params.size_of_opaque_state > page_size)
-+                      if (((uintptr_t)new_block & (page_size - 1)) + vgrnd.params.size_of_opaque_state > page_size)
-                               new_block = (void *)(((uintptr_t)new_block + page_size - 1) & (~(page_size - 1)));
--                      grnd_allocator.states[i] = new_block;
--                      new_block += grnd_ctx.params.size_of_opaque_state;
-+                      vgrnd.states[i] = new_block;
-+                      new_block += vgrnd.params.size_of_opaque_state;
-               }
--              grnd_allocator.len = num;
-+              vgrnd.len = num;
-               goto success;
-       unmap:
-@@ -89,10 +82,10 @@ static void *vgetrandom_get_state(void)
-               goto out;
-       }
- success:
--      state = grnd_allocator.states[--grnd_allocator.len];
-+      state = vgrnd.states[--vgrnd.len];
- out:
--      pthread_mutex_unlock(&grnd_allocator.lock);
-+      pthread_mutex_unlock(&vgrnd.lock);
-       return state;
- }
-@@ -100,27 +93,25 @@ static void vgetrandom_put_state(void *state)
- {
-       if (!state)
-               return;
--      pthread_mutex_lock(&grnd_allocator.lock);
--      grnd_allocator.states[grnd_allocator.len++] = state;
--      pthread_mutex_unlock(&grnd_allocator.lock);
-+      pthread_mutex_lock(&vgrnd.lock);
-+      vgrnd.states[vgrnd.len++] = state;
-+      pthread_mutex_unlock(&vgrnd.lock);
- }
- static void vgetrandom_init(void)
- {
--      if (pthread_key_create(&grnd_ctx.key, vgetrandom_put_state) != 0)
--              return;
-       unsigned long sysinfo_ehdr = getauxval(AT_SYSINFO_EHDR);
-       if (!sysinfo_ehdr) {
-               printf("AT_SYSINFO_EHDR is not present!\n");
-               exit(KSFT_SKIP);
-       }
-       vdso_init_from_sysinfo_ehdr(sysinfo_ehdr);
--      grnd_ctx.fn = (__typeof__(grnd_ctx.fn))vdso_sym("LINUX_2.6", "__vdso_getrandom");
--      if (!grnd_ctx.fn) {
-+      vgrnd.fn = (__typeof__(vgrnd.fn))vdso_sym("LINUX_2.6", "__vdso_getrandom");
-+      if (!vgrnd.fn) {
-               printf("__vdso_getrandom is missing!\n");
-               exit(KSFT_FAIL);
-       }
--      if (grnd_ctx.fn(NULL, 0, 0, &grnd_ctx.params, ~0UL) != 0) {
-+      if (vgrnd.fn(NULL, 0, 0, &vgrnd.params, ~0UL) != 0) {
-               printf("failed to fetch vgetrandom params!\n");
-               exit(KSFT_FAIL);
-       }
-@@ -128,22 +119,16 @@ static void vgetrandom_init(void)
- static ssize_t vgetrandom(void *buf, size_t len, unsigned long flags)
- {
--      void *state;
-+      static __thread void *state;
--      pthread_once(&grnd_ctx.initialized, vgetrandom_init);
--      state = pthread_getspecific(grnd_ctx.key);
-       if (!state) {
-               state = vgetrandom_get_state();
--              if (pthread_setspecific(grnd_ctx.key, state) != 0) {
--                      vgetrandom_put_state(state);
--                      state = NULL;
--              }
-               if (!state) {
-                       printf("vgetrandom_get_state failed!\n");
-                       exit(KSFT_FAIL);
-               }
-       }
--      return grnd_ctx.fn(buf, len, flags, state, grnd_ctx.params.size_of_opaque_state);
-+      return vgrnd.fn(buf, len, flags, state, vgrnd.params.size_of_opaque_state);
- }
- enum { TRIALS = 25000000, THREADS = 256 };
-@@ -265,6 +250,8 @@ static void usage(const char *argv0)
- int main(int argc, char *argv[])
- {
-+      vgetrandom_init();
-+
-       if (argc == 1) {
-               kselftest();
-               return 0;
--- 
-2.43.0
-
diff --git a/queue-6.11/selftests-vdso-skip-getrandom-test-if-architecture-i.patch b/queue-6.11/selftests-vdso-skip-getrandom-test-if-architecture-i.patch
deleted file mode 100644 (file)
index feac2c6..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-From 5b9342ad3069af81c4d7d7998a90e2066961a737 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 29 Aug 2024 20:23:23 +0200
-Subject: selftests: vDSO: skip getrandom test if architecture is unsupported
-
-From: Jason A. Donenfeld <Jason@zx2c4.com>
-
-[ Upstream commit f78280b1a3cedd9f68d5f596179675514a15bd1d ]
-
-If the getrandom test compiles for an arch, don't exit fatally if the
-actual cpu it's running on is unsupported.
-
-Suggested-by: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Stable-dep-of: 6eda706a535c ("selftests: vDSO: fix the way vDSO functions are called for powerpc")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_test_getrandom.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
-index 20bbef992c486..5db8ac8999cd0 100644
---- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c
-+++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
-@@ -104,6 +104,7 @@ static void vgetrandom_init(void)
-       const char *version = versions[VDSO_VERSION];
-       const char *name = names[VDSO_NAMES][6];
-       unsigned long sysinfo_ehdr = getauxval(AT_SYSINFO_EHDR);
-+      size_t ret;
-       if (!sysinfo_ehdr) {
-               printf("AT_SYSINFO_EHDR is not present!\n");
-@@ -115,7 +116,11 @@ static void vgetrandom_init(void)
-               printf("%s is missing!\n", name);
-               exit(KSFT_FAIL);
-       }
--      if (vgrnd.fn(NULL, 0, 0, &vgrnd.params, ~0UL) != 0) {
-+      ret = vgrnd.fn(NULL, 0, 0, &vgrnd.params, ~0UL);
-+      if (ret == -ENOSYS) {
-+              printf("unsupported architecture\n");
-+              exit(KSFT_SKIP);
-+      } else if (ret) {
-               printf("failed to fetch vgetrandom params!\n");
-               exit(KSFT_FAIL);
-       }
--- 
-2.43.0
-
diff --git a/queue-6.11/selftests-vdso-use-parse_vdso.h-in-vdso_test_abi.patch b/queue-6.11/selftests-vdso-use-parse_vdso.h-in-vdso_test_abi.patch
deleted file mode 100644 (file)
index 894b786..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-From ab1ae916ae0ae8e8241fa0297f11b7b7973d6e32 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:39 +0200
-Subject: selftests: vDSO: use parse_vdso.h in vdso_test_abi
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit f0d0dbbc101a5ed2cd844eae0c2cc0546327ef89 ]
-
-Don't duplicate parse_vdso function prototypes, include
-the header instead.
-
-Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_test_abi.c | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_test_abi.c b/tools/testing/selftests/vDSO/vdso_test_abi.c
-index 00034208c4c64..a54424e2336f4 100644
---- a/tools/testing/selftests/vDSO/vdso_test_abi.c
-+++ b/tools/testing/selftests/vDSO/vdso_test_abi.c
-@@ -21,10 +21,7 @@
- #include "../kselftest.h"
- #include "vdso_config.h"
- #include "vdso_call.h"
--
--extern void *vdso_sym(const char *version, const char *name);
--extern void vdso_init_from_sysinfo_ehdr(uintptr_t base);
--extern void vdso_init_from_auxv(void *auxv);
-+#include "parse_vdso.h"
- static const char *version;
- static const char **name;
--- 
-2.43.0
-
index f61944aaa69fd4d8070571a7e65b217625be23a8..a72f094f25f8ba074e3d7dd0dee3add7373ca834 100644 (file)
@@ -223,14 +223,6 @@ drm-mediatek-use-spin_lock_irqsave-for-crtc-event-lo.patch
 powerpc-8xx-fix-initial-memory-mapping.patch
 powerpc-8xx-fix-kernel-vs-user-address-comparison.patch
 powerpc-vdso-inconditionally-use-cfunc-macro.patch
-selftests-vdso-fix-vdso-name-for-powerpc.patch
-selftests-vdso-fix-vdso_config-for-powerpc.patch
-selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
-selftests-vdso-simplify-getrandom-thread-local-stora.patch
-selftests-vdso-look-for-arch-specific-function-name-.patch
-selftests-vdso-skip-getrandom-test-if-architecture-i.patch
-selftests-vdso-fix-the-way-vdso-functions-are-called.patch
-selftests-vdso-use-parse_vdso.h-in-vdso_test_abi.patch
 drm-msm-use-a7xx-family-directly-in-gpu_state.patch
 drm-msm-dump-correct-dbgahb-clusters-on-a750.patch
 drm-msm-fix-cp_bv_draw_state_addr-name.patch
@@ -256,9 +248,6 @@ xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-add-capability-to-remap-non-ram-pages-to-differe.patch
 xen-tolerate-acpi-nvs-memory-overlapping-with-xen-al.patch
 drm-xe-fix-missing-xe_vm_put.patch
-powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch
-selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch
-selftests-vdso-fix-vdso_config-for-s390.patch
 xen-swiotlb-add-alignment-check-for-dma-buffers.patch
 xen-swiotlb-fix-allocated-size.patch
 tpm-clean-up-tpm-space-after-command-failure.patch
diff --git a/queue-6.6/powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch b/queue-6.6/powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch
deleted file mode 100644 (file)
index 15fe6ae..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-From ebf1881f875c5fabb8ed493d462d46999d520b95 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 6 Sep 2024 10:33:43 +0200
-Subject: powerpc/vdso: Fix VDSO data access when running in a non-root time
- namespace
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit c73049389e58c01e2e3bbfae900c8daeee177191 ]
-
-When running in a non-root time namespace, the global VDSO data page
-is replaced by a dedicated namespace data page and the global data
-page is mapped next to it. Detailed explanations can be found at
-commit 660fd04f9317 ("lib/vdso: Prepare for time namespace support").
-
-When it happens, __kernel_get_syscall_map and __kernel_get_tbfreq
-and __kernel_sync_dicache don't work anymore because they read 0
-instead of the data they need.
-
-To address that, clock_mode has to be read. When it is set to
-VDSO_CLOCKMODE_TIMENS, it means it is a dedicated namespace data page
-and the global data is located on the following page.
-
-Add a macro called get_realdatapage which reads clock_mode and add
-PAGE_SIZE to the pointer provided by get_datapage macro when
-clock_mode is equal to VDSO_CLOCKMODE_TIMENS. Use this new macro
-instead of get_datapage macro except for time functions as they handle
-it internally.
-
-Fixes: 74205b3fc2ef ("powerpc/vdso: Add support for time namespaces")
-Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Closes: https://lore.kernel.org/all/ZtnYqZI-nrsNslwy@zx2c4.com/
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Michael Ellerman <mpe@ellerman.id.au>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/powerpc/include/asm/vdso_datapage.h | 15 +++++++++++++++
- arch/powerpc/kernel/asm-offsets.c        |  2 ++
- arch/powerpc/kernel/vdso/cacheflush.S    |  2 +-
- arch/powerpc/kernel/vdso/datapage.S      |  4 ++--
- 4 files changed, 20 insertions(+), 3 deletions(-)
-
-diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch/powerpc/include/asm/vdso_datapage.h
-index a585c8e538ff0..939daf6b695ef 100644
---- a/arch/powerpc/include/asm/vdso_datapage.h
-+++ b/arch/powerpc/include/asm/vdso_datapage.h
-@@ -111,6 +111,21 @@ extern struct vdso_arch_data *vdso_data;
-       addi    \ptr, \ptr, (_vdso_datapage - 999b)@l
- .endm
-+#include <asm/asm-offsets.h>
-+#include <asm/page.h>
-+
-+.macro get_realdatapage ptr scratch
-+      get_datapage \ptr
-+#ifdef CONFIG_TIME_NS
-+      lwz     \scratch, VDSO_CLOCKMODE_OFFSET(\ptr)
-+      xoris   \scratch, \scratch, VDSO_CLOCKMODE_TIMENS@h
-+      xori    \scratch, \scratch, VDSO_CLOCKMODE_TIMENS@l
-+      cntlzw  \scratch, \scratch
-+      rlwinm  \scratch, \scratch, PAGE_SHIFT - 5, 1 << PAGE_SHIFT
-+      add     \ptr, \ptr, \scratch
-+#endif
-+.endm
-+
- #endif /* __ASSEMBLY__ */
- #endif /* __KERNEL__ */
-diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
-index 9f14d95b8b32f..2affd30468bc4 100644
---- a/arch/powerpc/kernel/asm-offsets.c
-+++ b/arch/powerpc/kernel/asm-offsets.c
-@@ -348,6 +348,8 @@ int main(void)
- #else
-       OFFSET(CFG_SYSCALL_MAP32, vdso_arch_data, syscall_map);
- #endif
-+      OFFSET(VDSO_CLOCKMODE_OFFSET, vdso_arch_data, data[0].clock_mode);
-+      DEFINE(VDSO_CLOCKMODE_TIMENS, VDSO_CLOCKMODE_TIMENS);
- #ifdef CONFIG_BUG
-       DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry));
-diff --git a/arch/powerpc/kernel/vdso/cacheflush.S b/arch/powerpc/kernel/vdso/cacheflush.S
-index 0085ae464dac9..3b2479bd2f9a1 100644
---- a/arch/powerpc/kernel/vdso/cacheflush.S
-+++ b/arch/powerpc/kernel/vdso/cacheflush.S
-@@ -30,7 +30,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
- #ifdef CONFIG_PPC64
-       mflr    r12
-   .cfi_register lr,r12
--      get_datapage    r10
-+      get_realdatapage        r10, r11
-       mtlr    r12
-   .cfi_restore        lr
- #endif
-diff --git a/arch/powerpc/kernel/vdso/datapage.S b/arch/powerpc/kernel/vdso/datapage.S
-index db8e167f01667..2b19b6201a33a 100644
---- a/arch/powerpc/kernel/vdso/datapage.S
-+++ b/arch/powerpc/kernel/vdso/datapage.S
-@@ -28,7 +28,7 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
-       mflr    r12
-   .cfi_register lr,r12
-       mr.     r4,r3
--      get_datapage    r3
-+      get_realdatapage        r3, r11
-       mtlr    r12
- #ifdef __powerpc64__
-       addi    r3,r3,CFG_SYSCALL_MAP64
-@@ -52,7 +52,7 @@ V_FUNCTION_BEGIN(__kernel_get_tbfreq)
-   .cfi_startproc
-       mflr    r12
-   .cfi_register lr,r12
--      get_datapage    r3
-+      get_realdatapage        r3, r11
- #ifndef __powerpc64__
-       lwz     r4,(CFG_TB_TICKS_PER_SEC + 4)(r3)
- #endif
--- 
-2.43.0
-
diff --git a/queue-6.6/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch b/queue-6.6/selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch
deleted file mode 100644 (file)
index 48bb1b7..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-From 9d402700dfe83b8bb2dde9ce0593e7f9f0eae152 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 11 Sep 2024 10:50:14 +0200
-Subject: selftests: vDSO: fix ELF hash table entry size for s390x
-
-From: Jens Remus <jremus@linux.ibm.com>
-
-[ Upstream commit 14be4e6f35221c4731b004553ecf7cbc6dc1d2d8 ]
-
-The vDSO self tests fail on s390x for a vDSO linked with the GNU linker
-ld as follows:
-
-  # ./vdso_test_gettimeofday
-  Floating point exception (core dumped)
-
-On s390x the ELF hash table entries are 64 bits instead of 32 bits in
-size (see Glibc sysdeps/unix/sysv/linux/s390/bits/elfclass.h).
-
-Fixes: 40723419f407 ("kselftest: Enable vDSO test on non x86 platforms")
-Reported-by: Heiko Carstens <hca@linux.ibm.com>
-Tested-by: Heiko Carstens <hca@linux.ibm.com>
-Signed-off-by: Jens Remus <jremus@linux.ibm.com>
-Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/parse_vdso.c | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
-index d9ccc5acac182..7dd5668ea8a6e 100644
---- a/tools/testing/selftests/vDSO/parse_vdso.c
-+++ b/tools/testing/selftests/vDSO/parse_vdso.c
-@@ -36,6 +36,12 @@
- #define ELF_BITS_XFORM(bits, x) ELF_BITS_XFORM2(bits, x)
- #define ELF(x) ELF_BITS_XFORM(ELF_BITS, x)
-+#ifdef __s390x__
-+#define ELF_HASH_ENTRY ELF(Xword)
-+#else
-+#define ELF_HASH_ENTRY ELF(Word)
-+#endif
-+
- static struct vdso_info
- {
-       bool valid;
-@@ -47,8 +53,8 @@ static struct vdso_info
-       /* Symbol table */
-       ELF(Sym) *symtab;
-       const char *symstrings;
--      ELF(Word) *bucket, *chain;
--      ELF(Word) nbucket, nchain;
-+      ELF_HASH_ENTRY *bucket, *chain;
-+      ELF_HASH_ENTRY nbucket, nchain;
-       /* Version table */
-       ELF(Versym) *versym;
-@@ -115,7 +121,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
-       /*
-        * Fish out the useful bits of the dynamic table.
-        */
--      ELF(Word) *hash = 0;
-+      ELF_HASH_ENTRY *hash = 0;
-       vdso_info.symstrings = 0;
-       vdso_info.symtab = 0;
-       vdso_info.versym = 0;
-@@ -133,7 +139,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
-                                + vdso_info.load_offset);
-                       break;
-               case DT_HASH:
--                      hash = (ELF(Word) *)
-+                      hash = (ELF_HASH_ENTRY *)
-                               ((uintptr_t)dyn[i].d_un.d_ptr
-                                + vdso_info.load_offset);
-                       break;
--- 
-2.43.0
-
diff --git a/queue-6.6/selftests-vdso-fix-vdso-name-for-powerpc.patch b/queue-6.6/selftests-vdso-fix-vdso-name-for-powerpc.patch
deleted file mode 100644 (file)
index d38b6bc..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From 166d2ee5aa54eb850008cdb3f3cce88c41c467d0 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:35 +0200
-Subject: selftests: vDSO: fix vDSO name for powerpc
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit 59eb856c3ed9b3552befd240c0c339f22eed3fa1 ]
-
-Following error occurs when running vdso_test_correctness on powerpc:
-
-~ # ./vdso_test_correctness
-[WARN] failed to find vDSO
-[SKIP] No vDSO, so skipping clock_gettime() tests
-[SKIP] No vDSO, so skipping clock_gettime64() tests
-[RUN]  Testing getcpu...
-[OK]   CPU 0: syscall: cpu 0, node 0
-
-On powerpc, vDSO is neither called linux-vdso.so.1 nor linux-gate.so.1
-but linux-vdso32.so.1 or linux-vdso64.so.1.
-
-Also search those two names before giving up.
-
-Fixes: c7e5789b24d3 ("kselftest: Move test_vdso to the vDSO test suite")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_test_correctness.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_test_correctness.c b/tools/testing/selftests/vDSO/vdso_test_correctness.c
-index e691a3cf14911..cdb697ae8343c 100644
---- a/tools/testing/selftests/vDSO/vdso_test_correctness.c
-+++ b/tools/testing/selftests/vDSO/vdso_test_correctness.c
-@@ -114,6 +114,12 @@ static void fill_function_pointers()
-       if (!vdso)
-               vdso = dlopen("linux-gate.so.1",
-                             RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-+      if (!vdso)
-+              vdso = dlopen("linux-vdso32.so.1",
-+                            RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-+      if (!vdso)
-+              vdso = dlopen("linux-vdso64.so.1",
-+                            RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
-       if (!vdso) {
-               printf("[WARN]\tfailed to find vDSO\n");
-               return;
--- 
-2.43.0
-
diff --git a/queue-6.6/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch b/queue-6.6/selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
deleted file mode 100644 (file)
index 61c9673..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-From 9aef4348988667cca5680d32907fe6db79f8875e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:37 +0200
-Subject: selftests: vDSO: fix vDSO symbols lookup for powerpc64
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit ba83b3239e657469709d15dcea5f9b65bf9dbf34 ]
-
-On powerpc64, following tests fail locating vDSO functions:
-
-  ~ # ./vdso_test_abi
-  TAP version 13
-  1..16
-  # [vDSO kselftest] VDSO_VERSION: LINUX_2.6.15
-  # Couldn't find __kernel_gettimeofday
-  ok 1 # SKIP __kernel_gettimeofday
-  # clock_id: CLOCK_REALTIME
-  # Couldn't find __kernel_clock_gettime
-  ok 2 # SKIP __kernel_clock_gettime CLOCK_REALTIME
-  # Couldn't find __kernel_clock_getres
-  ok 3 # SKIP __kernel_clock_getres CLOCK_REALTIME
-  ...
-  # Couldn't find __kernel_time
-  ok 16 # SKIP __kernel_time
-  # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:16 error:0
-
-  ~ # ./vdso_test_getrandom
-  __kernel_getrandom is missing!
-
-  ~ # ./vdso_test_gettimeofday
-  Could not find __kernel_gettimeofday
-
-  ~ # ./vdso_test_getcpu
-  Could not find __kernel_getcpu
-
-On powerpc64, as shown below by readelf, vDSO functions symbols have
-type NOTYPE, so also accept that type when looking for symbols.
-
-$ powerpc64-linux-gnu-readelf -a arch/powerpc/kernel/vdso/vdso64.so.dbg
-ELF Header:
-  Magic:   7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
-  Class:                             ELF64
-  Data:                              2's complement, big endian
-  Version:                           1 (current)
-  OS/ABI:                            UNIX - System V
-  ABI Version:                       0
-  Type:                              DYN (Shared object file)
-  Machine:                           PowerPC64
-  Version:                           0x1
-...
-
-Symbol table '.dynsym' contains 12 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
-     1: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     2: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     3: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     4: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-     5: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     6: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     7: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     8: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-     9: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    10: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-    11: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __[...]@@LINUX_2.6.15
-
-Symbol table '.symtab' contains 56 entries:
-   Num:    Value          Size Type    Bind   Vis      Ndx Name
-...
-    45: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LINUX_2.6.15
-    46: 00000000000006c0    48 NOTYPE  GLOBAL DEFAULT    8 __kernel_getcpu
-    47: 0000000000000524    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_getres
-    48: 00000000000005f0    36 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_tbfreq
-    49: 000000000000047c    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_gettimeofday
-    50: 0000000000000614   172 NOTYPE  GLOBAL DEFAULT    8 __kernel_sync_dicache
-    51: 00000000000006f0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_getrandom
-    52: 0000000000000454    12 NOTYPE  GLOBAL DEFAULT    8 __kernel_sigtram[...]
-    53: 0000000000000578    68 NOTYPE  GLOBAL DEFAULT    8 __kernel_time
-    54: 00000000000004d0    84 NOTYPE  GLOBAL DEFAULT    8 __kernel_clock_g[...]
-    55: 00000000000005bc    52 NOTYPE  GLOBAL DEFAULT    8 __kernel_get_sys[...]
-
-Fixes: 98eedc3a9dbf ("Document the vDSO and add a reference parser")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/parse_vdso.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
-index 4ae417372e9eb..d9ccc5acac182 100644
---- a/tools/testing/selftests/vDSO/parse_vdso.c
-+++ b/tools/testing/selftests/vDSO/parse_vdso.c
-@@ -216,7 +216,8 @@ void *vdso_sym(const char *version, const char *name)
-               ELF(Sym) *sym = &vdso_info.symtab[chain];
-               /* Check for a defined global or weak function w/ right name. */
--              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC)
-+              if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC &&
-+                  ELF64_ST_TYPE(sym->st_info) != STT_NOTYPE)
-                       continue;
-               if (ELF64_ST_BIND(sym->st_info) != STB_GLOBAL &&
-                   ELF64_ST_BIND(sym->st_info) != STB_WEAK)
--- 
-2.43.0
-
diff --git a/queue-6.6/selftests-vdso-fix-vdso_config-for-powerpc.patch b/queue-6.6/selftests-vdso-fix-vdso_config-for-powerpc.patch
deleted file mode 100644 (file)
index d1b319d..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From 080db579723fce6cd95f30a61a0818d0e66deafa Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 30 Aug 2024 14:28:36 +0200
-Subject: selftests: vDSO: fix vdso_config for powerpc
-
-From: Christophe Leroy <christophe.leroy@csgroup.eu>
-
-[ Upstream commit 7d297c419b08eafa69ce27243ee9bbecab4fcaa4 ]
-
-Running vdso_test_correctness on powerpc64 gives the following warning:
-
-  ~ # ./vdso_test_correctness
-  Warning: failed to find clock_gettime64 in vDSO
-
-This is because vdso_test_correctness was built with VDSO_32BIT defined.
-
-__powerpc__ macro is defined on both powerpc32 and powerpc64 so
-__powerpc64__ needs to be checked first in vdso_config.h
-
-Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
-Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-Acked-by: Shuah Khan <skhan@linuxfoundation.org>
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_config.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
-index cdfed403ba13f..f9890584f6fb4 100644
---- a/tools/testing/selftests/vDSO/vdso_config.h
-+++ b/tools/testing/selftests/vDSO/vdso_config.h
-@@ -18,13 +18,13 @@
- #elif defined(__aarch64__)
- #define VDSO_VERSION          3
- #define VDSO_NAMES            0
--#elif defined(__powerpc__)
-+#elif defined(__powerpc64__)
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
--#define VDSO_32BIT            1
--#elif defined(__powerpc64__)
-+#elif defined(__powerpc__)
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
-+#define VDSO_32BIT            1
- #elif defined (__s390__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
--- 
-2.43.0
-
diff --git a/queue-6.6/selftests-vdso-fix-vdso_config-for-s390.patch b/queue-6.6/selftests-vdso-fix-vdso_config-for-s390.patch
deleted file mode 100644 (file)
index 6970d42..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-From 6d67407c45b91f1163950660787c72b2b90bba87 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 11 Sep 2024 10:50:15 +0200
-Subject: selftests: vDSO: fix vdso_config for s390
-
-From: Heiko Carstens <hca@linux.ibm.com>
-
-[ Upstream commit a6e23fb8d3c0e3904da70beaf5d7e840a983c97f ]
-
-Running vdso_test_correctness on s390x (aka s390 64 bit) emits a warning:
-
-Warning: failed to find clock_gettime64 in vDSO
-
-This is caused by the "#elif defined (__s390__)" check in vdso_config.h
-which the defines VDSO_32BIT.
-
-If __s390x__ is defined also __s390__ is defined. Therefore the correct
-check must make sure that only __s390__ is defined.
-
-Therefore add the missing !defined(__s390x__). Also use common
-__s390x__ define instead of __s390X__.
-
-Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest")
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/testing/selftests/vDSO/vdso_config.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
-index f9890584f6fb4..72de45f587b2c 100644
---- a/tools/testing/selftests/vDSO/vdso_config.h
-+++ b/tools/testing/selftests/vDSO/vdso_config.h
-@@ -25,11 +25,11 @@
- #define VDSO_VERSION          1
- #define VDSO_NAMES            0
- #define VDSO_32BIT            1
--#elif defined (__s390__)
-+#elif defined (__s390__) && !defined(__s390x__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
- #define VDSO_32BIT            1
--#elif defined (__s390X__)
-+#elif defined (__s390x__)
- #define VDSO_VERSION          2
- #define VDSO_NAMES            0
- #elif defined(__mips__)
--- 
-2.43.0
-
index ef6b0fcc972267548ffc4808cdd8973f3c38641f..700094a4437ee8bc89db587e4b68c520ee23af01 100644 (file)
@@ -155,9 +155,6 @@ drm-mediatek-use-spin_lock_irqsave-for-crtc-event-lo.patch
 powerpc-8xx-fix-initial-memory-mapping.patch
 powerpc-8xx-fix-kernel-vs-user-address-comparison.patch
 powerpc-vdso-inconditionally-use-cfunc-macro.patch
-selftests-vdso-fix-vdso-name-for-powerpc.patch
-selftests-vdso-fix-vdso_config-for-powerpc.patch
-selftests-vdso-fix-vdso-symbols-lookup-for-powerpc64.patch
 drm-msm-fix-incorrect-file-name-output-in-adreno_req.patch
 drm-msm-a5xx-disable-preemption-in-submits-by-defaul.patch
 drm-msm-a5xx-properly-clear-preemption-records-on-re.patch
@@ -176,9 +173,6 @@ xen-introduce-generic-helper-checking-for-memory-map.patch
 xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-add-capability-to-remap-non-ram-pages-to-differe.patch
 xen-tolerate-acpi-nvs-memory-overlapping-with-xen-al.patch
-powerpc-vdso-fix-vdso-data-access-when-running-in-a-.patch
-selftests-vdso-fix-elf-hash-table-entry-size-for-s39.patch
-selftests-vdso-fix-vdso_config-for-s390.patch
 xen-swiotlb-add-alignment-check-for-dma-buffers.patch
 xen-swiotlb-fix-allocated-size.patch
 tpm-clean-up-tpm-space-after-command-failure.patch