diff --git a/main/chromium/patches/007-musl-missing-include.patch b/main/chromium/patches/007-musl-missing-include.patch deleted file mode 100644 index 00f16afb73..0000000000 --- a/main/chromium/patches/007-musl-missing-include.patch +++ /dev/null @@ -1,13 +0,0 @@ -Patch-Source: https://github.com/void-linux/void-packages/blob/378db3cf5087877588aebaaa8ca3c9d94dfb54e0/srcpkgs/chromium/patches/fix-missing-cstdint-include-musl.patch -fixed in https://github.com/google/quiche/commit/4d4820f0a959be7fa22285d114a5b5b8676f10fe --- ---- a/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h -+++ b/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h -@@ -3,6 +3,7 @@ - - #include - -+#include - #include - - #include "common/platform/api/quiche_export.h" diff --git a/main/chromium/patches/009-gdbinit.patch b/main/chromium/patches/009-gdbinit.patch index 5958631ec6..eeb2213466 100644 --- a/main/chromium/patches/009-gdbinit.patch +++ b/main/chromium/patches/009-gdbinit.patch @@ -1,7 +1,7 @@ aports is a git tree so these git commands get the wrong directory --- a/tools/gdb/gdbinit +++ b/tools/gdb/gdbinit -@@ -50,17 +50,7 @@ +@@ -49,17 +49,7 @@ def load_gdb_chrome(src_dir): def set_src_dir(compile_dir): global src_dir @@ -18,5 +18,5 @@ aports is a git tree so these git commands get the wrong directory - src_dir = src_dir.decode('utf-8').rstrip() + src_dir = os.path.abspath(os.getcwd()) - load_libcxx_pretty_printers(src_dir) - + # If there's no chrome directory in the repo root, we got the wrong git repo. + # The most common way to have this happen is to be in a git checkout of diff --git a/main/chromium/patches/010-generic-sensors-include.patch b/main/chromium/patches/010-generic-sensors-include.patch deleted file mode 100644 index e8e2563b3c..0000000000 --- a/main/chromium/patches/010-generic-sensors-include.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/services/device/public/cpp/generic_sensor/sensor_reading.h -+++ b/services/device/public/cpp/generic_sensor/sensor_reading.h -@@ -5,6 +5,8 @@ - #ifndef SERVICES_DEVICE_PUBLIC_CPP_GENERIC_SENSOR_SENSOR_READING_H_ - #define SERVICES_DEVICE_PUBLIC_CPP_GENERIC_SENSOR_SENSOR_READING_H_ - -+#include -+#include - #include - - namespace device { diff --git a/main/chromium/patches/016-musl-sandbox.patch b/main/chromium/patches/016-musl-sandbox.patch index 52c3b21050..f79b916fbb 100644 --- a/main/chromium/patches/016-musl-sandbox.patch +++ b/main/chromium/patches/016-musl-sandbox.patch @@ -92,8 +92,9 @@ index 2b78a0c..b6fedb5 100644 #include "sandbox/linux/system_headers/x86_64_linux_syscalls.h" --- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc +++ b/sandbox/policy/linux/bpf_renderer_policy_linux.cc -@@ -94,6 +94,9 @@ +@@ -94,6 +94,10 @@ case __NR_pwrite64: ++ case __NR_pwritev2: case __NR_sched_get_priority_max: case __NR_sched_get_priority_min: + case __NR_sched_getparam: diff --git a/main/chromium/patches/019-musl-no-execinfo.patch b/main/chromium/patches/019-musl-no-execinfo.patch index dc298fd5fc..74479195e3 100644 --- a/main/chromium/patches/019-musl-no-execinfo.patch +++ b/main/chromium/patches/019-musl-no-execinfo.patch @@ -66,14 +66,3 @@ for discussion about this, see https://www.openwall.com/lists/musl/2021/07/16/1 #else os << "StackTrace::OutputToStream not implemented."; ---- a/base/debug/stack_trace_unittest.cc -+++ b/base/debug/stack_trace_unittest.cc -@@ -33,7 +33,7 @@ - typedef testing::Test StackTraceTest; - #endif - --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if !defined(__UCLIBC__) && !defined(_AIX) && defined(__GLIBC__) - // StackTrace::OutputToStream() is not implemented under uclibc, nor AIX. - // See https://crbug.com/706728 - diff --git a/main/chromium/patches/020-musl-no-mallinfo.patch b/main/chromium/patches/020-musl-no-mallinfo.patch index 8c9a44c00e..fa8dc0384b 100644 --- a/main/chromium/patches/020-musl-no-mallinfo.patch +++ b/main/chromium/patches/020-musl-no-mallinfo.patch @@ -1,9 +1,126 @@ musl does not implement mallinfo()/mallinfo2() (or rather, malloc-ng, musl's allocator, doesn't) -- +--- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc ++++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc +@@ -2,8 +2,6 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + +-#include "partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" +- + #include + #include + #include +@@ -25,6 +23,7 @@ + #include "partition_alloc/partition_root.h" + #include "partition_alloc/partition_stats.h" + #include "partition_alloc/shim/allocator_dispatch.h" ++#include "partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" + #include "partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_internal.h" + #include "partition_alloc/shim/allocator_shim_internals.h" + +@@ -352,7 +351,7 @@ void* PartitionReallocUnchecked(void* address, size_t size, void* context) { + #if PA_BUILDFLAG(IS_CAST_ANDROID) + extern "C" { + void __real_free(void*); +-} // extern "C" ++} // extern "C" + #endif // PA_BUILDFLAG(IS_CAST_ANDROID) + + void PartitionFree(void* object, void* context) { +@@ -646,7 +645,7 @@ SHIM_ALWAYS_EXPORT int mallopt(int cmd, int value) __THROW { + + #endif // !PA_BUILDFLAG(IS_APPLE) && !PA_BUILDFLAG(IS_ANDROID) + +-#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) ++#if 0 + SHIM_ALWAYS_EXPORT struct mallinfo mallinfo(void) __THROW { + partition_alloc::SimplePartitionStatsDumper allocator_dumper; + Allocator()->DumpStats("malloc", true, &allocator_dumper); +--- a/base/process/process_metrics_posix.cc ++++ b/base/process/process_metrics_posix.cc +@@ -2,8 +2,6 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + +-#include "base/process/process_metrics.h" +- + #include + #include + #include +@@ -12,6 +10,7 @@ + + #include "base/allocator/buildflags.h" + #include "base/logging.h" ++#include "base/process/process_metrics.h" + #include "build/blink_buildflags.h" + #include "build/build_config.h" + +@@ -71,8 +70,9 @@ size_t GetMaxFds() { + max_fds = nofile.rlim_cur; + } + +- if (max_fds > INT_MAX) ++ if (max_fds > INT_MAX) { + max_fds = INT_MAX; ++ } + + return static_cast(max_fds); + } +@@ -90,8 +90,9 @@ void IncreaseFdLimitTo(unsigned int max_descriptors) { + struct rlimit limits; + if (getrlimit(RLIMIT_NOFILE, &limits) == 0) { + rlim_t new_limit = max_descriptors; +- if (max_descriptors <= limits.rlim_cur) ++ if (max_descriptors <= limits.rlim_cur) { + return; ++ } + if (limits.rlim_max > 0 && limits.rlim_max < max_descriptors) { + new_limit = limits.rlim_max; + } +@@ -106,7 +107,8 @@ void IncreaseFdLimitTo(unsigned int max_descriptors) { + + #endif // !BUILDFLAG(IS_FUCHSIA) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || \ ++ BUILDFLAG(IS_ANDROID) + namespace { + + size_t GetMallocUsageMallinfo() { +@@ -132,7 +134,8 @@ size_t ProcessMetrics::GetMallocUsage() { + malloc_statistics_t stats = {0}; + malloc_zone_statistics(nullptr, &stats); + return stats.size_in_use; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#elif (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || \ ++ BUILDFLAG(IS_ANDROID) + return GetMallocUsageMallinfo(); + #elif BUILDFLAG(IS_FUCHSIA) + // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. +diff --git a/base/trace_event/malloc_dump_provider.cc b/base/trace_event/malloc_dump_provider.cc +index e37fc69c00..394f5dfdbb 100644 --- a/base/trace_event/malloc_dump_provider.cc +++ b/base/trace_event/malloc_dump_provider.cc -@@ -185,7 +185,6 @@ +@@ -7,8 +7,6 @@ + #pragma allow_unsafe_buffers + #endif + +-#include "base/trace_event/malloc_dump_provider.h" +- + #include + + #include +@@ -19,6 +17,7 @@ + #include "base/metrics/histogram_functions.h" + #include "base/numerics/safe_conversions.h" + #include "base/strings/stringprintf.h" ++#include "base/trace_event/malloc_dump_provider.h" + #include "base/trace_event/process_memory_dump.h" + #include "base/trace_event/traced_value.h" + #include "build/build_config.h" +@@ -189,7 +188,6 @@ void ReportMallinfoStats(ProcessMemoryDump* pmd, #define MALLINFO2_FOUND_IN_LIBC struct mallinfo2 info = mallinfo2(); #endif @@ -11,15 +128,15 @@ musl does not implement mallinfo()/mallinfo2() #if !defined(MALLINFO2_FOUND_IN_LIBC) struct mallinfo info = mallinfo(); #endif -@@ -205,6 +204,7 @@ - sys_alloc_dump->AddScalar(MemoryAllocatorDump::kNameSize, - MemoryAllocatorDump::kUnitsBytes, info.uordblks); +@@ -211,6 +209,7 @@ void ReportMallinfoStats(ProcessMemoryDump* pmd, + MemoryAllocatorDump::kUnitsBytes, + total_allocated_size); } +#endif // defined(__GLIBC__) && defined(__GLIBC_PREREQ) } #endif -@@ -339,7 +340,7 @@ +@@ -368,7 +367,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, &allocated_objects_count); #elif BUILDFLAG(IS_FUCHSIA) // TODO(fuchsia): Port, see https://crbug.com/706592. @@ -28,97 +145,16 @@ musl does not implement mallinfo()/mallinfo2() ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size, &allocated_objects_size, &allocated_objects_count); #endif ---- a/base/process/process_metrics_posix.cc -+++ b/base/process/process_metrics_posix.cc -@@ -105,7 +105,7 @@ - - #endif // !BUILDFLAG(IS_FUCHSIA) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) - namespace { - - size_t GetMallocUsageMallinfo() { -@@ -123,7 +123,7 @@ - } - - } // namespace --#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || -+#endif // (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || - // BUILDFLAG(IS_ANDROID) - - size_t ProcessMetrics::GetMallocUsage() { -@@ -131,9 +131,9 @@ - malloc_statistics_t stats = {0}; - malloc_zone_statistics(nullptr, &stats); - return stats.size_in_use; --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#elif (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) - return GetMallocUsageMallinfo(); --#elif BUILDFLAG(IS_FUCHSIA) -+#else - // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. - return 0; - #endif ---- ./third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc.orig -+++ ./third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc -@@ -35,7 +35,7 @@ - - MemoryUsage GetMemoryUsage() { - MemoryUsage result; --#ifdef __linux__ -+#if defined(__linux__) && defined(__GLIBC__) - rusage res; +diff --git a/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc b/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc +index 9a4428ec45..07defd5ded 100644 +--- a/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc ++++ b/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc +@@ -43,7 +43,7 @@ MemoryUsage GetMemoryUsage() { if (getrusage(RUSAGE_SELF, &res) == 0) { - result.max_rss_kb = res.ru_maxrss; ---- ./third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc -+++ ./third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc.orig -@@ -86,11 +86,11 @@ - } - - size_t Process::GetMallocUsage() { --#if defined(HAVE_MALLINFO2) -+#if defined(HAVE_MALLINFO2) && defined(__GLIBC__) - struct mallinfo2 mi; - mi = ::mallinfo2(); - return mi.uordblks; --#elif defined(HAVE_MALLINFO) -+#elif defined(HAVE_MALLINFO) && defined(__GLIBC__) - struct mallinfo mi; - mi = ::mallinfo(); - return mi.uordblks; - ---- ./third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h.orig 2019-09-30 13:03:42.556880537 -0400 -+++ ./third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h 2019-09-30 13:07:27.989821227 -0400 -@@ -122,7 +122,9 @@ - /* #undef HAVE_MALLCTL */ - - /* Define to 1 if you have the `mallinfo' function. */ -+#if defined(__GLIBC__) - #define HAVE_MALLINFO 1 -+#endif - - /* Define to 1 if you have the header file. */ - #define HAVE_MALLOC_H 1 ---- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc -+++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc -@@ -717,7 +717,7 @@ - - #endif // !PA_BUILDFLAG(IS_APPLE) && !PA_BUILDFLAG(IS_ANDROID) - --#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) -+#if 0 - SHIM_ALWAYS_EXPORT struct mallinfo mallinfo(void) __THROW { - partition_alloc::SimplePartitionStatsDumper allocator_dumper; - Allocator()->DumpStats("malloc", true, &allocator_dumper); ---- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc -+++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc -@@ -24,7 +24,7 @@ - #if PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) - - // Platforms on which we override weak libc symbols. --#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) -+#if (PA_BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || PA_BUILDFLAG(IS_CHROMEOS) - - PA_NOINLINE void FreeForTest(void* data) { - free(data); + result.mem_footprint_kb = res.ru_maxrss; + } +-#if defined(__NO_MALLINFO__) ++#if 1 + result.total_allocated_bytes = -1; + result.in_use_allocated_bytes = -1; + #elif defined(__GLIBC__) && __GLIBC_MINOR__ >= 33 diff --git a/main/chromium/patches/023-aarch64-no-memtag.patch b/main/chromium/patches/023-aarch64-no-memtag.patch index d80a39691e..4e8deb6e61 100644 --- a/main/chromium/patches/023-aarch64-no-memtag.patch +++ b/main/chromium/patches/023-aarch64-no-memtag.patch @@ -3,11 +3,13 @@ missing some required interface headers for it, and it's not clear how to make the partalloc support code for it work. note: also disables bti -- +diff --git a/base/allocator/partition_allocator/partition_alloc.gni b/base/allocator/partition_allocator/partition_alloc.gni +index e7f2f679b5..bafdbde410 100644 --- a/base/allocator/partition_allocator/partition_alloc.gni +++ b/base/allocator/partition_allocator/partition_alloc.gni -@@ -29,8 +29,7 @@ - assert(false, "Unknown CPU: $current_cpu") - } +@@ -30,8 +30,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) @@ -15,27 +17,29 @@ note: also disables bti declare_args() { # Causes all the allocations to be routed via allocator_shim.cc. Usually, +diff --git a/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h b/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h +index 600d4ed784..37defaa364 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h +++ b/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h @@ -10,7 +10,7 @@ #include "partition_alloc/build_config.h" - #include "partition_alloc/partition_alloc_buildflags.h" + #include "partition_alloc/buildflags.h" -#if PA_BUILDFLAG(IS_ANDROID) || PA_BUILDFLAG(IS_LINUX) +#if PA_BUILDFLAG(IS_ANDROID) || (PA_BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) #define HAS_HW_CAPS #endif +diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc +index 295d0cebc2..2a9b409968 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc -@@ -8,8 +8,8 @@ +@@ -8,7 +8,7 @@ + #include "partition_alloc/buildflags.h" #include "partition_alloc/page_allocator.h" - #include "partition_alloc/partition_alloc_buildflags.h" -#if PA_BUILDFLAG(HAS_MEMORY_TAGGING) || \ -- (defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1)) -+#if 0 && (PA_BUILDFLAG(HAS_MEMORY_TAGGING) || \ -+ (defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1))) ++#if 0 && PA_BUILDFLAG(HAS_MEMORY_TAGGING) || \ + (defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT == 1)) struct __ifunc_arg_t; - #include "partition_alloc/aarch64_support.h" diff --git a/main/chromium/patches/025-random-fixes.patch b/main/chromium/patches/025-random-fixes.patch deleted file mode 100644 index 5bfdef58d7..0000000000 --- a/main/chromium/patches/025-random-fixes.patch +++ /dev/null @@ -1,94 +0,0 @@ -Patch-Source: https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/blob/c073b0c20935d7eb452732e0f3b2860a96c3db21/random-build-fixes.patch --- -diff --git a/chrome/browser/download/bubble/download_bubble_update_service.cc b/chrome/browser/download/bubble/download_bubble_update_service.cc -index 41b647f7b44..8940c6bb7fc 100644 ---- a/chrome/browser/download/bubble/download_bubble_update_service.cc -+++ b/chrome/browser/download/bubble/download_bubble_update_service.cc -@@ -91,7 +91,7 @@ ItemSortKey GetSortKey(const Item& item) { - // Helper to get an iterator to the last element in the cache. The cache - // must not be empty. - template --SortedItems::const_iterator GetLastIter(const SortedItems& cache) { -+typename SortedItems::const_iterator GetLastIter(const SortedItems& cache) { - CHECK(!cache.empty()); - auto it = cache.end(); - return std::prev(it); -@@ -967,9 +967,9 @@ bool DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheImpl( - } - - template --SortedItems::iterator -+typename SortedItems::iterator - DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter( -- SortedItems::iterator iter, -+ typename SortedItems::iterator iter, - SortedItems& cache, - IterMap& iter_map) { - CHECK(iter != cache.end()); -diff --git a/chrome/test/chromedriver/capabilities.cc b/chrome/test/chromedriver/capabilities.cc -index c0708681ebd..98b8494d170 100644 ---- a/chrome/test/chromedriver/capabilities.cc -+++ b/chrome/test/chromedriver/capabilities.cc -@@ -355,7 +355,7 @@ Status ParseMobileEmulation(const base::Value& option, - "'version' field of type string"); - } - -- brands.emplace_back(*brand, *version); -+ brands.emplace_back(BrandVersion{*brand, *version}); - } - - client_hints.brands = std::move(brands); -@@ -392,7 +392,7 @@ Status ParseMobileEmulation(const base::Value& option, - "a 'version' field of type string"); - } - -- full_version_list.emplace_back(*brand, *version); -+ full_version_list.emplace_back(BrandVersion{*brand, *version}); - } - - client_hints.full_version_list = std::move(full_version_list); -diff --git a/components/optimization_guide/core/tflite_model_executor.h b/components/optimization_guide/core/tflite_model_executor.h -index c4f750f4684..b5635f4108b 100644 ---- a/components/optimization_guide/core/tflite_model_executor.h -+++ b/components/optimization_guide/core/tflite_model_executor.h -@@ -189,7 +189,7 @@ class TFLiteModelExecutor : public ModelExecutor { - void SendForBatchExecution( - BatchExecutionCallback callback_on_complete, - base::TimeTicks start_time, -- ModelExecutor::ConstRefInputVector inputs) -+ typename ModelExecutor::ConstRefInputVector inputs) - override { - DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -diff --git a/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc b/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc -index 2dc0b304092..a82f255090b 100644 ---- a/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc -+++ b/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc -@@ -169,7 +169,7 @@ class HTMLFastPathParser { - using Span = base::span; - using USpan = base::span; - // 32 matches that used by HTMLToken::Attribute. -- typedef std::conditional, -+ typedef typename std::conditional, - UCharLiteralBuffer<32>, - LCharLiteralBuffer<32>>::type LiteralBufferType; - typedef UCharLiteralBuffer<32> UCharLiteralBufferType; -diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc -index f0b49139147..a308fb67982 100644 ---- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc -+++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc -@@ -91,12 +91,12 @@ void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags, - case kGradient: - GetCanvasGradient()->GetGradient()->ApplyToFlags(flags, SkMatrix::I(), - ImageDrawOptions()); -- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha)); -+ flags.setColor(SkColor4f{0.0f, 0.0f, 0.0f, global_alpha}); - break; - case kImagePattern: - GetCanvasPattern()->GetPattern()->ApplyToFlags( - flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform())); -- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha)); -+ flags.setColor(SkColor4f{0.0f, 0.0f, 0.0f, global_alpha}); - break; - default: - NOTREACHED(); diff --git a/main/chromium/patches/027-temp-failure-retry.patch b/main/chromium/patches/027-temp-failure-retry.patch index 560aa6578c..dc9ac6fc44 100644 --- a/main/chromium/patches/027-temp-failure-retry.patch +++ b/main/chromium/patches/027-temp-failure-retry.patch @@ -1,18 +1,21 @@ random glibc macro, not provided by musl. https://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html +diff --git a/sandbox/linux/suid/process_util.h b/sandbox/linux/suid/process_util.h +index b0b92c1bcc..db6a122ea8 100644 --- a/sandbox/linux/suid/process_util.h +++ b/sandbox/linux/suid/process_util.h -@@ -11,6 +11,14 @@ - #include +@@ -12,6 +12,15 @@ + #include #include -+// Some additional functions -+# define TEMP_FAILURE_RETRY(expression) \ -+ (__extension__ \ -+ ({ long int __result; \ -+ do __result = (long int) (expression); \ -+ while (__result == -1L && errno == EINTR); \ -+ __result; })) ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__({ \ ++ long int __result; \ ++ do \ ++ __result = (long int)(expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; \ ++ })) + // This adjusts /proc/process/oom_score_adj so the Linux OOM killer // will prefer certain process types over others. The range for the diff --git a/main/chromium/patches/032-dawn-platform-ppc64.patch b/main/chromium/patches/032-dawn-platform-ppc64.patch index 7d064ed202..1ce6a2ca50 100644 --- a/main/chromium/patches/032-dawn-platform-ppc64.patch +++ b/main/chromium/patches/032-dawn-platform-ppc64.patch @@ -1,18 +1,10 @@ -From f815e833c946a59620a2ca9df37a1da746f61460 Mon Sep 17 00:00:00 2001 -From: q66 -Date: Sat, 1 Oct 2022 00:21:09 +0000 -Subject: [PATCH] fix dawn build for ppc64 - ---- - third_party/dawn/src/dawn/common/Assert.cpp | 4 ++-- - third_party/dawn/src/dawn/common/Platform.h | 10 +++++----- - 2 files changed, 7 insertions(+), 7 deletions(-) - +ppc64 also defines ppc, so the order is wrong +-- diff --git a/third_party/dawn/src/dawn/common/Platform.h b/third_party/dawn/src/dawn/common/Platform.h -index 39d5eb41..2011367d 100644 +index 165c5f20b7..6f0f6b7bed 100644 --- a/third_party/dawn/src/dawn/common/Platform.h +++ b/third_party/dawn/src/dawn/common/Platform.h -@@ -158,10 +158,10 @@ +@@ -159,10 +162,10 @@ #elif defined(__s390x__) #define DAWN_PLATFORM_IS_S390X 1 @@ -23,14 +15,14 @@ index 39d5eb41..2011367d 100644 +#elif defined(__PPC__) +#define DAWN_PLATFORM_IS_PPC 1 - #else - #error "Unsupported platform." -@@ -185,7 +185,7 @@ + #elif defined(__wasm32__) + #define DAWN_PLATFORM_IS_WASM32 1 +@@ -185,7 +188,7 @@ static_assert(sizeof(sizeof(char)) == 8, "Expect sizeof(size_t) == 8"); #elif defined(DAWN_PLATFORM_IS_I386) || defined(DAWN_PLATFORM_IS_ARM32) || \ defined(DAWN_PLATFORM_IS_RISCV32) || defined(DAWN_PLATFORM_IS_MIPS32) || \ - defined(DAWN_PLATFORM_IS_S390) || defined(DAWN_PLATFORM_IS_PPC32) || \ -+ defined(DAWN_PLATFORM_IS_S390) || defined(DAWN_PLATFORM_IS_PPC) || \ ++ defined(DAWN_PLATFORM_IS_S390) || defined(DAWN_PLATFORM_IS_PPC) || \ defined(DAWN_PLATFORM_IS_LOONGARCH32) || defined(DAWN_PLATFORM_IS_WASM32) #define DAWN_PLATFORM_IS_32_BIT 1 static_assert(sizeof(sizeof(char)) == 4, "Expect sizeof(size_t) == 4"); diff --git a/main/chromium/patches/038-misc-fixes.patch b/main/chromium/patches/038-misc-fixes.patch index 918a90a477..2dccf40f7c 100644 --- a/main/chromium/patches/038-misc-fixes.patch +++ b/main/chromium/patches/038-misc-fixes.patch @@ -1,5 +1,7 @@ +sys hwids, no git in vpx regen, fix shim headers +-- diff --git a/services/device/public/cpp/usb/BUILD.gn b/services/device/public/cpp/usb/BUILD.gn -index 102dc6e6..cea06c7e 100644 +index 04d08955d7..ddf90a76ec 100644 --- a/services/device/public/cpp/usb/BUILD.gn +++ b/services/device/public/cpp/usb/BUILD.gn @@ -2,7 +2,7 @@ @@ -11,171 +13,28 @@ index 102dc6e6..cea06c7e 100644 generated_ids = "$target_gen_dir/usb_ids_gen.cc" action("usb_device_ids") { -diff --git a/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc b/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc -index 7b968973..caa4ea5a 100644 ---- a/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc -+++ b/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc -@@ -138,11 +138,11 @@ class PendingStartElementNSCallback final - attribute_count_(attribute_count), - defaulted_count_(defaulted_count) { - namespaces_ = static_cast( -- xmlMalloc(sizeof(xmlChar*) * namespace_count * 2)); -+ malloc(sizeof(xmlChar*) * namespace_count * 2)); - for (int i = 0; i < namespace_count * 2; ++i) - namespaces_[i] = xmlStrdup(namespaces[i]); - attributes_ = static_cast( -- xmlMalloc(sizeof(xmlChar*) * attribute_count * 5)); -+ malloc(sizeof(xmlChar*) * attribute_count * 5)); - for (int i = 0; i < attribute_count; ++i) { - // Each attribute has 5 elements in the array: - // name, prefix, uri, value and an end pointer. -@@ -157,12 +157,12 @@ class PendingStartElementNSCallback final - - ~PendingStartElementNSCallback() override { - for (int i = 0; i < namespace_count_ * 2; ++i) -- xmlFree(namespaces_[i]); -- xmlFree(namespaces_); -+ free(namespaces_[i]); -+ free(namespaces_); - for (int i = 0; i < attribute_count_; ++i) - for (int j = 0; j < 4; ++j) -- xmlFree(attributes_[i * 5 + j]); -- xmlFree(attributes_); -+ free(attributes_[i * 5 + j]); -+ free(attributes_); - } - - void Call(XMLDocumentParser* parser) override { -@@ -210,7 +210,7 @@ class PendingCharactersCallback final - chars_(xmlStrndup(chars, length)), - length_(length) {} - -- ~PendingCharactersCallback() override { xmlFree(chars_); } -+ ~PendingCharactersCallback() override { free(chars_); } - - void Call(XMLDocumentParser* parser) override { - parser->Characters(chars_, length_); -@@ -294,7 +294,7 @@ class PendingErrorCallback final : public XMLDocumentParser::PendingCallback { - type_(type), - message_(xmlStrdup(message)) {} - -- ~PendingErrorCallback() override { xmlFree(message_); } -+ ~PendingErrorCallback() override { free(message_); } - - void Call(XMLDocumentParser* parser) override { - parser->HandleError(type_, reinterpret_cast(message_), -diff --git a/third_party/blink/renderer/core/xml/xsl_style_sheet_libxslt.cc b/third_party/blink/renderer/core/xml/xsl_style_sheet_libxslt.cc -index 4757639f..fe85c583 100644 ---- a/third_party/blink/renderer/core/xml/xsl_style_sheet_libxslt.cc -+++ b/third_party/blink/renderer/core/xml/xsl_style_sheet_libxslt.cc -@@ -190,7 +190,7 @@ void XSLStyleSheet::LoadChildSheets() { - xmlChar* uri_ref = - xsltGetNsProp(curr, (const xmlChar*)"href", XSLT_NAMESPACE); - LoadChildSheet(String::FromUTF8((const char*)uri_ref)); -- xmlFree(uri_ref); -+ free(uri_ref); - } else { - break; - } -@@ -204,7 +204,7 @@ void XSLStyleSheet::LoadChildSheets() { - xmlChar* uri_ref = - xsltGetNsProp(curr, (const xmlChar*)"href", XSLT_NAMESPACE); - LoadChildSheet(String::FromUTF8((const char*)uri_ref)); -- xmlFree(uri_ref); -+ free(uri_ref); - } - curr = curr->next; - } -@@ -294,8 +294,8 @@ xmlDocPtr XSLStyleSheet::LocateStylesheetSubResource(xmlDocPtr parent_doc, - xmlChar* child_uri = - xmlBuildURI((const xmlChar*)import_href.c_str(), base); - bool equal_ur_is = xmlStrEqual(uri, child_uri); -- xmlFree(base); -- xmlFree(child_uri); -+ free(base); -+ free(child_uri); - if (equal_ur_is) { - child->MarkAsProcessed(); - return child->GetDocument(); -diff --git a/third_party/blink/renderer/core/xml/xslt_extensions.cc b/third_party/blink/renderer/core/xml/xslt_extensions.cc -index 9f7471a4..78a51f92 100644 ---- a/third_party/blink/renderer/core/xml/xslt_extensions.cc -+++ b/third_party/blink/renderer/core/xml/xslt_extensions.cc -@@ -69,7 +69,7 @@ static void ExsltNodeSetFunction(xmlXPathParserContextPtr ctxt, int nargs) { - CHECK(ret); - - if (strval) -- xmlFree(strval); -+ free(strval); - - valuePush(ctxt, ret); - } -diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc -index 133e0b33..9c18520b 100644 ---- a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc -+++ b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc -@@ -114,7 +114,7 @@ static xmlDocPtr DocLoaderFunc(const xmlChar* uri, - xmlChar* base = xmlNodeGetBase(context->document->doc, context->node); - KURL url(KURL(reinterpret_cast(base)), - reinterpret_cast(uri)); -- xmlFree(base); -+ free(base); - - ResourceLoaderOptions fetch_options(nullptr /* world */); - fetch_options.initiator_info.name = fetch_initiator_type_names::kXml; -diff --git a/third_party/blink/renderer/core/xml/xslt_unicode_sort.cc b/third_party/blink/renderer/core/xml/xslt_unicode_sort.cc -index 56c09c37..916f5e7d 100644 ---- a/third_party/blink/renderer/core/xml/xslt_unicode_sort.cc -+++ b/third_party/blink/renderer/core/xml/xslt_unicode_sort.cc -@@ -327,18 +327,18 @@ void XsltUnicodeSortFunction(xsltTransformContextPtr ctxt, - comp = static_cast(sorts[j]->psvi); - if (tempstype[j] == 1) { - // The data-type needs to be recomputed each time. -- xmlFree(const_cast(comp->stype)); -+ free(const_cast(comp->stype)); - comp->stype = nullptr; - } - if (temporder[j] == 1) { - // The order needs to be recomputed each time. -- xmlFree(const_cast(comp->order)); -+ free(const_cast(comp->order)); - comp->order = nullptr; - } - if (results_tab[j]) { - for (int i = 0; i < len; ++i) - xmlXPathFreeObject(results_tab[j][i]); -- xmlFree(results_tab[j]); -+ free(results_tab[j]); - } - } - diff --git a/third_party/libvpx/generate_gni.sh b/third_party/libvpx/generate_gni.sh -index be1f486d..8bc7540a 100755 +index a605ebb3ab..680a374dc2 100755 --- a/third_party/libvpx/generate_gni.sh +++ b/third_party/libvpx/generate_gni.sh -@@ -598,6 +598,6 @@ gn format --in-place $BASE_DIR/BUILD.gn - gn format --in-place $BASE_DIR/libvpx_srcs.gni +@@ -384,7 +384,6 @@ EOF + } + + # Fetch the latest tags; used in creating vpx_version.h. +-git -C "${LIBVPX_SRC_DIR}" fetch --tags + + find_duplicates + +@@ -618,7 +617,6 @@ cd $BASE_DIR + rm -rf $TEMP_DIR cd $BASE_DIR/$LIBVPX_SRC_DIR -update_readme -+#update_readme cd $BASE_DIR -diff --git a/third_party/libxml/chromium/xml_reader.cc b/third_party/libxml/chromium/xml_reader.cc -index 4f15c50e..7c2428b1 100644 ---- a/third_party/libxml/chromium/xml_reader.cc -+++ b/third_party/libxml/chromium/xml_reader.cc -@@ -17,7 +17,7 @@ namespace { - // Same as XmlStringToStdString but also frees |xmlstring|. - std::string XmlStringToStdStringWithDelete(xmlChar* xmlstring) { - std::string result = XmlStringToStdString(xmlstring); -- xmlFree(xmlstring); -+ free(xmlstring); - return result; - } - + git cl format > /dev/null \ diff --git a/tools/generate_shim_headers/generate_shim_headers.py b/tools/generate_shim_headers/generate_shim_headers.py -index 8df3f146..1b7a4b46 100755 +index 8df3f14601..1b7a4b469a 100755 --- a/tools/generate_shim_headers/generate_shim_headers.py +++ b/tools/generate_shim_headers/generate_shim_headers.py @@ -18,7 +18,7 @@ import sys diff --git a/main/chromium/patches/042-disable-mei-preload.patch b/main/chromium/patches/042-disable-mei-preload.patch index 0ce45f5847..9824fb58a8 100644 --- a/main/chromium/patches/042-disable-mei-preload.patch +++ b/main/chromium/patches/042-disable-mei-preload.patch @@ -1,13 +1,15 @@ -# Disables use of a binary for preloading the Media Engagement index -# Said binary is: chrome/browser/resources/media/mei_preload/preloaded_data.pb -# According to media/base/media_switches (for PreloadMediaEngagementData), it -# "enables a list of origins to be considered as having a high MEI until there -# is enough local data to determine the user's preferred behavior." This feature -# does not seem to outweigh the benefit of removing the binary, thus this patch. - +Disables use of a binary for preloading the Media Engagement index +Said binary is: chrome/browser/resources/media/mei_preload/preloaded_data.pb +According to media/base/media_switches (for PreloadMediaEngagementData), it +"enables a list of origins to be considered as having a high MEI until there +is enough local data to determine the user's preferred behavior." This feature +does not seem to outweigh the benefit of removing the binary, thus this patch. +-- +diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn +index 19c940ccf3..9b45db7d91 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -382,7 +382,6 @@ +@@ -386,7 +386,6 @@ if (!is_android && !is_mac) { } data_deps += [ @@ -15,9 +17,11 @@ "//components/privacy_sandbox/privacy_sandbox_attestations/preload:component", "//third_party/widevine/cdm", ] +diff --git a/chrome/installer/linux/BUILD.gn b/chrome/installer/linux/BUILD.gn +index 51f7c978a0..e4bd1692d6 100644 --- a/chrome/installer/linux/BUILD.gn +++ b/chrome/installer/linux/BUILD.gn -@@ -68,8 +68,6 @@ +@@ -68,8 +68,6 @@ packaging_files = packaging_files_binaries + [ "$root_out_dir/xdg-mime", "$root_out_dir/xdg-settings", "$root_out_dir/locales/en-US.pak", @@ -26,11 +30,11 @@ "$root_out_dir/PrivacySandboxAttestationsPreloaded/manifest.json", "$root_out_dir/PrivacySandboxAttestationsPreloaded/privacy-sandbox-attestations.dat", ] -@@ -401,7 +399,6 @@ group("installer_deps") { +@@ -374,7 +372,6 @@ group("installer_deps") { "//chrome", "//chrome:packed_resources", "//chrome/browser/enterprise/connectors/device_trust/key_management/installer/management_service:chrome_management_service", - "//chrome/browser/resources/media/mei_preload:component", "//components/crash/core/app:chrome_crashpad_handler", + "//components/privacy_sandbox/privacy_sandbox_attestations/preload:component", "//sandbox/linux:chrome_sandbox", - ] diff --git a/main/chromium/patches/999-ppc64le-support.patch b/main/chromium/patches/999-ppc64le-support.patch index 1bedc7c42e..b9637a659f 100644 --- a/main/chromium/patches/999-ppc64le-support.patch +++ b/main/chromium/patches/999-ppc64le-support.patch @@ -5,10 +5,10 @@ Date: Tue Dec 19 01:54:40 2023 +0100 unified ppc64le support patch diff --git a/base/allocator/partition_allocator/partition_alloc.gni b/base/allocator/partition_allocator/partition_alloc.gni -index 1471292631..01b6b48dc8 100644 +index bafdbde410..17fae882eb 100644 --- a/base/allocator/partition_allocator/partition_alloc.gni +++ b/base/allocator/partition_allocator/partition_alloc.gni -@@ -16,7 +16,7 @@ if (is_nacl) { +@@ -19,7 +19,7 @@ if (is_nacl) { # NaCl targets don't use 64-bit pointers. has_64_bit_pointers = false } else if (current_cpu == "x64" || current_cpu == "arm64" || @@ -18,10 +18,10 @@ index 1471292631..01b6b48dc8 100644 } else if (current_cpu == "x86" || current_cpu == "arm") { has_64_bit_pointers = false diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h -index cb6116c438..ba3d8c1c58 100644 +index 6516c2026e..7d32eeddeb 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h -@@ -97,7 +97,7 @@ +@@ -97,7 +97,7 @@ PageAllocationGranularityShift() { page_characteristics.shift.store(shift, std::memory_order_relaxed); } return shift; @@ -31,10 +31,10 @@ index cb6116c438..ba3d8c1c58 100644 // sizes. Since 64kB is the de facto standard on the platform and binaries // compiled for 64kB are likely to work on 4kB systems, 64kB is a good choice diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h -index cddebf7f8e..d687ad6155 100644 +index a3db353a06..d1d617a8b2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h -@@ -111,11 +111,6 @@ +@@ -111,11 +111,6 @@ PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t PartitionPageShift() { return 16; // 64 KiB } @@ -47,7 +47,7 @@ index cddebf7f8e..d687ad6155 100644 PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t PartitionPageShift() { diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h -index 508780930b..e79ab777f7 100644 +index 73c3ddc712..e685f5a6a5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h @@ -28,13 +28,17 @@ namespace internal { @@ -70,7 +70,7 @@ index 508780930b..e79ab777f7 100644 class PA_LOCKABLE Lock; diff --git a/base/compiler_specific.h b/base/compiler_specific.h -index 5caeab5fa2..739187c1d8 100644 +index f4599e191e..b27e646850 100644 --- a/base/compiler_specific.h +++ b/base/compiler_specific.h @@ -88,7 +88,7 @@ @@ -82,7 +82,7 @@ index 5caeab5fa2..739187c1d8 100644 #define MUSTTAIL [[clang::musttail]] #else #define MUSTTAIL -@@ -446,7 +446,7 @@ +@@ -456,7 +456,7 @@ inline constexpr bool AnalyzerAssumeTrue(bool arg) { // Clang only supports preserve_most on X86-64 and AArch64 for now. // See https://clang.llvm.org/docs/AttributeReference.html#preserve-most for // more details. @@ -107,10 +107,10 @@ index 1b86a4bb9e..bc95083101 100755 src_dir = os.path.dirname(script_dir) nacl_dir = os.path.join(src_dir, 'native_client') diff --git a/build/rust/cargo_crate.gni b/build/rust/cargo_crate.gni -index 1b86a4bb9e..bc95083101 100755 +index e5d1b2f831..86d9109023 100644 --- a/build/rust/cargo_crate.gni +++ b/build/rust/cargo_crate.gni -@@ -429,7 +429,7 @@ +@@ -429,7 +429,7 @@ template("cargo_crate") { rust_abi_target, ] } @@ -134,7 +134,7 @@ index 8434144118..c92bf1a4bc 100644 # SSBD (Speculative Store Bypass Disable) is a mitigation of Spectre Variant 4. # As Spectre Variant 4 can be mitigated by site isolation, opt-out SSBD on site diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn -index 483488a3f7..89a0fef388 100644 +index cc86e06114..2d04ba54c5 100644 --- a/sandbox/linux/BUILD.gn +++ b/sandbox/linux/BUILD.gn @@ -383,6 +383,8 @@ component("sandbox_services") { @@ -261,10 +261,10 @@ index d7286c4078..5db9ada4c0 100644 if (SyscallSets::IsSocketCall(sysno)) return RestrictSocketcallCommand(); diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc -index dbbf1fb510..342b7be4cc 100644 +index f2dc74f842..31c3707f2e 100644 --- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc +++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc -@@ -329,7 +329,7 @@ TEST_BASELINE_SIGSYS(__NR_sysinfo) +@@ -348,7 +348,7 @@ TEST_BASELINE_SIGSYS(__NR_sysinfo) TEST_BASELINE_SIGSYS(__NR_syslog) TEST_BASELINE_SIGSYS(__NR_timer_create) @@ -274,10 +274,10 @@ index dbbf1fb510..342b7be4cc 100644 TEST_BASELINE_SIGSYS(__NR_vserver) #endif diff --git a/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc b/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc -index 4bf133a4e2..0b53658193 100644 +index 420c9c80b7..b79a5b41f5 100644 --- a/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc +++ b/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc -@@ -357,7 +357,16 @@ intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args, +@@ -362,7 +362,16 @@ intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args, if (args.nr == __NR_fstatat_default) { if (*reinterpret_cast(args.args[1]) == '\0' && args.args[3] == static_cast(AT_EMPTY_PATH)) { @@ -296,7 +296,7 @@ index 4bf133a4e2..0b53658193 100644 } return -reinterpret_cast(fs_denied_errno); diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -index 7aa286c874..0d874a87f8 100644 +index cfc37e20dc..e448a8f2e0 100644 --- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc @@ -36,7 +36,7 @@ @@ -371,7 +371,7 @@ index 7aa286c874..0d874a87f8 100644 ResultExpr RestrictSocketcallCommand() { // Unfortunately, we are unable to restrict the first parameter to // socketpair(2). Whilst initially sounding bad, it's noteworthy that very -@@ -449,7 +473,7 @@ ResultExpr RestrictPtrace() { +@@ -453,7 +477,7 @@ ResultExpr RestrictPtrace() { #endif return Switch(request) .Cases({ @@ -394,7 +394,7 @@ index 171191ec51..a36cd8d8cb 100644 // sendto(2), recvfrom(2), shutdown(2), sendmsg(2) and recvmsg(2). SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictSocketcallCommand(); diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -index 3363a84e1b..d223bb6224 100644 +index be04538c38..07e5780ab2 100644 --- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc @@ -28,7 +28,7 @@ bool SyscallSets::IsKill(int sysno) { @@ -742,7 +742,7 @@ index 3363a84e1b..d223bb6224 100644 case __NR_alarm: #endif case __NR_setitimer: -@@ -1106,17 +1117,17 @@ bool SyscallSets::IsMisc(int sysno) { +@@ -1103,17 +1114,17 @@ bool SyscallSets::IsMisc(int sysno) { case __NR_syncfs: case __NR_vhangup: // The system calls below are not implemented. @@ -764,7 +764,7 @@ index 3363a84e1b..d223bb6224 100644 (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) case __NR_gtty: case __NR_idle: -@@ -1125,20 +1136,20 @@ bool SyscallSets::IsMisc(int sysno) { +@@ -1122,20 +1133,20 @@ bool SyscallSets::IsMisc(int sysno) { case __NR_prof: case __NR_profil: #endif @@ -829,10 +829,10 @@ index 9be7b03ec4..35f6f157e9 100644 // Big system V multiplexing system call. static bool IsSystemVIpc(int sysno); diff --git a/sandbox/linux/seccomp-bpf/syscall.cc b/sandbox/linux/seccomp-bpf/syscall.cc -index 02cbb047c1..04deabf630 100644 +index 6b772c563c..873eec35f4 100644 --- a/sandbox/linux/seccomp-bpf/syscall.cc +++ b/sandbox/linux/seccomp-bpf/syscall.cc -@@ -18,7 +18,7 @@ namespace sandbox { +@@ -23,7 +23,7 @@ namespace sandbox { namespace { #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \ @@ -841,7 +841,7 @@ index 02cbb047c1..04deabf630 100644 // Number that's not currently used by any Linux kernel ABIs. const int kInvalidSyscallNumber = 0x351d3; #else -@@ -306,12 +306,56 @@ asm(// We need to be able to tell the kernel exactly where we made a +@@ -311,12 +311,56 @@ asm(// We need to be able to tell the kernel exactly where we made a // Enter the kernel "svc 0\n" "2:ret\n" @@ -899,7 +899,7 @@ index 02cbb047c1..04deabf630 100644 extern "C" { intptr_t SyscallAsm(intptr_t nr, const intptr_t args[6]); } -@@ -425,6 +469,8 @@ intptr_t Syscall::Call(int nr, +@@ -430,6 +474,8 @@ intptr_t Syscall::Call(int nr, ret = inout; } @@ -908,7 +908,7 @@ index 02cbb047c1..04deabf630 100644 #else #error "Unimplemented architecture" #endif -@@ -441,8 +487,18 @@ void Syscall::PutValueInUcontext(intptr_t ret_val, ucontext_t* ctx) { +@@ -446,8 +492,18 @@ void Syscall::PutValueInUcontext(intptr_t ret_val, ucontext_t* ctx) { // needs to be changed back. ret_val = -ret_val; SECCOMP_PARM4(ctx) = 1; @@ -929,10 +929,10 @@ index 02cbb047c1..04deabf630 100644 SECCOMP_RESULT(ctx) = static_cast(ret_val); } diff --git a/sandbox/linux/seccomp-bpf/trap.cc b/sandbox/linux/seccomp-bpf/trap.cc -index 7f262aaff6..02142a8105 100644 +index 9fbefe3e8b..6c4ec161c9 100644 --- a/sandbox/linux/seccomp-bpf/trap.cc +++ b/sandbox/linux/seccomp-bpf/trap.cc -@@ -232,6 +232,20 @@ void Trap::SigSys(int nr, LinuxSigInfo* info, ucontext_t* ctx) { +@@ -236,6 +236,20 @@ void Trap::SigSys(int nr, LinuxSigInfo* info, ucontext_t* ctx) { SetIsInSigHandler(); } @@ -954,19 +954,19 @@ index 7f262aaff6..02142a8105 100644 // is what we are showing to TrapFnc callbacks that the system call // evaluator registered with the sandbox. diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc -index 3f8c92cf26..1a1d93b3e0 100644 +index bea1af28b5..f61f0ed146 100644 --- a/sandbox/linux/services/credentials.cc +++ b/sandbox/linux/services/credentials.cc -@@ -80,7 +80,7 @@ bool ChrootToSafeEmptyDir() { - pid_t pid = -1; +@@ -91,7 +91,7 @@ bool ChrootToSafeEmptyDir() { alignas(16) char stack_buf[PTHREAD_STACK_MIN]; + #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \ - defined(ARCH_CPU_MIPS_FAMILY) + defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_PPC64_FAMILY) // The stack grows downward. void* stack = stack_buf + sizeof(stack_buf); #else -@@ -89,14 +89,18 @@ +@@ -100,14 +100,18 @@ bool ChrootToSafeEmptyDir() { int clone_flags = CLONE_FS | LINUX_SIGCHLD; void* tls = nullptr; @@ -988,7 +988,7 @@ index 3f8c92cf26..1a1d93b3e0 100644 // PTHREAD_STACK_MIN can be dynamic in glibc2.34+, so it is not possible to diff --git a/sandbox/linux/services/syscall_wrappers.cc b/sandbox/linux/services/syscall_wrappers.cc -index 7650e983b3..de71401f85 100644 +index 74d48f1f91..eba83011d4 100644 --- a/sandbox/linux/services/syscall_wrappers.cc +++ b/sandbox/linux/services/syscall_wrappers.cc @@ -61,7 +61,7 @@ long sys_clone(unsigned long flags, @@ -1001,7 +1001,7 @@ index 7650e983b3..de71401f85 100644 return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid); #endif diff --git a/sandbox/linux/syscall_broker/broker_process.cc b/sandbox/linux/syscall_broker/broker_process.cc -index a55b548a8e..6b333222d6 100644 +index a452430a90..7678d33fb1 100644 --- a/sandbox/linux/syscall_broker/broker_process.cc +++ b/sandbox/linux/syscall_broker/broker_process.cc @@ -169,7 +169,7 @@ bool BrokerProcess::IsSyscallBrokerable(int sysno, bool fast_check) const { @@ -1122,14 +1122,15 @@ index 0000000000..ccacffe22e + +#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_ diff --git a/sandbox/policy/linux/bpf_renderer_policy_linux.cc b/sandbox/policy/linux/bpf_renderer_policy_linux.cc -index 9d9fc7364e..855fadc2a3 100644 +index f1cd5bb..77c3cb3 100644 --- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc +++ b/sandbox/policy/linux/bpf_renderer_policy_linux.cc -@@ -15,6 +15,11 @@ +@@ -15,6 +15,12 @@ #include "sandbox/linux/system_headers/linux_syscalls.h" #include "sandbox/policy/linux/sandbox_linux.h" -+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h ++// On PPC64, TCGETS is defined in terms of struct termios, so we must include ++// termios.h +#ifdef __powerpc64__ +#include +#endif @@ -1137,7 +1138,7 @@ index 9d9fc7364e..855fadc2a3 100644 // TODO(vignatti): replace the local definitions below with #include // once kernel version 4.6 becomes widely used. #include -@@ -82,7 +87,7 @@ ResultExpr RendererProcessPolicy::EvaluateSyscall(int sysno) const { +@@ -82,7 +88,7 @@ ResultExpr RendererProcessPolicy::EvaluateSyscall(int sysno) const { case __NR_ftruncate64: #endif #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ @@ -1160,7 +1161,7 @@ index e299ce998b..090f3e706f 100644 #endif #if defined(__i386__) || defined(__arm__) diff --git a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h -index 24b324ac99..33715130d4 100644 +index 43a3dabeea..800b0cc6a3 100644 --- a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h +++ b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h @@ -21,7 +21,7 @@ @@ -1208,10 +1209,10 @@ index bf6df8800c..d8360ef5aa 100644 } // Write boolean values as their names instead of integral value. diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn -index 321a2dc2eb..2f2c810623 100644 +index f44ece0073..a61ebb7d74 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn -@@ -134,6 +134,11 @@ if (is_msan) { +@@ -118,6 +118,11 @@ if (is_msan) { sources = crypto_sources_nasm visibility = [ ":*" ] # Only targets in this file can depend on this. } @@ -1224,7 +1225,7 @@ index 321a2dc2eb..2f2c810623 100644 # All other targets use GAS-compatible assembler. BoringSSL's assembly files # are all wrapped in processor checks for the corresponding target, so there diff --git a/third_party/boringssl/src/include/openssl/target.h b/third_party/boringssl/src/include/openssl/target.h -index 12736416f3..432876bcfd 100644 +index 2760f52ce8..11401e72f5 100644 --- a/third_party/boringssl/src/include/openssl/target.h +++ b/third_party/boringssl/src/include/openssl/target.h @@ -54,6 +54,9 @@ @@ -1235,13 +1236,13 @@ index 12736416f3..432876bcfd 100644 +#define OPENSSL_64_BIT +#define OPENSSL_PPC64 #else - // Note BoringSSL only supports standard 32-bit and 64-bit two's-complement, - // little-endian architectures. Functions will not produce the correct answer + // The list above enumerates the platforms that BoringSSL supports. For these + // platforms we keep a reasonable bar of not breaking them: automated test diff --git a/third_party/breakpad/BUILD.gn b/third_party/breakpad/BUILD.gn -index 10000c6097..fa120724c7 100644 +index d7d27abb8e..3818b5b1fb 100644 --- a/third_party/breakpad/BUILD.gn +++ b/third_party/breakpad/BUILD.gn -@@ -618,7 +618,6 @@ if (is_linux || is_chromeos || is_android) { +@@ -785,7 +785,6 @@ if (is_linux || is_chromeos || is_android) { "breakpad/src/client/minidump_file_writer.h", "breakpad/src/common/convert_UTF.cc", "breakpad/src/common/convert_UTF.h", @@ -1249,7 +1250,7 @@ index 10000c6097..fa120724c7 100644 "breakpad/src/common/linux/elf_core_dump.cc", "breakpad/src/common/linux/elf_core_dump.h", "breakpad/src/common/linux/elfutils.cc", -@@ -658,6 +657,15 @@ if (is_linux || is_chromeos || is_android) { +@@ -825,6 +824,15 @@ if (is_linux || is_chromeos || is_android) { libs = [ "dl" ] @@ -1265,7 +1266,7 @@ index 10000c6097..fa120724c7 100644 include_dirs = [ ".", "breakpad/src", -@@ -707,7 +715,6 @@ if (is_linux || is_chromeos || is_android) { +@@ -874,7 +882,6 @@ if (is_linux || is_chromeos || is_android) { "breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc", "breakpad/src/client/linux/minidump_writer/minidump_writer_unittest_utils.cc", "breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader_unittest.cc", @@ -1683,7 +1684,7 @@ index 4bf9094e98..f85d24737c 100644 for (int i = EF_R0; i <= EF_R31; i++) info.mcontext.gregs[i - EF_R0] = status->pr_reg[i]; diff --git a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc -index 85922a9c46..5870567ce7 100644 +index 5c4c389c39..5801188d9c 100644 --- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc +++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc @@ -770,7 +770,9 @@ bool LinuxDumper::GetStackInfo(const void** stack, size_t* stack_len, @@ -1724,10 +1725,10 @@ index 5a135fda0e..665c143575 100644 #error This test has not been ported to this platform. #endif diff --git a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc -index 2adc39e122..f2054e99f4 100644 +index fb5b7e7625..e5e72b4356 100644 --- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc +++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc -@@ -189,12 +189,12 @@ +@@ -208,12 +208,12 @@ bool LinuxPtraceDumper::ReadRegisterSet(ThreadInfo* info, pid_t tid) #ifdef PTRACE_GETREGSET struct iovec io; info->GetGeneralPurposeRegisters(&io.iov_base, &io.iov_len); @@ -1742,7 +1743,7 @@ index 2adc39e122..f2054e99f4 100644 // 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. -@@ -214,6 +214,15 @@ +@@ -233,6 +233,15 @@ bool LinuxPtraceDumper::ReadRegisterSet(ThreadInfo* info, pid_t tid) } #endif // defined(__arm__) } @@ -1758,7 +1759,7 @@ index 2adc39e122..f2054e99f4 100644 return true; #else return false; -@@ -312,6 +321,9 @@ bool LinuxPtraceDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) { +@@ -397,6 +406,9 @@ bool LinuxPtraceDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) { #elif defined(__riscv) stack_pointer = reinterpret_cast( info->mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP]); @@ -1958,7 +1959,7 @@ index 09e4690d57..3396bca225 100644 ExploitabilityFor("linux_write_to_nonwritable_module.dmp")); ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, diff --git a/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc b/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc -index 3e310bc7d8..d2a87fff85 100644 +index 29560ed18c..faa243e34c 100644 --- a/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc +++ b/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc @@ -82,6 +82,8 @@ @@ -1989,7 +1990,7 @@ index 3e310bc7d8..d2a87fff85 100644 #endif uintptr_t stack_addr; const uint8_t* stack; -@@ -599,6 +606,38 @@ ParseThreadRegisters(CrashedProcess::Thread* thread, +@@ -627,6 +634,38 @@ ParseThreadRegisters(CrashedProcess::Thread* thread, #error "Unexpected __riscv_xlen" #endif } @@ -2028,7 +2029,7 @@ index 3e310bc7d8..d2a87fff85 100644 #else #error "This code has not been ported to your platform yet" #endif -@@ -704,6 +743,12 @@ ParseSystemInfo(const Options& options, CrashedProcess* crashinfo, +@@ -732,6 +771,12 @@ ParseSystemInfo(const Options& options, CrashedProcess* crashinfo, # else # error "Unexpected __riscv_xlen" # endif @@ -2139,7 +2140,7 @@ index 12413de02b..1cc0484c50 100644 #endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_ diff --git a/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc b/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc -index 326b51fed6..efa1cdb666 100644 +index 4a6130b63e..bdf1d843ff 100644 --- a/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc +++ b/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc @@ -110,6 +110,13 @@ MinidumpContextWriter::CreateFromSnapshot(const CPUContext* context_snapshot) { @@ -2156,7 +2157,7 @@ index 326b51fed6..efa1cdb666 100644 default: { LOG(ERROR) << "unknown context architecture " << context_snapshot->architecture; -@@ -602,4 +609,47 @@ size_t MinidumpContextRISCV64Writer::ContextSize() const { +@@ -606,4 +613,47 @@ size_t MinidumpContextRISCV64Writer::ContextSize() const { return sizeof(context_); } @@ -2253,10 +2254,10 @@ index 8e39c6692f..6ffb220472 100644 #endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_ diff --git a/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc b/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc -index 9eebe81b29..11241bad4d 100644 +index 277bd4d347..8d136da09f 100644 --- a/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc +++ b/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc -@@ -328,6 +328,21 @@ TYPED_TEST(MinidumpContextWriter, RISCV64_FromSnapshot) { +@@ -322,6 +322,21 @@ TYPED_TEST(MinidumpContextWriter, RISCV64_FromSnapshot) { TypeParam>(context, ExpectMinidumpContextRISCV64, kSeed); } @@ -2292,10 +2293,10 @@ index 1abb46c318..409a6cfd6d 100644 #error define kCPU for this CPU #endif diff --git a/third_party/crashpad/crashpad/snapshot/capture_memory.cc b/third_party/crashpad/crashpad/snapshot/capture_memory.cc -index c1c6fba58f..3fced91655 100644 +index f2ff5d74bb..4c977d59e6 100644 --- a/third_party/crashpad/crashpad/snapshot/capture_memory.cc +++ b/third_party/crashpad/crashpad/snapshot/capture_memory.cc -@@ -122,6 +122,11 @@ void CaptureMemory::PointedToByContext(const CPUContext& context, +@@ -123,6 +123,11 @@ void CaptureMemory::PointedToByContext(const CPUContext& context, for (size_t i = 0; i < std::size(context.riscv64->regs); ++i) { MaybeCaptureMemoryAround(delegate, context.riscv64->regs[i]); } @@ -2322,7 +2323,7 @@ index 26d45f8412..5637f31788 100644 } // namespace crashpad diff --git a/third_party/crashpad/crashpad/snapshot/cpu_context.cc b/third_party/crashpad/crashpad/snapshot/cpu_context.cc -index 492a0f7f91..f4447afcd9 100644 +index 6b69edefd5..187f249284 100644 --- a/third_party/crashpad/crashpad/snapshot/cpu_context.cc +++ b/third_party/crashpad/crashpad/snapshot/cpu_context.cc @@ -173,6 +173,8 @@ uint64_t CPUContext::InstructionPointer() const { @@ -2333,8 +2334,8 @@ index 492a0f7f91..f4447afcd9 100644 + return ppc64->nip; default: NOTREACHED(); - return ~0ull; -@@ -191,6 +193,8 @@ uint64_t CPUContext::StackPointer() const { + } +@@ -190,6 +192,8 @@ uint64_t CPUContext::StackPointer() const { return arm64->sp; case kCPUArchitectureRISCV64: return riscv64->regs[1]; @@ -2342,8 +2343,8 @@ index 492a0f7f91..f4447afcd9 100644 + return ppc64->regs[1]; default: NOTREACHED(); - return ~0ull; -@@ -232,6 +236,7 @@ bool CPUContext::Is64Bit() const { + } +@@ -227,6 +231,7 @@ bool CPUContext::Is64Bit() const { case kCPUArchitectureARM64: case kCPUArchitectureMIPS64EL: case kCPUArchitectureRISCV64: @@ -2480,10 +2481,10 @@ index 507d1b44dd..99b3e5755d 100644 } // namespace crashpad diff --git a/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc b/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc -index 62c5d4e85d..b59b51db78 100644 +index 2efa32befc..5e0ae5f2b4 100644 --- a/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc +++ b/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc -@@ -195,6 +195,8 @@ void TestAgainstTarget(PtraceConnection* connection) { +@@ -194,6 +194,8 @@ void TestAgainstTarget(PtraceConnection* connection) { device == 0 && inode == 0 && mapping_name == "[vdso]"; #if defined(ARCH_CPU_X86) static constexpr char kPrefix[] = "linux-gate.so."; @@ -2580,7 +2581,7 @@ index f931d33002..27e5922c53 100644 } context_union_; CPUContext context_; diff --git a/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc b/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc -index b351ccaa7f..8525aaba7f 100644 +index 16ae7b671f..4efbb511aa 100644 --- a/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc +++ b/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc @@ -326,6 +326,28 @@ void ExpectContext(const CPUContext& actual, const NativeCPUContext& expected) { @@ -2721,7 +2722,7 @@ index 89e697a08b..5039180679 100644 #error Port. #endif // ARCH_CPU_X86_FAMILY diff --git a/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc b/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc -index b32f22d784..f75c1308a6 100644 +index 67cd2b3af9..771120b2d1 100644 --- a/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc +++ b/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc @@ -208,6 +208,8 @@ CPUArchitecture SystemSnapshotLinux::GetCPUArchitecture() const { @@ -2753,7 +2754,7 @@ index b32f22d784..f75c1308a6 100644 #else #error port to your architecture #endif -@@ -385,6 +393,9 @@ bool SystemSnapshotLinux::NXEnabled() const { +@@ -380,6 +388,9 @@ bool SystemSnapshotLinux::NXEnabled() const { #elif defined(ARCH_CPU_RISCV64) // Not implemented return false; @@ -3384,10 +3385,10 @@ index 0000000000..7834eee6b8 + +#define TRIM_DSP_FUNCTIONS 1 diff --git a/third_party/dav1d/libdav1d/src/ppc/dav1d_types.h b/third_party/dav1d/libdav1d/src/ppc/dav1d_types.h -index 0b4bd72f0e..a0caa5e710 100644 +index 9a8bc7a732..7a6ca8d1bb 100644 --- a/third_party/dav1d/libdav1d/src/ppc/dav1d_types.h +++ b/third_party/dav1d/libdav1d/src/ppc/dav1d_types.h -@@ -51,4 +51,19 @@ +@@ -55,4 +55,19 @@ #define u16l_to_i32(v) ((i32x4) vec_mergel((u16x8) v, vec_splat_u16(0))) #define i16l_to_i32(v) ((i32x4) vec_unpackl((i16x8)v)) @@ -3408,10 +3409,10 @@ index 0b4bd72f0e..a0caa5e710 100644 + #endif /* DAV1D_SRC_PPC_TYPES_H */ diff --git a/third_party/eigen3/BUILD.gn b/third_party/eigen3/BUILD.gn -index d07d4e9724..beb2bd42b4 100644 +index 8263623379..8c0e29f5d2 100644 --- a/third_party/eigen3/BUILD.gn +++ b/third_party/eigen3/BUILD.gn -@@ -10,6 +10,10 @@ +@@ -10,6 +10,10 @@ config("eigen_public_includes") { "EIGEN_MAX_ALIGN_BYTES=64", "EIGEN_HAS_TYPE_TRAITS=0", ] @@ -3423,7 +3424,7 @@ index d07d4e9724..beb2bd42b4 100644 # As this target suppresses warnings, it should not be added to public_configs. diff --git a/third_party/libaom/BUILD.gn b/third_party/libaom/BUILD.gn -index 622da283de..2a51eb23b4 100644 +index c49d6fcb9d..93062ffd01 100644 --- a/third_party/libaom/BUILD.gn +++ b/third_party/libaom/BUILD.gn @@ -43,6 +43,8 @@ if (current_cpu == "x86") { @@ -3436,10 +3437,10 @@ index 622da283de..2a51eb23b4 100644 cpu_arch_full = current_cpu } diff --git a/third_party/libpng/pngpriv.h b/third_party/libpng/pngpriv.h -index 583c26f9bd..e03d697c5a 100644 +index 9bfdb71342..f44d0b81a5 100644 --- a/third_party/libpng/pngpriv.h +++ b/third_party/libpng/pngpriv.h -@@ -196,11 +196,7 @@ +@@ -212,11 +212,7 @@ #endif #ifndef PNG_POWERPC_VSX_OPT @@ -3451,12 +3452,12 @@ index 583c26f9bd..e03d697c5a 100644 +# define PNG_POWERPC_VSX_OPT 0 #endif - #ifndef PNG_INTEL_SSE_OPT + #ifndef PNG_LOONGARCH_LSX_OPT diff --git a/third_party/libvpx/generate_gni.sh b/third_party/libvpx/generate_gni.sh -index 8bc7540ad2..b2470f9604 100755 +index 680a374dc2..2fa226f591 100755 --- a/third_party/libvpx/generate_gni.sh +++ b/third_party/libvpx/generate_gni.sh -@@ -411,7 +411,7 @@ gen_config_files linux/mipsel "--target=mips32-linux-gcc ${all_platforms}" +@@ -432,7 +432,7 @@ gen_config_files linux/mipsel "--target=mips32-linux-gcc ${all_platforms}" gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}" gen_config_files linux/loongarch \ "--target=loongarch64-linux-gcc ${all_platforms}" @@ -3464,15 +3465,15 @@ index 8bc7540ad2..b2470f9604 100755 +gen_config_files linux/ppc64 "--target=generic-gnu ${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}" -@@ -476,7 +476,7 @@ gen_rtcd_header linux/arm64-highbd armv8 "${require_neon}" + "--target=arm64-win64-vs15 ${all_platforms} ${HIGHBD} ${disable_sve}" +@@ -497,7 +497,7 @@ gen_rtcd_header linux/arm64-highbd armv8 "${require_neon}" gen_rtcd_header linux/mipsel mipsel gen_rtcd_header linux/mips64el mips64el gen_rtcd_header linux/loongarch loongarch -gen_rtcd_header linux/ppc64 ppc +gen_rtcd_header linux/ppc64 generic gen_rtcd_header linux/generic generic - gen_rtcd_header win/arm64-highbd armv8 "${require_neon}" + gen_rtcd_header win/arm64-highbd armv8 "${require_neon} ${disable_sve}" gen_rtcd_header win/ia32 x86 "${require_sse2}" diff --git a/third_party/lss/linux_syscall_support.h b/third_party/lss/linux_syscall_support.h index 1e9fa47dc7..b8d0db369f 100644 @@ -3539,11 +3540,25 @@ index bdac4d7849..51e0f2cacc 100644 typedef vector float v4sf; # define SIMD_SZ 4 # define VZERO() ((vector float) vec_splat_u8(0)) +diff --git a/third_party/skia/modules/skcms/src/skcms_internals.h b/third_party/skia/modules/skcms/src/skcms_internals.h +index f3f0a2d6cb..cf4ae54c62 100644 +--- a/third_party/skia/modules/skcms/src/skcms_internals.h ++++ b/third_party/skia/modules/skcms/src/skcms_internals.h +@@ -48,7 +48,8 @@ extern "C" { + && !defined(__arm__) \ + && !defined(__riscv) \ + && !defined(__loongarch__) \ +- && !defined(_WIN32) && !defined(__SYMBIAN32__) ++ && !defined(_WIN32) && !defined(__SYMBIAN32__) \ ++ && !defined(__powerpc__) + #define SKCMS_HAS_MUSTTAIL 1 + #endif + #endif diff --git a/third_party/skia/src/core/SkRasterPipeline.h b/third_party/skia/src/core/SkRasterPipeline.h -index dc5fb4b8f2..f696f25a8b 100644 +index 2475ea0d39..6796748365 100644 --- a/third_party/skia/src/core/SkRasterPipeline.h +++ b/third_party/skia/src/core/SkRasterPipeline.h -@@ -27,7 +27,7 @@ +@@ -27,7 +27,7 @@ struct SkImageInfo; struct skcms_TransferFunction; #if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && \ @@ -3553,10 +3568,10 @@ index dc5fb4b8f2..f696f25a8b 100644 #else #define SK_HAS_MUSTTAIL 0 diff --git a/third_party/sqlite/src/amalgamation/sqlite3.c b/third_party/sqlite/src/amalgamation/sqlite3.c -index f23c6fa7a2..265c5d7b18 100644 +index 31bc470571..95f69e776b 100644 --- a/third_party/sqlite/src/amalgamation/sqlite3.c +++ b/third_party/sqlite/src/amalgamation/sqlite3.c -@@ -14864,7 +14864,8 @@ +@@ -15005,7 +15005,8 @@ typedef INT16_TYPE LogEst; # elif defined(i386) || defined(__i386__) || defined(_M_IX86) || \ defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ @@ -3567,10 +3582,10 @@ index f23c6fa7a2..265c5d7b18 100644 # elif defined(sparc) || defined(__ARMEB__) || defined(__AARCH64EB__) # define SQLITE_BYTEORDER 4321 diff --git a/third_party/sqlite/src/amalgamation_dev/sqlite3.c b/third_party/sqlite/src/amalgamation_dev/sqlite3.c -index 67404ccece..30aae9cd8b 100644 +index 29f2d9259f..9097d28490 100644 --- a/third_party/sqlite/src/amalgamation_dev/sqlite3.c +++ b/third_party/sqlite/src/amalgamation_dev/sqlite3.c -@@ -14864,7 +14864,8 @@ +@@ -15018,7 +15018,8 @@ typedef INT16_TYPE LogEst; # elif defined(i386) || defined(__i386__) || defined(_M_IX86) || \ defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ @@ -3581,10 +3596,10 @@ index 67404ccece..30aae9cd8b 100644 # elif defined(sparc) || defined(__ARMEB__) || defined(__AARCH64EB__) # define SQLITE_BYTEORDER 4321 diff --git a/third_party/sqlite/src/ext/rtree/rtree.c b/third_party/sqlite/src/ext/rtree/rtree.c -index 4e85cc8aec..d0e1dab5bf 100644 +index 299b5b54b9..605c07edfc 100644 --- a/third_party/sqlite/src/ext/rtree/rtree.c +++ b/third_party/sqlite/src/ext/rtree/rtree.c -@@ -14864,7 +14864,8 @@ +@@ -485,7 +485,8 @@ struct RtreeMatchArg { # elif defined(i386) || defined(__i386__) || defined(_M_IX86) || \ defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ @@ -3595,10 +3610,10 @@ index 4e85cc8aec..d0e1dab5bf 100644 # elif defined(sparc) || defined(__ARMEB__) || defined(__AARCH64EB__) # define SQLITE_BYTEORDER 4321 diff --git a/third_party/sqlite/src/src/sqliteInt.h b/third_party/sqlite/src/src/sqliteInt.h -index b0cdbc199f..b9804a5f4e 100644 +index d98a4f7f06..bf9c1da948 100644 --- a/third_party/sqlite/src/src/sqliteInt.h +++ b/third_party/sqlite/src/src/sqliteInt.h -@@ -14864,7 +14864,8 @@ +@@ -971,7 +971,8 @@ typedef INT16_TYPE LogEst; # elif defined(i386) || defined(__i386__) || defined(_M_IX86) || \ defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ @@ -3608,46 +3623,6 @@ index b0cdbc199f..b9804a5f4e 100644 # define SQLITE_BYTEORDER 1234 # elif defined(sparc) || defined(__ARMEB__) || defined(__AARCH64EB__) # define SQLITE_BYTEORDER 4321 -diff --git a/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn b/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn -index 59e52303c5..d780239c84 100644 ---- a/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn -+++ b/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn -@@ -583,6 +583,7 @@ swiftshader_llvm_source_set("swiftshader_llvm_most") { - "llvm/lib/MC/MCAsmInfoCOFF.cpp", - "llvm/lib/MC/MCAsmInfoDarwin.cpp", - "llvm/lib/MC/MCAsmInfoELF.cpp", -+ "llvm/lib/MC/MCAsmInfoXCOFF.cpp", - "llvm/lib/MC/MCAsmMacro.cpp", - "llvm/lib/MC/MCAsmStreamer.cpp", - "llvm/lib/MC/MCAssembler.cpp", -@@ -638,6 +639,7 @@ swiftshader_llvm_source_set("swiftshader_llvm_most") { - "llvm/lib/MC/MCWinCOFFStreamer.cpp", - "llvm/lib/MC/MCWinEH.cpp", - "llvm/lib/MC/MCXCOFFStreamer.cpp", -+ "llvm/lib/MC/MCXCOFFObjectTargetWriter.cpp", - "llvm/lib/MC/MachObjectWriter.cpp", - "llvm/lib/MC/StringTableBuilder.cpp", - "llvm/lib/MC/SubtargetFeature.cpp", -diff --git a/third_party/swiftshader/third_party/llvm-16.0/BUILD.gn b/third_party/swiftshader/third_party/llvm-16.0/BUILD.gn -index 13f5cc3658..434610051e 100644 ---- a/third_party/swiftshader/third_party/llvm-16.0/BUILD.gn -+++ b/third_party/swiftshader/third_party/llvm-16.0/BUILD.gn -@@ -765,6 +765,7 @@ swiftshader_llvm_source_set("swiftshader_llvm_source_set_0") { - "llvm/lib/MC/MCAsmInfoCOFF.cpp", - "llvm/lib/MC/MCAsmInfoDarwin.cpp", - "llvm/lib/MC/MCAsmInfoELF.cpp", -+ "llvm/lib/MC/MCAsmInfoXCOFF.cpp", - "llvm/lib/MC/MCAsmMacro.cpp", - "llvm/lib/MC/MCAsmStreamer.cpp", - "llvm/lib/MC/MCAssembler.cpp", -@@ -825,6 +826,7 @@ swiftshader_llvm_source_set("swiftshader_llvm_source_set_0") { - "llvm/lib/MC/MCWinCOFFStreamer.cpp", - "llvm/lib/MC/MCWinEH.cpp", - "llvm/lib/MC/MCXCOFFStreamer.cpp", -+ "llvm/lib/MC/MCXCOFFObjectTargetWriter.cpp", - "llvm/lib/MC/MachObjectWriter.cpp", - "llvm/lib/MC/SPIRVObjectWriter.cpp", - "llvm/lib/MC/StringTableBuilder.cpp", diff --git a/third_party/webrtc/rtc_base/system/arch.h b/third_party/webrtc/rtc_base/system/arch.h index 9d945ef7fc..77da679f62 100644 --- a/third_party/webrtc/rtc_base/system/arch.h @@ -3672,21 +3647,21 @@ index 9d945ef7fc..77da679f62 100644 #error Please add support for your architecture in rtc_base/system/arch.h #endif diff --git a/ui/gl/features.gni b/ui/gl/features.gni -index 83266614af..29d3a227d5 100644 +index 245959e908..8d3ffa23f8 100644 --- a/ui/gl/features.gni +++ b/ui/gl/features.gni -@@ -37,5 +37,5 @@ declare_args() { - is_chromeos_ash || is_fuchsia) && +@@ -30,5 +30,5 @@ declare_args() { + is_fuchsia) && (target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm" || target_cpu == "arm64" || target_cpu == "mipsel" || - target_cpu == "mips64el" || target_cpu == "riscv64") + target_cpu == "mips64el" || target_cpu == "riscv64" || target_cpu == "ppc64") } diff --git a/v8/BUILD.gn b/v8/BUILD.gn -index 01159bc491..9efb7af9a5 100644 +index 19e0d2b584..4bfbc3c075 100644 --- a/v8/BUILD.gn +++ b/v8/BUILD.gn -@@ -1340,6 +1340,12 @@ config("toolchain") { +@@ -1447,6 +1447,12 @@ config("toolchain") { } if (host_byteorder == "little") { defines += [ "V8_TARGET_ARCH_PPC_LE" ] @@ -3700,7 +3675,7 @@ index 01159bc491..9efb7af9a5 100644 defines += [ "V8_TARGET_ARCH_PPC_BE" ] if (current_os == "aix") { diff --git a/v8/test/BUILD.gn b/v8/test/BUILD.gn -index 6a04cbca45..53ef9f998d 100644 +index 6604cb9631..4cd486f8e9 100644 --- a/v8/test/BUILD.gn +++ b/v8/test/BUILD.gn @@ -42,7 +42,7 @@ group("gn_all") { @@ -3730,15 +3705,5 @@ index 6a04cbca45..53ef9f998d 100644 ] if (v8_enable_webassembly) { ---- a/third_party/skia/modules/skcms/src/skcms_internals.h -+++ b/third_party/skia/modules/skcms/src/skcms_internals.h -@@ -48,7 +48,8 @@ - && !defined(__arm__) \ - && !defined(__riscv) \ - && !defined(__loongarch__) \ -- && !defined(_WIN32) && !defined(__SYMBIAN32__) -+ && !defined(_WIN32) && !defined(__SYMBIAN32__) \ -+ && !defined(__powerpc__) - #define SKCMS_HAS_MUSTTAIL 1 - #endif - #endif +-- +2.46.2 diff --git a/main/chromium/patches/allow-pwritev2.patch b/main/chromium/patches/allow-pwritev2.patch deleted file mode 100644 index 1b50fbe4ce..0000000000 --- a/main/chromium/patches/allow-pwritev2.patch +++ /dev/null @@ -1,12 +0,0 @@ -musl now calls pwritev2 for pwrite() to make use of RWF_NOAPPEND --- ---- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc -+++ b/sandbox/policy/linux/bpf_renderer_policy_linux.cc -@@ -102,6 +102,7 @@ - #endif - case __NR_mremap: // See crbug.com/149834. - case __NR_pwrite64: -+ case __NR_pwritev2: - case __NR_sched_get_priority_max: - case __NR_sched_get_priority_min: - case __NR_sysinfo: diff --git a/main/chromium/patches/libvpx-nogitregen.patch b/main/chromium/patches/libvpx-nogitregen.patch deleted file mode 100644 index 1708d11664..0000000000 --- a/main/chromium/patches/libvpx-nogitregen.patch +++ /dev/null @@ -1,12 +0,0 @@ -set -e errors on ppc64le since no git and no repo --- ---- a/third_party/libvpx/generate_gni.sh -+++ b/third_party/libvpx/generate_gni.sh -@@ -371,7 +371,6 @@ - } - - # Fetch the latest tags; used in creating vpx_version.h. --git -C "${LIBVPX_SRC_DIR}" fetch --tags - - find_duplicates - diff --git a/main/chromium/template.py b/main/chromium/template.py index e867d8a393..54344fe2e1 100644 --- a/main/chromium/template.py +++ b/main/chromium/template.py @@ -141,7 +141,6 @@ source = f"https://commondatastorage.googleapis.com/chromium-browser-official/chromium-{pkgver}.tar.xz" sha256 = "094ddec3774b54feb04dcfb020e61766de16feabb04850d73ef82e38c4bbf2b5" debug_level = 1 -patch_style = "patch" tool_flags = { "CFLAGS": [ "-Wno-unknown-warning-option",