Compare commits
No commits in common. 'epel9' and 'i9-test' have entirely different histories.
@ -0,0 +1,3 @@
|
||||
aabebf64a0ef3c0be84dbcdf83f10591cb34378f SOURCES/chromium-115.0.5790.102.tar.xz
|
||||
7353fcb2efef3b4ca4f2ba97d5ed6df1b8cda29b SOURCES/chromium-gost-eff0aba6091bcf9ca9b8a6d31402dfe55ddaf8ce.tar.gz
|
||||
7f2dae4d92fd16ba75b35408e1c0a9003d27eb38 SOURCES/msspi-dddd947089110165db71fdc660157f102bab3660.tar.gz
|
@ -1,40 +1,3 @@
|
||||
/chromium-52.0.2743.75-clean.tar.xz
|
||||
/depot_tools.git-master.tar.gz
|
||||
/policy_templates.zip
|
||||
/chromium-*.tar.xz
|
||||
/gelasio.zip
|
||||
/MuktiNarrow-0.94.tar.bz2
|
||||
/NotoSansCJKjp-hinted.zip
|
||||
/lohit-gurmukhi-ttf-2.91.2.tar.gz
|
||||
/Arimo-BoldItalic.ttf
|
||||
/Arimo-Bold.ttf
|
||||
/Arimo-Italic.ttf
|
||||
/Arimo-Regular.ttf
|
||||
/Cousine-BoldItalic.ttf
|
||||
/Cousine-Bold.ttf
|
||||
/Cousine-Italic.ttf
|
||||
/Cousine-Regular.ttf
|
||||
/Tinos-BoldItalic.ttf
|
||||
/Tinos-Bold.ttf
|
||||
/Tinos-Italic.ttf
|
||||
/Tinos-Regular.ttf
|
||||
/Ahem.ttf
|
||||
/node-v8.9.1-linux-x64.tar.gz
|
||||
/node-v10.15.3-linux-x64.tar.gz
|
||||
/xcb-proto-1.14.tar.xz
|
||||
/NotoSansSymbols2-Regular.ttf
|
||||
/NotoSansTibetan-Regular.ttf
|
||||
/node-v12.22.6-linux-arm64.tar.xz
|
||||
/node-v12.22.6-linux-x64.tar.xz
|
||||
/node-v16.17.0-linux-x64.tar.xz
|
||||
/node-v16.17.0-linux-arm64.tar.xz
|
||||
/testupload
|
||||
/node-v19.8.1-linux-arm64.tar.xz
|
||||
/node-v19.8.1-linux-x64.tar.xz
|
||||
/node-v20.6.1-linux-arm64.tar.xz
|
||||
/node-v20.6.1-linux-x64.tar.xz
|
||||
/linux-arm64-0.19.2.tgz
|
||||
/linux-x64-0.19.2.tgz
|
||||
/v0.69.4.tar.gz
|
||||
/bindgen-cli-aarch64.tar.xz
|
||||
/bindgen-cli-x86_64.tar.xz
|
||||
SOURCES/chromium-115.0.5790.102.tar.xz
|
||||
SOURCES/chromium-gost-eff0aba6091bcf9ca9b8a6d31402dfe55ddaf8ce.tar.gz
|
||||
SOURCES/msspi-dddd947089110165db71fdc660157f102bab3660.tar.gz
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,57 +0,0 @@
|
||||
From 40309fb53e39477490fd6928ebe67c4fb78de380 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@gmail.com>
|
||||
Date: Sun, 10 Mar 2019 21:01:37 -0500
|
||||
Subject: [PATCH] Add ppc64 target to libaom
|
||||
|
||||
---
|
||||
third_party/libaom/BUILD.gn | 12 ++++++++++++
|
||||
third_party/libaom/cmake_update.sh | 3 +++
|
||||
2 files changed, 15 insertions(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/third_party/libaom/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/libaom/BUILD.gn
|
||||
+++ chromium-128.0.6613.113/third_party/libaom/BUILD.gn
|
||||
@@ -275,6 +275,18 @@ if (current_cpu == "arm64") {
|
||||
}
|
||||
}
|
||||
|
||||
+if (current_cpu == "ppc64") {
|
||||
+ source_set("libaom_intrinsics_vsx") {
|
||||
+ configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
+ configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
+ configs += [ ":libaom_config" ]
|
||||
+ sources = [
|
||||
+ "//third_party/libaom/source/libaom/aom_ports/ppc_cpudetect.c",
|
||||
+ ]
|
||||
+ sources += aom_av1_common_intrin_vsx
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static_library("libaom") {
|
||||
check_includes = false
|
||||
if (!is_debug && is_win) {
|
||||
@@ -338,6 +350,9 @@ static_library("libaom") {
|
||||
# This is needed by all arm boards due to aom_arm_cpu_caps()
|
||||
sources += [ "source/libaom/aom_ports/aarch32_cpudetect.c" ]
|
||||
}
|
||||
+ if (current_cpu == "ppc64") {
|
||||
+ deps += [ ":libaom_intrinsics_vsx" ]
|
||||
+ }
|
||||
if (is_android) {
|
||||
deps += [ "//third_party/cpu_features:ndk_compat" ]
|
||||
}
|
||||
Index: chromium-128.0.6613.113/third_party/libaom/cmake_update.sh
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/libaom/cmake_update.sh
|
||||
+++ chromium-128.0.6613.113/third_party/libaom/cmake_update.sh
|
||||
@@ -190,6 +190,9 @@ reset_dirs linux/arm64-cpu-detect
|
||||
gen_config_files linux/arm64-cpu-detect \
|
||||
"${toolchain}/arm64-linux-gcc.cmake ${all_platforms}"
|
||||
|
||||
+reset_dirs linux/ppc64
|
||||
+gen_config_files linux/ppc64 "${toolchain}/ppc-linux-gcc.cmake ${all_platforms}"
|
||||
+
|
||||
# Copy linux configurations and modify for Windows.
|
||||
reset_dirs win/arm64-cpu-detect
|
||||
cp "${CFG}/linux/arm64-cpu-detect/config"/* \
|
File diff suppressed because it is too large
Load Diff
@ -1,30 +0,0 @@
|
||||
From ea104a841fca1ff4d5430915f1b7c52c6a642f13 Mon Sep 17 00:00:00 2001
|
||||
From: Timothy Pearson <tpearson@raptorengineering.com>
|
||||
Date: Fri, 21 Sep 2018 21:44:17 -0500
|
||||
Subject: [PATCH] Force baseline POWER8 / AltiVec / VSX CPU features when on a
|
||||
PPC64 platform in LE mode
|
||||
|
||||
---
|
||||
BUILD.gn | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
Index: chromium-130.0.6723.44/v8/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/v8/BUILD.gn
|
||||
+++ chromium-130.0.6723.44/v8/BUILD.gn
|
||||
@@ -1431,7 +1431,14 @@ config("toolchain") {
|
||||
if (v8_current_cpu == "ppc64") {
|
||||
defines += [ "V8_TARGET_ARCH_PPC64" ]
|
||||
cflags += [ "-ffp-contract=off" ]
|
||||
- if (current_os == "aix") {
|
||||
+ if (current_os == "linux") {
|
||||
+ cflags += [
|
||||
+ # Enable usage of AltiVec, VSX, and other POWER8 and higher features
|
||||
+ "-mcpu=power8",
|
||||
+ "-maltivec",
|
||||
+ "-mvsx",
|
||||
+ ]
|
||||
+ } else if (current_os == "aix") {
|
||||
cflags += [
|
||||
# Work around AIX ceil, trunc and round oddities.
|
||||
"-mcpu=power5+",
|
File diff suppressed because it is too large
Load Diff
@ -1,773 +0,0 @@
|
||||
From cda9400739dfa064907d822f00578bb51b24a404 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Fri, 17 Aug 2018 14:18:33 -0500
|
||||
Subject: [PATCH] Implement support for ppc64 on Linux
|
||||
|
||||
This patch implements support for the ppc64 architecture on Linux systems.
|
||||
|
||||
Notable changes include:
|
||||
* Modification of tests to support non-4K page sizes
|
||||
* minidump_writer: Determine size of stack to capture based on page size
|
||||
* dump_writer_common: Introduce member function GetVectorRegisters to
|
||||
ThreadInfo on ppc64 systems. This allows Altivec/VMX registers to be
|
||||
dumped like they are on OS X. linux_ptrace_dumper has been updated
|
||||
to utilize this function along with the ptrace mode NT_PPC_VMX.
|
||||
* processor/exploitability_unittest.cc: Tests were disabled on
|
||||
non-x86 systems. They assume the system objdump is capable of
|
||||
disassembling x86 binaries which is not the case on other
|
||||
architectures.
|
||||
|
||||
To-do:
|
||||
* tools/linux/md2core has been updated as well, but functionality
|
||||
has not been confirmed and restoration of Altivec/VMX registers
|
||||
has not been implemented
|
||||
|
||||
Note that proper functionality depends on updates to third_party/LSS
|
||||
that introduce PPC64 support. An in-progress patch that allows
|
||||
breakpad to build and run successfully is available at:
|
||||
https://wiki.raptorcs.com/wiki/Porting/Chromium
|
||||
---
|
||||
.../dump_writer_common/raw_context_cpu.h | 2 +
|
||||
.../linux/dump_writer_common/thread_info.cc | 56 ++++++++++++++++++-
|
||||
.../linux/dump_writer_common/thread_info.h | 9 +++
|
||||
.../dump_writer_common/ucontext_reader.cc | 42 ++++++++++++++
|
||||
.../dump_writer_common/ucontext_reader.h | 3 +
|
||||
src/client/linux/handler/exception_handler.cc | 22 +++++++-
|
||||
src/client/linux/handler/exception_handler.h | 6 +-
|
||||
.../handler/exception_handler_unittest.cc | 8 ++-
|
||||
.../microdump_writer/microdump_writer.cc | 14 ++++-
|
||||
.../microdump_writer_unittest.cc | 15 ++++-
|
||||
.../minidump_writer/linux_core_dumper.cc | 8 ++-
|
||||
.../linux/minidump_writer/linux_dumper.cc | 4 +-
|
||||
.../linux/minidump_writer/linux_dumper.h | 3 +-
|
||||
.../linux_dumper_unittest_helper.cc | 2 +
|
||||
.../minidump_writer/linux_ptrace_dumper.cc | 19 +++++--
|
||||
.../linux_ptrace_dumper_unittest.cc | 5 ++
|
||||
.../linux/minidump_writer/minidump_writer.cc | 18 ++++--
|
||||
.../linux/minidump_writer/minidump_writer.h | 2 +
|
||||
.../minidump_writer_unittest.cc | 3 +
|
||||
src/common/linux/memory_mapped_file.cc | 3 +-
|
||||
.../linux/memory_mapped_file_unittest.cc | 7 ++-
|
||||
src/common/memory_allocator_unittest.cc | 3 +-
|
||||
src/processor/exploitability_linux.cc | 2 +
|
||||
src/processor/exploitability_unittest.cc | 15 +++--
|
||||
src/tools/linux/md2core/minidump-2-core.cc | 45 +++++++++++++++
|
||||
25 files changed, 281 insertions(+), 35 deletions(-)
|
||||
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
|
||||
@@ -51,6 +51,8 @@ typedef MDRawContextRISCV64 RawContextCP
|
||||
# else
|
||||
# error "Unexpected __riscv_xlen"
|
||||
# endif
|
||||
+#elif defined(__powerpc64__)
|
||||
+typedef MDRawContextPPC64 RawContextCPU;
|
||||
#else
|
||||
#error "This code has not been ported to your platform yet."
|
||||
#endif
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
@@ -336,7 +336,42 @@ void ThreadInfo::FillCPUContext(RawConte
|
||||
#error "Unexpected __riscv_xlen"
|
||||
#endif
|
||||
}
|
||||
-#endif // __riscv
|
||||
+
|
||||
+#elif defined(__powerpc64__)
|
||||
+
|
||||
+uintptr_t ThreadInfo::GetInstructionPointer() const {
|
||||
+ return mcontext.gp_regs[PT_NIP];
|
||||
+}
|
||||
+
|
||||
+void ThreadInfo::FillCPUContext(RawContextCPU* out) const {
|
||||
+ out->context_flags = MD_CONTEXT_PPC64_FULL;
|
||||
+ for (int i = 0; i < MD_CONTEXT_PPC64_GPR_COUNT; i++)
|
||||
+ out->gpr[i] = mcontext.gp_regs[i];
|
||||
+
|
||||
+ out->lr = mcontext.gp_regs[PT_LNK];
|
||||
+ out->srr0 = mcontext.gp_regs[PT_NIP];
|
||||
+ out->srr1 = mcontext.gp_regs[PT_MSR];
|
||||
+ out->cr = mcontext.gp_regs[PT_CCR];
|
||||
+ out->xer = mcontext.gp_regs[PT_XER];
|
||||
+ out->ctr = mcontext.gp_regs[PT_CTR];
|
||||
+
|
||||
+ for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++)
|
||||
+ out->float_save.fpregs[i] = mcontext.fp_regs[i];
|
||||
+
|
||||
+ out->float_save.fpscr = mcontext.fp_regs[NFPREG-1];
|
||||
+
|
||||
+ for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++)
|
||||
+ out->vector_save.save_vr[i] = \
|
||||
+ {(((uint64_t)vregs.vrregs[i][0]) << 32)
|
||||
+ | vregs.vrregs[i][1],
|
||||
+ (((uint64_t)vregs.vrregs[i][2]) << 32)
|
||||
+ | vregs.vrregs[i][3]};
|
||||
+
|
||||
+ out->vrsave = vregs.vrsave;
|
||||
+ out->vector_save.save_vscr = {0, vregs.vscr.vscr_word};
|
||||
+ out->vector_save.save_vrvalid = 0xFFFFFFFF;
|
||||
+}
|
||||
+#endif // __powerpc64__
|
||||
|
||||
void ThreadInfo::GetGeneralPurposeRegisters(void** gp_regs, size_t* size) {
|
||||
assert(gp_regs || size);
|
||||
@@ -350,6 +385,11 @@ void ThreadInfo::GetGeneralPurposeRegist
|
||||
*gp_regs = mcontext.__gregs;
|
||||
if (size)
|
||||
*size = sizeof(mcontext.__gregs);
|
||||
+#elif defined(__powerpc64__)
|
||||
+ if (gp_regs)
|
||||
+ *gp_regs = mcontext.gp_regs;
|
||||
+ if (size)
|
||||
+ *size = sizeof(mcontext.gp_regs);
|
||||
#else
|
||||
if (gp_regs)
|
||||
*gp_regs = ®s;
|
||||
@@ -384,6 +424,11 @@ void ThreadInfo::GetFloatingPointRegiste
|
||||
# else
|
||||
# error "Unexpected __riscv_flen"
|
||||
# endif
|
||||
+#elif defined(__powerpc64__)
|
||||
+ if (fp_regs)
|
||||
+ *fp_regs = &mcontext.fp_regs;
|
||||
+ if (size)
|
||||
+ *size = sizeof(mcontext.fp_regs);
|
||||
#else
|
||||
if (fp_regs)
|
||||
*fp_regs = &fpregs;
|
||||
@@ -392,4 +437,13 @@ void ThreadInfo::GetFloatingPointRegiste
|
||||
#endif
|
||||
}
|
||||
|
||||
+#if defined(__powerpc64__)
|
||||
+void ThreadInfo::GetVectorRegisters(void** v_regs, size_t* size) {
|
||||
+ if (v_regs)
|
||||
+ *v_regs = &vregs;
|
||||
+ if (size)
|
||||
+ *size = sizeof(vregs);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
} // namespace google_breakpad
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
|
||||
@@ -67,6 +67,10 @@ struct ThreadInfo {
|
||||
// Use the structures defined in <sys/user.h>
|
||||
struct user_regs_struct regs;
|
||||
struct user_fpsimd_struct fpregs;
|
||||
+#elif defined(__powerpc64__)
|
||||
+ // Use the structures defined in <sys/ucontext.h>.
|
||||
+ mcontext_t mcontext;
|
||||
+ struct _libc_vrstate vregs;
|
||||
#elif defined(__mips__) || defined(__riscv)
|
||||
// Use the structure defined in <sys/ucontext.h>.
|
||||
mcontext_t mcontext;
|
||||
@@ -83,6 +87,11 @@ struct ThreadInfo {
|
||||
|
||||
// Returns the pointer and size of float point register area.
|
||||
void GetFloatingPointRegisters(void** fp_regs, size_t* size);
|
||||
+
|
||||
+#if defined(__powerpc64__)
|
||||
+ // Returns the pointer and size of the vector register area. (PPC64 only)
|
||||
+ void GetVectorRegisters(void** v_regs, size_t* size);
|
||||
+#endif
|
||||
};
|
||||
|
||||
} // namespace google_breakpad
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
@@ -324,6 +324,48 @@ void UContextReader::FillCPUContext(RawC
|
||||
#error "Unexpected __riscv_xlen"
|
||||
#endif
|
||||
}
|
||||
+
|
||||
+#elif defined(__powerpc64__)
|
||||
+
|
||||
+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
|
||||
+ return uc->uc_mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP];
|
||||
+}
|
||||
+
|
||||
+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
|
||||
+ return uc->uc_mcontext.gp_regs[PT_NIP];
|
||||
+}
|
||||
+
|
||||
+void UContextReader::FillCPUContext(RawContextCPU* out, const ucontext_t* uc,
|
||||
+ const struct _libc_vrstate* vregs) {
|
||||
+ out->context_flags = MD_CONTEXT_PPC64_FULL;
|
||||
+
|
||||
+ for (int i = 0; i < MD_CONTEXT_PPC64_GPR_COUNT; i++)
|
||||
+ out->gpr[i] = uc->uc_mcontext.gp_regs[i];
|
||||
+
|
||||
+ out->lr = uc->uc_mcontext.gp_regs[PT_LNK];
|
||||
+ out->srr0 = uc->uc_mcontext.gp_regs[PT_NIP];
|
||||
+ out->srr1 = uc->uc_mcontext.gp_regs[PT_MSR];
|
||||
+ out->cr = uc->uc_mcontext.gp_regs[PT_CCR];
|
||||
+ out->xer = uc->uc_mcontext.gp_regs[PT_XER];
|
||||
+ out->ctr = uc->uc_mcontext.gp_regs[PT_CTR];
|
||||
+
|
||||
+ for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++)
|
||||
+ out->float_save.fpregs[i] = uc->uc_mcontext.fp_regs[i];
|
||||
+
|
||||
+ out->float_save.fpscr = uc->uc_mcontext.fp_regs[NFPREG-1];
|
||||
+
|
||||
+ for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++)
|
||||
+ out->vector_save.save_vr[i] =
|
||||
+ {(((uint64_t)vregs->vrregs[i][0]) << 32)
|
||||
+ | vregs->vrregs[i][1],
|
||||
+ (((uint64_t)vregs->vrregs[i][2]) << 32)
|
||||
+ | vregs->vrregs[i][3]};
|
||||
+
|
||||
+ out->vrsave = vregs->vrsave;
|
||||
+ out->vector_save.save_vscr = {0, vregs->vscr.vscr_word};
|
||||
+ out->vector_save.save_vrvalid = 0xFFFFFFFF;
|
||||
+}
|
||||
+
|
||||
#endif
|
||||
|
||||
} // namespace google_breakpad
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
|
||||
@@ -54,6 +54,9 @@ struct UContextReader {
|
||||
#elif defined(__aarch64__)
|
||||
static void FillCPUContext(RawContextCPU* out, const ucontext_t* uc,
|
||||
const struct fpsimd_context* fpregs);
|
||||
+#elif defined(__powerpc64__)
|
||||
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
|
||||
+ const struct _libc_vrstate* vregs);
|
||||
#else
|
||||
static void FillCPUContext(RawContextCPU* out, const ucontext_t* uc);
|
||||
#endif
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
@@ -464,6 +464,13 @@ bool ExceptionHandler::HandleSignal(int
|
||||
memcpy(&g_crash_context_.float_state, fp_ptr,
|
||||
sizeof(g_crash_context_.float_state));
|
||||
}
|
||||
+#elif defined(__powerpc64__)
|
||||
+ // On PPC64, we must copy VR state
|
||||
+ ucontext_t* uc_ptr = (ucontext_t*)uc;
|
||||
+ if (uc_ptr->uc_mcontext.v_regs) {
|
||||
+ memcpy(&g_crash_context_.vector_state, uc_ptr->uc_mcontext.v_regs,
|
||||
+ sizeof(g_crash_context_.vector_state));
|
||||
+ }
|
||||
#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
ucontext_t* uc_ptr = (ucontext_t*)uc;
|
||||
if (uc_ptr->uc_mcontext.fpregs) {
|
||||
@@ -701,10 +708,18 @@ bool ExceptionHandler::WriteMinidump() {
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE && !defined(__aarch64__)
|
||||
+#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE && !defined(__aarch64__) \
|
||||
+ && !defined(__powerpc64__)
|
||||
memcpy(&context.float_state, context.context.uc_mcontext.fpregs,
|
||||
sizeof(context.float_state));
|
||||
#endif
|
||||
+
|
||||
+#if defined(__powerpc64__)
|
||||
+ // Vector registers must be copied on PPC64
|
||||
+ memcpy(&context.vector_state, context.context.uc_mcontext.v_regs,
|
||||
+ sizeof(context.vector_state));
|
||||
+#endif
|
||||
+
|
||||
context.tid = sys_gettid();
|
||||
|
||||
// Add an exception stream to the minidump for better reporting.
|
||||
@@ -725,6 +740,9 @@ bool ExceptionHandler::WriteMinidump() {
|
||||
#elif defined(__mips__)
|
||||
context.siginfo.si_addr =
|
||||
reinterpret_cast<void*>(context.context.uc_mcontext.pc);
|
||||
+#elif defined(__powerpc64__)
|
||||
+ context.siginfo.si_addr =
|
||||
+ reinterpret_cast<void*>(context.context.uc_mcontext.gp_regs[PT_NIP]);
|
||||
#elif defined(__riscv)
|
||||
context.siginfo.si_addr =
|
||||
reinterpret_cast<void*>(context.context.uc_mcontext.__gregs[REG_PC]);
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
|
||||
@@ -200,7 +200,11 @@ class ExceptionHandler {
|
||||
siginfo_t siginfo;
|
||||
pid_t tid; // the crashing thread.
|
||||
ucontext_t context;
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ // PPC64's FP state is a part of ucontext_t like MIPS but the vector
|
||||
+ // state is not, so a struct is needed.
|
||||
+ vstate_t vector_state;
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
fpstate_t float_state;
|
||||
#endif
|
||||
};
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
|
||||
@@ -321,7 +321,7 @@ TEST(ExceptionHandlerTest, ParallelChild
|
||||
ASSERT_EQ(SIGSEGV, WTERMSIG(status));
|
||||
return;
|
||||
} else {
|
||||
- usleep(100000);
|
||||
+ usleep(200000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -576,6 +576,8 @@ const unsigned char kIllegalInstruction[
|
||||
#if defined(__mips__)
|
||||
// mfc2 zero,Impl - usually illegal in userspace.
|
||||
0x48, 0x00, 0x00, 0x48
|
||||
+#elif defined(__powerpc64__)
|
||||
+ 0x01, 0x01, 0x01, 0x01 // Crashes on a tested POWER9 cpu
|
||||
#else
|
||||
// This crashes with SIGILL on x86/x86-64/arm.
|
||||
0xff, 0xff, 0xff, 0xff
|
||||
@@ -771,10 +773,10 @@ TEST(ExceptionHandlerTest, InstructionPo
|
||||
|
||||
// These are defined here so the parent can use them to check the
|
||||
// data from the minidump afterwards.
|
||||
- // Use 4k here because the OS will hand out a single page even
|
||||
+ // Use the page size here because the OS will hand out a single page even
|
||||
// if a smaller size is requested, and this test wants to
|
||||
// test the upper bound of the memory range.
|
||||
- const uint32_t kMemorySize = 4096; // bytes
|
||||
+ const uint32_t kMemorySize = getpagesize(); // bytes
|
||||
const int kOffset = kMemorySize - sizeof(kIllegalInstruction);
|
||||
|
||||
const pid_t child = fork();
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
|
||||
@@ -141,7 +141,9 @@ class MicrodumpWriter {
|
||||
const MicrodumpExtraInfo& microdump_extra_info,
|
||||
LinuxDumper* dumper)
|
||||
: ucontext_(context ? &context->context : NULL),
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ vector_state_(context ? &context->vector_state : NULL),
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
float_state_(context ? &context->float_state : NULL),
|
||||
#endif
|
||||
dumper_(dumper),
|
||||
@@ -348,6 +350,8 @@ class MicrodumpWriter {
|
||||
# else
|
||||
# error "Unexpected __riscv_xlen"
|
||||
# endif
|
||||
+#elif defined(__powerpc64__)
|
||||
+ const char kArch[] = "ppc64";
|
||||
#else
|
||||
# error "This code has not been ported to your platform yet"
|
||||
#endif
|
||||
@@ -420,7 +424,9 @@ class MicrodumpWriter {
|
||||
void DumpCPUState() {
|
||||
RawContextCPU cpu;
|
||||
my_memset(&cpu, 0, sizeof(RawContextCPU));
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ UContextReader::FillCPUContext(&cpu, ucontext_, vector_state_);
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
UContextReader::FillCPUContext(&cpu, ucontext_, float_state_);
|
||||
#else
|
||||
UContextReader::FillCPUContext(&cpu, ucontext_);
|
||||
@@ -616,7 +622,9 @@ class MicrodumpWriter {
|
||||
void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
|
||||
|
||||
const ucontext_t* const ucontext_;
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ const google_breakpad::vstate_t* const vector_state_;
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
const google_breakpad::fpstate_t* const float_state_;
|
||||
#endif
|
||||
LinuxDumper* dumper_;
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
|
||||
@@ -282,10 +282,19 @@ TEST(MicrodumpWriterTest, BasicWithMappi
|
||||
CrashAndGetMicrodump(mappings, MicrodumpExtraInfo(), &buf);
|
||||
ASSERT_TRUE(ContainsMicrodump(buf));
|
||||
|
||||
+ int page_size = getpagesize();
|
||||
#ifdef __LP64__
|
||||
- ASSERT_NE(std::string::npos,
|
||||
- buf.find("M 0000000000001000 000000000000002A 0000000000001000 "
|
||||
- "33221100554477668899AABBCCDDEEFF0 libfoo.so"));
|
||||
+ // This test is only available for the following page sizes
|
||||
+ ASSERT_TRUE((page_size == 4096) || (page_size == 65536));
|
||||
+ if (page_size == 4096) {
|
||||
+ ASSERT_NE(std::string::npos,
|
||||
+ buf.find("M 0000000000001000 000000000000002A 0000000000001000 "
|
||||
+ "33221100554477668899AABBCCDDEEFF0 libfoo.so"));
|
||||
+ } else {
|
||||
+ ASSERT_NE(std::string::npos,
|
||||
+ buf.find("M 0000000000010000 000000000000002A 0000000000010000 "
|
||||
+ "33221100554477668899AABBCCDDEEFF0 libfoo.so"));
|
||||
+ }
|
||||
#else
|
||||
ASSERT_NE(std::string::npos,
|
||||
buf.find("M 00001000 0000002A 00001000 "
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
|
||||
@@ -118,6 +118,9 @@ bool LinuxCoreDumper::GetThreadInfoByInd
|
||||
#elif defined(__riscv)
|
||||
stack_pointer = reinterpret_cast<uint8_t*>(
|
||||
info->mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP]);
|
||||
+#elif defined(__powerpc64__)
|
||||
+ stack_pointer =
|
||||
+ reinterpret_cast<uint8_t*>(info->mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP]);
|
||||
#else
|
||||
# error "This code hasn't been ported to your platform yet."
|
||||
#endif
|
||||
@@ -213,7 +216,10 @@ bool LinuxCoreDumper::EnumerateThreads()
|
||||
memset(&info, 0, sizeof(ThreadInfo));
|
||||
info.tgid = status->pr_pgrp;
|
||||
info.ppid = status->pr_ppid;
|
||||
-#if defined(__mips__)
|
||||
+#if defined(__powerpc64__)
|
||||
+ for (int i = 0; i < 31; i++)
|
||||
+ info.mcontext.gp_regs[i] = status->pr_reg[i];
|
||||
+#elif defined(__mips__)
|
||||
# if defined(__ANDROID__)
|
||||
for (int i = EF_R0; i <= EF_R31; i++)
|
||||
info.mcontext.gregs[i - EF_R0] = status->pr_reg[i];
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
@@ -770,7 +770,9 @@ bool LinuxDumper::GetStackInfo(const voi
|
||||
reinterpret_cast<uint8_t*>(int_stack_pointer & ~(page_size - 1));
|
||||
|
||||
// The number of bytes of stack which we try to capture.
|
||||
- static const ptrdiff_t kStackToCapture = 32 * 1024;
|
||||
+ // This now depends on page_size to avoid missing data
|
||||
+ // on systems with larger page sizes.
|
||||
+ static const ptrdiff_t kStackToCapture = 8 * page_size;
|
||||
|
||||
const MappingInfo* mapping = FindMapping(stack_pointer);
|
||||
if (!mapping)
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
|
||||
@@ -64,7 +64,8 @@ namespace google_breakpad {
|
||||
typedef Elf32_auxv_t elf_aux_entry;
|
||||
#elif defined(__x86_64) || defined(__aarch64__) || \
|
||||
(defined(__mips__) && _MIPS_SIM != _ABIO32) || \
|
||||
- (defined(__riscv) && __riscv_xlen == 64)
|
||||
+ (defined(__riscv) && __riscv_xlen == 64) || \
|
||||
+ defined(__powerpc64__)
|
||||
typedef Elf64_auxv_t elf_aux_entry;
|
||||
#endif
|
||||
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
@@ -56,6 +56,8 @@
|
||||
#define TID_PTR_REGISTER "$1"
|
||||
#elif defined(__riscv)
|
||||
#define TID_PTR_REGISTER "x4"
|
||||
+#elif defined(__powerpc64__)
|
||||
+#define TID_PTR_REGISTER "r8"
|
||||
#else
|
||||
#error This test has not been ported to this platform.
|
||||
#endif
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
@@ -208,12 +208,12 @@ bool LinuxPtraceDumper::ReadRegisterSet(
|
||||
#ifdef PTRACE_GETREGSET
|
||||
struct iovec io;
|
||||
info->GetGeneralPurposeRegisters(&io.iov_base, &io.iov_len);
|
||||
- if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_PRSTATUS, (void*)&io) == -1) {
|
||||
+ if (ptrace(PTRACE_GETREGSET, tid, (void*)NT_PRSTATUS, (void*)&io) == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
info->GetFloatingPointRegisters(&io.iov_base, &io.iov_len);
|
||||
- if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_FPREGSET, (void*)&io) == -1) {
|
||||
+ if (ptrace(PTRACE_GETREGSET, tid, (void*)NT_FPREGSET, (void*)&io) == -1) {
|
||||
// We are going to check if we can read VFP registers on ARM32.
|
||||
// Currently breakpad does not support VFP registers to be a part of minidump,
|
||||
// so this is only to confirm that we can actually read FP registers.
|
||||
@@ -233,6 +233,15 @@ bool LinuxPtraceDumper::ReadRegisterSet(
|
||||
}
|
||||
#endif // defined(__arm__)
|
||||
}
|
||||
+
|
||||
+#if defined(__powerpc64__)
|
||||
+ // Grab the vector registers on PPC64 too
|
||||
+ info->GetVectorRegisters(&io.iov_base, &io.iov_len);
|
||||
+ if (ptrace(PTRACE_GETREGSET, tid, (void*)NT_PPC_VMX, (void*)&io) == -1) {
|
||||
+ return false;
|
||||
+ }
|
||||
+#endif // defined(__powerpc64__)
|
||||
+
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
@@ -397,6 +406,9 @@ bool LinuxPtraceDumper::GetThreadInfoByI
|
||||
#elif defined(__riscv)
|
||||
stack_pointer = reinterpret_cast<uint8_t*>(
|
||||
info->mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP]);
|
||||
+#elif defined(__powerpc64__)
|
||||
+ stack_pointer =
|
||||
+ reinterpret_cast<uint8_t*>(info->mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP]);
|
||||
#else
|
||||
# error "This code hasn't been ported to your platform yet."
|
||||
#endif
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
|
||||
@@ -470,6 +470,9 @@ TEST(LinuxPtraceDumperTest, VerifyStackR
|
||||
#elif defined(__riscv)
|
||||
pid_t* process_tid_location =
|
||||
reinterpret_cast<pid_t*>(one_thread.mcontext.__gregs[4]);
|
||||
+#elif defined(__powerpc64__)
|
||||
+ pid_t* process_tid_location =
|
||||
+ reinterpret_cast<pid_t*>(one_thread.mcontext.gp_regs[8]);
|
||||
#else
|
||||
#error This test has not been ported to this platform.
|
||||
#endif
|
||||
@@ -569,6 +572,8 @@ TEST_F(LinuxPtraceDumperTest, SanitizeSt
|
||||
uintptr_t heap_addr = thread_info.mcontext.gregs[1];
|
||||
#elif defined(__riscv)
|
||||
uintptr_t heap_addr = thread_info.mcontext.__gregs[4];
|
||||
+#elif defined(__powerpc64__)
|
||||
+ uintptr_t heap_addr = thread_info.mcontext.gp_regs[8];
|
||||
#else
|
||||
#error This test has not been ported to this platform.
|
||||
#endif
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
@@ -144,7 +144,9 @@ class MinidumpWriter {
|
||||
: fd_(minidump_fd),
|
||||
path_(minidump_path),
|
||||
ucontext_(context ? &context->context : NULL),
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ vector_state_(context ? &context->vector_state : NULL),
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
float_state_(context ? &context->float_state : NULL),
|
||||
#endif
|
||||
dumper_(dumper),
|
||||
@@ -476,7 +478,9 @@ class MinidumpWriter {
|
||||
if (!cpu.Allocate())
|
||||
return false;
|
||||
my_memset(cpu.get(), 0, sizeof(RawContextCPU));
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ UContextReader::FillCPUContext(cpu.get(), ucontext_, vector_state_);
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
UContextReader::FillCPUContext(cpu.get(), ucontext_, float_state_);
|
||||
#else
|
||||
UContextReader::FillCPUContext(cpu.get(), ucontext_);
|
||||
@@ -953,7 +957,7 @@ class MinidumpWriter {
|
||||
dirent->location.rva = 0;
|
||||
}
|
||||
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || defined(__powerpc64__)
|
||||
bool WriteCPUInformation(MDRawSystemInfo* sys_info) {
|
||||
char vendor_id[sizeof(sys_info->cpu.x86_cpu_info.vendor_id) + 1] = {0};
|
||||
static const char vendor_id_name[] = "vendor_id";
|
||||
@@ -973,7 +977,9 @@ class MinidumpWriter {
|
||||
|
||||
// processor_architecture should always be set, do this first
|
||||
sys_info->processor_architecture =
|
||||
-#if defined(__mips__)
|
||||
+#if defined(__powerpc64__)
|
||||
+ MD_CPU_ARCHITECTURE_PPC64;
|
||||
+#elif defined(__mips__)
|
||||
# if _MIPS_SIM == _ABIO32
|
||||
MD_CPU_ARCHITECTURE_MIPS;
|
||||
# elif _MIPS_SIM == _ABI64
|
||||
@@ -1440,7 +1446,9 @@ class MinidumpWriter {
|
||||
const char* path_; // Path to the file where the minidum should be written.
|
||||
|
||||
const ucontext_t* const ucontext_; // also from the signal handler
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ const google_breakpad::vstate_t* const vector_state_;
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
const google_breakpad::fpstate_t* const float_state_; // ditto
|
||||
#endif
|
||||
LinuxDumper* dumper_;
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
|
||||
@@ -47,6 +47,8 @@ class ExceptionHandler;
|
||||
|
||||
#if defined(__aarch64__)
|
||||
typedef struct fpsimd_context fpstate_t;
|
||||
+#elif defined(__powerpc64__)
|
||||
+typedef struct _libc_vrstate vstate_t;
|
||||
#elif !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
typedef std::remove_pointer<fpregset_t>::type fpstate_t;
|
||||
#endif
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
|
||||
@@ -723,6 +723,9 @@ TEST(MinidumpWriterTest, InvalidStackPoi
|
||||
#elif defined(__riscv)
|
||||
context.context.uc_mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP] =
|
||||
invalid_stack_pointer;
|
||||
+#elif defined(__powerpc64__)
|
||||
+ context.context.uc_mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP] =
|
||||
+ invalid_stack_pointer;
|
||||
#else
|
||||
# error "This code has not been ported to your platform yet."
|
||||
#endif
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
|
||||
@@ -72,8 +72,7 @@ bool MemoryMappedFile::Map(const char* p
|
||||
|
||||
#if defined(__x86_64__) || defined(__aarch64__) || \
|
||||
(defined(__mips__) && _MIPS_SIM == _ABI64) || \
|
||||
- (defined(__riscv) && __riscv_xlen == 64)
|
||||
-
|
||||
+ (defined(__riscv) && __riscv_xlen == 64) || defined(__powerpc64__)
|
||||
struct kernel_stat st;
|
||||
if (sys_fstat(fd, &st) == -1 || st.st_size < 0) {
|
||||
#else
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
|
||||
@@ -179,9 +179,10 @@ TEST_F(MemoryMappedFileTest, RemapAfterM
|
||||
TEST_F(MemoryMappedFileTest, MapWithOffset) {
|
||||
// Put more data in the test file this time. Offsets can only be
|
||||
// done on page boundaries, so we need a two page file to test this.
|
||||
- const int page_size = 4096;
|
||||
- char data1[2 * page_size];
|
||||
- size_t data1_size = sizeof(data1);
|
||||
+ const int page_size = getpagesize();
|
||||
+ char *data1 = static_cast<char*>(malloc(2 * page_size));
|
||||
+ EXPECT_TRUE(data1 != NULL);
|
||||
+ size_t data1_size = (2 * page_size);
|
||||
for (size_t i = 0; i < data1_size; ++i) {
|
||||
data1[i] = i & 0x7f;
|
||||
}
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
|
||||
@@ -60,8 +60,9 @@ TEST(PageAllocatorTest, LargeObject) {
|
||||
|
||||
EXPECT_EQ(0U, allocator.pages_allocated());
|
||||
uint8_t* p = reinterpret_cast<uint8_t*>(allocator.Alloc(10000));
|
||||
+ uint64_t expected_pages = 1 + ((10000 - 1) / getpagesize());
|
||||
ASSERT_FALSE(p == NULL);
|
||||
- EXPECT_EQ(3U, allocator.pages_allocated());
|
||||
+ EXPECT_EQ(expected_pages, allocator.pages_allocated());
|
||||
for (unsigned i = 1; i < 10; ++i) {
|
||||
uint8_t* p = reinterpret_cast<uint8_t*>(allocator.Alloc(i));
|
||||
ASSERT_FALSE(p == NULL);
|
||||
Index: chromium-130.0.6723.44/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
|
||||
+++ chromium-130.0.6723.44/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
|
||||
@@ -82,6 +82,8 @@
|
||||
#define ELF_ARCH EM_AARCH64
|
||||
#elif defined(__riscv)
|
||||
#define ELF_ARCH EM_RISCV
|
||||
+#elif defined(__powerpc64__)
|
||||
+ #define ELF_ARCH EM_PPC64
|
||||
#endif
|
||||
|
||||
#if defined(__arm__)
|
||||
@@ -92,6 +94,8 @@ typedef user_regs user_regs_struct;
|
||||
#elif defined (__mips__) || defined(__riscv)
|
||||
// This file-local typedef simplifies the source code.
|
||||
typedef gregset_t user_regs_struct;
|
||||
+#elif defined(__powerpc64__)
|
||||
+typedef struct pt_regs user_regs_struct;
|
||||
#endif
|
||||
|
||||
using google_breakpad::MDTypeHelper;
|
||||
@@ -324,6 +328,9 @@ struct CrashedProcess {
|
||||
#if defined(__aarch64__)
|
||||
user_fpsimd_struct fpregs;
|
||||
#endif
|
||||
+#if defined(__powerpc64__)
|
||||
+ mcontext_t mcontext;
|
||||
+#endif
|
||||
uintptr_t stack_addr;
|
||||
const uint8_t* stack;
|
||||
size_t stack_length;
|
||||
@@ -627,6 +634,38 @@ ParseThreadRegisters(CrashedProcess::Thr
|
||||
#error "Unexpected __riscv_xlen"
|
||||
#endif
|
||||
}
|
||||
+#elif defined(__powerpc64__)
|
||||
+static void
|
||||
+ParseThreadRegisters(CrashedProcess::Thread* thread,
|
||||
+ const MinidumpMemoryRange& range) {
|
||||
+ const MDRawContextPPC64* rawregs = range.GetData<MDRawContextPPC64>(0);
|
||||
+
|
||||
+ for (int i = 0; i < MD_CONTEXT_PPC64_GPR_COUNT; i++)
|
||||
+ thread->mcontext.gp_regs[i] = rawregs->gpr[i];
|
||||
+
|
||||
+ thread->mcontext.gp_regs[PT_LNK] = rawregs->lr;
|
||||
+ thread->mcontext.gp_regs[PT_NIP] = rawregs->srr0;
|
||||
+ thread->mcontext.gp_regs[PT_MSR] = rawregs->srr1;
|
||||
+ thread->mcontext.gp_regs[PT_CCR] = rawregs->cr;
|
||||
+ thread->mcontext.gp_regs[PT_XER] = rawregs->xer;
|
||||
+ thread->mcontext.gp_regs[PT_CTR] = rawregs->ctr;
|
||||
+ thread->mcontext.v_regs->vrsave = rawregs->vrsave;
|
||||
+
|
||||
+ for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++)
|
||||
+ thread->mcontext.fp_regs[i] = rawregs->float_save.fpregs[i];
|
||||
+
|
||||
+ thread->mcontext.fp_regs[NFPREG-1] = rawregs->float_save.fpscr;
|
||||
+
|
||||
+ for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++) {
|
||||
+ thread->mcontext.v_regs->vrregs[i][0] = rawregs->vector_save.save_vr[i].high >> 32;
|
||||
+ thread->mcontext.v_regs->vrregs[i][1] = rawregs->vector_save.save_vr[i].high;
|
||||
+ thread->mcontext.v_regs->vrregs[i][2] = rawregs->vector_save.save_vr[i].low >> 32;
|
||||
+ thread->mcontext.v_regs->vrregs[i][3] = rawregs->vector_save.save_vr[i].low;
|
||||
+ }
|
||||
+
|
||||
+ thread->mcontext.v_regs->vscr.vscr_word = rawregs->vector_save.save_vscr.low & 0xFFFFFFFF;
|
||||
+}
|
||||
+
|
||||
#else
|
||||
#error "This code has not been ported to your platform yet"
|
||||
#endif
|
||||
@@ -732,6 +771,12 @@ ParseSystemInfo(const Options& options,
|
||||
# else
|
||||
# error "Unexpected __riscv_xlen"
|
||||
# endif
|
||||
+#elif defined(__powerpc64__)
|
||||
+ if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_PPC64) {
|
||||
+ fprintf(stderr,
|
||||
+ "This version of minidump-2-core only supports PPC64.\n");
|
||||
+ exit(1);
|
||||
+ }
|
||||
#else
|
||||
#error "This code has not been ported to your platform yet"
|
||||
#endif
|
@ -1,37 +0,0 @@
|
||||
From b3a14db7637232d30c878cc1f1ad6d8037e81379 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawn@anastas.io>
|
||||
Date: Tue, 15 Jan 2019 22:42:21 -0600
|
||||
Subject: [PATCH] linux/seccomp-bpf: ppc64+glibc workaround in SIGSYS handler
|
||||
|
||||
Workaround for an apparent issue with glibc negating syscall
|
||||
parameters. Observed on a ppc64le machine with glibc.
|
||||
More investigation required.
|
||||
---
|
||||
sandbox/linux/seccomp-bpf/trap.cc | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/seccomp-bpf/trap.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/seccomp-bpf/trap.cc
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/seccomp-bpf/trap.cc
|
||||
@@ -236,6 +236,20 @@ void Trap::SigSys(int nr, LinuxSigInfo*
|
||||
SetIsInSigHandler();
|
||||
}
|
||||
|
||||
+#if defined(__powerpc64__)
|
||||
+ // On ppc64+glibc, some syscalls seem to accidentally negate the first
|
||||
+ // parameter which causes checks against it to fail. For now, manually
|
||||
+ // negate them back.
|
||||
+ // TODO(shawn@anastas.io): investigate this issue further
|
||||
+ auto nr = SECCOMP_SYSCALL(ctx);
|
||||
+ if (nr == __NR_openat || nr == __NR_mkdirat || nr == __NR_faccessat || nr == __NR_readlinkat ||
|
||||
+ nr == __NR_renameat || nr == __NR_renameat2 || nr == __NR_newfstatat || nr == __NR_unlinkat) {
|
||||
+ if (static_cast<int>(SECCOMP_PARM1(ctx)) > 0) {
|
||||
+ SECCOMP_PARM1(ctx) = -SECCOMP_PARM1(ctx);
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
// Copy the seccomp-specific data into a arch_seccomp_data structure. This
|
||||
// is what we are showing to TrapFnc callbacks that the system call
|
||||
// evaluator registered with the sandbox.
|
@ -1,23 +0,0 @@
|
||||
From 0c65e40ae578b743b5f06956597ebc9700768d18 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 22:45:47 -0500
|
||||
Subject: [PATCH 1/1] sandbox: Enable seccomp_bpf for ppc64
|
||||
|
||||
---
|
||||
sandbox/features.gni | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/features.gni
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/features.gni
|
||||
+++ chromium-128.0.6613.113/sandbox/features.gni
|
||||
@@ -9,7 +9,8 @@
|
||||
use_seccomp_bpf = (is_linux || is_chromeos || is_android) &&
|
||||
(current_cpu == "x86" || current_cpu == "x64" ||
|
||||
current_cpu == "arm" || current_cpu == "arm64" ||
|
||||
- current_cpu == "mipsel" || current_cpu == "mips64el")
|
||||
+ current_cpu == "mipsel" || current_cpu == "mips64el" ||
|
||||
+ current_cpu == "ppc64")
|
||||
|
||||
# SSBD (Speculative Store Bypass Disable) is a mitigation of Spectre Variant 4.
|
||||
# As Spectre Variant 4 can be mitigated by site isolation, opt-out SSBD on site
|
@ -1,80 +0,0 @@
|
||||
From 036d209a3f1a771de9aed31dfbe804aaf91d1c27 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 23:35:21 -0500
|
||||
Subject: [PATCH] sandbox/linux: Implement partial support for ppc64 syscalls
|
||||
and ucontext
|
||||
|
||||
Unlike other architectures, the ppc64 files currently rely on applicable
|
||||
headers being provided by the system. It is sufficient for standard
|
||||
GNU/Linux environments, but may require expansion elsewhere.
|
||||
---
|
||||
sandbox/linux/BUILD.gn | 2 ++
|
||||
sandbox/linux/system_headers/linux_syscalls.h | 4 ++++
|
||||
sandbox/linux/system_headers/linux_ucontext.h | 2 ++
|
||||
sandbox/linux/system_headers/ppc64_linux_syscalls.h | 12 ++++++++++++
|
||||
sandbox/linux/system_headers/ppc64_linux_ucontext.h | 12 ++++++++++++
|
||||
5 files changed, 32 insertions(+)
|
||||
create mode 100644 sandbox/linux/system_headers/ppc64_linux_syscalls.h
|
||||
create mode 100644 sandbox/linux/system_headers/ppc64_linux_ucontext.h
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/BUILD.gn
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/BUILD.gn
|
||||
@@ -383,6 +383,8 @@ component("sandbox_services") {
|
||||
|
||||
source_set("sandbox_services_headers") {
|
||||
sources = [
|
||||
+ "system_headers/ppc64_linux_syscalls.h",
|
||||
+ "system_headers/ppc64_linux_ucontext.h",
|
||||
"system_headers/arm64_linux_syscalls.h",
|
||||
"system_headers/arm_linux_syscalls.h",
|
||||
"system_headers/arm_linux_ucontext.h",
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/system_headers/linux_syscalls.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/system_headers/linux_syscalls.h
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/system_headers/linux_syscalls.h
|
||||
@@ -35,5 +35,9 @@
|
||||
#include "sandbox/linux/system_headers/arm64_linux_syscalls.h"
|
||||
#endif
|
||||
|
||||
+#if defined(__powerpc64__)
|
||||
+#include "sandbox/linux/system_headers/ppc64_linux_syscalls.h"
|
||||
+#endif
|
||||
+
|
||||
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/system_headers/ppc64_linux_syscalls.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/system_headers/ppc64_linux_syscalls.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
|
||||
+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
|
||||
+
|
||||
+#include <asm/unistd.h>
|
||||
+
|
||||
+//TODO: is it necessary to redefine syscall numbers for PPC64?
|
||||
+
|
||||
+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/system_headers/ppc64_linux_ucontext.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/system_headers/ppc64_linux_ucontext.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
|
||||
+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
|
||||
+
|
||||
+#include <sys/ucontext.h>
|
||||
+
|
||||
+//TODO: is it necessary to redefine ucontext on PPC64?
|
||||
+
|
||||
+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
|
@ -1,22 +0,0 @@
|
||||
From c41cd6ac927f592b161abc04468d3c7a4be91995 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Tue, 23 Oct 2018 15:49:31 -0500
|
||||
Subject: [PATCH] sandbox/linux: Update IsSyscallAllowed in broker_process.cc
|
||||
|
||||
---
|
||||
sandbox/linux/syscall_broker/broker_process.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/syscall_broker/broker_process.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/syscall_broker/broker_process.cc
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/syscall_broker/broker_process.cc
|
||||
@@ -169,7 +169,7 @@ bool BrokerProcess::IsSyscallBrokerable(
|
||||
#if defined(__NR_fstatat64)
|
||||
case __NR_fstatat64:
|
||||
#endif
|
||||
-#if defined(__x86_64__) || defined(__aarch64__)
|
||||
+#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_newfstatat:
|
||||
#endif
|
||||
return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);
|
@ -1,638 +0,0 @@
|
||||
From da52663deec77f705d7d58b18484c3e28e563f10 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Tue, 18 Sep 2018 18:39:28 -0500
|
||||
Subject: [PATCH] sandbox/linux: Update syscall helpers/lists for ppc64
|
||||
|
||||
---
|
||||
.../seccomp-bpf-helpers/baseline_policy.cc | 8 +-
|
||||
.../syscall_parameters_restrictions.cc | 2 +-
|
||||
.../syscall_parameters_restrictions.h | 2 +-
|
||||
.../linux/seccomp-bpf-helpers/syscall_sets.cc | 108 ++++++++++--------
|
||||
.../linux/seccomp-bpf-helpers/syscall_sets.h | 6 +-
|
||||
sandbox/linux/services/syscall_wrappers.cc | 2 +-
|
||||
6 files changed, 73 insertions(+), 55 deletions(-)
|
||||
|
||||
Index: chromium-130.0.6723.44/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
+++ chromium-130.0.6723.44/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
@@ -90,7 +90,8 @@ bool IsBaselinePolicyWatched(int sysno)
|
||||
SyscallSets::IsPrctl(sysno) ||
|
||||
SyscallSets::IsProcessGroupOrSession(sysno) ||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
SyscallSets::IsSocketCall(sysno) ||
|
||||
#endif
|
||||
#if defined(__arm__)
|
||||
@@ -255,7 +256,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
|
||||
}
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
if (sysno == __NR_mmap)
|
||||
return RestrictMmapFlags();
|
||||
#endif
|
||||
@@ -276,7 +277,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
|
||||
return RestrictPrctl();
|
||||
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
if (sysno == __NR_socketpair) {
|
||||
// Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen.
|
||||
static_assert(AF_UNIX == PF_UNIX,
|
||||
@@ -340,7 +341,8 @@ ResultExpr EvaluateSyscallImpl(int fs_de
|
||||
}
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
if (SyscallSets::IsSocketCall(sysno))
|
||||
return RestrictSocketcallCommand();
|
||||
#endif
|
||||
Index: chromium-130.0.6723.44/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||
+++ chromium-130.0.6723.44/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "sandbox/linux/system_headers/linux_time.h"
|
||||
|
||||
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
|
||||
- !defined(__arm__) && !defined(__aarch64__) && \
|
||||
+ !defined(__arm__) && !defined(__aarch64__) && !defined(__powerpc64__) && \
|
||||
!defined(PTRACE_GET_THREAD_AREA)
|
||||
// Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance
|
||||
// the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA.
|
||||
@@ -45,6 +45,11 @@
|
||||
#include <asm/ptrace-abi.h>
|
||||
#endif
|
||||
|
||||
+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h
|
||||
+#ifdef __powerpc64__
|
||||
+#include <termios.h>
|
||||
+#endif
|
||||
+
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if !defined(F_DUPFD_CLOEXEC)
|
||||
@@ -102,6 +107,15 @@ inline bool IsArchitectureMips() {
|
||||
#endif
|
||||
}
|
||||
|
||||
+inline bool IsArchitecturePPC64() {
|
||||
+#if defined(__powerpc64__)
|
||||
+ return true;
|
||||
+#else
|
||||
+ return false;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+
|
||||
// Ubuntu's version of glibc has a race condition in sem_post that can cause
|
||||
// it to call futex(2) with bogus op arguments. To workaround this, we need
|
||||
// to allow those futex(2) calls to fail with EINVAL, instead of crashing the
|
||||
@@ -269,9 +283,11 @@ ResultExpr RestrictFcntlCommands() {
|
||||
// operator.
|
||||
// Glibc overrides the kernel's O_LARGEFILE value. Account for this.
|
||||
uint64_t kOLargeFileFlag = O_LARGEFILE;
|
||||
- if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips())
|
||||
+ if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips() \
|
||||
+ || IsArchitecturePPC64())
|
||||
kOLargeFileFlag = 0100000;
|
||||
|
||||
+
|
||||
const Arg<int> cmd(1);
|
||||
const Arg<long> long_arg(2);
|
||||
|
||||
@@ -294,8 +310,17 @@ ResultExpr RestrictFcntlCommands() {
|
||||
F_SETLKW,
|
||||
F_GETLK,
|
||||
F_DUPFD,
|
||||
- F_DUPFD_CLOEXEC},
|
||||
- Allow())
|
||||
+ F_DUPFD_CLOEXEC
|
||||
+#if defined(__powerpc64__)
|
||||
+// On PPC64, F_SETLK, F_GETLK, F_SETLKW are defined as the 64-bit variants
|
||||
+// but glibc will sometimes still use the 32-bit versions. Allow both.
|
||||
+ ,
|
||||
+ 5, /* F_GETLK (32) */
|
||||
+ 6, /* F_SETLK (32) */
|
||||
+ 7 /* F_SETLKW (32) */
|
||||
+#endif
|
||||
+ },
|
||||
+ Allow())
|
||||
.Case(F_SETFL,
|
||||
If((long_arg & ~kAllowedMask) == 0, Allow()).Else(CrashSIGSYS()))
|
||||
.Case(F_ADD_SEALS,
|
||||
@@ -304,7 +329,7 @@ ResultExpr RestrictFcntlCommands() {
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
-#if defined(__i386__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__mips__) || defined(__powerpc64__)
|
||||
ResultExpr RestrictSocketcallCommand() {
|
||||
// Unfortunately, we are unable to restrict the first parameter to
|
||||
// socketpair(2). Whilst initially sounding bad, it's noteworthy that very
|
||||
@@ -463,7 +488,7 @@ ResultExpr RestrictPtrace() {
|
||||
#endif
|
||||
return Switch(request)
|
||||
.Cases({
|
||||
-#if !defined(__aarch64__)
|
||||
+#if !defined(__aarch64__) && !defined(__powerpc64__)
|
||||
PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_GET_THREAD_AREA,
|
||||
PTRACE_GETREGSET,
|
||||
#endif
|
||||
Index: chromium-130.0.6723.44/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
|
||||
+++ chromium-130.0.6723.44/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
|
||||
@@ -52,7 +52,7 @@ SANDBOX_EXPORT bpf_dsl::ResultExpr Restr
|
||||
// O_NONBLOCK | O_SYNC | O_LARGEFILE | O_CLOEXEC | O_NOATIME.
|
||||
SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictFcntlCommands();
|
||||
|
||||
-#if defined(__i386__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__mips__) || defined(__powerpc64__)
|
||||
// Restrict socketcall(2) to only allow socketpair(2), send(2), recv(2),
|
||||
// sendto(2), recvfrom(2), shutdown(2), sendmsg(2) and recvmsg(2).
|
||||
SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictSocketcallCommand();
|
||||
Index: chromium-130.0.6723.44/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
+++ chromium-130.0.6723.44/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
@@ -29,7 +29,8 @@ bool SyscallSets::IsAllowedGettime(int s
|
||||
switch (sysno) {
|
||||
case __NR_gettimeofday:
|
||||
#if defined(__i386__) || defined(__x86_64__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_time:
|
||||
#endif
|
||||
return true;
|
||||
@@ -52,12 +53,14 @@ bool SyscallSets::IsAllowedGettime(int s
|
||||
case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID().
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_ftime: // Obsolete.
|
||||
#endif
|
||||
case __NR_settimeofday: // Privileged.
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_stime:
|
||||
#endif
|
||||
default:
|
||||
@@ -136,7 +139,7 @@ bool SyscallSets::IsFileSystem(int sysno
|
||||
case __NR_faccessat2:
|
||||
case __NR_fchmodat:
|
||||
case __NR_fchownat: // Should be called chownat ?
|
||||
-#if defined(__x86_64__) || defined(__aarch64__)
|
||||
+#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_newfstatat: // fstatat(). EPERM not a valid errno.
|
||||
#elif defined(__i386__) || defined(__arm__) || \
|
||||
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
@@ -155,7 +158,7 @@ bool SyscallSets::IsFileSystem(int sysno
|
||||
case __NR_memfd_create:
|
||||
case __NR_mkdirat:
|
||||
case __NR_mknodat:
|
||||
-#if defined(__i386__)
|
||||
+#if defined(__i386__) || defined(__powerpc64__)
|
||||
case __NR_oldlstat:
|
||||
case __NR_oldstat:
|
||||
#endif
|
||||
@@ -169,7 +172,8 @@ bool SyscallSets::IsFileSystem(int sysno
|
||||
#endif
|
||||
case __NR_statfs: // EPERM not a valid errno.
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_statfs64:
|
||||
#endif
|
||||
case __NR_statx: // EPERM not a valid errno.
|
||||
@@ -180,7 +184,8 @@ bool SyscallSets::IsFileSystem(int sysno
|
||||
case __NR_truncate64:
|
||||
#endif
|
||||
case __NR_unlinkat:
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_utime:
|
||||
#endif
|
||||
case __NR_utimensat: // New.
|
||||
@@ -220,7 +225,8 @@ bool SyscallSets::IsAllowedFileSystemAcc
|
||||
#endif
|
||||
return true;
|
||||
// TODO(jln): these should be denied gracefully as well (moved below).
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_fadvise64: // EPERM not a valid errno.
|
||||
#endif
|
||||
#if defined(__i386__)
|
||||
@@ -233,11 +239,12 @@ bool SyscallSets::IsAllowedFileSystemAcc
|
||||
case __NR_flock: // EPERM not a valid errno.
|
||||
case __NR_fstatfs: // Give information about the whole filesystem.
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_fstatfs64:
|
||||
#endif
|
||||
case __NR_fsync: // EPERM not a valid errno.
|
||||
-#if defined(__i386__)
|
||||
+#if defined(__i386__) || defined(__powerpc64__)
|
||||
case __NR_oldfstat:
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
@@ -245,6 +252,8 @@ bool SyscallSets::IsAllowedFileSystemAcc
|
||||
case __NR_sync_file_range: // EPERM not a valid errno.
|
||||
#elif defined(__arm__)
|
||||
case __NR_arm_sync_file_range: // EPERM not a valid errno.
|
||||
+#elif defined(__powerpc64__)
|
||||
+ case __NR_sync_file_range2: // EPERM not a valid errno.
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
@@ -265,7 +274,8 @@ bool SyscallSets::IsDeniedFileSystemAcce
|
||||
#endif
|
||||
case __NR_getdents64: // EPERM not a valid errno.
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_readdir:
|
||||
#endif
|
||||
return true;
|
||||
@@ -306,7 +316,7 @@ bool SyscallSets::IsGetSimpleId(int sysn
|
||||
bool SyscallSets::IsProcessPrivilegeChange(int sysno) {
|
||||
switch (sysno) {
|
||||
case __NR_capset:
|
||||
-#if defined(__i386__) || defined(__x86_64__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc64__)
|
||||
case __NR_ioperm: // Intel privilege.
|
||||
case __NR_iopl: // Intel privilege.
|
||||
#endif
|
||||
@@ -362,7 +372,8 @@ bool SyscallSets::IsAllowedSignalHandlin
|
||||
// overflow.
|
||||
case __NR_sigaltstack:
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_rt_sigtimedwait_time64:
|
||||
case __NR_sigaction:
|
||||
case __NR_sigprocmask:
|
||||
@@ -378,7 +389,8 @@ bool SyscallSets::IsAllowedSignalHandlin
|
||||
#endif
|
||||
case __NR_signalfd4:
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_sigpending:
|
||||
case __NR_sigsuspend:
|
||||
#endif
|
||||
@@ -402,7 +414,7 @@ bool SyscallSets::IsAllowedOperationOnFd
|
||||
#endif
|
||||
case __NR_dup3:
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_shutdown:
|
||||
#endif
|
||||
return true;
|
||||
@@ -435,7 +447,7 @@ bool SyscallSets::IsAllowedProcessStartO
|
||||
case __NR_exit_group:
|
||||
case __NR_wait4:
|
||||
case __NR_waitid:
|
||||
-#if defined(__i386__)
|
||||
+#if defined(__i386__) || defined(__powerpc64__)
|
||||
case __NR_waitpid:
|
||||
#endif
|
||||
return true;
|
||||
@@ -452,7 +464,7 @@ bool SyscallSets::IsAllowedProcessStartO
|
||||
#endif
|
||||
case __NR_set_tid_address:
|
||||
case __NR_unshare:
|
||||
-#if !defined(__mips__) && !defined(__aarch64__)
|
||||
+#if !defined(__mips__) && !defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_vfork:
|
||||
#endif
|
||||
default:
|
||||
@@ -499,7 +511,7 @@ bool SyscallSets::IsAllowedEpoll(int sys
|
||||
bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) {
|
||||
switch (sysno) {
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_accept:
|
||||
case __NR_accept4:
|
||||
case __NR_bind:
|
||||
@@ -514,7 +526,8 @@ bool SyscallSets::IsDeniedGetOrModifySoc
|
||||
}
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// Big multiplexing system call for sockets.
|
||||
bool SyscallSets::IsSocketCall(int sysno) {
|
||||
switch (sysno) {
|
||||
@@ -528,7 +541,8 @@ bool SyscallSets::IsSocketCall(int sysno
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(__x86_64__) || defined(__arm__) || defined(__mips__)
|
||||
+#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
bool SyscallSets::IsNetworkSocketInformation(int sysno) {
|
||||
switch (sysno) {
|
||||
case __NR_getpeername:
|
||||
@@ -554,7 +568,7 @@ bool SyscallSets::IsAllowedAddressSpaceA
|
||||
case __NR_mincore:
|
||||
case __NR_mlockall:
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_mmap:
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
@@ -584,7 +598,8 @@ bool SyscallSets::IsAllowedGeneralIo(int
|
||||
switch (sysno) {
|
||||
case __NR_lseek:
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR__llseek:
|
||||
#endif
|
||||
#if !defined(__aarch64__)
|
||||
@@ -604,26 +619,28 @@ bool SyscallSets::IsAllowedGeneralIo(int
|
||||
case __NR_readv:
|
||||
case __NR_pread64:
|
||||
#if defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_recv:
|
||||
#endif
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_recvfrom: // Could specify source.
|
||||
case __NR_recvmsg: // Could specify source.
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__x86_64__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc64__)
|
||||
case __NR_select:
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__arm__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__arm__) || defined(__mips__) || defined(__powerpc64__)
|
||||
case __NR__newselect:
|
||||
#endif
|
||||
#if defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_send:
|
||||
#endif
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_sendmsg: // Could specify destination.
|
||||
case __NR_sendto: // Could specify destination.
|
||||
#endif
|
||||
@@ -679,7 +696,8 @@ bool SyscallSets::IsAllowedBasicSchedule
|
||||
return true;
|
||||
case __NR_getpriority:
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_nice:
|
||||
#endif
|
||||
case __NR_setpriority:
|
||||
@@ -691,7 +709,8 @@ bool SyscallSets::IsAllowedBasicSchedule
|
||||
bool SyscallSets::IsAdminOperation(int sysno) {
|
||||
switch (sysno) {
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_bdflush:
|
||||
#endif
|
||||
case __NR_kexec_load:
|
||||
@@ -707,7 +726,8 @@ bool SyscallSets::IsAdminOperation(int s
|
||||
|
||||
bool SyscallSets::IsKernelModule(int sysno) {
|
||||
switch (sysno) {
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_create_module:
|
||||
case __NR_get_kernel_syms: // Should ENOSYS.
|
||||
case __NR_query_module:
|
||||
@@ -740,7 +760,8 @@ bool SyscallSets::IsFsControl(int sysno)
|
||||
case __NR_swapoff:
|
||||
case __NR_swapon:
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_umount:
|
||||
#endif
|
||||
case __NR_umount2:
|
||||
@@ -756,7 +777,7 @@ bool SyscallSets::IsNuma(int sysno) {
|
||||
case __NR_getcpu:
|
||||
case __NR_mbind:
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_migrate_pages:
|
||||
#endif
|
||||
case __NR_move_pages:
|
||||
@@ -791,14 +812,15 @@ bool SyscallSets::IsGlobalProcessEnviron
|
||||
switch (sysno) {
|
||||
case __NR_acct: // Privileged.
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_getrlimit:
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__arm__)
|
||||
+#if defined(__i386__) || defined(__arm__) || defined(__powerpc64__)
|
||||
case __NR_ugetrlimit:
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_ulimit:
|
||||
#endif
|
||||
case __NR_getrusage:
|
||||
@@ -832,7 +854,7 @@ bool SyscallSets::IsGlobalSystemStatus(i
|
||||
#endif
|
||||
case __NR_sysinfo:
|
||||
case __NR_uname:
|
||||
-#if defined(__i386__)
|
||||
+#if defined(__i386__) || defined(__powerpc64__)
|
||||
case __NR_olduname:
|
||||
case __NR_oldolduname:
|
||||
#endif
|
||||
@@ -916,7 +938,8 @@ bool SyscallSets::IsSystemVSemaphores(in
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
|
||||
defined(__aarch64__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// These give a lot of ambient authority and bypass the setuid sandbox.
|
||||
bool SyscallSets::IsSystemVSharedMemory(int sysno) {
|
||||
switch (sysno) {
|
||||
@@ -947,7 +970,8 @@ bool SyscallSets::IsSystemVMessageQueue(
|
||||
#endif
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// Big system V multiplexing system call.
|
||||
bool SyscallSets::IsSystemVIpc(int sysno) {
|
||||
switch (sysno) {
|
||||
@@ -967,7 +991,8 @@ bool SyscallSets::IsAnySystemV(int sysno
|
||||
return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) ||
|
||||
IsSystemVSharedMemory(sysno);
|
||||
#elif defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
return IsSystemVIpc(sysno);
|
||||
#endif
|
||||
}
|
||||
@@ -1024,7 +1049,8 @@ bool SyscallSets::IsFaNotify(int sysno)
|
||||
bool SyscallSets::IsTimer(int sysno) {
|
||||
switch (sysno) {
|
||||
case __NR_getitimer:
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_alarm:
|
||||
#endif
|
||||
case __NR_setitimer:
|
||||
@@ -1103,18 +1129,22 @@ bool SyscallSets::IsMisc(int sysno) {
|
||||
case __NR_syncfs:
|
||||
case __NR_vhangup:
|
||||
// The system calls below are not implemented.
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_afs_syscall:
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_break:
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_getpmsg:
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_gtty:
|
||||
case __NR_idle:
|
||||
case __NR_lock:
|
||||
@@ -1122,20 +1152,22 @@ bool SyscallSets::IsMisc(int sysno) {
|
||||
case __NR_prof:
|
||||
case __NR_profil:
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_putpmsg:
|
||||
#endif
|
||||
#if defined(__x86_64__)
|
||||
case __NR_security:
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_stty:
|
||||
#endif
|
||||
-#if defined(__x86_64__)
|
||||
+#if defined(__x86_64__) || defined(__powerpc64__)
|
||||
case __NR_tuxcall:
|
||||
#endif
|
||||
-#if !defined(__aarch64__)
|
||||
+#if !defined(__aarch64__) && !defined(__powerpc64__)
|
||||
case __NR_vserver:
|
||||
#endif
|
||||
return true;
|
||||
Index: chromium-130.0.6723.44/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
|
||||
+++ chromium-130.0.6723.44/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
|
||||
@@ -46,13 +46,14 @@ class SANDBOX_EXPORT SyscallSets {
|
||||
static bool IsDeniedGetOrModifySocket(int sysno);
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// Big multiplexing system call for sockets.
|
||||
static bool IsSocketCall(int sysno);
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
static bool IsNetworkSocketInformation(int sysno);
|
||||
#endif
|
||||
|
||||
@@ -84,7 +85,8 @@ class SANDBOX_EXPORT SyscallSets {
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
|
||||
defined(__aarch64__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// These give a lot of ambient authority and bypass the setuid sandbox.
|
||||
static bool IsSystemVSharedMemory(int sysno);
|
||||
#endif
|
||||
@@ -95,7 +97,8 @@ class SANDBOX_EXPORT SyscallSets {
|
||||
#endif
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// Big system V multiplexing system call.
|
||||
static bool IsSystemVIpc(int sysno);
|
||||
#endif
|
||||
Index: chromium-130.0.6723.44/sandbox/linux/services/syscall_wrappers.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/sandbox/linux/services/syscall_wrappers.cc
|
||||
+++ chromium-130.0.6723.44/sandbox/linux/services/syscall_wrappers.cc
|
||||
@@ -61,7 +61,7 @@ long sys_clone(unsigned long flags,
|
||||
#if defined(ARCH_CPU_X86_64)
|
||||
return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls);
|
||||
#elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \
|
||||
- defined(ARCH_CPU_MIPS_FAMILY)
|
||||
+ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_PPC64_FAMILY)
|
||||
// CONFIG_CLONE_BACKWARDS defined.
|
||||
return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid);
|
||||
#endif
|
@ -1,27 +0,0 @@
|
||||
From c9043a422fb4a5a6c72aaa1b907cea5f6a3061dd Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 19:10:24 -0500
|
||||
Subject: [PATCH 1/4] sandbox/linux/bpf_dsl: Update syscall ranges for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/bpf_dsl/linux_syscall_ranges.h | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
@@ -56,6 +56,13 @@
|
||||
#define MAX_PUBLIC_SYSCALL __NR_syscalls
|
||||
#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
|
||||
|
||||
+#elif defined(__powerpc64__)
|
||||
+
|
||||
+#include <asm/unistd.h>
|
||||
+#define MIN_SYSCALL 0u
|
||||
+#define MAX_PUBLIC_SYSCALL 386u
|
||||
+#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
|
||||
+
|
||||
#else
|
||||
#error "Unsupported architecture"
|
||||
#endif
|
@ -1,26 +0,0 @@
|
||||
From 7468b266532bd607eb1f5292d758256d800b2eee Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Fri, 10 Aug 2018 00:23:50 -0500
|
||||
Subject: [PATCH] services/service_manager/sandbox/linux: Fix TCGETS
|
||||
declaration on PPC64
|
||||
|
||||
---
|
||||
.../sandbox/linux/bpf_renderer_policy_linux.cc | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
+++ chromium-128.0.6613.113/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
@@ -15,6 +15,11 @@
|
||||
#include "sandbox/linux/system_headers/linux_syscalls.h"
|
||||
#include "sandbox/policy/linux/sandbox_linux.h"
|
||||
|
||||
+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h
|
||||
+#ifdef __powerpc64__
|
||||
+#include <termios.h>
|
||||
+#endif
|
||||
+
|
||||
// TODO(vignatti): replace the local definitions below with #include
|
||||
// <linux/dma-buf.h> once kernel version 4.6 becomes widely used.
|
||||
#include <linux/types.h>
|
@ -1,11 +0,0 @@
|
||||
--- a/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn
|
||||
+++ b/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn
|
||||
@@ -1258,6 +1258,8 @@
|
||||
"llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp",
|
||||
"llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp",
|
||||
"llvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp",
|
||||
+ "llvm/lib/MC/MCXCOFFObjectTargetWriter.cpp",
|
||||
+ "llvm/lib/MC/MCAsmInfoXCOFF.cpp",
|
||||
]
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
Index: chromium-128.0.6613.113/third_party/angle/src/libANGLE/Constants.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/angle/src/libANGLE/Constants.h
|
||||
+++ chromium-128.0.6613.113/third_party/angle/src/libANGLE/Constants.h
|
||||
@@ -9,6 +9,7 @@
|
||||
#ifndef LIBANGLE_CONSTANTS_H_
|
||||
#define LIBANGLE_CONSTANTS_H_
|
||||
|
||||
+#include <cstddef>
|
||||
#include "common/platform.h"
|
||||
|
||||
#include <stddef.h>
|
@ -1,23 +0,0 @@
|
||||
From cc613c2e3bac8d4d1ff153700b819f964435923a Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Tue, 4 Sep 2018 18:16:07 -0500
|
||||
Subject: [PATCH] third_party/libvpx: Properly generate gni on ppc64
|
||||
|
||||
---
|
||||
third_party/libvpx/BUILD.gn | 2 ++
|
||||
third_party/libvpx/generate_gni.sh | 10 ++++++++++
|
||||
2 files changed, 12 insertions(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/third_party/libvpx/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/libvpx/BUILD.gn
|
||||
+++ chromium-128.0.6613.113/third_party/libvpx/BUILD.gn
|
||||
@@ -320,6 +320,8 @@ if (current_cpu == "x86" || (current_cpu
|
||||
} else if (current_cpu == "x64") {
|
||||
deps = [ ":libvpx_x86_64_headers" ]
|
||||
sources = libvpx_srcs_x86_64_avx512
|
||||
+ } else if (current_cpu == "ppc64") {
|
||||
+ sources = libvpx_srcs_ppc64
|
||||
}
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
Index: chromium-128.0.6613.113/third_party/lss/linux_syscall_support.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/lss/linux_syscall_support.h
|
||||
+++ chromium-128.0.6613.113/third_party/lss/linux_syscall_support.h
|
||||
@@ -4638,7 +4638,7 @@ struct kernel_statx {
|
||||
LSS_REG(2, buf);
|
||||
LSS_BODY(void*, mmap2, "0"(__r2));
|
||||
}
|
||||
-#else
|
||||
+#elif !defined(__powerpc64__) /* ppc64 doesn't have mmap2 */
|
||||
#define __NR__mmap2 __NR_mmap2
|
||||
LSS_INLINE _syscall6(void*, _mmap2, void*, s,
|
||||
size_t, l, int, p,
|
||||
@@ -4749,7 +4749,7 @@ struct kernel_statx {
|
||||
#if defined(__i386__) || \
|
||||
defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \
|
||||
(defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) || \
|
||||
- defined(__PPC__) || \
|
||||
+ (defined(__PPC__) && !defined(__powerpc64__)) || \
|
||||
(defined(__s390__) && !defined(__s390x__))
|
||||
/* On these architectures, implement mmap() with mmap2(). */
|
||||
LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d,
|
@ -1,22 +0,0 @@
|
||||
From 63e63a70766f3059ce5f1d06a95988ecf909b298 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawn@anastas.io>
|
||||
Date: Wed, 24 Apr 2019 21:17:23 -0500
|
||||
Subject: [PATCH] third_party/pffft: Include altivec.h on ppc64 with SIMD
|
||||
enabled
|
||||
|
||||
---
|
||||
third_party/pffft/src/pffft.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/third_party/pffft/src/pffft.c
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/pffft/src/pffft.c
|
||||
+++ chromium-128.0.6613.113/third_party/pffft/src/pffft.c
|
||||
@@ -100,6 +100,7 @@
|
||||
Altivec support macros
|
||||
*/
|
||||
#if !defined(PFFFT_SIMD_DISABLE) && (defined(__ppc__) || defined(__ppc64__))
|
||||
+#include <altivec.h>
|
||||
typedef vector float v4sf;
|
||||
# define SIMD_SZ 4
|
||||
# define VZERO() ((vector float) vec_splat_u8(0))
|
File diff suppressed because it is too large
Load Diff
@ -1,18 +0,0 @@
|
||||
Index: chromium-128.0.6613.113/v8/src/base/immediate-crash.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/v8/src/base/immediate-crash.h
|
||||
+++ chromium-128.0.6613.113/v8/src/base/immediate-crash.h
|
||||
@@ -98,6 +98,13 @@
|
||||
#define TRAP_SEQUENCE1_() asm volatile(".2byte 0x0001");
|
||||
#define TRAP_SEQUENCE2_() asm volatile("")
|
||||
|
||||
+#elif V8_HOST_ARCH_PPC64
|
||||
+
|
||||
+#define TRAP_SEQUENCE1_() asm volatile("trap")
|
||||
+// Intentionally empty: __builtin_unreachable() is always part of the sequence
|
||||
+// (see IMMEDIATE_CRASH below)
|
||||
+#define TRAP_SEQUENCE2_() asm volatile("")
|
||||
+
|
||||
#else
|
||||
|
||||
// Crash report accuracy will not be guaranteed on other architectures, but at
|
@ -1,21 +0,0 @@
|
||||
From 82922bf486e9926a171152f61030dfcd53f017b8 Mon Sep 17 00:00:00 2001
|
||||
From: Timothy Pearson <tpearson@raptorengineering.com>
|
||||
Date: Thu, 30 Aug 2018 17:32:05 -0500
|
||||
Subject: [PATCH] Include cstddef to fix build
|
||||
|
||||
size_t is not defined unless cstddef is included.
|
||||
---
|
||||
third_party/crashpad/crashpad/compat/linux/sys/user.h | 1 +
|
||||
|
||||
Index: chromium-127.0.6533.72/third_party/crashpad/crashpad/compat/linux/sys/user.h
|
||||
===================================================================
|
||||
--- chromium-127.0.6533.72.orig/third_party/crashpad/crashpad/compat/linux/sys/user.h
|
||||
+++ chromium-127.0.6533.72/third_party/crashpad/crashpad/compat/linux/sys/user.h
|
||||
@@ -15,6 +15,7 @@
|
||||
#ifndef CRASHPAD_COMPAT_LINUX_SYS_USER_H_
|
||||
#define CRASHPAD_COMPAT_LINUX_SYS_USER_H_
|
||||
|
||||
+#include <cstddef>
|
||||
#include_next <sys/user.h>
|
||||
|
||||
#include <features.h>
|
@ -1,76 +0,0 @@
|
||||
From 3c4705bfdda45feb860a1f121631773e5fe8e53f Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 19:11:26 -0500
|
||||
Subject: [PATCH 1/4] sandbox/linux/bpf_dsl: Modify seccomp_macros to add
|
||||
support for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/bpf_dsl/seccomp_macros.h | 43 ++++++++++++++++++++++++++
|
||||
1 file changed, 43 insertions(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/bpf_dsl/seccomp_macros.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/bpf_dsl/seccomp_macros.h
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/bpf_dsl/seccomp_macros.h
|
||||
@@ -14,6 +14,9 @@
|
||||
#if defined(__mips__)
|
||||
// sys/user.h in eglibc misses size_t definition
|
||||
#include <stddef.h>
|
||||
+#elif defined(__powerpc64__)
|
||||
+// Manually define greg_t on ppc64
|
||||
+typedef unsigned long long greg_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -343,6 +346,51 @@ struct regs_struct {
|
||||
#define SECCOMP_PT_PARM4(_regs) (_regs).regs[3]
|
||||
#define SECCOMP_PT_PARM5(_regs) (_regs).regs[4]
|
||||
#define SECCOMP_PT_PARM6(_regs) (_regs).regs[5]
|
||||
+
|
||||
+#elif defined(__powerpc64__)
|
||||
+#include <asm/ptrace.h>
|
||||
+
|
||||
+typedef struct pt_regs regs_struct;
|
||||
+
|
||||
+#ifdef ARCH_CPU_LITTLE_ENDIAN
|
||||
+#define SECCOMP_ARCH AUDIT_ARCH_PPC64LE
|
||||
+#else
|
||||
+#define SECCOMP_ARCH AUDIT_ARCH_PPC64
|
||||
+#endif
|
||||
+
|
||||
+#define SECCOMP_REG(_ctx, _reg) ((_ctx)->uc_mcontext.regs->gpr[_reg])
|
||||
+
|
||||
+#define SECCOMP_RESULT(_ctx) SECCOMP_REG(_ctx, 3)
|
||||
+#define SECCOMP_SYSCALL(_ctx) SECCOMP_REG(_ctx, 0)
|
||||
+#define SECCOMP_IP(_ctx) (_ctx)->uc_mcontext.regs->nip
|
||||
+#define SECCOMP_PARM1(_ctx) SECCOMP_REG(_ctx, 3)
|
||||
+#define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, 4)
|
||||
+#define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, 5)
|
||||
+#define SECCOMP_PARM4(_ctx) SECCOMP_REG(_ctx, 6)
|
||||
+#define SECCOMP_PARM5(_ctx) SECCOMP_REG(_ctx, 7)
|
||||
+#define SECCOMP_PARM6(_ctx) SECCOMP_REG(_ctx, 8)
|
||||
+
|
||||
+#define SECCOMP_NR_IDX (offsetof(struct arch_seccomp_data, nr))
|
||||
+#define SECCOMP_ARCH_IDX (offsetof(struct arch_seccomp_data, arch))
|
||||
+#define SECCOMP_IP_MSB_IDX \
|
||||
+ (offsetof(struct arch_seccomp_data, instruction_pointer) + 4)
|
||||
+#define SECCOMP_IP_LSB_IDX \
|
||||
+ (offsetof(struct arch_seccomp_data, instruction_pointer) + 0)
|
||||
+#define SECCOMP_ARG_MSB_IDX(nr) \
|
||||
+ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 4)
|
||||
+#define SECCOMP_ARG_LSB_IDX(nr) \
|
||||
+ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 0)
|
||||
+
|
||||
+#define SECCOMP_PT_RESULT(_regs) (_regs).gpr[3]
|
||||
+#define SECCOMP_PT_SYSCALL(_regs) (_regs).gpr[0]
|
||||
+#define SECCOMP_PT_IP(_regs) (_regs).nip
|
||||
+#define SECCOMP_PT_PARM1(_regs) (_regs).gpr[3]
|
||||
+#define SECCOMP_PT_PARM2(_regs) (_regs).gpr[4]
|
||||
+#define SECCOMP_PT_PARM3(_regs) (_regs).gpr[5]
|
||||
+#define SECCOMP_PT_PARM4(_regs) (_regs).gpr[6]
|
||||
+#define SECCOMP_PT_PARM5(_regs) (_regs).gpr[7]
|
||||
+#define SECCOMP_PT_PARM6(_regs) (_regs).gpr[8]
|
||||
+
|
||||
#else
|
||||
#error Unsupported target platform
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,168 +0,0 @@
|
||||
Index: chromium-128.0.6613.113/third_party/lss/linux_syscall_support.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/lss/linux_syscall_support.h
|
||||
+++ chromium-128.0.6613.113/third_party/lss/linux_syscall_support.h
|
||||
@@ -87,7 +87,7 @@
|
||||
* Porting to other related platforms should not be difficult.
|
||||
*/
|
||||
#if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) || \
|
||||
- defined(__mips__) || defined(__PPC__) || defined(__ARM_EABI__) || \
|
||||
+ defined(__mips__) || defined(__PPC__) || defined(__powerpc64__) || defined(__ARM_EABI__) || \
|
||||
defined(__aarch64__) || defined(__s390__) || defined(__e2k__) || \
|
||||
(defined(__riscv) && __riscv_xlen == 64) || defined(__loongarch_lp64)) \
|
||||
&& (defined(__linux) || defined(__ANDROID__))
|
||||
@@ -399,7 +399,7 @@ struct kernel_stat64 {
|
||||
unsigned __pad2;
|
||||
unsigned long long st_blocks;
|
||||
};
|
||||
-#elif defined __PPC__
|
||||
+#elif defined __PPC__ && !defined(__powerpc64__)
|
||||
struct kernel_stat64 {
|
||||
unsigned long long st_dev;
|
||||
unsigned long long st_ino;
|
||||
@@ -421,6 +421,28 @@ struct kernel_stat64 {
|
||||
unsigned long __unused4;
|
||||
unsigned long __unused5;
|
||||
};
|
||||
+#elif defined(__powerpc64__)
|
||||
+struct kernel_stat64 {
|
||||
+ unsigned long int st_dev;
|
||||
+ unsigned long int st_ino;
|
||||
+ unsigned int st_mode;
|
||||
+ unsigned long int st_nlink;
|
||||
+ unsigned int st_uid;
|
||||
+ unsigned int st_gid;
|
||||
+ unsigned long int st_rdev;
|
||||
+ unsigned short int __pad2;
|
||||
+ long int st_size;
|
||||
+ long int st_blksize;
|
||||
+ long int st_blocks;
|
||||
+ long int st_atime_;
|
||||
+ unsigned long int st_atime_nsec_;
|
||||
+ long int st_mtime_;
|
||||
+ unsigned long int st_mtime_nsec_;
|
||||
+ long int st_ctime_;
|
||||
+ unsigned long int st_ctime_nsec_;
|
||||
+ unsigned long int __unused4;
|
||||
+ unsigned long int __unused5;
|
||||
+};
|
||||
#elif defined(__e2k__)
|
||||
struct kernel_stat64 {
|
||||
unsigned long long st_dev;
|
||||
@@ -537,7 +559,7 @@ struct kernel_stat {
|
||||
uint64_t st_ctime_nsec_;
|
||||
int64_t __unused4[3];
|
||||
};
|
||||
-#elif defined(__PPC__)
|
||||
+#elif defined(__PPC__) && !defined(__powerpc64__)
|
||||
typedef unsigned long kernel_blkcnt_t;
|
||||
typedef unsigned long kernel_blksize_t;
|
||||
typedef unsigned kernel_dev_t;
|
||||
@@ -568,6 +590,37 @@ struct kernel_stat {
|
||||
unsigned long __unused4;
|
||||
unsigned long __unused5;
|
||||
};
|
||||
+#elif defined(__powerpc64__)
|
||||
+typedef long int kernel_blkcnt_t;
|
||||
+typedef long int kernel_blksize_t;
|
||||
+typedef unsigned long int kernel_dev_t;
|
||||
+typedef unsigned int kernel_gid_t;
|
||||
+typedef unsigned long int kernel_ino_t;
|
||||
+typedef unsigned int kernel_mode_t;
|
||||
+typedef unsigned long int kernel_nlink_t;
|
||||
+typedef long int kernel_off_t;
|
||||
+typedef long int kernel_time_t;
|
||||
+typedef unsigned int kernel_uid_t;
|
||||
+struct kernel_stat {
|
||||
+ kernel_dev_t st_dev;
|
||||
+ kernel_ino_t st_ino;
|
||||
+ kernel_mode_t st_mode;
|
||||
+ kernel_nlink_t st_nlink;
|
||||
+ kernel_uid_t st_uid;
|
||||
+ kernel_gid_t st_gid;
|
||||
+ kernel_dev_t st_rdev;
|
||||
+ kernel_off_t st_size;
|
||||
+ kernel_blksize_t st_blksize;
|
||||
+ kernel_blkcnt_t st_blocks;
|
||||
+ kernel_time_t st_atime_;
|
||||
+ unsigned long int st_atime_nsec_;
|
||||
+ kernel_time_t st_mtime_;
|
||||
+ unsigned long int st_mtime_nsec_;
|
||||
+ kernel_time_t st_ctime_;
|
||||
+ unsigned long int st_ctime_nsec_;
|
||||
+ unsigned long int __unused4;
|
||||
+ unsigned long int __unused5;
|
||||
+};
|
||||
#elif (defined(__mips__) && _MIPS_SIM != _MIPS_SIM_ABI64)
|
||||
typedef int kernel_blkcnt_t;
|
||||
typedef int kernel_blksize_t;
|
||||
@@ -1824,6 +1877,28 @@ struct kernel_statx {
|
||||
#ifndef __NR_getcpu
|
||||
#define __NR_getcpu 302
|
||||
#endif
|
||||
+
|
||||
+/* Linux commit 86250b9d12caa1a3dee12a7cf638b7dd70eaadb6 (2010) adds
|
||||
+ * direct socket system calls to PPC */
|
||||
+#ifndef __NR_socket
|
||||
+#define __NR_socket 326
|
||||
+#endif
|
||||
+#ifndef __NR_socketpair
|
||||
+#define __NR_socketpair 333
|
||||
+#endif
|
||||
+#ifndef __NR_sendto
|
||||
+#define __NR_sendto 335
|
||||
+#endif
|
||||
+#ifndef __NR_shutdown
|
||||
+#define __NR_shutdown 338
|
||||
+#endif
|
||||
+#ifndef __NR_sendmsg
|
||||
+#define __NR_sendmsg 341
|
||||
+#endif
|
||||
+#ifndef __NR_recvmsg
|
||||
+#define __NR_recvmsg 342
|
||||
+#endif
|
||||
+
|
||||
/* End of powerpc defininitions */
|
||||
#elif defined(__s390__)
|
||||
#ifndef __NR_quotactl
|
||||
@@ -3363,6 +3438,11 @@ struct kernel_statx {
|
||||
/* TODO(csilvers): consider wrapping some args up in a struct, like we
|
||||
* do for i386's _syscall6, so we can compile successfully on gcc 2.95
|
||||
*/
|
||||
+ #ifdef __powerpc64__
|
||||
+ /* TODO: implement clone() for ppc64.
|
||||
+ * until then, use system libc */
|
||||
+ #define sys_clone clone
|
||||
+ #else
|
||||
LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack,
|
||||
int flags, void *arg, int *parent_tidptr,
|
||||
void *newtls, int *child_tidptr) {
|
||||
@@ -3433,6 +3513,7 @@ struct kernel_statx {
|
||||
}
|
||||
LSS_RETURN(int, __ret, __err);
|
||||
}
|
||||
+ #endif
|
||||
#elif defined(__s390__)
|
||||
#undef LSS_REG
|
||||
#define LSS_REG(r, a) register unsigned long __r##r __asm__("r"#r) = (unsigned long) a
|
||||
@@ -4783,7 +4864,7 @@ struct kernel_statx {
|
||||
LSS_INLINE _syscall6(void*, mmap, void*, addr, size_t, length, int, prot,
|
||||
int, flags, int, fd, int64_t, offset)
|
||||
#endif
|
||||
- #if defined(__PPC__)
|
||||
+ #if defined(__PPC__) && !defined(__powerpc64__)
|
||||
#undef LSS_SC_LOADARGS_0
|
||||
#define LSS_SC_LOADARGS_0(dummy...)
|
||||
#undef LSS_SC_LOADARGS_1
|
||||
@@ -5173,7 +5254,11 @@ struct kernel_statx {
|
||||
#endif
|
||||
|
||||
#if !defined(__NR_pipe)
|
||||
+#if defined(__powerpc64__)
|
||||
+ LSS_INLINE pid_t LSS_NAME(pipe)(int *pipefd) {
|
||||
+#else
|
||||
LSS_INLINE int LSS_NAME(pipe)(int *pipefd) {
|
||||
+#endif
|
||||
return LSS_NAME(pipe2)(pipefd, 0);
|
||||
}
|
||||
#endif
|
@ -1,37 +0,0 @@
|
||||
From cca78240860abb63bbcfe94d1e5f04a1f23c527d Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 19:11:56 -0500
|
||||
Subject: [PATCH 3/4] sandbox/linux/system_headers: Update linux seccomp header
|
||||
for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/system_headers/linux_seccomp.h | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/system_headers/linux_seccomp.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/system_headers/linux_seccomp.h
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/system_headers/linux_seccomp.h
|
||||
@@ -38,6 +38,9 @@
|
||||
#ifndef EM_AARCH64
|
||||
#define EM_AARCH64 183
|
||||
#endif
|
||||
+#ifndef EM_PPC64
|
||||
+#define EM_PPC64 21
|
||||
+#endif
|
||||
|
||||
#ifndef __AUDIT_ARCH_64BIT
|
||||
#define __AUDIT_ARCH_64BIT 0x80000000
|
||||
@@ -70,6 +73,12 @@
|
||||
#ifndef AUDIT_ARCH_AARCH64
|
||||
#define AUDIT_ARCH_AARCH64 (EM_AARCH64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE)
|
||||
#endif
|
||||
+#ifndef AUDIT_ARCH_PPC64
|
||||
+#define AUDIT_ARCH_PPC64 (EM_PPC64 | __AUDIT_ARCH_64BIT)
|
||||
+#endif
|
||||
+#ifndef AUDIT_ARCH_PPC64LE
|
||||
+#define AUDIT_ARCH_PPC64LE (EM_PPC64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE)
|
||||
+#endif
|
||||
|
||||
// For prctl.h
|
||||
#ifndef PR_SET_SECCOMP
|
File diff suppressed because it is too large
Load Diff
@ -1,23 +0,0 @@
|
||||
From 298df3dc44f7121cd8cb9a06b29fa3b16c959b8d Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 19:13:25 -0500
|
||||
Subject: [PATCH 4/4] sandbox/linux/system_headers: Update linux signal header
|
||||
for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/system_headers/linux_signal.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/system_headers/linux_signal.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/system_headers/linux_signal.h
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/system_headers/linux_signal.h
|
||||
@@ -13,7 +13,7 @@
|
||||
// (not undefined, but defined different values and in different memory
|
||||
// layouts). So, fill the gap here.
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
|
||||
#define LINUX_SIGHUP 1
|
||||
#define LINUX_SIGINT 2
|
@ -1,17 +0,0 @@
|
||||
Index: chromium-128.0.6613.113/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
+++ chromium-128.0.6613.113/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
@@ -239,6 +239,12 @@ std::string UserAgent() {
|
||||
#endif
|
||||
#elif defined (ARCH_CPU_RISCV64)
|
||||
static constexpr char arch[] = "riscv64";
|
||||
+#elif defined(__powerpc64__)
|
||||
+#if defined(ARCH_CPU_LITTLE_ENDIAN)
|
||||
+ static constexpr char arch[] = "ppc64";
|
||||
+#elif defined(ARCH_CPU_BIG_ENDIAN)
|
||||
+ static constexpr char arch[] = "ppc64_be";
|
||||
+#endif
|
||||
#else
|
||||
#error Port
|
||||
#endif
|
@ -1,376 +0,0 @@
|
||||
Index: chromium-128.0.6613.113/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
|
||||
+++ chromium-128.0.6613.113/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
|
||||
@@ -38,6 +38,28 @@ static INLINE int16x8_t vec_max_across(i
|
||||
return vec_max(a, vec_perm(a, a, vec_perm16));
|
||||
}
|
||||
|
||||
+static INLINE void
|
||||
+vec_u64_store(vector unsigned long long vecu64, unsigned long offset, void *ptr)
|
||||
+{
|
||||
+#ifndef WORDS_BIGENDIAN
|
||||
+ __asm__ ("xxswapd %x0, %x1"
|
||||
+ : "=wa" (vecu64)
|
||||
+ : "wa" (vecu64));
|
||||
+#endif
|
||||
+#if __GNUC__ >= 4
|
||||
+ if (__builtin_constant_p (offset) && offset == 0)
|
||||
+ __asm__ ("stxvd2x %x0,0,%1\n\t"
|
||||
+ :
|
||||
+ : "wa" (vecu64), "r" ((uintptr_t)ptr)
|
||||
+ : "memory");
|
||||
+ else
|
||||
+#endif
|
||||
+ __asm__ ("stxvd2x %x0,%1,%2\n\t"
|
||||
+ :
|
||||
+ : "wa" (vecu64), "r" (offset), "r" ((uintptr_t)ptr)
|
||||
+ : "memory", "r0");
|
||||
+}
|
||||
+
|
||||
void vp9_quantize_fp_vsx(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
|
||||
const int16_t *round_ptr, const int16_t *quant_ptr,
|
||||
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
|
||||
@@ -60,10 +82,10 @@ void vp9_quantize_fp_vsx(const tran_low_
|
||||
qcoeff0 = vec_mulhi(vec_vaddshs(vec_abs(coeff0), round), quant);
|
||||
zero_coeff0 = vec_cmpeq(qcoeff0, vec_zeros_s16);
|
||||
qcoeff0 = vec_sign(qcoeff0, coeff0);
|
||||
- vec_vsx_st(qcoeff0, 0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, 0, qcoeff_ptr);
|
||||
|
||||
dqcoeff0 = vec_mladd(qcoeff0, dequant, vec_zeros_s16);
|
||||
- vec_vsx_st(dqcoeff0, 0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff0, 0, dqcoeff_ptr);
|
||||
|
||||
// Remove DC value from round and quant
|
||||
round = vec_splat(round, 1);
|
||||
@@ -76,10 +98,10 @@ void vp9_quantize_fp_vsx(const tran_low_
|
||||
qcoeff1 = vec_mulhi(vec_vaddshs(vec_abs(coeff1), round), quant);
|
||||
zero_coeff1 = vec_cmpeq(qcoeff1, vec_zeros_s16);
|
||||
qcoeff1 = vec_sign(qcoeff1, coeff1);
|
||||
- vec_vsx_st(qcoeff1, 16, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, 16, qcoeff_ptr);
|
||||
|
||||
dqcoeff1 = vec_mladd(qcoeff1, dequant, vec_zeros_s16);
|
||||
- vec_vsx_st(dqcoeff1, 16, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff1, 16, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(vec_or(scan0, zero_coeff0), vec_or(scan1, zero_coeff1));
|
||||
|
||||
@@ -107,23 +129,23 @@ void vp9_quantize_fp_vsx(const tran_low_
|
||||
qcoeff0 = vec_mulhi(vec_vaddshs(vec_abs(coeff0), round), quant);
|
||||
zero_coeff0 = vec_cmpeq(qcoeff0, vec_zeros_s16);
|
||||
qcoeff0 = vec_sign(qcoeff0, coeff0);
|
||||
- vec_vsx_st(qcoeff0, off0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, off0, qcoeff_ptr);
|
||||
dqcoeff0 = vec_mladd(qcoeff0, dequant, vec_zeros_s16);
|
||||
- vec_vsx_st(dqcoeff0, off0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff0, off0, dqcoeff_ptr);
|
||||
|
||||
qcoeff1 = vec_mulhi(vec_vaddshs(vec_abs(coeff1), round), quant);
|
||||
zero_coeff1 = vec_cmpeq(qcoeff1, vec_zeros_s16);
|
||||
qcoeff1 = vec_sign(qcoeff1, coeff1);
|
||||
- vec_vsx_st(qcoeff1, off1, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, off1, qcoeff_ptr);
|
||||
dqcoeff1 = vec_mladd(qcoeff1, dequant, vec_zeros_s16);
|
||||
- vec_vsx_st(dqcoeff1, off1, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff1, off1, dqcoeff_ptr);
|
||||
|
||||
qcoeff2 = vec_mulhi(vec_vaddshs(vec_abs(coeff2), round), quant);
|
||||
zero_coeff2 = vec_cmpeq(qcoeff2, vec_zeros_s16);
|
||||
qcoeff2 = vec_sign(qcoeff2, coeff2);
|
||||
- vec_vsx_st(qcoeff2, off2, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff2, off2, qcoeff_ptr);
|
||||
dqcoeff2 = vec_mladd(qcoeff2, dequant, vec_zeros_s16);
|
||||
- vec_vsx_st(dqcoeff2, off2, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff2, off2, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(eob, vec_or(scan0, zero_coeff0));
|
||||
eob2 = vec_max(vec_or(scan1, zero_coeff1), vec_or(scan2, zero_coeff2));
|
||||
@@ -200,10 +222,10 @@ void vp9_quantize_fp_32x32_vsx(const tra
|
||||
qcoeff0 = vec_and(qcoeff0, mask0);
|
||||
zero_coeff0 = vec_cmpeq(qcoeff0, vec_zeros_s16);
|
||||
qcoeff0 = vec_sign(qcoeff0, coeff0);
|
||||
- vec_vsx_st(qcoeff0, 0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, 0, qcoeff_ptr);
|
||||
|
||||
dqcoeff0 = dequantize_coeff_32(qcoeff0, dequant);
|
||||
- vec_vsx_st(dqcoeff0, 0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff0, 0, dqcoeff_ptr);
|
||||
|
||||
// Remove DC value from thres, round, quant and dequant
|
||||
thres = vec_splat(thres, 1);
|
||||
@@ -219,10 +241,10 @@ void vp9_quantize_fp_32x32_vsx(const tra
|
||||
qcoeff1 = vec_and(qcoeff1, mask1);
|
||||
zero_coeff1 = vec_cmpeq(qcoeff1, vec_zeros_s16);
|
||||
qcoeff1 = vec_sign(qcoeff1, coeff1);
|
||||
- vec_vsx_st(qcoeff1, 16, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, 16, qcoeff_ptr);
|
||||
|
||||
dqcoeff1 = dequantize_coeff_32(qcoeff1, dequant);
|
||||
- vec_vsx_st(dqcoeff1, 16, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff1, 16, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(vec_or(scan0, zero_coeff0), vec_or(scan1, zero_coeff1));
|
||||
|
||||
@@ -260,17 +282,17 @@ void vp9_quantize_fp_32x32_vsx(const tra
|
||||
qcoeff1 = vec_sign(qcoeff1, coeff1);
|
||||
qcoeff2 = vec_sign(qcoeff2, coeff2);
|
||||
|
||||
- vec_vsx_st(qcoeff0, off0, qcoeff_ptr);
|
||||
- vec_vsx_st(qcoeff1, off1, qcoeff_ptr);
|
||||
- vec_vsx_st(qcoeff2, off2, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, off0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, off1, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff2, off2, qcoeff_ptr);
|
||||
|
||||
dqcoeff0 = dequantize_coeff_32(qcoeff0, dequant);
|
||||
dqcoeff1 = dequantize_coeff_32(qcoeff1, dequant);
|
||||
dqcoeff2 = dequantize_coeff_32(qcoeff2, dequant);
|
||||
|
||||
- vec_vsx_st(dqcoeff0, off0, dqcoeff_ptr);
|
||||
- vec_vsx_st(dqcoeff1, off1, dqcoeff_ptr);
|
||||
- vec_vsx_st(dqcoeff2, off2, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff0, off0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff1, off1, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff2, off2, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(eob, vec_or(scan0, zero_coeff0));
|
||||
eob2 = vec_max(vec_or(scan1, zero_coeff1), vec_or(scan2, zero_coeff2));
|
||||
Index: chromium-128.0.6613.113/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
|
||||
+++ chromium-128.0.6613.113/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
|
||||
@@ -15,6 +15,28 @@
|
||||
#include "vpx_dsp/ppc/txfm_common_vsx.h"
|
||||
#include "vpx_dsp/ppc/types_vsx.h"
|
||||
|
||||
+static INLINE void
|
||||
+vec_u64_store(vector unsigned long long vecu64, unsigned long offset, void *ptr)
|
||||
+{
|
||||
+#ifndef WORDS_BIGENDIAN
|
||||
+ __asm__ ("xxswapd %x0, %x1"
|
||||
+ : "=wa" (vecu64)
|
||||
+ : "wa" (vecu64));
|
||||
+#endif
|
||||
+#if __GNUC__ >= 4
|
||||
+ if (__builtin_constant_p (offset) && offset == 0)
|
||||
+ __asm__ ("stxvd2x %x0,0,%1\n\t"
|
||||
+ :
|
||||
+ : "wa" (vecu64), "r" ((uintptr_t)ptr)
|
||||
+ : "memory");
|
||||
+ else
|
||||
+#endif
|
||||
+ __asm__ ("stxvd2x %x0,%1,%2\n\t"
|
||||
+ :
|
||||
+ : "wa" (vecu64), "r" (offset), "r" ((uintptr_t)ptr)
|
||||
+ : "memory", "r0");
|
||||
+}
|
||||
+
|
||||
// Returns ((a +/- b) * cospi16 + (2 << 13)) >> 14.
|
||||
static INLINE void single_butterfly(int16x8_t a, int16x8_t b, int16x8_t *add,
|
||||
int16x8_t *sub) {
|
||||
@@ -164,45 +186,45 @@ static INLINE void load(const int16_t *a
|
||||
}
|
||||
|
||||
static INLINE void store(tran_low_t *a, const int16x8_t *b) {
|
||||
- vec_vsx_st(b[0], 0, a);
|
||||
- vec_vsx_st(b[8], 0, a + 8);
|
||||
- vec_vsx_st(b[16], 0, a + 16);
|
||||
- vec_vsx_st(b[24], 0, a + 24);
|
||||
-
|
||||
- vec_vsx_st(b[1], 0, a + 32);
|
||||
- vec_vsx_st(b[9], 0, a + 40);
|
||||
- vec_vsx_st(b[17], 0, a + 48);
|
||||
- vec_vsx_st(b[25], 0, a + 56);
|
||||
-
|
||||
- vec_vsx_st(b[2], 0, a + 64);
|
||||
- vec_vsx_st(b[10], 0, a + 72);
|
||||
- vec_vsx_st(b[18], 0, a + 80);
|
||||
- vec_vsx_st(b[26], 0, a + 88);
|
||||
-
|
||||
- vec_vsx_st(b[3], 0, a + 96);
|
||||
- vec_vsx_st(b[11], 0, a + 104);
|
||||
- vec_vsx_st(b[19], 0, a + 112);
|
||||
- vec_vsx_st(b[27], 0, a + 120);
|
||||
-
|
||||
- vec_vsx_st(b[4], 0, a + 128);
|
||||
- vec_vsx_st(b[12], 0, a + 136);
|
||||
- vec_vsx_st(b[20], 0, a + 144);
|
||||
- vec_vsx_st(b[28], 0, a + 152);
|
||||
-
|
||||
- vec_vsx_st(b[5], 0, a + 160);
|
||||
- vec_vsx_st(b[13], 0, a + 168);
|
||||
- vec_vsx_st(b[21], 0, a + 176);
|
||||
- vec_vsx_st(b[29], 0, a + 184);
|
||||
-
|
||||
- vec_vsx_st(b[6], 0, a + 192);
|
||||
- vec_vsx_st(b[14], 0, a + 200);
|
||||
- vec_vsx_st(b[22], 0, a + 208);
|
||||
- vec_vsx_st(b[30], 0, a + 216);
|
||||
-
|
||||
- vec_vsx_st(b[7], 0, a + 224);
|
||||
- vec_vsx_st(b[15], 0, a + 232);
|
||||
- vec_vsx_st(b[23], 0, a + 240);
|
||||
- vec_vsx_st(b[31], 0, a + 248);
|
||||
+ vec_u64_store(b[0], 0, a);
|
||||
+ vec_u64_store(b[8], 0, a + 8);
|
||||
+ vec_u64_store(b[16], 0, a + 16);
|
||||
+ vec_u64_store(b[24], 0, a + 24);
|
||||
+
|
||||
+ vec_u64_store(b[1], 0, a + 32);
|
||||
+ vec_u64_store(b[9], 0, a + 40);
|
||||
+ vec_u64_store(b[17], 0, a + 48);
|
||||
+ vec_u64_store(b[25], 0, a + 56);
|
||||
+
|
||||
+ vec_u64_store(b[2], 0, a + 64);
|
||||
+ vec_u64_store(b[10], 0, a + 72);
|
||||
+ vec_u64_store(b[18], 0, a + 80);
|
||||
+ vec_u64_store(b[26], 0, a + 88);
|
||||
+
|
||||
+ vec_u64_store(b[3], 0, a + 96);
|
||||
+ vec_u64_store(b[11], 0, a + 104);
|
||||
+ vec_u64_store(b[19], 0, a + 112);
|
||||
+ vec_u64_store(b[27], 0, a + 120);
|
||||
+
|
||||
+ vec_u64_store(b[4], 0, a + 128);
|
||||
+ vec_u64_store(b[12], 0, a + 136);
|
||||
+ vec_u64_store(b[20], 0, a + 144);
|
||||
+ vec_u64_store(b[28], 0, a + 152);
|
||||
+
|
||||
+ vec_u64_store(b[5], 0, a + 160);
|
||||
+ vec_u64_store(b[13], 0, a + 168);
|
||||
+ vec_u64_store(b[21], 0, a + 176);
|
||||
+ vec_u64_store(b[29], 0, a + 184);
|
||||
+
|
||||
+ vec_u64_store(b[6], 0, a + 192);
|
||||
+ vec_u64_store(b[14], 0, a + 200);
|
||||
+ vec_u64_store(b[22], 0, a + 208);
|
||||
+ vec_u64_store(b[30], 0, a + 216);
|
||||
+
|
||||
+ vec_u64_store(b[7], 0, a + 224);
|
||||
+ vec_u64_store(b[15], 0, a + 232);
|
||||
+ vec_u64_store(b[23], 0, a + 240);
|
||||
+ vec_u64_store(b[31], 0, a + 248);
|
||||
}
|
||||
|
||||
// Returns 1 if negative 0 if positive
|
||||
Index: chromium-128.0.6613.113/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
|
||||
+++ chromium-128.0.6613.113/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
|
||||
@@ -13,6 +13,28 @@
|
||||
#include "./vpx_dsp_rtcd.h"
|
||||
#include "vpx_dsp/ppc/types_vsx.h"
|
||||
|
||||
+static INLINE void
|
||||
+vec_u64_store(vector unsigned long long vecu64, unsigned long offset, void *ptr)
|
||||
+{
|
||||
+#ifndef WORDS_BIGENDIAN
|
||||
+ __asm__ ("xxswapd %x0, %x1"
|
||||
+ : "=wa" (vecu64)
|
||||
+ : "wa" (vecu64));
|
||||
+#endif
|
||||
+#if __GNUC__ >= 4
|
||||
+ if (__builtin_constant_p (offset) && offset == 0)
|
||||
+ __asm__ ("stxvd2x %x0,0,%1\n\t"
|
||||
+ :
|
||||
+ : "wa" (vecu64), "r" ((uintptr_t)ptr)
|
||||
+ : "memory");
|
||||
+ else
|
||||
+#endif
|
||||
+ __asm__ ("stxvd2x %x0,%1,%2\n\t"
|
||||
+ :
|
||||
+ : "wa" (vecu64), "r" (offset), "r" ((uintptr_t)ptr)
|
||||
+ : "memory", "r0");
|
||||
+}
|
||||
+
|
||||
// Negate 16-bit integers in a when the corresponding signed 16-bit
|
||||
// integer in b is negative.
|
||||
static INLINE int16x8_t vec_sign(int16x8_t a, int16x8_t b) {
|
||||
@@ -124,19 +146,19 @@ void vpx_quantize_b_vsx(const tran_low_t
|
||||
|
||||
qcoeff0 =
|
||||
quantize_coeff(coeff0, coeff0_abs, round, quant, quant_shift, zero_mask0);
|
||||
- vec_vsx_st(qcoeff0, 0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, 0, qcoeff_ptr);
|
||||
round = vec_splat(round, 1);
|
||||
quant = vec_splat(quant, 1);
|
||||
quant_shift = vec_splat(quant_shift, 1);
|
||||
qcoeff1 =
|
||||
quantize_coeff(coeff1, coeff1_abs, round, quant, quant_shift, zero_mask1);
|
||||
- vec_vsx_st(qcoeff1, 16, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, 16, qcoeff_ptr);
|
||||
|
||||
dqcoeff0 = vec_mladd(qcoeff0, dequant, vec_zeros_s16);
|
||||
- vec_vsx_st(dqcoeff0, 0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff0, 0, dqcoeff_ptr);
|
||||
dequant = vec_splat(dequant, 1);
|
||||
dqcoeff1 = vec_mladd(qcoeff1, dequant, vec_zeros_s16);
|
||||
- vec_vsx_st(dqcoeff1, 16, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff1, 16, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(nonzero_scanindex(qcoeff0, iscan_ptr, 0),
|
||||
nonzero_scanindex(qcoeff1, iscan_ptr, 16));
|
||||
@@ -164,17 +186,17 @@ void vpx_quantize_b_vsx(const tran_low_t
|
||||
zero_mask1);
|
||||
qcoeff2 = quantize_coeff(coeff2, coeff2_abs, round, quant, quant_shift,
|
||||
zero_mask2);
|
||||
- vec_vsx_st(qcoeff0, off0, qcoeff_ptr);
|
||||
- vec_vsx_st(qcoeff1, off1, qcoeff_ptr);
|
||||
- vec_vsx_st(qcoeff2, off2, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, off0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, off1, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff2, off2, qcoeff_ptr);
|
||||
|
||||
dqcoeff0 = vec_mladd(qcoeff0, dequant, vec_zeros_s16);
|
||||
dqcoeff1 = vec_mladd(qcoeff1, dequant, vec_zeros_s16);
|
||||
dqcoeff2 = vec_mladd(qcoeff2, dequant, vec_zeros_s16);
|
||||
|
||||
- vec_vsx_st(dqcoeff0, off0, dqcoeff_ptr);
|
||||
- vec_vsx_st(dqcoeff1, off1, dqcoeff_ptr);
|
||||
- vec_vsx_st(dqcoeff2, off2, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff0, off0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff1, off1, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff2, off2, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(eob, nonzero_scanindex(qcoeff0, iscan_ptr, off0));
|
||||
eob2 = vec_max(nonzero_scanindex(qcoeff1, iscan_ptr, off1),
|
||||
@@ -243,12 +265,12 @@ void vpx_quantize_b_32x32_vsx(const tran
|
||||
qcoeff1 = quantize_coeff_32(coeff1, coeff1_abs, round, quant, quant_shift,
|
||||
zero_mask1);
|
||||
|
||||
- vec_vsx_st(qcoeff0, 0, qcoeff_ptr);
|
||||
- vec_vsx_st(qcoeff1, 16, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, 0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, 16, qcoeff_ptr);
|
||||
|
||||
- vec_vsx_st(dequantize_coeff_32(qcoeff0, dequant), 0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dequantize_coeff_32(qcoeff0, dequant), 0, dqcoeff_ptr);
|
||||
dequant = vec_splat(dequant, 1); // remove DC from dequant
|
||||
- vec_vsx_st(dequantize_coeff_32(qcoeff1, dequant), 16, dqcoeff_ptr);
|
||||
+ vec_u64_store(dequantize_coeff_32(qcoeff1, dequant), 16, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(nonzero_scanindex(qcoeff0, iscan_ptr, 0),
|
||||
nonzero_scanindex(qcoeff1, iscan_ptr, 16));
|
||||
@@ -276,13 +298,13 @@ void vpx_quantize_b_32x32_vsx(const tran
|
||||
qcoeff2 = quantize_coeff_32(coeff2, coeff2_abs, round, quant, quant_shift,
|
||||
zero_mask2);
|
||||
|
||||
- vec_vsx_st(qcoeff0, off0, qcoeff_ptr);
|
||||
- vec_vsx_st(qcoeff1, off1, qcoeff_ptr);
|
||||
- vec_vsx_st(qcoeff2, off2, qcoeff_ptr);
|
||||
-
|
||||
- vec_vsx_st(dequantize_coeff_32(qcoeff0, dequant), off0, dqcoeff_ptr);
|
||||
- vec_vsx_st(dequantize_coeff_32(qcoeff1, dequant), off1, dqcoeff_ptr);
|
||||
- vec_vsx_st(dequantize_coeff_32(qcoeff2, dequant), off2, dqcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, off0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, off1, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff2, off2, qcoeff_ptr);
|
||||
+
|
||||
+ vec_u64_store(dequantize_coeff_32(qcoeff0, dequant), off0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dequantize_coeff_32(qcoeff1, dequant), off1, dqcoeff_ptr);
|
||||
+ vec_u64_store(dequantize_coeff_32(qcoeff2, dequant), off2, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(eob, nonzero_scanindex(qcoeff0, iscan_ptr, off0));
|
||||
eob2 = vec_max(nonzero_scanindex(qcoeff1, iscan_ptr, off1),
|
@ -1,107 +0,0 @@
|
||||
From 1d44643a7c7cf650efd1093d22cd5bf859fdcb51 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 20:52:13 -0500
|
||||
Subject: [PATCH] sandbox/linux/seccomp-bpf: Add ppc64 syscall stub
|
||||
|
||||
---
|
||||
sandbox/linux/seccomp-bpf/syscall.cc | 53 ++++++++++++++++++++++++++--
|
||||
1 file changed, 51 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/seccomp-bpf/syscall.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/seccomp-bpf/syscall.cc
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/seccomp-bpf/syscall.cc
|
||||
@@ -23,7 +23,7 @@ namespace sandbox {
|
||||
namespace {
|
||||
|
||||
#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
|
||||
- defined(ARCH_CPU_MIPS_FAMILY)
|
||||
+ defined(ARCH_CPU_MIPS_FAMILY) || defined (ARCH_CPU_PPC64_FAMILY)
|
||||
// Number that's not currently used by any Linux kernel ABIs.
|
||||
const int kInvalidSyscallNumber = 0x351d3;
|
||||
#else
|
||||
@@ -313,10 +313,54 @@ asm(// We need to be able to tell the ke
|
||||
"2:ret\n"
|
||||
".cfi_endproc\n"
|
||||
".size SyscallAsm, .-SyscallAsm\n"
|
||||
+#elif defined(__powerpc64__)
|
||||
+ ".text\n"
|
||||
+ ".align 4\n"
|
||||
+ ".type SyscallAsm @function\n"
|
||||
+ "SyscallAsm:\n"
|
||||
+ ".cfi_startproc\n"
|
||||
+
|
||||
+ // Check if r3 is negative
|
||||
+ "cmpdi 3, 0\n"
|
||||
+ "bgt 2f\n"
|
||||
+
|
||||
+ // Load address of 3f into r3 and return
|
||||
+ "mflr 10\n"
|
||||
+ "bl 1f\n"
|
||||
+ "1: mflr 3\n"
|
||||
+ "mtlr 10\n"
|
||||
+ "addi 3, 3, 4*13\n"
|
||||
+ "blr\n"
|
||||
+
|
||||
+ // Load arguments from array into r3-8
|
||||
+ // save param 3 in r10
|
||||
+ "2:\n"
|
||||
+ "mr 0, 3\n"
|
||||
+ "ld 3, 0(4)\n"
|
||||
+ "ld 5, 16(4)\n"
|
||||
+ "ld 6, 24(4)\n"
|
||||
+ "ld 7, 32(4)\n"
|
||||
+ "ld 8, 40(4)\n"
|
||||
+ "ld 4, 8(4)\n"
|
||||
+ "li 9, 0\n"
|
||||
+
|
||||
+ // Enter kernel
|
||||
+ "sc\n"
|
||||
+
|
||||
+ // Magic return address
|
||||
+ "3:\n"
|
||||
+ // Like MIPS, ppc64 return values are always positive.
|
||||
+ // Check for error in cr0.SO and negate upon error
|
||||
+ "bc 4, 3, 4f\n"
|
||||
+ "neg 3, 3\n"
|
||||
+ "4: blr\n"
|
||||
+
|
||||
+ ".cfi_endproc\n"
|
||||
+ ".size SyscallAsm, .-SyscallAsm\n"
|
||||
#endif
|
||||
); // asm
|
||||
|
||||
-#if defined(__x86_64__)
|
||||
+#if defined(__x86_64__) || defined(__powerpc64__)
|
||||
extern "C" {
|
||||
intptr_t SyscallAsm(intptr_t nr, const intptr_t args[6]);
|
||||
}
|
||||
@@ -430,6 +474,8 @@ intptr_t Syscall::Call(int nr,
|
||||
ret = inout;
|
||||
}
|
||||
|
||||
+#elif defined(__powerpc64__)
|
||||
+ intptr_t ret = SyscallAsm(nr, args);
|
||||
#else
|
||||
#error "Unimplemented architecture"
|
||||
#endif
|
||||
@@ -446,8 +492,18 @@ void Syscall::PutValueInUcontext(intptr_
|
||||
// needs to be changed back.
|
||||
ret_val = -ret_val;
|
||||
SECCOMP_PARM4(ctx) = 1;
|
||||
- } else
|
||||
+ } else {
|
||||
SECCOMP_PARM4(ctx) = 0;
|
||||
+ }
|
||||
+#endif
|
||||
+#if defined(__powerpc64__)
|
||||
+ // Same as MIPS, need to invert ret and set error register (cr0.SO)
|
||||
+ if (ret_val <= -1 && ret_val >= -4095) {
|
||||
+ ret_val = -ret_val;
|
||||
+ ctx->uc_mcontext.regs->ccr |= (1 << 28);
|
||||
+ } else {
|
||||
+ ctx->uc_mcontext.regs->ccr &= ~(1 << 28);
|
||||
+ }
|
||||
#endif
|
||||
SECCOMP_RESULT(ctx) = static_cast<greg_t>(ret_val);
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
From 6a852c4135864ba87b3cbdd0880d7cfecf7cd654 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 13 Sep 2018 15:12:22 -0500
|
||||
Subject: [PATCH 5/6] sandbox/linux: update unit test for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
|
||||
@@ -350,8 +350,10 @@ TEST_BASELINE_SIGSYS(__NR_timer_create)
|
||||
|
||||
#if !defined(__aarch64__)
|
||||
TEST_BASELINE_SIGSYS(__NR_inotify_init)
|
||||
+#if !defined(__powerpc64__)
|
||||
TEST_BASELINE_SIGSYS(__NR_vserver)
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if defined(LIBC_GLIBC) && !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
BPF_TEST_C(BaselinePolicy, FutexEINVAL, BaselinePolicy) {
|
@ -1,14 +0,0 @@
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
@@ -374,7 +374,9 @@ bool SyscallSets::IsAllowedSignalHandlin
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
defined(__powerpc64__)
|
||||
+#if !defined(__powerpc64__)
|
||||
case __NR_rt_sigtimedwait_time64:
|
||||
+#endif
|
||||
case __NR_sigaction:
|
||||
case __NR_sigprocmask:
|
||||
case __NR_sigreturn:
|
@ -1,33 +0,0 @@
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/system_headers/linux_stat.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/system_headers/linux_stat.h
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/system_headers/linux_stat.h
|
||||
@@ -173,6 +173,28 @@ struct kernel_stat {
|
||||
unsigned int __unused4;
|
||||
unsigned int __unused5;
|
||||
};
|
||||
+#elif defined(__powerpc64__)
|
||||
+struct kernel_stat {
|
||||
+ unsigned long st_dev;
|
||||
+ ino_t st_ino;
|
||||
+ unsigned long st_nlink;
|
||||
+ mode_t st_mode;
|
||||
+ uid_t st_uid;
|
||||
+ gid_t st_gid;
|
||||
+ unsigned long st_rdev;
|
||||
+ long st_size;
|
||||
+ unsigned long st_blksize;
|
||||
+ unsigned long st_blocks;
|
||||
+ // unsigned long st_atime;
|
||||
+ unsigned long st_atime_nsec;
|
||||
+ //unsigned long st_mtime;
|
||||
+ unsigned long st_mtime_nsec;
|
||||
+ //unsigned long st_ctime;
|
||||
+ unsigned long st_ctime_nsec;
|
||||
+ unsigned long __unused4;
|
||||
+ unsigned long __unused5;
|
||||
+ unsigned long __unused6;
|
||||
+};
|
||||
#endif
|
||||
|
||||
#if !defined(AT_EMPTY_PATH)
|
@ -1,90 +0,0 @@
|
||||
Index: chromium-130.0.6723.44/sandbox/policy/linux/bpf_utility_policy_linux.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/sandbox/policy/linux/bpf_utility_policy_linux.cc
|
||||
+++ chromium-130.0.6723.44/sandbox/policy/linux/bpf_utility_policy_linux.cc
|
||||
@@ -34,7 +34,7 @@ ResultExpr UtilityProcessPolicy::Evaluat
|
||||
case __NR_fdatasync:
|
||||
case __NR_fsync:
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_getrlimit:
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__arm__)
|
||||
Index: chromium-130.0.6723.44/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
+++ chromium-130.0.6723.44/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
@@ -87,7 +87,7 @@ ResultExpr RendererProcessPolicy::Evalua
|
||||
case __NR_ftruncate64:
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_getrlimit:
|
||||
case __NR_setrlimit:
|
||||
// We allow setrlimit to dynamically adjust the address space limit as
|
||||
Index: chromium-130.0.6723.44/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
+++ chromium-130.0.6723.44/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
@@ -58,9 +58,9 @@
|
||||
|
||||
#elif defined(__powerpc64__)
|
||||
|
||||
-#include <asm/unistd.h>
|
||||
+#include <asm-generic/unistd.h>
|
||||
#define MIN_SYSCALL 0u
|
||||
-#define MAX_PUBLIC_SYSCALL 386u
|
||||
+#define MAX_PUBLIC_SYSCALL __NR_syscalls
|
||||
#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
|
||||
|
||||
#else
|
||||
Index: chromium-130.0.6723.44/sandbox/linux/services/credentials.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/sandbox/linux/services/credentials.cc
|
||||
+++ chromium-130.0.6723.44/sandbox/linux/services/credentials.cc
|
||||
@@ -96,7 +96,8 @@ bool ChrootToSafeEmptyDir() {
|
||||
|
||||
int clone_flags = CLONE_FS | LINUX_SIGCHLD;
|
||||
void* tls = nullptr;
|
||||
-#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY)) && \
|
||||
+#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY) || \
|
||||
+ defined(ARCH_CPU_PPC64_FAMILY)) && \
|
||||
!defined(MEMORY_SANITIZER)
|
||||
// Use CLONE_VM | CLONE_VFORK as an optimization to avoid copying page tables.
|
||||
// Since clone writes to the new child's TLS before returning, we must set a
|
||||
@@ -104,6 +105,11 @@ bool ChrootToSafeEmptyDir() {
|
||||
// glibc performs syscalls by calling a function pointer in TLS, so we do not
|
||||
// attempt this optimization.
|
||||
// TODO(crbug.com/40196869) Broken in MSan builds after LLVM f1bb30a4956f.
|
||||
+ //
|
||||
+ // NOTE: Without CLONE_VM, fontconfig will attempt to reload configuration
|
||||
+ // in every thread. Since the rendered threads are sandboxed without
|
||||
+ // filesystem access (e.g. to /etc/fonts/fonts.conf) this will cause font
|
||||
+ // configuration loading failures and no fonts will be displayed!
|
||||
clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
|
||||
|
||||
char tls_buf[PTHREAD_STACK_MIN_CONST] = {0};
|
||||
Index: chromium-130.0.6723.44/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
|
||||
+++ chromium-130.0.6723.44/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
|
||||
@@ -362,7 +362,16 @@ intptr_t SIGSYSFstatatHandler(const stru
|
||||
if (args.nr == __NR_fstatat_default) {
|
||||
if (*reinterpret_cast<const char*>(args.args[1]) == '\0' &&
|
||||
args.args[3] == static_cast<uint64_t>(AT_EMPTY_PATH)) {
|
||||
- return syscall(__NR_fstat_default, static_cast<int>(args.args[0]),
|
||||
+ int fd = static_cast<int>(args.args[0]);
|
||||
+#if defined(__powerpc64__)
|
||||
+ // On ppc64+glibc, some syscalls seem to accidentally negate the first
|
||||
+ // parameter which causes checks against it to fail. For now, manually
|
||||
+ // negate them back.
|
||||
+ // TODO: Investigate the root cause and fix in glibc
|
||||
+ if (fd < 0)
|
||||
+ fd = -fd;
|
||||
+#endif
|
||||
+ return syscall(__NR_fstat_default, fd,
|
||||
reinterpret_cast<default_stat_struct*>(args.args[2]));
|
||||
}
|
||||
return -reinterpret_cast<intptr_t>(fs_denied_errno);
|
@ -1,24 +0,0 @@
|
||||
diff -up chromium-131.0.6778.69/base/compiler_specific.h.me chromium-131.0.6778.69/base/compiler_specific.h
|
||||
--- chromium-131.0.6778.69/base/compiler_specific.h.me 2024-11-19 20:44:12.404060581 +0100
|
||||
+++ chromium-131.0.6778.69/base/compiler_specific.h 2024-11-19 20:44:54.434121935 +0100
|
||||
@@ -152,7 +152,7 @@
|
||||
// MUSTTAIL return Func1(d + 1); // `Func1()` will be tail-called.
|
||||
// }
|
||||
// ```
|
||||
-#if __has_cpp_attribute(clang::musttail)
|
||||
+#if __has_cpp_attribute(clang::musttail) && !defined(__powerpc64__)
|
||||
#define MUSTTAIL [[clang::musttail]]
|
||||
#else
|
||||
#define MUSTTAIL
|
||||
diff -up chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h.me chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
|
||||
--- chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h.me 2024-11-20 18:50:28.690761262 +0100
|
||||
+++ chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h 2024-11-20 18:54:49.374711202 +0100
|
||||
@@ -138,7 +138,7 @@
|
||||
// PA_MUSTTAIL return Func1(d + 1); // `Func1()` will be tail-called.
|
||||
// }
|
||||
// ```
|
||||
-#if PA_HAS_CPP_ATTRIBUTE(clang::musttail)
|
||||
+#if PA_HAS_CPP_ATTRIBUTE(clang::musttail) && !defined(__powerpc64__)
|
||||
#define PA_MUSTTAIL [[clang::musttail]]
|
||||
#else
|
||||
#define PA_MUSTTAIL
|
@ -1,13 +0,0 @@
|
||||
Index: chromium-130.0.6723.44/third_party/skia/src/core/SkRasterPipeline.h
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/skia/src/core/SkRasterPipeline.h
|
||||
+++ chromium-130.0.6723.44/third_party/skia/src/core/SkRasterPipeline.h
|
||||
@@ -27,7 +27,7 @@ struct SkImageInfo;
|
||||
struct skcms_TransferFunction;
|
||||
|
||||
#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && \
|
||||
- !defined(SK_CPU_LOONGARCH) && !(defined(_WIN32) && defined(SK_BUILD_FOR_ANDROID_FRAMEWORK))
|
||||
+ !defined(SK_CPU_LOONGARCH) && !(defined(_WIN32) && defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)) && !defined(__powerpc64__)
|
||||
// [[clang::musttail]] is disabled for the Android version of Skia running on Windows as it
|
||||
// causes crashes (This is probably related to http://crbug.com/1505442).
|
||||
#define SK_HAS_MUSTTAIL 1
|
@ -1,48 +0,0 @@
|
||||
Index: chromium-130.0.6723.44/third_party/libvpx/generate_gni.sh
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/libvpx/generate_gni.sh
|
||||
+++ chromium-130.0.6723.44/third_party/libvpx/generate_gni.sh
|
||||
@@ -433,7 +433,7 @@ gen_config_files linux/mipsel "--target=
|
||||
gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}"
|
||||
gen_config_files linux/loongarch \
|
||||
"--target=loongarch64-linux-gcc ${all_platforms}"
|
||||
-gen_config_files linux/ppc64 "--target=ppc64le-linux-gcc ${all_platforms}"
|
||||
+gen_config_files linux/ppc64 "--target=generic-gnu $HIGHBD ${all_platforms}"
|
||||
gen_config_files linux/generic "--target=generic-gnu $HIGHBD ${all_platforms}"
|
||||
gen_config_files win/arm64-highbd \
|
||||
"--target=arm64-win64-vs15 ${all_platforms} ${HIGHBD} ${disable_sve}"
|
||||
Index: chromium-130.0.6723.44/third_party/libvpx/source/libvpx/build/make/rtcd.pl
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/libvpx/source/libvpx/build/make/rtcd.pl
|
||||
+++ chromium-130.0.6723.44/third_party/libvpx/source/libvpx/build/make/rtcd.pl
|
||||
@@ -509,8 +509,9 @@ if ($opts{arch} eq 'x86') {
|
||||
&require(@REQUIRES);
|
||||
arm;
|
||||
} elsif ($opts{arch} =~ /^ppc/ ) {
|
||||
- @ALL_ARCHS = filter(qw/vsx/);
|
||||
- ppc;
|
||||
+ #@ALL_ARCHS = filter(qw/vsx/);
|
||||
+ #ppc;
|
||||
+ unoptimized;
|
||||
} elsif ($opts{arch} =~ /loongarch/ ) {
|
||||
@ALL_ARCHS = filter(qw/lsx lasx/);
|
||||
loongarch;
|
||||
Index: chromium-130.0.6723.44/third_party/libvpx/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/libvpx/BUILD.gn
|
||||
+++ chromium-130.0.6723.44/third_party/libvpx/BUILD.gn
|
||||
@@ -102,6 +102,14 @@ config("libvpx_config") {
|
||||
"-Wno-sign-compare",
|
||||
]
|
||||
}
|
||||
+
|
||||
+ if (current_cpu == "ppc64") {
|
||||
+ cflags += [
|
||||
+ "-mcpu=power8",
|
||||
+ "-maltivec",
|
||||
+ "-mvsx",
|
||||
+ ]
|
||||
+ }
|
||||
}
|
||||
|
||||
# This config is applied to targets that depend on libvpx.
|
@ -1,23 +0,0 @@
|
||||
Index: chromium-128.0.6613.113/third_party/webrtc/rtc_base/system/arch.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/webrtc/rtc_base/system/arch.h
|
||||
+++ chromium-128.0.6613.113/third_party/webrtc/rtc_base/system/arch.h
|
||||
@@ -46,6 +46,18 @@
|
||||
#endif
|
||||
#if defined(__MIPSEL__)
|
||||
#define WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+#elif defined(__PPC__)
|
||||
+#define WEBRTC_ARCH_PPC_FAMILY
|
||||
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
+#define WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+#else
|
||||
+#define WEBRTC_ARCH_BIG_ENDIAN
|
||||
+#endif
|
||||
+#if defined(__LP64__)
|
||||
+#define WEBRTC_ARCH_64_BITS
|
||||
+#else
|
||||
+#define WEBRTC_ARCH_32_BITS
|
||||
+#endif
|
||||
#else
|
||||
#define WEBRTC_ARCH_BIG_ENDIAN
|
||||
#endif
|
@ -0,0 +1,12 @@
|
||||
diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc
|
||||
index fcd45cb5c..bcbae6c59 100644
|
||||
--- a/net/socket/ssl_client_socket_impl.cc
|
||||
+++ b/net/socket/ssl_client_socket_impl.cc
|
||||
@@ -69,6 +69,7 @@
|
||||
#include "third_party/boringssl/src/include/openssl/evp.h"
|
||||
#include "third_party/boringssl/src/include/openssl/mem.h"
|
||||
#include "third_party/boringssl/src/include/openssl/ssl.h"
|
||||
+#include "third_party/llvm/libcxx/include/__config"
|
||||
|
||||
namespace net {
|
||||
|
@ -0,0 +1,139 @@
|
||||
commit f6f27ebf8f82990da4c5fdff103eb62586ee12d9
|
||||
Author: tigro <arkadiy.sheyn@softline.com>
|
||||
Date: Sun Jul 23 09:57:21 2023 +0300
|
||||
|
||||
Set Yandex as default search engine
|
||||
|
||||
diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json
|
||||
index e672076a3..1ef0e7504 100644
|
||||
--- a/components/search_engines/prepopulated_engines.json
|
||||
+++ b/components/search_engines/prepopulated_engines.json
|
||||
@@ -560,7 +560,7 @@
|
||||
"suggest_url": "https://suggest.yandex.by/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
|
||||
"image_url": "https://yandex.by/images/search/?rpt=imageview",
|
||||
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
|
||||
- "new_tab_url": "https://www.yandex.by/chrome/newtab",
|
||||
+ "new_tab_url": "chrome://new-tab-page",
|
||||
"type": "SEARCH_ENGINE_YANDEX",
|
||||
"id": 15
|
||||
},
|
||||
@@ -573,6 +573,7 @@
|
||||
"suggest_url": "https://suggest.yandex.com/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}&uil=en&v=3&sn=5",
|
||||
"image_url": "https://yandex.com/images/search?rpt=imageview",
|
||||
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
|
||||
+ "new_tab_url": "chrome://new-tab-page",
|
||||
"type": "SEARCH_ENGINE_YANDEX",
|
||||
"id": 15
|
||||
},
|
||||
@@ -586,7 +587,7 @@
|
||||
"suggest_url": "https://suggest.yandex.kz/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
|
||||
"image_url": "https://yandex.kz/images/search/?rpt=imageview",
|
||||
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
|
||||
- "new_tab_url": "https://www.yandex.kz/chrome/newtab",
|
||||
+ "new_tab_url": "chrome://new-tab-page",
|
||||
"type": "SEARCH_ENGINE_YANDEX",
|
||||
"id": 15
|
||||
},
|
||||
@@ -600,7 +601,7 @@
|
||||
"suggest_url": "https://suggest.yandex.ru/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
|
||||
"image_url": "https://yandex.ru/images/search/?rpt=imageview",
|
||||
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
|
||||
- "new_tab_url": "https://www.yandex.ru/chrome/newtab",
|
||||
+ "new_tab_url": "chrome://new-tab-page",
|
||||
"type": "SEARCH_ENGINE_YANDEX",
|
||||
"id": 15
|
||||
},
|
||||
@@ -613,7 +614,7 @@
|
||||
"suggest_url": "https://suggest.yandex.com.tr/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
|
||||
"image_url": "https://yandex.com.tr/gorsel/search?rpt=imageview",
|
||||
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
|
||||
- "new_tab_url": "https://www.yandex.com.tr/chrome/newtab",
|
||||
+ "new_tab_url": "chrome://new-tab-page",
|
||||
"type": "SEARCH_ENGINE_YANDEX",
|
||||
"id": 15
|
||||
},
|
||||
@@ -627,7 +628,7 @@
|
||||
"suggest_url": "https://suggest.yandex.ua/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
|
||||
"image_url": "https://yandex.ua/images/search/?rpt=imageview",
|
||||
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
|
||||
- "new_tab_url": "https://www.yandex.ua/chrome/newtab",
|
||||
+ "new_tab_url": "chrome://new-tab-page",
|
||||
"type": "SEARCH_ENGINE_YANDEX",
|
||||
"id": 15
|
||||
},
|
||||
diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
|
||||
index efaa4b294..7f25a36e8 100644
|
||||
--- a/components/search_engines/template_url_prepopulate_data.cc
|
||||
+++ b/components/search_engines/template_url_prepopulate_data.cc
|
||||
@@ -29,6 +29,7 @@ namespace {
|
||||
|
||||
// Default (for countries with no better engine set)
|
||||
const PrepopulatedEngine* const engines_default[] = {
|
||||
+ &yandex_com,
|
||||
&google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
@@ -156,8 +157,8 @@ const PrepopulatedEngine* const engines_BR[] = {
|
||||
|
||||
// Belarus
|
||||
const PrepopulatedEngine* const engines_BY[] = {
|
||||
- &google,
|
||||
&yandex_by,
|
||||
+ &google,
|
||||
&mail_ru,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -435,10 +436,10 @@ const PrepopulatedEngine* const engines_IN[] = {
|
||||
|
||||
// Iraq
|
||||
const PrepopulatedEngine* const engines_IQ[] = {
|
||||
+ &yandex_tr,
|
||||
&google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
- &yandex_tr,
|
||||
&petal_search,
|
||||
};
|
||||
|
||||
@@ -525,8 +526,8 @@ const PrepopulatedEngine* const engines_KW[] = {
|
||||
|
||||
// Kazakhstan
|
||||
const PrepopulatedEngine* const engines_KZ[] = {
|
||||
- &google,
|
||||
&yandex_kz,
|
||||
+ &google,
|
||||
&mail_ru,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -894,8 +895,8 @@ const PrepopulatedEngine* const engines_TN[] = {
|
||||
|
||||
// Turkey
|
||||
const PrepopulatedEngine* const engines_TR[] = {
|
||||
- &google,
|
||||
&yandex_tr,
|
||||
+ &google,
|
||||
&yahoo_tr,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -1388,12 +1389,15 @@ std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines(
|
||||
t_urls = GetPrepopulationSetFromCountryID(
|
||||
country_codes::GetCountryIDFromPrefs(prefs));
|
||||
}
|
||||
- if (default_search_provider_index) {
|
||||
- const auto itr =
|
||||
- base::ranges::find(t_urls, yandex_ru.id, &TemplateURLData::prepopulate_id);
|
||||
- *default_search_provider_index =
|
||||
- itr == t_urls.end() ? 0 : std::distance(t_urls.begin(), itr);
|
||||
- }
|
||||
+ /* Making yandex_ru be the first in "const PrepopulatedEngine* const engines_RU[]"
|
||||
+ * makes it be the first item in chrome://settings/search,
|
||||
+ * but Google is still chosen by default.
|
||||
+ * Removed code calculated the distance between 0 and Google's position
|
||||
+ * and assign that position to default_search_provider_index,
|
||||
+ * so that Google still was the default search engine.
|
||||
+ * Instead, just use the first search engine as the default one.
|
||||
+ */
|
||||
+ if (default_search_provider_index) *default_search_provider_index = 0;
|
||||
return t_urls;
|
||||
}
|
||||
|
@ -0,0 +1,34 @@
|
||||
../../third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc:94:22: error: no matching constructor for initialization of 'SkColor4f' (aka 'SkRGBA4f<kUnpremul_SkAlphaType>')
|
||||
flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
|
||||
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
../../third_party/skia/include/core/SkColor.h:262:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 4 were provided
|
||||
struct SkRGBA4f {
|
||||
^
|
||||
../../third_party/skia/include/core/SkColor.h:262:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 4 were provided
|
||||
|
||||
|
||||
--- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
|
||||
+++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
|
||||
@@ -84,6 +84,7 @@ CanvasStyle::CanvasStyle(const CanvasSty
|
||||
|
||||
void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags,
|
||||
float global_alpha) const {
|
||||
+ SkColor4f clr = { 0.0f, 0.0f, 0.0f, global_alpha };
|
||||
switch (type_) {
|
||||
case kColor:
|
||||
ApplyColorToFlags(flags, global_alpha);
|
||||
@@ -91,12 +92,12 @@ void CanvasStyle::ApplyToFlags(cc::Paint
|
||||
case kGradient:
|
||||
GetCanvasGradient()->GetGradient()->ApplyToFlags(flags, SkMatrix::I(),
|
||||
ImageDrawOptions());
|
||||
- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
|
||||
+ flags.setColor(clr);
|
||||
break;
|
||||
case kImagePattern:
|
||||
GetCanvasPattern()->GetPattern()->ApplyToFlags(
|
||||
flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform()));
|
||||
- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
|
||||
+ flags.setColor(clr);
|
||||
break;
|
||||
default:
|
||||
NOTREACHED();
|
After Width: | Height: | Size: 3.1 KiB |
@ -0,0 +1,35 @@
|
||||
Add a missing constructor for BrandVersion; otherwise, we get build
|
||||
errors:
|
||||
|
||||
In file included from ../../chrome/test/chromedriver/capabilities.cc:5:
|
||||
In file included from ../../chrome/test/chromedriver/capabilities.h:10:
|
||||
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/map:60:
|
||||
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tree.h:67:
|
||||
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/ext/alloc_traits.h:34:
|
||||
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/alloc_traits.h:518:4: error: no matching function for call to 'construct_at'
|
||||
std::construct_at(__p, std::forward<_Args>(__args)...);
|
||||
^~~~~~~~~~~~~~~~~
|
||||
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/vector.tcc:117:21: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<BrandVersion>>::construct<BrandVersion, const std::basic_string<char> &, const std::basic_string<char> &>' requested here
|
||||
_Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
|
||||
^
|
||||
../../chrome/test/chromedriver/capabilities.cc:358:16: note: in instantiation of function template specialization 'std::vector<BrandVersion>::emplace_back<const std::basic_string<char> &, const std::basic_string<char> &>' requested here
|
||||
brands.emplace_back(*brand, *version);
|
||||
^
|
||||
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_construct.h:94:5: note: candidate template ignored: substitution failure [with _Tp = BrandVersion, _Args = <const std::basic_string<char> &, const std::basic_string<char> &>]: no matching constructor for initialization of 'BrandVersion'
|
||||
construct_at(_Tp* __location, _Args&&... __args)
|
||||
^
|
||||
1 error generated.
|
||||
|
||||
|
||||
|
||||
--- a/chrome/test/chromedriver/chrome/client_hints.h
|
||||
+++ b/chrome/test/chromedriver/chrome/client_hints.h
|
||||
@@ -18,6 +18,8 @@ struct BrandVersion {
|
||||
// * "major version" for "brands",
|
||||
// * "full version" for "fullVersionList".
|
||||
std::string version;
|
||||
+
|
||||
+ BrandVersion(const std::string& b, const std::string& v) : brand(b), version(v) { }
|
||||
};
|
||||
|
||||
// User-Agent Client Hints
|
@ -0,0 +1,12 @@
|
||||
diff -up chromium-101.0.4951.41/content/common/user_agent.cc.fedora-user-agent chromium-101.0.4951.41/content/common/user_agent.cc
|
||||
--- chromium-101.0.4951.41/content/common/user_agent.cc.fedora-user-agent 2022-04-27 20:03:36.913767022 +0000
|
||||
+++ chromium-101.0.4951.41/content/common/user_agent.cc 2022-04-27 20:04:30.591942420 +0000
|
||||
@@ -34,7 +34,7 @@ std::string GetUserAgentPlatform() {
|
||||
#elif BUILDFLAG(IS_MAC)
|
||||
return "Macintosh; ";
|
||||
#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||||
- return "X11; "; // strange, but that's what Firefox uses
|
||||
+ return "X11; Fedora; "; // strange, but that's what Firefox uses
|
||||
#elif BUILDFLAG(IS_ANDROID)
|
||||
return "Linux; ";
|
||||
#elif BUILDFLAG(IS_FUCHSIA)
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,134 @@
|
||||
diff -up chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py.116 chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py
|
||||
--- chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py.116 2022-07-05 13:31:29.434673638 +0000
|
||||
+++ chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py 2022-07-05 21:52:01.884578748 +0000
|
||||
@@ -29,7 +29,7 @@ import sys
|
||||
import types
|
||||
|
||||
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
||||
-__version__ = "1.15.0"
|
||||
+__version__ = "1.16.0"
|
||||
|
||||
|
||||
# Useful for very coarse version differentiation.
|
||||
@@ -71,6 +71,11 @@ else:
|
||||
MAXSIZE = int((1 << 63) - 1)
|
||||
del X
|
||||
|
||||
+if PY34:
|
||||
+ from importlib.util import spec_from_loader
|
||||
+else:
|
||||
+ spec_from_loader = None
|
||||
+
|
||||
|
||||
def _add_doc(func, doc):
|
||||
"""Add documentation to a function."""
|
||||
@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
|
||||
return self
|
||||
return None
|
||||
|
||||
+ def find_spec(self, fullname, path, target=None):
|
||||
+ if fullname in self.known_modules:
|
||||
+ return spec_from_loader(fullname, self)
|
||||
+ return None
|
||||
+
|
||||
def __get_module(self, fullname):
|
||||
try:
|
||||
return self.known_modules[fullname]
|
||||
@@ -223,6 +233,12 @@ class _SixMetaPathImporter(object):
|
||||
return None
|
||||
get_source = get_code # same as get_code
|
||||
|
||||
+ def create_module(self, spec):
|
||||
+ return self.load_module(spec.name)
|
||||
+
|
||||
+ def exec_module(self, module):
|
||||
+ pass
|
||||
+
|
||||
_importer = _SixMetaPathImporter(__name__)
|
||||
|
||||
|
||||
diff -up chromium-103.0.5060.53/third_party/six/src/six.py.116 chromium-103.0.5060.53/third_party/six/src/six.py
|
||||
--- chromium-103.0.5060.53/third_party/six/src/six.py.116 2022-07-05 13:32:28.916687658 +0000
|
||||
+++ chromium-103.0.5060.53/third_party/six/src/six.py 2022-07-05 21:59:42.561240407 +0000
|
||||
@@ -29,7 +29,7 @@ import sys
|
||||
import types
|
||||
|
||||
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
||||
-__version__ = "1.14.0"
|
||||
+__version__ = "1.16.0"
|
||||
|
||||
|
||||
# Useful for very coarse version differentiation.
|
||||
@@ -71,6 +71,11 @@ else:
|
||||
MAXSIZE = int((1 << 63) - 1)
|
||||
del X
|
||||
|
||||
+if PY34:
|
||||
+ from importlib.util import spec_from_loader
|
||||
+else:
|
||||
+ spec_from_loader = None
|
||||
+
|
||||
|
||||
def _add_doc(func, doc):
|
||||
"""Add documentation to a function."""
|
||||
@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
|
||||
return self
|
||||
return None
|
||||
|
||||
+ def find_spec(self, fullname, path, target=None):
|
||||
+ if fullname in self.known_modules:
|
||||
+ return spec_from_loader(fullname, self)
|
||||
+ return None
|
||||
+
|
||||
def __get_module(self, fullname):
|
||||
try:
|
||||
return self.known_modules[fullname]
|
||||
@@ -223,6 +233,12 @@ class _SixMetaPathImporter(object):
|
||||
return None
|
||||
get_source = get_code # same as get_code
|
||||
|
||||
+ def create_module(self, spec):
|
||||
+ return self.load_module(spec.name)
|
||||
+
|
||||
+ def exec_module(self, module):
|
||||
+ pass
|
||||
+
|
||||
_importer = _SixMetaPathImporter(__name__)
|
||||
|
||||
|
||||
@@ -890,12 +906,11 @@ def ensure_binary(s, encoding='utf-8', e
|
||||
- `str` -> encoded to `bytes`
|
||||
- `bytes` -> `bytes`
|
||||
"""
|
||||
+ if isinstance(s, binary_type):
|
||||
+ return s
|
||||
if isinstance(s, text_type):
|
||||
return s.encode(encoding, errors)
|
||||
- elif isinstance(s, binary_type):
|
||||
- return s
|
||||
- else:
|
||||
- raise TypeError("not expecting type '%s'" % type(s))
|
||||
+ raise TypeError("not expecting type '%s'" % type(s))
|
||||
|
||||
|
||||
def ensure_str(s, encoding='utf-8', errors='strict'):
|
||||
@@ -909,12 +924,15 @@ def ensure_str(s, encoding='utf-8', erro
|
||||
- `str` -> `str`
|
||||
- `bytes` -> decoded to `str`
|
||||
"""
|
||||
- if not isinstance(s, (text_type, binary_type)):
|
||||
- raise TypeError("not expecting type '%s'" % type(s))
|
||||
+ # Optimization: Fast return for the common case.
|
||||
+ if type(s) is str:
|
||||
+ return s
|
||||
if PY2 and isinstance(s, text_type):
|
||||
- s = s.encode(encoding, errors)
|
||||
+ return s.encode(encoding, errors)
|
||||
elif PY3 and isinstance(s, binary_type):
|
||||
- s = s.decode(encoding, errors)
|
||||
+ return s.decode(encoding, errors)
|
||||
+ elif not isinstance(s, (text_type, binary_type)):
|
||||
+ raise TypeError("not expecting type '%s'" % type(s))
|
||||
return s
|
||||
|
||||
|
@ -0,0 +1,39 @@
|
||||
diff -up chromium-105.0.5195.52/build/linux/unbundle/libusb.gn.gnsystem chromium-105.0.5195.52/build/linux/unbundle/libusb.gn
|
||||
--- chromium-105.0.5195.52/build/linux/unbundle/libusb.gn.gnsystem 2022-09-01 12:23:27.557313611 +0000
|
||||
+++ chromium-105.0.5195.52/build/linux/unbundle/libusb.gn 2022-09-01 12:23:27.557313611 +0000
|
||||
@@ -0,0 +1,24 @@
|
||||
+# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
+# Use of this source code is governed by a BSD-style license that can be
|
||||
+# found in the LICENSE file.
|
||||
+
|
||||
+import("//build/config/linux/pkg_config.gni")
|
||||
+import("//build/shim_headers.gni")
|
||||
+
|
||||
+pkg_config("system_libusb") {
|
||||
+ packages = [ "libusb-1.0" ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("libusb_shim") {
|
||||
+ root_path = "src/libusb"
|
||||
+ headers = [
|
||||
+ "libusb.h",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+source_set("libusb") {
|
||||
+ deps = [
|
||||
+ ":libusb_shim",
|
||||
+ ]
|
||||
+ public_configs = [ ":system_libusb" ]
|
||||
+}
|
||||
diff -up chromium-105.0.5195.52/build/linux/unbundle/replace_gn_files.py.gnsystem chromium-105.0.5195.52/build/linux/unbundle/replace_gn_files.py
|
||||
--- chromium-105.0.5195.52/build/linux/unbundle/replace_gn_files.py.gnsystem 2022-09-01 12:23:27.558313577 +0000
|
||||
+++ chromium-105.0.5195.52/build/linux/unbundle/replace_gn_files.py 2022-09-01 12:36:01.870847125 +0000
|
||||
@@ -52,6 +52,7 @@ REPLACEMENTS = {
|
||||
'libjpeg': 'third_party/libjpeg.gni',
|
||||
'libjxl' : 'third_party/libjxl/BUILD.gn',
|
||||
'libpng': 'third_party/libpng/BUILD.gn',
|
||||
+ 'libusb': 'third_party/libusb/BUILD.gn',
|
||||
'libvpx': 'third_party/libvpx/BUILD.gn',
|
||||
'libwebp': 'third_party/libwebp/BUILD.gn',
|
||||
'libxml': 'third_party/libxml/BUILD.gn',
|
@ -0,0 +1,36 @@
|
||||
diff -up chromium-108.0.5359.124/third_party/wayland/src/src/wayland-shm.c.me chromium-108.0.5359.124/third_party/wayland/src/src/wayland-shm.c
|
||||
--- chromium-108.0.5359.124/third_party/wayland/src/src/wayland-shm.c.me 2022-12-24 11:08:03.212333476 +0100
|
||||
+++ chromium-108.0.5359.124/third_party/wayland/src/src/wayland-shm.c 2022-12-24 11:08:18.316606155 +0100
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <signal.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
-#include <fcntl.h>
|
||||
+#include <linux/fcntl.h>
|
||||
|
||||
#include "wayland-os.h"
|
||||
#include "wayland-util.h"
|
||||
diff -up chromium-102.0.5005.115/v8/src/base/platform/platform-posix.cc.el7-memfd-include chromium-102.0.5005.115/v8/src/base/platform/platform-posix.cc
|
||||
--- chromium-102.0.5005.115/v8/src/base/platform/platform-posix.cc.el7-memfd-include 2022-06-15 10:52:49.553817031 -0400
|
||||
+++ chromium-102.0.5005.115/v8/src/base/platform/platform-posix.cc 2022-06-15 10:56:15.775173013 -0400
|
||||
@@ -56,6 +56,7 @@
|
||||
|
||||
#if V8_OS_LINUX
|
||||
#include <sys/prctl.h> // for prctl
|
||||
+#include <linux/memfd.h> // for MFD_CLOEXEC
|
||||
#endif
|
||||
|
||||
#if defined(V8_OS_FUCHSIA)
|
||||
diff -up iridium-browser-2022.12.108.1/third_party/wayland/src/cursor/os-compatibility.c.me iridium-browser-2022.12.108.1/third_party/wayland/src/cursor/os-compatibility.c
|
||||
--- iridium-browser-2022.12.108.1/third_party/wayland/src/cursor/os-compatibility.c.me 2022-12-08 21:59:43.502200984 +0100
|
||||
+++ iridium-browser-2022.12.108.1/third_party/wayland/src/cursor/os-compatibility.c 2022-12-08 22:13:53.375653343 +0100
|
||||
@@ -29,7 +29,8 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
-#include <fcntl.h>
|
||||
+#include <linux/fcntl.h> // for F_SEAL_SHRINK, F_ADD_SEALS, F_SEAL_SEAL
|
||||
+#include <linux/memfd.h> // for MFD_CLOEXEC
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
@ -0,0 +1,11 @@
|
||||
diff -up chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c.me chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c
|
||||
--- chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c.me 2022-12-27 16:14:22.507496575 +0100
|
||||
+++ chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c 2022-12-27 16:35:17.617573610 +0100
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "wayland-version.h"
|
||||
+#include "config.h" // HAVE_STRNDUP
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
@ -0,0 +1,294 @@
|
||||
diff -up chromium-108.0.5359.124/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
|
||||
--- chromium-108.0.5359.124/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
|
||||
+++ chromium-108.0.5359.124/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc 2023-01-04 21:44:23.098276796 +0100
|
||||
@@ -74,7 +74,7 @@ void CdmAudioDecoderConfigToAVCodecConte
|
||||
codec_context->sample_fmt = AV_SAMPLE_FMT_NONE;
|
||||
}
|
||||
|
||||
- codec_context->ch_layout.nb_channels = config.channel_count;
|
||||
+ codec_context->channels = config.channel_count;
|
||||
codec_context->sample_rate = config.samples_per_second;
|
||||
|
||||
if (config.extra_data) {
|
||||
@@ -124,8 +124,8 @@ void CopySamples(cdm::AudioFormat cdm_fo
|
||||
case cdm::kAudioFormatPlanarS16:
|
||||
case cdm::kAudioFormatPlanarF32: {
|
||||
const int decoded_size_per_channel =
|
||||
- decoded_audio_size / av_frame.ch_layout.nb_channels;
|
||||
- for (int i = 0; i < av_frame.ch_layout.nb_channels; ++i) {
|
||||
+ decoded_audio_size / av_frame.channels;
|
||||
+ for (int i = 0; i < av_frame.channels; ++i) {
|
||||
memcpy(output_buffer, av_frame.extended_data[i],
|
||||
decoded_size_per_channel);
|
||||
output_buffer += decoded_size_per_channel;
|
||||
@@ -185,14 +185,13 @@ bool FFmpegCdmAudioDecoder::Initialize(
|
||||
// Success!
|
||||
decoding_loop_ = std::make_unique<FFmpegDecodingLoop>(codec_context_.get());
|
||||
samples_per_second_ = config.samples_per_second;
|
||||
- bytes_per_frame_ =
|
||||
- codec_context_->ch_layout.nb_channels * config.bits_per_channel / 8;
|
||||
+ bytes_per_frame_ = codec_context_->channels * config.bits_per_channel / 8;
|
||||
output_timestamp_helper_ =
|
||||
std::make_unique<AudioTimestampHelper>(config.samples_per_second);
|
||||
is_initialized_ = true;
|
||||
|
||||
// Store initial values to guard against midstream configuration changes.
|
||||
- channels_ = codec_context_->ch_layout.nb_channels;
|
||||
+ channels_ = codec_context_->channels;
|
||||
av_sample_format_ = codec_context_->sample_fmt;
|
||||
|
||||
return true;
|
||||
@@ -292,19 +291,17 @@ cdm::Status FFmpegCdmAudioDecoder::Decod
|
||||
for (auto& frame : audio_frames) {
|
||||
int decoded_audio_size = 0;
|
||||
if (frame->sample_rate != samples_per_second_ ||
|
||||
- frame->ch_layout.nb_channels != channels_ ||
|
||||
- frame->format != av_sample_format_) {
|
||||
+ frame->channels != channels_ || frame->format != av_sample_format_) {
|
||||
DLOG(ERROR) << "Unsupported midstream configuration change!"
|
||||
<< " Sample Rate: " << frame->sample_rate << " vs "
|
||||
- << samples_per_second_
|
||||
- << ", Channels: " << frame->ch_layout.nb_channels << " vs "
|
||||
- << channels_ << ", Sample Format: " << frame->format << " vs "
|
||||
- << av_sample_format_;
|
||||
+ << samples_per_second_ << ", Channels: " << frame->channels
|
||||
+ << " vs " << channels_ << ", Sample Format: " << frame->format
|
||||
+ << " vs " << av_sample_format_;
|
||||
return cdm::kDecodeError;
|
||||
}
|
||||
|
||||
decoded_audio_size = av_samples_get_buffer_size(
|
||||
- nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples,
|
||||
+ nullptr, codec_context_->channels, frame->nb_samples,
|
||||
codec_context_->sample_fmt, 1);
|
||||
if (!decoded_audio_size)
|
||||
continue;
|
||||
@@ -323,9 +320,9 @@ bool FFmpegCdmAudioDecoder::OnNewFrame(
|
||||
size_t* total_size,
|
||||
std::vector<std::unique_ptr<AVFrame, ScopedPtrAVFreeFrame>>* audio_frames,
|
||||
AVFrame* frame) {
|
||||
- *total_size += av_samples_get_buffer_size(
|
||||
- nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples,
|
||||
- codec_context_->sample_fmt, 1);
|
||||
+ *total_size += av_samples_get_buffer_size(nullptr, codec_context_->channels,
|
||||
+ frame->nb_samples,
|
||||
+ codec_context_->sample_fmt, 1);
|
||||
audio_frames->emplace_back(av_frame_clone(frame));
|
||||
return true;
|
||||
}
|
||||
diff -up chromium-108.0.5359.124/media/ffmpeg/ffmpeg_common.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/ffmpeg/ffmpeg_common.cc
|
||||
--- chromium-108.0.5359.124/media/ffmpeg/ffmpeg_common.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
|
||||
+++ chromium-108.0.5359.124/media/ffmpeg/ffmpeg_common.cc 2023-01-04 21:52:59.674165082 +0100
|
||||
@@ -353,11 +353,9 @@ bool AVCodecContextToAudioDecoderConfig(
|
||||
codec_context->sample_fmt, codec_context->codec_id);
|
||||
|
||||
ChannelLayout channel_layout =
|
||||
- codec_context->ch_layout.nb_channels > 8
|
||||
+ codec_context->channels > 8
|
||||
? CHANNEL_LAYOUT_DISCRETE
|
||||
- : ChannelLayoutToChromeChannelLayout(
|
||||
- codec_context->ch_layout.u.mask,
|
||||
- codec_context->ch_layout.nb_channels);
|
||||
+ : ChannelLayoutToChromeChannelLayout(codec_context->channel_layout, codec_context->channels);
|
||||
|
||||
switch (codec) {
|
||||
// For AC3/EAC3 we enable only demuxing, but not decoding, so FFmpeg does
|
||||
@@ -409,7 +407,7 @@ bool AVCodecContextToAudioDecoderConfig(
|
||||
extra_data, encryption_scheme, seek_preroll,
|
||||
codec_context->delay);
|
||||
if (channel_layout == CHANNEL_LAYOUT_DISCRETE)
|
||||
- config->SetChannelsForDiscrete(codec_context->ch_layout.nb_channels);
|
||||
+ config->SetChannelsForDiscrete(codec_context->channels);
|
||||
|
||||
#if BUILDFLAG(ENABLE_PLATFORM_AC3_EAC3_AUDIO)
|
||||
// These are bitstream formats unknown to ffmpeg, so they don't have
|
||||
@@ -478,7 +476,7 @@ void AudioDecoderConfigToAVCodecContext(
|
||||
|
||||
// TODO(scherkus): should we set |channel_layout|? I'm not sure if FFmpeg uses
|
||||
// said information to decode.
|
||||
- codec_context->ch_layout.nb_channels = config.channels();
|
||||
+ codec_context->channels = config.channels();
|
||||
codec_context->sample_rate = config.samples_per_second();
|
||||
|
||||
if (config.extra_data().empty()) {
|
||||
diff -up chromium-108.0.5359.124/media/filters/audio_file_reader.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/audio_file_reader.cc
|
||||
--- chromium-108.0.5359.124/media/filters/audio_file_reader.cc.revert-new-channel-layout-api 2023-01-04 21:44:23.095276762 +0100
|
||||
+++ chromium-108.0.5359.124/media/filters/audio_file_reader.cc 2023-01-04 21:44:23.098276796 +0100
|
||||
@@ -113,15 +113,14 @@ bool AudioFileReader::OpenDecoder() {
|
||||
|
||||
// Verify the channel layout is supported by Chrome. Acts as a sanity check
|
||||
// against invalid files. See http://crbug.com/171962
|
||||
- if (ChannelLayoutToChromeChannelLayout(
|
||||
- codec_context_->ch_layout.u.mask,
|
||||
- codec_context_->ch_layout.nb_channels) ==
|
||||
+ if (ChannelLayoutToChromeChannelLayout(codec_context_->channel_layout,
|
||||
+ codec_context_->channels) ==
|
||||
CHANNEL_LAYOUT_UNSUPPORTED) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Store initial values to guard against midstream configuration changes.
|
||||
- channels_ = codec_context_->ch_layout.nb_channels;
|
||||
+ channels_ = codec_context_->channels;
|
||||
audio_codec_ = CodecIDToAudioCodec(codec_context_->codec_id);
|
||||
sample_rate_ = codec_context_->sample_rate;
|
||||
av_sample_format_ = codec_context_->sample_fmt;
|
||||
@@ -224,7 +223,7 @@ bool AudioFileReader::OnNewFrame(
|
||||
if (frames_read < 0)
|
||||
return false;
|
||||
|
||||
- const int channels = frame->ch_layout.nb_channels;
|
||||
+ const int channels = frame->channels;
|
||||
if (frame->sample_rate != sample_rate_ || channels != channels_ ||
|
||||
frame->format != av_sample_format_) {
|
||||
DLOG(ERROR) << "Unsupported midstream configuration change!"
|
||||
diff -up chromium-108.0.5359.124/media/filters/audio_file_reader_unittest.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/audio_file_reader_unittest.cc
|
||||
--- chromium-108.0.5359.124/media/filters/audio_file_reader_unittest.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
|
||||
+++ chromium-108.0.5359.124/media/filters/audio_file_reader_unittest.cc 2023-01-04 21:44:23.098276796 +0100
|
||||
@@ -121,11 +121,11 @@ class AudioFileReaderTest : public testi
|
||||
EXPECT_FALSE(reader_->Open());
|
||||
}
|
||||
|
||||
- void RunTestFailingDecode(const char* fn, int expect_read = 0) {
|
||||
+ void RunTestFailingDecode(const char* fn) {
|
||||
Initialize(fn);
|
||||
EXPECT_TRUE(reader_->Open());
|
||||
std::vector<std::unique_ptr<AudioBus>> decoded_audio_packets;
|
||||
- EXPECT_EQ(reader_->Read(&decoded_audio_packets), expect_read);
|
||||
+ EXPECT_EQ(reader_->Read(&decoded_audio_packets), 0);
|
||||
}
|
||||
|
||||
void RunTestPartialDecode(const char* fn) {
|
||||
@@ -219,7 +219,7 @@ TEST_F(AudioFileReaderTest, AAC_ADTS) {
|
||||
}
|
||||
|
||||
TEST_F(AudioFileReaderTest, MidStreamConfigChangesFail) {
|
||||
- RunTestFailingDecode("midstream_config_change.mp3", 42624);
|
||||
+ RunTestFailingDecode("midstream_config_change.mp3");
|
||||
}
|
||||
#endif
|
||||
|
||||
diff -up chromium-108.0.5359.124/media/filters/audio_video_metadata_extractor.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/audio_video_metadata_extractor.cc
|
||||
--- chromium-108.0.5359.124/media/filters/audio_video_metadata_extractor.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
|
||||
+++ chromium-108.0.5359.124/media/filters/audio_video_metadata_extractor.cc 2023-01-04 21:44:23.098276796 +0100
|
||||
@@ -113,15 +113,6 @@ bool AudioVideoMetadataExtractor::Extrac
|
||||
if (!stream)
|
||||
continue;
|
||||
|
||||
- void* display_matrix =
|
||||
- av_stream_get_side_data(stream, AV_PKT_DATA_DISPLAYMATRIX, nullptr);
|
||||
- if (display_matrix) {
|
||||
- rotation_ = VideoTransformation::FromFFmpegDisplayMatrix(
|
||||
- static_cast<int32_t*>(display_matrix))
|
||||
- .rotation;
|
||||
- info.tags["rotate"] = base::NumberToString(rotation_);
|
||||
- }
|
||||
-
|
||||
// Extract dictionary from streams also. Needed for containers that attach
|
||||
// metadata to contained streams instead the container itself, like OGG.
|
||||
ExtractDictionary(stream->metadata, &info.tags);
|
||||
@@ -264,6 +255,8 @@ void AudioVideoMetadataExtractor::Extrac
|
||||
if (raw_tags->find(tag->key) == raw_tags->end())
|
||||
(*raw_tags)[tag->key] = tag->value;
|
||||
|
||||
+ if (ExtractInt(tag, "rotate", &rotation_))
|
||||
+ continue;
|
||||
if (ExtractString(tag, "album", &album_))
|
||||
continue;
|
||||
if (ExtractString(tag, "artist", &artist_))
|
||||
diff -up chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter.cc
|
||||
--- chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
|
||||
+++ chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter.cc 2023-01-04 21:44:23.099276807 +0100
|
||||
@@ -195,15 +195,14 @@ bool FFmpegAACBitstreamConverter::Conver
|
||||
if (!header_generated_ || codec_ != stream_codec_parameters_->codec_id ||
|
||||
audio_profile_ != stream_codec_parameters_->profile ||
|
||||
sample_rate_index_ != sample_rate_index ||
|
||||
- channel_configuration_ !=
|
||||
- stream_codec_parameters_->ch_layout.nb_channels ||
|
||||
+ channel_configuration_ != stream_codec_parameters_->channels ||
|
||||
frame_length_ != header_plus_packet_size) {
|
||||
header_generated_ =
|
||||
GenerateAdtsHeader(stream_codec_parameters_->codec_id,
|
||||
0, // layer
|
||||
stream_codec_parameters_->profile, sample_rate_index,
|
||||
0, // private stream
|
||||
- stream_codec_parameters_->ch_layout.nb_channels,
|
||||
+ stream_codec_parameters_->channels,
|
||||
0, // originality
|
||||
0, // home
|
||||
0, // copyrighted_stream
|
||||
@@ -215,7 +214,7 @@ bool FFmpegAACBitstreamConverter::Conver
|
||||
codec_ = stream_codec_parameters_->codec_id;
|
||||
audio_profile_ = stream_codec_parameters_->profile;
|
||||
sample_rate_index_ = sample_rate_index;
|
||||
- channel_configuration_ = stream_codec_parameters_->ch_layout.nb_channels;
|
||||
+ channel_configuration_ = stream_codec_parameters_->channels;
|
||||
frame_length_ = header_plus_packet_size;
|
||||
}
|
||||
|
||||
diff -up chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
|
||||
--- chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
|
||||
+++ chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc 2023-01-04 21:44:23.099276807 +0100
|
||||
@@ -34,7 +34,7 @@ class FFmpegAACBitstreamConverterTest :
|
||||
memset(&test_parameters_, 0, sizeof(AVCodecParameters));
|
||||
test_parameters_.codec_id = AV_CODEC_ID_AAC;
|
||||
test_parameters_.profile = FF_PROFILE_AAC_MAIN;
|
||||
- test_parameters_.ch_layout.nb_channels = 2;
|
||||
+ test_parameters_.channels = 2;
|
||||
test_parameters_.extradata = extradata_header_;
|
||||
test_parameters_.extradata_size = sizeof(extradata_header_);
|
||||
}
|
||||
diff -up chromium-108.0.5359.124/media/filters/ffmpeg_audio_decoder.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/ffmpeg_audio_decoder.cc
|
||||
--- chromium-108.0.5359.124/media/filters/ffmpeg_audio_decoder.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
|
||||
+++ chromium-108.0.5359.124/media/filters/ffmpeg_audio_decoder.cc 2023-01-04 21:44:23.099276807 +0100
|
||||
@@ -28,7 +28,7 @@ namespace media {
|
||||
|
||||
// Return the number of channels from the data in |frame|.
|
||||
static inline int DetermineChannels(AVFrame* frame) {
|
||||
- return frame->ch_layout.nb_channels;
|
||||
+ return frame->channels;
|
||||
}
|
||||
|
||||
// Called by FFmpeg's allocation routine to allocate a buffer. Uses
|
||||
@@ -233,7 +233,7 @@ bool FFmpegAudioDecoder::OnNewFrame(cons
|
||||
// Translate unsupported into discrete layouts for discrete configurations;
|
||||
// ffmpeg does not have a labeled discrete configuration internally.
|
||||
ChannelLayout channel_layout = ChannelLayoutToChromeChannelLayout(
|
||||
- codec_context_->ch_layout.u.mask, codec_context_->ch_layout.nb_channels);
|
||||
+ codec_context_->channel_layout, codec_context_->channels);
|
||||
if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED &&
|
||||
config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) {
|
||||
channel_layout = CHANNEL_LAYOUT_DISCRETE;
|
||||
@@ -350,11 +350,11 @@ bool FFmpegAudioDecoder::ConfigureDecode
|
||||
// Success!
|
||||
av_sample_format_ = codec_context_->sample_fmt;
|
||||
|
||||
- if (codec_context_->ch_layout.nb_channels != config.channels()) {
|
||||
+ if (codec_context_->channels != config.channels()) {
|
||||
MEDIA_LOG(ERROR, media_log_)
|
||||
<< "Audio configuration specified " << config.channels()
|
||||
<< " channels, but FFmpeg thinks the file contains "
|
||||
- << codec_context_->ch_layout.nb_channels << " channels";
|
||||
+ << codec_context_->channels << " channels";
|
||||
ReleaseFFmpegResources();
|
||||
state_ = DecoderState::kUninitialized;
|
||||
return false;
|
||||
@@ -405,7 +405,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(s
|
||||
if (frame->nb_samples <= 0)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
- if (s->ch_layout.nb_channels != channels) {
|
||||
+ if (s->channels != channels) {
|
||||
DLOG(ERROR) << "AVCodecContext and AVFrame disagree on channel count.";
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
@@ -438,8 +438,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(s
|
||||
ChannelLayout channel_layout =
|
||||
config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE
|
||||
? CHANNEL_LAYOUT_DISCRETE
|
||||
- : ChannelLayoutToChromeChannelLayout(s->ch_layout.u.mask,
|
||||
- s->ch_layout.nb_channels);
|
||||
+ : ChannelLayoutToChromeChannelLayout(s->channel_layout, s->channels);
|
||||
|
||||
if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED) {
|
||||
DLOG(ERROR) << "Unsupported channel layout.";
|
@ -0,0 +1,36 @@
|
||||
diff -up chromium-108.0.5359.124/net/filter/brotli_source_stream.cc.me chromium-108.0.5359.124/net/filter/brotli_source_stream.cc
|
||||
--- chromium-108.0.5359.124/net/filter/brotli_source_stream.cc.me 2022-12-30 16:00:58.320318310 +0100
|
||||
+++ chromium-108.0.5359.124/net/filter/brotli_source_stream.cc 2022-12-30 16:01:24.928581631 +0100
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "net/base/io_buffer.h"
|
||||
-#include "third_party/brotli/include/brotli/decode.h"
|
||||
+#include <brotli/decode.h>
|
||||
|
||||
namespace net {
|
||||
|
||||
diff -up chromium-108.0.5359.124/net/ssl/cert_compression.cc.me chromium-108.0.5359.124/net/ssl/cert_compression.cc
|
||||
--- chromium-108.0.5359.124/net/ssl/cert_compression.cc.me 2022-12-30 15:57:59.859543993 +0100
|
||||
+++ chromium-108.0.5359.124/net/ssl/cert_compression.cc 2022-12-30 16:00:48.560221723 +0100
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "third_party/boringssl/src/include/openssl/ssl.h"
|
||||
|
||||
#if !defined(NET_DISABLE_BROTLI)
|
||||
-#include "third_party/brotli/include/brotli/decode.h"
|
||||
+#include <brotli/decode.h>
|
||||
#endif
|
||||
|
||||
namespace net {
|
||||
diff -up chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc.me chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc
|
||||
--- chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc.me 2022-12-30 21:12:27.058346797 +0100
|
||||
+++ chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc 2022-12-30 21:13:58.363183795 +0100
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "build/build_config.h"
|
||||
#include "net/filter/gzip_header.h"
|
||||
#include "skia/ext/image_operations.h"
|
||||
-#include "third_party/brotli/include/brotli/decode.h"
|
||||
+#include <brotli/decode.h>
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "third_party/zlib/google/compression_utils.h"
|
@ -0,0 +1,64 @@
|
||||
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc
|
||||
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc.system-minizip 2023-01-04 20:20:37.000000000 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc 2023-01-08 15:48:08.654793086 +0100
|
||||
@@ -27,8 +27,8 @@ limitations under the License.
|
||||
#include "tensorflow_lite_support/cc/port/status_macros.h"
|
||||
#include "tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.h"
|
||||
#include "tensorflow_lite_support/metadata/metadata_schema_generated.h"
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
-#include "third_party/zlib/contrib/minizip/unzip.h"
|
||||
+#include <minizip/ioapi.h>
|
||||
+#include <minizip/unzip.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
||||
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc
|
||||
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc.system-minizip 2023-01-04 20:20:37.000000000 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc 2023-01-08 15:48:08.655793097 +0100
|
||||
@@ -26,8 +26,8 @@ limitations under the License.
|
||||
#include "tensorflow_lite_support/cc/port/statusor.h"
|
||||
#include "tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h"
|
||||
#include "tensorflow_lite_support/metadata/metadata_schema_generated.h"
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
-#include "third_party/zlib/contrib/minizip/unzip.h"
|
||||
+#include <minizip/ioapi.h>
|
||||
+#include <minizip/zip.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
||||
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
|
||||
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc.system-minizip 2023-01-08 15:48:08.655793097 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc 2023-01-08 15:53:17.498329640 +0100
|
||||
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
#include <cstdio>
|
||||
|
||||
#include "absl/strings/string_view.h" // from @com_google_absl
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
+#include <minizip/ioapi.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
||||
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc
|
||||
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc.system-minizip 2023-01-04 20:20:37.000000000 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc 2023-01-08 15:48:08.655793097 +0100
|
||||
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
#include <cstdio>
|
||||
|
||||
#include "absl/strings/string_view.h" // from @com_google_absl
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
+#include <minizip/ioapi.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
||||
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h
|
||||
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h.system-minizip 2023-01-04 20:20:37.000000000 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h 2023-01-08 15:48:08.655793097 +0100
|
||||
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
#include <cstdlib>
|
||||
|
||||
#include "absl/strings/string_view.h" // from @com_google_absl
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
+#include <minizip/ioapi.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
@ -0,0 +1,141 @@
|
||||
diff -up chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc.me chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc
|
||||
--- chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc.me 2023-02-08 20:34:02.700010846 +0100
|
||||
+++ chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc 2023-02-08 20:35:30.455580670 +0100
|
||||
@@ -4,7 +4,9 @@
|
||||
|
||||
#include "sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.h"
|
||||
|
||||
-#include <linux/kcmp.h>
|
||||
+#ifndef KCMP_FILE
|
||||
+#define KCMP_FILE 0
|
||||
+#endif
|
||||
|
||||
#include "media/gpu/buildflags.h"
|
||||
#include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h"
|
||||
diff -up chromium-99.0.4844.51/mojo/core/channel_linux.cc.epel7-header-workarounds chromium-99.0.4844.51/mojo/core/channel_linux.cc
|
||||
--- chromium-99.0.4844.51/mojo/core/channel_linux.cc.epel7-header-workarounds 2022-02-28 19:05:54.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/mojo/core/channel_linux.cc 2022-03-05 14:50:49.876812909 -0500
|
||||
@@ -44,6 +44,25 @@
|
||||
#include "base/android/build_info.h"
|
||||
#endif
|
||||
|
||||
+#ifndef F_LINUX_SPECIFIC_BASE
|
||||
+#define F_LINUX_SPECIFIC_BASE 1024
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SEAL
|
||||
+#define F_SEAL_SEAL 0x0001
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SHRINK
|
||||
+#define F_SEAL_SHRINK 0x0002
|
||||
+#endif
|
||||
+#ifndef F_SEAL_GROW
|
||||
+#define F_SEAL_GROW 0x0004
|
||||
+#endif
|
||||
+#ifndef F_ADD_SEALS
|
||||
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
|
||||
+#endif
|
||||
+#ifndef F_GET_SEALS
|
||||
+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
|
||||
+#endif
|
||||
+
|
||||
#ifndef EFD_ZERO_ON_WAKE
|
||||
#define EFD_ZERO_ON_WAKE O_NOFOLLOW
|
||||
#endif
|
||||
diff -up chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc.epel7-header-workarounds chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||
--- chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc.epel7-header-workarounds 2022-03-05 14:50:49.877812915 -0500
|
||||
+++ chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 2022-03-05 15:15:02.536867009 -0500
|
||||
@@ -53,6 +53,25 @@
|
||||
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
+#ifndef F_LINUX_SPECIFIC_BASE
|
||||
+#define F_LINUX_SPECIFIC_BASE 1024
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SEAL
|
||||
+#define F_SEAL_SEAL 0x0001
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SHRINK
|
||||
+#define F_SEAL_SHRINK 0x0002
|
||||
+#endif
|
||||
+#ifndef F_SEAL_GROW
|
||||
+#define F_SEAL_GROW 0x0004
|
||||
+#endif
|
||||
+#ifndef F_ADD_SEALS
|
||||
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
|
||||
+#endif
|
||||
+#ifndef F_GET_SEALS
|
||||
+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
|
||||
+#endif
|
||||
+
|
||||
#if defined(__arm__) && !defined(MAP_STACK)
|
||||
#define MAP_STACK 0x20000 // Daisy build environment has old headers.
|
||||
#endif
|
||||
diff -up chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc.epel7-header-workarounds chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
|
||||
--- chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc.epel7-header-workarounds 2022-02-28 19:05:55.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc 2022-03-05 14:50:49.877812915 -0500
|
||||
@@ -6,7 +6,24 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
-#include <linux/kcmp.h>
|
||||
+#ifndef KCMP_FILE
|
||||
+#define KCMP_FILE 0
|
||||
+#endif
|
||||
+#ifndef F_LINUX_SPECIFIC_BASE
|
||||
+#define F_LINUX_SPECIFIC_BASE 1024
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SEAL
|
||||
+#define F_SEAL_SEAL 0x0001
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SHRINK
|
||||
+#define F_SEAL_SHRINK 0x0002
|
||||
+#endif
|
||||
+#ifndef F_SEAL_GROW
|
||||
+#define F_SEAL_GROW 0x0004
|
||||
+#endif
|
||||
+#ifndef F_ADD_SEALS
|
||||
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
|
||||
+#endif
|
||||
#include <sys/socket.h>
|
||||
|
||||
// Some arch's (arm64 for instance) unistd.h don't pull in symbols used here
|
||||
diff -up chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc.epel7-header-workarounds chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc
|
||||
--- chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc.epel7-header-workarounds 2022-02-28 19:05:55.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc 2022-03-05 14:50:49.877812915 -0500
|
||||
@@ -22,6 +22,22 @@
|
||||
#include "sandbox/policy/linux/sandbox_linux.h"
|
||||
#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h"
|
||||
|
||||
+#ifndef F_LINUX_SPECIFIC_BASE
|
||||
+#define F_LINUX_SPECIFIC_BASE 1024
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SEAL
|
||||
+#define F_SEAL_SEAL 0x0001
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SHRINK
|
||||
+#define F_SEAL_SHRINK 0x0002
|
||||
+#endif
|
||||
+#ifndef F_SEAL_GROW
|
||||
+#define F_SEAL_GROW 0x0004
|
||||
+#endif
|
||||
+#ifndef F_ADD_SEALS
|
||||
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
|
||||
+#endif
|
||||
+
|
||||
using sandbox::bpf_dsl::AllOf;
|
||||
using sandbox::bpf_dsl::Allow;
|
||||
using sandbox::bpf_dsl::Arg;
|
||||
diff -up chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc.epel7-header-workarounds chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc
|
||||
--- chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc.epel7-header-workarounds 2022-02-28 19:06:49.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc 2022-03-05 14:50:49.877812915 -0500
|
||||
@@ -23,6 +23,10 @@
|
||||
#include "ui/events/ozone/evdev/numberpad_metrics.h"
|
||||
#endif
|
||||
|
||||
+#ifndef SW_PEN_INSERTED
|
||||
+#define SW_PEN_INSERTED 0x0f /* set = pen inserted */
|
||||
+#endif
|
||||
+
|
||||
namespace ui {
|
||||
|
||||
namespace {
|
@ -0,0 +1,11 @@
|
||||
diff -up chromium-110.0.5481.177/base/memory/ref_counted.h.me chromium-110.0.5481.177/base/memory/ref_counted.h
|
||||
--- chromium-110.0.5481.177/base/memory/ref_counted.h.me 2023-02-23 13:34:33.174817255 -0500
|
||||
+++ chromium-110.0.5481.177/base/memory/ref_counted.h 2023-02-23 13:42:28.646052469 -0500
|
||||
@@ -6,6 +6,7 @@
|
||||
#define BASE_MEMORY_REF_COUNTED_H_
|
||||
|
||||
#include <stddef.h>
|
||||
+#include <limits>
|
||||
|
||||
#include <utility>
|
||||
|
@ -0,0 +1,120 @@
|
||||
From 2aef9000a1c8d76d3072365ffcb471ebffa20d3d Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schneider <asn@cryptomilk.org>
|
||||
Date: Tue, 15 Mar 2022 14:26:16 +0100
|
||||
Subject: [PATCH] Track first_dts instead of using non-upstream functions
|
||||
|
||||
The function av_stream_get_first_dts() is not an upstream ffmpeg function and
|
||||
is not available if you build with system ffmpeg. We can easily track the
|
||||
first_dts on our own.
|
||||
|
||||
See also
|
||||
https://ffmpeg.org/pipermail/ffmpeg-devel/2021-September/285401.html
|
||||
|
||||
Bug: 1306560
|
||||
|
||||
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
|
||||
Change-Id: I90ba3cf2f2e16f56a0b405f26c67f911349fb71d
|
||||
---
|
||||
media/filters/ffmpeg_demuxer.cc | 18 ++++++++++++------
|
||||
media/filters/ffmpeg_demuxer.h | 3 +++
|
||||
3 files changed, 16 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
|
||||
index 111899b661..799fc6e941 100644
|
||||
--- a/media/filters/ffmpeg_demuxer.cc
|
||||
+++ b/media/filters/ffmpeg_demuxer.cc
|
||||
@@ -97,7 +97,7 @@ static base::TimeDelta FramesToTimeDelta(int frames, double sample_rate) {
|
||||
sample_rate);
|
||||
}
|
||||
|
||||
-static base::TimeDelta ExtractStartTime(AVStream* stream) {
|
||||
+static base::TimeDelta ExtractStartTime(AVStream* stream, int64_t first_dts) {
|
||||
// The default start time is zero.
|
||||
base::TimeDelta start_time;
|
||||
|
||||
@@ -107,12 +107,12 @@ static base::TimeDelta ExtractStartTime(AVStream* stream) {
|
||||
|
||||
// Next try to use the first DTS value, for codecs where we know PTS == DTS
|
||||
// (excludes all H26x codecs). The start time must be returned in PTS.
|
||||
- if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp &&
|
||||
+ if (first_dts != AV_NOPTS_VALUE &&
|
||||
stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
|
||||
stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
|
||||
stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
|
||||
const base::TimeDelta first_pts =
|
||||
- ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream));
|
||||
+ ConvertFromTimeBase(stream->time_base, first_dts);
|
||||
if (first_pts < start_time)
|
||||
start_time = first_pts;
|
||||
}
|
||||
@@ -283,6 +283,7 @@ FFmpegDemuxerStream::FFmpegDemuxerStream(
|
||||
fixup_negative_timestamps_(false),
|
||||
fixup_chained_ogg_(false),
|
||||
num_discarded_packet_warnings_(0),
|
||||
+ first_dts_(AV_NOPTS_VALUE),
|
||||
last_packet_pos_(AV_NOPTS_VALUE),
|
||||
last_packet_dts_(AV_NOPTS_VALUE) {
|
||||
DCHECK(demuxer_);
|
||||
@@ -349,6 +350,10 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
|
||||
int64_t packet_dts =
|
||||
packet->dts == AV_NOPTS_VALUE ? packet->pts : packet->dts;
|
||||
|
||||
+ if (first_dts_ == AV_NOPTS_VALUE) {
|
||||
+ first_dts_ = packet_dts;
|
||||
+ }
|
||||
+
|
||||
// Chained ogg files have non-monotonically increasing position and time stamp
|
||||
// values, which prevents us from using them to determine if a packet should
|
||||
// be dropped. Since chained ogg is only allowed on single track audio only
|
||||
@@ -1442,7 +1447,8 @@ void FFmpegDemuxer::OnFindStreamInfoDone(int result) {
|
||||
|
||||
max_duration = std::max(max_duration, streams_[i]->duration());
|
||||
|
||||
- base::TimeDelta start_time = ExtractStartTime(stream);
|
||||
+ base::TimeDelta start_time =
|
||||
+ ExtractStartTime(stream, streams_[i]->first_dts());
|
||||
|
||||
// Note: This value is used for seeking, so we must take the true value and
|
||||
// not the one possibly clamped to zero below.
|
||||
@@ -1599,7 +1605,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::FindStreamWithLowestStartTimestamp(
|
||||
for (const auto& stream : streams_) {
|
||||
if (!stream || stream->IsEnabled() != enabled)
|
||||
continue;
|
||||
- if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
|
||||
+ if (stream->first_dts() == AV_NOPTS_VALUE)
|
||||
continue;
|
||||
if (!lowest_start_time_stream ||
|
||||
stream->start_time() < lowest_start_time_stream->start_time()) {
|
||||
@@ -1620,7 +1626,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::FindPreferredStreamForSeeking(
|
||||
if (stream->type() != DemuxerStream::VIDEO)
|
||||
continue;
|
||||
|
||||
- if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
|
||||
+ if (stream->first_dts() == AV_NOPTS_VALUE)
|
||||
continue;
|
||||
|
||||
if (!stream->IsEnabled())
|
||||
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
|
||||
index c147309d6f..48a8f6ad8c 100644
|
||||
--- a/media/filters/ffmpeg_demuxer.h
|
||||
+++ b/media/filters/ffmpeg_demuxer.h
|
||||
@@ -151,6 +151,8 @@ class MEDIA_EXPORT FFmpegDemuxerStream : public DemuxerStream {
|
||||
base::TimeDelta start_time() const { return start_time_; }
|
||||
void set_start_time(base::TimeDelta time) { start_time_ = time; }
|
||||
|
||||
+ int64_t first_dts() const { return first_dts_; }
|
||||
+
|
||||
private:
|
||||
friend class FFmpegDemuxerTest;
|
||||
|
||||
@@ -208,6 +210,7 @@ class MEDIA_EXPORT FFmpegDemuxerStream : public DemuxerStream {
|
||||
bool fixup_chained_ogg_;
|
||||
|
||||
int num_discarded_packet_warnings_;
|
||||
+ int64_t first_dts_;
|
||||
int64_t last_packet_pos_;
|
||||
int64_t last_packet_dts_;
|
||||
};
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,12 @@
|
||||
diff -up chromium-113.0.5672.24/chrome/browser/media/router/media_router_feature.cc.disable-GlobalMediaControlsCastStartStop chromium-113.0.5672.24/chrome/browser/media/router/media_router_feature.cc
|
||||
--- chromium-113.0.5672.24/chrome/browser/media/router/media_router_feature.cc.disable-GlobalMediaControlsCastStartStop 2023-04-07 13:54:52.562292026 +0200
|
||||
+++ chromium-113.0.5672.24/chrome/browser/media/router/media_router_feature.cc 2023-04-07 13:57:41.470414086 +0200
|
||||
@@ -68,7 +68,7 @@ BASE_FEATURE(kGlobalMediaControlsCastSta
|
||||
#else
|
||||
BASE_FEATURE(kGlobalMediaControlsCastStartStop,
|
||||
"GlobalMediaControlsCastStartStop",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
@ -0,0 +1,12 @@
|
||||
diff -up chromium-113.0.5672.24/components/os_crypt/sync/features.gni.disblegnomekeyring chromium-113.0.5672.24/components/os_crypt/sync/features.gni
|
||||
--- chromium-113.0.5672.24/components/os_crypt/sync/features.gni.disblegnomekeyring 2023-04-07 14:23:11.083985460 +0200
|
||||
+++ chromium-113.0.5672.24/components/os_crypt/sync/features.gni 2023-04-07 14:23:44.276599353 +0200
|
||||
@@ -8,7 +8,7 @@ import("//build/config/ui.gni")
|
||||
declare_args() {
|
||||
# Whether to use libgnome-keyring (deprecated by libsecret).
|
||||
# See http://crbug.com/466975 and http://crbug.com/355223.
|
||||
- use_gnome_keyring = is_linux && use_glib
|
||||
+ use_gnome_keyring = false
|
||||
|
||||
# Whether to make account and service names for the crypto key storage
|
||||
# configurable at runtime for embedders.
|
@ -0,0 +1,545 @@
|
||||
commit 75f4b48eb71d4872ba3ac6c9fc3662a60eb4175d
|
||||
Author: Tom Anderson <thomasanderson@chromium.org>
|
||||
Date: Thu Apr 27 02:21:34 2023 +0000
|
||||
|
||||
Add QT6 LinuxUi backend
|
||||
|
||||
- Enable QT6 by default on KDE6
|
||||
- If QT6 load fails, fallback to QT5 (and vice versa)
|
||||
- Add use_qt6 build flag for packager control
|
||||
- Add --qt-version runtime flag for user control
|
||||
|
||||
R=thestig
|
||||
|
||||
Change-Id: Ib1d9f6183663ecf7b9ddfe9d7f3e3442e534ccda
|
||||
Fixed: 1434754
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4475369
|
||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1136295}
|
||||
|
||||
diff --git a/chrome/installer/linux/BUILD.gn b/chrome/installer/linux/BUILD.gn
|
||||
index 5639b9ffc996e..3bacd3398d4a2 100644
|
||||
--- a/chrome/installer/linux/BUILD.gn
|
||||
+++ b/chrome/installer/linux/BUILD.gn
|
||||
@@ -109,6 +109,9 @@ if (use_qt) {
|
||||
# to prevent a hard dependency on QT for the package.
|
||||
packaging_files += [ "$root_out_dir/libqt5_shim.so" ]
|
||||
}
|
||||
+if (use_qt6) {
|
||||
+ packaging_files += [ "$root_out_dir/libqt6_shim.so" ]
|
||||
+}
|
||||
|
||||
action_foreach("calculate_deb_dependencies") {
|
||||
deps = [ ":installer_deps" ]
|
||||
@@ -249,6 +252,12 @@ if (use_qt) {
|
||||
deps = [ "//ui/qt:qt5_shim" ]
|
||||
}
|
||||
}
|
||||
+if (use_qt6) {
|
||||
+ strip_binary("strip_qt6_shim") {
|
||||
+ binary_input = "$root_out_dir/libqt6_shim.so"
|
||||
+ deps = [ "//ui/qt:qt6_shim" ]
|
||||
+ }
|
||||
+}
|
||||
|
||||
# This target builds all "normal" Linux installers. You must set
|
||||
# is_component_build=false before building this target.
|
||||
@@ -447,6 +456,12 @@ group("installer_deps") {
|
||||
"//ui/qt:qt5_shim",
|
||||
]
|
||||
}
|
||||
+ if (use_qt6) {
|
||||
+ public_deps += [
|
||||
+ ":strip_qt6_shim",
|
||||
+ "//ui/qt:qt6_shim",
|
||||
+ ]
|
||||
+ }
|
||||
}
|
||||
|
||||
# Creates .deb and .rpm (RPM for non-ChromeOS only) installer packages.
|
||||
diff --git a/chrome/installer/linux/common/installer.include b/chrome/installer/linux/common/installer.include
|
||||
index 8d76f1f280b01..439ef5ccb0f52 100644
|
||||
--- a/chrome/installer/linux/common/installer.include
|
||||
+++ b/chrome/installer/linux/common/installer.include
|
||||
@@ -254,6 +254,11 @@ stage_install_common() {
|
||||
strippedfile="${OUTPUTDIR}/${file}.stripped"
|
||||
install -m ${SHLIB_PERMS} "${strippedfile}" "${STAGEDIR}/${INSTALLDIR}/${file}"
|
||||
fi
|
||||
+ if [ -f "${OUTPUTDIR}/libqt6_shim.so" ]; then
|
||||
+ file="libqt6_shim.so"
|
||||
+ strippedfile="${OUTPUTDIR}/${file}.stripped"
|
||||
+ install -m ${SHLIB_PERMS} "${strippedfile}" "${STAGEDIR}/${INSTALLDIR}/${file}"
|
||||
+ fi
|
||||
|
||||
# libc++
|
||||
if [ -f "${OUTPUTDIR}/lib/libc++.so" ]; then
|
||||
diff --git a/ui/qt/BUILD.gn b/ui/qt/BUILD.gn
|
||||
index bbede00daa4d0..6a67961edc2f7 100644
|
||||
--- a/ui/qt/BUILD.gn
|
||||
+++ b/ui/qt/BUILD.gn
|
||||
@@ -11,13 +11,6 @@ assert(use_qt)
|
||||
assert(is_linux)
|
||||
assert(!is_castos)
|
||||
|
||||
-pkg_config("qt5_config") {
|
||||
- packages = [
|
||||
- "Qt5Core",
|
||||
- "Qt5Widgets",
|
||||
- ]
|
||||
-}
|
||||
-
|
||||
config("qt_internal_config") {
|
||||
if (is_clang) {
|
||||
# libstdc++ headers are incompatible with -fcomplete-member-pointers.
|
||||
@@ -56,40 +49,57 @@ if (!use_sysroot) {
|
||||
}
|
||||
}
|
||||
|
||||
-shared_library("qt5_shim") {
|
||||
- visibility = [
|
||||
- ":qt",
|
||||
- "//chrome/installer/linux:*",
|
||||
- ]
|
||||
-
|
||||
- # Since qt_shim is a shared library even in non-component builds, it shouldn't
|
||||
- # depend on any other targets since that would duplicate code between binaries
|
||||
- # leading to increased size and potential issues from duplicated global state.
|
||||
- no_default_deps = true
|
||||
- assert_no_deps = [
|
||||
- "//base",
|
||||
- "//buildtools/third_party/libc++",
|
||||
- ]
|
||||
- deps = [ ":qt_interface" ]
|
||||
-
|
||||
- configs -= [ "//build/config/compiler:runtime_library" ]
|
||||
- configs += [
|
||||
- ":qt_internal_config",
|
||||
- ":qt5_config",
|
||||
- ]
|
||||
+template("qt_shim") {
|
||||
+ pkg_config("qt" + invoker.qt_version + "_config") {
|
||||
+ packages = [
|
||||
+ "Qt" + invoker.qt_version + "Core",
|
||||
+ "Qt" + invoker.qt_version + "Widgets",
|
||||
+ ]
|
||||
+ }
|
||||
|
||||
- public = []
|
||||
- sources = [
|
||||
- "qt_shim.cc",
|
||||
- "qt_shim.h",
|
||||
- ]
|
||||
- if (use_sysroot) {
|
||||
- # This file is generated with gen_qt_shim_moc.sh on an amd64 system to
|
||||
- # avoid a build-time dependency on `moc` when using the sysroot.
|
||||
- sources += [ "qt_shim_moc.cc" ]
|
||||
- } else {
|
||||
- sources += get_target_outputs(":generate_moc")
|
||||
- deps += [ ":generate_moc" ]
|
||||
+ shared_library(target_name) {
|
||||
+ visibility = [
|
||||
+ ":qt",
|
||||
+ "//chrome/installer/linux:*",
|
||||
+ ]
|
||||
+
|
||||
+ # Since qt_shim is a shared library even in non-component builds, it shouldn't
|
||||
+ # depend on any other targets since that would duplicate code between binaries
|
||||
+ # leading to increased size and potential issues from duplicated global state.
|
||||
+ no_default_deps = true
|
||||
+ assert_no_deps = [
|
||||
+ "//base",
|
||||
+ "//buildtools/third_party/libc++",
|
||||
+ ]
|
||||
+ deps = [ ":qt_interface" ]
|
||||
+
|
||||
+ configs -= [ "//build/config/compiler:runtime_library" ]
|
||||
+ configs += [
|
||||
+ ":qt_internal_config",
|
||||
+ ":qt" + invoker.qt_version + "_config",
|
||||
+ ]
|
||||
+
|
||||
+ public = []
|
||||
+ sources = [
|
||||
+ "qt_shim.cc",
|
||||
+ "qt_shim.h",
|
||||
+ ]
|
||||
+ if (use_sysroot) {
|
||||
+ # This file is generated with gen_qt_shim_moc.sh on an amd64 system to
|
||||
+ # avoid a build-time dependency on `moc` when using the sysroot.
|
||||
+ sources += [ "qt" + invoker.qt_version + "_shim_moc.cc" ]
|
||||
+ } else {
|
||||
+ sources += get_target_outputs(":generate_moc")
|
||||
+ deps += [ ":generate_moc" ]
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+qt_shim("qt5_shim") {
|
||||
+ qt_version = "5"
|
||||
+}
|
||||
+if (use_qt6) {
|
||||
+ qt_shim("qt6_shim") {
|
||||
+ qt_version = "6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +110,9 @@ component("qt") {
|
||||
|
||||
# qt_shim is in data_deps since we want to load it manually.
|
||||
data_deps = [ ":qt5_shim" ]
|
||||
+ if (use_qt6) {
|
||||
+ data_deps += [ ":qt6_shim" ]
|
||||
+ }
|
||||
deps = [
|
||||
":qt_interface",
|
||||
"//base",
|
||||
diff --git a/ui/qt/gen_qt_shim_moc.sh b/ui/qt/gen_qt_shim_moc.sh
|
||||
index 74272d5611dab..9d02c2dfcb12f 100755
|
||||
--- a/ui/qt/gen_qt_shim_moc.sh
|
||||
+++ b/ui/qt/gen_qt_shim_moc.sh
|
||||
@@ -6,11 +6,15 @@
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
|
||||
-URL="http://archive.debian.org/debian/pool/main/q/qtbase-opensource-src"
|
||||
-PACKAGE="qtbase5-dev-tools_5.3.2+dfsg-4+deb8u2_amd64.deb"
|
||||
-SHA256="7703754f2c230ce6b8b6030b6c1e7e030899aa9f45a415498df04bd5ec061a76"
|
||||
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
+URL5="http://archive.debian.org/debian/pool/main/q/qtbase-opensource-src"
|
||||
+PACKAGE5="qtbase5-dev-tools_5.3.2+dfsg-4+deb8u2_amd64.deb"
|
||||
+SHA256_5="7703754f2c230ce6b8b6030b6c1e7e030899aa9f45a415498df04bd5ec061a76"
|
||||
+
|
||||
+URL6="http://archive.ubuntu.com/ubuntu/pool/universe/q/qt6-base"
|
||||
+PACKAGE6="qt6-base-dev-tools_6.2.4+dfsg-2ubuntu1_amd64.deb"
|
||||
+SHA256_6="8dddfc79e7743185b07c478ca0f96a4ccc13d48ecccc42f44d2578c33c7d9b8b"
|
||||
|
||||
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
TMP_DIR=$(mktemp -d -p "$SCRIPT_DIR")
|
||||
function cleanup {
|
||||
rm -rf "$TMP_DIR"
|
||||
@@ -18,16 +22,22 @@ function cleanup {
|
||||
trap cleanup EXIT
|
||||
|
||||
cd "$TMP_DIR"
|
||||
-wget "$URL/$PACKAGE"
|
||||
-echo "$SHA256 $PACKAGE" | shasum -a 256 -c
|
||||
-dpkg -x "$PACKAGE" .
|
||||
-cat > ../qt_shim_moc.cc <<EOF
|
||||
-// Copyright 2022 The Chromium Authors
|
||||
+wget "$URL5/$PACKAGE5"
|
||||
+echo "$SHA256_5 $PACKAGE5" | shasum -a 256 -c
|
||||
+dpkg -x "$PACKAGE5" .
|
||||
+wget "$URL6/$PACKAGE6"
|
||||
+echo "$SHA256_6 $PACKAGE6" | shasum -a 256 -c
|
||||
+dpkg -x "$PACKAGE6" .
|
||||
+cat > ../qt5_shim_moc.cc <<EOF
|
||||
+// Copyright 2023 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
EOF
|
||||
cd "$SCRIPT_DIR/../.."
|
||||
+cp ui/qt/qt5_shim_moc.cc ui/qt/qt6_shim_moc.cc
|
||||
"$TMP_DIR/usr/lib/x86_64-linux-gnu/qt5/bin/moc" ui/qt/qt_shim.h \
|
||||
- >> ui/qt/qt_shim_moc.cc
|
||||
-git cl format ui/qt/qt_shim_moc.cc
|
||||
+ >> ui/qt/qt5_shim_moc.cc
|
||||
+"$TMP_DIR//usr/lib/qt6/libexec/moc" ui/qt/qt_shim.h \
|
||||
+ >> ui/qt/qt6_shim_moc.cc
|
||||
+git cl format ui/qt/qt5_shim_moc.cc ui/qt/qt6_shim_moc.cc
|
||||
diff --git a/ui/qt/qt.gni b/ui/qt/qt.gni
|
||||
index 27bb6375880b7..f45823270cb91 100644
|
||||
--- a/ui/qt/qt.gni
|
||||
+++ b/ui/qt/qt.gni
|
||||
@@ -4,9 +4,17 @@
|
||||
|
||||
import("//build/config/chromecast_build.gni")
|
||||
import("//build/config/sanitizers/sanitizers.gni")
|
||||
+import("//build/config/sysroot.gni")
|
||||
|
||||
declare_args() {
|
||||
# TODO(https://crbug.com/1424435): Allow QT in MSAN builds once QT is
|
||||
# added to the instrumented libraries.
|
||||
use_qt = is_linux && !is_castos && !is_msan
|
||||
}
|
||||
+
|
||||
+declare_args() {
|
||||
+ use_qt6 = use_qt && use_sysroot
|
||||
+}
|
||||
+
|
||||
+# use_qt6 => use_qt
|
||||
+assert(!use_qt6 || use_qt)
|
||||
diff --git a/ui/qt/qt_shim_moc.cc b/ui/qt/qt5_shim_moc.cc
|
||||
similarity index 95%
|
||||
rename from ui/qt/qt_shim_moc.cc
|
||||
rename to ui/qt/qt5_shim_moc.cc
|
||||
index dafbfadce56ba..8f8b6b57784a8 100644
|
||||
--- a/ui/qt/qt_shim_moc.cc
|
||||
+++ b/ui/qt/qt5_shim_moc.cc
|
||||
@@ -1,4 +1,4 @@
|
||||
-// Copyright 2022 The Chromium Authors
|
||||
+// Copyright 2023 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -89,26 +89,32 @@ const QMetaObject* qt::QtShim::metaObject() const {
|
||||
}
|
||||
|
||||
void* qt::QtShim::qt_metacast(const char* _clname) {
|
||||
- if (!_clname)
|
||||
+ if (!_clname) {
|
||||
return 0;
|
||||
- if (!strcmp(_clname, qt_meta_stringdata_qt__QtShim.stringdata))
|
||||
+ }
|
||||
+ if (!strcmp(_clname, qt_meta_stringdata_qt__QtShim.stringdata)) {
|
||||
return static_cast<void*>(const_cast<QtShim*>(this));
|
||||
- if (!strcmp(_clname, "QtInterface"))
|
||||
+ }
|
||||
+ if (!strcmp(_clname, "QtInterface")) {
|
||||
return static_cast<QtInterface*>(const_cast<QtShim*>(this));
|
||||
+ }
|
||||
return QObject::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int qt::QtShim::qt_metacall(QMetaObject::Call _c, int _id, void** _a) {
|
||||
_id = QObject::qt_metacall(_c, _id, _a);
|
||||
- if (_id < 0)
|
||||
+ if (_id < 0) {
|
||||
return _id;
|
||||
+ }
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
- if (_id < 2)
|
||||
+ if (_id < 2) {
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
+ }
|
||||
_id -= 2;
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
- if (_id < 2)
|
||||
+ if (_id < 2) {
|
||||
*reinterpret_cast<int*>(_a[0]) = -1;
|
||||
+ }
|
||||
_id -= 2;
|
||||
}
|
||||
return _id;
|
||||
diff --git a/ui/qt/qt6_shim_moc.cc b/ui/qt/qt6_shim_moc.cc
|
||||
new file mode 100644
|
||||
index 0000000000000..6d02ca317b65d
|
||||
--- /dev/null
|
||||
+++ b/ui/qt/qt6_shim_moc.cc
|
||||
@@ -0,0 +1,143 @@
|
||||
+// Copyright 2023 The Chromium Authors
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+/****************************************************************************
|
||||
+** Meta object code from reading C++ file 'qt_shim.h'
|
||||
+**
|
||||
+** Created by: The Qt Meta Object Compiler version 68 (Qt 6.2.4)
|
||||
+**
|
||||
+** WARNING! All changes made in this file will be lost!
|
||||
+*****************************************************************************/
|
||||
+
|
||||
+#include <QtCore/qbytearray.h>
|
||||
+#include <QtCore/qmetatype.h>
|
||||
+#include <memory>
|
||||
+#include "ui/qt/qt_shim.h"
|
||||
+#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
+#error "The header file 'qt_shim.h' doesn't include <QObject>."
|
||||
+#elif Q_MOC_OUTPUT_REVISION != 68
|
||||
+#error "This file was generated using the moc from 6.2.4. It"
|
||||
+#error "cannot be used with the include files from this version of Qt."
|
||||
+#error "(The moc has changed too much.)"
|
||||
+#endif
|
||||
+
|
||||
+QT_BEGIN_MOC_NAMESPACE
|
||||
+QT_WARNING_PUSH
|
||||
+QT_WARNING_DISABLE_DEPRECATED
|
||||
+struct qt_meta_stringdata_qt__QtShim_t {
|
||||
+ const uint offsetsAndSize[12];
|
||||
+ char stringdata0[52];
|
||||
+};
|
||||
+#define QT_MOC_LITERAL(ofs, len) \
|
||||
+ uint(offsetof(qt_meta_stringdata_qt__QtShim_t, stringdata0) + ofs), len
|
||||
+static const qt_meta_stringdata_qt__QtShim_t qt_meta_stringdata_qt__QtShim = {
|
||||
+ {
|
||||
+ QT_MOC_LITERAL(0, 10), // "qt::QtShim"
|
||||
+ QT_MOC_LITERAL(11, 11), // "FontChanged"
|
||||
+ QT_MOC_LITERAL(23, 0), // ""
|
||||
+ QT_MOC_LITERAL(24, 4), // "font"
|
||||
+ QT_MOC_LITERAL(29, 14), // "PaletteChanged"
|
||||
+ QT_MOC_LITERAL(44, 7) // "palette"
|
||||
+
|
||||
+ },
|
||||
+ "qt::QtShim\0FontChanged\0\0font\0"
|
||||
+ "PaletteChanged\0palette"};
|
||||
+#undef QT_MOC_LITERAL
|
||||
+
|
||||
+static const uint qt_meta_data_qt__QtShim[] = {
|
||||
+
|
||||
+ // content:
|
||||
+ 10, // revision
|
||||
+ 0, // classname
|
||||
+ 0, 0, // classinfo
|
||||
+ 2, 14, // methods
|
||||
+ 0, 0, // properties
|
||||
+ 0, 0, // enums/sets
|
||||
+ 0, 0, // constructors
|
||||
+ 0, // flags
|
||||
+ 0, // signalCount
|
||||
+
|
||||
+ // slots: name, argc, parameters, tag, flags, initial metatype offsets
|
||||
+ 1, 1, 26, 2, 0x08, 1 /* Private */, 4, 1, 29, 2, 0x08, 3 /* Private */,
|
||||
+
|
||||
+ // slots: parameters
|
||||
+ QMetaType::Void, QMetaType::QFont, 3, QMetaType::Void, QMetaType::QPalette,
|
||||
+ 5,
|
||||
+
|
||||
+ 0 // eod
|
||||
+};
|
||||
+
|
||||
+void qt::QtShim::qt_static_metacall(QObject* _o,
|
||||
+ QMetaObject::Call _c,
|
||||
+ int _id,
|
||||
+ void** _a) {
|
||||
+ if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
+ auto* _t = static_cast<QtShim*>(_o);
|
||||
+ (void)_t;
|
||||
+ switch (_id) {
|
||||
+ case 0:
|
||||
+ _t->FontChanged((*reinterpret_cast<std::add_pointer_t<QFont>>(_a[1])));
|
||||
+ break;
|
||||
+ case 1:
|
||||
+ _t->PaletteChanged(
|
||||
+ (*reinterpret_cast<std::add_pointer_t<QPalette>>(_a[1])));
|
||||
+ break;
|
||||
+ default:;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+const QMetaObject qt::QtShim::staticMetaObject = {
|
||||
+ {QMetaObject::SuperData::link<QObject::staticMetaObject>(),
|
||||
+ qt_meta_stringdata_qt__QtShim.offsetsAndSize, qt_meta_data_qt__QtShim,
|
||||
+ qt_static_metacall, nullptr,
|
||||
+ qt_incomplete_metaTypeArray<
|
||||
+ qt_meta_stringdata_qt__QtShim_t,
|
||||
+ QtPrivate::TypeAndForceComplete<QtShim, std::true_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<const QFont&, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<const QPalette&, std::false_type>
|
||||
+
|
||||
+ >,
|
||||
+ nullptr}};
|
||||
+
|
||||
+const QMetaObject* qt::QtShim::metaObject() const {
|
||||
+ return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject()
|
||||
+ : &staticMetaObject;
|
||||
+}
|
||||
+
|
||||
+void* qt::QtShim::qt_metacast(const char* _clname) {
|
||||
+ if (!_clname) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ if (!strcmp(_clname, qt_meta_stringdata_qt__QtShim.stringdata0)) {
|
||||
+ return static_cast<void*>(this);
|
||||
+ }
|
||||
+ if (!strcmp(_clname, "QtInterface")) {
|
||||
+ return static_cast<QtInterface*>(this);
|
||||
+ }
|
||||
+ return QObject::qt_metacast(_clname);
|
||||
+}
|
||||
+
|
||||
+int qt::QtShim::qt_metacall(QMetaObject::Call _c, int _id, void** _a) {
|
||||
+ _id = QObject::qt_metacall(_c, _id, _a);
|
||||
+ if (_id < 0) {
|
||||
+ return _id;
|
||||
+ }
|
||||
+ if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
+ if (_id < 2) {
|
||||
+ qt_static_metacall(this, _c, _id, _a);
|
||||
+ }
|
||||
+ _id -= 2;
|
||||
+ } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
+ if (_id < 2) {
|
||||
+ *reinterpret_cast<QMetaType*>(_a[0]) = QMetaType();
|
||||
+ }
|
||||
+ _id -= 2;
|
||||
+ }
|
||||
+ return _id;
|
||||
+}
|
||||
+QT_WARNING_POP
|
||||
+QT_END_MOC_NAMESPACE
|
||||
diff --git a/ui/qt/qt_ui.cc b/ui/qt/qt_ui.cc
|
||||
index d4052b7e8bc3d..6a3b58e9f930b 100644
|
||||
--- a/ui/qt/qt_ui.cc
|
||||
+++ b/ui/qt/qt_ui.cc
|
||||
@@ -14,7 +14,9 @@
|
||||
#include "base/check.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/compiler_specific.h"
|
||||
+#include "base/environment.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
+#include "base/nix/xdg_util.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/time/time.h"
|
||||
@@ -47,6 +49,45 @@ namespace qt {
|
||||
|
||||
namespace {
|
||||
|
||||
+const char kQtVersionFlag[] = "qt-version";
|
||||
+
|
||||
+void* LoadLibrary(const base::FilePath& path) {
|
||||
+ return dlopen(path.value().c_str(), RTLD_NOW | RTLD_GLOBAL);
|
||||
+}
|
||||
+
|
||||
+void* LoadLibraryOrFallback(const base::FilePath& path,
|
||||
+ const char* preferred,
|
||||
+ const char* fallback) {
|
||||
+ if (void* library = LoadLibrary(path.Append(preferred))) {
|
||||
+ return library;
|
||||
+ }
|
||||
+ return LoadLibrary(path.Append(fallback));
|
||||
+}
|
||||
+
|
||||
+bool PreferQt6() {
|
||||
+ auto* cmd = base::CommandLine::ForCurrentProcess();
|
||||
+ if (cmd->HasSwitch(kQtVersionFlag)) {
|
||||
+ std::string qt_version_string = cmd->GetSwitchValueASCII(kQtVersionFlag);
|
||||
+ unsigned int qt_version = 0;
|
||||
+ if (base::StringToUint(qt_version_string, &qt_version)) {
|
||||
+ switch (qt_version) {
|
||||
+ case 5:
|
||||
+ return false;
|
||||
+ case 6:
|
||||
+ return true;
|
||||
+ default:
|
||||
+ LOG(ERROR) << "Unsupported QT version " << qt_version;
|
||||
+ }
|
||||
+ } else {
|
||||
+ LOG(ERROR) << "Unable to parse QT version " << qt_version_string;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ auto env = base::Environment::Create();
|
||||
+ auto desktop = base::nix::GetDesktopEnvironment(env.get());
|
||||
+ return desktop == base::nix::DESKTOP_ENVIRONMENT_KDE6;
|
||||
+}
|
||||
+
|
||||
int QtWeightToCssWeight(int weight) {
|
||||
struct {
|
||||
int qt_weight;
|
||||
@@ -179,8 +220,10 @@ bool QtUi::Initialize() {
|
||||
base::FilePath path;
|
||||
if (!base::PathService::Get(base::DIR_MODULE, &path))
|
||||
return false;
|
||||
- path = path.Append("libqt5_shim.so");
|
||||
- void* libqt_shim = dlopen(path.value().c_str(), RTLD_NOW | RTLD_GLOBAL);
|
||||
+ void* libqt_shim =
|
||||
+ PreferQt6()
|
||||
+ ? LoadLibraryOrFallback(path, "libqt6_shim.so", "libqt5_shim.so")
|
||||
+ : LoadLibraryOrFallback(path, "libqt5_shim.so", "libqt6_shim.so");
|
||||
if (!libqt_shim)
|
||||
return false;
|
||||
void* create_qt_interface = dlsym(libqt_shim, "CreateQtInterface");
|
@ -0,0 +1,21 @@
|
||||
diff -up chromium-114.0.5735.26/components/omnibox/browser/omnibox_edit_model.cc.me chromium-114.0.5735.26/components/omnibox/browser/omnibox_edit_model.cc
|
||||
--- chromium-114.0.5735.26/components/omnibox/browser/omnibox_edit_model.cc.me 2023-05-14 09:14:10.886314480 +0200
|
||||
+++ chromium-114.0.5735.26/components/omnibox/browser/omnibox_edit_model.cc 2023-05-14 09:16:59.380054720 +0200
|
||||
@@ -79,7 +79,7 @@
|
||||
#include "ui/gfx/vector_icon_types.h"
|
||||
#endif
|
||||
|
||||
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
+#ifdef GOOGLE_CHROME_BRANDING
|
||||
#include "components/vector_icons/vector_icons.h" // nogncheck
|
||||
#endif
|
||||
|
||||
@@ -628,7 +628,7 @@ bool OmniboxEditModel::ShouldShowCurrent
|
||||
}
|
||||
|
||||
ui::ImageModel OmniboxEditModel::GetSuperGIcon(int image_size, bool dark_mode) {
|
||||
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
+#ifdef GOOGLE_CHROME_BRANDING
|
||||
if (dark_mode) {
|
||||
return ui::ImageModel::FromVectorIcon(
|
||||
vector_icons::kGoogleGLogoMonochromeIcon, ui::kColorRefPrimary100,
|
@ -0,0 +1,62 @@
|
||||
diff -up chromium-114.0.5735.26/components/version_info/version_info.cc.constexpr-el7 chromium-114.0.5735.26/components/version_info/version_info.cc
|
||||
diff -up chromium-114.0.5735.26/components/version_info/version_info.h.constexpr-el7 chromium-114.0.5735.26/components/version_info/version_info.h
|
||||
--- chromium-114.0.5735.26/components/version_info/version_info.h.constexpr-el7 2023-05-11 03:36:19.000000000 +0200
|
||||
+++ chromium-114.0.5735.26/components/version_info/version_info.h 2023-05-14 10:59:19.921578645 +0200
|
||||
@@ -27,18 +27,18 @@ const std::string GetProductNameAndVersi
|
||||
const std::string& build_version);
|
||||
|
||||
// Returns the product name, e.g. "Chromium" or "Google Chrome".
|
||||
-constexpr std::string GetProductName() {
|
||||
+static const std::string GetProductName() {
|
||||
return PRODUCT_NAME;
|
||||
}
|
||||
|
||||
// Returns the version number, e.g. "6.0.490.1".
|
||||
-constexpr std::string GetVersionNumber() {
|
||||
+static const std::string GetVersionNumber() {
|
||||
return PRODUCT_VERSION;
|
||||
}
|
||||
|
||||
// Returns the product name and version information for the User-Agent header,
|
||||
// in the format: Chrome/<major_version>.<minor_version>.<build>.<patch>.
|
||||
-constexpr std::string GetProductNameAndVersionForUserAgent() {
|
||||
+static const std::string GetProductNameAndVersionForUserAgent() {
|
||||
return "Chrome/" + GetVersionNumber();
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ std::string GetMajorVersionNumber();
|
||||
const base::Version& GetVersion();
|
||||
|
||||
// Returns a version control specific identifier of this release.
|
||||
-constexpr std::string GetLastChange() {
|
||||
+static const std::string GetLastChange() {
|
||||
return LAST_CHANGE;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ constexpr bool IsOfficialBuild() {
|
||||
}
|
||||
|
||||
// Returns the OS type, e.g. "Windows", "Linux", "FreeBSD", ...
|
||||
-constexpr std::string GetOSType() {
|
||||
+static const std::string GetOSType() {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
return "Windows";
|
||||
#elif BUILDFLAG(IS_IOS)
|
||||
@@ -97,7 +97,7 @@ constexpr std::string GetOSType() {
|
||||
|
||||
// Returns a string equivalent of |channel|, independent of whether the build
|
||||
// is branded or not and without any additional modifiers.
|
||||
-constexpr std::string GetChannelString(Channel channel) {
|
||||
+static const std::string GetChannelString(Channel channel) {
|
||||
switch (channel) {
|
||||
case Channel::STABLE:
|
||||
return "stable";
|
||||
@@ -114,7 +114,7 @@ constexpr std::string GetChannelString(C
|
||||
}
|
||||
|
||||
// Returns a list of sanitizers enabled in this build.
|
||||
-constexpr std::string GetSanitizerList() {
|
||||
+static const std::string GetSanitizerList() {
|
||||
return ""
|
||||
#if defined(ADDRESS_SANITIZER)
|
||||
"address "
|
@ -0,0 +1,389 @@
|
||||
diff -up chromium-109.0.5414.74/base/check_op.h.me chromium-109.0.5414.74/base/check_op.h
|
||||
--- chromium-109.0.5414.74/base/check_op.h.me 2023-01-17 17:39:27.620875883 +0100
|
||||
+++ chromium-109.0.5414.74/base/check_op.h 2023-01-17 17:39:42.546060957 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef BASE_CHECK_OP_H_
|
||||
#define BASE_CHECK_OP_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
diff -up chromium-109.0.5414.74/base/debug/profiler.h.me chromium-109.0.5414.74/base/debug/profiler.h
|
||||
--- chromium-109.0.5414.74/base/debug/profiler.h.me 2023-01-17 16:29:26.368090073 +0100
|
||||
+++ chromium-109.0.5414.74/base/debug/profiler.h 2023-01-17 16:59:41.190628679 +0100
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "base/base_export.h"
|
||||
diff -up chromium-109.0.5414.74/components/viz/common/view_transition_element_resource_id.h.me chromium-109.0.5414.74/components/viz/common/view_transition_element_resource_id.h
|
||||
--- chromium-109.0.5414.74/components/viz/common/view_transition_element_resource_id.h.me 2023-01-17 19:03:10.920014806 +0100
|
||||
+++ chromium-109.0.5414.74/components/viz/common/view_transition_element_resource_id.h 2023-01-17 19:03:48.736395274 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_VIZ_COMMON_VIEW_TRANSITION_ELEMENT_RESOURCE_ID_H_
|
||||
#define COMPONENTS_VIZ_COMMON_VIEW_TRANSITION_ELEMENT_RESOURCE_ID_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
diff -up chromium-109.0.5414.74/gpu/config/gpu_feature_info.h.me chromium-109.0.5414.74/gpu/config/gpu_feature_info.h
|
||||
--- chromium-109.0.5414.74/gpu/config/gpu_feature_info.h.me 2023-01-17 19:06:53.530675129 +0100
|
||||
+++ chromium-109.0.5414.74/gpu/config/gpu_feature_info.h 2023-01-17 19:07:08.874849879 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef GPU_CONFIG_GPU_FEATURE_INFO_H_
|
||||
#define GPU_CONFIG_GPU_FEATURE_INFO_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
diff -up chromium-109.0.5414.74/net/base/net_export.h.me chromium-109.0.5414.74/net/base/net_export.h
|
||||
--- chromium-109.0.5414.74/net/base/net_export.h.me 2023-01-17 18:16:34.133854615 +0100
|
||||
+++ chromium-109.0.5414.74/net/base/net_export.h 2023-01-17 18:16:15.945623153 +0100
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef NET_BASE_NET_EXPORT_H_
|
||||
#define NET_BASE_NET_EXPORT_H_
|
||||
|
||||
+#include <cstdint>
|
||||
+
|
||||
// Defines NET_EXPORT so that functionality implemented by the net module can
|
||||
// be exported to consumers, and NET_EXPORT_PRIVATE that allows unit tests to
|
||||
// access features not intended to be used directly by real consumers.
|
||||
diff -up chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h.me chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h
|
||||
--- chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h.me 2023-01-17 17:12:34.184686515 +0100
|
||||
+++ chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h 2023-01-17 17:13:16.537162420 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_
|
||||
#define SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <bitset>
|
||||
#include <string>
|
||||
|
||||
diff -up chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h.me chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h
|
||||
--- chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h.me 2023-01-17 17:33:20.895717307 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h 2023-01-17 17:34:03.456185365 +0100
|
||||
@@ -27,6 +27,7 @@
|
||||
#ifndef ABSL_STRINGS_STRING_VIEW_H_
|
||||
#define ABSL_STRINGS_STRING_VIEW_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
diff -up chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h.me chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h
|
||||
--- chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h.me 2023-01-17 17:36:15.017616250 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h 2023-01-17 17:36:48.960982195 +0100
|
||||
@@ -10,6 +10,7 @@
|
||||
#ifndef GLSLANG_SHADERVARS_H_
|
||||
#define GLSLANG_SHADERVARS_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <string>
|
||||
diff -up chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.me chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h
|
||||
--- chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.me 2023-01-17 19:17:40.480876171 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h 2023-01-17 19:17:46.803958320 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_BLUETOOTH_WEB_BLUETOOTH_DEVICE_ID_H_
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_BLUETOOTH_WEB_BLUETOOTH_DEVICE_ID_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <array>
|
||||
#include <string>
|
||||
|
||||
diff -up chromium-109.0.5414.74/third_party/dawn/src/tint/reader/spirv/namer.h.me chromium-109.0.5414.74/third_party/dawn/src/tint/reader/spirv/namer.h
|
||||
--- chromium-109.0.5414.74/third_party/dawn/src/tint/reader/spirv/namer.h.me 2023-01-17 18:02:44.681538107 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/dawn/src/tint/reader/spirv/namer.h 2023-01-17 18:02:57.208679140 +0100
|
||||
@@ -15,6 +15,7 @@
|
||||
#ifndef SRC_TINT_READER_SPIRV_NAMER_H_
|
||||
#define SRC_TINT_READER_SPIRV_NAMER_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
diff -up chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.me chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h
|
||||
--- chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.me 2023-01-18 15:22:38.472940648 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h 2023-01-18 15:23:09.380255101 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef DISCOVERY_DNSSD_PUBLIC_DNS_SD_TXT_RECORD_H_
|
||||
#define DISCOVERY_DNSSD_PUBLIC_DNS_SD_TXT_RECORD_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <set>
|
||||
diff -up chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp.me chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp
|
||||
--- chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp.me 2023-01-17 15:37:48.530626516 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp 2023-01-17 16:57:46.025548092 +0100
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "System/Debug.hpp"
|
||||
|
||||
+#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <unordered_set>
|
||||
diff -up chromium-109.0.5414.74/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h.me chromium-109.0.5414.74/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h
|
||||
--- chromium-109.0.5414.74/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h.me 2023-01-17 15:40:23.854386206 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h 2023-01-17 16:58:19.397862885 +0100
|
||||
@@ -2388,6 +2388,7 @@ VMA_CALL_PRE void VMA_CALL_POST vmaFreeV
|
||||
#ifdef VMA_IMPLEMENTATION
|
||||
#undef VMA_IMPLEMENTATION
|
||||
|
||||
+#include <cstdio>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
diff -up chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h.me chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h
|
||||
--- chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h.me 2023-01-17 18:08:25.745491353 +0100
|
||||
+++ chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h 2023-01-17 18:08:35.777667632 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef UI_GFX_LINEAR_GRADIENT_H_
|
||||
#define UI_GFX_LINEAR_GRADIENT_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <array>
|
||||
#include <string>
|
||||
|
||||
diff -up chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h.me chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h
|
||||
--- chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h.me 2023-01-19 10:10:21.287876736 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h 2023-01-19 10:11:21.714778896 +0100
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
#define RUY_RUY_PROFILER_INSTRUMENTATION_H_
|
||||
|
||||
#ifdef RUY_PROFILER
|
||||
+#include <string>
|
||||
#include <cstdio>
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
diff -up chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.me chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h
|
||||
--- chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.me 2023-01-19 10:30:27.533861985 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h 2023-01-19 10:31:12.585554183 +0100
|
||||
@@ -31,6 +31,7 @@ limitations under the License.
|
||||
#ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
|
||||
#define TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <complex>
|
||||
#include <deque>
|
||||
#include <vector>
|
||||
diff -up chromium-109.0.5414.74/base/containers/flat_map.h.mee chromium-109.0.5414.74/base/containers/flat_map.h
|
||||
--- chromium-109.0.5414.74/base/containers/flat_map.h.mee 2023-01-19 10:59:52.214957773 +0100
|
||||
+++ chromium-109.0.5414.74/base/containers/flat_map.h 2023-01-19 11:00:06.415215309 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef BASE_CONTAINERS_FLAT_MAP_H_
|
||||
#define BASE_CONTAINERS_FLAT_MAP_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <functional>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
diff -up chromium-109.0.5414.74/components/crash/core/app/crash_reporter_client.h.mee chromium-109.0.5414.74/components/crash/core/app/crash_reporter_client.h
|
||||
--- chromium-109.0.5414.74/components/crash/core/app/crash_reporter_client.h.mee 2023-01-19 10:36:40.571422826 +0100
|
||||
+++ chromium-109.0.5414.74/components/crash/core/app/crash_reporter_client.h 2023-01-19 10:36:49.343565294 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_CRASH_CORE_APP_CRASH_REPORTER_CLIENT_H_
|
||||
#define COMPONENTS_CRASH_CORE_APP_CRASH_REPORTER_CLIENT_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "build/build_config.h"
|
||||
diff -up chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h.mee chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h
|
||||
--- chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h.mee 2023-01-19 11:45:15.953159755 +0100
|
||||
+++ chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h 2023-01-19 11:45:22.320246241 +0100
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef UI_BASE_PREDICTION_KALMAN_FILTER_H_
|
||||
#define UI_BASE_PREDICTION_KALMAN_FILTER_H_
|
||||
|
||||
+#include <cstdint>
|
||||
+
|
||||
#include "base/component_export.h"
|
||||
#include "ui/gfx/geometry/matrix3_f.h"
|
||||
|
||||
diff -up chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h.me chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h
|
||||
--- chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h.me 2023-01-19 15:20:07.620987949 +0100
|
||||
+++ chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h 2023-01-19 15:20:18.324173702 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_GENERATION_PASSWORD_GENERATOR_H_
|
||||
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_GENERATION_PASSWORD_GENERATOR_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
|
||||
diff -up chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h.me chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h
|
||||
--- chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h.me 2023-01-19 16:00:14.350186515 +0100
|
||||
+++ chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h 2023-01-19 16:00:21.643307993 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_EVENT_STORAGE_VALIDATOR_H_
|
||||
#define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_EVENT_STORAGE_VALIDATOR_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace feature_engagement {
|
||||
diff -up chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h.me chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h
|
||||
--- chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h.me 2023-01-19 15:59:18.210239416 +0100
|
||||
+++ chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h 2023-01-19 15:59:34.513515030 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
|
||||
#define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "components/feature_engagement/internal/event_storage_validator.h"
|
||||
diff -up chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h.me chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h
|
||||
--- chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h.me 2023-01-19 16:06:17.548272878 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h 2023-01-19 16:06:25.685410592 +0100
|
||||
@@ -14,6 +14,7 @@
|
||||
#ifndef LLVM_SUPPORT_SIGNALS_H
|
||||
#define LLVM_SUPPORT_SIGNALS_H
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace llvm {
|
||||
diff -up chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.me chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
|
||||
--- chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.me 2023-01-19 16:09:29.216477182 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc 2023-01-19 16:10:05.657089208 +0100
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "llvm/Support/SaveAndRestore.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <algorithm>
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <sysexits.h>
|
||||
#ifdef HAVE_BACKTRACE
|
||||
diff -up chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h.me chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h
|
||||
--- chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h.me 2023-01-19 16:32:05.338160131 +0100
|
||||
+++ chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h 2023-01-19 16:32:16.213326798 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef CHROME_BROWSER_PRIVACY_BUDGET_ENCOUNTERED_SURFACE_TRACKER_H_
|
||||
#define CHROME_BROWSER_PRIVACY_BUDGET_ENCOUNTERED_SURFACE_TRACKER_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <map>
|
||||
|
||||
#include "base/containers/flat_set.h"
|
||||
diff -up chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h.me chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h
|
||||
--- chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h.me 2023-01-19 16:47:55.548571102 +0100
|
||||
+++ chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h 2023-01-19 16:48:29.214146529 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ABLATION_STUDY_H_
|
||||
#define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ABLATION_STUDY_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
class GURL;
|
||||
diff -up chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h.me chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h
|
||||
--- chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h.me 2023-01-19 16:57:29.525372814 +0100
|
||||
+++ chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h 2023-01-19 16:58:02.667979288 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_OMNIBOX_BROWSER_ON_DEVICE_HEAD_MODEL_H_
|
||||
#define COMPONENTS_OMNIBOX_BROWSER_ON_DEVICE_HEAD_MODEL_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
diff -up chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h.me chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h
|
||||
--- chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h.me 2023-01-19 17:02:45.258544665 +0100
|
||||
+++ chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h 2023-01-19 17:02:52.577611757 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_PAYMENTS_CONTENT_UTILITY_FINGERPRINT_PARSER_H_
|
||||
#define COMPONENTS_PAYMENTS_CONTENT_UTILITY_FINGERPRINT_PARSER_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <string>
|
||||
diff -up chromium-109.0.5414.74/pdf/document_attachment_info.h.me chromium-109.0.5414.74/pdf/document_attachment_info.h
|
||||
--- chromium-109.0.5414.74/pdf/document_attachment_info.h.me 2023-01-19 17:28:28.552063534 +0100
|
||||
+++ chromium-109.0.5414.74/pdf/document_attachment_info.h 2023-01-19 17:28:48.072379953 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef PDF_DOCUMENT_ATTACHMENT_INFO_H_
|
||||
#define PDF_DOCUMENT_ATTACHMENT_INFO_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
|
||||
diff -up chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h.me chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h
|
||||
--- chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h.me 2023-01-19 18:25:47.648193710 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h 2023-01-19 18:26:11.488593556 +0100
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef CONSTANTS_ANNOTATION_FLAGS_H_
|
||||
#define CONSTANTS_ANNOTATION_FLAGS_H_
|
||||
|
||||
+#include <cstdint>
|
||||
+
|
||||
namespace pdfium {
|
||||
namespace annotation_flags {
|
||||
|
||||
diff -up chromium-109.0.5414.74/base/cpu.h.me chromium-109.0.5414.74/base/cpu.h
|
||||
--- chromium-109.0.5414.74/base/cpu.h.me 2023-01-19 21:31:02.905062987 +0100
|
||||
+++ chromium-109.0.5414.74/base/cpu.h 2023-01-19 21:31:32.298573267 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef BASE_CPU_H_
|
||||
#define BASE_CPU_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "base/base_export.h"
|
||||
diff -up chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.me chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
|
||||
--- chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.me 2023-04-15 16:44:55.344305412 +0200
|
||||
+++ chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h 2023-04-15 16:47:09.028666995 +0200
|
||||
@@ -2854,6 +2854,7 @@ static void vma_aligned_free(void* VMA_N
|
||||
|
||||
// Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString.
|
||||
#if VMA_STATS_STRING_ENABLED
|
||||
+#include <stdio.h>
|
||||
static inline void VmaUint32ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint32_t num)
|
||||
{
|
||||
snprintf(outStr, strLen, "%u", static_cast<unsigned int>(num));
|
||||
diff -up chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h.me chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h
|
||||
--- chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h.me 2023-04-18 15:55:44.774916319 +0200
|
||||
+++ chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h 2023-04-18 15:55:54.441085882 +0200
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
+#include <variant>
|
||||
|
||||
#include "base/containers/span.h"
|
||||
#include "base/functional/callback_forward.h"
|
||||
diff -up chromium-113.0.5672.37/gin/time_clamper.h.me chromium-113.0.5672.37/gin/time_clamper.h
|
||||
--- chromium-113.0.5672.37/gin/time_clamper.h.me 2023-04-18 16:38:41.180437467 +0200
|
||||
+++ chromium-113.0.5672.37/gin/time_clamper.h 2023-04-18 16:39:43.857049432 +0200
|
||||
@@ -48,7 +48,7 @@ class GIN_EXPORT TimeClamper {
|
||||
const int64_t micros = now_micros % 1000;
|
||||
// abs() is necessary for devices with times before unix-epoch (most likely
|
||||
// configured incorrectly).
|
||||
- if (abs(micros) + kResolutionMicros < 1000) {
|
||||
+ if (std::abs(micros) + kResolutionMicros < 1000) {
|
||||
return now_micros / 1000;
|
||||
}
|
||||
return ClampTimeResolution(now_micros) / 1000;
|
||||
diff -up chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc.me chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc
|
||||
--- chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc.me 2023-04-21 08:07:55.362714544 +0200
|
||||
+++ chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc 2023-04-21 08:14:35.424158693 +0200
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <queue>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
+#include <cstring>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/files/file_path.h"
|
@ -0,0 +1,105 @@
|
||||
diff -up chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
|
||||
--- chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar 2023-05-18 00:37:47.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc 2023-05-21 18:12:30.368425080 +0200
|
||||
@@ -77,8 +77,6 @@ void FileAnalyzer::Start(const base::Fil
|
||||
|
||||
if (inspection_type == DownloadFileType::ZIP) {
|
||||
StartExtractZipFeatures();
|
||||
- } else if (inspection_type == DownloadFileType::RAR) {
|
||||
- StartExtractRarFeatures();
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
} else if (inspection_type == DownloadFileType::DMG) {
|
||||
StartExtractDmgFeatures();
|
||||
diff -up chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc
|
||||
--- chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc 2023-05-21 18:11:14.870058635 +0200
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "build/build_config.h"
|
||||
#include "build/buildflag.h"
|
||||
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
|
||||
-#include "chrome/common/safe_browsing/rar_analyzer.h"
|
||||
#include "chrome/common/safe_browsing/seven_zip_analyzer.h"
|
||||
#include "chrome/common/safe_browsing/zip_analyzer.h"
|
||||
#include "components/safe_browsing/content/common/proto/download_file_types.pb.h"
|
||||
@@ -23,9 +22,7 @@ namespace safe_browsing {
|
||||
// static
|
||||
std::unique_ptr<ArchiveAnalyzer> ArchiveAnalyzer::CreateForArchiveType(
|
||||
DownloadFileType_InspectionType file_type) {
|
||||
- if (file_type == DownloadFileType::RAR) {
|
||||
- return std::make_unique<RarAnalyzer>();
|
||||
- } else if (file_type == DownloadFileType::ZIP) {
|
||||
+ if (file_type == DownloadFileType::ZIP) {
|
||||
return std::make_unique<ZipAnalyzer>();
|
||||
} else if (file_type == DownloadFileType::SEVEN_ZIP) {
|
||||
return std::make_unique<SevenZipAnalyzer>();
|
||||
diff -up chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn
|
||||
--- chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn 2023-05-21 18:11:14.869058617 +0200
|
||||
@@ -145,8 +145,6 @@ source_set("safe_browsing") {
|
||||
"protobuf_message_log_macros.h",
|
||||
"protobuf_message_read_macros.h",
|
||||
"protobuf_message_write_macros.h",
|
||||
- "rar_analyzer.cc",
|
||||
- "rar_analyzer.h",
|
||||
"seven_zip_analyzer.cc",
|
||||
"seven_zip_analyzer.h",
|
||||
"zip_analyzer.cc",
|
||||
@@ -162,7 +160,6 @@ source_set("safe_browsing") {
|
||||
"//components/safe_browsing/content/common:file_type_policies",
|
||||
"//components/safe_browsing/core/common",
|
||||
"//third_party/lzma_sdk/google:seven_zip_reader",
|
||||
- "//third_party/unrar:unrar",
|
||||
]
|
||||
|
||||
if (is_linux) {
|
||||
diff -up chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc
|
||||
--- chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc 2023-05-21 18:11:14.869058617 +0200
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "base/time/time.h"
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
|
||||
-#include "chrome/common/safe_browsing/rar_analyzer.h"
|
||||
#include "components/safe_browsing/content/common/file_type_policies.h"
|
||||
#include "components/safe_browsing/core/common/features.h"
|
||||
#include "components/safe_browsing/core/common/proto/csd.pb.h"
|
||||
diff -up chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc
|
||||
--- chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc 2023-05-21 18:11:14.870058635 +0200
|
||||
@@ -71,6 +71,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
|
||||
base::File rar_file,
|
||||
mojo::PendingRemote<chrome::mojom::TemporaryFileGetter> temp_file_getter,
|
||||
AnalyzeRarFileCallback callback) {
|
||||
+#if 0
|
||||
DCHECK(rar_file.IsValid());
|
||||
temp_file_getter_.Bind(std::move(temp_file_getter));
|
||||
callback_ = std::move(callback);
|
||||
@@ -86,6 +87,9 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
|
||||
rar_analyzer_.Analyze(std::move(rar_file), base::FilePath(),
|
||||
std::move(analysis_finished_callback),
|
||||
std::move(temp_file_getter_callback), &results_);
|
||||
+#else
|
||||
+ NOTREACHED();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void SafeArchiveAnalyzer::AnalyzeSevenZipFile(
|
||||
diff -up chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h.nounrar chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h
|
||||
--- chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h 2023-05-21 18:11:14.870058635 +0200
|
||||
@@ -6,7 +6,6 @@
|
||||
#define CHROME_SERVICES_FILE_UTIL_SAFE_ARCHIVE_ANALYZER_H_
|
||||
|
||||
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
|
||||
-#include "chrome/common/safe_browsing/rar_analyzer.h"
|
||||
#include "chrome/common/safe_browsing/seven_zip_analyzer.h"
|
||||
#include "chrome/common/safe_browsing/zip_analyzer.h"
|
||||
#include "chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom.h"
|
||||
@@ -63,7 +62,6 @@ class SafeArchiveAnalyzer : public chrom
|
||||
void Timeout();
|
||||
|
||||
safe_browsing::ZipAnalyzer zip_analyzer_;
|
||||
- safe_browsing::RarAnalyzer rar_analyzer_;
|
||||
safe_browsing::SevenZipAnalyzer seven_zip_analyzer_;
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
safe_browsing::dmg::DMGAnalyzer dmg_analyzer_;
|
@ -0,0 +1,21 @@
|
||||
diff --git a/ui/qt/qt_ui.cc b/ui/qt/qt_ui.cc
|
||||
index bac5245a..a97fa8b 100644
|
||||
--- a/ui/qt/qt_ui.cc
|
||||
+++ b/ui/qt/qt_ui.cc
|
||||
@@ -422,12 +422,14 @@
|
||||
auto desc = shim_->GetFontDescription();
|
||||
|
||||
font_family_ = desc.family.c_str();
|
||||
+ // Points are defined at 72 DPI and pixels are 96 DPI by default.
|
||||
+ constexpr double kPointToPixelRatio = 96.0 / 72.0;
|
||||
if (desc.size_pixels > 0) {
|
||||
font_size_pixels_ = desc.size_pixels;
|
||||
- font_size_points_ = font_size_pixels_ / GetDeviceScaleFactor();
|
||||
+ font_size_points_ = std::round(font_size_pixels_ / kPointToPixelRatio);
|
||||
} else {
|
||||
font_size_points_ = desc.size_points;
|
||||
- font_size_pixels_ = font_size_points_ * GetDeviceScaleFactor();
|
||||
+ font_size_pixels_ = std::round(font_size_points_ * kPointToPixelRatio);
|
||||
}
|
||||
font_style_ = desc.is_italic ? gfx::Font::ITALIC : gfx::Font::NORMAL;
|
||||
font_weight_ = QtWeightToCssWeight(desc.weight);
|
@ -0,0 +1,574 @@
|
||||
commit c51d6447fd0d124903d16bf5952efccbf9e1ca92
|
||||
Author: Tom Anderson <thomasanderson@chromium.org>
|
||||
Date: Wed May 24 22:53:20 2023 +0000
|
||||
|
||||
[Qt] Handle scale factor changes
|
||||
|
||||
This is a speculative fix for https://crbug.com/1439149. I suspect
|
||||
the scale factor is not set immediately on QT initialization, but
|
||||
is set asynchronously shortly after. This CL adds a listener for
|
||||
QT scale changes.
|
||||
|
||||
R=thestig
|
||||
|
||||
Low-Coverage-Reason: No QT tests currently
|
||||
Change-Id: I7dea23e16a6bb26237564af2dc4e43480f6aea9f
|
||||
Bug: 1439149
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4559732
|
||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1148805}
|
||||
|
||||
diff --git a/ui/qt/qt5_shim_moc.cc b/ui/qt/qt5_shim_moc.cc
|
||||
index 8f8b6b57784a8..6e504f23c603a 100644
|
||||
--- a/ui/qt/qt5_shim_moc.cc
|
||||
+++ b/ui/qt/qt5_shim_moc.cc
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
QT_BEGIN_MOC_NAMESPACE
|
||||
struct qt_meta_stringdata_qt__QtShim_t {
|
||||
- QByteArrayData data[6];
|
||||
- char stringdata[52];
|
||||
+ QByteArrayData data[13];
|
||||
+ char stringdata[151];
|
||||
};
|
||||
#define QT_MOC_LITERAL(idx, ofs, len) \
|
||||
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET( \
|
||||
@@ -33,9 +33,16 @@ struct qt_meta_stringdata_qt__QtShim_t {
|
||||
static const qt_meta_stringdata_qt__QtShim_t qt_meta_stringdata_qt__QtShim = {
|
||||
{QT_MOC_LITERAL(0, 0, 10), QT_MOC_LITERAL(1, 11, 11),
|
||||
QT_MOC_LITERAL(2, 23, 0), QT_MOC_LITERAL(3, 24, 4),
|
||||
- QT_MOC_LITERAL(4, 29, 14), QT_MOC_LITERAL(5, 44, 7)},
|
||||
+ QT_MOC_LITERAL(4, 29, 14), QT_MOC_LITERAL(5, 44, 7),
|
||||
+ QT_MOC_LITERAL(6, 52, 11), QT_MOC_LITERAL(7, 64, 8),
|
||||
+ QT_MOC_LITERAL(8, 73, 6), QT_MOC_LITERAL(9, 80, 13),
|
||||
+ QT_MOC_LITERAL(10, 94, 25), QT_MOC_LITERAL(11, 120, 3),
|
||||
+ QT_MOC_LITERAL(12, 124, 26)},
|
||||
"qt::QtShim\0FontChanged\0\0font\0"
|
||||
- "PaletteChanged\0palette"};
|
||||
+ "PaletteChanged\0palette\0ScreenAdded\0"
|
||||
+ "QScreen*\0screen\0ScreenRemoved\0"
|
||||
+ "LogicalDotsPerInchChanged\0dpi\0"
|
||||
+ "PhysicalDotsPerInchChanged"};
|
||||
#undef QT_MOC_LITERAL
|
||||
|
||||
static const uint qt_meta_data_qt__QtShim[] = {
|
||||
@@ -44,7 +51,7 @@ static const uint qt_meta_data_qt__QtShim[] = {
|
||||
7, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
- 2, 14, // methods
|
||||
+ 6, 14, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
@@ -52,11 +59,15 @@ static const uint qt_meta_data_qt__QtShim[] = {
|
||||
0, // signalCount
|
||||
|
||||
// slots: name, argc, parameters, tag, flags
|
||||
- 1, 1, 24, 2, 0x08 /* Private */, 4, 1, 27, 2, 0x08 /* Private */,
|
||||
+ 1, 1, 44, 2, 0x08 /* Private */, 4, 1, 47, 2, 0x08 /* Private */, 6, 1, 50,
|
||||
+ 2, 0x08 /* Private */, 9, 1, 53, 2, 0x08 /* Private */, 10, 1, 56, 2,
|
||||
+ 0x08 /* Private */, 12, 1, 59, 2, 0x08 /* Private */,
|
||||
|
||||
// slots: parameters
|
||||
QMetaType::Void, QMetaType::QFont, 3, QMetaType::Void, QMetaType::QPalette,
|
||||
- 5,
|
||||
+ 5, QMetaType::Void, 0x80000000 | 7, 8, QMetaType::Void, 0x80000000 | 7, 8,
|
||||
+ QMetaType::Void, QMetaType::QReal, 11, QMetaType::Void, QMetaType::QReal,
|
||||
+ 11,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
@@ -74,6 +85,18 @@ void qt::QtShim::qt_static_metacall(QObject* _o,
|
||||
case 1:
|
||||
_t->PaletteChanged((*reinterpret_cast<const QPalette(*)>(_a[1])));
|
||||
break;
|
||||
+ case 2:
|
||||
+ _t->ScreenAdded((*reinterpret_cast<QScreen*(*)>(_a[1])));
|
||||
+ break;
|
||||
+ case 3:
|
||||
+ _t->ScreenRemoved((*reinterpret_cast<QScreen*(*)>(_a[1])));
|
||||
+ break;
|
||||
+ case 4:
|
||||
+ _t->LogicalDotsPerInchChanged((*reinterpret_cast<qreal(*)>(_a[1])));
|
||||
+ break;
|
||||
+ case 5:
|
||||
+ _t->PhysicalDotsPerInchChanged((*reinterpret_cast<qreal(*)>(_a[1])));
|
||||
+ break;
|
||||
default:;
|
||||
}
|
||||
}
|
||||
@@ -107,15 +130,15 @@ int qt::QtShim::qt_metacall(QMetaObject::Call _c, int _id, void** _a) {
|
||||
return _id;
|
||||
}
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
- if (_id < 2) {
|
||||
+ if (_id < 6) {
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
}
|
||||
- _id -= 2;
|
||||
+ _id -= 6;
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
- if (_id < 2) {
|
||||
+ if (_id < 6) {
|
||||
*reinterpret_cast<int*>(_a[0]) = -1;
|
||||
}
|
||||
- _id -= 2;
|
||||
+ _id -= 6;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
diff --git a/ui/qt/qt6_shim_moc.cc b/ui/qt/qt6_shim_moc.cc
|
||||
index 6d02ca317b65d..a16515008d892 100644
|
||||
--- a/ui/qt/qt6_shim_moc.cc
|
||||
+++ b/ui/qt/qt6_shim_moc.cc
|
||||
@@ -26,8 +26,8 @@ QT_BEGIN_MOC_NAMESPACE
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
struct qt_meta_stringdata_qt__QtShim_t {
|
||||
- const uint offsetsAndSize[12];
|
||||
- char stringdata0[52];
|
||||
+ const uint offsetsAndSize[26];
|
||||
+ char stringdata0[151];
|
||||
};
|
||||
#define QT_MOC_LITERAL(ofs, len) \
|
||||
uint(offsetof(qt_meta_stringdata_qt__QtShim_t, stringdata0) + ofs), len
|
||||
@@ -38,11 +38,21 @@ static const qt_meta_stringdata_qt__QtShim_t qt_meta_stringdata_qt__QtShim = {
|
||||
QT_MOC_LITERAL(23, 0), // ""
|
||||
QT_MOC_LITERAL(24, 4), // "font"
|
||||
QT_MOC_LITERAL(29, 14), // "PaletteChanged"
|
||||
- QT_MOC_LITERAL(44, 7) // "palette"
|
||||
+ QT_MOC_LITERAL(44, 7), // "palette"
|
||||
+ QT_MOC_LITERAL(52, 11), // "ScreenAdded"
|
||||
+ QT_MOC_LITERAL(64, 8), // "QScreen*"
|
||||
+ QT_MOC_LITERAL(73, 6), // "screen"
|
||||
+ QT_MOC_LITERAL(80, 13), // "ScreenRemoved"
|
||||
+ QT_MOC_LITERAL(94, 25), // "LogicalDotsPerInchChanged"
|
||||
+ QT_MOC_LITERAL(120, 3), // "dpi"
|
||||
+ QT_MOC_LITERAL(124, 26) // "PhysicalDotsPerInchChanged"
|
||||
|
||||
},
|
||||
"qt::QtShim\0FontChanged\0\0font\0"
|
||||
- "PaletteChanged\0palette"};
|
||||
+ "PaletteChanged\0palette\0ScreenAdded\0"
|
||||
+ "QScreen*\0screen\0ScreenRemoved\0"
|
||||
+ "LogicalDotsPerInchChanged\0dpi\0"
|
||||
+ "PhysicalDotsPerInchChanged"};
|
||||
#undef QT_MOC_LITERAL
|
||||
|
||||
static const uint qt_meta_data_qt__QtShim[] = {
|
||||
@@ -51,7 +61,7 @@ static const uint qt_meta_data_qt__QtShim[] = {
|
||||
10, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
- 2, 14, // methods
|
||||
+ 6, 14, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
@@ -59,11 +69,15 @@ static const uint qt_meta_data_qt__QtShim[] = {
|
||||
0, // signalCount
|
||||
|
||||
// slots: name, argc, parameters, tag, flags, initial metatype offsets
|
||||
- 1, 1, 26, 2, 0x08, 1 /* Private */, 4, 1, 29, 2, 0x08, 3 /* Private */,
|
||||
+ 1, 1, 50, 2, 0x08, 1 /* Private */, 4, 1, 53, 2, 0x08, 3 /* Private */, 6,
|
||||
+ 1, 56, 2, 0x08, 5 /* Private */, 9, 1, 59, 2, 0x08, 7 /* Private */, 10, 1,
|
||||
+ 62, 2, 0x08, 9 /* Private */, 12, 1, 65, 2, 0x08, 11 /* Private */,
|
||||
|
||||
// slots: parameters
|
||||
QMetaType::Void, QMetaType::QFont, 3, QMetaType::Void, QMetaType::QPalette,
|
||||
- 5,
|
||||
+ 5, QMetaType::Void, 0x80000000 | 7, 8, QMetaType::Void, 0x80000000 | 7, 8,
|
||||
+ QMetaType::Void, QMetaType::QReal, 11, QMetaType::Void, QMetaType::QReal,
|
||||
+ 11,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
@@ -83,6 +97,22 @@ void qt::QtShim::qt_static_metacall(QObject* _o,
|
||||
_t->PaletteChanged(
|
||||
(*reinterpret_cast<std::add_pointer_t<QPalette>>(_a[1])));
|
||||
break;
|
||||
+ case 2:
|
||||
+ _t->ScreenAdded(
|
||||
+ (*reinterpret_cast<std::add_pointer_t<QScreen*>>(_a[1])));
|
||||
+ break;
|
||||
+ case 3:
|
||||
+ _t->ScreenRemoved(
|
||||
+ (*reinterpret_cast<std::add_pointer_t<QScreen*>>(_a[1])));
|
||||
+ break;
|
||||
+ case 4:
|
||||
+ _t->LogicalDotsPerInchChanged(
|
||||
+ (*reinterpret_cast<std::add_pointer_t<qreal>>(_a[1])));
|
||||
+ break;
|
||||
+ case 5:
|
||||
+ _t->PhysicalDotsPerInchChanged(
|
||||
+ (*reinterpret_cast<std::add_pointer_t<qreal>>(_a[1])));
|
||||
+ break;
|
||||
default:;
|
||||
}
|
||||
}
|
||||
@@ -98,7 +128,15 @@ const QMetaObject qt::QtShim::staticMetaObject = {
|
||||
QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
QtPrivate::TypeAndForceComplete<const QFont&, std::false_type>,
|
||||
QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
- QtPrivate::TypeAndForceComplete<const QPalette&, std::false_type>
|
||||
+ QtPrivate::TypeAndForceComplete<const QPalette&, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<QScreen*, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<QScreen*, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<qreal, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<qreal, std::false_type>
|
||||
|
||||
>,
|
||||
nullptr}};
|
||||
@@ -127,15 +165,15 @@ int qt::QtShim::qt_metacall(QMetaObject::Call _c, int _id, void** _a) {
|
||||
return _id;
|
||||
}
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
- if (_id < 2) {
|
||||
+ if (_id < 6) {
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
}
|
||||
- _id -= 2;
|
||||
+ _id -= 6;
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
- if (_id < 2) {
|
||||
+ if (_id < 6) {
|
||||
*reinterpret_cast<QMetaType*>(_a[0]) = QMetaType();
|
||||
}
|
||||
- _id -= 2;
|
||||
+ _id -= 6;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
diff --git a/ui/qt/qt_interface.h b/ui/qt/qt_interface.h
|
||||
index 6a362bc66c0e3..28dfc6603544f 100644
|
||||
--- a/ui/qt/qt_interface.h
|
||||
+++ b/ui/qt/qt_interface.h
|
||||
@@ -118,6 +118,7 @@ class QtInterface {
|
||||
|
||||
virtual void FontChanged() = 0;
|
||||
virtual void ThemeChanged() = 0;
|
||||
+ virtual void ScaleFactorMaybeChanged() = 0;
|
||||
};
|
||||
|
||||
QtInterface() = default;
|
||||
diff --git a/ui/qt/qt_shim.cc b/ui/qt/qt_shim.cc
|
||||
index 74d34ad196f18..0aec9c3aed4ad 100644
|
||||
--- a/ui/qt/qt_shim.cc
|
||||
+++ b/ui/qt/qt_shim.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <QMimeType>
|
||||
#include <QPainter>
|
||||
#include <QPalette>
|
||||
+#include <QScreen>
|
||||
#include <QStyle>
|
||||
#include <QStyleOptionTitleBar>
|
||||
|
||||
@@ -52,8 +53,9 @@ FontHinting QtHintingToFontHinting(QFont::HintingPreference hinting) {
|
||||
// Obtain the average color of a gradient.
|
||||
SkColor GradientColor(const QGradient& gradient) {
|
||||
QGradientStops stops = gradient.stops();
|
||||
- if (stops.empty())
|
||||
+ if (stops.empty()) {
|
||||
return qRgba(0, 0, 0, 0);
|
||||
+ }
|
||||
|
||||
float a = 0;
|
||||
float r = 0;
|
||||
@@ -86,11 +88,13 @@ SkColor GradientColor(const QGradient& gradient) {
|
||||
// Obtain the average color of a texture.
|
||||
SkColor TextureColor(QImage image) {
|
||||
size_t size = image.width() * image.height();
|
||||
- if (!size)
|
||||
+ if (!size) {
|
||||
return qRgba(0, 0, 0, 0);
|
||||
+ }
|
||||
|
||||
- if (image.format() != QImage::Format_ARGB32_Premultiplied)
|
||||
+ if (image.format() != QImage::Format_ARGB32_Premultiplied) {
|
||||
image = image.convertToFormat(QImage::Format_ARGB32_Premultiplied);
|
||||
+ }
|
||||
|
||||
size_t a = 0;
|
||||
size_t r = 0;
|
||||
@@ -203,6 +207,13 @@ QtShim::QtShim(QtInterface::Delegate* delegate, int* argc, char** argv)
|
||||
SLOT(FontChanged(const QFont&)));
|
||||
connect(&app_, SIGNAL(paletteChanged(const QPalette&)), this,
|
||||
SLOT(PaletteChanged(const QPalette&)));
|
||||
+ connect(&app_, SIGNAL(screenAdded(QScreen*)), this,
|
||||
+ SLOT(ScreenAdded(QScreen*)));
|
||||
+ connect(&app_, SIGNAL(screenRemoved(QScreen*)), this,
|
||||
+ SLOT(ScreenRemoved(QScreen*)));
|
||||
+ for (QScreen* screen : app_.screens()) {
|
||||
+ ScreenAdded(screen);
|
||||
+ }
|
||||
}
|
||||
|
||||
QtShim::~QtShim() = default;
|
||||
@@ -241,8 +252,9 @@ Image QtShim::GetIconForContentType(const String& content_type,
|
||||
auto icon = QIcon::fromTheme(name);
|
||||
auto pixmap = icon.pixmap(size);
|
||||
auto image = pixmap.toImage();
|
||||
- if (image.format() != QImage::Format_ARGB32_Premultiplied)
|
||||
+ if (image.format() != QImage::Format_ARGB32_Premultiplied) {
|
||||
image = image.convertToFormat(QImage::Format_ARGB32_Premultiplied);
|
||||
+ }
|
||||
if (auto bytes = image.sizeInBytes()) {
|
||||
return {image.width(), image.height(),
|
||||
static_cast<float>(image.devicePixelRatio()),
|
||||
@@ -283,6 +295,30 @@ void QtShim::PaletteChanged(const QPalette& palette) {
|
||||
delegate_->ThemeChanged();
|
||||
}
|
||||
|
||||
+DISABLE_CFI_VCALL
|
||||
+void QtShim::ScreenAdded(QScreen* screen) {
|
||||
+ connect(screen, SIGNAL(logicalDotsPerInchChanged(qreal)), this,
|
||||
+ SLOT(LogicalDotsPerInchChanged(qreal)));
|
||||
+ connect(screen, SIGNAL(physicalDotsPerInchChanged(qreal)), this,
|
||||
+ SLOT(PhysicalDotsPerInchChanged(qreal)));
|
||||
+ delegate_->ScaleFactorMaybeChanged();
|
||||
+}
|
||||
+
|
||||
+DISABLE_CFI_VCALL
|
||||
+void QtShim::ScreenRemoved(QScreen* screen) {
|
||||
+ delegate_->ScaleFactorMaybeChanged();
|
||||
+}
|
||||
+
|
||||
+DISABLE_CFI_VCALL
|
||||
+void QtShim::LogicalDotsPerInchChanged(qreal dpi) {
|
||||
+ delegate_->ScaleFactorMaybeChanged();
|
||||
+}
|
||||
+
|
||||
+DISABLE_CFI_VCALL
|
||||
+void QtShim::PhysicalDotsPerInchChanged(qreal dpi) {
|
||||
+ delegate_->ScaleFactorMaybeChanged();
|
||||
+}
|
||||
+
|
||||
Image QtShim::DrawHeader(int width,
|
||||
int height,
|
||||
SkColor default_color,
|
||||
@@ -309,8 +345,9 @@ QImage QtShim::DrawHeaderImpl(int width,
|
||||
QStyleOptionTitleBar opt;
|
||||
opt.rect = QRect(-kBorderWidth, -kBorderWidth, width + 2 * kBorderWidth,
|
||||
height + 2 * kBorderWidth);
|
||||
- if (state == ColorState::kNormal)
|
||||
+ if (state == ColorState::kNormal) {
|
||||
opt.titleBarState = QStyle::State_Active;
|
||||
+ }
|
||||
app_.style()->drawComplexControl(QStyle::CC_TitleBar, &opt, &painter,
|
||||
nullptr);
|
||||
} else {
|
||||
diff --git a/ui/qt/qt_shim.h b/ui/qt/qt_shim.h
|
||||
index 607e6fe22dfc0..d979c47d589d4 100644
|
||||
--- a/ui/qt/qt_shim.h
|
||||
+++ b/ui/qt/qt_shim.h
|
||||
@@ -42,6 +42,10 @@ class QtShim : public QObject, public QtInterface {
|
||||
private slots:
|
||||
void FontChanged(const QFont& font);
|
||||
void PaletteChanged(const QPalette& palette);
|
||||
+ void ScreenAdded(QScreen* screen);
|
||||
+ void ScreenRemoved(QScreen* screen);
|
||||
+ void LogicalDotsPerInchChanged(qreal dpi);
|
||||
+ void PhysicalDotsPerInchChanged(qreal dpi);
|
||||
|
||||
private:
|
||||
QImage DrawHeaderImpl(int width,
|
||||
diff --git a/ui/qt/qt_ui.cc b/ui/qt/qt_ui.cc
|
||||
index 6a3b58e9f930b..bac5245a069f9 100644
|
||||
--- a/ui/qt/qt_ui.cc
|
||||
+++ b/ui/qt/qt_ui.cc
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "base/nix/xdg_util.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/path_service.h"
|
||||
+#include "base/task/single_thread_task_runner.h"
|
||||
#include "base/time/time.h"
|
||||
#include "cc/paint/paint_canvas.h"
|
||||
#include "chrome/browser/themes/theme_properties.h" // nogncheck
|
||||
@@ -36,6 +37,7 @@
|
||||
#include "ui/gfx/image/image.h"
|
||||
#include "ui/gfx/image/image_skia_rep.h"
|
||||
#include "ui/gfx/image/image_skia_source.h"
|
||||
+#include "ui/linux/device_scale_factor_observer.h"
|
||||
#include "ui/linux/linux_ui.h"
|
||||
#include "ui/linux/nav_button_provider.h"
|
||||
#include "ui/native_theme/native_theme_aura.h"
|
||||
@@ -194,16 +196,21 @@ void QtUi::GetDefaultFontDescription(std::string* family_out,
|
||||
int* style_out,
|
||||
int* weight_out,
|
||||
gfx::FontRenderParams* params_out) const {
|
||||
- if (family_out)
|
||||
+ if (family_out) {
|
||||
*family_out = font_family_;
|
||||
- if (size_pixels_out)
|
||||
+ }
|
||||
+ if (size_pixels_out) {
|
||||
*size_pixels_out = font_size_pixels_;
|
||||
- if (style_out)
|
||||
+ }
|
||||
+ if (style_out) {
|
||||
*style_out = font_style_;
|
||||
- if (weight_out)
|
||||
+ }
|
||||
+ if (weight_out) {
|
||||
*weight_out = font_weight_;
|
||||
- if (params_out)
|
||||
+ }
|
||||
+ if (params_out) {
|
||||
*params_out = font_params_;
|
||||
+ }
|
||||
}
|
||||
|
||||
ui::SelectFileDialog* QtUi::CreateSelectFileDialog(
|
||||
@@ -236,6 +245,7 @@ bool QtUi::Initialize() {
|
||||
ui::ColorProviderManager::Get().AppendColorProviderInitializer(
|
||||
base::BindRepeating(&QtUi::AddNativeColorMixer, base::Unretained(this)));
|
||||
FontChanged();
|
||||
+ scale_factor_ = shim_->GetScaleFactor();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -246,8 +256,9 @@ ui::NativeTheme* QtUi::GetNativeTheme() const {
|
||||
|
||||
bool QtUi::GetColor(int id, SkColor* color, bool use_custom_frame) const {
|
||||
auto value = GetColor(id, use_custom_frame);
|
||||
- if (value)
|
||||
+ if (value) {
|
||||
*color = *value;
|
||||
+ }
|
||||
return value.has_value();
|
||||
}
|
||||
|
||||
@@ -297,8 +308,9 @@ gfx::Image QtUi::GetIconForContentType(const std::string& content_type,
|
||||
float scale) const {
|
||||
Image image =
|
||||
shim_->GetIconForContentType(String(content_type.c_str()), size * scale);
|
||||
- if (!image.data_argb.size())
|
||||
+ if (!image.data_argb.size()) {
|
||||
return {};
|
||||
+ }
|
||||
|
||||
SkImageInfo image_info = SkImageInfo::Make(
|
||||
image.width, image.height, kBGRA_8888_SkColorType, kPremul_SkAlphaType);
|
||||
@@ -345,14 +357,16 @@ bool QtUi::AnimationsEnabled() const {
|
||||
|
||||
void QtUi::AddWindowButtonOrderObserver(
|
||||
ui::WindowButtonOrderObserver* observer) {
|
||||
- if (fallback_linux_ui_)
|
||||
+ if (fallback_linux_ui_) {
|
||||
fallback_linux_ui_->AddWindowButtonOrderObserver(observer);
|
||||
+ }
|
||||
}
|
||||
|
||||
void QtUi::RemoveWindowButtonOrderObserver(
|
||||
ui::WindowButtonOrderObserver* observer) {
|
||||
- if (fallback_linux_ui_)
|
||||
+ if (fallback_linux_ui_) {
|
||||
fallback_linux_ui_->RemoveWindowButtonOrderObserver(observer);
|
||||
+ }
|
||||
}
|
||||
|
||||
std::unique_ptr<ui::NavButtonProvider> QtUi::CreateNavButtonProvider() {
|
||||
@@ -441,11 +455,24 @@ void QtUi::ThemeChanged() {
|
||||
native_theme_->ThemeChanged(PreferDarkTheme());
|
||||
}
|
||||
|
||||
+void QtUi::ScaleFactorMaybeChanged() {
|
||||
+ // This gets called whenever the monitor configuration changes. Handle the
|
||||
+ // scale change asynchronously to allow the change to propagate to QT's scale
|
||||
+ // factor. This also coalesces scale change events together.
|
||||
+ if (!scale_factor_task_active_) {
|
||||
+ scale_factor_task_active_ = true;
|
||||
+ base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
|
||||
+ FROM_HERE, base::BindOnce(&QtUi::ScaleFactorMaybeChangedImpl,
|
||||
+ weak_factory_.GetWeakPtr()));
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
DISABLE_CFI_VCALL
|
||||
void QtUi::AddNativeColorMixer(ui::ColorProvider* provider,
|
||||
const ui::ColorProviderManager::Key& key) {
|
||||
- if (key.system_theme != ui::SystemTheme::kQt)
|
||||
+ if (key.system_theme != ui::SystemTheme::kQt) {
|
||||
return;
|
||||
+ }
|
||||
|
||||
ui::ColorMixer& mixer = provider->AddMixer();
|
||||
// These color constants are required by native_chrome_color_mixer_linux.cc
|
||||
@@ -494,8 +521,9 @@ void QtUi::AddNativeColorMixer(ui::ColorProvider* provider,
|
||||
ColorState::kInactive},
|
||||
{ui::kColorNativeToolbarBackground, ColorType::kButtonBg},
|
||||
};
|
||||
- for (const auto& map : kMaps)
|
||||
+ for (const auto& map : kMaps) {
|
||||
mixer[map.id] = {shim_->GetColor(map.role, map.state)};
|
||||
+ }
|
||||
|
||||
const bool use_custom_frame =
|
||||
key.frame_type == ui::ColorProviderManager::FrameType::kChromium;
|
||||
@@ -578,6 +606,20 @@ absl::optional<SkColor> QtUi::GetColor(int id, bool use_custom_frame) const {
|
||||
}
|
||||
}
|
||||
|
||||
+DISABLE_CFI_VCALL
|
||||
+void QtUi::ScaleFactorMaybeChangedImpl() {
|
||||
+ scale_factor_task_active_ = false;
|
||||
+ double scale = shim_->GetScaleFactor();
|
||||
+ if (scale == scale_factor_) {
|
||||
+ return;
|
||||
+ }
|
||||
+ scale_factor_ = scale;
|
||||
+ for (ui::DeviceScaleFactorObserver& observer :
|
||||
+ device_scale_factor_observer_list()) {
|
||||
+ observer.OnDeviceScaleFactorChanged();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
std::unique_ptr<ui::LinuxUiAndTheme> CreateQtUi(
|
||||
ui::LinuxUi* fallback_linux_ui) {
|
||||
return std::make_unique<QtUi>(fallback_linux_ui);
|
||||
diff --git a/ui/qt/qt_ui.h b/ui/qt/qt_ui.h
|
||||
index b53ed93240708..3319edf1ea9bc 100644
|
||||
--- a/ui/qt/qt_ui.h
|
||||
+++ b/ui/qt/qt_ui.h
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "base/component_export.h"
|
||||
+#include "base/memory/weak_ptr.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
#include "ui/color/color_provider.h"
|
||||
@@ -88,11 +89,14 @@ class QtUi : public ui::LinuxUiAndTheme, QtInterface::Delegate {
|
||||
// QtInterface::Delegate:
|
||||
void FontChanged() override;
|
||||
void ThemeChanged() override;
|
||||
+ void ScaleFactorMaybeChanged() override;
|
||||
|
||||
private:
|
||||
void AddNativeColorMixer(ui::ColorProvider* provider,
|
||||
const ui::ColorProviderManager::Key& key);
|
||||
|
||||
+ void ScaleFactorMaybeChangedImpl();
|
||||
+
|
||||
absl::optional<SkColor> GetColor(int id, bool use_custom_frame) const;
|
||||
|
||||
// TODO(https://crbug.com/1317782): This is a fallback for any unimplemented
|
||||
@@ -114,6 +118,11 @@ class QtUi : public ui::LinuxUiAndTheme, QtInterface::Delegate {
|
||||
std::unique_ptr<QtInterface> shim_;
|
||||
|
||||
std::unique_ptr<QtNativeTheme> native_theme_;
|
||||
+
|
||||
+ bool scale_factor_task_active_ = false;
|
||||
+ double scale_factor_ = 1.0;
|
||||
+
|
||||
+ base::WeakPtrFactory<QtUi> weak_factory_{this};
|
||||
};
|
||||
|
||||
// This should be the only symbol exported from this component.
|
@ -0,0 +1,46 @@
|
||||
commit 7b1d747a599a752e493e34e7bbf841d8b4c7882f
|
||||
Author: Tomasz Śniatowski <tomasz.sniatowski@xperi.com>
|
||||
Date: Thu May 25 16:09:27 2023 +0000
|
||||
|
||||
Dep on //printing in //ui/qt if printing is enabled
|
||||
|
||||
qt_ui.h can use printing/printing_context_linux.h, and needs to dep
|
||||
on //printing if it does, to avoid a missing dependency build break.
|
||||
|
||||
Without this fix, a clean build can fail on obj/ui/qt/qt/qt_ui.o with
|
||||
In file included from ../../ui/qt/qt_ui.cc:8:
|
||||
In file included from ../../ui/qt/qt_ui.h:21:
|
||||
../../printing/printing_context_linux.h:12:10: fatal error:
|
||||
'printing/mojom/print.mojom.h' file not found
|
||||
|
||||
(the #include is a // NOGNCHECK one, which is how this came to be)
|
||||
|
||||
Change-Id: I70af37071e232ffbf462a05e026051efae044b69
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4566944
|
||||
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Auto-Submit: Tomasz Śniatowski <tomasz.sniatowski@xperi.com>
|
||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1149138}
|
||||
|
||||
diff --git a/ui/qt/BUILD.gn b/ui/qt/BUILD.gn
|
||||
index 6a67961edc2f7..89fffcf3089f9 100644
|
||||
--- a/ui/qt/BUILD.gn
|
||||
+++ b/ui/qt/BUILD.gn
|
||||
@@ -5,6 +5,7 @@
|
||||
import("//build/config/chromecast_build.gni")
|
||||
import("//build/config/linux/pkg_config.gni")
|
||||
import("//build/config/sysroot.gni")
|
||||
+import("//printing/buildflags/buildflags.gni")
|
||||
import("//ui/qt/qt.gni")
|
||||
|
||||
assert(use_qt)
|
||||
@@ -127,6 +128,9 @@ component("qt") {
|
||||
"//ui/views",
|
||||
]
|
||||
public_deps = [ "//skia" ]
|
||||
+ if (enable_printing) {
|
||||
+ public_deps += [ "//printing" ]
|
||||
+ }
|
||||
|
||||
sources = [
|
||||
"qt_ui.cc",
|
@ -0,0 +1,12 @@
|
||||
diff -up chromium-114.0.5735.106/ui/linux/linux_ui_factory.cc.me chromium-114.0.5735.106/ui/linux/linux_ui_factory.cc
|
||||
--- chromium-114.0.5735.106/ui/linux/linux_ui_factory.cc.me 2023-06-11 18:47:09.742886578 +0200
|
||||
+++ chromium-114.0.5735.106/ui/linux/linux_ui_factory.cc 2023-06-11 18:48:42.231584886 +0200
|
||||
@@ -127,7 +127,7 @@ LinuxUiAndTheme* GetDefaultLinuxUiAndThe
|
||||
|
||||
} // namespace
|
||||
|
||||
-BASE_FEATURE(kAllowQt, "AllowQt", base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kAllowQt, "AllowQt", base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
LinuxUi* GetDefaultLinuxUi() {
|
||||
auto* linux_ui = GetDefaultLinuxUiAndTheme();
|
@ -0,0 +1,59 @@
|
||||
commit ff39a278ddccf61716a7dbcb575415801bbf8ded
|
||||
Author: Tom Anderson <thomasanderson@chromium.org>
|
||||
Date: Wed May 31 18:31:09 2023 +0000
|
||||
|
||||
[QT] Account for logical scale factor
|
||||
|
||||
Previously we were only using the device pixel ratio. But QT UI
|
||||
scales with both the device pixel ratio and the logical DPI. This CL
|
||||
sets Chrome's scale factor to be the product of these two.
|
||||
|
||||
R=thestig
|
||||
CC=jkummerow
|
||||
|
||||
Change-Id: I9bd414046058e741450fabae4913d47a16ca48c3
|
||||
Bug: 1439149
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4575572
|
||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1151380}
|
||||
|
||||
diff --git a/ui/qt/qt_shim.cc b/ui/qt/qt_shim.cc
|
||||
index 0aec9c3aed4ad..3780f8c3988b4 100644
|
||||
--- a/ui/qt/qt_shim.cc
|
||||
+++ b/ui/qt/qt_shim.cc
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "ui/qt/qt_shim.h"
|
||||
|
||||
-#include <stdio.h>
|
||||
+#include <cmath>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QFont>
|
||||
@@ -219,7 +219,24 @@ QtShim::QtShim(QtInterface::Delegate* delegate, int* argc, char** argv)
|
||||
QtShim::~QtShim() = default;
|
||||
|
||||
double QtShim::GetScaleFactor() const {
|
||||
- return app_.devicePixelRatio();
|
||||
+ constexpr double kDefaultPixelDpi = 96.0;
|
||||
+ // Use the largest scale factor across all displays as the global scale
|
||||
+ // factor. This matches the behavior of `app_.devicePixelRatio()`, except
|
||||
+ // this also takes into account the logical DPI.
|
||||
+ // TODO(https://crbug.com/1450301): Unlike GTK, QT supports per-display
|
||||
+ // scaling. Use this instead of the max scale factor.
|
||||
+ double scale = 0.0;
|
||||
+ for (QScreen* screen : app_.screens()) {
|
||||
+ scale =
|
||||
+ std::max(scale, screen->devicePixelRatio() *
|
||||
+ screen->logicalDotsPerInch() / kDefaultPixelDpi);
|
||||
+ }
|
||||
+ // Round to the nearest 16th so that UI can losslessly multiply and divide
|
||||
+ // by the scale factor using floating point arithmetic. GtkUi also rounds
|
||||
+ // in this way, but to 1/64th. 1/16th is chosen here since that's what
|
||||
+ // KDE settings uses.
|
||||
+ scale = std::round(scale * 16) / 16;
|
||||
+ return scale > 0 ? scale : 1.0;
|
||||
}
|
||||
|
||||
FontRenderParams QtShim::GetFontRenderParams() const {
|
@ -0,0 +1,87 @@
|
||||
diff -up chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc.me chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc
|
||||
--- chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc.me 2023-05-21 10:05:00.357860329 +0200
|
||||
+++ chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc 2023-05-21 10:18:09.665432735 +0200
|
||||
@@ -41,7 +41,6 @@
|
||||
#include "media/gpu/gpu_video_encode_accelerator_helpers.h"
|
||||
#include "media/gpu/h264_dpb.h"
|
||||
#include "media/gpu/macros.h"
|
||||
-#include "media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h"
|
||||
#include "media/gpu/vaapi/h264_vaapi_video_encoder_delegate.h"
|
||||
#include "media/gpu/vaapi/va_surface.h"
|
||||
#include "media/gpu/vaapi/vaapi_common.h"
|
||||
@@ -200,7 +199,7 @@ bool VaapiVideoEncodeAccelerator::Initia
|
||||
|
||||
const VideoCodec codec = VideoCodecProfileToVideoCodec(config.output_profile);
|
||||
if (codec != VideoCodec::kH264 && codec != VideoCodec::kVP8 &&
|
||||
- codec != VideoCodec::kVP9 && codec != VideoCodec::kAV1) {
|
||||
+ codec != VideoCodec::kVP9) {
|
||||
MEDIA_LOG(ERROR, media_log.get())
|
||||
<< "Unsupported profile: " << GetProfileName(config.output_profile);
|
||||
return false;
|
||||
@@ -293,7 +292,6 @@ void VaapiVideoEncodeAccelerator::Initia
|
||||
break;
|
||||
case VideoCodec::kVP8:
|
||||
case VideoCodec::kVP9:
|
||||
- case VideoCodec::kAV1:
|
||||
mode = VaapiWrapper::kEncodeConstantQuantizationParameter;
|
||||
break;
|
||||
default:
|
||||
@@ -356,12 +354,6 @@ void VaapiVideoEncodeAccelerator::Initia
|
||||
vaapi_wrapper_, error_cb);
|
||||
}
|
||||
break;
|
||||
- case VideoCodec::kAV1:
|
||||
- if (!IsConfiguredForTesting()) {
|
||||
- encoder_ = std::make_unique<AV1VaapiVideoEncoderDelegate>(
|
||||
- vaapi_wrapper_, error_cb);
|
||||
- }
|
||||
- break;
|
||||
default:
|
||||
NOTREACHED() << "Unsupported codec type " << GetCodecName(output_codec_);
|
||||
return;
|
||||
@@ -835,10 +827,6 @@ VaapiVideoEncodeAccelerator::CreateEncod
|
||||
case VideoCodec::kVP9:
|
||||
picture = new VaapiVP9Picture(std::move(reconstructed_surface));
|
||||
break;
|
||||
- case VideoCodec::kAV1:
|
||||
- picture = new VaapiAV1Picture(/*display_va_surface=*/nullptr,
|
||||
- std::move(reconstructed_surface));
|
||||
- break;
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
diff -up chromium-114.0.5735.35/media/gpu/BUILD.gn.revert-av1enc chromium-114.0.5735.35/media/gpu/BUILD.gn
|
||||
--- chromium-114.0.5735.35/media/gpu/BUILD.gn.revert-av1enc 2023-05-18 00:37:57.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/media/gpu/BUILD.gn 2023-05-20 13:14:10.755183630 +0200
|
||||
@@ -373,10 +373,7 @@ source_set("common") {
|
||||
"vp9_svc_layers.h",
|
||||
]
|
||||
configs += [ "//third_party/libvpx:libvpx_config" ]
|
||||
- deps += [
|
||||
- "//third_party/libaom:libaomrc",
|
||||
- "//third_party/libvpx:libvpxrc",
|
||||
- ]
|
||||
+ deps += [ "//third_party/libvpx:libvpxrc" ]
|
||||
}
|
||||
if (use_libgav1_parser) {
|
||||
sources += [
|
||||
diff -up chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn.revert-av1enc chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn
|
||||
--- chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn.revert-av1enc 2023-05-18 00:37:57.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn 2023-05-20 13:14:10.756183626 +0200
|
||||
@@ -38,8 +38,6 @@ source_set("vaapi") {
|
||||
sources = [
|
||||
"av1_vaapi_video_decoder_delegate.cc",
|
||||
"av1_vaapi_video_decoder_delegate.h",
|
||||
- "av1_vaapi_video_encoder_delegate.cc",
|
||||
- "av1_vaapi_video_encoder_delegate.h",
|
||||
"h264_vaapi_video_decoder_delegate.cc",
|
||||
"h264_vaapi_video_decoder_delegate.h",
|
||||
"h264_vaapi_video_encoder_delegate.cc",
|
||||
@@ -107,7 +105,6 @@ source_set("vaapi") {
|
||||
"//media/gpu/chromeos:common",
|
||||
"//media/parsers",
|
||||
"//mojo/public/cpp/bindings",
|
||||
- "//third_party/libaom:libaomrc",
|
||||
"//third_party/libvpx:libvpxrc",
|
||||
"//third_party/libyuv",
|
||||
"//ui/gfx",
|
@ -0,0 +1,22 @@
|
||||
diff -up chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc.me chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc
|
||||
--- chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc.me 2023-05-13 12:09:44.423727385 +0200
|
||||
+++ chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc 2023-05-13 17:52:19.934347246 +0200
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <linux/net.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/sockios.h>
|
||||
-#include <linux/wireless.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <sys/inotify.h>
|
||||
@@ -48,6 +47,10 @@ using sandbox::syscall_broker::BrokerPro
|
||||
#define F2FS_IOC_GET_FEATURES _IOR(0xf5, 12, uint32_t)
|
||||
#endif
|
||||
|
||||
+#if !defined(SIOCGIWNAME)
|
||||
+#define SIOCGIWNAME 0x8B01
|
||||
+#endif
|
||||
+
|
||||
namespace sandbox::policy {
|
||||
|
||||
namespace {
|
@ -0,0 +1,19 @@
|
||||
commit 62f1d7caca64a8df55fb69c913309da2121a537f
|
||||
Author: tigro <arkadiy.sheyn@softline.com>
|
||||
Date: Fri Jul 21 16:51:31 2023 +0300
|
||||
|
||||
chromium-115-skia-include.patch
|
||||
|
||||
diff --git a/skia/ext/skcolorspace_trfn.cc b/skia/ext/skcolorspace_trfn.cc
|
||||
index c0d6bd2a8..97c4dfad9 100644
|
||||
--- a/skia/ext/skcolorspace_trfn.cc
|
||||
+++ b/skia/ext/skcolorspace_trfn.cc
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "skia/ext/skcolorspace_trfn.h"
|
||||
|
||||
+#include <cmath>
|
||||
+
|
||||
namespace skia {
|
||||
|
||||
namespace {
|
@ -0,0 +1,48 @@
|
||||
diff -up chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.typename chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc
|
||||
--- chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.typename 2023-06-17 14:50:56.342591702 +0200
|
||||
+++ chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc 2023-06-17 14:57:48.024377375 +0200
|
||||
@@ -91,7 +91,7 @@ ItemSortKey GetSortKey(const Item& item)
|
||||
// Helper to get an iterator to the last element in the cache. The cache
|
||||
// must not be empty.
|
||||
template <typename Item>
|
||||
-SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
|
||||
+typename SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
|
||||
CHECK(!cache.empty());
|
||||
auto it = cache.end();
|
||||
return std::prev(it);
|
||||
@@ -967,9 +967,9 @@ bool DownloadBubbleUpdateService::CacheM
|
||||
}
|
||||
|
||||
template <typename Id, typename Item>
|
||||
-SortedItems<Item>::iterator
|
||||
+typename SortedItems<Item>::iterator
|
||||
DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter(
|
||||
- SortedItems<Item>::iterator iter,
|
||||
+ typename SortedItems<Item>::iterator iter,
|
||||
SortedItems<Item>& cache,
|
||||
IterMap<Id, Item>& iter_map) {
|
||||
CHECK(iter != cache.end());
|
||||
diff -up chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h.me chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h
|
||||
--- chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h.me 2023-06-18 21:52:53.515625237 +0200
|
||||
+++ chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h 2023-06-18 21:53:06.881881293 +0200
|
||||
@@ -189,7 +189,7 @@ class TFLiteModelExecutor : public Model
|
||||
void SendForBatchExecution(
|
||||
BatchExecutionCallback callback_on_complete,
|
||||
base::TimeTicks start_time,
|
||||
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
|
||||
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
|
||||
override {
|
||||
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
diff -up chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me1 chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
|
||||
--- chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me1 2023-06-19 10:03:32.319218678 +0200
|
||||
+++ chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc 2023-06-19 10:04:12.023942232 +0200
|
||||
@@ -169,7 +169,7 @@ class HTMLFastPathParser {
|
||||
using Span = base::span<const Char>;
|
||||
using USpan = base::span<const UChar>;
|
||||
// 32 matches that used by HTMLToken::Attribute.
|
||||
- typedef std::conditional<std::is_same_v<Char, UChar>,
|
||||
+ typedef typename std::conditional<std::is_same_v<Char, UChar>,
|
||||
UCharLiteralBuffer<32>,
|
||||
LCharLiteralBuffer<32>>::type LiteralBufferType;
|
||||
typedef UCharLiteralBuffer<32> UCharLiteralBufferType;
|
@ -0,0 +1,25 @@
|
||||
From 74c464ae56275f4de46b7d1f7e103fa758a637d2 Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Wed, 31 May 2023 17:03:02 +0000
|
||||
Subject: [PATCH] IWYU: std::vector used in verify_name_match.h without include
|
||||
|
||||
Bug: 957519
|
||||
Change-Id: Ie753fadae35adb293f854a0f8d4f675e67a2fc31
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4533815
|
||||
Reviewed-by: David Benjamin <davidben@chromium.org>
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1151307}
|
||||
---
|
||||
|
||||
diff --git a/net/cert/pki/verify_name_match.h b/net/cert/pki/verify_name_match.h
|
||||
index d22cf7f..e30b221 100644
|
||||
--- a/net/cert/pki/verify_name_match.h
|
||||
+++ b/net/cert/pki/verify_name_match.h
|
||||
@@ -6,6 +6,7 @@
|
||||
#define NET_CERT_PKI_VERIFY_NAME_MATCH_H_
|
||||
|
||||
#include <string>
|
||||
+#include <vector>
|
||||
|
||||
#include "net/base/net_export.h"
|
||||
|
@ -0,0 +1,60 @@
|
||||
author: Andres Salomon <dilinger@debian.org>
|
||||
description: work around https://github.com/llvm/llvm-project/issues/48582
|
||||
|
||||
../../media/base/cdm_promise_adapter.cc:99:66: error: reference to local binding 'promise_id' declared in enclosing function 'media::CdmPromiseAdapter::Clear'
|
||||
"media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id),
|
||||
^
|
||||
../../media/base/cdm_promise_adapter.cc:97:15: note: 'promise_id' declared here
|
||||
for (auto& [promise_id, promise] : promises_) {
|
||||
^
|
||||
|
||||
This is some kind of clang14 scope bug, whereby variable are defined
|
||||
in a structured binding, and then used inside of a (valid, but) different
|
||||
scope. Eg,
|
||||
auto& [foo, bar, baz] = sizing_tree->CreateSizingData();
|
||||
do { auto& x = bar; } while (0);
|
||||
auto x = [&](GridTrackSizingDirection lambdavar) {
|
||||
for (auto& i : foo) { ... }
|
||||
}
|
||||
The compiler gets confused about scope and spits out an error. The
|
||||
workaround is to define the variable not in a structured binding.
|
||||
|
||||
--- a/media/base/cdm_promise_adapter.cc
|
||||
+++ b/media/base/cdm_promise_adapter.cc
|
||||
@@ -94,7 +94,9 @@ void CdmPromiseAdapter::RejectPromise(ui
|
||||
void CdmPromiseAdapter::Clear(ClearReason reason) {
|
||||
// Reject all outstanding promises.
|
||||
DCHECK(thread_checker_.CalledOnValidThread());
|
||||
- for (auto& [promise_id, promise] : promises_) {
|
||||
+ for (auto& [p_id, p] : promises_) {
|
||||
+ auto& promise_id = p_id;
|
||||
+ auto& promise = p;
|
||||
TRACE_EVENT_NESTABLE_ASYNC_END1(
|
||||
"media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id),
|
||||
"status", "cleared");
|
||||
--- a/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc
|
||||
+++ b/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc
|
||||
@@ -1798,8 +1798,10 @@ void NGGridLayoutAlgorithm::CompleteTrac
|
||||
bool* opt_needs_additional_pass) const {
|
||||
DCHECK(sizing_subtree);
|
||||
|
||||
- auto& [grid_items, layout_data, subtree_size] =
|
||||
+ auto& [g_i, l_d, subtree_size] =
|
||||
sizing_subtree.SubtreeRootData();
|
||||
+ auto& grid_items = g_i;
|
||||
+ auto& layout_data = l_d;
|
||||
|
||||
const bool is_for_columns = track_direction == kForColumns;
|
||||
const bool has_non_definite_track =
|
||||
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
@@ -1393,7 +1393,8 @@ void ServiceWorkerContextWrapper::MaybeP
|
||||
return;
|
||||
}
|
||||
|
||||
- auto [document_url, key, callback] = std::move(*request);
|
||||
+ auto [d_u, key, callback] = std::move(*request);
|
||||
+ auto document_url = std::move(d_u);
|
||||
|
||||
DCHECK(document_url.is_valid());
|
||||
TRACE_EVENT1("ServiceWorker",
|
@ -0,0 +1,19 @@
|
||||
diff --git a/chrome/browser/first_run/first_run_internal_linux.cc b/chrome/browser/first_run/first_run_internal_linux.cc
|
||||
index 33fd57901..989069437 100644
|
||||
--- a/chrome/browser/first_run/first_run_internal_linux.cc
|
||||
+++ b/chrome/browser/first_run/first_run_internal_linux.cc
|
||||
@@ -20,12 +20,9 @@ bool IsOrganicFirstRun() {
|
||||
|
||||
base::FilePath InitialPrefsPath() {
|
||||
// The standard location of the initial prefs is next to the chrome binary.
|
||||
+ // ...but we patch it to use /etc/chromium
|
||||
base::FilePath dir_exe;
|
||||
- if (!base::PathService::Get(base::DIR_EXE, &dir_exe)) {
|
||||
- return base::FilePath();
|
||||
- }
|
||||
-
|
||||
- return installer::InitialPreferences::Path(dir_exe);
|
||||
+ dir_exe = base::FilePath("/etc/chromium");
|
||||
}
|
||||
|
||||
} // namespace internal
|
@ -0,0 +1,20 @@
|
||||
diff -up chromium-70.0.3538.67/sandbox/linux/BUILD.gn.sandboxpie chromium-70.0.3538.67/sandbox/linux/BUILD.gn
|
||||
--- chromium-70.0.3538.67/sandbox/linux/BUILD.gn.sandboxpie 2018-10-18 12:14:05.766939769 -0400
|
||||
+++ chromium-70.0.3538.67/sandbox/linux/BUILD.gn 2018-10-18 12:16:37.820027182 -0400
|
||||
@@ -315,10 +315,16 @@ if (is_linux) {
|
||||
# For ULLONG_MAX
|
||||
"-std=gnu99",
|
||||
|
||||
+ "-fPIE",
|
||||
+
|
||||
# These files have a suspicious comparison.
|
||||
# TODO fix this and re-enable this warning.
|
||||
"-Wno-sign-compare",
|
||||
]
|
||||
+
|
||||
+ ldflags = [
|
||||
+ "-pie",
|
||||
+ ]
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
diff -up chromium-77.0.3865.75/third_party/zlib/zconf.h.nozmangle chromium-77.0.3865.75/third_party/zlib/zconf.h
|
||||
--- chromium-77.0.3865.75/third_party/zlib/zconf.h.nozmangle 2019-09-12 09:36:37.924086850 +0200
|
||||
+++ chromium-77.0.3865.75/third_party/zlib/zconf.h 2019-09-12 09:53:01.623958551 +0200
|
||||
@@ -9,18 +9,6 @@
|
||||
#define ZCONF_H
|
||||
|
||||
/*
|
||||
- * This library is also built as a part of AOSP, which does not need to include
|
||||
- * chromeconf.h. This config does not want chromeconf.h, so it can set this
|
||||
- * macro to opt out. While this works today, there's no guarantee that building
|
||||
- * zlib outside of Chromium keeps working in the future.
|
||||
- */
|
||||
-#if !defined(CHROMIUM_ZLIB_NO_CHROMECONF)
|
||||
-/* This include does prefixing as below, but with an updated set of names. Also
|
||||
- * sets up export macros in component builds. */
|
||||
-#include "chromeconf.h"
|
||||
-#endif
|
||||
-
|
||||
-/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
* Even better than compiling with -DZ_PREFIX would be to use configure to set
|
@ -0,0 +1,12 @@
|
||||
diff -up chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn.unbundle-zlib chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn
|
||||
--- chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn.unbundle-zlib 2020-04-13 12:25:09.001172601 -0400
|
||||
+++ chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn 2020-04-13 12:25:23.688921586 -0400
|
||||
@@ -294,7 +294,7 @@ if (enable_perfetto_zlib) {
|
||||
public_configs = [ "//buildtools:zlib_config" ]
|
||||
public_deps = [ "//buildtools:zlib" ]
|
||||
} else {
|
||||
- public_configs = [ "//third_party/zlib:zlib_config" ]
|
||||
+ public_configs = [ "//third_party/zlib:system_zlib" ]
|
||||
public_deps = [ "//third_party/zlib" ]
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
diff -up chromium-85.0.4183.83/ui/gfx/linux/drm_util_linux.cc.el7-old-libdrm chromium-85.0.4183.83/ui/gfx/linux/drm_util_linux.cc
|
||||
--- chromium-85.0.4183.83/ui/gfx/linux/drm_util_linux.cc.el7-old-libdrm 2020-08-31 09:38:46.043993882 -0400
|
||||
+++ chromium-85.0.4183.83/ui/gfx/linux/drm_util_linux.cc 2020-08-31 09:39:21.599906318 -0400
|
||||
@@ -6,6 +6,11 @@
|
||||
|
||||
#include <drm_fourcc.h>
|
||||
|
||||
+// the libdrm in EL-7 is too old to have this define
|
||||
+#ifndef DRM_FORMAT_P010
|
||||
+#define DRM_FORMAT_P010 DRM_FORMAT_INVALID
|
||||
+#endif
|
||||
+
|
||||
#include "base/notreached.h"
|
||||
|
||||
namespace ui {
|
@ -0,0 +1,13 @@
|
||||
diff -up chromium-91.0.4472.77/third_party/closure_compiler/compiler.py.java-allowed chromium-91.0.4472.77/third_party/closure_compiler/compiler.py
|
||||
--- chromium-91.0.4472.77/third_party/closure_compiler/compiler.py.java-allowed 2021-06-02 17:14:48.445064647 +0000
|
||||
+++ chromium-91.0.4472.77/third_party/closure_compiler/compiler.py 2021-06-02 17:15:12.994836949 +0000
|
||||
@@ -13,8 +13,7 @@ import subprocess
|
||||
|
||||
|
||||
_CURRENT_DIR = os.path.join(os.path.dirname(__file__))
|
||||
-_JAVA_PATH = os.path.join(_CURRENT_DIR, "..", "jdk", "current", "bin", "java")
|
||||
-assert os.path.isfile(_JAVA_PATH), "java only allowed in android builds"
|
||||
+_JAVA_PATH = "java"
|
||||
|
||||
class Compiler(object):
|
||||
"""Runs the Closure compiler on given source files to typecheck them
|
@ -0,0 +1,12 @@
|
||||
diff -up chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py.py3 chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py
|
||||
--- chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py.py3 2021-08-31 21:40:34.000000000 -0400
|
||||
+++ chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py 2021-09-02 08:26:04.415846917 -0400
|
||||
@@ -130,7 +130,7 @@ def main(argv):
|
||||
if not options.debug:
|
||||
gn_gen_args += ' is_debug=false'
|
||||
subprocess.check_call([
|
||||
- gn_path, 'gen', out_dir,
|
||||
+ gn_path, 'gen', out_dir, ' --script-executable=/usr/bin/python3',
|
||||
'--args=%s' % gn_gen_args, "--root=" + SRC_ROOT
|
||||
])
|
||||
|
@ -0,0 +1,35 @@
|
||||
diff -up chromium-96.0.4664.45/third_party/webrtc/common_video/h264/pps_parser.h.missing-cstdint chromium-96.0.4664.45/third_party/webrtc/common_video/h264/pps_parser.h
|
||||
diff -up chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h.missing-cstdint chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h
|
||||
--- chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h.missing-cstdint 2021-11-19 17:05:31.379750350 -0500
|
||||
+++ chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h 2021-11-19 17:07:35.191520127 -0500
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef COMMON_VIDEO_H264_SPS_PARSER_H_
|
||||
#define COMMON_VIDEO_H264_SPS_PARSER_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include "absl/types/optional.h"
|
||||
#include "rtc_base/bitstream_reader.h"
|
||||
|
||||
diff -up chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h.missing-cstdint chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h
|
||||
--- chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h.missing-cstdint 2021-11-12 05:28:10.000000000 -0500
|
||||
+++ chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h 2021-11-19 17:05:31.379750350 -0500
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
|
||||
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
diff -up chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h.missing-cstdint chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h
|
||||
--- chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h.missing-cstdint 2021-11-12 05:25:24.000000000 -0500
|
||||
+++ chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h 2021-11-19 17:05:31.379750350 -0500
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
#include "ui/gfx/buffer_types.h"
|
||||
|
||||
+#include <cstdint>
|
||||
+
|
||||
namespace ui {
|
||||
|
||||
int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format);
|
@ -0,0 +1,24 @@
|
||||
diff -up chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc.missing-cstring chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc
|
||||
--- chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc.missing-cstring 2021-11-12 05:28:09.000000000 -0500
|
||||
+++ chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc 2021-11-19 17:10:02.927438695 -0500
|
||||
@@ -8,6 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
+#include <cstring>
|
||||
+
|
||||
#include "audio/utility/channel_mixer.h"
|
||||
|
||||
#include "audio/utility/channel_mixing_matrix.h"
|
||||
diff -up chromium-96.0.4664.45/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc.missing-cstring chromium-96.0.4664.45/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
|
||||
diff -up chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-cstring chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc
|
||||
--- chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-cstring 2021-11-12 05:28:10.000000000 -0500
|
||||
+++ chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc 2021-11-19 17:10:02.928438701 -0500
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "modules/video_coding/utility/ivf_file_reader.h"
|
||||
|
||||
+#include <cstring>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -0,0 +1,20 @@
|
||||
diff -up chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc.erase-fix chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc
|
||||
--- chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc.erase-fix 2022-02-03 19:16:57.784979831 +0000
|
||||
+++ chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc 2022-02-03 19:17:12.983633352 +0000
|
||||
@@ -19,14 +19,14 @@ namespace {
|
||||
// Remove any custom editor "prefixes" from the property name. The prefixes must
|
||||
// not be valid identifier characters.
|
||||
void StripPrefix(std::string& property_name) {
|
||||
- auto cur = property_name.cbegin();
|
||||
+ auto cur = property_name.begin();
|
||||
for (; cur < property_name.cend(); ++cur) {
|
||||
if ((*cur >= 'A' && *cur <= 'Z') || (*cur >= 'a' && *cur <= 'z') ||
|
||||
*cur == '_') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
- property_name.erase(property_name.cbegin(), cur);
|
||||
+ property_name.erase(property_name.begin(), cur);
|
||||
}
|
||||
|
||||
} // namespace
|
@ -0,0 +1,26 @@
|
||||
diff -up chromium-99.0.4844.51/base/allocator/partition_allocator/starscan/metadata_allocator.h.el7-extra-operator-equalequal chromium-99.0.4844.51/base/allocator/partition_allocator/starscan/metadata_allocator.h
|
||||
--- chromium-99.0.4844.51/base/allocator/partition_allocator/starscan/metadata_allocator.h.el7-extra-operator-equalequal 2022-03-05 18:37:25.979241754 -0500
|
||||
+++ chromium-99.0.4844.51/base/allocator/partition_allocator/starscan/metadata_allocator.h 2022-03-05 18:37:25.979241754 -0500
|
||||
@@ -39,6 +39,11 @@ class MetadataAllocator {
|
||||
}
|
||||
|
||||
template <typename U>
|
||||
+ bool operator==(const MetadataAllocator<U>&) const {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ template <typename U>
|
||||
bool operator!=(const MetadataAllocator<U>& o) {
|
||||
return !operator==(o);
|
||||
}
|
||||
diff -up chromium-99.0.4844.51/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h.el7-extra-operator-equalequal chromium-99.0.4844.51/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h
|
||||
--- chromium-99.0.4844.51/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h.el7-extra-operator-equalequal 2022-03-06 19:14:20.892513442 -0500
|
||||
+++ chromium-99.0.4844.51/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h 2022-03-06 19:15:40.412060574 -0500
|
||||
@@ -70,6 +70,7 @@ struct FxPartitionAllocAllocator {
|
||||
}
|
||||
|
||||
// There's no state, so they are all the same,
|
||||
+ bool operator==(const FxPartitionAllocAllocator&) const { return true; }
|
||||
bool operator==(const FxPartitionAllocAllocator& that) { return true; }
|
||||
bool operator!=(const FxPartitionAllocAllocator& that) { return false; }
|
||||
};
|
@ -0,0 +1,142 @@
|
||||
diff -up chromium-99.0.4844.51/printing/backend/cups_helper.cc.el7cups chromium-99.0.4844.51/printing/backend/cups_helper.cc
|
||||
--- chromium-99.0.4844.51/printing/backend/cups_helper.cc.el7cups 2022-02-28 19:05:55.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/printing/backend/cups_helper.cc 2022-03-05 15:17:45.516887985 -0500
|
||||
@@ -34,18 +34,6 @@ namespace printing {
|
||||
// This section contains helper code for PPD parsing for semantic capabilities.
|
||||
namespace {
|
||||
|
||||
-// Function availability can be tested by checking whether its address is not
|
||||
-// nullptr. Weak symbols remove the need for platform specific build flags and
|
||||
-// allow for appropriate CUPS usage on platforms with non-uniform version
|
||||
-// support, namely Linux.
|
||||
-#define WEAK_CUPS_FN(x) extern "C" __attribute__((weak)) decltype(x) x
|
||||
-
|
||||
-WEAK_CUPS_FN(httpConnect2);
|
||||
-
|
||||
-// Timeout for establishing a CUPS connection. It is expected that cupsd is
|
||||
-// able to start and respond on all systems within this duration.
|
||||
-constexpr base::TimeDelta kCupsTimeout = base::Seconds(5);
|
||||
-
|
||||
// CUPS default max copies value (parsed from kCupsMaxCopies PPD attribute).
|
||||
constexpr int32_t kDefaultMaxCopies = 9999;
|
||||
constexpr char kCupsMaxCopies[] = "cupsMaxCopies";
|
||||
@@ -527,8 +515,7 @@ const int kDefaultIPPServerPort = 631;
|
||||
// Helper wrapper around http_t structure, with connection and cleanup
|
||||
// functionality.
|
||||
HttpConnectionCUPS::HttpConnectionCUPS(const GURL& print_server_url,
|
||||
- http_encryption_t encryption,
|
||||
- bool blocking)
|
||||
+ http_encryption_t encryption)
|
||||
: http_(nullptr) {
|
||||
// If we have an empty url, use default print server.
|
||||
if (print_server_url.is_empty())
|
||||
@@ -538,17 +525,10 @@ HttpConnectionCUPS::HttpConnectionCUPS(c
|
||||
if (port == url::PORT_UNSPECIFIED)
|
||||
port = kDefaultIPPServerPort;
|
||||
|
||||
- if (httpConnect2) {
|
||||
- http_ = httpConnect2(print_server_url.host().c_str(), port,
|
||||
- /*addrlist=*/nullptr, AF_UNSPEC, encryption,
|
||||
- blocking ? 1 : 0, kCupsTimeout.InMilliseconds(),
|
||||
- /*cancel=*/nullptr);
|
||||
- } else {
|
||||
- // Continue to use deprecated CUPS calls because because older Linux
|
||||
- // distribution such as RHEL/CentOS 7 are shipped with CUPS 1.6.
|
||||
- http_ =
|
||||
- httpConnectEncrypt(print_server_url.host().c_str(), port, encryption);
|
||||
- }
|
||||
+ // Continue to use deprecated CUPS calls because because older Linux
|
||||
+ // distribution such as RHEL/CentOS 7 are shipped with CUPS 1.6.
|
||||
+ http_ =
|
||||
+ httpConnectEncrypt(print_server_url.host().c_str(), port, encryption);
|
||||
|
||||
if (!http_) {
|
||||
LOG(ERROR) << "CP_CUPS: Failed connecting to print server: "
|
||||
@@ -556,8 +536,6 @@ HttpConnectionCUPS::HttpConnectionCUPS(c
|
||||
return;
|
||||
}
|
||||
|
||||
- if (!httpConnect2)
|
||||
- httpBlocking(http_, blocking ? 1 : 0);
|
||||
}
|
||||
|
||||
HttpConnectionCUPS::~HttpConnectionCUPS() {
|
||||
@@ -565,6 +543,10 @@ HttpConnectionCUPS::~HttpConnectionCUPS(
|
||||
httpClose(http_);
|
||||
}
|
||||
|
||||
+void HttpConnectionCUPS::SetBlocking(bool blocking) {
|
||||
+ httpBlocking(http_, blocking ? 1 : 0);
|
||||
+}
|
||||
+
|
||||
http_t* HttpConnectionCUPS::http() {
|
||||
return http_;
|
||||
}
|
||||
diff -up chromium-99.0.4844.51/printing/backend/cups_helper.h.el7cups chromium-99.0.4844.51/printing/backend/cups_helper.h
|
||||
--- chromium-99.0.4844.51/printing/backend/cups_helper.h.el7cups 2022-02-28 19:05:55.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/printing/backend/cups_helper.h 2022-03-05 15:17:45.517887991 -0500
|
||||
@@ -34,10 +34,11 @@ constexpr cups_ptype_t kDestinationsFilt
|
||||
class COMPONENT_EXPORT(PRINT_BACKEND) HttpConnectionCUPS {
|
||||
public:
|
||||
HttpConnectionCUPS(const GURL& print_server_url,
|
||||
- http_encryption_t encryption,
|
||||
- bool blocking);
|
||||
+ http_encryption_t encryption);
|
||||
~HttpConnectionCUPS();
|
||||
|
||||
+ void SetBlocking(bool blocking);
|
||||
+
|
||||
http_t* http();
|
||||
|
||||
private:
|
||||
diff -up chromium-99.0.4844.51/printing/backend/print_backend_cups.cc.el7cups chromium-99.0.4844.51/printing/backend/print_backend_cups.cc
|
||||
--- chromium-99.0.4844.51/printing/backend/print_backend_cups.cc.el7cups 2022-02-28 19:05:55.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/printing/backend/print_backend_cups.cc 2022-03-05 15:17:45.517887991 -0500
|
||||
@@ -146,7 +146,7 @@ mojom::ResultCode PrintBackendCUPS::Enum
|
||||
// not showing as available. Using cupsEnumDests() allows us to do our own
|
||||
// filtering should any duplicates occur.
|
||||
CupsDestsData dests_data = {0, nullptr};
|
||||
- ipp_status_t last_error = IPP_STATUS_OK;
|
||||
+ ipp_status_t last_error = IPP_OK;
|
||||
if (print_server_url_.is_empty()) {
|
||||
VLOG(1) << "CUPS: using cupsEnumDests to enumerate printers";
|
||||
if (!cupsEnumDests(CUPS_DEST_FLAGS_NONE, kCupsTimeoutMs,
|
||||
@@ -173,7 +173,7 @@ mojom::ResultCode PrintBackendCUPS::Enum
|
||||
// no printer drivers installed. Rely upon CUPS error code to distinguish
|
||||
// between these.
|
||||
DCHECK(!dests_data.dests);
|
||||
- if (last_error != IPP_STATUS_ERROR_NOT_FOUND) {
|
||||
+ if (last_error != IPP_NOT_FOUND) {
|
||||
VLOG(1) << "CUPS: Error getting printers from CUPS server"
|
||||
<< ", server: " << print_server_url_
|
||||
<< ", error: " << static_cast<int>(last_error) << " - "
|
||||
@@ -336,7 +336,8 @@ int PrintBackendCUPS::GetDests(cups_dest
|
||||
if (print_server_url_.is_empty())
|
||||
return cupsGetDests2(CUPS_HTTP_DEFAULT, dests);
|
||||
|
||||
- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_);
|
||||
+ HttpConnectionCUPS http(print_server_url_, cups_encryption_);
|
||||
+ http.SetBlocking(blocking_);
|
||||
|
||||
// This call must be made in the same scope as `http` because its destructor
|
||||
// closes the connection.
|
||||
@@ -362,7 +363,8 @@ base::FilePath PrintBackendCUPS::GetPPD(
|
||||
// connection will timeout after 10 seconds of no data period. And it will
|
||||
// return the same way as if data was completely and successfully
|
||||
// downloaded.
|
||||
- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_);
|
||||
+ HttpConnectionCUPS http(print_server_url_, cups_encryption_);
|
||||
+ http.SetBlocking(blocking_);
|
||||
ppd_file_path = cupsGetPPD2(http.http(), name);
|
||||
// Check if the get full PPD, since non-blocking call may simply return
|
||||
// normally after timeout expired.
|
||||
@@ -398,7 +400,8 @@ PrintBackendCUPS::ScopedDestination Prin
|
||||
// Use default (local) print server.
|
||||
dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, printer_name.c_str(), nullptr);
|
||||
} else {
|
||||
- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_);
|
||||
+ HttpConnectionCUPS http(print_server_url_, cups_encryption_);
|
||||
+ http.SetBlocking(blocking_);
|
||||
dest = cupsGetNamedDest(http.http(), printer_name.c_str(), nullptr);
|
||||
}
|
||||
return ScopedDestination(dest);
|
@ -0,0 +1,4 @@
|
||||
# system wide chromium flags
|
||||
CHROMIUM_FLAGS=""
|
||||
CHROMIUM_FLAGS+=" --disable-features=AudioServiceSandbox,Vulkan"
|
||||
CHROMIUM_FLAGS+=" --enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiVideoDecodeLinuxGL"
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue