public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/qt:master commit in: dev-qt/qtwebengine/, dev-qt/qtwebengine/files/
Date: Thu, 30 Sep 2021 11:35:28 +0000 (UTC)	[thread overview]
Message-ID: <1632998424.58b8abb62752a4d0b7ebb920afc25ce383bbfa45.asturm@gentoo> (raw)

commit:     58b8abb62752a4d0b7ebb920afc25ce383bbfa45
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  6 17:59:33 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Sep 30 10:40:24 2021 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=58b8abb6

dev-qt/qtwebengine: Add Fedora patch for GLIBC-2.33

(sync with Gentoo ebuild repository)

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../qtwebengine-5.15.2_p20210406-glibc-2.33.patch  | 141 +++++++++++++++++++++
 dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild  |   1 +
 2 files changed, 142 insertions(+)

diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210406-glibc-2.33.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210406-glibc-2.33.patch
new file mode 100644
index 00000000..cb90428e
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210406-glibc-2.33.patch
@@ -0,0 +1,141 @@
+diff -up b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+@@ -257,6 +257,18 @@ ResultExpr EvaluateSyscallImpl(int fs_de
+     return RestrictKillTarget(current_pid, sysno);
+   }
+ 
++#if defined(__NR_newfstatat)
++  if (sysno == __NR_newfstatat) {
++    return RewriteFstatatSIGSYS();
++  }
++#endif
++
++#if defined(__NR_fstatat64)
++  if (sysno == __NR_fstatat64) {
++    return RewriteFstatatSIGSYS();
++  }
++#endif
++
+   if (SyscallSets::IsFileSystem(sysno) ||
+       SyscallSets::IsCurrentDirectory(sysno)) {
+     return Error(fs_denied_errno);
+diff -up b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
+--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
+@@ -6,6 +6,8 @@
+ 
+ #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h"
+ 
++#include <errno.h>
++#include <fcntl.h>
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <string.h>
+@@ -355,6 +357,35 @@ intptr_t SIGSYSSchedHandler(const struct
+   return -ENOSYS;
+ }
+ 
++intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args,
++                              void* aux) {
++  switch (args.nr) {
++#if defined(__NR_newfstatat)
++    case __NR_newfstatat:
++#endif
++#if defined(__NR_fstatat64)
++    case __NR_fstatat64:
++#endif
++#if defined(__NR_newfstatat) || defined(__NR_fstatat64)
++      if (*reinterpret_cast<const char *>(args.args[1]) == '\0'
++          && args.args[3] == static_cast<uint64_t>(AT_EMPTY_PATH)) {
++        return sandbox::sys_fstat64(static_cast<int>(args.args[0]),
++                                    reinterpret_cast<struct stat64 *>(args.args[2]));
++      } else {
++        errno = EACCES;
++        return -1;
++      }
++      break;
++#endif
++  }
++
++  CrashSIGSYS_Handler(args, aux);
++
++  // Should never be reached.
++  RAW_CHECK(false);
++  return -ENOSYS;
++}
++
+ bpf_dsl::ResultExpr CrashSIGSYS() {
+   return bpf_dsl::Trap(CrashSIGSYS_Handler, NULL);
+ }
+@@ -387,6 +418,10 @@ bpf_dsl::ResultExpr RewriteSchedSIGSYS()
+   return bpf_dsl::Trap(SIGSYSSchedHandler, NULL);
+ }
+ 
++bpf_dsl::ResultExpr RewriteFstatatSIGSYS() {
++  return bpf_dsl::Trap(SIGSYSFstatatHandler, NULL);
++}
++
+ void AllocateCrashKeys() {
+ #if !defined(OS_NACL_NONSFI)
+   if (seccomp_crash_key)
+diff -up b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h
+--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h
++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h
+@@ -62,6 +62,10 @@ SANDBOX_EXPORT intptr_t SIGSYSPtraceFail
+ // sched_setparam(), sched_setscheduler()
+ SANDBOX_EXPORT intptr_t SIGSYSSchedHandler(const arch_seccomp_data& args,
+                                            void* aux);
++// If the fstatat syscall is actually a disguised fstat, calls the regular fstat
++// syscall, otherwise, crashes in the same way as CrashSIGSYS_Handler.
++SANDBOX_EXPORT intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args, 
++                                             void* aux);
+ 
+ // Variants of the above functions for use with bpf_dsl.
+ SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYS();
+@@ -72,6 +76,7 @@ SANDBOX_EXPORT bpf_dsl::ResultExpr Crash
+ SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSFutex();
+ SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSPtrace();
+ SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteSchedSIGSYS();
++SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteFstatatSIGSYS();
+ 
+ // Allocates a crash key so that Seccomp information can be recorded.
+ void AllocateCrashKeys();
+diff -up b/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc b/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc
+--- a/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc
++++ b/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc
+@@ -261,4 +261,13 @@ int sys_sigaction(int signum,
+ 
+ #endif  // defined(MEMORY_SANITIZER)
+ 
++SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf)
++{
++#if defined(__NR_fstat64)
++    return syscall(__NR_fstat64, fd, buf);
++#else
++    return syscall(__NR_fstat, fd, buf);
++#endif
++}
++
+ }  // namespace sandbox
+diff -up b/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h b/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h
+--- a/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h
++++ b/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h
+@@ -17,6 +17,7 @@ struct sock_fprog;
+ struct rlimit64;
+ struct cap_hdr;
+ struct cap_data;
++struct stat64;
+ 
+ namespace sandbox {
+ 
+@@ -84,6 +85,9 @@ SANDBOX_EXPORT int sys_sigaction(int sig
+                                  const struct sigaction* act,
+                                  struct sigaction* oldact);
+ 
++// Recent glibc rewrites fstat to fstatat.
++SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf);
++
+ }  // namespace sandbox
+ 
+ #endif  // SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_

diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild
index 57d3478d..3a092b0f 100644
--- a/dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild
+++ b/dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild
@@ -102,6 +102,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-5.15.0-disable-fatal-warnings.patch" # downstream, bug 695446
 	"${FILESDIR}/${PN}-5.15.2_p20210224-chromium-87-v8-icu68.patch" # downstream, bug 757606
 	"${FILESDIR}/${PN}-5.15.2_p20210224-disable-git.patch" # downstream snapshot fix
+	"${FILESDIR}/${PN}-5.15.2_p20210406-glibc-2.33.patch" # by Fedora, bug 769989
 )
 
 pkg_preinst() {


             reply	other threads:[~2021-09-30 11:35 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30 11:35 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-11 20:43 [gentoo-commits] proj/qt:master commit in: dev-qt/qtwebengine/, dev-qt/qtwebengine/files/ Andreas Sturmlechner
2024-11-21 15:58 Andreas Sturmlechner
2024-11-21 15:58 Andreas Sturmlechner
2024-11-21 15:58 Andreas Sturmlechner
2024-05-30 12:56 Andreas Sturmlechner
2023-04-10 21:41 Andreas Sturmlechner
2022-06-20 18:03 Jimi Huotari
2022-04-26 15:03 Jimi Huotari
2022-04-05 17:07 Andreas Sturmlechner
2022-04-01 18:23 Andreas Sturmlechner
2021-12-24 23:57 Andreas Sturmlechner
2021-12-24 23:57 Andreas Sturmlechner
2021-11-16  0:55 Jimi Huotari
2021-09-30 11:35 Andreas Sturmlechner
2021-09-30 11:35 Andreas Sturmlechner
2021-03-25 23:49 Andreas Sturmlechner
2020-02-08 20:35 Andreas Sturmlechner
2019-10-28 21:23 Andreas Sturmlechner
2019-10-28 21:23 Andreas Sturmlechner
2019-10-23 23:38 Andreas Sturmlechner
2019-10-19 22:43 Andreas Sturmlechner
2019-09-11 12:44 Andreas Sturmlechner
2019-05-01  9:26 Michael Palimaka
2019-03-06 20:55 Jimi Huotari
2018-12-18 18:55 Andreas Sturmlechner
2018-11-13 17:52 Andreas Sturmlechner
2018-10-17 16:21 Jimi Huotari
2018-08-24 22:58 Jimi Huotari
2018-08-16 12:20 Jimi Huotari
2018-07-25 19:22 Jimi Huotari
2018-07-25 11:55 Jimi Huotari
2018-06-20 15:29 Andreas Sturmlechner
2018-06-20 15:29 Andreas Sturmlechner
2018-06-20 15:29 Andreas Sturmlechner
2018-06-19 20:12 Jimi Huotari
2018-06-16 18:04 Andreas Sturmlechner
2018-02-09 10:46 Michael Palimaka
2018-02-07 10:30 Michael Palimaka
2017-12-10  1:48 Michael Palimaka
2017-12-05 11:25 Michael Palimaka
2017-06-04 11:55 Michael Palimaka
2017-06-01 14:16 Michael Palimaka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1632998424.58b8abb62752a4d0b7ebb920afc25ce383bbfa45.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox