]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop broken selftests patch from 6.1 and 6.4
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Aug 2023 06:53:52 +0000 (08:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Aug 2023 06:53:52 +0000 (08:53 +0200)
queue-6.1/selftests-rseq-play-nice-with-binaries-statically-linked-against-glibc-2.35.patch [deleted file]
queue-6.1/series
queue-6.4/selftests-rseq-play-nice-with-binaries-statically-linked-against-glibc-2.35.patch [deleted file]
queue-6.4/series

diff --git a/queue-6.1/selftests-rseq-play-nice-with-binaries-statically-linked-against-glibc-2.35.patch b/queue-6.1/selftests-rseq-play-nice-with-binaries-statically-linked-against-glibc-2.35.patch
deleted file mode 100644 (file)
index 36574b3..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-From 3bcbc20942db5d738221cca31a928efc09827069 Mon Sep 17 00:00:00 2001
-From: Sean Christopherson <seanjc@google.com>
-Date: Fri, 21 Jul 2023 15:33:52 -0700
-Subject: selftests/rseq: Play nice with binaries statically linked against glibc 2.35+
-
-From: Sean Christopherson <seanjc@google.com>
-
-commit 3bcbc20942db5d738221cca31a928efc09827069 upstream.
-
-To allow running rseq and KVM's rseq selftests as statically linked
-binaries, initialize the various "trampoline" pointers to point directly
-at the expect glibc symbols, and skip the dlysm() lookups if the rseq
-size is non-zero, i.e. the binary is statically linked *and* the libc
-registered its own rseq.
-
-Define weak versions of the symbols so as not to break linking against
-libc versions that don't support rseq in any capacity.
-
-The KVM selftests in particular are often statically linked so that they
-can be run on targets with very limited runtime environments, i.e. test
-machines.
-
-Fixes: 233e667e1ae3 ("selftests/rseq: Uplift rseq selftests for compatibility with glibc-2.35")
-Cc: Aaron Lewis <aaronlewis@google.com>
-Cc: kvm@vger.kernel.org
-Cc: stable@vger.kernel.org
-Signed-off-by: Sean Christopherson <seanjc@google.com>
-Message-Id: <20230721223352.2333911-1-seanjc@google.com>
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- tools/testing/selftests/rseq/rseq.c |   28 ++++++++++++++++++++++------
- 1 file changed, 22 insertions(+), 6 deletions(-)
-
---- a/tools/testing/selftests/rseq/rseq.c
-+++ b/tools/testing/selftests/rseq/rseq.c
-@@ -32,9 +32,17 @@
- #include "../kselftest.h"
- #include "rseq.h"
--static const ptrdiff_t *libc_rseq_offset_p;
--static const unsigned int *libc_rseq_size_p;
--static const unsigned int *libc_rseq_flags_p;
-+/*
-+ * Define weak versions to play nice with binaries that are statically linked
-+ * against a libc that doesn't support registering its own rseq.
-+ */
-+__weak ptrdiff_t __rseq_offset;
-+__weak unsigned int __rseq_size;
-+__weak unsigned int __rseq_flags;
-+
-+static const ptrdiff_t *libc_rseq_offset_p = &__rseq_offset;
-+static const unsigned int *libc_rseq_size_p = &__rseq_size;
-+static const unsigned int *libc_rseq_flags_p = &__rseq_flags;
- /* Offset from the thread pointer to the rseq area.  */
- ptrdiff_t rseq_offset;
-@@ -108,9 +116,17 @@ int rseq_unregister_current_thread(void)
- static __attribute__((constructor))
- void rseq_init(void)
- {
--      libc_rseq_offset_p = dlsym(RTLD_NEXT, "__rseq_offset");
--      libc_rseq_size_p = dlsym(RTLD_NEXT, "__rseq_size");
--      libc_rseq_flags_p = dlsym(RTLD_NEXT, "__rseq_flags");
-+      /*
-+       * If the libc's registered rseq size isn't already valid, it may be
-+       * because the binary is dynamically linked and not necessarily due to
-+       * libc not having registered a restartable sequence.  Try to find the
-+       * symbols if that's the case.
-+       */
-+      if (!*libc_rseq_size_p) {
-+              libc_rseq_offset_p = dlsym(RTLD_NEXT, "__rseq_offset");
-+              libc_rseq_size_p = dlsym(RTLD_NEXT, "__rseq_size");
-+              libc_rseq_flags_p = dlsym(RTLD_NEXT, "__rseq_flags");
-+      }
-       if (libc_rseq_size_p && libc_rseq_offset_p && libc_rseq_flags_p &&
-                       *libc_rseq_size_p != 0) {
-               /* rseq registration owned by glibc */
index 9ba5bde488265fb269f1ebeb4394222bd4199c8a..a976268512e71460185bfc03ce450d4244e6982d 100644 (file)
@@ -195,7 +195,6 @@ virtio-net-fix-race-between-set-queues-and-probe.patch
 net-dsa-qca8k-fix-search_and_insert-wrong-handling-of-new-rule.patch
 net-dsa-qca8k-fix-broken-search_and_del.patch
 net-dsa-qca8k-fix-mdb-add-del-case-with-0-vid.patch
-selftests-rseq-play-nice-with-binaries-statically-linked-against-glibc-2.35.patch
 selftests-mptcp-join-only-check-for-ip6tables-if-needed.patch
 soundwire-fix-enumeration-completion.patch
 revert-um-use-swap-to-make-code-cleaner.patch
diff --git a/queue-6.4/selftests-rseq-play-nice-with-binaries-statically-linked-against-glibc-2.35.patch b/queue-6.4/selftests-rseq-play-nice-with-binaries-statically-linked-against-glibc-2.35.patch
deleted file mode 100644 (file)
index 7c18798..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-From 3bcbc20942db5d738221cca31a928efc09827069 Mon Sep 17 00:00:00 2001
-From: Sean Christopherson <seanjc@google.com>
-Date: Fri, 21 Jul 2023 15:33:52 -0700
-Subject: selftests/rseq: Play nice with binaries statically linked against glibc 2.35+
-
-From: Sean Christopherson <seanjc@google.com>
-
-commit 3bcbc20942db5d738221cca31a928efc09827069 upstream.
-
-To allow running rseq and KVM's rseq selftests as statically linked
-binaries, initialize the various "trampoline" pointers to point directly
-at the expect glibc symbols, and skip the dlysm() lookups if the rseq
-size is non-zero, i.e. the binary is statically linked *and* the libc
-registered its own rseq.
-
-Define weak versions of the symbols so as not to break linking against
-libc versions that don't support rseq in any capacity.
-
-The KVM selftests in particular are often statically linked so that they
-can be run on targets with very limited runtime environments, i.e. test
-machines.
-
-Fixes: 233e667e1ae3 ("selftests/rseq: Uplift rseq selftests for compatibility with glibc-2.35")
-Cc: Aaron Lewis <aaronlewis@google.com>
-Cc: kvm@vger.kernel.org
-Cc: stable@vger.kernel.org
-Signed-off-by: Sean Christopherson <seanjc@google.com>
-Message-Id: <20230721223352.2333911-1-seanjc@google.com>
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- tools/testing/selftests/rseq/rseq.c |   28 ++++++++++++++++++++++------
- 1 file changed, 22 insertions(+), 6 deletions(-)
-
---- a/tools/testing/selftests/rseq/rseq.c
-+++ b/tools/testing/selftests/rseq/rseq.c
-@@ -34,9 +34,17 @@
- #include "../kselftest.h"
- #include "rseq.h"
--static const ptrdiff_t *libc_rseq_offset_p;
--static const unsigned int *libc_rseq_size_p;
--static const unsigned int *libc_rseq_flags_p;
-+/*
-+ * Define weak versions to play nice with binaries that are statically linked
-+ * against a libc that doesn't support registering its own rseq.
-+ */
-+__weak ptrdiff_t __rseq_offset;
-+__weak unsigned int __rseq_size;
-+__weak unsigned int __rseq_flags;
-+
-+static const ptrdiff_t *libc_rseq_offset_p = &__rseq_offset;
-+static const unsigned int *libc_rseq_size_p = &__rseq_size;
-+static const unsigned int *libc_rseq_flags_p = &__rseq_flags;
- /* Offset from the thread pointer to the rseq area. */
- ptrdiff_t rseq_offset;
-@@ -155,9 +163,17 @@ unsigned int get_rseq_feature_size(void)
- static __attribute__((constructor))
- void rseq_init(void)
- {
--      libc_rseq_offset_p = dlsym(RTLD_NEXT, "__rseq_offset");
--      libc_rseq_size_p = dlsym(RTLD_NEXT, "__rseq_size");
--      libc_rseq_flags_p = dlsym(RTLD_NEXT, "__rseq_flags");
-+      /*
-+       * If the libc's registered rseq size isn't already valid, it may be
-+       * because the binary is dynamically linked and not necessarily due to
-+       * libc not having registered a restartable sequence.  Try to find the
-+       * symbols if that's the case.
-+       */
-+      if (!*libc_rseq_size_p) {
-+              libc_rseq_offset_p = dlsym(RTLD_NEXT, "__rseq_offset");
-+              libc_rseq_size_p = dlsym(RTLD_NEXT, "__rseq_size");
-+              libc_rseq_flags_p = dlsym(RTLD_NEXT, "__rseq_flags");
-+      }
-       if (libc_rseq_size_p && libc_rseq_offset_p && libc_rseq_flags_p &&
-                       *libc_rseq_size_p != 0) {
-               /* rseq registration owned by glibc */
index ea6418716e2495c1e211bc82d64919d21b054a81..a2df6419140c4ff1c321e90afef25d99ef93a848 100644 (file)
@@ -203,7 +203,6 @@ net-dsa-qca8k-fix-broken-search_and_del.patch
 net-dsa-qca8k-fix-mdb-add-del-case-with-0-vid.patch
 io_uring-gate-iowait-schedule-on-having-pending-requests.patch
 iommufd-set-end-correctly-when-doing-batch-carry.patch
-selftests-rseq-play-nice-with-binaries-statically-linked-against-glibc-2.35.patch
 selftests-mptcp-join-only-check-for-ip6tables-if-needed.patch
 soundwire-fix-enumeration-completion.patch
 revert-um-use-swap-to-make-code-cleaner.patch