Compare commits

..

No commits in common. "rawhide" and "f35" have entirely different histories.

400 changed files with 34578 additions and 156738 deletions

15
.gitignore vendored
View file

@ -28,18 +28,3 @@
/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
/linux-ppc64-0.19.2.tgz
/node-v22.14.0-linux-arm64.tar.xz
/node-v22.14.0-linux-ppc64le.tar.xz
/node-v22.14.0-linux-x64.tar.xz
/node-v22.14.0-stripped.tar.gz

File diff suppressed because it is too large Load diff

View file

@ -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-144.0.7559.59/third_party/libaom/BUILD.gn
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libaom/BUILD.gn
+++ chromium-144.0.7559.59/third_party/libaom/BUILD.gn
@@ -299,6 +299,18 @@ if (current_cpu == "arm64" || current_cp
}
}
+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) {
@@ -368,6 +380,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-144.0.7559.59/third_party/libaom/cmake_update.sh
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libaom/cmake_update.sh
+++ chromium-144.0.7559.59/third_party/libaom/cmake_update.sh
@@ -167,6 +167,9 @@ egrep \
"#define [A-Z0-9_]+[[:space:]]+[01]" "${CFG}/win/ia32/config/aom_config.h" \
| awk '{print "%define " $2 " " $3}' > "${CFG}/win/ia32/config/aom_config.asm"
+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/x64
cp "${CFG}/linux/x64/config"/* "${CFG}/win/x64/config/"

File diff suppressed because it is too large Load diff

View file

@ -1,13 +0,0 @@
Index: chromium-144.0.7559.59/v8/gni/v8.gni
===================================================================
--- chromium-144.0.7559.59.orig/v8/gni/v8.gni
+++ chromium-144.0.7559.59/v8/gni/v8.gni
@@ -317,7 +317,7 @@ assert(
if (v8_enable_pointer_compression == "") {
v8_enable_pointer_compression =
v8_current_cpu == "arm64" || v8_current_cpu == "x64" ||
- v8_current_cpu == "loong64"
+ v8_current_cpu == "loong64" || v8_current_cpu == "ppc64"
}
# The Wasm interpreter is currently supported only on arm64 and x64, on

View file

@ -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-144.0.7559.59/v8/BUILD.gn
===================================================================
--- chromium-144.0.7559.59.orig/v8/BUILD.gn
+++ chromium-144.0.7559.59/v8/BUILD.gn
@@ -1596,7 +1596,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

View file

@ -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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
+++ chromium-144.0.7559.59/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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
+++ chromium-144.0.7559.59/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 = &regs;
@@ -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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
+++ chromium-144.0.7559.59/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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
+++ chromium-144.0.7559.59/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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
+++ chromium-144.0.7559.59/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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
@@ -466,6 +466,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) {
@@ -704,10 +711,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.
@@ -728,6 +743,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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
@@ -197,7 +197,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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
@@ -325,7 +325,7 @@ TEST(ExceptionHandlerTest, ParallelChild
ASSERT_EQ(SIGSEGV, WTERMSIG(status));
return;
} else {
- usleep(100000);
+ usleep(200000);
}
}
@@ -581,6 +581,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
@@ -776,10 +778,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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
@@ -143,7 +143,9 @@ class MicrodumpWriter {
const MicrodumpExtraInfo& microdump_extra_info,
LinuxDumper* dumper)
: ucontext_(context ? &context->context : nullptr),
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
+#if defined(__powerpc64__)
+ vector_state_(context ? &context->vector_state : nullptr),
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
float_state_(context ? &context->float_state : nullptr),
#endif
dumper_(dumper),
@@ -350,6 +352,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
@@ -422,7 +426,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_);
@@ -618,7 +624,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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
@@ -281,10 +281,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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
+++ chromium-144.0.7559.59/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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
@@ -789,7 +789,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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
+++ chromium-144.0.7559.59/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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
@@ -57,6 +57,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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
+++ chromium-144.0.7559.59/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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
@@ -469,6 +469,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
@@ -568,6 +571,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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
@@ -145,7 +145,9 @@ class MinidumpWriter {
: fd_(minidump_fd),
path_(minidump_path),
ucontext_(context ? &context->context : nullptr),
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
+#if defined(__powerpc64__)
+ vector_state_(context ? &context->vector_state : nullptr),
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
float_state_(context ? &context->float_state : nullptr),
#endif
dumper_(dumper),
@@ -477,7 +479,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_);
@@ -954,7 +958,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";
@@ -974,7 +978,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
@@ -1441,7 +1447,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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
+++ chromium-144.0.7559.59/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-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
+++ chromium-144.0.7559.59/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-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
+++ chromium-144.0.7559.59/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-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
@@ -178,9 +178,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-144.0.7559.59/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
@@ -64,8 +64,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 == nullptr);
- 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 == nullptr);
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
+++ chromium-144.0.7559.59/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;
@@ -325,6 +329,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;
@@ -628,6 +635,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
@@ -733,6 +772,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

View file

@ -1,46 +0,0 @@
From e93d9b5fdcd8e5744de629461c03a07de2252f8f Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Fri, 17 Apr 2020 12:59:44 +0200
Subject: [PATCH] Remove unused OpenSSL config
The build process will try to create these config files, even when
using the system OpenSSL and will thus fail since we strip this path
from the tarball.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
Signed-off-by: rpm-build <rpm-build>
---
node.gyp | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/node.gyp b/node.gyp
index 1147495..da6ea50 100644
--- a/node.gyp
+++ b/node.gyp
@@ -822,23 +822,6 @@
],
},
],
- }, {
- 'variables': {
- 'opensslconfig_internal': '<(obj_dir)/deps/openssl/openssl.cnf',
- 'opensslconfig': './deps/openssl/nodejs-openssl.cnf',
- },
- 'actions': [
- {
- 'action_name': 'reset_openssl_cnf',
- 'inputs': [ '<(opensslconfig)', ],
- 'outputs': [ '<(opensslconfig_internal)', ],
- 'action': [
- '<(python)', 'tools/copyfile.py',
- '<(opensslconfig)',
- '<(opensslconfig_internal)',
- ],
- },
- ],
}],
],
}, # node_core_target_name
--
2.47.0

View file

@ -1,35 +0,0 @@
Index: chromium-144.0.7559.59/third_party/xnnpack/generate_build_gn.py
===================================================================
--- chromium-144.0.7559.59.orig/third_party/xnnpack/generate_build_gn.py
+++ chromium-144.0.7559.59/third_party/xnnpack/generate_build_gn.py
@@ -239,7 +239,10 @@ _PLATFORMS = [
bazel_platform='//:linux_aarch64'),
_Platform(gn_cpu='riscv64',
bazel_cpu='riscv64',
- bazel_platform='//:linux_riscv64')
+ bazel_platform='//:linux_riscv64'),
+ _Platform(gn_cpu='ppc64',
+ bazel_cpu='ppc64le',
+ bazel_platform='//:linux_ppc64le')
]
Index: chromium-144.0.7559.59/third_party/xnnpack/bazelroot/BUILD
===================================================================
--- chromium-144.0.7559.59.orig/third_party/xnnpack/bazelroot/BUILD
+++ chromium-144.0.7559.59/third_party/xnnpack/bazelroot/BUILD
@@ -29,6 +29,14 @@ platform(
],
)
+platform(
+ name = "linux_ppc64le",
+ constraint_values = [
+ "@platforms//os:linux",
+ "@platforms//cpu:ppc64le",
+ ],
+)
+
# A dummy clang toolchain for building them for any arch.
filegroup(name = "empty")

File diff suppressed because it is too large Load diff

View file

@ -1,20 +0,0 @@
Description: fix swiftshader build issue on ppc64el
Origin: vendor, https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/blob/chromium-131/patches/ppc64le/third_party/0001-swiftshader-fix-build.patch
Bug: https://buildd.debian.org/status/fetch.php?pkg=chromium&arch=ppc64el&ver=131.0.6778.204-1&stamp=1734633529&raw=0
Last-Update: 2024-12-20
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: chromium-144.0.7559.59/third_party/swiftshader/third_party/llvm-16.0/BUILD.gn
===================================================================
--- chromium-144.0.7559.59.orig/third_party/swiftshader/third_party/llvm-16.0/BUILD.gn
+++ chromium-144.0.7559.59/third_party/swiftshader/third_party/llvm-16.0/BUILD.gn
@@ -1599,6 +1599,9 @@ swiftshader_llvm_source_set("swiftshader
"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",
+ "llvm/lib/MC/MCInstrInfo.cpp",
]
}

View file

@ -1,12 +0,0 @@
Index: chromium-144.0.7559.59/third_party/angle/src/libANGLE/Constants.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/angle/src/libANGLE/Constants.h
+++ chromium-144.0.7559.59/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>

View file

@ -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-144.0.7559.59/third_party/libvpx/BUILD.gn
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libvpx/BUILD.gn
+++ chromium-144.0.7559.59/third_party/libvpx/BUILD.gn
@@ -297,6 +297,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
}
}
}

View file

@ -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-144.0.7559.59/third_party/pffft/src/pffft.c
===================================================================
--- chromium-144.0.7559.59.orig/third_party/pffft/src/pffft.c
+++ chromium-144.0.7559.59/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

View file

@ -1,18 +0,0 @@
Index: chromium-144.0.7559.59/v8/src/base/immediate-crash.h
===================================================================
--- chromium-144.0.7559.59.orig/v8/src/base/immediate-crash.h
+++ chromium-144.0.7559.59/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

View file

@ -1,36 +0,0 @@
# crypto: fix missing OPENSSL_NO_ENGINE guard
# PR-URL: https://github.com/nodejs/node/pull/57012
# Reviewed-By: Richard Lau <rlau@redhat.com>
# Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
# Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
# Reviewed-By: James M Snell <jasnell@gmail.com>
diff --git a/src/crypto/crypto_context.cc b/src/crypto/crypto_context.cc
index abcdef1..2345678 100644
--- a/src/crypto/crypto_context.cc
+++ b/src/crypto/crypto_context.cc
@@ -34,7 +34,9 @@ using ncrypto::BIOPointer;
using ncrypto::ClearErrorOnReturn;
using ncrypto::CryptoErrorList;
using ncrypto::DHPointer;
+#ifndef OPENSSL_NO_ENGINE
using ncrypto::EnginePointer;
+#endif // !OPENSSL_NO_ENGINE
using ncrypto::EVPKeyPointer;
using ncrypto::MarkPopErrorOnReturn;
using ncrypto::SSLPointer;
diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc
index 1234567..abcdef0 100644
--- a/src/crypto/crypto_util.cc
+++ b/src/crypto/crypto_util.cc
@@ -30,7 +30,9 @@
using ncrypto::BIOPointer;
using ncrypto::CryptoErrorList;
+#ifndef OPENSSL_NO_ENGINE
using ncrypto::EnginePointer;
+#endif // !OPENSSL_NO_ENGINE
using ncrypto::EVPKeyCtxPointer;
using v8::ArrayBuffer;
using v8::BackingStore;
using v8::BigInt;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,148 +0,0 @@
Index: chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/lss/linux_syscall_support.h
+++ chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
@@ -86,7 +86,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__))
@@ -400,7 +400,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;
@@ -422,6 +422,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;
@@ -538,7 +560,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;
@@ -569,6 +591,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;
@@ -1825,6 +1878,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 definitions */
#elif defined(__s390__)
#ifndef __NR_quotactl
@@ -4826,7 +4901,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
@@ -5216,7 +5291,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

File diff suppressed because it is too large Load diff

View file

@ -1,17 +0,0 @@
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
+++ chromium-144.0.7559.59/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

View file

@ -1,376 +0,0 @@
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
+++ chromium-144.0.7559.59/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-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
+++ chromium-144.0.7559.59/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-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
+++ chromium-144.0.7559.59/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),

View file

@ -0,0 +1,567 @@
From 7ae60470cdb0bea4548a0f5e8271b359f9450c79 Mon Sep 17 00:00:00 2001
From: Jeffrey Kardatzke <jkardatzke@google.com>
Date: Fri, 5 Feb 2021 03:33:58 +0000
Subject: [PATCH] vaapi: Update for libva forwards compatibility
There was a downstream patch applied for protected content for libva.
This patch is now upstreamed, but is not compatible with the downstream
version. This change will allow us to update libva in ChromeOS to an
intermediate version that'll be compatible with both downstream and
upstream. Then we can shift Chrome to the upstream API, and then remove
the downstream compatibility layer from ChromeOS after that and be on
upstream.
BUG=b:174951211
TEST=Chrome builds, protected content plays back
Change-Id: Id06b21daf19a54b340236b354b5f4a828e2362de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2672690
Reviewed-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: J Kardatzke <jkardatzke@chromium.org>
Commit-Queue: J Kardatzke <jkardatzke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#850949}
---
.../h264_vaapi_video_decoder_delegate.cc | 7 +
.../vaapi/h265_vaapi_video_decoder_delegate.h | 7 +
media/gpu/vaapi/va_prot.sigs | 1 -
media/gpu/vaapi/vaapi_utils.h | 7 +
.../gpu/vaapi/vaapi_video_decoder_delegate.cc | 11 +-
.../gpu/vaapi/vaapi_video_decoder_delegate.h | 7 +
media/gpu/vaapi/vaapi_wrapper.cc | 30 +--
media/gpu/vaapi/vaapi_wrapper.h | 7 +
.../va_protected_content.h | 225 ++----------------
tools/metrics/histograms/enums.xml | 2 +-
10 files changed, 75 insertions(+), 229 deletions(-)
diff --git a/media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc b/media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc
index 6e82506082ede..22fa594610540 100644
--- a/media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc
+++ b/media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc
@@ -4,6 +4,13 @@
#include "media/gpu/vaapi/h264_vaapi_video_decoder_delegate.h"
+// TODO(jkardatzke): Remove this once the transition to the new upstream
+// protected content API is complete. This is used to bridge a transition
+// between the libva pull request we used, and what actually landed upstream.
+#ifndef LEGACY_UPSTREAM_PROTECTED_LIBVA
+#define LEGACY_UPSTREAM_PROTECTED_LIBVA
+#endif
+
#include <va/va.h>
#include "base/memory/aligned_memory.h"
diff --git a/media/gpu/vaapi/h265_vaapi_video_decoder_delegate.h b/media/gpu/vaapi/h265_vaapi_video_decoder_delegate.h
index d152c3df8a90a..986c2b530076e 100644
--- a/media/gpu/vaapi/h265_vaapi_video_decoder_delegate.h
+++ b/media/gpu/vaapi/h265_vaapi_video_decoder_delegate.h
@@ -5,6 +5,13 @@
#ifndef MEDIA_GPU_VAAPI_H265_VAAPI_VIDEO_DECODER_DELEGATE_H_
#define MEDIA_GPU_VAAPI_H265_VAAPI_VIDEO_DECODER_DELEGATE_H_
+// TODO(jkardatzke): Remove this once the transition to the new upstream
+// protected content API is complete. This is used to bridge a transition
+// between the libva pull request we used, and what actually landed upstream.
+#ifndef LEGACY_UPSTREAM_PROTECTED_LIBVA
+#define LEGACY_UPSTREAM_PROTECTED_LIBVA
+#endif
+
#include <va/va.h>
#include "base/memory/scoped_refptr.h"
diff --git a/media/gpu/vaapi/va_prot.sigs b/media/gpu/vaapi/va_prot.sigs
index 1ffcd61778d11..dd13dafef1add 100644
--- a/media/gpu/vaapi/va_prot.sigs
+++ b/media/gpu/vaapi/va_prot.sigs
@@ -9,5 +9,4 @@ VAStatus vaCreateProtectedSession(VADisplay dpy, VAConfigID config_id, VAProtect
VAStatus vaDestroyProtectedSession(VADisplay dpy, VAProtectedSessionID protected_session);
VAStatus vaAttachProtectedSession(VADisplay dpy, VAContextID reserved, VAProtectedSessionID protected_session);
VAStatus vaDetachProtectedSession(VADisplay dpy, VAContextID reserved);
-VAStatus vaProtectedSessionHwUpdate(VADisplay dpy, VAProtectedSessionID protected_session, VABufferID buf_id);
VAStatus vaProtectedSessionExecute(VADisplay dpy, VAProtectedSessionID protected_session, VABufferID buf_id);
\ No newline at end of file
diff --git a/media/gpu/vaapi/vaapi_utils.h b/media/gpu/vaapi/vaapi_utils.h
index 9bcee23ce96d1..fd42ad2a148e3 100644
--- a/media/gpu/vaapi/vaapi_utils.h
+++ b/media/gpu/vaapi/vaapi_utils.h
@@ -5,6 +5,13 @@
#ifndef MEDIA_GPU_VAAPI_VAAPI_UTILS_H_
#define MEDIA_GPU_VAAPI_VAAPI_UTILS_H_
+// TODO(jkardatzke): Remove this once the transition to the new upstream
+// protected content API is complete. This is used to bridge a transition
+// between the libva pull request we used, and what actually landed upstream.
+#ifndef LEGACY_UPSTREAM_PROTECTED_LIBVA
+#define LEGACY_UPSTREAM_PROTECTED_LIBVA
+#endif
+
#include <va/va.h>
#include "base/callback_forward.h"
diff --git a/media/gpu/vaapi/vaapi_video_decoder_delegate.cc b/media/gpu/vaapi/vaapi_video_decoder_delegate.cc
index 07b7b3ce03f1b..a0a8ea67bd8c6 100644
--- a/media/gpu/vaapi/vaapi_video_decoder_delegate.cc
+++ b/media/gpu/vaapi/vaapi_video_decoder_delegate.cc
@@ -133,11 +133,13 @@ VaapiVideoDecoderDelegate::SetupDecryptDecode(
DCHECK_EQ(protected_session_state_, ProtectedSessionState::kCreated);
if (encryption_scheme_ == EncryptionScheme::kCenc) {
- crypto_params->encryption_type =
- full_sample ? VA_ENCRYPTION_TYPE_CENC_CTR : VA_ENCRYPTION_TYPE_CTR_128;
+ crypto_params->encryption_type = full_sample
+ ? VA_ENCRYPTION_TYPE_FULLSAMPLE_CTR
+ : VA_ENCRYPTION_TYPE_SUBSAMPLE_CTR;
} else {
- crypto_params->encryption_type =
- full_sample ? VA_ENCRYPTION_TYPE_CENC_CBC : VA_ENCRYPTION_TYPE_CBC;
+ crypto_params->encryption_type = full_sample
+ ? VA_ENCRYPTION_TYPE_FULLSAMPLE_CBC
+ : VA_ENCRYPTION_TYPE_SUBSAMPLE_CBC;
}
// For multi-slice we may already have segment information in here, so
@@ -224,6 +226,7 @@ VaapiVideoDecoderDelegate::SetupDecryptDecode(
memcpy(crypto_params->wrapped_decrypt_blob,
hw_key_data_map_[decrypt_config_->key_id()].data(),
DecryptConfig::kDecryptionKeySize);
+ crypto_params->key_blob_size = DecryptConfig::kDecryptionKeySize;
crypto_params->segment_info = &segments->front();
#else // if BUILDFLAG(IS_CHROMEOS_ASH)
protected_session_state_ = ProtectedSessionState::kFailed;
diff --git a/media/gpu/vaapi/vaapi_video_decoder_delegate.h b/media/gpu/vaapi/vaapi_video_decoder_delegate.h
index 1e222a41c543c..aeb48a75bd2c9 100644
--- a/media/gpu/vaapi/vaapi_video_decoder_delegate.h
+++ b/media/gpu/vaapi/vaapi_video_decoder_delegate.h
@@ -5,6 +5,13 @@
#ifndef MEDIA_GPU_VAAPI_VAAPI_VIDEO_DECODER_DELEGATE_H_
#define MEDIA_GPU_VAAPI_VAAPI_VIDEO_DECODER_DELEGATE_H_
+// TODO(jkardatzke): Remove this once the transition to the new upstream
+// protected content API is complete. This is used to bridge a transition
+// between the libva pull request we used, and what actually landed upstream.
+#ifndef LEGACY_UPSTREAM_PROTECTED_LIBVA
+#define LEGACY_UPSTREAM_PROTECTED_LIBVA
+#endif
+
#include <map>
#include <memory>
#include <string>
diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc
index 696ffaf00d866..cd2ee37998fbd 100644
--- a/media/gpu/vaapi/vaapi_wrapper.cc
+++ b/media/gpu/vaapi/vaapi_wrapper.cc
@@ -133,7 +133,7 @@ enum class VaapiFunctions {
kVADestroyProtectedSession = 26,
kVAAttachProtectedSession = 27,
kVADetachProtectedSession = 28,
- kVAProtectedSessionHwUpdate = 29,
+ kVAProtectedSessionHwUpdate_Deprecated = 29,
kVAProtectedSessionExecute = 30,
// Anything else is captured in this last entry.
kOtherVAFunction = 31,
@@ -176,7 +176,7 @@ constexpr std::array<const char*,
"vaDestroyProtectedSession",
"vaAttachProtectedSession",
"vaDetachProtectedSession",
- "vaProtectedSessionHwUpdate",
+ "vaProtectedSessionHwUpdate (Deprecated)",
"vaProtectedSessionExecute",
"Other VA function"};
@@ -811,7 +811,7 @@ bool GetRequiredAttribs(const base::Lock* va_lock,
#if BUILDFLAG(IS_CHROMEOS_ASH)
if (mode == VaapiWrapper::kDecodeProtected && profile != VAProfileProtected) {
required_attribs->push_back(
- {VAConfigAttribEncryption, VA_ENCRYPTION_TYPE_CTR_128});
+ {VAConfigAttribEncryption, VA_ENCRYPTION_TYPE_SUBSAMPLE_CTR});
required_attribs->push_back(
{VAConfigAttribDecProcessing, VA_DEC_PROCESSING});
}
@@ -1852,13 +1852,14 @@ bool VaapiWrapper::CreateProtectedSession(
// We have to hold the VABuffer outside of the lock because its destructor
// will acquire the lock when it goes out of scope. We also must do this after
// we create the protected session.
- VAProtectedSessionHwUpdateBuffer hw_update_buf;
+ VAProtectedSessionExecuteBuffer hw_update_buf;
std::unique_ptr<ScopedVABuffer> hw_update = CreateVABuffer(
- VAProtectedSessionHwUpdateBufferType, sizeof(hw_update_buf));
+ VAProtectedSessionExecuteBufferType, sizeof(hw_update_buf));
{
base::AutoLock auto_lock(*va_lock_);
constexpr size_t kHwIdentifierMaxSize = 64;
memset(&hw_update_buf, 0, sizeof(hw_update_buf));
+ hw_update_buf.function_id = VA_TEE_EXEC_TEE_FUNCID_HW_UPDATE;
hw_update_buf.input.data_size = hw_config.size();
hw_update_buf.input.data =
static_cast<void*>(const_cast<uint8_t*>(hw_config.data()));
@@ -1868,22 +1869,22 @@ bool VaapiWrapper::CreateProtectedSession(
if (!MapAndCopy_Locked(
hw_update->id(),
{hw_update->type(), hw_update->size(), &hw_update_buf})) {
- LOG(ERROR) << "Failed mapping HwUpdate buf";
+ LOG(ERROR) << "Failed mapping Execute buf";
return false;
}
- VAStatus va_res = vaProtectedSessionHwUpdate(
+ VAStatus va_res = vaProtectedSessionExecute(
va_display_, va_protected_session_id_, hw_update->id());
- VA_SUCCESS_OR_RETURN(va_res, VaapiFunctions::kVAProtectedSessionHwUpdate,
+ VA_SUCCESS_OR_RETURN(va_res, VaapiFunctions::kVAProtectedSessionExecute,
false);
ScopedVABufferMapping mapping(va_lock_, va_display_, hw_update->id());
if (!mapping.IsValid()) {
- LOG(ERROR) << "Failed mapping returned HwUpdate buf";
+ LOG(ERROR) << "Failed mapping returned Execute buf";
return false;
}
auto* hw_update_buf_out =
- reinterpret_cast<VAProtectedSessionHwUpdateBuffer*>(mapping.data());
+ reinterpret_cast<VAProtectedSessionExecuteBuffer*>(mapping.data());
if (!hw_update_buf_out->output.data_size) {
LOG(ERROR) << "Received empty HW identifier";
return false;
@@ -1964,10 +1965,9 @@ bool VaapiWrapper::IsProtectedSessionDead() {
if (va_protected_session_id_ == VA_INVALID_ID)
return false;
- constexpr uint32_t kVaTeeExecGpuFuncIdIsSessionAlive = 0x40000103;
uint8_t alive;
VAProtectedSessionExecuteBuffer tee_exec_buf = {};
- tee_exec_buf.function_id = kVaTeeExecGpuFuncIdIsSessionAlive;
+ tee_exec_buf.function_id = VA_TEE_EXEC_TEE_FUNCID_IS_SESSION_ALIVE;
tee_exec_buf.input.data_size = 0;
tee_exec_buf.input.data = nullptr;
tee_exec_buf.output.data_size = sizeof(alive);
@@ -2518,7 +2518,7 @@ std::unique_ptr<ScopedVABuffer> VaapiWrapper::CreateVABuffer(VABufferType type,
base::AutoLock auto_lock(*va_lock_);
TRACE_EVENT0("media,gpu", "VaapiWrapper::CreateVABufferLocked");
#if BUILDFLAG(IS_CHROMEOS_ASH)
- VAContextID context_id = type == VAProtectedSessionHwUpdateBufferType
+ VAContextID context_id = type == VAProtectedSessionExecuteBufferType
? va_protected_session_id_
: va_context_id_;
#else
@@ -2807,8 +2807,8 @@ bool VaapiWrapper::Initialize(CodecMode mode,
for (auto& attrib : required_attribs) {
if (attrib.type == VAConfigAttribEncryption) {
attrib.value = (encryption_scheme == EncryptionScheme::kCbcs)
- ? VA_ENCRYPTION_TYPE_CBC
- : VA_ENCRYPTION_TYPE_CTR_128;
+ ? VA_ENCRYPTION_TYPE_SUBSAMPLE_CBC
+ : VA_ENCRYPTION_TYPE_SUBSAMPLE_CTR;
}
}
}
diff --git a/media/gpu/vaapi/vaapi_wrapper.h b/media/gpu/vaapi/vaapi_wrapper.h
index 29b6864998240..f58723a0e852e 100644
--- a/media/gpu/vaapi/vaapi_wrapper.h
+++ b/media/gpu/vaapi/vaapi_wrapper.h
@@ -10,6 +10,13 @@
#ifndef MEDIA_GPU_VAAPI_VAAPI_WRAPPER_H_
#define MEDIA_GPU_VAAPI_VAAPI_WRAPPER_H_
+// TODO(jkardatzke): Remove this once the transition to the new upstream
+// protected content API is complete. This is used to bridge a transition
+// between the libva pull request we used, and what actually landed upstream.
+#ifndef LEGACY_UPSTREAM_PROTECTED_LIBVA
+#define LEGACY_UPSTREAM_PROTECTED_LIBVA
+#endif
+
#include <stddef.h>
#include <stdint.h>
#include <va/va.h>
diff --git a/third_party/libva_protected_content/va_protected_content.h b/third_party/libva_protected_content/va_protected_content.h
index dfea3ce94a285..c14a77da41389 100644
--- a/third_party/libva_protected_content/va_protected_content.h
+++ b/third_party/libva_protected_content/va_protected_content.h
@@ -46,6 +46,7 @@ extern "C" {
* @{
*/
+#ifdef LEGACY_UPSTREAM_PROTECTED_LIBVA
/**
*
* A protected content function for processing cipher protected content.
@@ -97,16 +98,19 @@ extern "C" {
/** \brief Encryption parameters buffer for content protection usage */
#define VAEncryptionParameterBufferType ((VABufferType)0x20001)
+#endif // LEGACY_UPSTREAM_PROTECTED_LIBVA
+
/**\brief CENC status paramter, used for vendor content protection only.
* The buffer corresponds to #VACencStatusParameters for va/cp*/
#define VACencStatusParameterBufferType ((VABufferType)0x20002)
+#ifdef LEGACY_UPSTREAM_PROTECTED_LIBVA
/** attribute values for VAConfigAttribEncryption */
#define VA_ENCRYPTION_TYPE_NONE 0x00000000
-#define VA_ENCRYPTION_TYPE_CENC_CBC 0x00000002
-#define VA_ENCRYPTION_TYPE_CENC_CTR 0x00000008
-#define VA_ENCRYPTION_TYPE_CTR_128 0x00000010
-#define VA_ENCRYPTION_TYPE_CBC 0x00000020
+#define VA_ENCRYPTION_TYPE_FULLSAMPLE_CBC 0x00000002
+#define VA_ENCRYPTION_TYPE_FULLSAMPLE_CTR 0x00000008
+#define VA_ENCRYPTION_TYPE_SUBSAMPLE_CTR 0x00000010
+#define VA_ENCRYPTION_TYPE_SUBSAMPLE_CBC 0x00000020
/** attribute values for VAConfigAttribContentProtectionSessionMode */
#define VA_PC_SESSION_MODE_NONE 0x00000000
@@ -132,18 +136,11 @@ extern "C" {
#define VA_PC_SAMPLE_TYPE_FULLSAMPLE 0x00000001
#define VA_PC_SAMPLE_TYPE_SUBSAMPLE 0x00000002
-/** \brief TeeExec Function Codes. */
-typedef enum _VA_TEE_EXEC_FUNCTION_ID {
- VA_TEE_EXEC_TEE_FUNCID_PASS_THROUGH_NONE = 0x0,
-
- // 0x40000000~0x400000FFF reserved for TEE Exec GPU function
- VA_TEE_EXEC_GPU_FUNCID_ENCRYPTION_BLT = 0x40000000,
- VA_TEE_EXEC_GPU_FUNCID_DECRYPTION_BLT = 0x40000001,
+#endif // LEGACY_UPSTREAM_PROTECTED_LIBVA
- // 0x40001000~0x400001FFF reserved for TEE Exec TEE function
- VA_TEE_EXEC_TEE_FUNCID_PASS_THROUGH = 0x40001000,
-
-} VA_TEE_EXEC_FUNCTION_ID;
+/** \brief TeeExec Function Codes. */
+#define VA_TEE_EXEC_TEE_FUNCID_HW_UPDATE 0x40000002
+#define VA_TEE_EXEC_TEE_FUNCID_IS_SESSION_ALIVE 0x40000103
/** \brief values for the encryption return status. */
typedef enum {
@@ -159,6 +156,7 @@ typedef enum {
VA_ENCRYPTION_STATUS_UNSUPPORT
} VAEncryptionStatus;
+#ifdef LEGACY_UPSTREAM_PROTECTED_LIBVA
/** \brief structure for encrypted segment info. */
typedef struct _VAEncryptionSegmentInfo {
/** \brief The offset relative to the start of the bitstream input in
@@ -212,23 +210,12 @@ typedef struct _VAEncryptionParameters {
* encrypted, i.e. the CENC or CBC1 scheme is being used.
*/
uint32_t blocks_stripe_clear;
+ /* Forwards compatibility */
+ uint32_t key_blob_size;
/** \brief Reserved bytes for future use, must be zero */
- uint32_t va_reserved[VA_PADDING_MEDIUM];
+ uint32_t va_reserved[VA_PADDING_MEDIUM - sizeof(uint32_t)];
} VAEncryptionParameters;
-
-/** \brief structure for VA_TEE_EXEC_GPU_FUNCID_ENCRYPTION_BLT */
-typedef struct _VA_PROTECTED_BLT_PARAMS {
- uint8_t* src_resource; // The source resource which contains the clear data.
- uint8_t*
- dst_resource; // The Destination resource. This resource will contain the
- // encrypted data. It should be allocated by the caller.
- uint32_t width; // The width of the surface in Bytes.
- uint32_t height; // The height of the surface in Bytes (pay attention that
- // for NV12 the height(Bytes) = 1.5*height(Pixel)).
- VAEncryptionParameters*
- enc_params; // The encryption parameters as defined by application
- void* reserved_extension; // The reserved extension for future BLT operations
-} VA_PROTECTED_BLT_PARAMS;
+#endif // LEGACY_UPSTREAM_PROTECTED_LIBVA
/** \brief cenc status parameters, corresponding to
* #VACencStatusParameterBufferType*/
@@ -311,184 +298,6 @@ typedef struct _VACencSliceParameterBufferH264 {
uint32_t va_reserved[VA_PADDING_MEDIUM];
} VACencSliceParameterBufferH264;
-/**
- * \brief Slice parameter for HEVC cenc decode in main & main 10 profiles.
- *
- * This structure holds information for \c
- * slice_segment_header() and nal_unit_header() of the slice as
- * defined by the HEVC specification.
- *
- */
-typedef struct _VACencSliceParameterBufferHEVC {
- /** \brief Same as the HEVC bitstream syntax element. */
- uint8_t nal_unit_type;
- /** \brief Corresponds to the HEVC bitstream syntax element.
- * Same as nuh_temporal_id_plus1 - 1*/
- uint8_t nuh_temporal_id;
- /** \brief Slice type.
- * Corresponds to HEVC syntax element of the same name. */
- uint8_t slice_type;
- /** \brief Same as the HEVC bitstream syntax element. */
- uint16_t slice_pic_order_cnt_lsb;
- /** \brief Indicates EOS_NUT or EOB_NUT is detected in picture. */
- uint16_t has_eos_or_eob;
-
- union {
- struct {
- /** \brief Same as the HEVC bitstream syntax element */
- uint32_t no_output_of_prior_pics_flag : 1;
- /** \brief Same as the HEVC bitstream syntax element */
- uint32_t pic_output_flag : 1;
- /** \brief Same as the HEVC bitstream syntax element */
- uint32_t colour_plane_id : 2;
- /** \brief Reserved for future use, must be zero */
- uint32_t reserved : 19;
- } bits;
- uint32_t value;
- } slice_fields;
-
- /** \brief Parameters for driver reference frame set */
- /**@{*/
-
- /** \brief number of entries as current before in short-term rps
- * Corresponds to NumPocStCurrBefore as the HEVC specification. */
- uint8_t num_of_curr_before;
- /** \brief number of entries as current after in short-term rps
- * Corresponds to NumPocStCurrAfter as the HEVC specification. */
- uint8_t num_of_curr_after;
- /** \brief number of entries as current total in short-term rps*/
- uint8_t num_of_curr_total;
- /** \brief number of entries as foll in short-term rps
- * Corresponds to NumPocStFoll as the HEVC specification.*/
- uint8_t num_of_foll_st;
- /** \brief number of entries as current in long-term rps
- * Corresponds to NumPocLtCurr as the HEVC specification. */
- uint8_t num_of_curr_lt;
- /** \brief number of entries as foll in long-term rps
- * Corresponds to NumPocLtFoll as the HEVC specification.*/
- uint8_t num_of_foll_lt;
- /** \brief delta poc as short-term current before
- * Corresponds to PocStCurrBefore as the HEVC specification. */
- int32_t delta_poc_curr_before[8];
- /** \brief delta poc as short-term current after
- * Corresponds to PocStCurrAfter, as the HEVC specification.*/
- int32_t delta_poc_curr_after[8];
- /** \brief delta poc as short-term current total */
- int32_t delta_poc_curr_total[8];
- /** \brief delta poc as short-term foll
- * Corresponds to PocStFoll as the HEVC specification.*/
- int32_t delta_poc_foll_st[16];
- /** \brief delta poc as long-term current
- * Corresponds to PocLtCurr as the HEVC specification.*/
- int32_t delta_poc_curr_lt[8];
- /** \brief delta poc as long-term foll
- * Corresponds to PocLtFoll, as the HEVC specification.*/
- int32_t delta_poc_foll_lt[16];
- /** \brief delta poc msb present flag
- * Same as the HEVC bitstream syntax element. */
- uint8_t delta_poc_msb_present_flag[16];
- /** \brief long-term reference RPS is used for reference by current picture*/
- uint8_t is_lt_curr_total[8];
- /** \brief index of reference picture list. [0] is for P and B slice, [1] is
- * for B slice*/
- uint8_t ref_list_idx[2][16];
- /**@}*/
- /** \brief Pointer to the next #VACencSliceParameterBufferHEVC element,
- * or \c nullptr if there is none.*/
- void* next;
-
- /** \brief Reserved bytes for future use, must be zero */
- uint32_t va_reserved[VA_PADDING_MEDIUM];
-} VACencSliceParameterBufferHEVC;
-
-/**
- * \brief uncompressed header for VP9 cenc decode
- *
- * This structure holds information for \c
- * uncompressed_header() as defined by the VP9 specification.
- *
- */
-typedef struct _VACencSliceParameterBufferVP9 {
- union {
- struct {
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t profile : 2;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t show_existing_frame_flag : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t frame_to_show_map_idx : 3;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t frame_type : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t show_frame : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t error_resilient_mode : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t intra_only : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t ten_or_twelve_bit : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t color_space : 3;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t color_range : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t subsampling_x : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t subsampling_y : 1;
- /** \brief Corresponds to ref_frame_idx[0]
- * as the VP9 specification */
- uint32_t ref_frame_idx0 : 3;
- /** \brief Corresponds to ref_frame_sign_bias[LAST_FRAME]
- * as the VP9 specification */
- uint32_t ref_frame_sign_bias0 : 1;
- /** \brief Corresponds to ref_frame_idx[1]
- * as the VP9 specification */
- uint32_t ref_frame_idx1 : 3;
- /** \brief Corresponds to ref_frame_sign_bias[GOLDEN_FRAME]
- * as the VP9 specification */
- uint32_t ref_frame_sign_bias1 : 1;
- /** \brief Corresponds to ref_frame_idx[2]
- * as the VP9 specification */
- uint32_t ref_frame_idx2 : 3;
- /** \brief Corresponds to ref_frame_sign_bias[ALTREF_FRAME]
- * as the VP9 specification */
- uint32_t ref_frame_sign_bias2 : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t frame_parallel_decoding_mode : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t render_and_frame_size_different : 1;
- /** \brief Reserved for future use, must be zero */
- uint32_t reserved : 1;
- } bits;
- uint32_t value;
- } header_fields;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint16_t frame_width_minus1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint16_t frame_height_minus1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint16_t render_width_minus1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint16_t render_height_minus1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint8_t refresh_frame_flags;
- /** \brief Parameters for super frame*/
- /**@{*/
- /** \brief Superframe index, from 0 to frames_in_superframe_minus_1.
- * as the VP9 specification */
- uint8_t sf_index;
- /** \brief Superframe size, corresponds to frame_sizes[ sf_index ]
- * as the VP9 specification */
- uint32_t sf_frame_size;
- /**@}*/
- /** \brief Pointer to the next #VACencSliceParameterBufferVP9 element,
- * or \c nullptr if there is none.*/
- void* next;
-
- /** \brief Reserved bytes for future use, must be zero */
- uint32_t va_reserved[VA_PADDING_MEDIUM];
-} VACencSliceParameterBufferVP9;
-
/** \brief Cenc Slice Buffer Type*/
typedef enum {
/** \brief Parsed slice parameters \c VACencSliceParameterBuffer* */
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index e88db8a3f1201..c1bd0d7db925f 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -77050,7 +77050,7 @@ Full version information for the fingerprint enum values:
<int value="26" label="vaDestroyProtectedSession()"/>
<int value="27" label="vaAttachProtectedSession()"/>
<int value="28" label="vaDetachProtectedSession()"/>
- <int value="29" label="vaProtectedSessionHwUpdate()"/>
+ <int value="29" label="vaProtectedSessionHwUpdate() (deprecated)"/>
<int value="30" label="kVAProtectedSessionExecute()"/>
<int value="31" label="Other VA functions"/>
</enum>

BIN
GardinerModBug.ttf Normal file

Binary file not shown.

BIN
GardinerModCat.ttf Normal file

Binary file not shown.

View file

@ -1,13 +0,0 @@
Index: chromium-144.0.7559.59/base/compiler_specific.h
===================================================================
--- chromium-144.0.7559.59.orig/base/compiler_specific.h
+++ chromium-144.0.7559.59/base/compiler_specific.h
@@ -198,7 +198,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

View file

@ -1,13 +0,0 @@
Index: chromium-144.0.7559.59/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
===================================================================
--- chromium-144.0.7559.59.orig/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
+++ chromium-144.0.7559.59/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
@@ -139,7 +139,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

View file

@ -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

View file

@ -1,48 +0,0 @@
Index: chromium-144.0.7559.59/third_party/libvpx/generate_gni.sh
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libvpx/generate_gni.sh
+++ chromium-144.0.7559.59/third_party/libvpx/generate_gni.sh
@@ -429,7 +429,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-144.0.7559.59/third_party/libvpx/source/libvpx/build/make/rtcd.pl
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libvpx/source/libvpx/build/make/rtcd.pl
+++ chromium-144.0.7559.59/third_party/libvpx/source/libvpx/build/make/rtcd.pl
@@ -527,8 +527,9 @@ if ($opts{arch} eq 'x86') {
}
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-144.0.7559.59/third_party/libvpx/BUILD.gn
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libvpx/BUILD.gn
+++ chromium-144.0.7559.59/third_party/libvpx/BUILD.gn
@@ -98,6 +98,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.

View file

@ -1,9 +0,0 @@
- Widevine is not a free library and cannot be shipped in fedora.
You have to get it from Google first and install it under
/usr/lib64/chromium-browser or /opt/google/chrome if you want
Chromium to use widevine.
- Chromium uses the system ffmpeg-free library which is included in
fedora >= 36 and centos-stream 9. This library contains free video
codecs. If you want Chromium to use non-free video codecs, you need
to install libavcodec-freeworld from rpmfusion-free.

View file

@ -1,23 +0,0 @@
Index: chromium-144.0.7559.59/third_party/webrtc/rtc_base/system/arch.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/webrtc/rtc_base/system/arch.h
+++ chromium-144.0.7559.59/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

View file

@ -1,13 +0,0 @@
Index: chromium-144.0.7559.59/base/system/sys_info.cc
===================================================================
--- chromium-144.0.7559.59.orig/base/system/sys_info.cc
+++ chromium-144.0.7559.59/base/system/sys_info.cc
@@ -263,6 +263,8 @@ std::string SysInfo::ProcessCPUArchitect
return "ARM";
#elif defined(ARCH_CPU_ARM64)
return "ARM_64";
+#elif defined(ARCH_CPU_PPC64)
+ return "PPC_64";
#elif defined(ARCH_CPU_RISCV64)
return "RISCV_64";
#else

View file

@ -1,37 +0,0 @@
Index: chromium-144.0.7559.59/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
===================================================================
--- chromium-144.0.7559.59.orig/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
+++ chromium-144.0.7559.59/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
@@ -383,6 +383,8 @@ bool ChromeRuntimeAPIDelegate::GetPlatfo
info->arch = extensions::api::runtime::PlatformArch::kMips64;
} else if (arch == "riscv64") {
info->arch = extensions::api::runtime::PlatformArch::kRiscv64;
+ } else if (arch == "ppc64") {
+ info->arch = extensions::api::runtime::PlatformArch::kPpc64;
} else {
NOTREACHED();
}
Index: chromium-144.0.7559.59/extensions/common/api/runtime.json
===================================================================
--- chromium-144.0.7559.59.orig/extensions/common/api/runtime.json
+++ chromium-144.0.7559.59/extensions/common/api/runtime.json
@@ -98,7 +98,8 @@
{"name": "x86-64", "description": "Specifies the processer architecture as x86-64."},
{"name": "mips", "description": "Specifies the processer architecture as mips."},
{"name": "mips64", "description": "Specifies the processer architecture as mips64."},
- {"name": "riscv64", "description": "Specifies the processer architecture as riscv64."}
+ {"name": "riscv64", "description": "Specifies the processer architecture as riscv64."},
+ {"name": "ppc64", "description": "Specifies the processer architecture as ppc64."}
],
"description": "The machine's processor architecture."
},
@@ -111,7 +112,8 @@
{"name": "x86-32", "description": "Specifies the native client architecture as x86-32."},
{"name": "x86-64", "description": "Specifies the native client architecture as x86-64."},
{"name": "mips", "description": "Specifies the native client architecture as mips."},
- {"name": "mips64", "description": "Specifies the native client architecture as mips64."}
+ {"name": "mips64", "description": "Specifies the native client architecture as mips64."},
+ {"name": "ppc64", "description": "Specifies the native client architecture as ppc64."}
]
},
{

View file

@ -1,14 +0,0 @@
Index: chromium-144.0.7559.59/base/process/launch.h
===================================================================
--- chromium-144.0.7559.59.orig/base/process/launch.h
+++ chromium-144.0.7559.59/base/process/launch.h
@@ -58,6 +58,9 @@ enum TerminationStatus : int;
#if defined(ARCH_CPU_ARM64) || defined(ARCH_CPU_LOONGARCH64)
#define PTHREAD_STACK_MIN_CONST \
(__builtin_constant_p(PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN : 131072)
+#elif defined(ARCH_CPU_PPC64)
+#define PTHREAD_STACK_MIN_CONST \
+ (__builtin_constant_p(PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN : 131072)
#else
#define PTHREAD_STACK_MIN_CONST \
(__builtin_constant_p(PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN : 16384)

View file

@ -0,0 +1,14 @@
[Unit]
Description="Chrome Remote Desktop host daemon"
[Service]
User=%i
Environment=HOME=%h
ExecStart=@@CRD_PATH@@/chrome-remote-desktop --start --foreground
ExecStop=@@CRD_PATH@@/chrome-remote-desktop --stop
ExecReload=@@CRD_PATH@@/chrome-remote-desktop --reload
Restart=always
TimeoutStopSec=10
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,92 @@
From d32156fd3773330eca99e9cba5e18db57aaa1a53 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Sat, 19 Feb 2022 10:14:24 +0000
Subject: [PATCH] GCC: make GLImplementationParts constructors constexpr
Fix build error in GCC, as the constexpr operator== requires its
invocations to be also constexpr.
---
ui/gl/gl_implementation.cc | 23 -----------------------
ui/gl/gl_implementation.h | 25 +++++++++++++++++++++++--
2 files changed, 23 insertions(+), 25 deletions(-)
diff --git a/ui/gl/gl_implementation.cc b/ui/gl/gl_implementation.cc
index e4e5456..3e4a47c 100644
--- a/ui/gl/gl_implementation.cc
+++ b/ui/gl/gl_implementation.cc
@@ -26,29 +26,6 @@
namespace gl {
-ANGLEImplementation MakeANGLEImplementation(
- const GLImplementation gl_impl,
- const ANGLEImplementation angle_impl) {
- if (gl_impl == kGLImplementationEGLANGLE) {
- if (angle_impl == ANGLEImplementation::kNone) {
- return ANGLEImplementation::kDefault;
- } else {
- return angle_impl;
- }
- } else {
- return ANGLEImplementation::kNone;
- }
-}
-
-GLImplementationParts::GLImplementationParts(
- const ANGLEImplementation angle_impl)
- : gl(kGLImplementationEGLANGLE),
- angle(MakeANGLEImplementation(kGLImplementationEGLANGLE, angle_impl)) {}
-
-GLImplementationParts::GLImplementationParts(const GLImplementation gl_impl)
- : gl(gl_impl),
- angle(MakeANGLEImplementation(gl_impl, ANGLEImplementation::kDefault)) {}
-
bool GLImplementationParts::IsValid() const {
if (angle == ANGLEImplementation::kNone) {
return (gl != kGLImplementationEGLANGLE);
diff --git a/ui/gl/gl_implementation.h b/ui/gl/gl_implementation.h
index 376ed58..a2513ea 100644
--- a/ui/gl/gl_implementation.h
+++ b/ui/gl/gl_implementation.h
@@ -59,8 +59,14 @@ enum class ANGLEImplementation {
};
struct GL_EXPORT GLImplementationParts {
- explicit GLImplementationParts(const ANGLEImplementation angle_impl);
- explicit GLImplementationParts(const GLImplementation gl_impl);
+ constexpr explicit GLImplementationParts(const ANGLEImplementation angle_impl)
+ : gl(kGLImplementationEGLANGLE),
+ angle(MakeANGLEImplementation(kGLImplementationEGLANGLE, angle_impl)) {}
+
+ constexpr explicit GLImplementationParts(const GLImplementation gl_impl)
+ : gl(gl_impl),
+ angle(MakeANGLEImplementation(gl_impl, ANGLEImplementation::kDefault)) {
+ }
GLImplementation gl = kGLImplementationNone;
ANGLEImplementation angle = ANGLEImplementation::kNone;
@@ -80,6 +86,21 @@ struct GL_EXPORT GLImplementationParts {
bool IsValid() const;
bool IsAllowed(const std::vector<GLImplementationParts>& allowed_impls) const;
std::string ToString() const;
+
+ private:
+ constexpr ANGLEImplementation MakeANGLEImplementation(
+ const GLImplementation gl_impl,
+ const ANGLEImplementation angle_impl) {
+ if (gl_impl == kGLImplementationEGLANGLE) {
+ if (angle_impl == ANGLEImplementation::kNone) {
+ return ANGLEImplementation::kDefault;
+ } else {
+ return angle_impl;
+ }
+ } else {
+ return ANGLEImplementation::kNone;
+ }
+ }
};
struct GL_EXPORT GLWindowSystemBindingInfo {
--
2.34.1

View file

@ -0,0 +1,97 @@
From da6e3f6071fdabeb96c0805626418414b4a4cea8 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Wed, 9 Feb 2022 17:56:21 +0000
Subject: [PATCH] GCC: make base::InMilliseconds(F,RoundedUp) constexpr
media::DecodeTimestamp uses it in several constexpr methods.
---
base/time/time.cc | 24 ------------------------
base/time/time.h | 30 +++++++++++++++++++++++++++---
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/base/time/time.cc b/base/time/time.cc
index 0de273e..e0acda2 100644
--- a/base/time/time.cc
+++ b/base/time/time.cc
@@ -74,30 +74,6 @@ int TimeDelta::InDaysFloored() const {
: std::numeric_limits<int>::max();
}
-double TimeDelta::InMillisecondsF() const {
- if (!is_inf())
- return static_cast<double>(delta_) / Time::kMicrosecondsPerMillisecond;
- return (delta_ < 0) ? -std::numeric_limits<double>::infinity()
- : std::numeric_limits<double>::infinity();
-}
-
-int64_t TimeDelta::InMilliseconds() const {
- if (!is_inf())
- return delta_ / Time::kMicrosecondsPerMillisecond;
- return (delta_ < 0) ? std::numeric_limits<int64_t>::min()
- : std::numeric_limits<int64_t>::max();
-}
-
-int64_t TimeDelta::InMillisecondsRoundedUp() const {
- if (!is_inf()) {
- const int64_t result = delta_ / Time::kMicrosecondsPerMillisecond;
- // Convert |result| from truncating to ceiling.
- return (delta_ > result * Time::kMicrosecondsPerMillisecond) ? (result + 1)
- : result;
- }
- return delta_;
-}
-
double TimeDelta::InMicrosecondsF() const {
if (!is_inf())
return static_cast<double>(delta_);
diff --git a/base/time/time.h b/base/time/time.h
index c027aab..fb1d78d 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -216,9 +216,9 @@ class BASE_EXPORT TimeDelta {
constexpr int InMinutes() const;
constexpr double InSecondsF() const;
constexpr int64_t InSeconds() const;
- double InMillisecondsF() const;
- int64_t InMilliseconds() const;
- int64_t InMillisecondsRoundedUp() const;
+ constexpr double InMillisecondsF() const;
+ constexpr int64_t InMilliseconds() const;
+ constexpr int64_t InMillisecondsRoundedUp() const;
constexpr int64_t InMicroseconds() const { return delta_; }
double InMicrosecondsF() const;
constexpr int64_t InNanoseconds() const;
@@ -889,6 +889,30 @@ constexpr int64_t TimeDelta::InSeconds() const {
return is_inf() ? delta_ : (delta_ / Time::kMicrosecondsPerSecond);
}
+constexpr double TimeDelta::InMillisecondsF() const {
+ if (!is_inf())
+ return static_cast<double>(delta_) / Time::kMicrosecondsPerMillisecond;
+ return (delta_ < 0) ? -std::numeric_limits<double>::infinity()
+ : std::numeric_limits<double>::infinity();
+}
+
+constexpr int64_t TimeDelta::InMilliseconds() const {
+ if (!is_inf())
+ return delta_ / Time::kMicrosecondsPerMillisecond;
+ return (delta_ < 0) ? std::numeric_limits<int64_t>::min()
+ : std::numeric_limits<int64_t>::max();
+}
+
+constexpr int64_t TimeDelta::InMillisecondsRoundedUp() const {
+ if (!is_inf()) {
+ const int64_t result = delta_ / Time::kMicrosecondsPerMillisecond;
+ // Convert |result| from truncating to ceiling.
+ return (delta_ > result * Time::kMicrosecondsPerMillisecond) ? (result + 1)
+ : result;
+ }
+ return delta_;
+}
+
constexpr int64_t TimeDelta::InNanoseconds() const {
return base::ClampMul(delta_, Time::kNanosecondsPerMicrosecond);
}
--
2.34.1

View file

@ -0,0 +1,35 @@
From 364dc0067d1c20c7a2d21277a7ec0c4419d9bc11 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Wed, 23 Feb 2022 12:18:57 +0100
Subject: [PATCH] GCC: explicitely move return value of SCTHashdanceMetadata::ToValue
GCC rejects to do Return Value Optimization in
SCTHashdanceMetadata::ToValue, because the copy constructor is
deleted, and in that scenario RVO is rejected in GCC:
../../services/network/sct_auditing/sct_auditing_reporter.cc: In member function base::Value network::SCTAuditingReporter::SCTHashdanceMetadata::ToValue() const:
../../services/network/sct_auditing/sct_auditing_reporter.cc:191:10: error: use of deleted function base::Value::Value(const base::Value&)
191 | return value;
| ^~~~~
In file included from ../../services/network/sct_auditing/sct_auditing_reporter.h:14,
from ../../services/network/sct_auditing/sct_auditing_reporter.cc:5:
../../base/values.h:254:3: note: declared here
254 | Value(const Value&) = delete;
| ^~~~~
Bug: 819294
Change-Id: I111e51dd10eee7b909d4ac3c0911aac18a589166
---
diff --git a/services/network/sct_auditing/sct_auditing_reporter.cc b/services/network/sct_auditing/sct_auditing_reporter.cc
index a057e8e..365527b 100644
--- a/services/network/sct_auditing/sct_auditing_reporter.cc
+++ b/services/network/sct_auditing/sct_auditing_reporter.cc
@@ -188,7 +188,7 @@
kLogIdKey, base::Base64Encode(base::as_bytes(base::make_span(log_id))));
value.SetKey(kLogMMDKey, base::TimeDeltaToValue(log_mmd));
value.SetKey(kCertificateExpiry, base::TimeToValue(certificate_expiry));
- return value;
+ return std::move(value);
}
// static

View file

@ -0,0 +1,29 @@
From 1183b14db8bd08d731ff3433c436887de00be3aa Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Fri, 18 Feb 2022 16:28:25 +0000
Subject: [PATCH] Fix typo in non-clang GSL_OWNER macro
GCC build fails because GSL_OWNER is not defined (GSL_OWNER_ was
the one actually declared).
Bug: 819294
Change-Id: I1c3d17cb1c08b9bc0e8a888452da9868c308ddb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3472080
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#972974}
---
diff --git a/base/compiler_specific.h b/base/compiler_specific.h
index eec5810..1ee8074 100644
--- a/base/compiler_specific.h
+++ b/base/compiler_specific.h
@@ -386,7 +386,7 @@
#define GSL_OWNER [[gsl::Owner]]
#define GSL_POINTER [[gsl::Pointer]]
#else
-#define GSL_OWNER_
+#define GSL_OWNER
#define GSL_POINTER
#endif

View file

@ -0,0 +1,12 @@
diff -up chromium-98.0.4758.102/base/third_party/symbolize/symbolize.h.missing-utility-for-std-exchange chromium-98.0.4758.102/base/third_party/symbolize/symbolize.h
--- chromium-98.0.4758.102/base/third_party/symbolize/symbolize.h.missing-utility-for-std-exchange 2022-02-25 22:30:02.833745309 +0000
+++ chromium-98.0.4758.102/base/third_party/symbolize/symbolize.h 2022-02-25 22:30:02.832745344 +0000
@@ -58,6 +58,8 @@
#include "config.h"
#include "glog/logging.h"
+#include <utility>
+
#ifdef HAVE_SYMBOLIZE
#include <algorithm>

View file

@ -0,0 +1,20 @@
diff -up chromium-100.0.4896.60/chrome/common/chrome_paths.cc.widevine-other-locations chromium-100.0.4896.60/chrome/common/chrome_paths.cc
--- chromium-100.0.4896.60/chrome/common/chrome_paths.cc.widevine-other-locations 2022-04-02 15:48:56.944051789 +0000
+++ chromium-100.0.4896.60/chrome/common/chrome_paths.cc 2022-04-02 15:52:34.825642103 +0000
@@ -319,6 +319,16 @@ bool PathProvider(int key, base::FilePat
#if BUILDFLAG(ENABLE_WIDEVINE)
case chrome::DIR_BUNDLED_WIDEVINE_CDM:
+ base::PathService::Get(base::DIR_HOME, &cur);
+ cur = cur.Append(FILE_PATH_LITERAL(".local/lib/libwidevinecdm.so"));
+ if (base::PathExists(cur)) {
+ break;
+ }
+ // Yes, this has an arch hardcoded in the path, but at this time, it is the only place to find libwidevinecdm.so
+ if (base::PathExists(base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so")))) {
+ cur = base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"));
+ break;
+ }
if (!GetComponentDirectory(&cur))
return false;
cur = cur.AppendASCII(kWidevineCdmBaseDirectory);

View file

@ -0,0 +1,11 @@
diff -up chromium-100.0.4896.75/net/base/address_list.h.missing-include-tuple chromium-100.0.4896.75/net/base/address_list.h
--- chromium-100.0.4896.75/net/base/address_list.h.missing-include-tuple 2022-04-08 10:03:31.950894611 -0400
+++ chromium-100.0.4896.75/net/base/address_list.h 2022-04-08 10:03:43.926970267 -0400
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <string>
+#include <tuple>
#include <utility>
#include <vector>

View file

@ -0,0 +1,11 @@
diff -up chromium-100.0.4896.75/media/capabilities/webrtc_video_stats_db.h.missing-vector chromium-100.0.4896.75/media/capabilities/webrtc_video_stats_db.h
--- chromium-100.0.4896.75/media/capabilities/webrtc_video_stats_db.h.missing-vector 2022-04-11 18:10:09.979195562 -0400
+++ chromium-100.0.4896.75/media/capabilities/webrtc_video_stats_db.h 2022-04-11 18:10:30.261338074 -0400
@@ -7,6 +7,7 @@
#include <memory>
#include <string>
+#include <vector>
#include "base/callback_forward.h"
#include "base/check.h"

View file

@ -0,0 +1,49 @@
diff -up chromium-100.0.4896.75/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc.old-xkb chromium-100.0.4896.75/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
--- chromium-100.0.4896.75/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc.old-xkb 2022-04-08 10:12:14.725197002 -0400
+++ chromium-100.0.4896.75/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc 2022-04-08 10:13:04.512511489 -0400
@@ -31,14 +31,6 @@
#include "ui/events/keycodes/keyboard_code_conversion.h"
#include "ui/events/keycodes/keyboard_code_conversion_xkb.h"
-// xkb_keymap_key_get_mods_for_level is relatively new (introduced in ver 1.0,
-// Sep 6, 2020), thus it is not available on some platform, such as Ubuntu
-// 18.04, which we still supports.
-// Thus declare the function as weak here, so we can check the availability on
-// runtime.
-extern "C" __attribute__((weak)) decltype(
- xkb_keymap_key_get_mods_for_level) xkb_keymap_key_get_mods_for_level;
-
namespace ui {
namespace {
@@ -925,18 +917,10 @@ void XkbKeyboardLayoutEngine::SetKeymap(
const xkb_keysym_t* keysyms;
int num_syms = xkb_keymap_key_get_syms_by_level(keymap, keycode, layout,
level, &keysyms);
- if (xkb_keymap_key_get_mods_for_level) {
- xkb_mod_mask_t masks[100]; // Large enough buffer.
- int num_mods = xkb_keymap_key_get_mods_for_level(
- keymap, keycode, layout, level, masks, std::size(masks));
- AddEntries(base::make_span(keysyms, num_syms),
- base::make_span(masks, num_mods), keycode);
- } else {
// If not, unfortunately, there's no convenient/efficient way
// to take the possible masks. Thus, use mask 0 always.
constexpr xkb_mod_mask_t kMask[] = {0};
AddEntries(base::make_span(keysyms, num_syms), kMask, keycode);
- }
}
}
}
@@ -1000,10 +984,7 @@ int XkbKeyboardLayoutEngine::UpdateModif
DomCode XkbKeyboardLayoutEngine::GetDomCodeByKeysym(uint32_t keysym,
uint32_t modifiers) const {
- // If xkb_keymap_key_get_mods_for_level is not available, all entries are
- // stored with modifiers mask is 0.
- if (!xkb_keymap_key_get_mods_for_level)
- modifiers = 0;
+ modifiers = 0;
auto iter = xkb_keysym_map_.find(XkbKeysymMapKey(keysym, modifiers));
if (iter == xkb_keysym_map_.end()) {

View file

@ -0,0 +1,147 @@
diff -up chromium-100.0.4896.75/remoting/host/mojom/remoting_mojom_traits.h.remoting-extra-qualification chromium-100.0.4896.75/remoting/host/mojom/remoting_mojom_traits.h
--- chromium-100.0.4896.75/remoting/host/mojom/remoting_mojom_traits.h.remoting-extra-qualification 2022-04-05 20:02:25.525814644 +0000
+++ chromium-100.0.4896.75/remoting/host/mojom/remoting_mojom_traits.h 2022-04-07 13:35:28.490655471 +0000
@@ -30,7 +30,7 @@
namespace mojo {
template <>
-class mojo::StructTraits<remoting::mojom::BoolDataView, bool> {
+class StructTraits<remoting::mojom::BoolDataView, bool> {
public:
static bool value(bool value) { return value; }
@@ -41,7 +41,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::FloatDataView, float> {
+class StructTraits<remoting::mojom::FloatDataView, float> {
public:
static float value(float value) { return value; }
@@ -52,7 +52,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::Int32DataView, int32_t> {
+class StructTraits<remoting::mojom::Int32DataView, int32_t> {
public:
static int32_t value(int32_t value) { return value; }
@@ -64,7 +64,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::UInt32DataView, uint32_t> {
+class StructTraits<remoting::mojom::UInt32DataView, uint32_t> {
public:
static uint32_t value(uint32_t value) { return value; }
@@ -76,7 +76,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::DesktopCaptureOptionsDataView,
+class StructTraits<remoting::mojom::DesktopCaptureOptionsDataView,
::webrtc::DesktopCaptureOptions> {
public:
static bool use_update_notifications(
@@ -101,7 +101,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::DesktopEnvironmentOptionsDataView,
+class StructTraits<remoting::mojom::DesktopEnvironmentOptionsDataView,
::remoting::DesktopEnvironmentOptions> {
public:
static bool enable_curtaining(
@@ -161,7 +161,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::DesktopSizeDataView,
+class StructTraits<remoting::mojom::DesktopSizeDataView,
::webrtc::DesktopSize> {
public:
static int32_t width(const ::webrtc::DesktopSize& size) {
@@ -177,7 +177,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::DesktopVectorDataView,
+class StructTraits<remoting::mojom::DesktopVectorDataView,
::webrtc::DesktopVector> {
public:
static int32_t x(const ::webrtc::DesktopVector& vector) { return vector.x(); }
@@ -243,7 +243,7 @@ struct EnumTraits<remoting::mojom::Mouse
};
template <>
-class mojo::StructTraits<remoting::mojom::ClipboardEventDataView,
+class StructTraits<remoting::mojom::ClipboardEventDataView,
::remoting::protocol::ClipboardEvent> {
public:
static const std::string& mime_type(
@@ -261,7 +261,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::KeyEventDataView,
+class StructTraits<remoting::mojom::KeyEventDataView,
::remoting::protocol::KeyEvent> {
public:
static bool pressed(const ::remoting::protocol::KeyEvent& event) {
@@ -297,7 +297,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::MouseEventDataView,
+class StructTraits<remoting::mojom::MouseEventDataView,
::remoting::protocol::MouseEvent> {
public:
static absl::optional<int32_t> x(
@@ -386,7 +386,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::ScreenResolutionDataView,
+class StructTraits<remoting::mojom::ScreenResolutionDataView,
::remoting::ScreenResolution> {
public:
static const ::webrtc::DesktopSize& dimensions(
@@ -404,7 +404,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::TextEventDataView,
+class StructTraits<remoting::mojom::TextEventDataView,
::remoting::protocol::TextEvent> {
public:
static const std::string& text(const ::remoting::protocol::TextEvent& event) {
@@ -416,7 +416,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::TouchEventPointDataView,
+class StructTraits<remoting::mojom::TouchEventPointDataView,
::remoting::protocol::TouchEventPoint> {
public:
static uint32_t id(const ::remoting::protocol::TouchEventPoint& event) {
@@ -493,7 +493,7 @@ struct EnumTraits<remoting::mojom::Touch
};
template <>
-class mojo::StructTraits<remoting::mojom::TouchEventDataView,
+class StructTraits<remoting::mojom::TouchEventDataView,
::remoting::protocol::TouchEvent> {
public:
static ::remoting::protocol::TouchEvent::TouchEventType event_type(
@@ -553,7 +553,7 @@ struct EnumTraits<remoting::mojom::Trans
};
template <>
-class mojo::StructTraits<remoting::mojom::TransportRouteDataView,
+class StructTraits<remoting::mojom::TransportRouteDataView,
::remoting::protocol::TransportRoute> {
public:
static ::remoting::protocol::TransportRoute::RouteType type(

View file

@ -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)

View file

@ -0,0 +1,165 @@
diff -up chromium-101.0.4951.41/remoting/host/mojom/remoting_mojom_traits.h.remoting-extra-qualification chromium-101.0.4951.41/remoting/host/mojom/remoting_mojom_traits.h
--- chromium-101.0.4951.41/remoting/host/mojom/remoting_mojom_traits.h.remoting-extra-qualification 2022-04-27 20:08:44.312318089 +0000
+++ chromium-101.0.4951.41/remoting/host/mojom/remoting_mojom_traits.h 2022-04-28 16:11:30.308481321 +0000
@@ -32,7 +32,7 @@
namespace mojo {
template <>
-class mojo::StructTraits<remoting::mojom::BoolDataView, bool> {
+class StructTraits<remoting::mojom::BoolDataView, bool> {
public:
static bool value(bool value) { return value; }
@@ -43,7 +43,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::FloatDataView, float> {
+class StructTraits<remoting::mojom::FloatDataView, float> {
public:
static float value(float value) { return value; }
@@ -54,7 +54,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::Int32DataView, int32_t> {
+class StructTraits<remoting::mojom::Int32DataView, int32_t> {
public:
static int32_t value(int32_t value) { return value; }
@@ -66,7 +66,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::UInt32DataView, uint32_t> {
+class StructTraits<remoting::mojom::UInt32DataView, uint32_t> {
public:
static uint32_t value(uint32_t value) { return value; }
@@ -78,7 +78,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::DesktopCaptureOptionsDataView,
+class StructTraits<remoting::mojom::DesktopCaptureOptionsDataView,
::webrtc::DesktopCaptureOptions> {
public:
static bool use_update_notifications(
@@ -103,7 +103,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::DesktopEnvironmentOptionsDataView,
+class StructTraits<remoting::mojom::DesktopEnvironmentOptionsDataView,
::remoting::DesktopEnvironmentOptions> {
public:
static bool enable_curtaining(
@@ -200,7 +200,7 @@ struct EnumTraits<remoting::mojom::Deskt
};
template <>
-class mojo::StructTraits<remoting::mojom::DesktopRectDataView,
+class StructTraits<remoting::mojom::DesktopRectDataView,
::webrtc::DesktopRect> {
public:
static int32_t left(const ::webrtc::DesktopRect& rect) { return rect.left(); }
@@ -220,7 +220,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::DesktopSizeDataView,
+class StructTraits<remoting::mojom::DesktopSizeDataView,
::webrtc::DesktopSize> {
public:
static int32_t width(const ::webrtc::DesktopSize& size) {
@@ -236,7 +236,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::DesktopVectorDataView,
+class StructTraits<remoting::mojom::DesktopVectorDataView,
::webrtc::DesktopVector> {
public:
static int32_t x(const ::webrtc::DesktopVector& vector) { return vector.x(); }
@@ -475,7 +475,7 @@ struct EnumTraits<remoting::mojom::Audio
};
template <>
-class mojo::StructTraits<remoting::mojom::AudioPacketDataView,
+class StructTraits<remoting::mojom::AudioPacketDataView,
::std::unique_ptr<::remoting::AudioPacket>> {
public:
static int32_t timestamp(
@@ -513,7 +513,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::ClipboardEventDataView,
+class StructTraits<remoting::mojom::ClipboardEventDataView,
::remoting::protocol::ClipboardEvent> {
public:
static const std::string& mime_type(
@@ -531,7 +531,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::KeyEventDataView,
+class StructTraits<remoting::mojom::KeyEventDataView,
::remoting::protocol::KeyEvent> {
public:
static bool pressed(const ::remoting::protocol::KeyEvent& event) {
@@ -567,7 +567,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::MouseEventDataView,
+class StructTraits<remoting::mojom::MouseEventDataView,
::remoting::protocol::MouseEvent> {
public:
static absl::optional<int32_t> x(
@@ -656,7 +656,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::ScreenResolutionDataView,
+class StructTraits<remoting::mojom::ScreenResolutionDataView,
::remoting::ScreenResolution> {
public:
static const ::webrtc::DesktopSize& dimensions(
@@ -674,7 +674,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::TextEventDataView,
+class StructTraits<remoting::mojom::TextEventDataView,
::remoting::protocol::TextEvent> {
public:
static const std::string& text(const ::remoting::protocol::TextEvent& event) {
@@ -686,7 +686,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::TouchEventPointDataView,
+class StructTraits<remoting::mojom::TouchEventPointDataView,
::remoting::protocol::TouchEventPoint> {
public:
static uint32_t id(const ::remoting::protocol::TouchEventPoint& event) {
@@ -763,7 +763,7 @@ struct EnumTraits<remoting::mojom::Touch
};
template <>
-class mojo::StructTraits<remoting::mojom::TouchEventDataView,
+class StructTraits<remoting::mojom::TouchEventDataView,
::remoting::protocol::TouchEvent> {
public:
static ::remoting::protocol::TouchEvent::TouchEventType event_type(
@@ -823,7 +823,7 @@ struct EnumTraits<remoting::mojom::Trans
};
template <>
-class mojo::StructTraits<remoting::mojom::TransportRouteDataView,
+class StructTraits<remoting::mojom::TransportRouteDataView,
::remoting::protocol::TransportRoute> {
public:
static ::remoting::protocol::TransportRoute::RouteType type(

View file

@ -0,0 +1,25 @@
From 7c135a291184b59a59643ed6a8c40b4405ac0175 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Wed, 27 Apr 2022 16:01:01 +0000
Subject: [PATCH] IWYU: add cstring for std::strlen in fenced_frame_utils
---
third_party/blink/common/fenced_frame/fenced_frame_utils.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/third_party/blink/common/fenced_frame/fenced_frame_utils.cc b/third_party/blink/common/fenced_frame/fenced_frame_utils.cc
index 9e2d3ad..68f4823 100644
--- a/third_party/blink/common/fenced_frame/fenced_frame_utils.cc
+++ b/third_party/blink/common/fenced_frame/fenced_frame_utils.cc
@@ -4,6 +4,8 @@
#include "third_party/blink/public/common/fenced_frame/fenced_frame_utils.h"
+#include <cstring>
+
#include "base/guid.h"
#include "base/strings/string_util.h"
--
2.35.1

View file

@ -0,0 +1,14 @@
--- a/components/autofill/core/browser/BUILD.gn
+++ b/components/autofill/core/browser/BUILD.gn
@@ -54,6 +54,11 @@ action("regex_patterns_inl_h") {
}
static_library("browser") {
+ if (is_clang) {
+ cflags = [
+ "-fbracket-depth=1000",
+ ]
+ }
sources = [
"address_normalization_manager.cc",
"address_normalization_manager.h",

View file

@ -0,0 +1,47 @@
From 89c498edff683c68df6be0dd224848f4b4af5ae7 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Mon, 25 Apr 2022 13:25:02 +0200
Subject: [PATCH] GCC: add explicit template instantiation
Bug: b/223668065
Change-Id: I97ea197273f2b46b6a47a9fdfbbfb5065fbd8edd
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/65268
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Commit-Queue: Alexis Hétu <sugoi@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
---
diff --git a/third_party/swiftshader/third_party/subzero/src/IceInstX8632.cpp b/third_party/swiftshader/third_party/subzero/src/IceInstX8632.cpp
index fe87eee..94cac3b 100644
--- a/third_party/swiftshader/third_party/subzero/src/IceInstX8632.cpp
+++ b/third_party/swiftshader/third_party/subzero/src/IceInstX8632.cpp
@@ -710,6 +710,11 @@
}
}
+template void emitIASRegOpTyGPR<true, true>(const Cfg *Func, Type Ty,
+ const Variable *Var,
+ const Operand *Src,
+ const GPREmitterRegOp &Emitter);
+
void emitIASAddrOpTyGPR(const Cfg *Func, Type Ty, const AsmAddress &Addr,
const Operand *Src, const GPREmitterAddrOp &Emitter) {
Assembler *Asm = Func->getAssembler<Assembler>();
diff --git a/third_party/swiftshader/third_party/subzero/src/IceInstX8664.cpp b/third_party/swiftshader/third_party/subzero/src/IceInstX8664.cpp
index 9d655a1..f7097d2 100644
--- a/third_party/swiftshader/third_party/subzero/src/IceInstX8664.cpp
+++ b/third_party/swiftshader/third_party/subzero/src/IceInstX8664.cpp
@@ -698,6 +698,11 @@
}
}
+template void emitIASRegOpTyGPR<true, true>(const Cfg *Func, Type Ty,
+ const Variable *Var,
+ const Operand *Src,
+ const GPREmitterRegOp &Emitter);
+
void emitIASAddrOpTyGPR(const Cfg *Func, Type Ty, const AsmAddress &Addr,
const Operand *Src, const GPREmitterAddrOp &Emitter) {
Assembler *Asm = Func->getAssembler<Assembler>();

View file

@ -0,0 +1,43 @@
From 9dd0503835dc875807ab63efb1f477bffed2a852 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Mon, 25 Apr 2022 23:18:30 +0000
Subject: [PATCH] IWYU: add utility for std::exchange
Bug: 957519
Change-Id: I307d520fdc34d2452018ed32a505e7e519739410
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3604643
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#995855}
---
diff --git a/base/third_party/symbolize/patches/0001-expose-object-file-helpers.patch b/base/third_party/symbolize/patches/0001-expose-object-file-helpers.patch
index b7376d8..72900a19 100644
--- a/base/third_party/symbolize/patches/0001-expose-object-file-helpers.patch
+++ b/base/third_party/symbolize/patches/0001-expose-object-file-helpers.patch
@@ -118,11 +118,12 @@
index c6f9ec4360ede..00cfa022219e6 100644
--- a/base/third_party/symbolize/symbolize.h
+++ b/base/third_party/symbolize/symbolize.h
-@@ -60,6 +60,8 @@
+@@ -60,6 +60,9 @@
#ifdef HAVE_SYMBOLIZE
+#include <algorithm>
++#include <utility>
+
#if defined(__ELF__) // defined by gcc
#if defined(__OpenBSD__)
diff --git a/base/third_party/symbolize/symbolize.h b/base/third_party/symbolize/symbolize.h
index 99029a9..278078f 100644
--- a/base/third_party/symbolize/symbolize.h
+++ b/base/third_party/symbolize/symbolize.h
@@ -61,6 +61,7 @@
#ifdef HAVE_SYMBOLIZE
#include <algorithm>
+#include <utility>
#if defined(__ELF__) // defined by gcc
#if defined(__OpenBSD__)

View file

@ -0,0 +1,11 @@
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)

View file

@ -0,0 +1,26 @@
From 491bf840da4f76fa3591cc0aa2f4c19cdbe57ec4 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Thu, 12 May 2022 11:58:29 +0000
Subject: [PATCH] GCC: fix ambiguous references in blink::FrameLoadRequest
Add namespace to avoid confusion.
---
third_party/blink/renderer/core/loader/frame_load_request.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/third_party/blink/renderer/core/loader/frame_load_request.h b/third_party/blink/renderer/core/loader/frame_load_request.h
index 444b25c..a86814d 100644
--- a/third_party/blink/renderer/core/loader/frame_load_request.h
+++ b/third_party/blink/renderer/core/loader/frame_load_request.h
@@ -179,7 +179,7 @@ struct CORE_EXPORT FrameLoadRequest {
impression_ = impression;
}
- const absl::optional<Impression>& Impression() const { return impression_; }
+ const absl::optional<blink::Impression>& Impression() const { return impression_; }
bool CanDisplay(const KURL&) const;
--
2.35.1

View file

@ -0,0 +1,70 @@
From 3d274856e792a361336eb4ae1670bc9c1905f0cb Mon Sep 17 00:00:00 2001
From: Steinar H. Gunderson <sesse@chromium.org>
Date: Thu, 12 May 2022 16:42:40 +0200
Subject: [PATCH] Make AhoCorasickNode 4-aligned.
This should fix an issue where std::vector could allocate unaligned
memory for AhoCorasickNode, and we'd then return a pointer to
inline_edges, where a caller would expect the pointer to be aligned
but it wasn't.
Change-Id: Id9dff044c61f8e46062c63b8480b18ebc68c4862
---
diff --git a/base/substring_set_matcher/substring_set_matcher.cc b/base/substring_set_matcher/substring_set_matcher.cc
index e110047..ef0b750 100644
--- a/base/substring_set_matcher/substring_set_matcher.cc
+++ b/base/substring_set_matcher/substring_set_matcher.cc
@@ -424,7 +424,12 @@
edges_.inline_edges[num_edges()] = AhoCorasickEdge{label, node};
if (label == kFailureNodeLabel) {
// Make sure that kFailureNodeLabel is first.
- std::swap(edges_.inline_edges[0], edges_.inline_edges[num_edges()]);
+ // NOTE: We don't use std::swap here, because GCC
+ // doesn't understand that inline_edges[] is 4-aligned
+ // and gives a warning.
+ AhoCorasickEdge temp = edges_.inline_edges[0];
+ edges_.inline_edges[0] = edges_.inline_edges[num_edges()];
+ edges_.inline_edges[num_edges()] = temp;
}
--num_free_edges_;
return;
diff --git a/base/substring_set_matcher/substring_set_matcher.cc b/base/substring_set_matcher/substring_set_matcher.cc
index e110047..ef0b750 100644
--- a/base/substring_set_matcher/substring_set_matcher.h
+++ b/base/substring_set_matcher/substring_set_matcher.h
@@ -154,8 +154,9 @@
static constexpr uint32_t kEmptyLabel = 0x103;
// A node in the trie, packed tightly together so that it occupies 12 bytes
- // (both on 32- and 64-bit platforms).
- class AhoCorasickNode {
+ // (both on 32- and 64-bit platforms), but aligned to at least 4 (see the
+ // comment on edges_).
+ class alignas(AhoCorasickEdge) AhoCorasickNode {
public:
AhoCorasickNode();
~AhoCorasickNode();
@@ -178,6 +179,10 @@
NodeID GetEdgeNoInline(uint32_t label) const;
void SetEdge(uint32_t label, NodeID node);
const AhoCorasickEdge* edges() const {
+ // NOTE: Returning edges_.inline_edges here is fine, because it's
+ // the first thing in the struct (see the comment on edges_).
+ DCHECK_EQ(0u, reinterpret_cast<uintptr_t>(edges_.inline_edges) %
+ alignof(AhoCorasickEdge));
return edges_capacity_ == 0 ? edges_.inline_edges : edges_.edges;
}
@@ -258,6 +263,11 @@
// in the first slot if it exists (ie., is not equal to kRootID), since we
// need to access that label during every single node we look at during
// traversal.
+ //
+ // NOTE: Keep this the first member in the struct, so that inline_edges gets
+ // 4-aligned (since the class is marked as such, despite being packed.
+ // Otherwise, edges() can return an unaligned pointer marked as aligned
+ // (the unalignedness gets lost).
static constexpr int kNumInlineEdges = 2;
union {
// Out-of-line edge storage, having room for edges_capacity_ elements.

View file

@ -0,0 +1,231 @@
From 144479ad7b4287bee4067f95e4218f614798a865 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Sun, 16 Jan 2022 19:15:26 +0000
Subject: [PATCH] sql: make VirtualCursor standard layout type
sql::recover::VirtualCursor needs to be a standard layout type, but
has members of type std::unique_ptr. However, std::unique_ptr is not
guaranteed to be standard layout. Compiling with clang combined with
gcc-11 libstdc++ fails because of this.
Bug: 1189788
Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c
---
diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc
index cc9420e5..f12d8fa 100644
--- a/sql/recover_module/btree.cc
+++ b/sql/recover_module/btree.cc
@@ -136,16 +136,22 @@
"Move the destructor to the .cc file if it's non-trival");
#endif // !DCHECK_IS_ON()
-LeafPageDecoder::LeafPageDecoder(DatabasePageReader* db_reader) noexcept
- : page_id_(db_reader->page_id()),
- db_reader_(db_reader),
- cell_count_(ComputeCellCount(db_reader)),
- next_read_index_(0),
- last_record_size_(0) {
+LeafPageDecoder::LeafPageDecoder() noexcept = default;
+
+void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) {
+ page_id_ = db_reader->page_id();
+ db_reader_ = db_reader;
+ cell_count_ = ComputeCellCount(db_reader);
+ next_read_index_ = 0;
+ last_record_size_ = 0;
DCHECK(IsOnValidPage(db_reader));
DCHECK(DatabasePageReader::IsValidPageId(page_id_));
}
+void LeafPageDecoder::Reset() {
+ db_reader_ = nullptr;
+}
+
bool LeafPageDecoder::TryAdvance() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(CanAdvance());
diff --git a/sql/recover_module/btree.h b/sql/recover_module/btree.h
index eaa087a5..df0e0c9 100644
--- a/sql/recover_module/btree.h
+++ b/sql/recover_module/btree.h
@@ -101,9 +101,7 @@
public:
// Creates a decoder for a DatabasePageReader's last read page.
//
- // |db_reader| must have been used to read an inner page of a table B-tree.
- // |db_reader| must outlive this instance.
- explicit LeafPageDecoder(DatabasePageReader* db_reader) noexcept;
+ LeafPageDecoder() noexcept;
~LeafPageDecoder() noexcept = default;
LeafPageDecoder(const LeafPageDecoder&) = delete;
@@ -151,6 +149,17 @@
// read as long as CanAdvance() returns true.
bool TryAdvance();
+ // Initialize with DatabasePageReader
+ // |db_reader| must have been used to read an inner page of a table B-tree.
+ // |db_reader| must outlive this instance.
+ void Initialize(DatabasePageReader* db_reader);
+
+ // Reset internal DatabasePageReader
+ void Reset();
+
+ // True if DatabasePageReader is valid
+ bool IsValid() { return (db_reader_ != nullptr); }
+
// True if the given reader may point to an inner page in a table B-tree.
//
// The last ReadPage() call on |db_reader| must have succeeded.
@@ -164,14 +173,14 @@
static int ComputeCellCount(DatabasePageReader* db_reader);
// The number of the B-tree page this reader is reading.
- const int64_t page_id_;
+ int64_t page_id_;
// Used to read the tree page.
//
// Raw pointer usage is acceptable because this instance's owner is expected
// to ensure that the DatabasePageReader outlives this.
- DatabasePageReader* const db_reader_;
+ DatabasePageReader* db_reader_;
// Caches the ComputeCellCount() value for this reader's page.
- const int cell_count_ = ComputeCellCount(db_reader_);
+ int cell_count_;
// The reader's cursor state.
//
diff --git a/sql/recover_module/cursor.cc b/sql/recover_module/cursor.cc
index 4f827ed..240de499 100644
--- a/sql/recover_module/cursor.cc
+++ b/sql/recover_module/cursor.cc
@@ -28,7 +28,7 @@
int VirtualCursor::First() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
inner_decoders_.clear();
- leaf_decoder_ = nullptr;
+ leaf_decoder_.Reset();
AppendPageDecoder(table_->root_page_id());
return Next();
@@ -38,18 +38,18 @@
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
record_reader_.Reset();
- while (!inner_decoders_.empty() || leaf_decoder_.get()) {
- if (leaf_decoder_.get()) {
- if (!leaf_decoder_->CanAdvance()) {
+ while (!inner_decoders_.empty() || leaf_decoder_.IsValid()) {
+ if (leaf_decoder_.IsValid()) {
+ if (!leaf_decoder_.CanAdvance()) {
// The leaf has been exhausted. Remove it from the DFS stack.
- leaf_decoder_ = nullptr;
+ leaf_decoder_.Reset();
continue;
}
- if (!leaf_decoder_->TryAdvance())
+ if (!leaf_decoder_.TryAdvance())
continue;
- if (!payload_reader_.Initialize(leaf_decoder_->last_record_size(),
- leaf_decoder_->last_record_offset())) {
+ if (!payload_reader_.Initialize(leaf_decoder_.last_record_size(),
+ leaf_decoder_.last_record_offset())) {
continue;
}
if (!record_reader_.Initialize())
@@ -101,13 +101,13 @@
int64_t VirtualCursor::RowId() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(record_reader_.IsInitialized());
- DCHECK(leaf_decoder_.get());
- return leaf_decoder_->last_record_rowid();
+ DCHECK(leaf_decoder_.IsValid());
+ return leaf_decoder_.last_record_rowid();
}
void VirtualCursor::AppendPageDecoder(int page_id) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- DCHECK(leaf_decoder_.get() == nullptr)
+ DCHECK(!leaf_decoder_.IsValid())
<< __func__
<< " must only be called when the current path has no leaf decoder";
@@ -115,7 +115,7 @@
return;
if (LeafPageDecoder::IsOnValidPage(&db_reader_)) {
- leaf_decoder_ = std::make_unique<LeafPageDecoder>(&db_reader_);
+ leaf_decoder_.Initialize(&db_reader_);
return;
}
diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h
index 845b785..cc4e85f8 100644
--- a/sql/recover_module/cursor.h
+++ b/sql/recover_module/cursor.h
@@ -130,7 +130,7 @@
std::vector<std::unique_ptr<InnerPageDecoder>> inner_decoders_;
// Decodes the leaf page containing records.
- std::unique_ptr<LeafPageDecoder> leaf_decoder_;
+ LeafPageDecoder leaf_decoder_;
SEQUENCE_CHECKER(sequence_checker_);
};
diff --git a/sql/recover_module/pager.cc b/sql/recover_module/pager.cc
index 58e75de..69d98cef 100644
--- a/sql/recover_module/pager.cc
+++ b/sql/recover_module/pager.cc
@@ -23,8 +23,7 @@
"ints are not appropriate for representing page IDs");
DatabasePageReader::DatabasePageReader(VirtualTable* table)
- : page_data_(std::make_unique<uint8_t[]>(table->page_size())),
- table_(table) {
+ : page_data_(table->page_size()), table_(table) {
DCHECK(table != nullptr);
DCHECK(IsValidPageSize(table->page_size()));
}
@@ -58,7 +57,7 @@
"The |read_offset| computation above may overflow");
int sqlite_status =
- RawRead(sqlite_file, read_size, read_offset, page_data_.get());
+ RawRead(sqlite_file, read_size, read_offset, page_data_.data());
// |page_id_| needs to be set to kInvalidPageId if the read failed.
// Otherwise, future ReadPage() calls with the previous |page_id_| value
diff --git a/sql/recover_module/pager.h b/sql/recover_module/pager.h
index 07cac3cb..d08f093 100644
--- a/sql/recover_module/pager.h
+++ b/sql/recover_module/pager.h
@@ -6,8 +6,8 @@
#define SQL_RECOVER_MODULE_PAGER_H_
#include <cstdint>
-#include <memory>
#include <ostream>
+#include <vector>
#include "base/check_op.h"
#include "base/memory/raw_ptr.h"
@@ -72,7 +72,7 @@
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK_NE(page_id_, kInvalidPageId)
<< "Successful ReadPage() required before accessing pager state";
- return page_data_.get();
+ return page_data_.data();
}
// The number of bytes in the page read by the last ReadPage() call.
@@ -139,7 +139,7 @@
int page_id_ = kInvalidPageId;
// Stores the bytes of the last page successfully read by ReadPage().
// The content is undefined if the last call to ReadPage() did not succeed.
- const std::unique_ptr<uint8_t[]> page_data_;
+ std::vector<uint8_t> page_data_;
// Raw pointer usage is acceptable because this instance's owner is expected
// to ensure that the VirtualTable outlives this.
const raw_ptr<VirtualTable> table_;

View file

@ -0,0 +1,12 @@
diff -up chromium-103.0.5060.53/tools/grit/grit/util.py.fix-python3 chromium-103.0.5060.53/tools/grit/grit/util.py
--- chromium-103.0.5060.53/tools/grit/grit/util.py.fix-python3 2022-06-30 19:38:05.483590098 +0000
+++ chromium-103.0.5060.53/tools/grit/grit/util.py 2022-06-30 19:38:14.024304827 +0000
@@ -209,7 +209,7 @@ def ReadFile(filename, encoding):
mode = 'rb'
encoding = None
else:
- mode = 'rU'
+ mode = 'r'
with io.open(filename, mode, encoding=encoding) as f:
return f.read()

View file

@ -0,0 +1,219 @@
diff -up chromium-103.0.5060.53/remoting/host/mojom/remoting_mojom_traits.h.remoting-extra-qualification chromium-103.0.5060.53/remoting/host/mojom/remoting_mojom_traits.h
--- chromium-103.0.5060.53/remoting/host/mojom/remoting_mojom_traits.h.remoting-extra-qualification 2022-06-27 22:16:20.214876025 +0000
+++ chromium-103.0.5060.53/remoting/host/mojom/remoting_mojom_traits.h 2022-06-28 12:44:09.663890774 +0000
@@ -37,7 +37,7 @@
namespace mojo {
template <>
-class mojo::StructTraits<remoting::mojom::BoolDataView, bool> {
+class StructTraits<remoting::mojom::BoolDataView, bool> {
public:
static bool value(bool value) { return value; }
@@ -48,7 +48,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::FloatDataView, float> {
+class StructTraits<remoting::mojom::FloatDataView, float> {
public:
static float value(float value) { return value; }
@@ -59,7 +59,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::Int32DataView, int32_t> {
+class StructTraits<remoting::mojom::Int32DataView, int32_t> {
public:
static int32_t value(int32_t value) { return value; }
@@ -71,7 +71,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::UInt32DataView, uint32_t> {
+class StructTraits<remoting::mojom::UInt32DataView, uint32_t> {
public:
static uint32_t value(uint32_t value) { return value; }
@@ -83,7 +83,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::DesktopCaptureOptionsDataView,
+class StructTraits<remoting::mojom::DesktopCaptureOptionsDataView,
::webrtc::DesktopCaptureOptions> {
public:
static bool use_update_notifications(
@@ -108,7 +108,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::DesktopEnvironmentOptionsDataView,
+class StructTraits<remoting::mojom::DesktopEnvironmentOptionsDataView,
::remoting::DesktopEnvironmentOptions> {
public:
static bool enable_curtaining(
@@ -205,7 +205,7 @@ struct EnumTraits<remoting::mojom::Deskt
};
template <>
-class mojo::StructTraits<remoting::mojom::DesktopRectDataView,
+class StructTraits<remoting::mojom::DesktopRectDataView,
::webrtc::DesktopRect> {
public:
static int32_t left(const ::webrtc::DesktopRect& rect) { return rect.left(); }
@@ -225,7 +225,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::DesktopSizeDataView,
+class StructTraits<remoting::mojom::DesktopSizeDataView,
::webrtc::DesktopSize> {
public:
static int32_t width(const ::webrtc::DesktopSize& size) {
@@ -241,7 +241,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::DesktopVectorDataView,
+class StructTraits<remoting::mojom::DesktopVectorDataView,
::webrtc::DesktopVector> {
public:
static int32_t x(const ::webrtc::DesktopVector& vector) { return vector.x(); }
@@ -253,7 +253,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::MouseCursorDataView,
+class StructTraits<remoting::mojom::MouseCursorDataView,
::webrtc::MouseCursor> {
public:
static const webrtc::DesktopSize& image_size(
@@ -506,7 +506,7 @@ struct EnumTraits<remoting::mojom::Audio
};
template <>
-class mojo::StructTraits<remoting::mojom::AudioPacketDataView,
+class StructTraits<remoting::mojom::AudioPacketDataView,
::std::unique_ptr<::remoting::AudioPacket>> {
public:
static int32_t timestamp(
@@ -544,7 +544,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::ClipboardEventDataView,
+class StructTraits<remoting::mojom::ClipboardEventDataView,
::remoting::protocol::ClipboardEvent> {
public:
static const std::string& mime_type(
@@ -562,7 +562,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::KeyboardLayoutDataView,
+class StructTraits<remoting::mojom::KeyboardLayoutDataView,
::remoting::protocol::KeyboardLayout> {
public:
static const ::google::protobuf::
@@ -576,7 +576,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::UnionTraits<remoting::mojom::KeyActionDataView,
+class UnionTraits<remoting::mojom::KeyActionDataView,
::remoting::protocol::KeyboardLayout_KeyAction> {
public:
static remoting::mojom::KeyActionDataView::Tag GetTag(
@@ -609,7 +609,7 @@ class mojo::UnionTraits<remoting::mojom:
};
template <>
-class mojo::StructTraits<remoting::mojom::KeyBehaviorDataView,
+class StructTraits<remoting::mojom::KeyBehaviorDataView,
::remoting::protocol::KeyboardLayout_KeyBehavior> {
public:
static const ::google::protobuf::Map<
@@ -967,7 +967,7 @@ struct EnumTraits<remoting::mojom::Layou
};
template <>
-class mojo::StructTraits<remoting::mojom::KeyEventDataView,
+class StructTraits<remoting::mojom::KeyEventDataView,
::remoting::protocol::KeyEvent> {
public:
static bool pressed(const ::remoting::protocol::KeyEvent& event) {
@@ -1003,7 +1003,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::MouseEventDataView,
+class StructTraits<remoting::mojom::MouseEventDataView,
::remoting::protocol::MouseEvent> {
public:
static absl::optional<int32_t> x(
@@ -1092,7 +1092,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::ScreenResolutionDataView,
+class StructTraits<remoting::mojom::ScreenResolutionDataView,
::remoting::ScreenResolution> {
public:
static const ::webrtc::DesktopSize& dimensions(
@@ -1110,7 +1110,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::TextEventDataView,
+class StructTraits<remoting::mojom::TextEventDataView,
::remoting::protocol::TextEvent> {
public:
static const std::string& text(const ::remoting::protocol::TextEvent& event) {
@@ -1122,7 +1122,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::TouchEventPointDataView,
+class StructTraits<remoting::mojom::TouchEventPointDataView,
::remoting::protocol::TouchEventPoint> {
public:
static uint32_t id(const ::remoting::protocol::TouchEventPoint& event) {
@@ -1199,7 +1199,7 @@ struct EnumTraits<remoting::mojom::Touch
};
template <>
-class mojo::StructTraits<remoting::mojom::TouchEventDataView,
+class StructTraits<remoting::mojom::TouchEventDataView,
::remoting::protocol::TouchEvent> {
public:
static ::remoting::protocol::TouchEvent::TouchEventType event_type(
@@ -1259,7 +1259,7 @@ struct EnumTraits<remoting::mojom::Trans
};
template <>
-class mojo::StructTraits<remoting::mojom::TransportRouteDataView,
+class StructTraits<remoting::mojom::TransportRouteDataView,
::remoting::protocol::TransportRoute> {
public:
static ::remoting::protocol::TransportRoute::RouteType type(
@@ -1406,7 +1406,7 @@ struct EnumTraits<remoting::mojom::Proto
};
template <>
-class mojo::StructTraits<remoting::mojom::VideoLayoutDataView,
+class StructTraits<remoting::mojom::VideoLayoutDataView,
::remoting::protocol::VideoLayout> {
public:
static const ::google::protobuf::RepeatedPtrField<
@@ -1425,7 +1425,7 @@ class mojo::StructTraits<remoting::mojom
};
template <>
-class mojo::StructTraits<remoting::mojom::VideoTrackLayoutDataView,
+class StructTraits<remoting::mojom::VideoTrackLayoutDataView,
::remoting::protocol::VideoTrackLayout> {
public:
static int64_t screen_id(

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,62 @@
diff -up chromium-104.0.5112.101/chrome/browser/about_flags.cc.accel-mjpeg chromium-104.0.5112.101/chrome/browser/about_flags.cc
--- chromium-104.0.5112.101/chrome/browser/about_flags.cc.accel-mjpeg 2022-08-16 23:29:08.000000000 +0000
+++ chromium-104.0.5112.101/chrome/browser/about_flags.cc 2022-08-18 14:21:36.762266571 +0000
@@ -4485,12 +4485,12 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kWebXrForceRuntimeDescription, kOsDesktop,
MULTI_VALUE_TYPE(kWebXrForceRuntimeChoices)},
#endif // ENABLE_VR
-#if BUILDFLAG(IS_CHROMEOS_ASH)
+#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX)
{"disable-accelerated-mjpeg-decode",
flag_descriptions::kAcceleratedMjpegDecodeName,
- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
-#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX)
{"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName,
flag_descriptions::kSystemKeyboardLockDescription, kOsDesktop,
FEATURE_VALUE_TYPE(features::kSystemKeyboardLock)},
diff -up chromium-104.0.5112.101/chrome/browser/flag_descriptions.cc.accel-mjpeg chromium-104.0.5112.101/chrome/browser/flag_descriptions.cc
--- chromium-104.0.5112.101/chrome/browser/flag_descriptions.cc.accel-mjpeg 2022-08-16 23:29:09.000000000 +0000
+++ chromium-104.0.5112.101/chrome/browser/flag_descriptions.cc 2022-08-18 14:25:23.609572649 +0000
@@ -4170,7 +4170,7 @@ const char kUseAngleGL[] = "OpenGL";
// ChromeOS -------------------------------------------------------------------
-#if BUILDFLAG(IS_CHROMEOS_ASH)
+#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX)
const char kAcceleratedMjpegDecodeName[] =
"Hardware-accelerated mjpeg decode for captured frame";
@@ -4178,6 +4178,10 @@ const char kAcceleratedMjpegDecodeDescri
"Enable hardware-accelerated mjpeg decode for captured frame where "
"available.";
+#endif
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+
const char kAdaptiveChargingForTestingName[] =
"Show adaptive charging notifications for testing";
const char kAdaptiveChargingForTestingDescription[] =
diff -up chromium-104.0.5112.101/chrome/browser/flag_descriptions.h.accel-mjpeg chromium-104.0.5112.101/chrome/browser/flag_descriptions.h
--- chromium-104.0.5112.101/chrome/browser/flag_descriptions.h.accel-mjpeg 2022-08-18 14:21:36.765266469 +0000
+++ chromium-104.0.5112.101/chrome/browser/flag_descriptions.h 2022-08-18 14:26:10.469983301 +0000
@@ -2390,11 +2390,15 @@ extern const char kUseAngleGL[];
// ChromeOS -------------------------------------------------------------------
-#if BUILDFLAG(IS_CHROMEOS_ASH)
+#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX)
extern const char kAcceleratedMjpegDecodeName[];
extern const char kAcceleratedMjpegDecodeDescription[];
+#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX)
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+
extern const char kAdaptiveChargingName[];
extern const char kAdaptiveChargingDescription[];

View file

@ -0,0 +1,76 @@
diff -up chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc.system-minizip chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc
--- chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc.system-minizip 2022-08-18 23:16:03.451728329 +0000
+++ chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc 2022-08-18 23:16:23.966049114 +0000
@@ -21,8 +21,8 @@ limitations under the License.
#include "absl/status/status.h" // from @com_google_absl
#include "absl/strings/str_format.h" // from @com_google_absl
#include "absl/strings/string_view.h" // from @com_google_absl
-#include "contrib/minizip/ioapi.h"
-#include "contrib/minizip/unzip.h"
+#include <minizip/ioapi.h>
+#include <minizip/unzip.h>
#include "flatbuffers/flatbuffers.h" // from @flatbuffers
#include "tensorflow/lite/schema/schema_generated.h"
#include "tensorflow_lite_support/cc/common.h"
diff -up chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc.system-minizip chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc
--- chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc.system-minizip 2022-08-18 23:16:52.463105585 +0000
+++ chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc 2022-08-18 23:17:12.849430606 +0000
@@ -19,8 +19,8 @@ limitations under the License.
#include <cstring>
#include <functional>
-#include "contrib/minizip/ioapi.h"
-#include "contrib/minizip/zip.h"
+#include <minizip/ioapi.h>
+#include <minizip/zip.h>
#include "flatbuffers/flatbuffers.h" // from @flatbuffers
#include "tensorflow/lite/schema/schema_generated.h"
#include "tensorflow_lite_support/cc/common.h"
diff -up chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc.system-minizip chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
--- chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc.system-minizip 2022-08-18 23:18:14.697382850 +0000
+++ chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc 2022-08-18 23:18:27.148970583 +0000
@@ -19,7 +19,7 @@ limitations under the License.
#include <cstdio>
#include "absl/strings/string_view.h" // from @com_google_absl
-#include "contrib/minizip/ioapi.h"
+#include <minizip/ioapi.h>
namespace tflite {
namespace metadata {
diff -up chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.h.system-minizip chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.h
--- chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.h.system-minizip 2022-08-18 20:14:28.116854693 +0000
+++ chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.h 2022-08-18 20:14:28.115854726 +0000
@@ -19,7 +19,7 @@ limitations under the License.
#include <cstdlib>
#include "absl/strings/string_view.h" // from @com_google_absl
-#include "contrib/minizip/ioapi.h"
+#include <minizip/ioapi.h>
namespace tflite {
namespace metadata {
diff -up chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc.system-minizip chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc
--- chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc.system-minizip 2022-08-18 23:19:14.807392634 +0000
+++ chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc 2022-08-18 23:19:31.177850617 +0000
@@ -19,7 +19,7 @@ limitations under the License.
#include <cstdio>
#include "absl/strings/string_view.h" // from @com_google_absl
-#include "contrib/minizip/ioapi.h"
+#include <minizip/ioapi.h>
namespace tflite {
namespace metadata {
diff -up chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h.system-minizip chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h
--- chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h.system-minizip 2022-08-18 20:14:28.116854693 +0000
+++ chromium-104.0.5112.101/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h 2022-08-18 20:14:28.116854693 +0000
@@ -19,7 +19,7 @@ limitations under the License.
#include <cstdlib>
#include "absl/strings/string_view.h" // from @com_google_absl
-#include "contrib/minizip/ioapi.h"
+#include <minizip/ioapi.h>
namespace tflite {
namespace metadata {

View file

@ -0,0 +1,41 @@
From 385068e1eb1cde9629d18ceee1fd13255c70c806 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Fri, 22 Jul 2022 18:29:24 +0000
Subject: [PATCH] libstdc++: use math.h in blink::AdjustMaskLayerGeometry
libstdc++ does not implement std::ceilf. Use ceilf from math.h
instead.
Bug: 957519
Change-Id: I03b5e0a1eb73fdeae34d5f3d2f2e9c8871c52543
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3782841
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
Reviewed-by: Juanmi Huertas <juanmihd@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1027342}
---
diff --git a/third_party/blink/renderer/platform/graphics/compositing/adjust_mask_layer_geometry.cc b/third_party/blink/renderer/platform/graphics/compositing/adjust_mask_layer_geometry.cc
index 4abe1d9..b5b43da 100644
--- a/third_party/blink/renderer/platform/graphics/compositing/adjust_mask_layer_geometry.cc
+++ b/third_party/blink/renderer/platform/graphics/compositing/adjust_mask_layer_geometry.cc
@@ -4,8 +4,9 @@
#include "third_party/blink/renderer/platform/graphics/compositing/adjust_mask_layer_geometry.h"
+#include <math.h>
#include <algorithm>
-#include <cmath>
+
#include "third_party/blink/renderer/platform/graphics/paint/geometry_mapper.h"
#include "third_party/blink/renderer/platform/graphics/paint/transform_paint_property_node.h"
#include "ui/gfx/geometry/size.h"
@@ -29,8 +30,7 @@
// Map a screen pixel into the layer.
GeometryMapper::SourceToDestinationRect(TransformPaintPropertyNode::Root(),
transform, pixel_rect);
- int outset =
- std::ceilf(std::max(pixel_rect.width(), pixel_rect.height()) * 2);
+ int outset = ceilf(std::max(pixel_rect.width(), pixel_rect.height()) * 2);
// Don't expand too far in extreme cases.
constexpr int kMaxOutset = 1000;
outset = std::min(kMaxOutset, outset);

View file

@ -0,0 +1,26 @@
From 8959d9d1c6e4ed083c278ab9e8def20a409052b9 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Fri, 22 Jul 2022 16:51:28 +0000
Subject: [PATCH] IWYU: add memory for std::unique_ptr in disk_cache::Bitmap
Bug: 957519
Change-Id: I123198345e5f9062329b7eabe980f312525c268b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3779530
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#1027289}
---
diff --git a/net/disk_cache/blockfile/bitmap.h b/net/disk_cache/blockfile/bitmap.h
index 07806cf..9ffa98b9 100644
--- a/net/disk_cache/blockfile/bitmap.h
+++ b/net/disk_cache/blockfile/bitmap.h
@@ -8,6 +8,8 @@
#include <stdint.h>
#include <string.h>
+#include <memory>
+
#include "base/memory/raw_ptr.h"
#include "net/base/net_export.h"

View file

@ -0,0 +1,161 @@
From 632aad0141fe0008fa9babba4f1f514222fa2cda Mon Sep 17 00:00:00 2001
From: Matthew Denton <mpdenton@chromium.org>
Date: Mon, 01 Aug 2022 21:45:28 +0000
Subject: [PATCH] [Linux sandbox] cleanup TrapRegistry's "atomics"
TrapRegistry uses some hacky asm statements as compiler memory barriers
to prevent a signal handler from accessing a deleted array (in the case
that the store of the pointer to the new array is reordered after the
deletion of the old array and the signal handler grabs a pointer to the
old array after it's deleted).
We have std::atomic_signal_fence for this now, so this uses it.
This also changes the |trap_array_| pointer back to a raw pointer from
a raw_ptr. Usage of raw_ptr might be awkward as it is also accessed in
a signal handler, and in fact |trap_array_| is an owning pointer
anyway so raw_ptr is unnecessary.
This came up in https://crrev.com/c/3789266 in which the use of raw_ptr
with the hacky compiler barriers was not supported by GCC.
SMALL ADDITION: This also removes raw_ptr from the arch_sigsys struct; it was a raw pointer to a code instruction and likely would not have worked. It is also never dereferenced (only its value is used).
NOTE 1: In technicality, all non-local variables accessed by the signal
handler must be either lock-free std::atomics or volatile sig_atomic_t.
None of Chrome's code does this and in fact, glibc just typedefs
sig_atomic_t to int. The std::atomic_signal_fence is enough on any
architecture.
NOTE 2: This race condition is unlikely to ever happen even without
compiler barriers. The only time we might be modifying the
|trap_array_| and also accessing it from a signal handler, we must
have already applied a seccomp sandbox that uses traps, and now be
applying another one that uses traps. And to replace the deleted object,
the second sandbox must be getting applied in a multithreaded
environment, otherwise there would be no allocations after the free.
Bug: 819294
Change-Id: I9f1cd417446dd863805a303e9b111bc862cb9ae2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3788911
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1030277}
---
diff --git a/sandbox/linux/seccomp-bpf/trap.cc b/sandbox/linux/seccomp-bpf/trap.cc
index cb71a9b..b0c0257 100644
--- a/sandbox/linux/seccomp-bpf/trap.cc
+++ b/sandbox/linux/seccomp-bpf/trap.cc
@@ -12,12 +12,13 @@
#include <sys/syscall.h>
#include <algorithm>
+#include <atomic>
#include <limits>
#include <tuple>
#include "base/compiler_specific.h"
#include "base/logging.h"
-#include "base/memory/raw_ptr.h"
+#include "base/memory/raw_ptr_exclusion.h"
#include "build/build_config.h"
#include "sandbox/linux/bpf_dsl/seccomp_macros.h"
#include "sandbox/linux/seccomp-bpf/die.h"
@@ -29,7 +30,9 @@
namespace {
struct arch_sigsys {
- raw_ptr<void> ip;
+ // This is not raw_ptr because it is a pointer to a code address given to us
+ // by the kernel.
+ RAW_PTR_EXCLUSION void* ip;
int nr;
unsigned int arch;
};
@@ -77,11 +80,7 @@
namespace sandbox {
-Trap::Trap()
- : trap_array_(nullptr),
- trap_array_size_(0),
- trap_array_capacity_(0),
- has_unsafe_traps_(false) {
+Trap::Trap() {
// Set new SIGSYS handler
struct sigaction sa = {};
// In some toolchain, sa_sigaction is not declared in struct sigaction.
@@ -239,7 +238,7 @@
struct arch_seccomp_data data = {
static_cast<int>(SECCOMP_SYSCALL(ctx)),
SECCOMP_ARCH,
- reinterpret_cast<uint64_t>(sigsys.ip.get()),
+ reinterpret_cast<uint64_t>(sigsys.ip),
{static_cast<uint64_t>(SECCOMP_PARM1(ctx)),
static_cast<uint64_t>(SECCOMP_PARM2(ctx)),
static_cast<uint64_t>(SECCOMP_PARM3(ctx)),
@@ -333,24 +332,11 @@
TrapKey* new_trap_array = new TrapKey[trap_array_capacity_];
std::copy_n(old_trap_array, trap_array_size_, new_trap_array);
- // Language specs are unclear on whether the compiler is allowed to move
- // the "delete[]" above our preceding assignments and/or memory moves,
- // iff the compiler believes that "delete[]" doesn't have any other
- // global side-effects.
- // We insert optimization barriers to prevent this from happening.
- // The first barrier is probably not needed, but better be explicit in
- // what we want to tell the compiler.
- // The clang developer mailing list couldn't answer whether this is a
- // legitimate worry; but they at least thought that the barrier is
- // sufficient to prevent the (so far hypothetical) problem of re-ordering
- // of instructions by the compiler.
- //
- // TODO(mdempsky): Try to clean this up using base/atomicops or C++11
- // atomics; see crbug.com/414363.
- asm volatile("" : "=r"(new_trap_array) : "0"(new_trap_array) : "memory");
trap_array_ = new_trap_array;
- asm volatile("" : "=r"(trap_array_) : "0"(trap_array_) : "memory");
-
+ // Prevent the compiler from moving delete[] before the store of the
+ // |new_trap_array|, otherwise a concurrent SIGSYS may see a |trap_array_|
+ // that still points to |old_trap_array| after it has been deleted.
+ std::atomic_signal_fence(std::memory_order_release);
delete[] old_trap_array;
}
diff --git a/sandbox/linux/seccomp-bpf/trap.h b/sandbox/linux/seccomp-bpf/trap.h
index cc17d26..37d2029 100644
--- a/sandbox/linux/seccomp-bpf/trap.h
+++ b/sandbox/linux/seccomp-bpf/trap.h
@@ -10,7 +10,7 @@
#include <map>
-#include "base/memory/raw_ptr.h"
+#include "base/memory/raw_ptr_exclusion.h"
#include "sandbox/linux/bpf_dsl/trap_registry.h"
#include "sandbox/linux/system_headers/linux_signal.h"
#include "sandbox/sandbox_export.h"
@@ -75,11 +75,15 @@
// events.
static Trap* global_trap_;
- TrapIds trap_ids_; // Maps from TrapKeys to numeric ids
- raw_ptr<TrapKey> trap_array_; // Array of TrapKeys indexed by ids
- size_t trap_array_size_; // Currently used size of array
- size_t trap_array_capacity_; // Currently allocated capacity of array
- bool has_unsafe_traps_; // Whether unsafe traps have been enabled
+ TrapIds trap_ids_; // Maps from TrapKeys to numeric ids
+ // Array of TrapKeys indexed by ids.
+ //
+ // This is not a raw_ptr as it is an owning pointer anyway, and is meant to be
+ // used between normal code and signal handlers.
+ RAW_PTR_EXCLUSION TrapKey* trap_array_ = nullptr;
+ size_t trap_array_size_ = 0; // Currently used size of array
+ size_t trap_array_capacity_ = 0; // Currently allocated capacity of array
+ bool has_unsafe_traps_ = false; // Whether unsafe traps have been enabled
};
} // namespace sandbox

View file

@ -0,0 +1,24 @@
From 41dca8bd0c5e8ac5197d7477c6f01556fb88fb43 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Sun, 14 Aug 2022 08:41:11 +0000
Subject: [PATCH] IWYU: add vector for std::vector in browser_finder.h
---
chrome/browser/ui/browser_finder.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/chrome/browser/ui/browser_finder.h b/chrome/browser/ui/browser_finder.h
index f885be0..ad7a184 100644
--- a/chrome/browser/ui/browser_finder.h
+++ b/chrome/browser/ui/browser_finder.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_BROWSER_FINDER_H_
#include <stddef.h>
+#include <vector>
#include "ui/display/types/display_constants.h"
#include "ui/gfx/native_widget_types.h"
--
2.35.1

View file

@ -0,0 +1,30 @@
From 72b19a6a725809f872a7e7525c9a83bcbda85ec7 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Mon, 25 Jul 2022 09:19:19 +0000
Subject: [PATCH] GCC: make raw_ptr move assignment operator noexcept
Required in content::LevelDBScopesOptions, because move assignment
operator is noexcept too.
Bug: 3762913
Change-Id: Ic55ade0e15457eb7349fe24203307972d9030a8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3782669
Reviewed-by: Keishi Hattori <keishi@chromium.org>
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1027669}
---
diff --git a/base/memory/raw_ptr.h b/base/memory/raw_ptr.h
index 5d8c1cfd..9a62f03 100644
--- a/base/memory/raw_ptr.h
+++ b/base/memory/raw_ptr.h
@@ -796,7 +796,7 @@
return *this;
}
- ALWAYS_INLINE raw_ptr& operator=(raw_ptr&& p) {
+ ALWAYS_INLINE raw_ptr& operator=(raw_ptr&& p) noexcept {
if (LIKELY(this != &p)) {
Impl::ReleaseWrappedPtr(wrapped_ptr_);
wrapped_ptr_ = p.wrapped_ptr_;

View file

@ -0,0 +1,12 @@
diff -up chromium-105.0.5195.125/v8/BUILD.gn.arm64-gcc-fix chromium-105.0.5195.125/v8/BUILD.gn
--- chromium-105.0.5195.125/v8/BUILD.gn.arm64-gcc-fix 2022-09-20 18:12:30.766293126 +0000
+++ chromium-105.0.5195.125/v8/BUILD.gn 2022-09-20 18:13:04.376435347 +0000
@@ -1095,7 +1095,7 @@ config("toolchain") {
defines += [ "V8_TARGET_ARCH_ARM64" ]
if (current_cpu == "arm64") {
# This will enable PAC+BTI in code generation and static code.
- if (v8_control_flow_integrity &&
+ if (v8_control_flow_integrity && is_clang &&
(!build_with_chromium || arm_control_flow_integrity == "standard")) {
cflags += [ "-mbranch-protection=standard" ]
asmflags = [ "-mmark-bti-property" ]

View file

@ -0,0 +1,26 @@
diff -up chromium-105.0.5195.125/ui/ozone/platform/wayland/host/wayland_window.cc.fix-wayland-menu chromium-105.0.5195.125/ui/ozone/platform/wayland/host/wayland_window.cc
--- chromium-105.0.5195.125/ui/ozone/platform/wayland/host/wayland_window.cc.fix-wayland-menu 2022-09-23 18:29:51.872286569 +0000
+++ chromium-105.0.5195.125/ui/ozone/platform/wayland/host/wayland_window.cc 2022-09-23 18:30:18.819376074 +0000
@@ -950,7 +950,7 @@ void WaylandWindow::ProcessPendingBounds
// window has been applied.
SetWindowGeometry(pending_bounds_dip_);
AckConfigure(serial);
- root_surface()->Commit();
+ connection()->ScheduleFlush();
} else if (!pending_configures_.empty() &&
pending_bounds_dip_.size() ==
pending_configures_.back().bounds_dip.size()) {
diff -up chromium-105.0.5195.125/ui/ozone/platform/wayland/wayland_buffer_manager_unittest.cc.fix-wayland-menu chromium-105.0.5195.125/ui/ozone/platform/wayland/wayland_buffer_manager_unittest.cc
--- chromium-105.0.5195.125/ui/ozone/platform/wayland/wayland_buffer_manager_unittest.cc.fix-wayland-menu 2022-09-23 18:30:41.936594397 +0000
+++ chromium-105.0.5195.125/ui/ozone/platform/wayland/wayland_buffer_manager_unittest.cc 2022-09-23 18:31:31.703911576 +0000
@@ -1103,9 +1103,7 @@ TEST_P(WaylandBufferManagerTest, TestCom
EXPECT_CALL(*xdg_surface, AckConfigure(_)).Times(1);
EXPECT_CALL(*mock_surface, Attach(_, _, _)).Times(1);
EXPECT_CALL(*mock_surface, Frame(_)).Times(1);
- // Commit() can be called a second time as part of the configure -> ack
- // sequence.
- EXPECT_CALL(*mock_surface, Commit()).Times(testing::Between(1, 2));
+ EXPECT_CALL(*mock_surface, Commit()).Times(1);
ActivateSurface(mock_surface->xdg_surface());
Sync();

View file

@ -0,0 +1,207 @@
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/opus.gn.gnsystem chromium-105.0.5195.52/build/linux/unbundle/opus.gn
--- chromium-105.0.5195.52/build/linux/unbundle/opus.gn.gnsystem 2022-08-24 20:27:57.000000000 +0000
+++ chromium-105.0.5195.52/build/linux/unbundle/opus.gn 2022-09-01 12:41:57.564878845 +0000
@@ -1,3 +1,164 @@
+# 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")
+import("//testing/test.gni")
+
+pkg_config("system_opus") {
+ packages = [ "opus" ]
+}
+
+shim_headers("opus_shim") {
+ root_path = "src/include"
+ headers = [
+ "opus_custom.h",
+ "opus_defines.h",
+ "opus_multistream.h",
+ "opus_types.h",
+ "opus.h",
+ ]
+}
+
+source_set("opus") {
+ deps = [
+ ":opus_shim",
+ ]
+ public_configs = [ ":system_opus" ]
+}
+
+config("opus_test_config") {
+ include_dirs = [
+ "src/celt",
+ "src/silk",
+ ]
+
+ if (is_win) {
+ defines = [ "inline=__inline" ]
+ }
+ if (is_android) {
+ libs = [ "log" ]
+ }
+ if (is_clang) {
+ cflags = [ "-Wno-absolute-value" ]
+ }
+}
+
+executable("opus_compare") {
+ sources = [
+ "src/src/opus_compare.c",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":opus_test_config",
+ ]
+
+ deps = [
+ ":opus",
+ "//build/config/sanitizers:deps",
+ "//build/win:default_exe_manifest",
+ ]
+}
+
+executable("opus_demo") {
+ sources = [
+ "src/src/opus_demo.c",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":opus_test_config",
+ ]
+
+ deps = [
+ ":opus",
+ "//build/config/sanitizers:deps",
+ "//build/win:default_exe_manifest",
+ ]
+}
+
+test("test_opus_api") {
+ sources = [
+ "src/tests/test_opus_api.c",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":opus_test_config",
+ ]
+
+ deps = [
+ ":opus",
+ ]
+}
+
+test("test_opus_encode") {
+ sources = [
+ "src/tests/test_opus_encode.c",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":opus_test_config",
+ ]
+
+ deps = [
+ ":opus",
+ ]
+}
+
+# GN orders flags on a target before flags from configs. The default config
+# adds -Wall, and this flag have to be after -Wall -- so they need to
+# come from a config and can't be on the target directly.
+config("test_opus_decode_config") {
+ # test_opus_decode passes a null pointer to opus_decode() for an argument
+ # marked as requiring a non-null value by the nonnull function attribute,
+ # and expects opus_decode() to fail. Disable the -Wnonnull option to avoid
+ # a compilation error if -Werror is specified.
+ if (is_posix) {
+ cflags = [ "-Wno-nonnull" ]
+ }
+}
+
+test("test_opus_decode") {
+ sources = [
+ "src/tests/test_opus_decode.c",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":opus_test_config",
+ ":test_opus_decode_config",
+ ]
+
+ deps = [
+ ":opus",
+ ]
+}
+
+test("test_opus_padding") {
+ sources = [
+ "src/tests/test_opus_padding.c",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":opus_test_config",
+ ]
+
+ deps = [
+ ":opus",
+ ]
+}
+
# Copyright 2017 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.
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',

View file

@ -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

View file

@ -0,0 +1,31 @@
diff -up chromium-105.0.5195.52/third_party/wayland/src/src/wayland-client-core.h.old-wayland chromium-105.0.5195.52/third_party/wayland/src/src/wayland-client-core.h
--- chromium-105.0.5195.52/third_party/wayland/src/src/wayland-client-core.h.old-wayland 2022-09-01 19:36:06.099483374 +0000
+++ chromium-105.0.5195.52/third_party/wayland/src/src/wayland-client-core.h 2022-09-01 22:09:56.523353619 +0000
@@ -119,9 +119,27 @@ struct wl_display;
*/
struct wl_event_queue;
+/** Destroy proxy after marshalling
+ * @ingroup wl_proxy
+ */
+#define WL_MARSHAL_FLAG_DESTROY (1 << 0)
+
void
wl_event_queue_destroy(struct wl_event_queue *queue);
+struct wl_proxy *
+wl_proxy_marshal_flags(struct wl_proxy *proxy, uint32_t opcode,
+ const struct wl_interface *interface,
+ uint32_t version,
+ uint32_t flags, ...);
+
+struct wl_proxy *
+wl_proxy_marshal_array_flags(struct wl_proxy *proxy, uint32_t opcode,
+ const struct wl_interface *interface,
+ uint32_t version,
+ uint32_t flags,
+ union wl_argument *args);
+
void
wl_proxy_marshal(struct wl_proxy *p, uint32_t opcode, ...);

View file

@ -1,16 +0,0 @@
diff -up chromium-107.0.5304.121/media/BUILD.gn.me chromium-107.0.5304.121/media/BUILD.gn
--- chromium-107.0.5304.121/media/BUILD.gn.me 2022-12-17 12:35:44.546779129 +0100
+++ chromium-107.0.5304.121/media/BUILD.gn 2022-12-17 12:35:59.296047028 +0100
@@ -64,12 +64,6 @@ buildflag_header("media_buildflags") {
}
}
-if (proprietary_codecs && media_use_ffmpeg) {
- assert(
- ffmpeg_branding != "Chromium",
- "proprietary codecs and ffmpeg_branding set to Chromium are incompatible")
-}
-
# Common configuration for targets in the media directory; these must not be
# exported since things like USE_NEON and USE_CRAS have different meanings
# elsewhere in the code base.

View file

@ -1,12 +0,0 @@
diff -up chromium-108.0.5359.124/media/audio/audio_opus_encoder.h.me chromium-108.0.5359.124/media/audio/audio_opus_encoder.h
--- chromium-108.0.5359.124/media/audio/audio_opus_encoder.h.me 2022-12-31 09:49:17.100277502 +0100
+++ chromium-108.0.5359.124/media/audio/audio_opus_encoder.h 2022-12-31 09:49:57.101016710 +0100
@@ -12,7 +12,7 @@
#include "media/base/audio_converter.h"
#include "media/base/audio_encoder.h"
#include "media/base/audio_timestamp_helper.h"
-#include "third_party/opus/src/include/opus.h"
+#include <opus/opus.h>
namespace media {

View file

@ -1,16 +0,0 @@
diff -up chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc.me chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc
--- chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc.me 2023-06-17 19:43:08.481952671 +0200
+++ chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc 2023-06-17 19:44:26.165349772 +0200
@@ -20,10 +20,8 @@ bool IsOrganicFirstRun() {
base::FilePath InitialPrefsPath() {
// The standard location of the initial prefs is next to the chrome binary.
- base::FilePath dir_exe;
- if (!base::PathService::Get(base::DIR_EXE, &dir_exe)) {
- return base::FilePath();
- }
+ // ...but we patch it to use /etc/chromium
+ base::FilePath dir_exe = base::FilePath("/etc/chromium");
return installer::InitialPreferences::Path(dir_exe);
}

View file

@ -1,33 +0,0 @@
diff -up chromium-108.0.5359.124/chrome/common/chrome_paths.cc.widevine-other-locations chromium-108.0.5359.124/chrome/common/chrome_paths.cc
--- chromium-108.0.5359.124/chrome/common/chrome_paths.cc.widevine-other-locations 2023-01-02 11:10:03.951330305 +0100
+++ chromium-108.0.5359.124/chrome/common/chrome_paths.cc 2023-01-02 13:42:26.781022150 +0100
@@ -319,6 +319,16 @@ bool PathProvider(int key, base::FilePat
#if BUILDFLAG(ENABLE_WIDEVINE)
case chrome::DIR_BUNDLED_WIDEVINE_CDM:
+ base::PathService::Get(base::DIR_HOME, &cur);
+ cur = cur.Append(FILE_PATH_LITERAL(".config/chromium/WidevineCdm"));
+ if (base::PathExists(cur)) {
+ break;
+ }
+ // Yes, this has an arch hardcoded in the path, but at this time, it is the only place to find libwidevinecdm.so
+ if (base::PathExists(base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so")))) {
+ cur = base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm"));
+ break;
+ }
if (!GetComponentDirectory(&cur)) {
return false;
}
cur = cur.AppendASCII(kWidevineCdmBaseDirectory);
diff -up chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn.widevine-other-locations chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn
--- chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn.widevine-other-locations 2023-01-02 11:10:45.953114153 +0100
+++ chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn 2023-01-02 11:10:45.953114153 +0100
@@ -22,7 +22,7 @@ buildflag_header("buildflags") {
flags = [
"ENABLE_WIDEVINE=$enable_widevine",
- "BUNDLE_WIDEVINE_CDM=$bundle_widevine_cdm",
+ "BUNDLE_WIDEVINE_CDM=true",
"ENABLE_WIDEVINE_CDM_COMPONENT=$enable_widevine_cdm_component",
"ENABLE_MEDIA_FOUNDATION_WIDEVINE_CDM=$enable_media_foundation_widevine_cdm",
]

View file

@ -1,12 +0,0 @@
diff -up chromium-117.0.5938.132/build/config/arm.gni.me chromium-117.0.5938.132/build/config/arm.gni
--- chromium-117.0.5938.132/build/config/arm.gni.me 2023-09-29 15:37:18.281122162 +0200
+++ chromium-117.0.5938.132/build/config/arm.gni 2023-09-29 15:38:24.855369796 +0200
@@ -140,7 +140,7 @@ if (current_cpu == "arm" || v8_current_c
# target_cpu == "arm64" filters out some cases (e.g. the ChromeOS x64
# MSAN build) where the target platform is x64, but V8 is configured to
# use the arm64 simulator.
- arm_control_flow_integrity = "standard"
+ arm_control_flow_integrity = "pac"
}
}
assert(arm_control_flow_integrity == "none" ||

View file

@ -1,12 +0,0 @@
diff -up chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h.me chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h
--- chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h.me 2023-10-04 22:18:44.259800011 +0200
+++ chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h 2023-10-04 22:28:17.068756669 +0200
@@ -28,7 +28,7 @@ constexpr unsigned long DMA_BUF_IOCTL_SY
_IOW(DMA_BUF_BASE, 0, struct dma_buf_sync);
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
+#if 0
struct dma_buf_export_sync_file {
__u32 flags;
__s32 fd;

View file

@ -1,16 +0,0 @@
fix tab crash with SIGTRAP when opening website like ge.globo.com
author: Than Ngo <than@redhat.com>
diff -up chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc.me chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc
--- chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc.me 2023-10-16 12:52:01.716573884 +0200
+++ chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc 2023-10-16 12:56:03.476075446 +0200
@@ -157,7 +157,7 @@ bool FFmpegGlue::OpenContext(bool is_loc
container_ = container_names::MediaContainerName::kContainerAVI;
// For a successfully opened file, we will get a container we've compiled in.
- CHECK_NE(container_, container_names::MediaContainerName::kContainerUnknown);
+ DCHECK_NE(container_, container_names::MediaContainerName::kContainerUnknown);
LogContainer(is_local_file, container_);
return true;

View file

@ -1,24 +0,0 @@
diff -up chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h.me chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h
--- chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h.me 2024-02-06 08:22:36.013021582 +0100
+++ chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h 2024-02-06 08:23:08.281607499 +0100
@@ -77,7 +77,7 @@ class XSLTProcessor final : public Scrip
void reset();
- static void ParseErrorFunc(void* user_data, const xmlError*);
+ static void ParseErrorFunc(void* user_data, xmlError*);
static void GenericErrorFunc(void* user_data, const char* msg, ...);
// Only for libXSLT callbacks
diff -up chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc.me chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
--- chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc.me 2024-02-06 08:14:32.368066214 +0100
+++ chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc 2024-02-06 08:23:08.282607518 +0100
@@ -66,7 +66,7 @@ void XSLTProcessor::GenericErrorFunc(voi
// It would be nice to do something with this error message.
}
-void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
+void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
FrameConsole* console = static_cast<FrameConsole*>(user_data);
if (!console)
return;

View file

@ -1,17 +0,0 @@
diff -up chromium-122.0.6261.57/build/config/compiler/BUILD.gn.me chromium-122.0.6261.57/build/config/compiler/BUILD.gn
--- chromium-122.0.6261.57/build/config/compiler/BUILD.gn.me 2024-02-23 12:32:11.248584653 +0100
+++ chromium-122.0.6261.57/build/config/compiler/BUILD.gn 2024-02-23 12:45:26.672302958 +0100
@@ -399,6 +399,13 @@ config("compiler") {
}
}
+ if (is_clang) {
+ cflags += [ "-ftrivial-auto-var-init=zero" ]
+ if (!is_ubsan && !is_ubsan_security) {
+ cflags += [ "-fwrapv" ]
+ }
+ }
+
# Linker warnings.
if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
current_os != "zos") {

View file

@ -1,12 +0,0 @@
diff -up chromium-123.0.6312.46/build/config/compiler/BUILD.gn.fstack-protector-strong chromium-123.0.6312.46/build/config/compiler/BUILD.gn
--- chromium-123.0.6312.46/build/config/compiler/BUILD.gn.fstack-protector-strong 2024-03-15 11:46:34.542248116 +0100
+++ chromium-123.0.6312.46/build/config/compiler/BUILD.gn 2024-03-15 11:59:02.970849847 +0100
@@ -382,7 +382,7 @@ config("compiler") {
} else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
if (current_os != "aix") {
# Not available on aix.
- cflags += [ "-fstack-protector" ]
+ cflags += [ "-fstack-protector-strong" ]
}
}
}

View file

@ -1,13 +0,0 @@
diff -up chromium-123.0.6312.58/chrome/browser/component_updater/screen_ai_component_installer.cc.me chromium-123.0.6312.58/chrome/browser/component_updater/screen_ai_component_installer.cc
--- chromium-123.0.6312.58/chrome/browser/component_updater/screen_ai_component_installer.cc.me 2024-03-24 10:58:43.033885904 +0100
+++ chromium-123.0.6312.58/chrome/browser/component_updater/screen_ai_component_installer.cc 2024-03-24 11:00:38.861979740 +0100
@@ -143,8 +143,7 @@ void ScreenAIComponentInstallerPolicy::D
void ManageScreenAIComponentRegistration(ComponentUpdateService* cus,
PrefService* local_state) {
if (screen_ai::ScreenAIInstallState::ShouldInstall(local_state)) {
- RegisterScreenAIComponent(cus);
- return;
+ // don't register the screenn ai service
}
// Clean up.

View file

@ -1,13 +0,0 @@
diff -up chromium-124.0.6367.60/base/allocator/partition_allocator/partition_alloc.gni.me chromium-124.0.6367.60/base/allocator/partition_allocator/partition_alloc.gni
--- chromium-124.0.6367.60/base/allocator/partition_allocator/partition_alloc.gni.me 2024-04-18 15:12:34.007397489 +0200
+++ chromium-124.0.6367.60/base/allocator/partition_allocator/partition_alloc.gni 2024-04-18 15:13:06.166051954 +0200
@@ -32,8 +32,7 @@ if (is_nacl) {
# Increases the size of the empty slot span ring.
use_large_empty_slot_span_ring = is_mac
-has_memory_tagging =
- current_cpu == "arm64" && is_clang && !is_asan && (is_linux || is_android)
+has_memory_tagging = false
declare_args() {
# Causes all the allocations to be routed via allocator_shim.cc. Usually,

View file

@ -1,11 +0,0 @@
diff -up chromium-124.0.6367.155/ui/qt/BUILD.gn.me chromium-124.0.6367.155/ui/qt/BUILD.gn
--- chromium-124.0.6367.155/ui/qt/BUILD.gn.me 2024-05-08 18:15:34.178627040 +0200
+++ chromium-124.0.6367.155/ui/qt/BUILD.gn 2024-05-08 18:29:31.162513709 +0200
@@ -61,6 +61,7 @@ template("qt_shim") {
packages = [
"Qt" + invoker.qt_version + "Core",
"Qt" + invoker.qt_version + "Widgets",
+ "Qt" + invoker.qt_version + "Gui",
]
}

View file

@ -1,13 +0,0 @@
diff -up chromium-127.0.6533.72/sandbox/linux/syscall_broker/broker_process.cc.me chromium-127.0.6533.72/sandbox/linux/syscall_broker/broker_process.cc
--- chromium-127.0.6533.72/sandbox/linux/syscall_broker/broker_process.cc.me 2024-07-30 18:09:59.483141522 +0200
+++ chromium-127.0.6533.72/sandbox/linux/syscall_broker/broker_process.cc 2024-07-30 19:42:47.122708543 +0200
@@ -163,9 +163,6 @@ bool BrokerProcess::IsSyscallBrokerable(
case __NR_stat:
case __NR_lstat:
#endif
-#if defined(__NR_fstatat)
- case __NR_fstatat:
-#endif
#if defined(__NR_fstatat64)
case __NR_fstatat64:
#endif

View file

@ -1,15 +0,0 @@
diff -up chromium-127.0.6533.72/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h.me chromium-127.0.6533.72/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h
--- chromium-127.0.6533.72/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h.me 2024-07-25 23:58:19.751616508 +0200
+++ chromium-127.0.6533.72/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h 2024-07-26 00:01:46.391800969 +0200
@@ -10,9 +10,11 @@
#include "partition_alloc/build_config.h"
#include "partition_alloc/partition_alloc_buildflags.h"
+#if 0
#if PA_BUILDFLAG(IS_ANDROID) || PA_BUILDFLAG(IS_LINUX)
#define HAS_HW_CAPS
#endif
+#endif
#if PA_BUILDFLAG(PA_ARCH_CPU_ARM64) && defined(HAS_HW_CAPS)
#include <asm/hwcap.h>

View file

@ -1,21 +0,0 @@
diff -up chromium-130.0.6723.44/components/media_router/common/providers/cast/channel/enum_table.h.me chromium-130.0.6723.44/components/media_router/common/providers/cast/channel/enum_table.h
--- chromium-130.0.6723.44/components/media_router/common/providers/cast/channel/enum_table.h.me 2024-10-15 09:58:39.571798463 +0200
+++ chromium-130.0.6723.44/components/media_router/common/providers/cast/channel/enum_table.h 2024-10-15 09:59:46.209147226 +0200
@@ -12,7 +12,6 @@
#include <cstdint>
#include <cstring>
-#include <new>
#include <optional>
#include <ostream>
#include <string_view>
@@ -368,7 +367,8 @@ class EnumTable {
private:
#ifdef ARCH_CPU_64_BITS
- alignas(std::hardware_destructive_interference_size)
+ // Align the data on a cache line boundary.
+ alignas(64)
#endif
std::initializer_list<Entry> data_;
bool is_sorted_;

View file

@ -1,19 +0,0 @@
From b9075d0e1f687f9a5cf80a7778bde99cece9fdf7 Mon Sep 17 00:00:00 2001
From: Than Ngo <than@redhat.com>
Date: Sat, 23 Nov 2024 12:33:22 +0100
Subject: [PATCH] Enable qt-ui
diff -up chromium-131.0.6778.85/ui/qt/qt_shim.cc.me chromium-131.0.6778.85/ui/qt/qt_shim.cc
--- chromium-131.0.6778.85/ui/qt/qt_shim.cc.me 2024-11-23 10:04:16.789121846 +0100
+++ chromium-131.0.6778.85/ui/qt/qt_shim.cc 2024-11-23 11:40:02.905064702 +0100
@@ -265,7 +265,7 @@ FontRenderParams QtShim::GetFontRenderPa
FontDescription QtShim::GetFontDescription() const {
QFont font = app_.font();
return {
- .family = String(font.family().toStdString().c_str()),
+ .family = String(font.family().toUtf8().constData()),
.size_pixels = font.pixelSize(),
.size_points = font.pointSize(),
.is_italic = IsStyleItalic(font.style()),

View file

@ -1,32 +0,0 @@
commit 1ab1a14ad97394d384d8dc6de51bb229625e66d6
Author: Benoît Lizé <lizeb@chromium.org>
Date: Mon Sep 16 12:01:14 2024 +0200
[cppgc] Decommit pooled pages by default
This reduces committed memory by a large amount, which matters on
Windows. See the field trial results, which measure committed memory:
https://screenshot.googleplex.com/kEBAScqJSEXuRoy
Bug: chromium:326303884
Change-Id: I619257871bcdb7ed50a71f41af341d0df634428a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5864909
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Benoit Lize <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#96107}
diff --git a/v8/src/flags/flag-definitions.h b/v8/src/flags/flag-definitions.h
index 69946faf5ed..85c4b68612e 100644
--- a/v8/src/flags/flag-definitions.h
+++ b/v8/src/flags/flag-definitions.h
@@ -821,7 +821,7 @@ DEFINE_BOOL(trace_block_coverage, false,
"trace collected block coverage information")
DEFINE_BOOL(trace_protector_invalidation, false,
"trace protector cell invalidations")
-DEFINE_BOOL(decommit_pooled_pages, false,
+DEFINE_BOOL(decommit_pooled_pages, true,
"decommit, rather than discard pooled pages")
#ifdef V8_MINORMS_STRING_SHORTCUTTING

View file

@ -1,11 +0,0 @@
diff -up chromium-132.0.6834.57/build/config/gcc/BUILD.gn.me chromium-132.0.6834.57/build/config/gcc/BUILD.gn
--- chromium-132.0.6834.57/build/config/gcc/BUILD.gn.me 2025-01-01 18:59:29.670002052 +0100
+++ chromium-132.0.6834.57/build/config/gcc/BUILD.gn 2025-01-01 20:51:11.798696436 +0100
@@ -32,7 +32,6 @@ declare_args() {
# See http://gcc.gnu.org/wiki/Visibility
config("symbol_visibility_hidden") {
cflags = [ "-fvisibility=hidden" ]
- rustflags = [ "-Zdefault-visibility=hidden" ]
# Visibility attribute is not supported on AIX.
if (current_os != "aix") {

View file

@ -1,12 +0,0 @@
diff -up chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc.me chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc
--- chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc.me 2025-02-05 13:28:17.782881439 +0100
+++ chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc 2025-02-05 13:33:15.256928027 +0100
@@ -111,7 +111,7 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol
// We don't allow H.264 parsing during demuxing since we have our own parser
// and the ffmpeg one increases memory usage unnecessarily.
- format_context_->flags |= AVFMT_FLAG_NOH264PARSE;
+ // format_context_->flags |= AVFMT_FLAG_NOH264PARSE;
// Ensures format parsing errors will bail out. From an audit on 11/2017, all
// instances were real failures. Solves bugs like http://crbug.com/710791.

View file

@ -1,34 +0,0 @@
diff -up chromium-133.0.6943.98/media/ffmpeg/ffmpeg_common.cc.than chromium-133.0.6943.98/media/ffmpeg/ffmpeg_common.cc
--- chromium-133.0.6943.98/media/ffmpeg/ffmpeg_common.cc.than 2025-02-13 11:59:31.035724118 +0100
+++ chromium-133.0.6943.98/media/ffmpeg/ffmpeg_common.cc 2025-02-14 10:39:07.825746076 +0100
@@ -76,6 +76,8 @@ const char* GetAllowedVideoDecoders() {
void ApplyCodecContextSecuritySettings(AVCodecContext* codec_context) {
// Future versions of ffmpeg may copy the allow list from the format
// context.
+ // Workaround for codec whitelist with system ffmpeg
+#if 0
if (!codec_context->codec_whitelist) {
// Note: FFmpeg will try to free this string, so we must duplicate it.
codec_context->codec_whitelist =
@@ -83,6 +85,7 @@ void ApplyCodecContextSecuritySettings(A
? GetAllowedAudioDecoders()
: GetAllowedVideoDecoders());
}
+#endif
// Note: This is security sensitive. FFmpeg may not always continue safely
// in the presence of errors. See https://crbug.com/379418979
diff -up chromium-133.0.6943.98/media/filters/ffmpeg_glue.cc.than chromium-133.0.6943.98/media/filters/ffmpeg_glue.cc
--- chromium-133.0.6943.98/media/filters/ffmpeg_glue.cc.than 2025-02-14 10:14:13.360398193 +0100
+++ chromium-133.0.6943.98/media/filters/ffmpeg_glue.cc 2025-02-14 10:36:46.762332912 +0100
@@ -131,8 +131,10 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol
// memory usage.
//
// Note: FFmpeg will try to free these strings, so we must duplicate them.
+#if 0
format_context_->codec_whitelist = av_strdup(GetAllowedAudioDecoders());
format_context_->format_whitelist = av_strdup(GetAllowedDemuxers());
+#endif
}
bool FFmpegGlue::OpenContext(bool is_local_file) {

File diff suppressed because it is too large Load diff

View file

@ -1,13 +0,0 @@
diff -up chromium-134.0.6998.23/base/containers/to_value_list.h.me chromium-134.0.6998.23/base/containers/to_value_list.h
--- chromium-134.0.6998.23/base/containers/to_value_list.h.me 2025-02-23 22:39:33.369668072 +0100
+++ chromium-134.0.6998.23/base/containers/to_value_list.h 2025-02-23 22:42:42.653990901 +0100
@@ -36,8 +36,7 @@ Value::List ToValueList(Range&& range, P
auto container = Value::List::with_capacity(std::ranges::size(range));
std::ranges::for_each(
std::forward<Range>(range),
- [&]<typename T>(T&& value) { container.Append(std::forward<T>(value)); },
- std::move(proj));
+ [&](auto&& value) { container.Append(std::invoke(proj, std::forward<decltype(*std::ranges::begin(range))>(value))); });
return container;
}

View file

@ -1,20 +0,0 @@
diff -up chromium-136.0.7103.33/third_party/node/node.gni.than chromium-136.0.7103.33/third_party/node/node.gni
--- chromium-136.0.7103.33/third_party/node/node.gni.than 2025-04-21 17:53:06.742517984 +0200
+++ chromium-136.0.7103.33/third_party/node/node.gni 2025-04-21 17:54:05.452645652 +0200
@@ -35,16 +35,5 @@ template("node") {
inputs += [ "//third_party/node/mac/node-darwin-x64/bin/node" ]
}
}
-
- # Automatically add a dependency to ":check_version" to ensure NodeJS is
- # always running the expected version, except when the ':check_version'
- # target itself is running in which case it shouldn't depend on itself.
- if (get_label_info(":" + target_name, "label_no_toolchain") !=
- "//third_party/node:check_version") {
- if (!defined(deps)) {
- deps = []
- }
- deps += [ "//third_party/node:check_version" ]
- }
}
}

View file

@ -1,12 +0,0 @@
diff -up chromium-136.0.7103.48/third_party/rust/chromium_crates_io/vendor/skrifa-0.29.2/src/glyph_name.rs.than chromium-136.0.7103.48/third_party/rust/chromium_crates_io/vendor/skrifa-0.29.2/src/glyph_name.rs
--- chromium-136.0.7103.48/third_party/rust/chromium_crates_io/vendor/skrifa-0.29.2/src/glyph_name.rs.than 2025-04-29 08:36:33.385071420 +0200
+++ chromium-136.0.7103.48/third_party/rust/chromium_crates_io/vendor/skrifa-0.29.2/src/glyph_name.rs 2025-04-29 08:42:21.465525421 +0200
@@ -94,7 +94,7 @@ impl<'a> GlyphNames<'a> {
_ => None,
};
// If name is empty string, synthesize it
- if name.as_ref().is_none_or(|s| s.is_empty()) {
+ if name.is_none() || name.as_ref().map_or(false, |s| s.is_empty()) {
return Some(GlyphName::synthesize(glyph_id));
}
Some(name.unwrap_or_else(|| GlyphName::synthesize(glyph_id)))

View file

@ -1,17 +0,0 @@
diff -up chromium-136.0.7103.48/build/config/compiler/BUILD.gn.than chromium-136.0.7103.48/build/config/compiler/BUILD.gn
--- chromium-136.0.7103.48/build/config/compiler/BUILD.gn.than 2025-04-28 15:44:08.883499599 +0200
+++ chromium-136.0.7103.48/build/config/compiler/BUILD.gn 2025-04-28 15:44:47.624639772 +0200
@@ -622,12 +622,6 @@ config("compiler") {
cflags += [ "-ffp-contract=off" ]
}
- # Enable ELF CREL (see crbug.com/357878242) for all platforms that use ELF
- # (excluding toolchains that use an older version of LLVM).
- if (is_linux && !llvm_android_mainline &&
- default_toolchain != "//build/toolchain/cros:target") {
- cflags += [ "-Wa,--crel,--allow-experimental-crel" ]
- }
}
# C11/C++11 compiler flags setup.
diff -up chromium-136.0.7103.48/tools/licenses/licenses.py.than chromium-136.0.7103.48/tools/licenses/licenses.py

View file

@ -1,23 +0,0 @@
diff -up chromium-138.0.7204.15/third_party/node/node.gni.me chromium-138.0.7204.15/third_party/node/node.gni
--- chromium-138.0.7204.15/third_party/node/node.gni.me 2025-06-03 23:20:09.000000000 +0200
+++ chromium-138.0.7204.15/third_party/node/node.gni 2025-06-09 09:59:21.788545159 +0200
@@ -44,7 +44,6 @@ template("node") {
if (!defined(deps)) {
deps = []
}
- deps += [ "//third_party/node:check_version" ]
}
}
}
diff -up chromium-138.0.7204.15/third_party/node/BUILD.gn.me chromium-138.0.7204.15/third_party/node/BUILD.gn
diff -up chromium-138.0.7204.15/third_party/protobuf/proto_library.gni.me chromium-138.0.7204.15/third_party/protobuf/proto_library.gni
--- chromium-138.0.7204.15/third_party/protobuf/proto_library.gni.me 2025-06-09 11:33:08.279645775 +0200
+++ chromium-138.0.7204.15/third_party/protobuf/proto_library.gni 2025-06-09 12:10:07.040045476 +0200
@@ -562,7 +562,6 @@ template("proto_library") {
_protoc_gen_ts_path,
"//tools/protoc_wrapper/protoc-gen-ts_proto.py",
] + _protoc_gen_ts_runtime_deps
- deps += [ "//third_party/node:check_version" ]
}
if (_generate_with_plugin) {

View file

@ -1,158 +0,0 @@
https://chromium-review.googlesource.com/c/chromium/src/+/6506529
Revert CL rolls ffmpeg for M138 as it breaks the build due to old ffmpeg version on EL9
diff -up chromium-138.0.7204.49/media/ffmpeg/ffmpeg_common.cc.me chromium-138.0.7204.49/media/ffmpeg/ffmpeg_common.cc
--- chromium-138.0.7204.49/media/ffmpeg/ffmpeg_common.cc.me 2025-06-23 23:34:26.000000000 +0200
+++ chromium-138.0.7204.49/media/ffmpeg/ffmpeg_common.cc 2025-06-25 15:13:17.958054182 +0200
@@ -263,22 +263,22 @@ AVCodecID VideoCodecToCodecID(VideoCodec
static VideoCodecProfile ProfileIDToVideoCodecProfile(int profile) {
// Clear out the CONSTRAINED & INTRA flags which are strict subsets of the
// corresponding profiles with which they're used.
- profile &= ~AV_PROFILE_H264_CONSTRAINED;
- profile &= ~AV_PROFILE_H264_INTRA;
+ profile &= ~FF_PROFILE_H264_CONSTRAINED;
+ profile &= ~FF_PROFILE_H264_INTRA;
switch (profile) {
- case AV_PROFILE_H264_BASELINE:
+ case FF_PROFILE_H264_BASELINE:
return H264PROFILE_BASELINE;
- case AV_PROFILE_H264_MAIN:
+ case FF_PROFILE_H264_MAIN:
return H264PROFILE_MAIN;
- case AV_PROFILE_H264_EXTENDED:
+ case FF_PROFILE_H264_EXTENDED:
return H264PROFILE_EXTENDED;
- case AV_PROFILE_H264_HIGH:
+ case FF_PROFILE_H264_HIGH:
return H264PROFILE_HIGH;
- case AV_PROFILE_H264_HIGH_10:
+ case FF_PROFILE_H264_HIGH_10:
return H264PROFILE_HIGH10PROFILE;
- case AV_PROFILE_H264_HIGH_422:
+ case FF_PROFILE_H264_HIGH_422:
return H264PROFILE_HIGH422PROFILE;
- case AV_PROFILE_H264_HIGH_444_PREDICTIVE:
+ case FF_PROFILE_H264_HIGH_444_PREDICTIVE:
return H264PROFILE_HIGH444PREDICTIVEPROFILE;
default:
DVLOG(1) << "Unknown profile id: " << profile;
@@ -289,23 +289,23 @@ static VideoCodecProfile ProfileIDToVide
static int VideoCodecProfileToProfileID(VideoCodecProfile profile) {
switch (profile) {
case H264PROFILE_BASELINE:
- return AV_PROFILE_H264_BASELINE;
+ return FF_PROFILE_H264_BASELINE;
case H264PROFILE_MAIN:
- return AV_PROFILE_H264_MAIN;
+ return FF_PROFILE_H264_MAIN;
case H264PROFILE_EXTENDED:
- return AV_PROFILE_H264_EXTENDED;
+ return FF_PROFILE_H264_EXTENDED;
case H264PROFILE_HIGH:
- return AV_PROFILE_H264_HIGH;
+ return FF_PROFILE_H264_HIGH;
case H264PROFILE_HIGH10PROFILE:
- return AV_PROFILE_H264_HIGH_10;
+ return FF_PROFILE_H264_HIGH_10;
case H264PROFILE_HIGH422PROFILE:
- return AV_PROFILE_H264_HIGH_422;
+ return FF_PROFILE_H264_HIGH_422;
case H264PROFILE_HIGH444PREDICTIVEPROFILE:
- return AV_PROFILE_H264_HIGH_444_PREDICTIVE;
+ return FF_PROFILE_H264_HIGH_444_PREDICTIVE;
default:
DVLOG(1) << "Unknown VideoCodecProfile: " << profile;
}
- return AV_PROFILE_UNKNOWN;
+ return FF_PROFILE_UNKNOWN;
}
SampleFormat AVSampleFormatToSampleFormat(AVSampleFormat sample_format,
@@ -441,7 +441,7 @@ bool AVCodecContextToAudioDecoderConfig(
// TODO(dalecurtis): Just use the profile from the codec context if ffmpeg
// ever starts supporting xHE-AAC.
// FFmpeg provides the (defined_profile - 1) for AVCodecContext::profile
- if (codec_context->profile == AV_PROFILE_UNKNOWN ||
+ if (codec_context->profile == FF_PROFILE_UNKNOWN ||
codec_context->profile == mp4::AAC::kXHeAAcType - 1) {
// Errors aren't fatal here, so just drop any MediaLog messages.
NullMediaLog media_log;
@@ -659,16 +659,16 @@ bool AVStreamToVideoDecoderConfig(const
break;
case VideoCodec::kVP9:
switch (codec_context->profile) {
- case AV_PROFILE_VP9_0:
+ case FF_PROFILE_VP9_0:
profile = VP9PROFILE_PROFILE0;
break;
- case AV_PROFILE_VP9_1:
+ case FF_PROFILE_VP9_1:
profile = VP9PROFILE_PROFILE1;
break;
- case AV_PROFILE_VP9_2:
+ case FF_PROFILE_VP9_2:
profile = VP9PROFILE_PROFILE2;
break;
- case AV_PROFILE_VP9_3:
+ case FF_PROFILE_VP9_3:
profile = VP9PROFILE_PROFILE3;
break;
default:
diff -up chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter.cc.me chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter.cc
--- chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter.cc.me 2025-06-23 23:34:26.000000000 +0200
+++ chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter.cc 2025-06-25 15:13:17.958541707 +0200
@@ -68,17 +68,17 @@ bool GenerateAdtsHeader(int codec,
hdr[1] |= 1;
switch (audio_profile) {
- case AV_PROFILE_AAC_MAIN:
+ case FF_PROFILE_AAC_MAIN:
break;
- case AV_PROFILE_AAC_HE:
- case AV_PROFILE_AAC_HE_V2:
- case AV_PROFILE_AAC_LOW:
+ case FF_PROFILE_AAC_HE:
+ case FF_PROFILE_AAC_HE_V2:
+ case FF_PROFILE_AAC_LOW:
hdr[2] |= (1 << 6);
break;
- case AV_PROFILE_AAC_SSR:
+ case FF_PROFILE_AAC_SSR:
hdr[2] |= (2 << 6);
break;
- case AV_PROFILE_AAC_LTP:
+ case FF_PROFILE_AAC_LTP:
hdr[2] |= (3 << 6);
break;
default:
diff -up chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc.me chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
--- chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc.me 2025-06-23 23:34:26.000000000 +0200
+++ chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc 2025-06-25 15:13:17.958839001 +0200
@@ -41,7 +41,7 @@ class FFmpegAACBitstreamConverterTest :
// Set up reasonable aac parameters
memset(&test_parameters_, 0, sizeof(AVCodecParameters));
test_parameters_.codec_id = AV_CODEC_ID_AAC;
- test_parameters_.profile = AV_PROFILE_AAC_MAIN;
+ test_parameters_.profile = FF_PROFILE_AAC_MAIN;
test_parameters_.ch_layout.nb_channels = 2;
test_parameters_.extradata = extradata_header_;
test_parameters_.extradata_size = sizeof(extradata_header_);
@@ -131,7 +131,7 @@ TEST_F(FFmpegAACBitstreamConverterTest,
EXPECT_EQ(profile, kAacMainProfile);
- test_parameters_.profile = AV_PROFILE_AAC_HE;
+ test_parameters_.profile = FF_PROFILE_AAC_HE;
FFmpegAACBitstreamConverter converter_he(&test_parameters_);
test_packet = ScopedAVPacket::Allocate();
@@ -143,7 +143,7 @@ TEST_F(FFmpegAACBitstreamConverterTest,
EXPECT_EQ(profile, kAacLowComplexityProfile);
- test_parameters_.profile = AV_PROFILE_AAC_ELD;
+ test_parameters_.profile = FF_PROFILE_AAC_ELD;
FFmpegAACBitstreamConverter converter_eld(&test_parameters_);
test_packet = ScopedAVPacket::Allocate();

Some files were not shown because too many files have changed in this diff Show more