Chromium 145.0.7632.75 (boo#1258185) #36

Closed
AndreasStieger wants to merge 15 commits from chromium/chromium:leap-16.0 into leap-16.0
75 changed files with 12551 additions and 11365 deletions

View File

@@ -138,8 +138,8 @@ fi
# launcher script and symlink
sed \
-e "s#@@PROGNAME@@#${PROGNAME}#g" \
-e "s#@@CHANNEL@@#${CHANNEL}#g" \
-e "s#@@PROGNAME#${PROGNAME}#g" \
-e "s#@@CHANNEL#${CHANNEL}#g" \
"chrome/installer/linux/common/wrapper" > "${STAGEDIR}/${INSTALLDIR}/chrome-wrapper"
chmod 755 "${STAGEDIR}/${INSTALLDIR}/chrome-wrapper"
ln -s "${INSTALLDIR}/chrome-wrapper" "${STAGEDIR}/usr/bin/${PACKAGE}"
@@ -161,32 +161,32 @@ done
# desktop integration
## AppData
sed \
-e "s#@@PACKAGE@@#${PACKAGE}#g" \
-e "s#@@MAINTMAIL@@#${MAINTMAIL}#g" \
-e "s#@@PROJECT_LICENSE@@#${PROJECT_LICENSE}#g" \
-e "s#@@MENUNAME@@#${MENUNAME}#g" \
-e "s#@@SHORTDESC@@#${SHORTDESC}#g" \
-e "s#@@FULLDESC@@#${FULLDESC}#g" \
-e "s#@@PRODUCTURL@@#${PRODUCTURL}#g" \
-e "s#@@DEVELOPER_NAME@@#${DEVELOPER_NAME}#g" \
-e "s#@@BUGTRACKERURL@@#${BUGTRACKERURL}#g" \
-e "s#@@HELPURL@@#${HELPURL}#g" \
-e "s#@@PACKAGE#${PACKAGE}#g" \
-e "s#@@MAINTMAIL#${MAINTMAIL}#g" \
-e "s#@@PROJECT_LICENSE#${PROJECT_LICENSE}#g" \
-e "s#@@MENUNAME#${MENUNAME}#g" \
-e "s#@@SHORTDESC#${SHORTDESC}#g" \
-e "s#@@FULLDESC#${FULLDESC}#g" \
-e "s#@@PRODUCTURL#${PRODUCTURL}#g" \
-e "s#@@DEVELOPER_NAME#${DEVELOPER_NAME}#g" \
-e "s#@@BUGTRACKERURL#${BUGTRACKERURL}#g" \
-e "s#@@HELPURL#${HELPURL}#g" \
"chrome/installer/linux/common/appdata.xml.template" > "${STAGEDIR}/usr/share/metainfo/${PACKAGE}.appdata.xml"
## Desktop file
sed \
-e "s#@@MENUNAME@@#${MENUNAME}#g" \
-e "s#@@USR_BIN_SYMLINK_NAME@@#${PACKAGE}#g" \
-e "s#@@PACKAGE@@#${PACKAGE}#g" \
-e "s#@@URI_SCHEME@@#${URI_SCHEME}#g" \
-e "s#@@EXTRA_DESKTOP_ENTRIES@@#${EXTRA_DESKTOP_ENTRIES}#g" \
-e "s#@@MENUNAME#${MENUNAME}#g" \
-e "s#@@USR_BIN_SYMLINK_NAME#${PACKAGE}#g" \
-e "s#@@PACKAGE#${PACKAGE}#g" \
-e "s#@@URI_SCHEME#${URI_SCHEME}#g" \
-e "s#@@EXTRA_DESKTOP_ENTRIES#${EXTRA_DESKTOP_ENTRIES}#g" \
"chrome/installer/linux/common/desktop.template" > "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop"
chmod 644 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop"
# documentation
sed \
-e "s#@@MENUNAME@@#${MENUNAME}#g" \
-e "s#@@PACKAGE@@#${PACKAGE}#g" \
-e "s#@@MENUNAME#${MENUNAME}#g" \
-e "s#@@PACKAGE#${PACKAGE}#g" \
"chrome/app/resources/manpage.1.in" > "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1"
gzip -9n "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1"
chmod 644 "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1.gz"

View File

@@ -11,8 +11,8 @@ Index: chromium-144.0.7524.0/build/rust/rust_bindgen.gni
}
# Template to build Rust/C bindings with bindgen.
@@ -129,6 +129,13 @@ template("rust_bindgen") {
deps += [ ":${_rust_bindgen_generator_name}_static_fns" ]
@@ -135,6 +135,13 @@
deps += [ ":${_rust_bindgen_generator_target_name}_static_fns" ]
}
+ # Default configs include "-fvisibility=hidden", and for some reason this
@@ -22,9 +22,9 @@ Index: chromium-144.0.7524.0/build/rust/rust_bindgen.gni
+ args += [ "-fvisibility=default" ]
+ }
+
if (defined(cpp) && cpp) {
# This cfg is used to control the bindings public export.
rustflags = [
rustflags = [
# Don't warn about unused code in the generated bindings.
"-Adead_code",
Index: chromium-144.0.7524.0/build/rust/rust_bindgen_generator.gni
===================================================================
--- chromium-144.0.7524.0.orig/build/rust/rust_bindgen_generator.gni

View File

@@ -0,0 +1,29 @@
Fix FTBFS
/usr/include/bits/siginfo-consts.h:219:3: error: expected identifier
219 | SYS_SECCOMP = 1, /* Seccomp triggered. */
| ^
../../sandbox/linux/system_headers/linux_seccomp.h:220:39: note: expanded from macro 'SYS_SECCOMP'
220 | #define SYS_SECCOMP 1
| ^
../../sandbox/linux/seccomp-bpf/trap.cc:159:46: error: use of undeclared identifier 'SYS_SECCOMP'
159 | if (nr != LINUX_SIGSYS || info->si_code != SYS_SECCOMP || !ctx ||
| ^~~~~~~~~~~
/usr/include/bits/siginfo-consts.h:220:23: note: expanded from macro 'SYS_SECCOMP'
220 | # define SYS_SECCOMP SYS_SECCOMP
diff -up chromium-141.0.7390.122/sandbox/linux/system_headers/linux_seccomp.h.me chromium-141.0.7390.122/sandbox/linux/system_headers/linux_seccomp.h
--- chromium-141.0.7390.122/sandbox/linux/system_headers/linux_seccomp.h.me 2025-10-28 10:05:44.970248151 +0100
+++ chromium-141.0.7390.122/sandbox/linux/system_headers/linux_seccomp.h 2025-10-28 10:05:52.291345772 +0100
@@ -214,8 +214,11 @@ struct seccomp_notif_addfd {
#define SECCOMP_RET_INVALID 0x00010000U // Illegal return value
#endif
+// check glibc version < 2.42
+#if (__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 42)
#ifndef SYS_SECCOMP
#define SYS_SECCOMP 1
#endif
+#endif
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SECCOMP_H_

View File

@@ -1,14 +1,13 @@
--- chromium-141.0.7390.37/third_party/pthreadpool/chromium/jobs.cc 2025/10/02 13:48:22 1.1
+++ chromium-141.0.7390.37/third_party/pthreadpool/chromium/jobs.cc 2025/10/02 13:50:01
@@ -22,9 +22,10 @@
Index: chromium-145.0.7561.2/third_party/pthreadpool/chromium/jobs.cc
===================================================================
--- chromium-145.0.7561.2.orig/third_party/pthreadpool/chromium/jobs.cc
+++ chromium-145.0.7561.2/third_party/pthreadpool/chromium/jobs.cc
@@ -23,7 +23,7 @@
// Note that we can't use #if !defined(__cpp_module) due to it not actually
// being defined - see https://github.com/llvm/llvm-project/issues/71364 and
// https://github.com/llvm/llvm-project/blob/b251c29af45d3440374f53bb4c1645e5968593f7/clang/lib/Frontend/InitPreprocessor.cpp#L747
-#ifndef USE_LIBCXX_MODULES
-#if !defined(USE_LIBCXX_MODULES) || defined(_MSC_VER)
+#if 1
#include <atomic>
#define _LIBCPP_STDATOMIC_H
+#define __CLANG_STDATOMIC_H
using namespace std;
#endif

View File

@@ -12,7 +12,7 @@
// libxml should not be configured with catalogs enabled, so it
@@ -756,18 +760,7 @@
InitializeLibXMLIfNecessary();
EnsureLibXMLInitialized();
xmlParserCtxtPtr parser =
xmlCreatePushParserCtxt(handlers, nullptr, nullptr, 0, nullptr);
-

Binary file not shown.

View File

@@ -0,0 +1,22 @@
--- chromium-145.0.7572.2/third_party/blink/renderer/modules/xr/xr_cpu_depth_information.h 2025/12/16 14:51:38 1.1
+++ chromium-145.0.7572.2/third_party/blink/renderer/modules/xr/xr_cpu_depth_information.h 2025/12/16 14:51:49
@@ -9,6 +9,8 @@
#include "device/vr/public/mojom/xr_session.mojom-blink-forward.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h"
#include "third_party/blink/renderer/modules/xr/xr_depth_information.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/geometry/transform.h"
namespace gfx {
class Size;
--- chromium-145.0.7572.2/third_party/blink/renderer/modules/xr/xr_rigid_transform.h 2025/12/17 11:11:31 1.1
+++ chromium-145.0.7572.2/third_party/blink/renderer/modules/xr/xr_rigid_transform.h 2025/12/17 11:12:00
@@ -11,6 +11,8 @@
#include "third_party/blink/renderer/core/typed_arrays/dom_typed_array.h"
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/geometry/transform.h"
namespace gfx {
class Transform;

View File

@@ -0,0 +1,158 @@
--- chromium-145.0.7587.4/chrome/services/file_util/BUILD.gn 2025/12/26 12:24:52 1.1
+++ chromium-145.0.7587.4/chrome/services/file_util/BUILD.gn 2025/12/26 12:27:01
@@ -25,10 +25,13 @@
"//components/safe_browsing:buildflags",
"//extensions/buildflags",
"//mojo/public/cpp/bindings",
- "//third_party/unrar",
"//third_party/zlib",
]
+ if (safe_browsing_use_unrar) {
+ deps += [ "//third_party/unrar" ]
+ }
+
public_deps = [
"//chrome/services/file_util/public/mojom",
"//components/safe_browsing/core/common",
--- chromium-145.0.7587.4/chrome/services/file_util/obfuscated_archive_analysis_delegate.cc 2025/12/26 12:31:33 1.1
+++ chromium-145.0.7587.4/chrome/services/file_util/obfuscated_archive_analysis_delegate.cc 2025/12/26 12:33:45
@@ -115,6 +115,7 @@
bool closed_ = false;
};
+#if USE_UNRAR
class ObfuscatedRarReaderDelegate
: public third_party_unrar::RarReaderDelegate {
public:
@@ -186,6 +187,7 @@
std::unique_ptr<enterprise_obfuscation::DownloadObfuscator> obfuscator_;
bool init_ = false;
};
+#endif
} // namespace
@@ -214,6 +216,7 @@
return std::make_unique<ObfuscatedZipWriterDelegate>(std::move(file));
}
+#if USE_UNRAR
std::unique_ptr<third_party_unrar::RarReaderDelegate>
ObfuscatedArchiveAnalysisDelegate::CreateRarReaderDelegate(base::File file) {
base::expected<enterprise_obfuscation::ObfuscatedFileReader,
@@ -231,6 +234,7 @@
ObfuscatedArchiveAnalysisDelegate::CreateRarWriterDelegate(base::File file) {
return std::make_unique<ObfuscatedRarWriterDelegate>(std::move(file));
}
+#endif
std::unique_ptr<ArchiveAnalysisDelegate>
ObfuscatedArchiveAnalysisDelegate::CreateNestedDelegate(
--- chromium-145.0.7587.4/chrome/services/file_util/obfuscated_archive_analysis_delegate.h 2025/12/26 12:33:53 1.1
+++ chromium-145.0.7587.4/chrome/services/file_util/obfuscated_archive_analysis_delegate.h 2025/12/26 12:34:20
@@ -7,7 +7,9 @@
#include "chrome/utility/safe_browsing/archive_analysis_delegate.h"
#include "components/enterprise/obfuscation/core/utils.h"
+#if USE_UNRAR
#include "third_party/unrar/google/unrar_wrapper.h"
+#endif
namespace safe_browsing {
@@ -22,10 +24,12 @@
base::File file) override;
std::unique_ptr<SafeBrowsingZipWriterDelegate> CreateZipWriterDelegate(
base::File file) override;
+#if USE_UNRAR
std::unique_ptr<third_party_unrar::RarReaderDelegate> CreateRarReaderDelegate(
base::File file) override;
std::unique_ptr<third_party_unrar::RarWriterDelegate> CreateRarWriterDelegate(
base::File file) override;
+#endif
std::unique_ptr<ArchiveAnalysisDelegate> CreateNestedDelegate(
base::File extracted_file) override;
--- chromium-145.0.7587.4/chrome/services/file_util/regular_archive_analysis_delegate.cc 2025/12/26 12:35:30 1.1
+++ chromium-145.0.7587.4/chrome/services/file_util/regular_archive_analysis_delegate.cc 2025/12/26 12:36:02
@@ -8,8 +8,10 @@
#include "base/files/file.h"
#include "chrome/utility/safe_browsing/zip_writer_delegate.h"
+#if USE_UNRAR
#include "third_party/unrar/google/unrar_delegates.h"
#include "third_party/unrar/google/unrar_wrapper.h"
+#endif
#include "third_party/zlib/google/zip_reader.h"
namespace safe_browsing {
@@ -91,6 +93,7 @@
return std::make_unique<ZipWriterDelegate>(std::move(file));
}
+#if USE_UNRAR
std::unique_ptr<third_party_unrar::RarReaderDelegate>
RegularArchiveAnalysisDelegate::CreateRarReaderDelegate(base::File file) {
return std::make_unique<third_party_unrar::FileReader>(std::move(file));
@@ -100,6 +103,7 @@
RegularArchiveAnalysisDelegate::CreateRarWriterDelegate(base::File file) {
return std::make_unique<third_party_unrar::FileWriter>(std::move(file));
}
+#endif
std::unique_ptr<ArchiveAnalysisDelegate>
RegularArchiveAnalysisDelegate::CreateNestedDelegate(
--- chromium-145.0.7587.4/chrome/services/file_util/regular_archive_analysis_delegate.h 2025/12/26 12:36:04 1.1
+++ chromium-145.0.7587.4/chrome/services/file_util/regular_archive_analysis_delegate.h 2025/12/26 12:36:44
@@ -6,7 +6,9 @@
#define CHROME_SERVICES_FILE_UTIL_REGULAR_ARCHIVE_ANALYSIS_DELEGATE_H_
#include "chrome/utility/safe_browsing/archive_analysis_delegate.h"
+#if USE_UNRAR
#include "third_party/unrar/google/unrar_delegates.h"
+#endif
namespace safe_browsing {
@@ -20,10 +22,12 @@
base::File file) override;
std::unique_ptr<SafeBrowsingZipWriterDelegate> CreateZipWriterDelegate(
base::File file) override;
+#if USE_UNRAR
std::unique_ptr<third_party_unrar::RarReaderDelegate> CreateRarReaderDelegate(
base::File file) override;
std::unique_ptr<third_party_unrar::RarWriterDelegate> CreateRarWriterDelegate(
base::File file) override;
+#endif
std::unique_ptr<ArchiveAnalysisDelegate> CreateNestedDelegate(
base::File extracted_file) override;
};
--- chromium-145.0.7587.4/chrome/utility/safe_browsing/archive_analysis_delegate.h 2025/12/26 12:37:02 1.1
+++ chromium-145.0.7587.4/chrome/utility/safe_browsing/archive_analysis_delegate.h 2025/12/26 12:37:35
@@ -9,7 +9,9 @@
#include "base/files/file.h"
#include "chrome/utility/safe_browsing/zip_writer_delegate.h"
+#if USE_UNRAR
#include "third_party/unrar/google/unrar_delegates.h"
+#endif
#include "third_party/zlib/google/zip_reader.h"
namespace safe_browsing {
@@ -28,6 +30,7 @@
virtual std::unique_ptr<SafeBrowsingZipWriterDelegate>
CreateZipWriterDelegate(base::File file) = 0;
+#if USE_UNRAR
// Creates a reader delegate for reading the RAR archive.
virtual std::unique_ptr<third_party_unrar::RarReaderDelegate>
CreateRarReaderDelegate(base::File file) = 0;
@@ -35,6 +38,7 @@
// Creates a writer delegate for writing extracted RAR entries.
virtual std::unique_ptr<third_party_unrar::RarWriterDelegate>
CreateRarWriterDelegate(base::File file) = 0;
+#endif
// Creates a delegate for analyzing a nested archive extracted from the
// current archive. Returns nullptr if the nested archive cannot be handled

Binary file not shown.

View File

@@ -0,0 +1,62 @@
commit 24264eefbfd3464161764f31a2752c5327719452
Author: Nic Champagne Williamson <champnic@microsoft.com>
Date: Thu Jan 8 17:12:28 2026 -0800
Fix vaapi jpeg fuzzer
As part of semi-automated spanification effort, the
jpeg_decoder_fuzzertest.cc was spanified. However, this fuzzer is marked
as "no_clusterfuzz" and must be built and run manually, so the fuzz
build pipelines skipped it and it was never verified.
https://chromium-review.googlesource.com/c/chromium/src/+/7229449
This change fixes the minor compilation issues with the fuzzer, mostly
by using "as_byte_span" for the arrays created by the protobuf code,
which default to std::string.
Bug: 474097238
Change-Id: I575a9d90c546b2702517347245f857ce7f0ac4bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7411409
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Michael Tang <tangm@microsoft.com>
Commit-Queue: Nic Williamson <champnic@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1566648}
diff --git a/media/gpu/vaapi/fuzzers/jpeg_decoder/jpeg_decoder_fuzzertest.cc b/media/gpu/vaapi/fuzzers/jpeg_decoder/jpeg_decoder_fuzzertest.cc
index cd8c7593f911b..28e5914c7035c 100644
--- a/media/gpu/vaapi/fuzzers/jpeg_decoder/jpeg_decoder_fuzzertest.cc
+++ b/media/gpu/vaapi/fuzzers/jpeg_decoder/jpeg_decoder_fuzzertest.cc
@@ -54,12 +54,12 @@ media::JpegHuffmanTable ConvertToJpegHuffmanTable(
std::min(huffman_table.code_length.size(),
proto_huffman_table.code_length().size());
base::span(huffman_table.code_length)
- .copy_prefix_from(base::span(proto_huffman_table.code_value())
+ .copy_prefix_from(base::as_byte_span(proto_huffman_table.code_length())
.first(code_length_min_size));
const size_t code_value_min_size = std::min(
huffman_table.code_value.size(), proto_huffman_table.code_value().size());
base::span(huffman_table.code_value)
- .copy_prefix_from(base::span(proto_huffman_table.code_value())
+ .copy_prefix_from(base::as_byte_span(proto_huffman_table.code_value())
.first(code_value_min_size));
return huffman_table;
}
@@ -131,7 +131,7 @@ media::JpegParseResult ConvertToJpegParseResult(
base::span(parse_result.q_table[i].value)
.first(value_min_size)
.copy_from_nonoverlapping(
- base::span(input_q_table.value()).first(value_min_size));
+ base::as_byte_span(input_q_table.value()).first(value_min_size));
}
// Convert the scan header.
@@ -153,8 +153,7 @@ media::JpegParseResult ConvertToJpegParseResult(
// Convert the coded data. Note that we don't do a deep copy, so we assume
// that |proto_parse_result| will live for as long as |parse_result|.data is
// needed.
- parse_result.data = proto_parse_result.data().data();
- parse_result.data_size = proto_parse_result.data().size();
+ parse_result.data = base::as_byte_span(proto_parse_result.data());
// Convert the rest of the fields.
parse_result.restart_interval =

View File

@@ -0,0 +1,615 @@
commit 4f46f03a6c6d4c6efc1ad5d0d78030d02326f967
Author: Sergio Solano <sergiosolano@google.com>
Date: Mon Jan 5 01:50:52 2026 -0800
Spanification of jpeg_parser and related files
This is the result of running the automatic spanification on linux and
updating code to use and pass spans where size is known.
The original patch was fully automated using script:
//tools/clang/spanify/rewrite-multiple-platforms.sh -platforms=linux
Then refined with gemini-cli
gemini-run/batch-run-1761710114/group_45
BUG=439964610
Convert JpegHuffmanTable::code_value from c-style array to `std::array`.
This change updates the `JpegHuffmanTable::code_value` member from a C-style array to a `std::array<uint8_t, 162>`. Consequently, usages in `jpeg_decoder_fuzzertest.cc`, `vaapi_jpeg_encoder.cc`, and `jpeg_parser.cc` are updated to use `std::array` methods like `.size()` and `.data()`. In `vaapi_jpeg_encoder.cc`, `SafeArrayMemcpy` calls are replaced with `memcpy` and static assertions to handle the type change.
spanification: automatically spanify media/parsers/jpeg_parser.cc etc.
This is the result of running the automatic spanification on linux and
updating code to use and pass spans where size is known.
The original patch was fully automated using script:
//tools/clang/spanify/rewrite-multiple-platforms.sh -platforms=linux
Then refined with gemini-cli
gemini-run/batch-run-1761710114/group_45
BUG=439964610
Change-Id: Iea6219e18571ec93001cedd0ccd6d3925bbfd21b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7229449
Auto-Submit: Sergio Solano <sergiosolano@google.com>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Stephen Nusko <nuskos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1564243}
diff --git a/media/gpu/vaapi/fuzzers/jpeg_decoder/jpeg_decoder_fuzzertest.cc b/media/gpu/vaapi/fuzzers/jpeg_decoder/jpeg_decoder_fuzzertest.cc
index 3791e59f21c0d..cd8c7593f911b 100644
--- a/media/gpu/vaapi/fuzzers/jpeg_decoder/jpeg_decoder_fuzzertest.cc
+++ b/media/gpu/vaapi/fuzzers/jpeg_decoder/jpeg_decoder_fuzzertest.cc
@@ -50,12 +50,17 @@ media::JpegHuffmanTable ConvertToJpegHuffmanTable(
const media::fuzzing::JpegHuffmanTable& proto_huffman_table) {
media::JpegHuffmanTable huffman_table{};
huffman_table.valid = proto_huffman_table.valid();
- memcpy(huffman_table.code_length, proto_huffman_table.code_length().data(),
- std::min(std::size(huffman_table.code_length),
- proto_huffman_table.code_length().size()));
- memcpy(huffman_table.code_value, proto_huffman_table.code_value().data(),
- std::min(std::size(huffman_table.code_value),
- proto_huffman_table.code_value().size()));
+ const size_t code_length_min_size =
+ std::min(huffman_table.code_length.size(),
+ proto_huffman_table.code_length().size());
+ base::span(huffman_table.code_length)
+ .copy_prefix_from(base::span(proto_huffman_table.code_value())
+ .first(code_length_min_size));
+ const size_t code_value_min_size = std::min(
+ huffman_table.code_value.size(), proto_huffman_table.code_value().size());
+ base::span(huffman_table.code_value)
+ .copy_prefix_from(base::span(proto_huffman_table.code_value())
+ .first(code_value_min_size));
return huffman_table;
}
@@ -121,9 +126,12 @@ media::JpegParseResult ConvertToJpegParseResult(
const media::fuzzing::JpegQuantizationTable& input_q_table =
proto_parse_result.q_table()[i];
parse_result.q_table[i].valid = input_q_table.valid();
- memcpy(parse_result.q_table[i].value, input_q_table.value().data(),
- std::min(std::size(parse_result.q_table[i].value),
- input_q_table.value().size()));
+ const size_t value_min_size = std::min(
+ std::size(parse_result.q_table[i].value), input_q_table.value().size());
+ base::span(parse_result.q_table[i].value)
+ .first(value_min_size)
+ .copy_from_nonoverlapping(
+ base::span(input_q_table.value()).first(value_min_size));
}
// Convert the scan header.
diff --git a/media/gpu/vaapi/vaapi_jpeg_decoder.cc b/media/gpu/vaapi/vaapi_jpeg_decoder.cc
index 6501edd34d225..bb3d426ff4509 100644
--- a/media/gpu/vaapi/vaapi_jpeg_decoder.cc
+++ b/media/gpu/vaapi/vaapi_jpeg_decoder.cc
@@ -8,6 +8,7 @@
#include <va/va.h>
#include <iostream>
+#include <numeric>
#include <type_traits>
#include "base/compiler_specific.h"
@@ -33,15 +34,17 @@ static void FillPictureParameters(
pic_param->picture_height = frame_header.coded_height;
pic_param->num_components = frame_header.num_components;
- for (int i = 0; i < pic_param->num_components; i++) {
- UNSAFE_TODO(pic_param->components[i]).component_id =
- frame_header.components[i].id;
- UNSAFE_TODO(pic_param->components[i]).h_sampling_factor =
- frame_header.components[i].horizontal_sampling_factor;
- UNSAFE_TODO(pic_param->components[i]).v_sampling_factor =
- frame_header.components[i].vertical_sampling_factor;
- UNSAFE_TODO(pic_param->components[i]).quantiser_table_selector =
- frame_header.components[i].quantization_table_selector;
+ const auto pic_param_components = base::span(pic_param->components);
+ const auto frame_header_components = base::span(frame_header.components);
+
+ for (size_t i = 0; i < frame_header_components.size(); i++) {
+ pic_param_components[i].component_id = frame_header_components[i].id;
+ pic_param_components[i].h_sampling_factor =
+ frame_header_components[i].horizontal_sampling_factor;
+ pic_param_components[i].v_sampling_factor =
+ frame_header_components[i].vertical_sampling_factor;
+ pic_param_components[i].quantiser_table_selector =
+ frame_header_components[i].quantization_table_selector;
}
}
@@ -53,13 +56,17 @@ static void FillIQMatrix(base::span<const JpegQuantizationTable> q_table,
static_assert(
sizeof(iq_matrix->quantiser_table[0]) == sizeof(q_table[0].value),
"number of quantization entries mismatched");
+
+ auto load_quantiser_table = base::span(iq_matrix->load_quantiser_table);
+ auto iq_matrix_quantiser_table = base::span(iq_matrix->quantiser_table);
+
for (size_t i = 0; i < kJpegMaxQuantizationTableNum; i++) {
if (!q_table[i].valid)
continue;
- UNSAFE_TODO(iq_matrix->load_quantiser_table[i]) = 1;
- for (size_t j = 0; j < std::size(q_table[i].value); j++)
- UNSAFE_TODO(iq_matrix->quantiser_table[i][j]) =
- UNSAFE_TODO(q_table[i].value[j]);
+ load_quantiser_table[i] = 1;
+
+ auto dest_span = base::span(iq_matrix_quantiser_table[i]);
+ dest_span.copy_from_nonoverlapping(q_table[i].value);
}
}
@@ -88,42 +95,49 @@ static void FillHuffmanTable(base::span<const JpegHuffmanTable> dc_table,
static_assert(sizeof(huffman_table->huffman_table[0].dc_values[0]) ==
sizeof(dc_table[0].code_value[0]),
"size of huffman table code value mismatch");
+
+ auto load_huffman_table_span = base::span(huffman_table->load_huffman_table);
for (size_t i = 0; i < kJpegMaxHuffmanTableNumBaseline; i++) {
if (!dc_table[i].valid || !ac_table[i].valid)
continue;
- UNSAFE_TODO(huffman_table->load_huffman_table[i]) = 1;
-
- UNSAFE_TODO(memcpy(huffman_table->huffman_table[i].num_dc_codes,
- dc_table[i].code_length,
- sizeof(huffman_table->huffman_table[i].num_dc_codes)));
- UNSAFE_TODO(memcpy(huffman_table->huffman_table[i].dc_values,
- dc_table[i].code_value,
- sizeof(huffman_table->huffman_table[i].dc_values)));
- UNSAFE_TODO(memcpy(huffman_table->huffman_table[i].num_ac_codes,
- ac_table[i].code_length,
- sizeof(huffman_table->huffman_table[i].num_ac_codes)));
- UNSAFE_TODO(memcpy(huffman_table->huffman_table[i].ac_values,
- ac_table[i].code_value,
- sizeof(huffman_table->huffman_table[i].ac_values)));
+ load_huffman_table_span[i] = 1;
+ auto huffman_tbl = base::span(huffman_table->huffman_table);
+
+ base::span(huffman_tbl[i].num_dc_codes)
+ .copy_from_nonoverlapping(base::span(dc_table[i].code_length));
+ auto dc_values = base::span(huffman_tbl[i].dc_values);
+ dc_values.copy_from_nonoverlapping(
+ base::span(dc_table[i].code_value).first(dc_values.size()));
+ base::span(huffman_tbl[i].num_ac_codes)
+ .copy_from_nonoverlapping(base::span(ac_table[i].code_length));
+ auto ac_values = base::span(huffman_tbl[i].ac_values);
+ ac_values.copy_from_nonoverlapping(
+ base::span(ac_table[i].code_value).first(ac_values.size()));
}
}
static void FillSliceParameters(
const JpegParseResult& parse_result,
VASliceParameterBufferJPEGBaseline* slice_param) {
- slice_param->slice_data_size = parse_result.data_size;
+ slice_param->slice_data_size = parse_result.data.size();
slice_param->slice_data_offset = 0;
slice_param->slice_data_flag = VA_SLICE_DATA_FLAG_ALL;
slice_param->slice_horizontal_position = 0;
slice_param->slice_vertical_position = 0;
slice_param->num_components = parse_result.scan.num_components;
- for (int i = 0; i < slice_param->num_components; i++) {
- UNSAFE_TODO(slice_param->components[i]).component_selector =
- parse_result.scan.components[i].component_selector;
- UNSAFE_TODO(slice_param->components[i]).dc_table_selector =
- parse_result.scan.components[i].dc_selector;
- UNSAFE_TODO(slice_param->components[i]).ac_table_selector =
- parse_result.scan.components[i].ac_selector;
+
+ const auto slice_param_components =
+ base::span(slice_param->components).first(slice_param->num_components);
+ const auto scan_components = base::span(parse_result.scan.components)
+ .first(slice_param->num_components);
+
+ for (size_t i = 0; i < slice_param->num_components; i++) {
+ slice_param_components[i].component_selector =
+ scan_components[i].component_selector;
+ slice_param_components[i].dc_table_selector =
+ scan_components[i].dc_selector;
+ slice_param_components[i].ac_table_selector =
+ scan_components[i].ac_selector;
}
slice_param->restart_interval = parse_result.restart_interval;
@@ -369,8 +383,8 @@ bool VaapiJpegDecoder::SubmitBuffers(const JpegParseResult& parse_result) {
{VAIQMatrixBufferType, sizeof(iq_matrix), &iq_matrix},
{VAHuffmanTableBufferType, sizeof(huffman_table), &huffman_table},
{VASliceParameterBufferType, sizeof(slice_param), &slice_param},
- {VASliceDataBufferType, parse_result.data_size,
- const_cast<char*>(parse_result.data)}});
+ {VASliceDataBufferType, parse_result.data.size(),
+ parse_result.data.data()}});
}
} // namespace media
diff --git a/media/gpu/vaapi/vaapi_jpeg_encoder.cc b/media/gpu/vaapi/vaapi_jpeg_encoder.cc
index 97e4f9f077489..e87494c736341 100644
--- a/media/gpu/vaapi/vaapi_jpeg_encoder.cc
+++ b/media/gpu/vaapi/vaapi_jpeg_encoder.cc
@@ -9,6 +9,7 @@
#include <algorithm>
#include <array>
+#include <ranges>
#include <type_traits>
#include "base/check_op.h"
@@ -80,42 +81,44 @@ void FillQMatrix(VAQMatrixBufferJPEG* q_matrix) {
void FillHuffmanTableParameters(
VAHuffmanTableBufferJPEGBaseline* huff_table_param) {
- static_assert(std::size(kDefaultDcTable) == std::size(kDefaultAcTable),
+ static_assert(kDefaultDcTable.size() == kDefaultAcTable.size(),
"DC table and AC table size mismatch.");
- static_assert(std::size(kDefaultDcTable) ==
- std::extent<decltype(huff_table_param->huffman_table)>(),
+ auto huffman_tables = base::span(huff_table_param->huffman_table);
+ static_assert(kDefaultDcTable.size() == huffman_tables.size(),
"DC table and destination table size mismatch.");
- for (size_t i = 0; i < std::size(kDefaultDcTable); ++i) {
- const JpegHuffmanTable& dcTable = UNSAFE_TODO(kDefaultDcTable[i]);
- const JpegHuffmanTable& acTable = UNSAFE_TODO(kDefaultAcTable[i]);
- UNSAFE_TODO(huff_table_param->load_huffman_table[i]) = true;
+ auto load_huffman_table = base::span(huff_table_param->load_huffman_table);
+ static_assert(load_huffman_table.size() == huffman_tables.size(),
+ "Destination table sizes do not match.");
+
+ for (size_t i = 0; i < kDefaultDcTable.size(); ++i) {
+ const JpegHuffmanTable& dcTable = kDefaultDcTable[i];
+ const JpegHuffmanTable& acTable = kDefaultAcTable[i];
+ load_huffman_table[i] = true;
// Load DC Table.
- SafeArrayMemcpy(
- UNSAFE_TODO(huff_table_param->huffman_table[i]).num_dc_codes,
- dcTable.code_length);
+ auto num_dc_codes = base::span(huffman_tables[i].num_dc_codes);
+ static_assert(num_dc_codes.size() == dcTable.code_length.size());
+ num_dc_codes.copy_from_nonoverlapping(dcTable.code_length);
// |code_values| of JpegHuffmanTable needs to hold DC and AC code values
// so it has different size than
// |huff_table_param->huffman_table[i].dc_values|. Therefore we can't use
// SafeArrayMemcpy() here.
- static_assert(
- std::extent<decltype(huff_table_param->huffman_table[i].dc_values)>() <=
- std::extent<decltype(dcTable.code_value)>(),
- "DC table code value array too small.");
- UNSAFE_TODO(memcpy(huff_table_param->huffman_table[i].dc_values,
- &dcTable.code_value[0],
- sizeof(huff_table_param->huffman_table[i].dc_values)));
+ auto dc_values = base::span(huffman_tables[i].dc_values);
+ static_assert(dc_values.size() <= dcTable.code_value.size());
+ dc_values.copy_from_nonoverlapping(
+ base::span(dcTable.code_value).first(dc_values.size()));
// Load AC Table.
- SafeArrayMemcpy(
- UNSAFE_TODO(huff_table_param->huffman_table[i]).num_ac_codes,
- acTable.code_length);
- SafeArrayMemcpy(UNSAFE_TODO(huff_table_param->huffman_table[i]).ac_values,
- acTable.code_value);
-
- UNSAFE_TODO(memset(huff_table_param->huffman_table[i].pad, 0,
- sizeof(huff_table_param->huffman_table[i].pad)));
+ auto num_ac_codes = base::span(huffman_tables[i].num_ac_codes);
+ static_assert(num_ac_codes.size() == acTable.code_length.size());
+ num_ac_codes.copy_from_nonoverlapping(acTable.code_length);
+
+ auto ac_values = base::span(huffman_tables[i].ac_values);
+ static_assert(ac_values.size() == acTable.code_value.size());
+ ac_values.copy_from_nonoverlapping(acTable.code_value);
+
+ std::ranges::fill(huffman_tables[i].pad, 0);
}
}
@@ -287,11 +290,11 @@ size_t FillJpegHeader(const gfx::Size& input_size,
// Type (4-bit high) = 0:DC, Index (4-bit low).
header[idx++] = static_cast<uint8_t>(i);
- const JpegHuffmanTable& dcTable = UNSAFE_TODO(kDefaultDcTable[i]);
+ const JpegHuffmanTable& dcTable = kDefaultDcTable[i];
for (size_t j = 0; j < kNumDcRunSizeBits; ++j)
- header[idx++] = UNSAFE_TODO(dcTable.code_length[j]);
+ header[idx++] = dcTable.code_length[j];
for (size_t j = 0; j < kNumDcCodeWordsHuffVal; ++j)
- header[idx++] = UNSAFE_TODO(dcTable.code_value[j]);
+ header[idx++] = dcTable.code_value[j];
// AC Table.
UNSAFE_TODO(
@@ -301,11 +304,11 @@ size_t FillJpegHeader(const gfx::Size& input_size,
// Type (4-bit high) = 1:AC, Index (4-bit low).
header[idx++] = 0x10 | static_cast<uint8_t>(i);
- const JpegHuffmanTable& acTable = UNSAFE_TODO(kDefaultAcTable[i]);
+ const JpegHuffmanTable& acTable = kDefaultAcTable[i];
for (size_t j = 0; j < kNumAcRunSizeBits; ++j)
- header[idx++] = UNSAFE_TODO(acTable.code_length[j]);
+ header[idx++] = acTable.code_length[j];
for (size_t j = 0; j < kNumAcCodeWordsHuffVal; ++j)
- header[idx++] = UNSAFE_TODO(acTable.code_value[j]);
+ header[idx++] = acTable.code_value[j];
}
// Start of Scan.
diff --git a/media/parsers/jpeg_parser.cc b/media/parsers/jpeg_parser.cc
index e5ace9db6d4e8..ddd501e0821a0 100644
--- a/media/parsers/jpeg_parser.cc
+++ b/media/parsers/jpeg_parser.cc
@@ -36,62 +36,65 @@
namespace media {
-const JpegHuffmanTable kDefaultDcTable[kJpegMaxHuffmanTableNumBaseline] = {
- // luminance DC coefficients
- {
- true,
- {0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0},
- {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a,
- 0x0b},
- },
- // chrominance DC coefficients
- {
- true,
- {0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb},
- },
-};
-
-const JpegHuffmanTable kDefaultAcTable[kJpegMaxHuffmanTableNumBaseline] = {
- // luminance AC coefficients
- {
- true,
- {0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d},
- {0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06,
- 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,
- 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, 0x24, 0x33, 0x62, 0x72,
- 0x82, 0x09, 0x0a, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28,
- 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45,
- 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
- 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75,
- 0x76, 0x77, 0x78, 0x79, 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
- 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3,
- 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,
- 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9,
- 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2,
- 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf1, 0xf2, 0xf3, 0xf4,
- 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa},
- },
- // chrominance AC coefficients
- {
- true,
- {0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77},
- {0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41,
- 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,
- 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, 0x15, 0x62, 0x72, 0xd1,
- 0x0a, 0x16, 0x24, 0x34, 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26,
- 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44,
- 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
- 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74,
- 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
- 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a,
- 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4,
- 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
- 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda,
- 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf2, 0xf3, 0xf4,
- 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa},
- },
-};
+const std::array<JpegHuffmanTable, kJpegMaxHuffmanTableNumBaseline>
+ kDefaultDcTable = {{
+ // luminance DC coefficients
+ {
+ true,
+ {0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0},
+ {{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a,
+ 0x0b}},
+ },
+ // chrominance DC coefficients
+ {
+ true,
+ {0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0},
+ {{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb}},
+ },
+ }};
+const std::array<JpegHuffmanTable, kJpegMaxHuffmanTableNumBaseline>
+ kDefaultAcTable = {{
+ // luminance AC coefficients
+ {
+ true,
+ {0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d},
+ {{0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41,
+ 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91,
+ 0xa1, 0x08, 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, 0x24,
+ 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, 0x17, 0x18, 0x19, 0x1a,
+ 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38,
+ 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53,
+ 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66,
+ 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
+ 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93,
+ 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5,
+ 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
+ 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9,
+ 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1,
+ 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf1, 0xf2,
+ 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa}},
+ },
+ // chrominance AC coefficients
+ {
+ true,
+ {0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77},
+ {{0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12,
+ 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14,
+ 0x42, 0x91, 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, 0x15,
+ 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, 0xe1, 0x25, 0xf1, 0x17,
+ 0x18, 0x19, 0x1a, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
+ 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65,
+ 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
+ 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a,
+ 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3,
+ 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5,
+ 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
+ 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9,
+ 0xda, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf2,
+ 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa}},
+ },
+ }};
constexpr uint8_t kZigZag8x8[64] = {
0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5,
@@ -265,8 +268,9 @@ static bool ParseDHT(base::span<const uint8_t> buffer,
if (!reader.ReadCopy(table->code_length)) {
return false;
}
- for (size_t i = 0; i < std::size(table->code_length); i++)
- count += UNSAFE_TODO(table->code_length[i]);
+ for (uint8_t code_len : table->code_length) {
+ count += code_len;
+ }
if (!InRange(count, 0u, sizeof(table->code_value))) {
DVLOG(1) << "Invalid code count " << count;
@@ -354,8 +358,8 @@ static bool ParseSOS(base::span<const uint8_t> buffer,
// EOI marker) after search succeeds. Returns true on EOI marker found, or false
// otherwise.
static bool SearchEOI(base::span<const uint8_t> buffer,
- const char** eoi_begin_ptr,
- const char** eoi_end_ptr) {
+ const unsigned char** eoi_begin_ptr,
+ const unsigned char** eoi_end_ptr) {
DCHECK(eoi_begin_ptr);
DCHECK(eoi_end_ptr);
auto reader = base::SpanReader(buffer);
@@ -393,9 +397,8 @@ static bool SearchEOI(base::span<const uint8_t> buffer,
case JPEG_RST7:
break;
case JPEG_EOI: {
- auto buffer_chars = base::as_chars(buffer);
- *eoi_begin_ptr = buffer_chars.subspan(marker1_in_buffer).data();
- *eoi_end_ptr = buffer_chars.subspan(reader.num_read()).data();
+ *eoi_begin_ptr = &buffer[marker1_in_buffer];
+ *eoi_end_ptr = reader.remaining_span().data();
return true;
}
default:
@@ -524,9 +527,7 @@ static bool ParseSOI(base::span<const uint8_t> buffer,
}
// Scan data follows scan header immediately.
- auto remain = base::as_chars(reader.remaining_span());
- result->data = remain.data();
- result->data_size = remain.size();
+ result->data = reader.remaining_span();
return true;
}
@@ -549,22 +550,22 @@ bool ParseJpegPicture(base::span<const uint8_t> buffer,
if (!ParseSOI(reader.remaining_span(), result)) {
return false;
}
- base::span<const uint8_t> result_span = base::as_bytes(
- // TODO(crbug.com/40284755): Make this span part of JpegParseResult.
- UNSAFE_TODO(base::span(result->data, result->data_size)));
- // Update the sizes: |result->data_size| should not include the EOI marker or
+ // Update the sizes: |result->data| should not include the EOI marker or
// beyond.
- const char* eoi_begin_ptr = nullptr;
- const char* eoi_end_ptr = nullptr;
- if (!SearchEOI(result_span, &eoi_begin_ptr, &eoi_end_ptr)) {
+ const unsigned char* eoi_begin_ptr = nullptr;
+ const unsigned char* eoi_end_ptr = nullptr;
+ if (!SearchEOI(result->data, &eoi_begin_ptr, &eoi_end_ptr)) {
DLOG(ERROR) << "SearchEOI failed";
return false;
}
DCHECK(eoi_begin_ptr);
DCHECK(eoi_end_ptr);
- result->data_size = eoi_begin_ptr - result->data;
- result->image_size = eoi_end_ptr - base::as_chars(buffer).data();
+
+ ptrdiff_t scan_data_size = eoi_begin_ptr - result->data.data();
+ CHECK_GE(scan_data_size, 0);
+ result->data = result->data.first(base::checked_cast<size_t>(scan_data_size));
+ result->image_size = eoi_end_ptr - buffer.data();
return true;
}
diff --git a/media/parsers/jpeg_parser.h b/media/parsers/jpeg_parser.h
index 874284a99b6da..0d03664402347 100644
--- a/media/parsers/jpeg_parser.h
+++ b/media/parsers/jpeg_parser.h
@@ -11,6 +11,7 @@
#include <array>
#include "base/containers/span.h"
+#include "base/memory/raw_span.h"
#include "media/base/media_export.h"
namespace media {
@@ -80,17 +81,19 @@ const size_t kJpegMaxQuantizationTableNum = 4;
// Parsing result of JPEG DHT marker.
struct JpegHuffmanTable {
bool valid;
- uint8_t code_length[16];
- uint8_t code_value[162];
+ std::array<uint8_t, 16> code_length;
+ std::array<uint8_t, 162> code_value;
};
// K.3.3.1 "Specification of typical tables for DC difference coding"
MEDIA_EXPORT
-extern const JpegHuffmanTable kDefaultDcTable[kJpegMaxHuffmanTableNumBaseline];
+extern const std::array<JpegHuffmanTable, kJpegMaxHuffmanTableNumBaseline>
+ kDefaultDcTable;
// K.3.3.2 "Specification of typical tables for AC coefficient coding"
MEDIA_EXPORT
-extern const JpegHuffmanTable kDefaultAcTable[kJpegMaxHuffmanTableNumBaseline];
+extern const std::array<JpegHuffmanTable, kJpegMaxHuffmanTableNumBaseline>
+ kDefaultAcTable;
// Parsing result of JPEG DQT marker.
struct JpegQuantizationTable {
@@ -141,9 +144,7 @@ struct JpegParseResult {
JpegQuantizationTable q_table[kJpegMaxQuantizationTableNum];
uint16_t restart_interval;
JpegScanHeader scan;
- const char* data;
- // The size of compressed data of the first image.
- size_t data_size;
+ base::raw_span<const uint8_t> data;
// The size of the first entire image including header.
size_t image_size;
};
diff --git a/media/parsers/jpeg_parser_unittest.cc b/media/parsers/jpeg_parser_unittest.cc
index d446cf93a92e6..8f5d9a8bb2c16 100644
--- a/media/parsers/jpeg_parser_unittest.cc
+++ b/media/parsers/jpeg_parser_unittest.cc
@@ -77,7 +77,7 @@ TEST(JpegParserTest, Parsing) {
EXPECT_EQ(3, result.scan.components[2].component_selector);
EXPECT_EQ(1, result.scan.components[2].dc_selector);
EXPECT_EQ(1, result.scan.components[2].ac_selector);
- EXPECT_EQ(121148u, result.data_size);
+ EXPECT_EQ(121148u, result.data.size());
EXPECT_EQ(121358u, result.image_size);
}
@@ -100,7 +100,7 @@ TEST(JpegParserTest, TrailingZerosShouldBeIgnored) {
// Verify selected fields
// SOS fields
- EXPECT_EQ(121148u, result.data_size);
+ EXPECT_EQ(121148u, result.data.size());
EXPECT_EQ(121358u, result.image_size);
}

View File

@@ -1,3 +1,128 @@
-------------------------------------------------------------------
Mon Feb 16 13:16:07 UTC 2026 - Ruediger Oertel <ro@suse.com>
- update/resync ppc64le patches from fedora:
* modified patches:
ppc-fedora-0001-Add-PPC64-support-for-boringssl.patch
ppc-fedora-0001-Add-ppc64-target-to-libaom.patch
ppc-fedora-0001-Add-pregenerated-config-for-libaom-on-ppc64.patch
ppc-fedora-0001-Enable-ppc64-pointer-compression.patch
ppc-fedora-0001-Force-baseline-POWER8-AltiVec-VSX-CPU-features-when-.patch
ppc-fedora-0001-Implement-support-for-PPC64-on-Linux.patch
ppc-fedora-0001-Implement-support-for-ppc64-on-Linux.patch
ppc-fedora-0001-add-xnn-ppc64el-support.patch
ppc-fedora-0001-sandbox-Enable-seccomp_bpf-for-ppc64.patch
ppc-fedora-0001-swiftshader-fix-build.patch
ppc-fedora-0001-third_party-angle-Include-missing-header-cstddef-in-.patch
ppc-fedora-0001-third_party-libvpx-Properly-generate-gni-on-ppc64.patch
ppc-fedora-0001-third_party-pffft-Include-altivec.h-on-ppc64-with-SI.patch
ppc-fedora-0002-Add-PPC64-generated-files-for-boringssl.patch
ppc-fedora-0002-Add-ppc64-trap-instructions.patch
ppc-fedora-0002-regenerate-xnn-buildgn.patch
ppc-fedora-0002-third_party-libvpx-Remove-bad-ppc64-config.patch
ppc-fedora-0002-third_party-lss-kernel-structs.patch
ppc-fedora-0003-third_party-libvpx-Add-ppc64-generated-config.patch
ppc-fedora-0004-third_party-crashpad-port-curl-transport-ppc64.patch
ppc-fedora-0004-third_party-libvpx-work-around-ambiguous-vsx.patch
ppc-fedora-HACK-debian-clang-disable-base-musttail.patch
ppc-fedora-HACK-third_party-libvpx-use-generic-gnu.patch
ppc-fedora-Rtc_base-system-arch.h-PPC.patch
ppc-fedora-add-ppc64-architecture-string.patch
ppc-fedora-add-ppc64-architecture-to-extensions.diff
ppc-fedora-add-ppc64-pthread-stack-size.patch
ppc-fedora-dawn-fix-ppc64le-detection.patch
ppc-fedora-fix-breakpad-compile.patch
ppc-fedora-fix-different-data-layouts.patch
ppc-fedora-fix-partition-alloc-compile.patch
ppc-fedora-fix-rust-linking.patch
ppc-fedora-fix-study-crash.patch
ppc-fedora-fix-unknown-warning-option-messages.diff
ppc-fedora-skia-vsx-instructions.patch
* removed patches:
ppc-fedora-0001-linux-seccomp-bpf-ppc64-glibc-workaround-in-SIGSYS-h.patch
ppc-fedora-0001-services-service_manager-sandbox-linux-Fix-TCGETS-de.patch
ppc-fedora-0001-sandbox-linux-bpf_dsl-Update-syscall-ranges-for-ppc6.patch
ppc-fedora-0001-sandbox-linux-Implement-partial-support-for-ppc64-sy.patch
ppc-fedora-0001-sandbox-linux-Update-IsSyscallAllowed-in-broker_proc.patch
ppc-fedora-0001-sandbox-linux-Update-syscall-helpers-lists-for-ppc64.patch
ppc-fedora-0002-sandbox-linux-bpf_dsl-Modify-seccomp_macros-to-add-s.patch
ppc-fedora-0003-sandbox-linux-system_headers-Update-linux-seccomp-he.patch
ppc-fedora-0004-sandbox-linux-system_headers-Update-linux-signal-hea.patch
ppc-fedora-0005-sandbox-linux-seccomp-bpf-Add-ppc64-syscall-stub.patch
ppc-fedora-0005-sandbox-linux-update-unit-test-for-ppc64.patch
ppc-fedora-0006-sandbox-linux-disable-timedwait-time64-ppc64.patch
ppc-fedora-0007-sandbox-linux-add-ppc64-stat.patch
ppc-fedora-Sandbox-linux-services-credentials.cc-PPC.patch
ppc-fedora-0008-sandbox-fix-ppc64le-glibc234.patch
ppc-fedora-0002-Include-cstddef-to-fix-build.patch
ppc-fedora-0001-third-party-hwy-wrong-include.patch
ppc-fedora-fix-ppc64-linux-syscalls-headers.patch
ppc-fedora-use-sysconf-page-size-on-ppc64.patch
* added patches:
ppc-fedora-HACK-debian-clang-disable-pa-musttail.patch
ppc-fedora-fix-rustc.patch
ppc-fedora-fix-page-allocator-overflow.patch
-------------------------------------------------------------------
Mon Feb 16 11:01:52 UTC 2026 - Ruediger Oertel <ro@suse.com>
- fix INSTALL.sh again to replace the tags in desktop file,
appdata and manpage (boo#1258199)
-------------------------------------------------------------------
Fri Feb 13 19:51:45 UTC 2026 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 145.0.7632.75:
* CVE-2026-2441: Use after free in CSS (boo#1258185)
-------------------------------------------------------------------
Fri Feb 13 17:21:22 UTC 2026 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 145.0.7632.67:
* Revert a change in url_fixer that may have caused crashes
-------------------------------------------------------------------
Wed Feb 4 22:46:39 UTC 2026 - Ruediger Oertel <ro@suse.com>
- Chromium 145.0.7632.45 (boo#1258116)
* jpeg-xl support has been readded
* CVE-2026-2313: Use after free in CSS
* CVE-2026-2314: Heap buffer overflow in Codecs
* CVE-2026-2315: Inappropriate implementation in WebGPU
* CVE-2026-2316: Insufficient policy enforcement in Frames
* CVE-2026-2317: Inappropriate implementation in Animation
* CVE-2026-2318: Inappropriate implementation in PictureInPicture
* CVE-2026-2319: Race in DevTools
* CVE-2026-2320: Inappropriate implementation in File input
* CVE-2026-2321: Use after free in Ozone
* CVE-2026-2322: Inappropriate implementation in File input
* CVE-2026-2323: Inappropriate implementation in Downloads
- modified patches:
* chromium-127-rust-clanglib.patch (context)
* chromium-144-revert-libxml-2.13.patch (context)
* ppc-fedora-0001-Force-baseline-POWER8-AltiVec-VSX-CPU-features-when-.patch
(context)
* ppc-debian-0003-third_party-ffmpeg-Add-ppc64-generated-config.patch
(drop ref to ppc/lossless_audiodsp_altivec.o, dropped upstream)
* chromium-141-no_cxx_modules.patch
* ppc-fedora-0001-Add-PPC64-support-for-boringssl.patch (context)
* ppc-fedora-0002-regenerate-xnn-buildgn.patch (regenerated)
* system-libdrm.patch (context)
* ppc-fedora-0002-third_party-libvpx-Remove-bad-ppc64-config.patch
- added patches:
* chromium-145-blink_missing_include.patch
* chromium-145-use_unrar.patch
(properly respect disabling unrar in recent code changes)
* ppc-fedora-0009-sandbox-ignore-byte-span-error.patch
* chromium-4f46f03a6c6d4c6efc1ad5d0d78030d02326f967.patch
(revert spanification for jpeg_parser ending in compile error)
* chromium-24264eefbfd3464161764f31a2752c5327719452.patch
(also to revert jpeg_encoder spanification for older llvm)
- bump BR for gn to 0.20251217
* need the string_hash function for rust gni
- add rollup binaries for arm64 and powerpc64le, missing upstream
using tarballs from npm.skia.org
-------------------------------------------------------------------
Wed Feb 4 09:55:40 UTC 2026 - Ruediger Oertel <ro@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package chromium
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2026 SUSE LLC
# Copyright (c) 2024 Callum Farmer <gmbr3@opensuse.org>
# Copyright (c) 2026 Andreas Stieger <Andreas.Stieger@gmx.de>
#
@@ -75,8 +75,10 @@
%endif
# GCC version
%define gcc_version 14
# esbuild version
# minimal esbuild version
%define esbuild_version 0.25.1
# minimal gn version
%define gn_version 0.20251217
%if 0%{?suse_version} <= 1699
%bcond_with system_webp
%bcond_with system_re2
@@ -127,7 +129,7 @@
%global official_build 1
Name: chromium%{n_suffix}
Version: 144.0.7559.132
Version: 145.0.7632.75
Release: 0
Summary: Google's open source browser project
License: BSD-3-Clause AND LGPL-2.1-or-later
@@ -145,6 +147,10 @@ Source104: chromium-symbolic.svg
Source105: INSTALL.sh
#
Source106: chrome-wrapper
# upstream only contains x86 binary still needed:
Source201: https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz
Source202: https://npm.skia.org/chrome-devtools/@rollup%2frollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz
# global patches
Patch0: chromium-libusb_interrupt_event_handler.patch
# PATCH-FIX-OPENSUSE Make the 1-click-install ymp file always download [bnc#836059]
Patch1: exclude_ymp.patch
@@ -179,71 +185,77 @@ Patch377: chromium-139-deterministic.patch
Patch380: chromium-141-use_libcxx_modules.patch
Patch381: chromium-141-csss_style_sheet.patch
Patch382: chromium-141-no_cxx_modules.patch
Patch383: chromium-141-glibc-2.42-SYS_SECCOMP.patch
Patch385: chromium-142-rust_no_sanitize.patch
Patch386: chromium-143-libpng-unbundle.patch
Patch387: chromium-143-cookie_string_view.patch
Patch389: chromium-143-revert_rust_is_multiple_of.patch
Patch390: chromium-144-revert_gfx_value_or.patch
Patch391: chromium-145-blink_missing_include.patch
Patch392: chromium-145-use_unrar.patch
Patch393: force-rust-nightly.patch
# conditionally applied patches ppc64le only
Patch401: ppc-fedora-add-ppc64-architecture-string.patch
Patch402: ppc-fedora-0001-linux-seccomp-bpf-ppc64-glibc-workaround-in-SIGSYS-h.patch
Patch403: ppc-fedora-0001-sandbox-Enable-seccomp_bpf-for-ppc64.patch
Patch404: ppc-fedora-0001-services-service_manager-sandbox-linux-Fix-TCGETS-de.patch
Patch405: ppc-fedora-0001-sandbox-linux-bpf_dsl-Update-syscall-ranges-for-ppc6.patch
Patch406: ppc-fedora-0001-sandbox-linux-Implement-partial-support-for-ppc64-sy.patch
Patch407: ppc-fedora-0001-sandbox-linux-Update-IsSyscallAllowed-in-broker_proc.patch
Patch408: ppc-fedora-0001-sandbox-linux-Update-syscall-helpers-lists-for-ppc64.patch
Patch409: ppc-fedora-0002-sandbox-linux-bpf_dsl-Modify-seccomp_macros-to-add-s.patch
Patch410: ppc-fedora-0003-sandbox-linux-system_headers-Update-linux-seccomp-he.patch
Patch411: ppc-fedora-0004-sandbox-linux-system_headers-Update-linux-signal-hea.patch
Patch412: ppc-fedora-0005-sandbox-linux-seccomp-bpf-Add-ppc64-syscall-stub.patch
Patch413: ppc-fedora-0005-sandbox-linux-update-unit-test-for-ppc64.patch
Patch414: ppc-fedora-0006-sandbox-linux-disable-timedwait-time64-ppc64.patch
Patch415: ppc-fedora-0007-sandbox-linux-add-ppc64-stat.patch
Patch416: ppc-fedora-Sandbox-linux-services-credentials.cc-PPC.patch
Patch417: ppc-fedora-0008-sandbox-fix-ppc64le-glibc234.patch
Patch418: ppc-fedora-0001-third_party-angle-Include-missing-header-cstddef-in-.patch
Patch419: ppc-fedora-0001-Add-PPC64-support-for-boringssl.patch
Patch420: ppc-fedora-0001-third_party-libvpx-Properly-generate-gni-on-ppc64.patch
Patch421: ppc-fedora-0001-third_party-pffft-Include-altivec.h-on-ppc64-with-SI.patch
Patch422: ppc-fedora-0002-Add-PPC64-generated-files-for-boringssl.patch
Patch423: ppc-fedora-0002-third_party-lss-kernel-structs.patch
Patch424: ppc-fedora-0001-swiftshader-fix-build.patch
Patch425: ppc-fedora-Rtc_base-system-arch.h-PPC.patch
Patch426: ppc-fedora-0002-Include-cstddef-to-fix-build.patch
Patch427: ppc-fedora-0004-third_party-crashpad-port-curl-transport-ppc64.patch
Patch428: ppc-fedora-HACK-third_party-libvpx-use-generic-gnu.patch
Patch429: ppc-fedora-0001-third-party-hwy-wrong-include.patch
Patch430: ppc-fedora-HACK-debian-clang-disable-base-musttail.patch
Patch431: ppc-fedora-0001-Add-ppc64-target-to-libaom.patch
Patch432: ppc-fedora-0001-Add-pregenerated-config-for-libaom-on-ppc64.patch
Patch433: ppc-fedora-0002-third_party-libvpx-Remove-bad-ppc64-config.patch
Patch434: ppc-fedora-0003-third_party-libvpx-Add-ppc64-generated-config.patch
Patch435: ppc-fedora-0004-third_party-libvpx-work-around-ambiguous-vsx.patch
Patch436: ppc-fedora-skia-vsx-instructions.patch
Patch437: ppc-fedora-0001-Implement-support-for-ppc64-on-Linux.patch
Patch438: ppc-fedora-0001-Implement-support-for-PPC64-on-Linux.patch
Patch439: ppc-fedora-0001-Force-baseline-POWER8-AltiVec-VSX-CPU-features-when-.patch
Patch442: ppc-fedora-fix-rust-linking.patch
Patch443: ppc-fedora-fix-breakpad-compile.patch
Patch444: ppc-fedora-fix-partition-alloc-compile.patch
Patch445: ppc-fedora-fix-study-crash.patch
Patch446: ppc-fedora-memory-allocator-dcheck-assert-fix.patch
Patch447: ppc-fedora-fix-different-data-layouts.patch
Patch448: ppc-fedora-0002-Add-ppc64-trap-instructions.patch
Patch449: ppc-fedora-fix-ppc64-linux-syscalls-headers.patch
Patch450: ppc-fedora-use-sysconf-page-size-on-ppc64.patch
Patch451: ppc-fedora-0001-Enable-ppc64-pointer-compression.patch
Patch452: ppc-fedora-dawn-fix-ppc64le-detection.patch
Patch453: ppc-fedora-add-ppc64-architecture-to-extensions.diff
Patch454: ppc-fedora-fix-unknown-warning-option-messages.diff
Patch455: ppc-fedora-add-ppc64-pthread-stack-size.patch
Patch457: ppc-chromium-136-clang-config.patch
Patch458: ppc-fedora-0001-add-xnn-ppc64el-support.patch
# where applicable patch numbers from fedora specfile + 100
Patch400: ppc-fedora-memory-allocator-dcheck-assert-fix.patch
#
Patch459: ppc-fedora-add-ppc64-architecture-string.patch
Patch461: ppc-fedora-0001-sandbox-Enable-seccomp_bpf-for-ppc64.patch
#
Patch476: ppc-fedora-0001-third_party-angle-Include-missing-header-cstddef-in-.patch
Patch477: ppc-fedora-0001-Add-PPC64-support-for-boringssl.patch
Patch478: ppc-fedora-0001-third_party-libvpx-Properly-generate-gni-on-ppc64.patch
Patch480: ppc-fedora-0001-third_party-pffft-Include-altivec.h-on-ppc64-with-SI.patch
Patch481: ppc-fedora-0002-Add-PPC64-generated-files-for-boringssl.patch
Patch482: ppc-fedora-0002-third_party-lss-kernel-structs.patch
#
Patch483: ppc-fedora-0001-swiftshader-fix-build.patch
#
Patch484: ppc-fedora-Rtc_base-system-arch.h-PPC.patch
#
Patch486: ppc-fedora-0004-third_party-crashpad-port-curl-transport-ppc64.patch
#
Patch487: ppc-fedora-HACK-third_party-libvpx-use-generic-gnu.patch
Patch489: ppc-fedora-HACK-debian-clang-disable-base-musttail.patch
Patch490: ppc-fedora-HACK-debian-clang-disable-pa-musttail.patch
Patch491: ppc-fedora-0001-Add-ppc64-target-to-libaom.patch
Patch492: ppc-fedora-0001-Add-pregenerated-config-for-libaom-on-ppc64.patch
#
Patch493: ppc-fedora-0002-third_party-libvpx-Remove-bad-ppc64-config.patch
Patch494: ppc-fedora-0003-third_party-libvpx-Add-ppc64-generated-config.patch
#
Patch495: ppc-fedora-0004-third_party-libvpx-work-around-ambiguous-vsx.patch
#
Patch496: ppc-fedora-skia-vsx-instructions.patch
#
Patch497: ppc-fedora-0001-Implement-support-for-ppc64-on-Linux.patch
Patch498: ppc-fedora-0001-Implement-support-for-PPC64-on-Linux.patch
Patch499: ppc-fedora-0001-Force-baseline-POWER8-AltiVec-VSX-CPU-features-when-.patch
Patch501: ppc-fedora-fix-rustc.patch
Patch502: ppc-fedora-fix-rust-linking.patch
Patch503: ppc-fedora-fix-breakpad-compile.patch
Patch504: ppc-fedora-fix-partition-alloc-compile.patch
Patch505: ppc-fedora-fix-study-crash.patch
Patch507: ppc-fedora-fix-different-data-layouts.patch
Patch508: ppc-fedora-0002-Add-ppc64-trap-instructions.patch
#
Patch509: ppc-fedora-fix-page-allocator-overflow.patch
Patch510: ppc-fedora-0001-Enable-ppc64-pointer-compression.patch
#
Patch511: ppc-fedora-dawn-fix-ppc64le-detection.patch
Patch512: ppc-fedora-add-ppc64-architecture-to-extensions.diff
#
Patch513: ppc-fedora-fix-unknown-warning-option-messages.diff
Patch515: ppc-fedora-add-ppc64-pthread-stack-size.patch
#
Patch517: ppc-fedora-0001-add-xnn-ppc64el-support.patch
# https://src.fedoraproject.org/rpms/chromium/blob/rawhide/f/0002-regenerate-xnn-buildgn.patch
Patch459: ppc-fedora-0002-regenerate-xnn-buildgn.patch
Patch460: ppc-debian-0003-third_party-ffmpeg-Add-ppc64-generated-config.patch
Patch518: ppc-fedora-0002-regenerate-xnn-buildgn.patch
Patch519: ppc-fedora-0009-sandbox-ignore-byte-span-error.patch
# fedora does this in chromium-144-rust-clanglib.patch
# while we do this without ppc in chromium-121-rust-clang_lib.patch
Patch550: ppc-chromium-136-clang-config.patch
# from debian
Patch551: ppc-debian-0003-third_party-ffmpeg-Add-ppc64-generated-config.patch
# conditionally applied patches
# patch where libxml < 2.12
Patch1010: chromium-124-system-libxml.patch
@@ -254,6 +266,11 @@ Patch1040: gtk-414.patch
Patch1041: gtk-414-2.patch
# flac is too old
Patch1050: chromium-140-old-flac.patch
# revert upstream patch ending in compile error
# error: static assertion expression is not an integral constant expression
Patch1060: chromium-24264eefbfd3464161764f31a2752c5327719452.patch
Patch1061: chromium-4f46f03a6c6d4c6efc1ad5d0d78030d02326f967.patch
# end conditionally applied patches
BuildRequires: SDL-devel
BuildRequires: bison
@@ -263,7 +280,7 @@ BuildRequires: elfutils
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: git
BuildRequires: gn >= 0.20250619
BuildRequires: gn >= %{gn_version}
BuildRequires: gperf
BuildRequires: hicolor-icon-theme
BuildRequires: golang(API)
@@ -279,8 +296,8 @@ BuildRequires: nasm
BuildRequires: ninja >= 1.7.2
BuildRequires: pam-devel
BuildRequires: pkgconfig
%if 0%{?suse_version} >= 1600
BuildRequires: nodejs-common
%if 0%{?suse_version} >= 1600 || 0%{?sle_version} >= 150700
BuildRequires: nodejs-default
%else
BuildRequires: nodejs22
%endif
@@ -502,7 +519,7 @@ WebDriver is an open source tool for automated testing of webapps across many br
%autopatch -p1 -M 399
%ifarch ppc64le
%autopatch -p1 -m 400 -M 499
%autopatch -p1 -m 400 -M 599
%endif
%if %{without libxml2_2_12}
@@ -522,6 +539,22 @@ WebDriver is an open source tool for automated testing of webapps across many br
%patch -p1 -P 1050
%endif
clang_version="$(clang --version | sed -n 's/clang version //p')"
if [[ $(echo ${clang_version} | cut -d. -f1) -lt 21 ]]; then
%patch -p1 -R -P 1060
%patch -p1 -R -P 1061
fi
# unpack rollup binary for aarch64
%ifarch aarch64
tar xf %{SOURCE201} && mv package third_party/devtools-frontend/src/node_modules/@rollup/rollup-linux-arm64-gnu
%endif
#unpack rollup binary for ppc64le
%ifarch ppc64le
tar xf %{SOURCE202} && mv package third_party/devtools-frontend/src/node_modules/@rollup/rollup-linux-powerpc64le-gnu
%endif
%build
# esbuild
rm third_party/devtools-frontend/src/third_party/esbuild/esbuild
@@ -794,7 +827,6 @@ keeplibs=(
third_party/webrtc/modules/third_party/fft
third_party/webrtc/modules/third_party/g711
third_party/webrtc/modules/third_party/g722
third_party/webrtc/rtc_base/third_party/sigslot
third_party/webrtc/rtc_tools
third_party/widevine
third_party/woff2

View File

@@ -9384,7 +9384,7 @@ Index: chromium-141.0.7390.37/third_party/ffmpeg/ffmpeg_generated.gni
===================================================================
--- chromium-141.0.7390.37.orig/third_party/ffmpeg/ffmpeg_generated.gni
+++ chromium-141.0.7390.37/third_party/ffmpeg/ffmpeg_generated.gni
@@ -469,6 +469,40 @@ if ((use_linux_config && current_cpu ==
@@ -320,6 +320,39 @@
]
}
@@ -9403,7 +9403,6 @@ Index: chromium-141.0.7390.37/third_party/ffmpeg/ffmpeg_generated.gni
+ "libavcodec/ppc/h264chroma_init.c",
+ "libavcodec/ppc/hpeldsp_altivec.c",
+ "libavcodec/ppc/idctdsp.c",
+ "libavcodec/ppc/lossless_audiodsp_altivec.c",
+ "libavcodec/ppc/lossless_videodsp_altivec.c",
+ "libavcodec/ppc/me_cmp.c",
+ "libavcodec/ppc/mpegaudiodsp_altivec.c",
@@ -9423,8 +9422,8 @@ Index: chromium-141.0.7390.37/third_party/ffmpeg/ffmpeg_generated.gni
+}
+
if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") ||
(is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") ||
(is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") ||
(use_linux_config && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
Index: chromium-141.0.7390.37/third_party/ffmpeg/libavcodec/ppc/h264dsp_ppc.c
===================================================================
--- /dev/null

View File

@@ -1,7 +1,7 @@
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/abi_self_test.cc
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/abi_self_test.cc
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/crypto/abi_self_test.cc
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/abi_self_test.cc
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/crypto/abi_self_test.cc
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/abi_self_test.cc
@@ -521,3 +521,289 @@ TEST(ABITest, AArch64) {
CHECK_ABI_NO_UNWIND(abi_test_clobber_v15_upper);
}
@@ -292,10 +292,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/abi_self_test.cc
+ CHECK_ABI_NO_UNWIND(abi_test_clobber_lr);
+}
+#endif // OPENSSL_PPC64LE && SUPPORTS_ABI_TEST
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/cpu_ppc64le.cc
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/cpu_ppc64le.cc
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/cpu_ppc64le.cc
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/cpu_ppc64le.cc
@@ -0,0 +1,38 @@
+/* Copyright (c) 2016, Google Inc.
+ *
@@ -335,11 +335,11 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/cpu_ppc64le.cc
+}
+
+#endif // OPENSSL_PPC64LE
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/crypto.cc
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/crypto.cc
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/crypto/crypto.cc
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/crypto.cc
@@ -67,6 +67,10 @@ uint32_t OPENSSL_get_ia32cap(int idx) {
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/crypto/crypto.cc
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/crypto.cc
@@ -69,6 +69,10 @@ uint32_t OPENSSL_get_ia32cap(int idx) {
return OPENSSL_ia32cap_P[idx];
}
@@ -350,10 +350,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/crypto.cc
#elif (defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64)) && \
!defined(OPENSSL_STATIC_ARMCAP)
HIDDEN uint32_t OPENSSL_armcap_P = 0;
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/asm/aesp8-ppc.pl
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/aes/asm/aesp8-ppc.pl
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/asm/aesp8-ppc.pl
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/aes/asm/aesp8-ppc.pl
@@ -0,0 +1,3809 @@
+#! /usr/bin/env perl
+# Copyright 2014-2018 The OpenSSL Project Authors. All Rights Reserved.
@@ -4164,12 +4164,12 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/as
+}
+
+close STDOUT or die "error closing STDOUT: $!";
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/internal.h
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/aes/internal.h
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/crypto/fipsmodule/aes/internal.h
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/internal.h
@@ -81,6 +81,12 @@ inline int vpaes_capable(void) { return
inline int vpaes_capable(void) { return CRYPTO_is_NEON_capable(); }
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/crypto/fipsmodule/aes/internal.h
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/aes/internal.h
@@ -81,6 +81,12 @@ inline int vpaes_capable() { return CRYP
inline int vpaes_capable() { return CRYPTO_is_NEON_capable(); }
#endif
+#elif defined(OPENSSL_PPC64LE)
@@ -4181,25 +4181,25 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/in
#endif
#endif // !NO_ASM
@@ -501,6 +507,13 @@ void aes_gcm_dec_kernel(const uint8_t *i
const u128 Htable[16]);
@@ -532,6 +538,13 @@ extern "C" void aes_gcm_dec_kernel(const
const AES_KEY *key, const u128 Htable[16]);
#endif
+#elif defined(OPENSSL_PPC64LE)
+#define GHASH_ASM_PPC64LE
+#define GCM_FUNCREF
+void gcm_init_p8(u128 Htable[16], const uint64_t Xi[2]);
+void gcm_gmult_p8(uint8_t Xi[16], const u128 Htable[16]);
+void gcm_ghash_p8(uint8_t Xi[16], const u128 Htable[16], const uint8_t *inp,
+extern "C" void gcm_init_p8(u128 Htable[16], const uint64_t Xi[2]);
+extern "C" void gcm_gmult_p8(uint8_t Xi[16], const u128 Htable[16]);
+extern "C" void gcm_ghash_p8(uint8_t Xi[16], const u128 Htable[16], const uint8_t *inp,
+ size_t len);
#endif
#endif // OPENSSL_NO_ASM
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/bcm.cc
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/bcm.cc
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/crypto/fipsmodule/bcm.cc
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/bcm.cc
@@ -104,6 +104,7 @@
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/crypto/fipsmodule/bcm.cc
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/bcm.cc
@@ -111,6 +111,7 @@ OPENSSL_CLANG_PRAGMA("clang diagnostic i
#include "self_check/fips.cc.inc"
#include "self_check/self_check.cc.inc"
#include "service_indicator/service_indicator.cc.inc"
@@ -4207,39 +4207,11 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/bcm.cc
#include "sha/sha1.cc.inc"
#include "sha/sha256.cc.inc"
#include "sha/sha512.cc.inc"
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/bn/bn.cc.inc
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.cc.inc
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/crypto/fipsmodule/bn/bn.cc.inc
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/bn/bn.cc.inc
@@ -330,6 +330,23 @@ int bn_expand(BIGNUM *bn, size_t bits) {
}
int bn_resize_words(BIGNUM *bn, size_t words) {
+#if defined(OPENSSL_PPC64LE)
+ // This is a workaround for a miscompilation bug in Clang 7.0.1 on POWER.
+ // The unittests catch the miscompilation, if it occurs, and it manifests
+ // as a crash in |bn_fits_in_words|.
+ //
+ // The bug only triggers if building in FIPS mode and with -O3. Clang 8.0.1
+ // has the same bug but this workaround is not effective there---I've not
+ // been able to find a workaround for 8.0.1.
+ //
+ // At the time of writing (2019-08-08), Clang git does *not* have this bug
+ // and does not need this workaroud. The current git version should go on to
+ // be Clang 10 thus, once we can depend on that, this can be removed.
+ if (value_barrier_w((size_t)bn->width == words)) {
+ return 1;
+ }
+#endif
+
if ((size_t)bn->width <= words) {
if (!bn_wexpand(bn, words)) {
return 0;
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.cc.inc
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.cc.inc
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.cc.inc
@@ -1229,6 +1229,8 @@ int EVP_has_aes_hardware(void) {
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.cc.inc
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.cc.inc
@@ -1217,6 +1217,8 @@ int EVP_has_aes_hardware() {
return hwaes_capable() && crypto_gcm_clmul_enabled();
#elif defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64)
return hwaes_capable() && CRYPTO_is_ARMv8_PMULL_capable();
@@ -4248,10 +4220,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/cipher
#else
return 0;
#endif
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/asm/ghashp8-ppc.pl
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/aes/asm/ghashp8-ppc.pl
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/asm/ghashp8-ppc.pl
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/aes/asm/ghashp8-ppc.pl
@@ -0,0 +1,671 @@
+#! /usr/bin/env perl
+# Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved.
@@ -4924,11 +4896,11 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/as
+}
+
+close STDOUT or die "error closing STDOUT: $!"; # enforce flush
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/gcm.cc.inc
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/aes/gcm.cc.inc
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/crypto/fipsmodule/aes/gcm.cc.inc
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/gcm.cc.inc
@@ -233,6 +233,13 @@ void CRYPTO_ghash_init(gmult_func *out_m
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/crypto/fipsmodule/aes/gcm.cc.inc
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/aes/gcm.cc.inc
@@ -235,6 +235,13 @@ void bssl::CRYPTO_ghash_init(gmult_func
*out_hash = gcm_ghash_neon;
return;
}
@@ -4942,11 +4914,11 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/gc
#endif
gcm_init_nohw(out_table, H);
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/gcm_test.cc
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/aes/gcm_test.cc
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/crypto/fipsmodule/aes/gcm_test.cc
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/gcm_test.cc
@@ -169,5 +169,15 @@ TEST(GCMTest, ABI) {
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/crypto/fipsmodule/aes/gcm_test.cc
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/aes/gcm_test.cc
@@ -172,6 +172,16 @@ TEST(GCMTest, ABI) {
}
}
#endif
@@ -4962,10 +4934,11 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/aes/gc
+#endif // GHASH_ASM_PPC64LE
}
#endif // SUPPORTS_ABI_TEST && !OPENSSL_NO_ASM
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/rand/getrandom_fillin.h
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/rand/getrandom_fillin.h
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/crypto/rand/getrandom_fillin.h
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/rand/getrandom_fillin.h
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/crypto/rand/getrandom_fillin.h
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/rand/getrandom_fillin.h
@@ -30,6 +30,8 @@
#define EXPECTED_NR_getrandom 278
#elif defined(OPENSSL_ARM)
@@ -4975,12 +4948,11 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/rand/getrandom_fi
#elif defined(OPENSSL_RISCV64)
#define EXPECTED_NR_getrandom 278
#endif
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/rand/rand.cc.inc
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/rand/rand.cc.inc
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/crypto/fipsmodule/rand/rand.cc.inc
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/rand/rand.cc.inc
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/sha/internal.h
@@ -430,6 +430,11 @@
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/crypto/fipsmodule/rand/rand.cc.inc
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/rand/rand.cc.inc
@@ -429,6 +429,11 @@ bcm_infallible bssl::BCM_rand_bytes_with
// Take a read lock around accesses to |state->drbg|. This is needed to
// avoid returning bad entropy if we race with
// |rand_thread_state_clear_all|.
@@ -4992,9 +4964,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/sha/in
CRYPTO_MUTEX_lock_read(&state->clear_drbg_lock);
#endif
if (!CTR_DRBG_reseed_ex(&state->drbg, seed, sizeof(seed),
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/sha/internal.h
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/crypto/fipsmodule/sha/internal.h
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/sha/internal.h
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/crypto/fipsmodule/sha/internal.h
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/sha/internal.h
@@ -23,6 +23,16 @@
extern "C" {
#endif
@@ -5012,10 +4985,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/sha/in
// Define SHA{n}[_{variant}]_ASM if sha{n}_block_data_order[_{variant}] is
// defined in assembly.
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/sha/sha1-altivec.cc.inc
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/sha/sha1-altivec.cc.inc
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/sha/sha1-altivec.cc.inc
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/sha/sha1-altivec.cc.inc
@@ -0,0 +1,369 @@
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.ccom)
+ * All rights reserved.
@@ -5386,11 +5359,11 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/sha/sh
+#undef BODY_20_39
+#undef BODY_40_59
+#undef BODY_60_79
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/internal.h
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/internal.h
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/crypto/internal.h
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/internal.h
@@ -59,8 +59,9 @@ extern "C" {
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/crypto/internal.h
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/internal.h
@@ -66,8 +66,9 @@ extern "C" {
#if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_STATIC_ARMCAP) && \
(defined(OPENSSL_X86) || defined(OPENSSL_X86_64) || \
defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64))
@@ -5402,7 +5375,7 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/internal.h
#define NEED_CPUID
// OPENSSL_cpuid_setup initializes the platform-specific feature cache. This
@@ -1394,6 +1395,16 @@ inline int CRYPTO_is_ARMv8_SHA512_capabl
@@ -1429,6 +1430,16 @@ inline int CRYPTO_is_ARMv8_SHA512_capabl
#endif // OPENSSL_ARM || OPENSSL_AARCH64
@@ -5419,10 +5392,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/internal.h
#if defined(BORINGSSL_DISPATCH_TEST)
// Runtime CPU dispatch testing support
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/perlasm/ppc-xlate.pl
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/perlasm/ppc-xlate.pl
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/perlasm/ppc-xlate.pl
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/perlasm/ppc-xlate.pl
@@ -0,0 +1,320 @@
+#! /usr/bin/env perl
+# Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
@@ -5744,10 +5717,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/perlasm/ppc-xlate
+___
+
+close STDOUT or die "error closing STDOUT: $!";
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/test/abi_test.h
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/test/abi_test.h
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/crypto/test/abi_test.h
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/test/abi_test.h
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/crypto/test/abi_test.h
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/test/abi_test.h
@@ -179,7 +179,78 @@ struct alignas(16) Reg128 {
CALLER_STATE_REGISTER(uint64_t, x28) \
CALLER_STATE_REGISTER(uint64_t, x29)
@@ -5854,10 +5827,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/test/abi_test.h
static_assert(sizeof...(args) <= 8,
"too many arguments for abi_test_trampoline");
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/test/asm/trampoline-ppc.pl
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/test/asm/trampoline-ppc.pl
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/test/asm/trampoline-ppc.pl
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/test/asm/trampoline-ppc.pl
@@ -0,0 +1,262 @@
+#!/usr/bin/env perl
+# Copyright (c) 2019, Google Inc.
@@ -6121,10 +6094,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/test/asm/trampoli
+
+print $code;
+close STDOUT or die "error closing STDOUT: $!";
Index: chromium-138.0.7204.35/third_party/boringssl/src/include/openssl/target.h
Index: chromium-145.0.7632.45/third_party/boringssl/src/include/openssl/target.h
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/include/openssl/target.h
+++ chromium-138.0.7204.35/third_party/boringssl/src/include/openssl/target.h
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/include/openssl/target.h
+++ chromium-145.0.7632.45/third_party/boringssl/src/include/openssl/target.h
@@ -34,6 +34,9 @@
#elif defined(__ARMEL__) || defined(_M_ARM)
#define OPENSSL_32_BIT
@@ -6135,11 +6108,11 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/include/openssl/target.h
#elif defined(__MIPSEL__) && !defined(__LP64__)
#define OPENSSL_32_BIT
#define OPENSSL_MIPS
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/acvp/modulewrapper/main.cc
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/acvp/modulewrapper/main.cc
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/util/fipstools/acvp/modulewrapper/main.cc
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/acvp/modulewrapper/main.cc
@@ -35,6 +35,8 @@ int main(int argc, char **argv) {
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/util/fipstools/acvp/modulewrapper/main.cc
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/acvp/modulewrapper/main.cc
@@ -31,6 +31,8 @@ int main(int argc, char **argv) {
puts("ARM (32-bit)");
#elif defined(OPENSSL_AARCH64)
puts("aarch64 (64-bit)");
@@ -6148,10 +6121,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/acvp/modu
#else
#error "FIPS build not supported on this architecture"
#endif
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/delocate.go
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/delocate.go
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/util/fipstools/delocate/delocate.go
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/delocate.go
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/util/fipstools/delocate/delocate.go
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/delocate.go
@@ -56,7 +56,8 @@ type stringWriter interface {
type processorType int
@@ -6210,7 +6183,7 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
return statement, nil
}
@@ -703,6 +715,191 @@ func (d *delocation) processAarch64Instr
@@ -711,6 +723,191 @@ func (d *delocation) processAarch64Instr
return statement, nil
}
@@ -6402,7 +6375,7 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
func (d *delocation) gatherOffsets(symRef *node32, offsets string) (*node32, string) {
for symRef != nil && symRef.pegRule == ruleOffset {
offset := d.contents(symRef)
@@ -757,6 +954,215 @@ func (d *delocation) parseMemRef(memRef
@@ -765,6 +962,215 @@ func (d *delocation) parseMemRef(memRef
return
}
@@ -6618,7 +6591,7 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
/* Intel */
type instructionType int
@@ -1370,6 +1776,8 @@ func writeAarch64Function(w stringWriter
@@ -1378,6 +1784,8 @@ func writeAarch64Function(w stringWriter
func transform(w stringWriter, inputs []inputFile) error {
// symbols contains all defined symbols.
symbols := make(map[string]struct{})
@@ -6627,7 +6600,7 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
// fileNumbers is the set of IDs seen in .file directives.
fileNumbers := make(map[int]struct{})
// maxObservedFileNumber contains the largest seen file number in a
@@ -1402,6 +1810,25 @@ func transform(w stringWriter, inputs []
@@ -1410,6 +1818,25 @@ func transform(w stringWriter, inputs []
}, ruleStatement, ruleSymbolDefiningDirective, ruleSymbolDefiningDirectiveName)
forEachPath(input.ast.up, func(node *node32) {
@@ -6653,7 +6626,7 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
assertNodeType(node, ruleLocationDirective)
directive := input.contents[node.begin:node.end]
if !strings.HasPrefix(directive, ".file") {
@@ -1449,11 +1876,13 @@ func transform(w stringWriter, inputs []
@@ -1463,11 +1890,13 @@ func transform(w stringWriter, inputs []
d := &delocation{
symbols: symbols,
@@ -6667,7 +6640,7 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
gotExternalsNeeded: make(map[string]struct{}),
gotOffsetsNeeded: make(map[string]struct{}),
gotOffOffsetsNeeded: make(map[string]struct{}),
@@ -1488,6 +1917,22 @@ func transform(w stringWriter, inputs []
@@ -1522,6 +1951,22 @@ func transform(w stringWriter, inputs []
for _, name := range redirectorNames {
redirector := d.redirectors[name]
switch d.processor {
@@ -6690,7 +6663,7 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
case aarch64:
writeAarch64Function(w, redirector, func(w stringWriter) {
w.WriteString("\tb " + name + "\n")
@@ -1512,6 +1957,13 @@ func transform(w stringWriter, inputs []
@@ -1546,6 +1991,13 @@ func transform(w stringWriter, inputs []
target := d.bssAccessorsNeeded[name]
switch d.processor {
@@ -6704,7 +6677,7 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
case x86_64:
w.WriteString(".type " + funcName + ", @function\n")
w.WriteString(funcName + ":\n")
@@ -1527,6 +1979,26 @@ func transform(w stringWriter, inputs []
@@ -1561,6 +2013,26 @@ func transform(w stringWriter, inputs []
}
switch d.processor {
@@ -6731,7 +6704,7 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
case aarch64:
externalNames := sortedSet(d.gotExternalsNeeded)
for _, symbol := range externalNames {
@@ -1818,6 +2290,10 @@ func localTargetName(name string) string
@@ -1852,6 +2324,10 @@ func localTargetName(name string) string
return ".L" + name + "_local_target"
}
@@ -6740,9 +6713,9 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
+}
+
func isSynthesized(symbol string) bool {
return strings.HasSuffix(symbol, "_bss_get") ||
strings.HasPrefix(symbol, "BORINGSSL_bcm_text_")
@@ -1872,6 +2348,8 @@ func detectProcessor(input inputFile) pr
return strings.HasSuffix(symbol, "_bss_get")
}
@@ -1905,6 +2381,8 @@ func detectProcessor(input inputFile) pr
switch instructionName {
case "movq", "call", "leaq":
return x86_64
@@ -6751,10 +6724,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
case "str", "bl", "ldr", "st1":
return aarch64
}
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/delocate.peg
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/delocate.peg
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/util/fipstools/delocate/delocate.peg
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/delocate.peg
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/util/fipstools/delocate/delocate.peg
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/delocate.peg
@@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
@@ -6768,10 +6741,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
# To regenerate delocate.peg.go:
#
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/delocate_test.go
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/delocate_test.go
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/util/fipstools/delocate/delocate_test.go
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/delocate_test.go
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/util/fipstools/delocate/delocate_test.go
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/delocate_test.go
@@ -39,6 +39,11 @@ func (test *delocateTest) Path(file stri
var delocateTests = []delocateTest{
@@ -6784,10 +6757,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
{"x86_64-Basic", []string{"in.s"}, "out.s"},
{"x86_64-BSS", []string{"in.s"}, "out.s"},
{"x86_64-GOTRewrite", []string{"in.s"}, "out.s"},
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/in.s
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/in.s
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/in.s
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/in.s
@@ -0,0 +1,9 @@
+ .text
+foo:
@@ -6798,10 +6771,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
+ .localentry foo,.-foo
+.LVL0:
+ bl
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/out.s
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/out.s
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/out.s
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/out.s
@@ -0,0 +1,62 @@
+.text
+.file 1 "inserted_by_delocate.cc"
@@ -6865,19 +6838,19 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
+.byte 0xff
+.byte 0x31
+.byte 0x80
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/in.s
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/in.s
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/in.s
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/in.s
@@ -0,0 +1,4 @@
+ .text
+foo:
+ addis 22,2,bar@toc@ha
+ ld 0,bar@toc@l(22)
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/out.s
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/out.s
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/out.s
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/out.s
@@ -0,0 +1,72 @@
+.text
+.file 1 "inserted_by_delocate.cc"
@@ -6951,10 +6924,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
+.byte 0xff
+.byte 0x31
+.byte 0x80
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/in.s
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/in.s
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/in.s
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/in.s
@@ -0,0 +1,161 @@
+ .file "foo.cc"
+ .abiversion 2
@@ -7117,10 +7090,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
+ .size exported_function,.-exported_function
+ .ident "GCC: (Ubuntu 4.9.2-10ubuntu13) 4.9.2"
+ .section .note.GNU-stack,"",@progbits
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/out.s
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/out.s
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/out.s
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/out.s
@@ -0,0 +1,552 @@
+.text
+.file 1 "inserted_by_delocate.cc"
@@ -7674,10 +7647,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
+.byte 0xff
+.byte 0x31
+.byte 0x80
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/in.s
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/in.s
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/in.s
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/in.s
@@ -0,0 +1,226 @@
+ .file "foo.cc"
+ .abiversion 2
@@ -7905,10 +7878,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
+ .zero 20
+ .ident "GCC: (Ubuntu 4.9.2-10ubuntu13) 4.9.2"
+ .section .note.GNU-stack,"",@progbits
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/out.s
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/out.s
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/out.s
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/out.s
@@ -0,0 +1,677 @@
+.text
+.file 1 "inserted_by_delocate.cc"
@@ -8587,10 +8560,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
+.byte 0xff
+.byte 0x31
+.byte 0x80
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/in.s
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/in.s
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/in.s
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/in.s
@@ -0,0 +1,23 @@
+ .text
+foo:
@@ -8615,10 +8588,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
+
+ addis 4, 2, 1+foo-2@toc@ha+3
+ addi 4, 4, 1+foo-2@toc@l+3
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/out.s
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/out.s
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/out.s
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/out.s
@@ -0,0 +1,178 @@
+.text
+.file 1 "inserted_by_delocate.cc"
@@ -8798,11 +8771,11 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/fipstools/delocate/
+.byte 0xff
+.byte 0x31
+.byte 0x80
Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/sha/sha1.cc.inc
Index: chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/sha/sha1.cc.inc
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/crypto/fipsmodule/sha/sha1.cc.inc
+++ chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/sha/sha1.cc.inc
@@ -377,6 +377,10 @@ static void sha1_block_data_order(uint32
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/crypto/fipsmodule/sha/sha1.cc.inc
+++ chromium-145.0.7632.45/third_party/boringssl/src/crypto/fipsmodule/sha/sha1.cc.inc
@@ -381,6 +381,10 @@ static void sha1_block_data_order(uint32
return;
}
#endif
@@ -8813,11 +8786,11 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/crypto/fipsmodule/sha/sh
sha1_block_data_order_nohw(state, data, num);
}
Index: chromium-138.0.7204.35/third_party/boringssl/src/build.json
Index: chromium-145.0.7632.45/third_party/boringssl/src/build.json
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/build.json
+++ chromium-138.0.7204.35/third_party/boringssl/src/build.json
@@ -128,6 +128,10 @@
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/build.json
+++ chromium-145.0.7632.45/third_party/boringssl/src/build.json
@@ -129,6 +129,10 @@
{"src": "crypto/fipsmodule/sha/asm/sha512-armv4.pl"},
{"src": "crypto/fipsmodule/aes/asm/vpaes-armv7.pl"}
],
@@ -8828,7 +8801,7 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/build.json
"perlasm_x86": [
{"src": "crypto/fipsmodule/aes/asm/aesni-x86.pl"},
{"src": "crypto/fipsmodule/bn/asm/bn-586.pl"},
@@ -237,6 +241,7 @@
@@ -238,6 +242,7 @@
"crypto/cpu_arm_freebsd.cc",
"crypto/cpu_arm_linux.cc",
"crypto/cpu_intel.cc",
@@ -8836,7 +8809,7 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/build.json
"crypto/crypto.cc",
"crypto/curve25519/curve25519.cc",
"crypto/curve25519/curve25519_64_adx.cc",
@@ -798,6 +803,9 @@
@@ -805,6 +810,9 @@
"perlasm_arm": [
{"src": "crypto/test/asm/trampoline-armv4.pl"}
],
@@ -8846,10 +8819,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/build.json
"perlasm_x86": [
{"src": "crypto/test/asm/trampoline-x86.pl"}
],
Index: chromium-138.0.7204.35/third_party/boringssl/src/util/pregenerate/build.go
Index: chromium-145.0.7632.45/third_party/boringssl/src/util/pregenerate/build.go
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/util/pregenerate/build.go
+++ chromium-138.0.7204.35/third_party/boringssl/src/util/pregenerate/build.go
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/util/pregenerate/build.go
+++ chromium-145.0.7632.45/third_party/boringssl/src/util/pregenerate/build.go
@@ -38,6 +38,7 @@ type InputTarget struct {
// architecture.
PerlasmAarch64 []PerlasmSource `json:"perlasm_aarch64,omitempty"`
@@ -8868,10 +8841,10 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/util/pregenerate/build.g
for _, p := range in.PerlasmX86 {
addPerlasmTask(&out.Asm, &p, "-apple.S", []string{"macosx", "-fPIC"})
addPerlasmTask(&out.Asm, &p, "-linux.S", []string{"elf", "-fPIC"})
Index: chromium-138.0.7204.35/third_party/boringssl/README.ppc64le
Index: chromium-145.0.7632.45/third_party/boringssl/README.ppc64le
===================================================================
--- /dev/null
+++ chromium-138.0.7204.35/third_party/boringssl/README.ppc64le
+++ chromium-145.0.7632.45/third_party/boringssl/README.ppc64le
@@ -0,0 +1,8 @@
+==============================================================
+To recreate boringssl pregenerated files patch for ppc64le:
@@ -8881,11 +8854,11 @@ Index: chromium-138.0.7204.35/third_party/boringssl/README.ppc64le
+go run ./util/pregenerate
+cd ../../../../
+diff -urN chromium-*/third_party/boringssl/src/gen.orig chromium-*/third_party/boringssl/src/gen
Index: chromium-138.0.7204.35/third_party/boringssl/src/gen/sources.gni
Index: chromium-145.0.7632.45/third_party/boringssl/src/gen/sources.gni
===================================================================
--- chromium-138.0.7204.35.orig/third_party/boringssl/src/gen/sources.gni
+++ chromium-138.0.7204.35/third_party/boringssl/src/gen/sources.gni
@@ -121,6 +121,7 @@ bcm_sources_asm = [
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/gen/sources.gni
+++ chromium-145.0.7632.45/third_party/boringssl/src/gen/sources.gni
@@ -122,6 +122,7 @@ bcm_sources_asm = [
"gen/bcm/aesv8-gcm-armv8-apple.S",
"gen/bcm/aesv8-gcm-armv8-linux.S",
"gen/bcm/aesv8-gcm-armv8-win.S",
@@ -8893,7 +8866,7 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/gen/sources.gni
"gen/bcm/armv4-mont-linux.S",
"gen/bcm/armv8-mont-apple.S",
"gen/bcm/armv8-mont-linux.S",
@@ -137,6 +138,7 @@ bcm_sources_asm = [
@@ -138,6 +139,7 @@ bcm_sources_asm = [
"gen/bcm/ghash-neon-armv8-apple.S",
"gen/bcm/ghash-neon-armv8-linux.S",
"gen/bcm/ghash-neon-armv8-win.S",
@@ -8901,7 +8874,7 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/gen/sources.gni
"gen/bcm/ghash-ssse3-x86-apple.S",
"gen/bcm/ghash-ssse3-x86-linux.S",
"gen/bcm/ghash-ssse3-x86_64-apple.S",
@@ -336,6 +338,7 @@ crypto_sources = [
@@ -365,6 +367,7 @@ crypto_sources = [
"crypto/cpu_arm_freebsd.cc",
"crypto/cpu_arm_linux.cc",
"crypto/cpu_intel.cc",
@@ -8909,3 +8882,59 @@ Index: chromium-138.0.7204.35/third_party/boringssl/src/gen/sources.gni
"crypto/crypto.cc",
"crypto/curve25519/curve25519.cc",
"crypto/curve25519/curve25519_64_adx.cc",
Index: chromium-145.0.7632.45/third_party/boringssl/src/gen/sources.bzl
===================================================================
--- chromium-145.0.7632.45.orig/third_party/boringssl/src/gen/sources.bzl
+++ chromium-145.0.7632.45/third_party/boringssl/src/gen/sources.bzl
@@ -115,6 +115,7 @@
"gen/bcm/aesni-x86-linux.S",
"gen/bcm/aesni-x86_64-apple.S",
"gen/bcm/aesni-x86_64-linux.S",
+ "gen/bcm/aesp8-ppc-linux.S",
"gen/bcm/aesv8-armv7-linux.S",
"gen/bcm/aesv8-armv8-apple.S",
"gen/bcm/aesv8-armv8-linux.S",
@@ -146,6 +147,7 @@
"gen/bcm/ghash-x86-linux.S",
"gen/bcm/ghash-x86_64-apple.S",
"gen/bcm/ghash-x86_64-linux.S",
+ "gen/bcm/ghashp8-ppc-linux.S",
"gen/bcm/ghashv8-armv7-linux.S",
"gen/bcm/ghashv8-armv8-apple.S",
"gen/bcm/ghashv8-armv8-linux.S",
@@ -365,6 +367,7 @@
"crypto/cpu_arm_freebsd.cc",
"crypto/cpu_arm_linux.cc",
"crypto/cpu_intel.cc",
+ "crypto/cpu_ppc64le.cc",
"crypto/crypto.cc",
"crypto/curve25519/curve25519.cc",
"crypto/curve25519/curve25519_64_adx.cc",
Index: chromium-145.0.7632.45/third_party/perfetto/buildtools/grpc/BUILD.gn
===================================================================
--- chromium-145.0.7632.45.orig/third_party/perfetto/buildtools/grpc/BUILD.gn
+++ chromium-145.0.7632.45/third_party/perfetto/buildtools/grpc/BUILD.gn
@@ -99,6 +99,7 @@
"src/third_party/boringssl-with-bazel/src/crypto/cpu_arm_freebsd.cc",
"src/third_party/boringssl-with-bazel/src/crypto/cpu_arm_linux.cc",
"src/third_party/boringssl-with-bazel/src/crypto/cpu_arm_linux.h",
+ "src/third_party/boringssl-with-bazel/src/crypto/cpu_ppc64le.cc",
"src/third_party/boringssl-with-bazel/src/crypto/cpu_intel.cc",
"src/third_party/boringssl-with-bazel/src/crypto/crypto.cc",
"src/third_party/boringssl-with-bazel/src/crypto/curve25519/asm/x25519-asm-arm.S",
@@ -422,6 +423,7 @@
"src/third_party/boringssl-with-bazel/src/gen/bcm/aesv8-gcm-armv8-apple.S",
"src/third_party/boringssl-with-bazel/src/gen/bcm/aesv8-gcm-armv8-linux.S",
"src/third_party/boringssl-with-bazel/src/gen/bcm/aesv8-gcm-armv8-win.S",
+ "src/third_party/boringssl-with-bazel/src/gen/bcm/aesp8-ppc-linux.S",
"src/third_party/boringssl-with-bazel/src/gen/bcm/armv4-mont-linux.S",
"src/third_party/boringssl-with-bazel/src/gen/bcm/armv8-mont-apple.S",
"src/third_party/boringssl-with-bazel/src/gen/bcm/armv8-mont-linux.S",
@@ -435,6 +437,7 @@
"src/third_party/boringssl-with-bazel/src/gen/bcm/co-586-apple.S",
"src/third_party/boringssl-with-bazel/src/gen/bcm/co-586-linux.S",
"src/third_party/boringssl-with-bazel/src/gen/bcm/ghash-armv4-linux.S",
+ "src/third_party/boringssl-with-bazel/src/gen/bcm/ghashp8-ppc-linux.S",
"src/third_party/boringssl-with-bazel/src/gen/bcm/ghash-neon-armv8-apple.S",
"src/third_party/boringssl-with-bazel/src/gen/bcm/ghash-neon-armv8-linux.S",
"src/third_party/boringssl-with-bazel/src/gen/bcm/ghash-neon-armv8-win.S",

View File

@@ -8,11 +8,11 @@ Subject: [PATCH] Add ppc64 target to libaom
third_party/libaom/cmake_update.sh | 3 +++
2 files changed, 15 insertions(+)
Index: chromium-128.0.6613.113/third_party/libaom/BUILD.gn
Index: chromium-144.0.7559.59/third_party/libaom/BUILD.gn
===================================================================
--- chromium-128.0.6613.113.orig/third_party/libaom/BUILD.gn
+++ chromium-128.0.6613.113/third_party/libaom/BUILD.gn
@@ -275,6 +275,18 @@ if (current_cpu == "arm64") {
--- 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
}
}
@@ -31,7 +31,7 @@ Index: chromium-128.0.6613.113/third_party/libaom/BUILD.gn
static_library("libaom") {
check_includes = false
if (!is_debug && is_win) {
@@ -338,6 +350,9 @@ static_library("libaom") {
@@ -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" ]
}
@@ -41,11 +41,11 @@ Index: chromium-128.0.6613.113/third_party/libaom/BUILD.gn
if (is_android) {
deps += [ "//third_party/cpu_features:ndk_compat" ]
}
Index: chromium-128.0.6613.113/third_party/libaom/cmake_update.sh
Index: chromium-144.0.7559.59/third_party/libaom/cmake_update.sh
===================================================================
--- chromium-128.0.6613.113.orig/third_party/libaom/cmake_update.sh
+++ chromium-128.0.6613.113/third_party/libaom/cmake_update.sh
@@ -167,6 +167,9 @@
--- 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"

View File

@@ -1,10 +1,10 @@
Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/config/aom_config.asm
Index: chromium-144.0.7559.59/third_party/libaom/source/config/linux/ppc64/config/aom_config.asm
===================================================================
--- /dev/null
+++ chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/config/aom_config.asm
@@ -0,0 +1,95 @@
+++ chromium-144.0.7559.59/third_party/libaom/source/config/linux/ppc64/config/aom_config.asm
@@ -0,0 +1,100 @@
+;
+; Copyright (c) 2024, Alliance for Open Media. All rights reserved.
+; Copyright (c) 2025, Alliance for Open Media. All rights reserved.
+;
+; This source code is subject to the terms of the BSD 2 Clause License and
+; the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
@@ -16,6 +16,7 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+AOM_ARCH_AARCH64 equ 0
+AOM_ARCH_ARM equ 0
+AOM_ARCH_PPC equ 1
+AOM_ARCH_RISCV equ 0
+AOM_ARCH_X86 equ 0
+AOM_ARCH_X86_64 equ 0
+CONFIG_ACCOUNTING equ 0
@@ -33,6 +34,7 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+CONFIG_COLLECT_PARTITION_STATS equ 0
+CONFIG_COLLECT_RD_STATS equ 0
+CONFIG_CWG_C013 equ 0
+CONFIG_CWG_E050 equ 0
+CONFIG_DEBUG equ 0
+CONFIG_DENOISE equ 1
+CONFIG_DISABLE_FULL_PIXEL_SPLIT_8X8 equ 1
@@ -42,11 +44,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+CONFIG_GCC equ 1
+CONFIG_GCOV equ 0
+CONFIG_GPROF equ 0
+CONFIG_HIGHWAY equ 0
+CONFIG_INSPECTION equ 0
+CONFIG_INTERNAL_STATS equ 0
+CONFIG_INTER_STATS_ONLY equ 0
+CONFIG_LIBVMAF_PSNR_PEAK equ 1
+CONFIG_LIBYUV equ 0
+CONFIG_LIBYUV equ 1
+CONFIG_MAX_DECODE_PROFILE equ 2
+CONFIG_MISMATCH_DEBUG equ 0
+CONFIG_MULTITHREAD equ 1
@@ -80,12 +83,14 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+HAVE_ARM_CRC32 equ 0
+HAVE_AVX equ 0
+HAVE_AVX2 equ 0
+HAVE_AVX512 equ 0
+HAVE_FEXCEPT equ 1
+HAVE_MMX equ 0
+HAVE_NEON equ 0
+HAVE_NEON_DOTPROD equ 0
+HAVE_NEON_I8MM equ 0
+HAVE_PTHREAD_H equ 1
+HAVE_RVV equ 0
+HAVE_SSE equ 0
+HAVE_SSE2 equ 0
+HAVE_SSE3 equ 0
@@ -98,13 +103,13 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+HAVE_VSX equ 1
+HAVE_WXWIDGETS equ 0
+STATIC_LINK_JXL equ 0
Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/config/aom_config.c
Index: chromium-144.0.7559.59/third_party/libaom/source/config/linux/ppc64/config/aom_config.c
===================================================================
--- /dev/null
+++ chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/config/aom_config.c
+++ chromium-144.0.7559.59/third_party/libaom/source/config/linux/ppc64/config/aom_config.c
@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2024, Alliance for Open Media. All rights reserved.
+ * Copyright (c) 2025, Alliance for Open Media. All rights reserved.
+ *
+ * This source code is subject to the terms of the BSD 2 Clause License and
+ * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
@@ -114,15 +119,15 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+ * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
+ */
+#include "aom/aom_codec.h"
+static const char* const cfg = "cmake ../source/libaom -G \"Unix Makefiles\" -DCMAKE_TOOLCHAIN_FILE=\"../source/libaom/build/cmake/toolchains/ppc-linux-gcc.cmake\" -DCONFIG_AV1_DECODER=0 -DCONFIG_AV1_ENCODER=1 -DCONFIG_LIBYUV=0 -DCONFIG_AV1_HIGHBITDEPTH=0 -DCONFIG_AV1_TEMPORAL_DENOISING=1 -DCONFIG_QUANT_MATRIX=0 -DCONFIG_REALTIME_ONLY=1 -DCONFIG_SIZE_LIMIT=1 -DDECODE_HEIGHT_LIMIT=16384 -DDECODE_WIDTH_LIMIT=16384";
+static const char* const cfg = "cmake ../source/libaom -G \"Unix Makefiles\" -DCMAKE_TOOLCHAIN_FILE=\"../source/libaom/build/cmake/toolchains/ppc-linux-gcc.cmake\" -DCONFIG_AV1_DECODER=0 -DCONFIG_AV1_ENCODER=1 -DCONFIG_AV1_HIGHBITDEPTH=0 -DCONFIG_AV1_TEMPORAL_DENOISING=1 -DCONFIG_QUANT_MATRIX=0 -DCONFIG_REALTIME_ONLY=1 -DCONFIG_SIZE_LIMIT=1 -DDECODE_HEIGHT_LIMIT=16384 -DDECODE_WIDTH_LIMIT=16384";
+const char *aom_codec_build_config(void) {return cfg;}
Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/config/aom_config.h
Index: chromium-144.0.7559.59/third_party/libaom/source/config/linux/ppc64/config/aom_config.h
===================================================================
--- /dev/null
+++ chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/config/aom_config.h
@@ -0,0 +1,98 @@
+++ chromium-144.0.7559.59/third_party/libaom/source/config/linux/ppc64/config/aom_config.h
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2024, Alliance for Open Media. All rights reserved.
+ * Copyright (c) 2025, Alliance for Open Media. All rights reserved.
+ *
+ * This source code is subject to the terms of the BSD 2 Clause License and
+ * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
@@ -136,6 +141,7 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+#define AOM_ARCH_AARCH64 0
+#define AOM_ARCH_ARM 0
+#define AOM_ARCH_PPC 1
+#define AOM_ARCH_RISCV 0
+#define AOM_ARCH_X86 0
+#define AOM_ARCH_X86_64 0
+#define CONFIG_ACCOUNTING 0
@@ -153,6 +159,7 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+#define CONFIG_COLLECT_PARTITION_STATS 0
+#define CONFIG_COLLECT_RD_STATS 0
+#define CONFIG_CWG_C013 0
+#define CONFIG_CWG_E050 0
+#define CONFIG_DEBUG 0
+#define CONFIG_DENOISE 1
+#define CONFIG_DISABLE_FULL_PIXEL_SPLIT_8X8 1
@@ -162,11 +169,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+#define CONFIG_GCC 1
+#define CONFIG_GCOV 0
+#define CONFIG_GPROF 0
+#define CONFIG_HIGHWAY 0
+#define CONFIG_INSPECTION 0
+#define CONFIG_INTERNAL_STATS 0
+#define CONFIG_INTER_STATS_ONLY 0
+#define CONFIG_LIBVMAF_PSNR_PEAK 1
+#define CONFIG_LIBYUV 0
+#define CONFIG_LIBYUV 1
+#define CONFIG_MAX_DECODE_PROFILE 2
+#define CONFIG_MISMATCH_DEBUG 0
+#define CONFIG_MULTITHREAD 1
@@ -200,12 +208,14 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+#define HAVE_ARM_CRC32 0
+#define HAVE_AVX 0
+#define HAVE_AVX2 0
+#define HAVE_AVX512 0
+#define HAVE_FEXCEPT 1
+#define HAVE_MMX 0
+#define HAVE_NEON 0
+#define HAVE_NEON_DOTPROD 0
+#define HAVE_NEON_I8MM 0
+#define HAVE_PTHREAD_H 1
+#define HAVE_RVV 0
+#define HAVE_SSE 0
+#define HAVE_SSE2 0
+#define HAVE_SSE3 0
@@ -219,13 +229,13 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+#define HAVE_WXWIDGETS 0
+#define STATIC_LINK_JXL 0
+#endif // AOM_CONFIG_H_
Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/config/aom_dsp_rtcd.h
Index: chromium-144.0.7559.59/third_party/libaom/source/config/linux/ppc64/config/aom_dsp_rtcd.h
===================================================================
--- /dev/null
+++ chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/config/aom_dsp_rtcd.h
@@ -0,0 +1,1501 @@
+++ chromium-144.0.7559.59/third_party/libaom/source/config/linux/ppc64/config/aom_dsp_rtcd.h
@@ -0,0 +1,1177 @@
+/*
+ * Copyright (c) 2024, Alliance for Open Media. All rights reserved.
+ * Copyright (c) 2025, Alliance for Open Media. All rights reserved.
+ *
+ * This source code is subject to the terms of the BSD 2 Clause License and
+ * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
@@ -298,12 +308,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_dc_128_predictor_16x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_128_predictor_16x32 aom_dc_128_predictor_16x32_c
+
+void aom_dc_128_predictor_16x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_128_predictor_16x4 aom_dc_128_predictor_16x4_c
+
+void aom_dc_128_predictor_16x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_128_predictor_16x64 aom_dc_128_predictor_16x64_c
+
+void aom_dc_128_predictor_16x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_128_predictor_16x8 aom_dc_128_predictor_16x8_c
+
@@ -316,21 +320,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_dc_128_predictor_32x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_128_predictor_32x64 aom_dc_128_predictor_32x64_c
+
+void aom_dc_128_predictor_32x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_128_predictor_32x8 aom_dc_128_predictor_32x8_c
+
+void aom_dc_128_predictor_4x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_128_predictor_4x16 aom_dc_128_predictor_4x16_c
+
+void aom_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_128_predictor_4x4 aom_dc_128_predictor_4x4_c
+
+void aom_dc_128_predictor_4x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_128_predictor_4x8 aom_dc_128_predictor_4x8_c
+
+void aom_dc_128_predictor_64x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_128_predictor_64x16 aom_dc_128_predictor_64x16_c
+
+void aom_dc_128_predictor_64x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_128_predictor_64x32 aom_dc_128_predictor_64x32_c
+
@@ -340,9 +335,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_dc_128_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_128_predictor_8x16 aom_dc_128_predictor_8x16_c
+
+void aom_dc_128_predictor_8x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_128_predictor_8x32 aom_dc_128_predictor_8x32_c
+
+void aom_dc_128_predictor_8x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_128_predictor_8x4 aom_dc_128_predictor_8x4_c
+
@@ -355,12 +347,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_dc_left_predictor_16x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_left_predictor_16x32 aom_dc_left_predictor_16x32_c
+
+void aom_dc_left_predictor_16x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_left_predictor_16x4 aom_dc_left_predictor_16x4_c
+
+void aom_dc_left_predictor_16x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_left_predictor_16x64 aom_dc_left_predictor_16x64_c
+
+void aom_dc_left_predictor_16x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_left_predictor_16x8 aom_dc_left_predictor_16x8_c
+
@@ -373,21 +359,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_dc_left_predictor_32x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_left_predictor_32x64 aom_dc_left_predictor_32x64_c
+
+void aom_dc_left_predictor_32x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_left_predictor_32x8 aom_dc_left_predictor_32x8_c
+
+void aom_dc_left_predictor_4x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_left_predictor_4x16 aom_dc_left_predictor_4x16_c
+
+void aom_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_left_predictor_4x4 aom_dc_left_predictor_4x4_c
+
+void aom_dc_left_predictor_4x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_left_predictor_4x8 aom_dc_left_predictor_4x8_c
+
+void aom_dc_left_predictor_64x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_left_predictor_64x16 aom_dc_left_predictor_64x16_c
+
+void aom_dc_left_predictor_64x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_left_predictor_64x32 aom_dc_left_predictor_64x32_c
+
@@ -397,9 +374,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_dc_left_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_left_predictor_8x16 aom_dc_left_predictor_8x16_c
+
+void aom_dc_left_predictor_8x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_left_predictor_8x32 aom_dc_left_predictor_8x32_c
+
+void aom_dc_left_predictor_8x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_left_predictor_8x4 aom_dc_left_predictor_8x4_c
+
@@ -412,12 +386,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_dc_predictor_16x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_predictor_16x32 aom_dc_predictor_16x32_c
+
+void aom_dc_predictor_16x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_predictor_16x4 aom_dc_predictor_16x4_c
+
+void aom_dc_predictor_16x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_predictor_16x64 aom_dc_predictor_16x64_c
+
+void aom_dc_predictor_16x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_predictor_16x8 aom_dc_predictor_16x8_c
+
@@ -430,21 +398,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_dc_predictor_32x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_predictor_32x64 aom_dc_predictor_32x64_c
+
+void aom_dc_predictor_32x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_predictor_32x8 aom_dc_predictor_32x8_c
+
+void aom_dc_predictor_4x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_predictor_4x16 aom_dc_predictor_4x16_c
+
+void aom_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_predictor_4x4 aom_dc_predictor_4x4_c
+
+void aom_dc_predictor_4x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_predictor_4x8 aom_dc_predictor_4x8_c
+
+void aom_dc_predictor_64x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_predictor_64x16 aom_dc_predictor_64x16_c
+
+void aom_dc_predictor_64x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_predictor_64x32 aom_dc_predictor_64x32_c
+
@@ -454,9 +413,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_dc_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_predictor_8x16 aom_dc_predictor_8x16_c
+
+void aom_dc_predictor_8x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_predictor_8x32 aom_dc_predictor_8x32_c
+
+void aom_dc_predictor_8x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_predictor_8x4 aom_dc_predictor_8x4_c
+
@@ -469,12 +425,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_dc_top_predictor_16x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_16x32 aom_dc_top_predictor_16x32_c
+
+void aom_dc_top_predictor_16x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_16x4 aom_dc_top_predictor_16x4_c
+
+void aom_dc_top_predictor_16x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_16x64 aom_dc_top_predictor_16x64_c
+
+void aom_dc_top_predictor_16x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_16x8 aom_dc_top_predictor_16x8_c
+
@@ -487,21 +437,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_dc_top_predictor_32x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_32x64 aom_dc_top_predictor_32x64_c
+
+void aom_dc_top_predictor_32x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_32x8 aom_dc_top_predictor_32x8_c
+
+void aom_dc_top_predictor_4x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_4x16 aom_dc_top_predictor_4x16_c
+
+void aom_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_4x4 aom_dc_top_predictor_4x4_c
+
+void aom_dc_top_predictor_4x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_4x8 aom_dc_top_predictor_4x8_c
+
+void aom_dc_top_predictor_64x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_64x16 aom_dc_top_predictor_64x16_c
+
+void aom_dc_top_predictor_64x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_64x32 aom_dc_top_predictor_64x32_c
+
@@ -511,114 +452,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_dc_top_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_8x16 aom_dc_top_predictor_8x16_c
+
+void aom_dc_top_predictor_8x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_8x32 aom_dc_top_predictor_8x32_c
+
+void aom_dc_top_predictor_8x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_8x4 aom_dc_top_predictor_8x4_c
+
+void aom_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_dc_top_predictor_8x8 aom_dc_top_predictor_8x8_c
+
+void aom_dist_wtd_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_comp_avg_pred aom_dist_wtd_comp_avg_pred_c
+
+unsigned int aom_dist_wtd_sad128x128_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad128x128_avg aom_dist_wtd_sad128x128_avg_c
+
+unsigned int aom_dist_wtd_sad128x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad128x64_avg aom_dist_wtd_sad128x64_avg_c
+
+unsigned int aom_dist_wtd_sad16x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad16x16_avg aom_dist_wtd_sad16x16_avg_c
+
+unsigned int aom_dist_wtd_sad16x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad16x32_avg aom_dist_wtd_sad16x32_avg_c
+
+unsigned int aom_dist_wtd_sad16x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad16x8_avg aom_dist_wtd_sad16x8_avg_c
+
+unsigned int aom_dist_wtd_sad32x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad32x16_avg aom_dist_wtd_sad32x16_avg_c
+
+unsigned int aom_dist_wtd_sad32x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad32x32_avg aom_dist_wtd_sad32x32_avg_c
+
+unsigned int aom_dist_wtd_sad32x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad32x64_avg aom_dist_wtd_sad32x64_avg_c
+
+unsigned int aom_dist_wtd_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad4x4_avg aom_dist_wtd_sad4x4_avg_c
+
+unsigned int aom_dist_wtd_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad4x8_avg aom_dist_wtd_sad4x8_avg_c
+
+unsigned int aom_dist_wtd_sad64x128_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad64x128_avg aom_dist_wtd_sad64x128_avg_c
+
+unsigned int aom_dist_wtd_sad64x32_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad64x32_avg aom_dist_wtd_sad64x32_avg_c
+
+unsigned int aom_dist_wtd_sad64x64_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad64x64_avg aom_dist_wtd_sad64x64_avg_c
+
+unsigned int aom_dist_wtd_sad8x16_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad8x16_avg aom_dist_wtd_sad8x16_avg_c
+
+unsigned int aom_dist_wtd_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad8x4_avg aom_dist_wtd_sad8x4_avg_c
+
+unsigned int aom_dist_wtd_sad8x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sad8x8_avg aom_dist_wtd_sad8x8_avg_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance128x128_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance128x128 aom_dist_wtd_sub_pixel_avg_variance128x128_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance128x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance128x64 aom_dist_wtd_sub_pixel_avg_variance128x64_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance16x16 aom_dist_wtd_sub_pixel_avg_variance16x16_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance16x32 aom_dist_wtd_sub_pixel_avg_variance16x32_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance16x8 aom_dist_wtd_sub_pixel_avg_variance16x8_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance32x16 aom_dist_wtd_sub_pixel_avg_variance32x16_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance32x32 aom_dist_wtd_sub_pixel_avg_variance32x32_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance32x64 aom_dist_wtd_sub_pixel_avg_variance32x64_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance4x4 aom_dist_wtd_sub_pixel_avg_variance4x4_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance4x8 aom_dist_wtd_sub_pixel_avg_variance4x8_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance64x128_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance64x128 aom_dist_wtd_sub_pixel_avg_variance64x128_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance64x32 aom_dist_wtd_sub_pixel_avg_variance64x32_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance64x64 aom_dist_wtd_sub_pixel_avg_variance64x64_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance8x16 aom_dist_wtd_sub_pixel_avg_variance8x16_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance8x4 aom_dist_wtd_sub_pixel_avg_variance8x4_c
+
+uint32_t aom_dist_wtd_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const DIST_WTD_COMP_PARAMS *jcp_param);
+#define aom_dist_wtd_sub_pixel_avg_variance8x8 aom_dist_wtd_sub_pixel_avg_variance8x8_c
+
+void aom_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride);
+#define aom_fdct4x4 aom_fdct4x4_c
+
@@ -643,9 +482,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_get_blk_sse_sum_c(const int16_t *data, int stride, int bw, int bh, int *x_sum, int64_t *x2_sum);
+#define aom_get_blk_sse_sum aom_get_blk_sse_sum_c
+
+unsigned int aom_get_mb_ss_c(const int16_t *);
+#define aom_get_mb_ss aom_get_mb_ss_c
+
+void aom_get_var_sse_sum_16x16_dual_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse16x16, unsigned int *tot_sse, int *tot_sum, uint32_t *var16x16);
+#define aom_get_var_sse_sum_16x16_dual aom_get_var_sse_sum_16x16_dual_c
+
@@ -658,12 +494,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_h_predictor_16x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_h_predictor_16x32 aom_h_predictor_16x32_c
+
+void aom_h_predictor_16x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_h_predictor_16x4 aom_h_predictor_16x4_c
+
+void aom_h_predictor_16x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_h_predictor_16x64 aom_h_predictor_16x64_c
+
+void aom_h_predictor_16x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_h_predictor_16x8 aom_h_predictor_16x8_c
+
@@ -676,21 +506,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_h_predictor_32x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_h_predictor_32x64 aom_h_predictor_32x64_c
+
+void aom_h_predictor_32x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_h_predictor_32x8 aom_h_predictor_32x8_c
+
+void aom_h_predictor_4x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_h_predictor_4x16 aom_h_predictor_4x16_c
+
+void aom_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_h_predictor_4x4 aom_h_predictor_4x4_c
+
+void aom_h_predictor_4x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_h_predictor_4x8 aom_h_predictor_4x8_c
+
+void aom_h_predictor_64x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_h_predictor_64x16 aom_h_predictor_64x16_c
+
+void aom_h_predictor_64x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_h_predictor_64x32 aom_h_predictor_64x32_c
+
@@ -700,9 +521,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_h_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_h_predictor_8x16 aom_h_predictor_8x16_c
+
+void aom_h_predictor_8x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_h_predictor_8x32 aom_h_predictor_8x32_c
+
+void aom_h_predictor_8x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_h_predictor_8x4 aom_h_predictor_8x4_c
+
@@ -949,12 +767,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_paeth_predictor_16x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_paeth_predictor_16x32 aom_paeth_predictor_16x32_c
+
+void aom_paeth_predictor_16x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_paeth_predictor_16x4 aom_paeth_predictor_16x4_c
+
+void aom_paeth_predictor_16x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_paeth_predictor_16x64 aom_paeth_predictor_16x64_c
+
+void aom_paeth_predictor_16x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_paeth_predictor_16x8 aom_paeth_predictor_16x8_c
+
@@ -967,21 +779,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_paeth_predictor_32x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_paeth_predictor_32x64 aom_paeth_predictor_32x64_c
+
+void aom_paeth_predictor_32x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_paeth_predictor_32x8 aom_paeth_predictor_32x8_c
+
+void aom_paeth_predictor_4x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_paeth_predictor_4x16 aom_paeth_predictor_4x16_c
+
+void aom_paeth_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_paeth_predictor_4x4 aom_paeth_predictor_4x4_c
+
+void aom_paeth_predictor_4x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_paeth_predictor_4x8 aom_paeth_predictor_4x8_c
+
+void aom_paeth_predictor_64x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_paeth_predictor_64x16 aom_paeth_predictor_64x16_c
+
+void aom_paeth_predictor_64x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_paeth_predictor_64x32 aom_paeth_predictor_64x32_c
+
@@ -991,9 +794,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_paeth_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_paeth_predictor_8x16 aom_paeth_predictor_8x16_c
+
+void aom_paeth_predictor_8x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_paeth_predictor_8x32 aom_paeth_predictor_8x32_c
+
+void aom_paeth_predictor_8x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_paeth_predictor_8x4 aom_paeth_predictor_8x4_c
+
@@ -1108,9 +908,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+unsigned int aom_sad4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride);
+#define aom_sad4x4 aom_sad4x4_c
+
+unsigned int aom_sad4x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred);
+#define aom_sad4x4_avg aom_sad4x4_avg_c
+
+void aom_sad4x4x3d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, uint32_t sad_array[4]);
+#define aom_sad4x4x3d aom_sad4x4x3d_c
+
@@ -1120,9 +917,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+unsigned int aom_sad4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride);
+#define aom_sad4x8 aom_sad4x8_c
+
+unsigned int aom_sad4x8_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred);
+#define aom_sad4x8_avg aom_sad4x8_avg_c
+
+void aom_sad4x8x3d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, uint32_t sad_array[4]);
+#define aom_sad4x8x3d aom_sad4x8x3d_c
+
@@ -1180,9 +974,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+unsigned int aom_sad8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride);
+#define aom_sad8x4 aom_sad8x4_c
+
+unsigned int aom_sad8x4_avg_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred);
+#define aom_sad8x4_avg aom_sad8x4_avg_c
+
+void aom_sad8x4x3d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, uint32_t sad_array[4]);
+#define aom_sad8x4x3d aom_sad8x4x3d_c
+
@@ -1225,12 +1016,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_sad_skip_16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, uint32_t sad_array[4]);
+#define aom_sad_skip_16x32x4d aom_sad_skip_16x32x4d_c
+
+unsigned int aom_sad_skip_16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride);
+#define aom_sad_skip_16x8 aom_sad_skip_16x8_c
+
+void aom_sad_skip_16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, uint32_t sad_array[4]);
+#define aom_sad_skip_16x8x4d aom_sad_skip_16x8x4d_c
+
+unsigned int aom_sad_skip_32x16_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride);
+#define aom_sad_skip_32x16 aom_sad_skip_32x16_c
+
@@ -1249,18 +1034,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_sad_skip_32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, uint32_t sad_array[4]);
+#define aom_sad_skip_32x64x4d aom_sad_skip_32x64x4d_c
+
+unsigned int aom_sad_skip_4x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride);
+#define aom_sad_skip_4x4 aom_sad_skip_4x4_c
+
+void aom_sad_skip_4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, uint32_t sad_array[4]);
+#define aom_sad_skip_4x4x4d aom_sad_skip_4x4x4d_c
+
+unsigned int aom_sad_skip_4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride);
+#define aom_sad_skip_4x8 aom_sad_skip_4x8_c
+
+void aom_sad_skip_4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, uint32_t sad_array[4]);
+#define aom_sad_skip_4x8x4d aom_sad_skip_4x8x4d_c
+
+unsigned int aom_sad_skip_64x128_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride);
+#define aom_sad_skip_64x128 aom_sad_skip_64x128_c
+
@@ -1285,18 +1058,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_sad_skip_8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, uint32_t sad_array[4]);
+#define aom_sad_skip_8x16x4d aom_sad_skip_8x16x4d_c
+
+unsigned int aom_sad_skip_8x4_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride);
+#define aom_sad_skip_8x4 aom_sad_skip_8x4_c
+
+void aom_sad_skip_8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, uint32_t sad_array[4]);
+#define aom_sad_skip_8x4x4d aom_sad_skip_8x4x4d_c
+
+unsigned int aom_sad_skip_8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride);
+#define aom_sad_skip_8x8 aom_sad_skip_8x8_c
+
+void aom_sad_skip_8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[4], int ref_stride, uint32_t sad_array[4]);
+#define aom_sad_skip_8x8x4d aom_sad_skip_8x8x4d_c
+
+int aom_satd_c(const tran_low_t *coeff, int length);
+#define aom_satd aom_satd_c
+
@@ -1312,12 +1073,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_smooth_h_predictor_16x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_h_predictor_16x32 aom_smooth_h_predictor_16x32_c
+
+void aom_smooth_h_predictor_16x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_h_predictor_16x4 aom_smooth_h_predictor_16x4_c
+
+void aom_smooth_h_predictor_16x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_h_predictor_16x64 aom_smooth_h_predictor_16x64_c
+
+void aom_smooth_h_predictor_16x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_h_predictor_16x8 aom_smooth_h_predictor_16x8_c
+
@@ -1330,21 +1085,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_smooth_h_predictor_32x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_h_predictor_32x64 aom_smooth_h_predictor_32x64_c
+
+void aom_smooth_h_predictor_32x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_h_predictor_32x8 aom_smooth_h_predictor_32x8_c
+
+void aom_smooth_h_predictor_4x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_h_predictor_4x16 aom_smooth_h_predictor_4x16_c
+
+void aom_smooth_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_h_predictor_4x4 aom_smooth_h_predictor_4x4_c
+
+void aom_smooth_h_predictor_4x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_h_predictor_4x8 aom_smooth_h_predictor_4x8_c
+
+void aom_smooth_h_predictor_64x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_h_predictor_64x16 aom_smooth_h_predictor_64x16_c
+
+void aom_smooth_h_predictor_64x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_h_predictor_64x32 aom_smooth_h_predictor_64x32_c
+
@@ -1354,9 +1100,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_smooth_h_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_h_predictor_8x16 aom_smooth_h_predictor_8x16_c
+
+void aom_smooth_h_predictor_8x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_h_predictor_8x32 aom_smooth_h_predictor_8x32_c
+
+void aom_smooth_h_predictor_8x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_h_predictor_8x4 aom_smooth_h_predictor_8x4_c
+
@@ -1369,12 +1112,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_smooth_predictor_16x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_predictor_16x32 aom_smooth_predictor_16x32_c
+
+void aom_smooth_predictor_16x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_predictor_16x4 aom_smooth_predictor_16x4_c
+
+void aom_smooth_predictor_16x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_predictor_16x64 aom_smooth_predictor_16x64_c
+
+void aom_smooth_predictor_16x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_predictor_16x8 aom_smooth_predictor_16x8_c
+
@@ -1387,21 +1124,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_smooth_predictor_32x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_predictor_32x64 aom_smooth_predictor_32x64_c
+
+void aom_smooth_predictor_32x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_predictor_32x8 aom_smooth_predictor_32x8_c
+
+void aom_smooth_predictor_4x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_predictor_4x16 aom_smooth_predictor_4x16_c
+
+void aom_smooth_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_predictor_4x4 aom_smooth_predictor_4x4_c
+
+void aom_smooth_predictor_4x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_predictor_4x8 aom_smooth_predictor_4x8_c
+
+void aom_smooth_predictor_64x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_predictor_64x16 aom_smooth_predictor_64x16_c
+
+void aom_smooth_predictor_64x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_predictor_64x32 aom_smooth_predictor_64x32_c
+
@@ -1411,9 +1139,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_smooth_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_predictor_8x16 aom_smooth_predictor_8x16_c
+
+void aom_smooth_predictor_8x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_predictor_8x32 aom_smooth_predictor_8x32_c
+
+void aom_smooth_predictor_8x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_predictor_8x4 aom_smooth_predictor_8x4_c
+
@@ -1426,12 +1151,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_smooth_v_predictor_16x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_v_predictor_16x32 aom_smooth_v_predictor_16x32_c
+
+void aom_smooth_v_predictor_16x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_v_predictor_16x4 aom_smooth_v_predictor_16x4_c
+
+void aom_smooth_v_predictor_16x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_v_predictor_16x64 aom_smooth_v_predictor_16x64_c
+
+void aom_smooth_v_predictor_16x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_v_predictor_16x8 aom_smooth_v_predictor_16x8_c
+
@@ -1444,21 +1163,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_smooth_v_predictor_32x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_v_predictor_32x64 aom_smooth_v_predictor_32x64_c
+
+void aom_smooth_v_predictor_32x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_v_predictor_32x8 aom_smooth_v_predictor_32x8_c
+
+void aom_smooth_v_predictor_4x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_v_predictor_4x16 aom_smooth_v_predictor_4x16_c
+
+void aom_smooth_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_v_predictor_4x4 aom_smooth_v_predictor_4x4_c
+
+void aom_smooth_v_predictor_4x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_v_predictor_4x8 aom_smooth_v_predictor_4x8_c
+
+void aom_smooth_v_predictor_64x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_v_predictor_64x16 aom_smooth_v_predictor_64x16_c
+
+void aom_smooth_v_predictor_64x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_v_predictor_64x32 aom_smooth_v_predictor_64x32_c
+
@@ -1468,9 +1178,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_smooth_v_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_v_predictor_8x16 aom_smooth_v_predictor_8x16_c
+
+void aom_smooth_v_predictor_8x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_v_predictor_8x32 aom_smooth_v_predictor_8x32_c
+
+void aom_smooth_v_predictor_8x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_smooth_v_predictor_8x4 aom_smooth_v_predictor_8x4_c
+
@@ -1597,12 +1304,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_v_predictor_16x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_16x32 aom_v_predictor_16x32_c
+
+void aom_v_predictor_16x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_16x4 aom_v_predictor_16x4_c
+
+void aom_v_predictor_16x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_16x64 aom_v_predictor_16x64_c
+
+void aom_v_predictor_16x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_16x8 aom_v_predictor_16x8_c
+
@@ -1615,21 +1316,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_v_predictor_32x64_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_32x64 aom_v_predictor_32x64_c
+
+void aom_v_predictor_32x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_32x8 aom_v_predictor_32x8_c
+
+void aom_v_predictor_4x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_4x16 aom_v_predictor_4x16_c
+
+void aom_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_4x4 aom_v_predictor_4x4_c
+
+void aom_v_predictor_4x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_4x8 aom_v_predictor_4x8_c
+
+void aom_v_predictor_64x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_64x16 aom_v_predictor_64x16_c
+
+void aom_v_predictor_64x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_64x32 aom_v_predictor_64x32_c
+
@@ -1639,18 +1331,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void aom_v_predictor_8x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_8x16 aom_v_predictor_8x16_c
+
+void aom_v_predictor_8x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_8x32 aom_v_predictor_8x32_c
+
+void aom_v_predictor_8x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_8x4 aom_v_predictor_8x4_c
+
+void aom_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
+#define aom_v_predictor_8x8 aom_v_predictor_8x8_c
+
+uint64_t aom_var_2d_u16_c(uint8_t *src, int src_stride, int width, int height);
+#define aom_var_2d_u16 aom_var_2d_u16_c
+
+uint64_t aom_var_2d_u8_c(uint8_t *src, int src_stride, int width, int height);
+#define aom_var_2d_u8 aom_var_2d_u8_c
+
@@ -1724,14 +1410,14 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+} // extern "C"
+#endif
+
+#endif
Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/config/aom_scale_rtcd.h
+#endif // AOM_DSP_RTCD_H_
Index: chromium-144.0.7559.59/third_party/libaom/source/config/linux/ppc64/config/aom_scale_rtcd.h
===================================================================
--- /dev/null
+++ chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/config/aom_scale_rtcd.h
+++ chromium-144.0.7559.59/third_party/libaom/source/config/linux/ppc64/config/aom_scale_rtcd.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2024, Alliance for Open Media. All rights reserved.
+ * Copyright (c) 2025, Alliance for Open Media. All rights reserved.
+ *
+ * This source code is subject to the terms of the BSD 2 Clause License and
+ * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
@@ -1820,14 +1506,14 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+} // extern "C"
+#endif
+
+#endif
Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/config/av1_rtcd.h
+#endif // AOM_SCALE_RTCD_H_
Index: chromium-144.0.7559.59/third_party/libaom/source/config/linux/ppc64/config/av1_rtcd.h
===================================================================
--- /dev/null
+++ chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/config/av1_rtcd.h
@@ -0,0 +1,438 @@
+++ chromium-144.0.7559.59/third_party/libaom/source/config/linux/ppc64/config/av1_rtcd.h
@@ -0,0 +1,405 @@
+/*
+ * Copyright (c) 2024, Alliance for Open Media. All rights reserved.
+ * Copyright (c) 2025, Alliance for Open Media. All rights reserved.
+ *
+ * This source code is subject to the terms of the BSD 2 Clause License and
+ * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
@@ -1929,9 +1615,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+ int subpel_y_q3, const uint8_t *ref, int ref_stride, int subpel_search);
+#define aom_upsampled_pred aom_upsampled_pred_c
+
+int av1_apply_selfguided_restoration_c(const uint8_t *dat, int width, int height, int stride, int eps, const int *xqd, uint8_t *dst, int dst_stride, int32_t *tmpbuf, int bit_depth, int highbd);
+#define av1_apply_selfguided_restoration av1_apply_selfguided_restoration_c
+
+int64_t av1_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz);
+#define av1_block_error av1_block_error_c
+
@@ -2166,20 +1849,12 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void av1_round_shift_array_c(int32_t *arr, int size, int bit);
+#define av1_round_shift_array av1_round_shift_array_c
+
+int av1_selfguided_restoration_c(const uint8_t *dgd8, int width, int height,
+ int dgd_stride, int32_t *flt0, int32_t *flt1, int flt_stride,
+ int sgr_params_idx, int bit_depth, int highbd);
+#define av1_selfguided_restoration av1_selfguided_restoration_c
+
+void av1_txb_init_levels_c(const tran_low_t *const coeff, const int width, const int height, uint8_t *const levels);
+#define av1_txb_init_levels av1_txb_init_levels_c
+
+void av1_upsample_intra_edge_c(uint8_t *p, int sz);
+#define av1_upsample_intra_edge av1_upsample_intra_edge_c
+
+void av1_warp_affine_c(const int32_t *mat, const uint8_t *ref, int width, int height, int stride, uint8_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, ConvolveParams *conv_params, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta);
+#define av1_warp_affine av1_warp_affine_c
+
+void av1_wedge_compute_delta_squares_c(int16_t *d, const int16_t *a, const int16_t *b, int N);
+#define av1_wedge_compute_delta_squares av1_wedge_compute_delta_squares_c
+
@@ -2189,12 +1864,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+uint64_t av1_wedge_sse_from_residuals_c(const int16_t *r1, const int16_t *d, const uint8_t *m, int N);
+#define av1_wedge_sse_from_residuals av1_wedge_sse_from_residuals_c
+
+void av1_wiener_convolve_add_src_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, const WienerConvolveParams *conv_params);
+#define av1_wiener_convolve_add_src av1_wiener_convolve_add_src_c
+
+void cdef_copy_rect8_16bit_to_16bit_c(uint16_t *dst, int dstride, const uint16_t *src, int sstride, int width, int height);
+#define cdef_copy_rect8_16bit_to_16bit cdef_copy_rect8_16bit_to_16bit_c
+
+void cdef_copy_rect8_8bit_to_16bit_c(uint16_t *dst, int dstride, const uint8_t *src, int sstride, int width, int height);
+#define cdef_copy_rect8_8bit_to_16bit cdef_copy_rect8_8bit_to_16bit_c
+
@@ -2228,22 +1897,6 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+void cdef_find_dir_dual_c(const uint16_t *img1, const uint16_t *img2, int stride, int32_t *var1, int32_t *var2, int coeff_shift, int *out1, int *out2);
+#define cdef_find_dir_dual cdef_find_dir_dual_c
+
+cfl_subsample_lbd_fn cfl_get_luma_subsampling_420_lbd_c(TX_SIZE tx_size);
+#define cfl_get_luma_subsampling_420_lbd cfl_get_luma_subsampling_420_lbd_c
+
+cfl_subsample_lbd_fn cfl_get_luma_subsampling_422_lbd_c(TX_SIZE tx_size);
+#define cfl_get_luma_subsampling_422_lbd cfl_get_luma_subsampling_422_lbd_c
+
+cfl_subsample_lbd_fn cfl_get_luma_subsampling_444_lbd_c(TX_SIZE tx_size);
+#define cfl_get_luma_subsampling_444_lbd cfl_get_luma_subsampling_444_lbd_c
+
+cfl_predict_lbd_fn cfl_get_predict_lbd_fn_c(TX_SIZE tx_size);
+#define cfl_get_predict_lbd_fn cfl_get_predict_lbd_fn_c
+
+cfl_subtract_average_fn cfl_get_subtract_average_fn_c(TX_SIZE tx_size);
+cfl_subtract_average_fn cfl_get_subtract_average_fn_vsx(TX_SIZE tx_size);
+#define cfl_get_subtract_average_fn cfl_get_subtract_average_fn_vsx
+
+void av1_rtcd(void);
+
+#include "config/aom_config.h"
@@ -2263,4 +1916,4 @@ Index: chromium-134.0.6998.35/third_party/libaom/source/config/linux/ppc64/confi
+} // extern "C"
+#endif
+
+#endif
+#endif // AV1_RTCD_H_

View File

@@ -1,8 +1,8 @@
Index: chromium-134.0.6998.117/v8/gni/v8.gni
Index: chromium-144.0.7559.59/v8/gni/v8.gni
===================================================================
--- chromium-134.0.6998.117.orig/v8/gni/v8.gni
+++ chromium-134.0.6998.117/v8/gni/v8.gni
@@ -224,7 +224,7 @@ assert(!(v8_enable_webassembly && v8_ena
--- 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" ||

View File

@@ -8,15 +8,15 @@ Subject: [PATCH] Force baseline POWER8 / AltiVec / VSX CPU features when on a
BUILD.gn | 6 ++++++
1 file changed, 6 insertions(+)
Index: chromium-130.0.6723.44/v8/BUILD.gn
Index: chromium-145.0.7632.45/v8/BUILD.gn
===================================================================
--- chromium-130.0.6723.44.orig/v8/BUILD.gn
+++ chromium-130.0.6723.44/v8/BUILD.gn
@@ -1431,7 +1431,14 @@ config("toolchain") {
--- chromium-145.0.7632.45.orig/v8/BUILD.gn
+++ chromium-145.0.7632.45/v8/BUILD.gn
@@ -1607,7 +1607,14 @@ config("toolchain") {
if (v8_current_cpu == "ppc64") {
defines += [ "V8_TARGET_ARCH_PPC64" ]
cflags += [ "-ffp-contract=off" ]
- if (current_os == "aix") {
- if (current_os == "aix" && !is_clang) {
+ if (current_os == "linux") {
+ cflags += [
+ # Enable usage of AltiVec, VSX, and other POWER8 and higher features
@@ -24,7 +24,7 @@ Index: chromium-130.0.6723.44/v8/BUILD.gn
+ "-maltivec",
+ "-mvsx",
+ ]
+ } else if (current_os == "aix") {
+ } else if (current_os == "aix" && !is_clang) {
cflags += [
# Work around AIX ceil, trunc and round oddities.
"-mcpu=power5+",

View File

@@ -40,20 +40,20 @@ This patch implements support for the PPC64 architecture on Linux hosts.
util/misc/capture_context_test_util_linux.cc | 6 +
36 files changed, 932 insertions(+), 12 deletions(-)
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/CONTRIBUTORS
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/CONTRIBUTORS
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/CONTRIBUTORS
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/CONTRIBUTORS
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/CONTRIBUTORS
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/CONTRIBUTORS
@@ -13,3 +13,5 @@ Mark Mentovai <mark@chromium.org>
Robert Sesek <rsesek@chromium.org>
Scott Graham <scottmg@chromium.org>
Joshua Peraza <jperaza@chromium.org>
+Shawn Anastasio <sanastasio@raptorengineering.com>
+Timothy Pearson <tpearson@raptorengineering.com>
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_context.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/minidump/minidump_context.h
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_context.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_context.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context.h
@@ -686,6 +686,70 @@ struct MinidumpContextRISCV64 {
uint32_t fcsr;
};
@@ -125,10 +125,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_co
} // namespace crashpad
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
@@ -110,6 +110,13 @@ MinidumpContextWriter::CreateFromSnapsho
break;
}
@@ -192,10 +192,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_co
+}
} // namespace crashpad
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
@@ -413,6 +413,49 @@ class MinidumpContextRISCV64Writer final
MinidumpContextRISCV64 context_;
};
@@ -246,10 +246,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_co
} // namespace crashpad
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
@@ -322,6 +322,21 @@ TYPED_TEST(MinidumpContextWriter, RISCV6
TypeParam>(context, ExpectMinidumpContextRISCV64, kSeed);
}
@@ -272,10 +272,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_co
} // namespace
} // namespace test
} // namespace crashpad
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
@@ -177,6 +177,8 @@ std::string MinidumpMiscInfoDebugBuildSt
static constexpr char kCPU[] = "mips64";
#elif defined(ARCH_CPU_RISCV64)
@@ -285,10 +285,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/minidump_mi
#else
#error define kCPU for this CPU
#endif
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
@@ -297,6 +297,40 @@ void InitializeMinidumpContextRISCV64(Mi
context->fcsr = value++;
}
@@ -369,10 +369,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/test/minidu
+
} // namespace test
} // namespace crashpad
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
@@ -90,6 +90,9 @@ void ExpectMinidumpContextMIPS64(uint32_
void ExpectMinidumpContextRISCV64(uint32_t expect_seed,
const MinidumpContextRISCV64* observed,
@@ -383,10 +383,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/minidump/test/minidu
//! \}
} // namespace test
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/capture_memory.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/capture_memory.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/capture_memory.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/capture_memory.cc
@@ -123,6 +123,11 @@ void CaptureMemory::PointedToByContext(c
for (size_t i = 0; i < std::size(context.riscv64->regs); ++i) {
MaybeCaptureMemoryAround(delegate, context.riscv64->regs[i]);
@@ -399,10 +399,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/capture_mem
#else
#error Port.
#endif
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
@@ -47,6 +47,9 @@ enum CPUArchitecture {
//! \brief 64-bit RISC-V.
@@ -413,10 +413,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/cpu_archite
};
} // namespace crashpad
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/cpu_context.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/cpu_context.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context.cc
@@ -173,6 +173,8 @@ uint64_t CPUContext::InstructionPointer(
return arm64->pc;
case kCPUArchitectureRISCV64:
@@ -443,10 +443,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/cpu_context
case kCPUArchitectureRISCV64:
return true;
case kCPUArchitectureX86:
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/cpu_context.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/cpu_context.h
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/cpu_context.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/cpu_context.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context.h
@@ -371,6 +371,24 @@ struct CPUContextRISCV64 {
uint32_t fcsr;
};
@@ -480,10 +480,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/cpu_context
};
};
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
@@ -15,6 +15,7 @@
#ifndef CRASHPAD_SNAPSHOT_LINUX_CPU_CONTEXT_LINUX_H_
#define CRASHPAD_SNAPSHOT_LINUX_CPU_CONTEXT_LINUX_H_
@@ -571,10 +571,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/cpu_c
} // namespace internal
} // namespace crashpad
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
@@ -194,12 +194,15 @@ void TestAgainstTarget(PtraceConnection*
device == 0 && inode == 0 && mapping_name == "[vdso]";
#if defined(ARCH_CPU_X86)
@@ -592,10 +592,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/debug
},
module_mapping->name,
module_mapping->device,
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
@@ -367,6 +367,69 @@ bool ExceptionSnapshotLinux::ReadContext
return internal::ReadContext(reader, context_address, context_.riscv64);
}
@@ -666,10 +666,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/excep
#endif // ARCH_CPU_X86_FAMILY
bool ExceptionSnapshotLinux::Initialize(
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
@@ -94,6 +94,8 @@ class ExceptionSnapshotLinux final : pub
CPUContextMIPS64 mips64;
#elif defined(ARCH_CPU_RISCV64)
@@ -679,10 +679,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/excep
#endif
} context_union_;
CPUContext context_;
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
@@ -325,7 +325,28 @@ void ExpectContext(const CPUContext& act
sizeof(actual.riscv64->fpregs)),
0);
@@ -712,10 +712,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/excep
#else
#error Port.
#endif
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
@@ -129,6 +129,8 @@ void ProcessReaderLinux::Thread::Initial
: thread_info.thread_context.t32.regs[29];
#elif defined(ARCH_CPU_RISCV64)
@@ -725,10 +725,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/proce
#else
#error Port.
#endif
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
@@ -456,6 +456,89 @@ static_assert(offsetof(UContext<ContextT
offsetof(ucontext_t, uc_mcontext.__fpregs),
"context offset mismatch");
@@ -819,11 +819,11 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/signa
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
@@ -208,6 +208,8 @@ CPUArchitecture SystemSnapshotLinux::Get
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
@@ -229,6 +229,8 @@ CPUArchitecture SystemSnapshotLinux::Get
: kCPUArchitectureMIPSEL;
#elif defined(ARCH_CPU_RISCV64)
return kCPUArchitectureRISCV64;
@@ -832,7 +832,7 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/syste
#else
#error port to your architecture
#endif
@@ -226,6 +228,9 @@ uint32_t SystemSnapshotLinux::CPURevisio
@@ -247,6 +249,9 @@ uint32_t SystemSnapshotLinux::CPURevisio
#elif defined(ARCH_CPU_RISCV64)
// Not implemented
return 0;
@@ -842,7 +842,7 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/syste
#else
#error port to your architecture
#endif
@@ -249,6 +254,9 @@ std::string SystemSnapshotLinux::CPUVend
@@ -270,6 +275,9 @@ std::string SystemSnapshotLinux::CPUVend
#elif defined(ARCH_CPU_RISCV64)
// Not implemented
return std::string();
@@ -852,7 +852,7 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/syste
#else
#error port to your architecture
#endif
@@ -380,6 +388,9 @@ bool SystemSnapshotLinux::NXEnabled() co
@@ -401,6 +409,9 @@ bool SystemSnapshotLinux::NXEnabled() co
#elif defined(ARCH_CPU_RISCV64)
// Not implemented
return false;
@@ -862,10 +862,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/syste
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
@@ -196,6 +196,14 @@ bool ThreadSnapshotLinux::Initialize(
InitializeCPUContextRISCV64(thread.thread_info.thread_context.t64,
thread.thread_info.float_context.f64,
@@ -881,10 +881,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/threa
#else
#error Port.
#endif
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
@@ -79,6 +79,8 @@ class ThreadSnapshotLinux final : public
CPUContextMIPS64 mips64;
#elif defined(ARCH_CPU_RISCV64)
@@ -894,10 +894,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/linux/threa
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
@@ -317,5 +317,38 @@ void InitializeCPUContextRISCV64(CPUCont
riscv64->fcsr = value++;
}
@@ -937,10 +937,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/test/test_c
+
} // namespace test
} // namespace crashpad
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
@@ -64,6 +64,7 @@ void InitializeCPUContextARM64(CPUContex
void InitializeCPUContextMIPS(CPUContext* context, uint32_t seed);
void InitializeCPUContextMIPS64(CPUContext* context, uint32_t seed);
@@ -949,10 +949,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/snapshot/test/test_c
//! \}
} // namespace test
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/test/linux/get_tls.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/test/linux/get_tls.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/test/linux/get_tls.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/test/linux/get_tls.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/test/linux/get_tls.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/test/linux/get_tls.cc
@@ -51,6 +51,8 @@ LinuxVMAddress GetTLS() {
: "$3");
#elif defined(ARCH_CPU_RISCV64)
@@ -962,10 +962,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/test/linux/get_tls.c
#else
#error Port.
#endif // ARCH_CPU_ARMEL
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/test/multiprocess_posix.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/test/multiprocess_posix.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/test/multiprocess_posix.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/test/multiprocess_posix.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/test/multiprocess_posix.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/test/multiprocess_posix.cc
@@ -162,7 +162,8 @@ void Multiprocess::SetExpectedChildTermi
}
@@ -976,10 +976,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/test/multiprocess_po
SetExpectedChildTermination(kTerminationSignal, SIGTRAP);
#else
SetExpectedChildTermination(kTerminationSignal, SIGILL);
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
@@ -56,6 +56,11 @@ bool AuxiliaryVector::Read(PtraceConnect
if (type == AT_IGNORE) {
continue;
@@ -992,10 +992,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/util/linux/auxiliary
if (!MapInsertOrReplace(&values_, type, value, nullptr)) {
LOG(ERROR) << "duplicate auxv entry";
return false;
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/util/linux/ptracer.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/ptracer.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/util/linux/ptracer.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/util/linux/ptracer.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/linux/ptracer.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/ptracer.cc
@@ -430,6 +430,64 @@ bool GetThreadArea64(pid_t tid,
return true;
}
@@ -1071,10 +1071,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/util/linux/ptracer.c
GetThreadArea64(tid,
info->thread_context,
&info->thread_specific_data_address,
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/util/linux/thread_info.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/thread_info.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/util/linux/thread_info.h
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/util/linux/thread_info.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/linux/thread_info.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/thread_info.h
@@ -34,6 +34,10 @@
#include <asm/ptrace.h>
#endif
@@ -1193,10 +1193,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/util/linux/thread_in
//! \brief The thread-local storage address for the thread.
LinuxVMAddress thread_specific_data_address;
};
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/util/misc/capture_context.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/util/misc/capture_context.h
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/util/misc/capture_context.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/misc/capture_context.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context.h
@@ -70,6 +70,7 @@ using NativeCPUContext = ucontext_t;
//! Linux | ARM/ARM64 | `r0`/`x0`
//! Linux | MIPS/MIPS64 | `$a0`
@@ -1205,10 +1205,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/util/misc/capture_co
//!
//! Additionally, the value `LR` on ARM/ARM64 will be the return address of
//! this function.
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
@@ -30,7 +30,7 @@
.globl CAPTURECONTEXT_SYMBOL2
#if defined(__i386__) || defined(__x86_64__)
@@ -1435,10 +1435,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/util/misc/capture_co
#elif defined(__riscv)
#define MCONTEXT_GREGS_OFFSET 176
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
@@ -48,7 +48,7 @@ void TestCaptureContext() {
uintptr_t pc = ProgramCounterFromContext(context_1);
@@ -1448,10 +1448,10 @@ Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/util/misc/capture_co
// Sanitizers can cause enough code bloat that the “nearby” check would
// likely fail.
const uintptr_t kReferencePC =
Index: chromium-136.0.7103.48/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
+++ chromium-136.0.7103.48/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
@@ -38,6 +38,8 @@ void SanityCheckContext(const NativeCPUC
#elif defined(ARCH_CPU_RISCV64)
EXPECT_EQ(context.uc_mcontext.__gregs[10],

View File

@@ -54,10 +54,10 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
src/tools/linux/md2core/minidump-2-core.cc | 45 +++++++++++++++
25 files changed, 281 insertions(+), 35 deletions(-)
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
+++ chromium-136.0.7103.48/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"
@@ -67,10 +67,10 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dum
#else
#error "This code has not been ported to your platform yet."
#endif
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
+++ chromium-136.0.7103.48/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
@@ -153,10 +153,10 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dum
+#endif
+
} // namespace google_breakpad
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
+++ chromium-136.0.7103.48/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;
@@ -180,10 +180,10 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dum
};
} // namespace google_breakpad
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
+++ chromium-136.0.7103.48/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
@@ -233,10 +233,10 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dum
#endif
} // namespace google_breakpad
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
+++ chromium-136.0.7103.48/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,
@@ -247,11 +247,11 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dum
#else
static void FillCPUContext(RawContextCPU* out, const ucontext_t* uc);
#endif
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
@@ -465,6 +465,13 @@ bool ExceptionHandler::HandleSignal(int
--- 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));
}
@@ -265,7 +265,7 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/han
#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
ucontext_t* uc_ptr = (ucontext_t*)uc;
if (uc_ptr->uc_mcontext.fpregs) {
@@ -703,10 +710,18 @@ bool ExceptionHandler::WriteMinidump() {
@@ -704,10 +711,18 @@ bool ExceptionHandler::WriteMinidump() {
}
#endif
@@ -285,7 +285,7 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/han
context.tid = sys_gettid();
// Add an exception stream to the minidump for better reporting.
@@ -727,6 +742,9 @@ bool ExceptionHandler::WriteMinidump() {
@@ -728,6 +743,9 @@ bool ExceptionHandler::WriteMinidump() {
#elif defined(__mips__)
context.siginfo.si_addr =
reinterpret_cast<void*>(context.context.uc_mcontext.pc);
@@ -295,11 +295,11 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/han
#elif defined(__riscv)
context.siginfo.si_addr =
reinterpret_cast<void*>(context.context.uc_mcontext.__gregs[REG_PC]);
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
@@ -200,7 +200,11 @@ class ExceptionHandler {
--- 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;
@@ -312,11 +312,11 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/han
fpstate_t float_state;
#endif
};
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
@@ -326,7 +326,7 @@ TEST(ExceptionHandlerTest, ParallelChild
--- 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 {
@@ -325,7 +325,7 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/han
}
}
@@ -582,6 +582,8 @@ const unsigned char kIllegalInstruction[
@@ -581,6 +581,8 @@ const unsigned char kIllegalInstruction[
#if defined(__mips__)
// mfc2 zero,Impl - usually illegal in userspace.
0x48, 0x00, 0x00, 0x48
@@ -334,7 +334,7 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/han
#else
// This crashes with SIGILL on x86/x86-64/arm.
0xff, 0xff, 0xff, 0xff
@@ -777,10 +779,10 @@ TEST(ExceptionHandlerTest, InstructionPo
@@ -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.
@@ -347,10 +347,10 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/han
const int kOffset = kMemorySize - sizeof(kIllegalInstruction);
const pid_t child = fork();
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
+++ chromium-136.0.7103.48/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)
@@ -393,11 +393,11 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/mic
const google_breakpad::fpstate_t* const float_state_;
#endif
LinuxDumper* dumper_;
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
@@ -282,10 +282,19 @@ TEST(MicrodumpWriterTest, BasicWithMappi
--- 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));
@@ -420,10 +420,10 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/mic
#else
ASSERT_NE(std::string::npos,
buf.find("M 00001000 0000002A 00001000 "
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
+++ chromium-136.0.7103.48/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*>(
@@ -446,11 +446,11 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/min
# if defined(__ANDROID__)
for (int i = EF_R0; i <= EF_R31; i++)
info.mcontext.gregs[i - EF_R0] = status->pr_reg[i];
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
@@ -770,7 +770,9 @@ bool LinuxDumper::GetStackInfo(const voi
--- 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.
@@ -461,10 +461,10 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/min
const MappingInfo* mapping = FindMapping(stack_pointer);
if (!mapping)
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
+++ chromium-136.0.7103.48/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__) || \
@@ -475,10 +475,10 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/min
typedef Elf64_auxv_t elf_aux_entry;
#endif
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
+++ chromium-136.0.7103.48/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)
@@ -488,10 +488,10 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/min
#else
#error This test has not been ported to this platform.
#endif
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
+++ chromium-136.0.7103.48/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;
@@ -533,11 +533,11 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/min
#else
# error "This code hasn't been ported to your platform yet."
#endif
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
@@ -470,6 +470,9 @@ TEST(LinuxPtraceDumperTest, VerifyStackR
--- 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]);
@@ -547,7 +547,7 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/min
#else
#error This test has not been ported to this platform.
#endif
@@ -569,6 +572,8 @@ TEST_F(LinuxPtraceDumperTest, SanitizeSt
@@ -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];
@@ -556,10 +556,10 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/min
#else
#error This test has not been ported to this platform.
#endif
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
+++ chromium-136.0.7103.48/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),
@@ -613,10 +613,10 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/min
const google_breakpad::fpstate_t* const float_state_; // ditto
#endif
LinuxDumper* dumper_;
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
+++ chromium-136.0.7103.48/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__)
@@ -626,10 +626,10 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/min
#elif !defined(__ARM_EABI__) && !defined(__mips__)
typedef std::remove_pointer<fpregset_t>::type fpstate_t;
#endif
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
+++ chromium-136.0.7103.48/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] =
@@ -640,10 +640,10 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/min
#else
# error "This code has not been ported to your platform yet."
#endif
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
+++ chromium-136.0.7103.48/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__) || \
@@ -654,11 +654,11 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/common/linux/mem
struct kernel_stat st;
if (sys_fstat(fd, &st) == -1 || st.st_size < 0) {
#else
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
@@ -179,9 +179,10 @@ TEST_F(MemoryMappedFileTest, RemapAfterM
--- 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.
@@ -672,11 +672,11 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/common/linux/mem
for (size_t i = 0; i < data1_size; ++i) {
data1[i] = i & 0x7f;
}
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
@@ -60,8 +60,9 @@ TEST(PageAllocatorTest, LargeObject) {
--- 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));
@@ -687,10 +687,10 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/common/memory_al
for (unsigned i = 1; i < 10; ++i) {
uint8_t* p = reinterpret_cast<uint8_t*>(allocator.Alloc(i));
ASSERT_FALSE(p == nullptr);
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
===================================================================
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
+++ chromium-136.0.7103.48/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)
@@ -709,7 +709,7 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/tools/linux/md2c
#endif
using google_breakpad::MDTypeHelper;
@@ -324,6 +328,9 @@ struct CrashedProcess {
@@ -325,6 +329,9 @@ struct CrashedProcess {
#if defined(__aarch64__)
user_fpsimd_struct fpregs;
#endif
@@ -719,7 +719,7 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/tools/linux/md2c
uintptr_t stack_addr;
const uint8_t* stack;
size_t stack_length;
@@ -627,6 +634,38 @@ ParseThreadRegisters(CrashedProcess::Thr
@@ -628,6 +635,38 @@ ParseThreadRegisters(CrashedProcess::Thr
#error "Unexpected __riscv_xlen"
#endif
}
@@ -758,7 +758,7 @@ Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/tools/linux/md2c
#else
#error "This code has not been ported to your platform yet"
#endif
@@ -732,6 +771,12 @@ ParseSystemInfo(const Options& options,
@@ -733,6 +772,12 @@ ParseSystemInfo(const Options& options,
# else
# error "Unexpected __riscv_xlen"
# endif

View File

@@ -1,18 +1,24 @@
--- a/third_party/xnnpack/generate_build_gn.py
+++ b/third_party/xnnpack/generate_build_gn.py
@@ -219,6 +219,9 @@
_Platform(gn_cpu='arm64',
bazel_cpu='aarch64',
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='ppc64',
+ bazel_cpu='ppc64le',
+ bazel_platform='//:linux_ppc64le'),
_Platform(gn_cpu='riscv64',
bazel_cpu='riscv64',
bazel_platform='//:linux_riscv64')
--- a/third_party/xnnpack/bazelroot/BUILD
+++ b/third_party/xnnpack/bazelroot/BUILD
@@ -21,6 +21,14 @@
- 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(
],
)

View File

@@ -1,37 +0,0 @@
From b3a14db7637232d30c878cc1f1ad6d8037e81379 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawn@anastas.io>
Date: Tue, 15 Jan 2019 22:42:21 -0600
Subject: [PATCH] linux/seccomp-bpf: ppc64+glibc workaround in SIGSYS handler
Workaround for an apparent issue with glibc negating syscall
parameters. Observed on a ppc64le machine with glibc.
More investigation required.
---
sandbox/linux/seccomp-bpf/trap.cc | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Index: chromium-128.0.6613.113/sandbox/linux/seccomp-bpf/trap.cc
===================================================================
--- chromium-128.0.6613.113.orig/sandbox/linux/seccomp-bpf/trap.cc
+++ chromium-128.0.6613.113/sandbox/linux/seccomp-bpf/trap.cc
@@ -236,6 +236,20 @@ void Trap::SigSys(int nr, LinuxSigInfo*
SetIsInSigHandler();
}
+#if defined(__powerpc64__)
+ // On ppc64+glibc, some syscalls seem to accidentally negate the first
+ // parameter which causes checks against it to fail. For now, manually
+ // negate them back.
+ // TODO(shawn@anastas.io): investigate this issue further
+ auto nr = SECCOMP_SYSCALL(ctx);
+ if (nr == __NR_openat || nr == __NR_mkdirat || nr == __NR_faccessat || nr == __NR_readlinkat ||
+ nr == __NR_renameat || nr == __NR_renameat2 || nr == __NR_newfstatat || nr == __NR_unlinkat) {
+ if (static_cast<int>(SECCOMP_PARM1(ctx)) > 0) {
+ SECCOMP_PARM1(ctx) = -SECCOMP_PARM1(ctx);
+ }
+ }
+#endif
+
// Copy the seccomp-specific data into a arch_seccomp_data structure. This
// is what we are showing to TrapFnc callbacks that the system call
// evaluator registered with the sandbox.

File diff suppressed because it is too large Load Diff

View File

@@ -1,79 +0,0 @@
From 036d209a3f1a771de9aed31dfbe804aaf91d1c27 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 9 Aug 2018 23:35:21 -0500
Subject: [PATCH] sandbox/linux: Implement partial support for ppc64 syscalls
and ucontext
Unlike other architectures, the ppc64 files currently rely on applicable
headers being provided by the system. It is sufficient for standard
GNU/Linux environments, but may require expansion elsewhere.
---
sandbox/linux/BUILD.gn | 2 ++
sandbox/linux/system_headers/linux_syscalls.h | 4 ++++
sandbox/linux/system_headers/linux_ucontext.h | 2 ++
sandbox/linux/system_headers/ppc64_linux_syscalls.h | 12 ++++++++++++
sandbox/linux/system_headers/ppc64_linux_ucontext.h | 12 ++++++++++++
5 files changed, 32 insertions(+)
create mode 100644 sandbox/linux/system_headers/ppc64_linux_syscalls.h
create mode 100644 sandbox/linux/system_headers/ppc64_linux_ucontext.h
Index: chromium-134.0.6998.35/sandbox/linux/BUILD.gn
===================================================================
--- chromium-134.0.6998.35.orig/sandbox/linux/BUILD.gn
+++ chromium-134.0.6998.35/sandbox/linux/BUILD.gn
@@ -384,6 +384,8 @@ component("sandbox_services") {
source_set("sandbox_services_headers") {
sources = [
+ "system_headers/ppc64_linux_syscalls.h",
+ "system_headers/ppc64_linux_ucontext.h",
"system_headers/arm64_linux_syscalls.h",
"system_headers/arm_linux_syscalls.h",
"system_headers/arm_linux_ucontext.h",
Index: chromium-134.0.6998.35/sandbox/linux/system_headers/linux_syscalls.h
===================================================================
--- chromium-134.0.6998.35.orig/sandbox/linux/system_headers/linux_syscalls.h
+++ chromium-134.0.6998.35/sandbox/linux/system_headers/linux_syscalls.h
@@ -44,4 +44,8 @@
#include "sandbox/linux/system_headers/arm64_linux_syscalls.h"
#endif
+#if defined(__powerpc64__)
+#include "sandbox/linux/system_headers/ppc64_linux_syscalls.h"
+#endif
+
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_
Index: chromium-134.0.6998.35/sandbox/linux/system_headers/ppc64_linux_syscalls.h
===================================================================
--- /dev/null
+++ chromium-134.0.6998.35/sandbox/linux/system_headers/ppc64_linux_syscalls.h
@@ -0,0 +1,12 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
+
+#include <asm/unistd.h>
+
+//TODO: is it necessary to redefine syscall numbers for PPC64?
+
+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
Index: chromium-134.0.6998.35/sandbox/linux/system_headers/ppc64_linux_ucontext.h
===================================================================
--- /dev/null
+++ chromium-134.0.6998.35/sandbox/linux/system_headers/ppc64_linux_ucontext.h
@@ -0,0 +1,12 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
+
+#include <sys/ucontext.h>
+
+//TODO: is it necessary to redefine ucontext on PPC64?
+
+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_

View File

@@ -1,22 +0,0 @@
From c41cd6ac927f592b161abc04468d3c7a4be91995 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Tue, 23 Oct 2018 15:49:31 -0500
Subject: [PATCH] sandbox/linux: Update IsSyscallAllowed in broker_process.cc
---
sandbox/linux/syscall_broker/broker_process.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: chromium-128.0.6613.113/sandbox/linux/syscall_broker/broker_process.cc
===================================================================
--- chromium-128.0.6613.113.orig/sandbox/linux/syscall_broker/broker_process.cc
+++ chromium-128.0.6613.113/sandbox/linux/syscall_broker/broker_process.cc
@@ -169,7 +169,7 @@ bool BrokerProcess::IsSyscallBrokerable(
#if defined(__NR_fstatat64)
case __NR_fstatat64:
#endif
-#if defined(__x86_64__) || defined(__aarch64__)
+#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
case __NR_newfstatat:
#endif
return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);

View File

@@ -1,633 +0,0 @@
From da52663deec77f705d7d58b18484c3e28e563f10 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Tue, 18 Sep 2018 18:39:28 -0500
Subject: [PATCH] sandbox/linux: Update syscall helpers/lists for ppc64
---
.../seccomp-bpf-helpers/baseline_policy.cc | 8 +-
.../syscall_parameters_restrictions.cc | 2 +-
.../syscall_parameters_restrictions.h | 2 +-
.../linux/seccomp-bpf-helpers/syscall_sets.cc | 108 ++++++++++--------
.../linux/seccomp-bpf-helpers/syscall_sets.h | 6 +-
sandbox/linux/services/syscall_wrappers.cc | 2 +-
6 files changed, 73 insertions(+), 55 deletions(-)
Index: chromium-136.0.7103.48/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
===================================================================
--- chromium-136.0.7103.48.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+++ chromium-136.0.7103.48/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
@@ -90,7 +90,8 @@
SyscallSets::IsPrctl(sysno) ||
SyscallSets::IsProcessGroupOrSession(sysno) ||
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
SyscallSets::IsSocketCall(sysno) ||
#endif
#if defined(__arm__)
@@ -254,7 +255,7 @@
// TODO(crbug.com/40528912): should i386 really be in this list?
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
if (sysno == __NR_mmap)
return RestrictMmapFlags();
#endif
@@ -336,7 +337,8 @@
}
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
if (SyscallSets::IsSocketCall(sysno))
return RestrictSocketcallCommand();
#endif
Index: chromium-136.0.7103.48/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
===================================================================
--- chromium-136.0.7103.48.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+++ chromium-136.0.7103.48/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
@@ -43,7 +43,7 @@
#define MAP_DROPPABLE 0x08 // Zero memory under memory pressure.
#endif
-#if BUILDFLAG(IS_LINUX) && !defined(__arm__) && !defined(__aarch64__) && \
+#if BUILDFLAG(IS_LINUX) && !defined(__arm__) && !defined(__aarch64__) && !defined(__powerpc64__) && \
!defined(PTRACE_GET_THREAD_AREA)
// Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance
// the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA.
@@ -52,6 +52,11 @@
#include <asm/ptrace-abi.h>
#endif
+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h
+#ifdef __powerpc64__
+#include <termios.h>
+#endif
+
#if BUILDFLAG(IS_ANDROID)
#include "base/android/background_thread_pool_field_trial.h"
@@ -107,6 +112,15 @@
#endif
}
+inline bool IsArchitecturePPC64() {
+#if defined(__powerpc64__)
+ return true;
+#else
+ return false;
+#endif
+}
+
+
// Ubuntu's version of glibc has a race condition in sem_post that can cause
// it to call futex(2) with bogus op arguments. To workaround this, we need
// to allow those futex(2) calls to fail with EINVAL, instead of crashing the
@@ -274,9 +288,11 @@
// operator.
// Glibc overrides the kernel's O_LARGEFILE value. Account for this.
uint64_t kOLargeFileFlag = O_LARGEFILE;
- if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips())
+ if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips() \
+ || IsArchitecturePPC64())
kOLargeFileFlag = 0100000;
+
const Arg<int> cmd(1);
const Arg<long> long_arg(2);
@@ -299,8 +315,17 @@
F_SETLKW,
F_GETLK,
F_DUPFD,
- F_DUPFD_CLOEXEC},
- Allow())
+ F_DUPFD_CLOEXEC
+#if defined(__powerpc64__)
+// On PPC64, F_SETLK, F_GETLK, F_SETLKW are defined as the 64-bit variants
+// but glibc will sometimes still use the 32-bit versions. Allow both.
+ ,
+ 5, /* F_GETLK (32) */
+ 6, /* F_SETLK (32) */
+ 7 /* F_SETLKW (32) */
+#endif
+ },
+ Allow())
.Case(F_SETFL,
If((long_arg & ~kAllowedMask) == 0, Allow()).Else(CrashSIGSYS()))
.Case(F_ADD_SEALS,
@@ -309,7 +334,7 @@
// clang-format on
}
-#if defined(__i386__) || defined(__mips__)
+#if defined(__i386__) || defined(__mips__) || defined(__powerpc64__)
ResultExpr RestrictSocketcallCommand() {
// Unfortunately, we are unable to restrict the first parameter to
// socketpair(2). Whilst initially sounding bad, it's noteworthy that very
@@ -478,7 +503,7 @@
#endif
return Switch(request)
.Cases({
-#if !defined(__aarch64__)
+#if !defined(__aarch64__) && !defined(__powerpc64__)
PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_GET_THREAD_AREA,
PTRACE_GETREGSET,
#endif
Index: chromium-136.0.7103.48/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
===================================================================
--- chromium-136.0.7103.48.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
+++ chromium-136.0.7103.48/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
@@ -52,7 +52,7 @@ SANDBOX_EXPORT bpf_dsl::ResultExpr Restr
// O_NONBLOCK | O_SYNC | O_LARGEFILE | O_CLOEXEC | O_NOATIME.
SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictFcntlCommands();
-#if defined(__i386__) || defined(__mips__)
+#if defined(__i386__) || defined(__mips__) || defined(__powerpc64__)
// Restrict socketcall(2) to only allow socketpair(2), send(2), recv(2),
// sendto(2), recvfrom(2), shutdown(2), sendmsg(2) and recvmsg(2).
SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictSocketcallCommand();
Index: chromium-136.0.7103.48/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
===================================================================
--- chromium-136.0.7103.48.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ chromium-136.0.7103.48/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -29,7 +29,8 @@ bool SyscallSets::IsAllowedGettime(int s
switch (sysno) {
case __NR_gettimeofday:
#if defined(__i386__) || defined(__x86_64__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_time:
#endif
return true;
@@ -52,12 +53,14 @@ bool SyscallSets::IsAllowedGettime(int s
case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID().
#endif
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_ftime: // Obsolete.
#endif
case __NR_settimeofday: // Privileged.
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_stime:
#endif
default:
@@ -136,7 +139,7 @@ bool SyscallSets::IsFileSystem(int sysno
case __NR_faccessat2:
case __NR_fchmodat:
case __NR_fchownat: // Should be called chownat ?
-#if defined(__x86_64__) || defined(__aarch64__)
+#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
case __NR_newfstatat: // fstatat(). EPERM not a valid errno.
#elif defined(__i386__) || defined(__arm__) || \
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
@@ -155,7 +158,7 @@ bool SyscallSets::IsFileSystem(int sysno
case __NR_memfd_create:
case __NR_mkdirat:
case __NR_mknodat:
-#if defined(__i386__)
+#if defined(__i386__) || defined(__powerpc64__)
case __NR_oldlstat:
case __NR_oldstat:
#endif
@@ -169,7 +172,8 @@ bool SyscallSets::IsFileSystem(int sysno
#endif
case __NR_statfs: // EPERM not a valid errno.
#if defined(__i386__) || defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_statfs64:
#endif
case __NR_statx: // EPERM not a valid errno.
@@ -180,7 +184,8 @@ bool SyscallSets::IsFileSystem(int sysno
case __NR_truncate64:
#endif
case __NR_unlinkat:
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__powerpc64__)
case __NR_utime:
#endif
case __NR_utimensat: // New.
@@ -220,7 +225,8 @@ bool SyscallSets::IsAllowedFileSystemAcc
#endif
return true;
// TODO(jln): these should be denied gracefully as well (moved below).
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__powerpc64__)
case __NR_fadvise64: // EPERM not a valid errno.
#endif
#if defined(__i386__)
@@ -233,11 +239,12 @@ bool SyscallSets::IsAllowedFileSystemAcc
case __NR_flock: // EPERM not a valid errno.
case __NR_fstatfs: // Give information about the whole filesystem.
#if defined(__i386__) || defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_fstatfs64:
#endif
case __NR_fsync: // EPERM not a valid errno.
-#if defined(__i386__)
+#if defined(__i386__) || defined(__powerpc64__)
case __NR_oldfstat:
#endif
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
@@ -245,6 +252,8 @@ bool SyscallSets::IsAllowedFileSystemAcc
case __NR_sync_file_range: // EPERM not a valid errno.
#elif defined(__arm__)
case __NR_arm_sync_file_range: // EPERM not a valid errno.
+#elif defined(__powerpc64__)
+ case __NR_sync_file_range2: // EPERM not a valid errno.
#endif
default:
return false;
@@ -265,7 +274,8 @@ bool SyscallSets::IsDeniedFileSystemAcce
#endif
case __NR_getdents64: // EPERM not a valid errno.
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_readdir:
#endif
return true;
@@ -306,7 +316,7 @@ bool SyscallSets::IsGetSimpleId(int sysn
bool SyscallSets::IsProcessPrivilegeChange(int sysno) {
switch (sysno) {
case __NR_capset:
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc64__)
case __NR_ioperm: // Intel privilege.
case __NR_iopl: // Intel privilege.
#endif
@@ -362,7 +372,8 @@ bool SyscallSets::IsAllowedSignalHandlin
// overflow.
case __NR_sigaltstack:
#if defined(__i386__) || defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_rt_sigtimedwait_time64:
case __NR_sigaction:
case __NR_sigprocmask:
@@ -378,7 +389,8 @@ bool SyscallSets::IsAllowedSignalHandlin
#endif
case __NR_signalfd4:
#if defined(__i386__) || defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_sigpending:
case __NR_sigsuspend:
#endif
@@ -402,7 +414,7 @@ bool SyscallSets::IsAllowedOperationOnFd
#endif
case __NR_dup3:
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_shutdown:
#endif
return true;
@@ -435,7 +447,7 @@ bool SyscallSets::IsAllowedProcessStartO
case __NR_exit_group:
case __NR_wait4:
case __NR_waitid:
-#if defined(__i386__)
+#if defined(__i386__) || defined(__powerpc64__)
case __NR_waitpid:
#endif
return true;
@@ -452,7 +464,7 @@ bool SyscallSets::IsAllowedProcessStartO
#endif
case __NR_set_tid_address:
case __NR_unshare:
-#if !defined(__mips__) && !defined(__aarch64__)
+#if !defined(__mips__) && !defined(__aarch64__) || defined(__powerpc64__)
case __NR_vfork:
#endif
default:
@@ -499,7 +511,7 @@ bool SyscallSets::IsAllowedEpoll(int sys
bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) {
switch (sysno) {
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_accept:
case __NR_accept4:
case __NR_bind:
@@ -514,7 +526,8 @@ bool SyscallSets::IsDeniedGetOrModifySoc
}
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
// Big multiplexing system call for sockets.
bool SyscallSets::IsSocketCall(int sysno) {
switch (sysno) {
@@ -528,7 +541,8 @@ bool SyscallSets::IsSocketCall(int sysno
}
#endif
-#if defined(__x86_64__) || defined(__arm__) || defined(__mips__)
+#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+ defined(__powerpc64__)
bool SyscallSets::IsNetworkSocketInformation(int sysno) {
switch (sysno) {
case __NR_getpeername:
@@ -554,7 +568,7 @@ bool SyscallSets::IsAllowedAddressSpaceA
case __NR_mincore:
case __NR_mlockall:
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_mmap:
#endif
#if defined(__i386__) || defined(__arm__) || \
@@ -584,7 +598,8 @@ bool SyscallSets::IsAllowedGeneralIo(int
switch (sysno) {
case __NR_lseek:
#if defined(__i386__) || defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR__llseek:
#endif
#if !defined(__aarch64__)
@@ -619,18 +619,19 @@
case __NR_readv:
case __NR_pread64:
#if defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_recv:
#endif
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_recvfrom: // Could specify source.
case __NR_recvmsg: // Could specify source.
#endif
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc64__)
case __NR_select:
#endif
-#if defined(__i386__) || defined(__arm__) || defined(__mips__)
+#if defined(__i386__) || defined(__arm__) || defined(__mips__) || defined(__powerpc64__)
case __NR__newselect:
#endif
case __NR_write:
@@ -650,11 +651,12 @@
#endif
// send* syscalls need their flags filtered.
#if defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_send:
#endif
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
- defined(__mips__) || defined(__aarch64__)
+ defined(__mips__) || defined(__aarch64__) || defined(__powerpc64__)
case __NR_sendmsg: // Could specify destination.
case __NR_sendto: // Could specify destination.
#endif
@@ -679,7 +696,8 @@ bool SyscallSets::IsAllowedBasicSchedule
return true;
case __NR_getpriority:
#if defined(__i386__) || defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_nice:
#endif
case __NR_setpriority:
@@ -691,7 +709,8 @@ bool SyscallSets::IsAllowedBasicSchedule
bool SyscallSets::IsAdminOperation(int sysno) {
switch (sysno) {
#if defined(__i386__) || defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_bdflush:
#endif
case __NR_kexec_load:
@@ -707,7 +726,8 @@ bool SyscallSets::IsAdminOperation(int s
bool SyscallSets::IsKernelModule(int sysno) {
switch (sysno) {
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__powerpc64__)
case __NR_create_module:
case __NR_get_kernel_syms: // Should ENOSYS.
case __NR_query_module:
@@ -740,7 +760,8 @@ bool SyscallSets::IsFsControl(int sysno)
case __NR_swapoff:
case __NR_swapon:
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_umount:
#endif
case __NR_umount2:
@@ -756,7 +777,7 @@ bool SyscallSets::IsNuma(int sysno) {
case __NR_getcpu:
case __NR_mbind:
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_migrate_pages:
#endif
case __NR_move_pages:
@@ -791,14 +812,15 @@ bool SyscallSets::IsGlobalProcessEnviron
switch (sysno) {
case __NR_acct: // Privileged.
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_getrlimit:
#endif
-#if defined(__i386__) || defined(__arm__)
+#if defined(__i386__) || defined(__arm__) || defined(__powerpc64__)
case __NR_ugetrlimit:
#endif
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_ulimit:
#endif
case __NR_getrusage:
@@ -832,7 +854,7 @@ bool SyscallSets::IsGlobalSystemStatus(i
#endif
case __NR_sysinfo:
case __NR_uname:
-#if defined(__i386__)
+#if defined(__i386__) || defined(__powerpc64__)
case __NR_olduname:
case __NR_oldolduname:
#endif
@@ -916,7 +938,8 @@ bool SyscallSets::IsSystemVSemaphores(in
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
defined(__aarch64__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
+ defined(__powerpc64__)
// These give a lot of ambient authority and bypass the setuid sandbox.
bool SyscallSets::IsSystemVSharedMemory(int sysno) {
switch (sysno) {
@@ -947,7 +970,8 @@ bool SyscallSets::IsSystemVMessageQueue(
#endif
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
// Big system V multiplexing system call.
bool SyscallSets::IsSystemVIpc(int sysno) {
switch (sysno) {
@@ -967,7 +991,8 @@ bool SyscallSets::IsAnySystemV(int sysno
return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) ||
IsSystemVSharedMemory(sysno);
#elif defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
return IsSystemVIpc(sysno);
#endif
}
@@ -1024,7 +1049,8 @@ bool SyscallSets::IsFaNotify(int sysno)
bool SyscallSets::IsTimer(int sysno) {
switch (sysno) {
case __NR_getitimer:
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__powerpc64__)
case __NR_alarm:
#endif
case __NR_setitimer:
@@ -1103,18 +1129,22 @@ bool SyscallSets::IsMisc(int sysno) {
case __NR_syncfs:
case __NR_vhangup:
// The system calls below are not implemented.
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__powerpc64__)
case __NR_afs_syscall:
#endif
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_break:
#endif
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__powerpc64__)
case __NR_getpmsg:
#endif
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_gtty:
case __NR_idle:
case __NR_lock:
@@ -1122,20 +1152,22 @@ bool SyscallSets::IsMisc(int sysno) {
case __NR_prof:
case __NR_profil:
#endif
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__powerpc64__)
case __NR_putpmsg:
#endif
#if defined(__x86_64__)
case __NR_security:
#endif
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_stty:
#endif
-#if defined(__x86_64__)
+#if defined(__x86_64__) || defined(__powerpc64__)
case __NR_tuxcall:
#endif
-#if !defined(__aarch64__)
+#if !defined(__aarch64__) && !defined(__powerpc64__)
case __NR_vserver:
#endif
return true;
Index: chromium-136.0.7103.48/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
===================================================================
--- chromium-136.0.7103.48.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
+++ chromium-136.0.7103.48/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
@@ -46,13 +46,14 @@ class SANDBOX_EXPORT SyscallSets {
static bool IsDeniedGetOrModifySocket(int sysno);
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
// Big multiplexing system call for sockets.
static bool IsSocketCall(int sysno);
#endif
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
static bool IsNetworkSocketInformation(int sysno);
#endif
@@ -84,7 +85,8 @@ class SANDBOX_EXPORT SyscallSets {
#endif
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
defined(__aarch64__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
+ defined(__powerpc64__)
// These give a lot of ambient authority and bypass the setuid sandbox.
static bool IsSystemVSharedMemory(int sysno);
#endif
@@ -95,7 +97,8 @@ class SANDBOX_EXPORT SyscallSets {
#endif
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
// Big system V multiplexing system call.
static bool IsSystemVIpc(int sysno);
#endif
Index: chromium-136.0.7103.48/sandbox/linux/services/syscall_wrappers.cc
===================================================================
--- chromium-136.0.7103.48.orig/sandbox/linux/services/syscall_wrappers.cc
+++ chromium-136.0.7103.48/sandbox/linux/services/syscall_wrappers.cc
@@ -66,7 +66,7 @@ long sys_clone(unsigned long flags,
#if defined(ARCH_CPU_X86_64)
return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls);
#elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \
- defined(ARCH_CPU_MIPS_FAMILY)
+ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_PPC64_FAMILY)
// CONFIG_CLONE_BACKWARDS defined.
return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid);
#endif

View File

@@ -1,27 +0,0 @@
From c9043a422fb4a5a6c72aaa1b907cea5f6a3061dd Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 9 Aug 2018 19:10:24 -0500
Subject: [PATCH 1/4] sandbox/linux/bpf_dsl: Update syscall ranges for ppc64
---
sandbox/linux/bpf_dsl/linux_syscall_ranges.h | 7 +++++++
1 file changed, 7 insertions(+)
Index: chromium-128.0.6613.113/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
===================================================================
--- chromium-128.0.6613.113.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
+++ chromium-128.0.6613.113/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
@@ -56,6 +56,13 @@
#define MAX_PUBLIC_SYSCALL __NR_syscalls
#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
+#elif defined(__powerpc64__)
+
+#include <asm/unistd.h>
+#define MIN_SYSCALL 0u
+#define MAX_PUBLIC_SYSCALL 386u
+#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
+
#else
#error "Unsupported architecture"
#endif

View File

@@ -1,26 +0,0 @@
From 7468b266532bd607eb1f5292d758256d800b2eee Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Fri, 10 Aug 2018 00:23:50 -0500
Subject: [PATCH] services/service_manager/sandbox/linux: Fix TCGETS
declaration on PPC64
---
.../sandbox/linux/bpf_renderer_policy_linux.cc | 5 +++++
1 file changed, 5 insertions(+)
Index: chromium-128.0.6613.113/sandbox/policy/linux/bpf_renderer_policy_linux.cc
===================================================================
--- chromium-128.0.6613.113.orig/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+++ chromium-128.0.6613.113/sandbox/policy/linux/bpf_renderer_policy_linux.cc
@@ -15,6 +15,11 @@
#include "sandbox/linux/system_headers/linux_syscalls.h"
#include "sandbox/policy/linux/sandbox_linux.h"
+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h
+#ifdef __powerpc64__
+#include <termios.h>
+#endif
+
// TODO(vignatti): replace the local definitions below with #include
// <linux/dma-buf.h> once kernel version 4.6 becomes widely used.
#include <linux/types.h>

View File

@@ -1,11 +1,20 @@
--- a/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn
+++ b/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn
@@ -1258,6 +1258,8 @@
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,11 +0,0 @@
--- chromium-142.0.7444.52/third_party/highway/src/hwy/targets.cc 2025/10/24 14:08:16 1.1
+++ chromium-142.0.7444.52/third_party/highway/src/hwy/targets.cc 2025/10/24 14:09:30
@@ -26,7 +26,7 @@
#if HWY_ARCH_X86
#include <xmmintrin.h>
-#elif (HWY_ARCH_ARM || HWY_ARCH_PPC || HWY_ARCH_S390X || HWY_ARCH_RISCV || \
+#elif (HWY_ARCH_ARM || HWY_ARCH_S390X || HWY_ARCH_RISCV || \
HWY_ARCH_LOONGARCH) && \
HWY_OS_LINUX
// sys/auxv.h does not always include asm/hwcap.h, or define HWCAP*, hence we

View File

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

View File

@@ -8,11 +8,11 @@ Subject: [PATCH] third_party/libvpx: Properly generate gni on ppc64
third_party/libvpx/generate_gni.sh | 10 ++++++++++
2 files changed, 12 insertions(+)
Index: chromium-128.0.6613.113/third_party/libvpx/BUILD.gn
Index: chromium-144.0.7559.59/third_party/libvpx/BUILD.gn
===================================================================
--- chromium-128.0.6613.113.orig/third_party/libvpx/BUILD.gn
+++ chromium-128.0.6613.113/third_party/libvpx/BUILD.gn
@@ -320,6 +320,8 @@ if (current_cpu == "x86" || (current_cpu
--- 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

View File

@@ -8,10 +8,10 @@ Subject: [PATCH] third_party/pffft: Include altivec.h on ppc64 with SIMD
third_party/pffft/src/pffft.c | 1 +
1 file changed, 1 insertion(+)
Index: chromium-128.0.6613.113/third_party/pffft/src/pffft.c
Index: chromium-144.0.7559.59/third_party/pffft/src/pffft.c
===================================================================
--- chromium-128.0.6613.113.orig/third_party/pffft/src/pffft.c
+++ chromium-128.0.6613.113/third_party/pffft/src/pffft.c
--- 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
*/

View File

@@ -1,7 +1,7 @@
Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/bcm/aesp8-ppc-linux.S
Index: chromium-144.0.7559.59/third_party/boringssl/src/gen/bcm/aesp8-ppc-linux.S
===================================================================
--- /dev/null
+++ chromium-136.0.7103.48/third_party/boringssl/src/gen/bcm/aesp8-ppc-linux.S
+++ chromium-144.0.7559.59/third_party/boringssl/src/gen/bcm/aesp8-ppc-linux.S
@@ -0,0 +1,3673 @@
+// This file is generated from a similarly-named Perl script in the BoringSSL
+// source tree. Do not edit by hand.
@@ -3676,10 +3676,10 @@ Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/bcm/aesp8-ppc-linux.
+// See https://www.airs.ccom/blog/archives/518.
+.section .note.GNU-stack,"",%progbits
+#endif
Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/bcm/ghashp8-ppc-linux.S
Index: chromium-144.0.7559.59/third_party/boringssl/src/gen/bcm/ghashp8-ppc-linux.S
===================================================================
--- /dev/null
+++ chromium-136.0.7103.48/third_party/boringssl/src/gen/bcm/ghashp8-ppc-linux.S
+++ chromium-144.0.7559.59/third_party/boringssl/src/gen/bcm/ghashp8-ppc-linux.S
@@ -0,0 +1,590 @@
+// This file is generated from a similarly-named Perl script in the BoringSSL
+// source tree. Do not edit by hand.
@@ -4271,11 +4271,11 @@ Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/bcm/ghashp8-ppc-linu
+// See https://www.airs.ccom/blog/archives/518.
+.section .note.GNU-stack,"",%progbits
+#endif
Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/sources.cmake
Index: chromium-144.0.7559.59/third_party/boringssl/src/gen/sources.cmake
===================================================================
--- chromium-136.0.7103.48.orig/third_party/boringssl/src/gen/sources.cmake
+++ chromium-136.0.7103.48/third_party/boringssl/src/gen/sources.cmake
@@ -120,6 +120,7 @@ set(
--- chromium-144.0.7559.59.orig/third_party/boringssl/src/gen/sources.cmake
+++ chromium-144.0.7559.59/third_party/boringssl/src/gen/sources.cmake
@@ -122,6 +122,7 @@ set(
gen/bcm/aesni-x86-linux.S
gen/bcm/aesni-x86_64-apple.S
gen/bcm/aesni-x86_64-linux.S
@@ -4283,7 +4283,7 @@ Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/sources.cmake
gen/bcm/aesv8-armv7-linux.S
gen/bcm/aesv8-armv8-apple.S
gen/bcm/aesv8-armv8-linux.S
@@ -151,6 +152,7 @@ set(
@@ -153,6 +154,7 @@ set(
gen/bcm/ghash-x86-linux.S
gen/bcm/ghash-x86_64-apple.S
gen/bcm/ghash-x86_64-linux.S
@@ -4291,7 +4291,7 @@ Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/sources.cmake
gen/bcm/ghashv8-armv7-linux.S
gen/bcm/ghashv8-armv8-apple.S
gen/bcm/ghashv8-armv8-linux.S
@@ -347,6 +349,7 @@ set(
@@ -352,6 +354,7 @@ set(
crypto/cpu_arm_freebsd.cc
crypto/cpu_arm_linux.cc
crypto/cpu_intel.cc
@@ -4299,7 +4299,7 @@ Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/sources.cmake
crypto/crypto.cc
crypto/curve25519/curve25519.cc
crypto/curve25519/curve25519_64_adx.cc
@@ -2864,6 +2867,7 @@ set(
@@ -2980,6 +2983,7 @@ set(
gen/test_support/trampoline-armv8-apple.S
gen/test_support/trampoline-armv8-linux.S
gen/test_support/trampoline-armv8-win.S
@@ -4307,11 +4307,11 @@ Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/sources.cmake
gen/test_support/trampoline-x86-apple.S
gen/test_support/trampoline-x86-linux.S
gen/test_support/trampoline-x86_64-apple.S
Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/sources.json
Index: chromium-144.0.7559.59/third_party/boringssl/src/gen/sources.json
===================================================================
--- chromium-136.0.7103.48.orig/third_party/boringssl/src/gen/sources.json
+++ chromium-136.0.7103.48/third_party/boringssl/src/gen/sources.json
@@ -98,6 +98,7 @@
--- chromium-144.0.7559.59.orig/third_party/boringssl/src/gen/sources.json
+++ chromium-144.0.7559.59/third_party/boringssl/src/gen/sources.json
@@ -100,6 +100,7 @@
"gen/bcm/aesni-x86-linux.S",
"gen/bcm/aesni-x86_64-apple.S",
"gen/bcm/aesni-x86_64-linux.S",
@@ -4319,7 +4319,7 @@ Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/sources.json
"gen/bcm/aesv8-armv7-linux.S",
"gen/bcm/aesv8-armv8-apple.S",
"gen/bcm/aesv8-armv8-linux.S",
@@ -129,6 +130,7 @@
@@ -131,6 +132,7 @@
"gen/bcm/ghash-x86-linux.S",
"gen/bcm/ghash-x86_64-apple.S",
"gen/bcm/ghash-x86_64-linux.S",
@@ -4327,7 +4327,7 @@ Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/sources.json
"gen/bcm/ghashv8-armv7-linux.S",
"gen/bcm/ghashv8-armv8-apple.S",
"gen/bcm/ghashv8-armv8-linux.S",
@@ -317,6 +319,7 @@
@@ -322,6 +324,7 @@
"crypto/cpu_arm_freebsd.cc",
"crypto/cpu_arm_linux.cc",
"crypto/cpu_intel.cc",
@@ -4335,7 +4335,7 @@ Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/sources.json
"crypto/crypto.cc",
"crypto/curve25519/curve25519.cc",
"crypto/curve25519/curve25519_64_adx.cc",
@@ -2784,6 +2787,7 @@
@@ -2892,6 +2895,7 @@
"gen/test_support/trampoline-armv8-apple.S",
"gen/test_support/trampoline-armv8-linux.S",
"gen/test_support/trampoline-armv8-win.S",
@@ -4343,10 +4343,10 @@ Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/sources.json
"gen/test_support/trampoline-x86-apple.S",
"gen/test_support/trampoline-x86-linux.S",
"gen/test_support/trampoline-x86_64-apple.S",
Index: chromium-136.0.7103.48/third_party/boringssl/src/gen/test_support/trampoline-ppc-linux.S
Index: chromium-144.0.7559.59/third_party/boringssl/src/gen/test_support/trampoline-ppc-linux.S
===================================================================
--- /dev/null
+++ chromium-136.0.7103.48/third_party/boringssl/src/gen/test_support/trampoline-ppc-linux.S
+++ chromium-144.0.7559.59/third_party/boringssl/src/gen/test_support/trampoline-ppc-linux.S
@@ -0,0 +1,1413 @@
+// This file is generated from a similarly-named Perl script in the BoringSSL
+// source tree. Do not edit by hand.

View File

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

View File

@@ -1,21 +0,0 @@
From 82922bf486e9926a171152f61030dfcd53f017b8 Mon Sep 17 00:00:00 2001
From: Timothy Pearson <tpearson@raptorengineering.com>
Date: Thu, 30 Aug 2018 17:32:05 -0500
Subject: [PATCH] Include cstddef to fix build
size_t is not defined unless cstddef is included.
---
third_party/crashpad/crashpad/compat/linux/sys/user.h | 1 +
Index: chromium-127.0.6533.72/third_party/crashpad/crashpad/compat/linux/sys/user.h
===================================================================
--- chromium-127.0.6533.72.orig/third_party/crashpad/crashpad/compat/linux/sys/user.h
+++ chromium-127.0.6533.72/third_party/crashpad/crashpad/compat/linux/sys/user.h
@@ -15,6 +15,7 @@
#ifndef CRASHPAD_COMPAT_LINUX_SYS_USER_H_
#define CRASHPAD_COMPAT_LINUX_SYS_USER_H_
+#include <cstddef>
#include_next <sys/user.h>
#include <features.h>

File diff suppressed because it is too large Load Diff

View File

@@ -1,76 +0,0 @@
From 3c4705bfdda45feb860a1f121631773e5fe8e53f Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 9 Aug 2018 19:11:26 -0500
Subject: [PATCH 1/4] sandbox/linux/bpf_dsl: Modify seccomp_macros to add
support for ppc64
---
sandbox/linux/bpf_dsl/seccomp_macros.h | 43 ++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
Index: chromium-128.0.6613.113/sandbox/linux/bpf_dsl/seccomp_macros.h
===================================================================
--- chromium-128.0.6613.113.orig/sandbox/linux/bpf_dsl/seccomp_macros.h
+++ chromium-128.0.6613.113/sandbox/linux/bpf_dsl/seccomp_macros.h
@@ -14,6 +14,9 @@
#if defined(__mips__)
// sys/user.h in eglibc misses size_t definition
#include <stddef.h>
+#elif defined(__powerpc64__)
+// Manually define greg_t on ppc64
+typedef unsigned long long greg_t;
#endif
#endif
@@ -343,6 +346,51 @@ struct regs_struct {
#define SECCOMP_PT_PARM4(_regs) (_regs).regs[3]
#define SECCOMP_PT_PARM5(_regs) (_regs).regs[4]
#define SECCOMP_PT_PARM6(_regs) (_regs).regs[5]
+
+#elif defined(__powerpc64__)
+#include <asm/ptrace.h>
+
+typedef struct pt_regs regs_struct;
+
+#ifdef ARCH_CPU_LITTLE_ENDIAN
+#define SECCOMP_ARCH AUDIT_ARCH_PPC64LE
+#else
+#define SECCOMP_ARCH AUDIT_ARCH_PPC64
+#endif
+
+#define SECCOMP_REG(_ctx, _reg) ((_ctx)->uc_mcontext.regs->gpr[_reg])
+
+#define SECCOMP_RESULT(_ctx) SECCOMP_REG(_ctx, 3)
+#define SECCOMP_SYSCALL(_ctx) SECCOMP_REG(_ctx, 0)
+#define SECCOMP_IP(_ctx) (_ctx)->uc_mcontext.regs->nip
+#define SECCOMP_PARM1(_ctx) SECCOMP_REG(_ctx, 3)
+#define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, 4)
+#define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, 5)
+#define SECCOMP_PARM4(_ctx) SECCOMP_REG(_ctx, 6)
+#define SECCOMP_PARM5(_ctx) SECCOMP_REG(_ctx, 7)
+#define SECCOMP_PARM6(_ctx) SECCOMP_REG(_ctx, 8)
+
+#define SECCOMP_NR_IDX (offsetof(struct arch_seccomp_data, nr))
+#define SECCOMP_ARCH_IDX (offsetof(struct arch_seccomp_data, arch))
+#define SECCOMP_IP_MSB_IDX \
+ (offsetof(struct arch_seccomp_data, instruction_pointer) + 4)
+#define SECCOMP_IP_LSB_IDX \
+ (offsetof(struct arch_seccomp_data, instruction_pointer) + 0)
+#define SECCOMP_ARG_MSB_IDX(nr) \
+ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 4)
+#define SECCOMP_ARG_LSB_IDX(nr) \
+ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 0)
+
+#define SECCOMP_PT_RESULT(_regs) (_regs).gpr[3]
+#define SECCOMP_PT_SYSCALL(_regs) (_regs).gpr[0]
+#define SECCOMP_PT_IP(_regs) (_regs).nip
+#define SECCOMP_PT_PARM1(_regs) (_regs).gpr[3]
+#define SECCOMP_PT_PARM2(_regs) (_regs).gpr[4]
+#define SECCOMP_PT_PARM3(_regs) (_regs).gpr[5]
+#define SECCOMP_PT_PARM4(_regs) (_regs).gpr[6]
+#define SECCOMP_PT_PARM5(_regs) (_regs).gpr[7]
+#define SECCOMP_PT_PARM6(_regs) (_regs).gpr[8]
+
#else
#error Unsupported target platform

View File

@@ -1,8 +1,10 @@
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h 2025/05/14 22:49:40 1.1
Index: chromium-145.0.7632.45/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
===================================================================
--- chromium-145.0.7632.45.orig/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 2025 The WebM project authors. All Rights Reserved.
- * Copyright (c) 2026 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
@@ -187,11 +189,13 @@
-#endif
-
-#endif // VP8_RTCD_H_
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h 2025/05/14 22:49:40 1.1
Index: chromium-145.0.7632.45/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
===================================================================
--- chromium-145.0.7632.45.orig/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2025 The WebM project authors. All Rights Reserved.
- * Copyright (c) 2026 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
@@ -309,9 +313,11 @@
-#endif
-
-#endif // VP9_RTCD_H_
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm 2025/05/14 22:49:40 1.1
Index: chromium-145.0.7632.45/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
===================================================================
--- chromium-145.0.7632.45.orig/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
+++ /dev/null
@@ -1,107 +0,0 @@
@@ -1,108 +0,0 @@
-@ This file was created from a .asm file
-@ using the ads2gas.pl script.
-.syntax unified
@@ -354,6 +360,7 @@
-.equ HAVE_LASX , 0
-.equ HAVE_VPX_PORTS , 1
-.equ HAVE_PTHREAD_H , 1
-.equ HAVE_PTHREAD_SETNAME_NP , 1
-.equ HAVE_UNISTD_H , 0
-.equ CONFIG_DEPENDENCY_TRACKING , 1
-.equ CONFIG_EXTERNAL_BUILD , 1
@@ -419,7 +426,9 @@
-.equ DECODE_WIDTH_LIMIT , 16384
-.equ DECODE_HEIGHT_LIMIT , 16384
- .section .note.GNU-stack,"",%progbits
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/config/linux/ppc64/vpx_config.c 2025/05/14 22:49:40 1.1
Index: chromium-145.0.7632.45/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
===================================================================
--- chromium-145.0.7632.45.orig/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */
@@ -432,9 +441,11 @@
-#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=ppc64le-linux-gcc --enable-external-build --enable-postproc --enable-multi-res-encoding --enable-temporal-denoising --enable-vp9-temporal-denoising --enable-vp9-postproc --size-limit=16384x16384 --enable-realtime-only --disable-install-docs --disable-libyuv --enable-unit-tests";
-const char *vpx_codec_build_config(void) {return cfg;}
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/config/linux/ppc64/vpx_config.h 2025/05/14 22:49:40 1.1
Index: chromium-145.0.7632.45/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
===================================================================
--- chromium-145.0.7632.45.orig/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
+++ /dev/null
@@ -1,116 +0,0 @@
@@ -1,117 +0,0 @@
-/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */
-/* */
-/* Use of this source code is governed by a BSD-style license */
@@ -486,6 +497,7 @@
-#define HAVE_LASX 0
-#define HAVE_VPX_PORTS 1
-#define HAVE_PTHREAD_H 1
-#define HAVE_PTHREAD_SETNAME_NP 1
-#define HAVE_UNISTD_H 0
-#define CONFIG_DEPENDENCY_TRACKING 1
-#define CONFIG_EXTERNAL_BUILD 1
@@ -551,11 +563,13 @@
-#define DECODE_WIDTH_LIMIT 16384
-#define DECODE_HEIGHT_LIMIT 16384
-#endif /* VPX_CONFIG_H */
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h 2025/05/14 22:49:40 1.1
Index: chromium-145.0.7632.45/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
===================================================================
--- chromium-145.0.7632.45.orig/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
+++ /dev/null
@@ -1,858 +0,0 @@
-/*
- * Copyright (c) 2025 The WebM project authors. All Rights Reserved.
- * Copyright (c) 2026 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
@@ -1412,11 +1426,13 @@
-#endif
-
-#endif // VPX_DSP_RTCD_H_
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h 2025/05/14 22:49:40 1.1
Index: chromium-145.0.7632.45/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
===================================================================
--- chromium-145.0.7632.45.orig/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2025 The WebM project authors. All Rights Reserved.
- * Copyright (c) 2026 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source

View File

@@ -1,7 +1,7 @@
Index: chromium-136.0.7103.48/third_party/lss/linux_syscall_support.h
Index: chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
===================================================================
--- chromium-136.0.7103.48.orig/third_party/lss/linux_syscall_support.h
+++ chromium-136.0.7103.48/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.
*/
@@ -11,7 +11,7 @@ Index: chromium-136.0.7103.48/third_party/lss/linux_syscall_support.h
defined(__aarch64__) || defined(__s390__) || defined(__e2k__) || \
(defined(__riscv) && __riscv_xlen == 64) || defined(__loongarch_lp64)) \
&& (defined(__linux) || defined(__ANDROID__))
@@ -398,7 +398,7 @@ struct kernel_stat64 {
@@ -400,7 +400,7 @@ struct kernel_stat64 {
unsigned __pad2;
unsigned long long st_blocks;
};
@@ -20,7 +20,7 @@ Index: chromium-136.0.7103.48/third_party/lss/linux_syscall_support.h
struct kernel_stat64 {
unsigned long long st_dev;
unsigned long long st_ino;
@@ -420,6 +420,28 @@ struct kernel_stat64 {
@@ -422,6 +422,28 @@ struct kernel_stat64 {
unsigned long __unused4;
unsigned long __unused5;
};
@@ -49,7 +49,7 @@ Index: chromium-136.0.7103.48/third_party/lss/linux_syscall_support.h
#elif defined(__e2k__)
struct kernel_stat64 {
unsigned long long st_dev;
@@ -536,7 +558,7 @@ struct kernel_stat {
@@ -538,7 +560,7 @@ struct kernel_stat {
uint64_t st_ctime_nsec_;
int64_t __unused4[3];
};
@@ -58,7 +58,7 @@ Index: chromium-136.0.7103.48/third_party/lss/linux_syscall_support.h
typedef unsigned long kernel_blkcnt_t;
typedef unsigned long kernel_blksize_t;
typedef unsigned kernel_dev_t;
@@ -567,6 +589,37 @@ struct kernel_stat {
@@ -569,6 +591,37 @@ struct kernel_stat {
unsigned long __unused4;
unsigned long __unused5;
};
@@ -96,7 +96,7 @@ Index: chromium-136.0.7103.48/third_party/lss/linux_syscall_support.h
#elif (defined(__mips__) && _MIPS_SIM != _MIPS_SIM_ABI64)
typedef int kernel_blkcnt_t;
typedef int kernel_blksize_t;
@@ -1823,6 +1876,28 @@ struct kernel_statx {
@@ -1825,6 +1878,28 @@ struct kernel_statx {
#ifndef __NR_getcpu
#define __NR_getcpu 302
#endif
@@ -125,7 +125,7 @@ Index: chromium-136.0.7103.48/third_party/lss/linux_syscall_support.h
/* End of powerpc definitions */
#elif defined(__s390__)
#ifndef __NR_quotactl
@@ -4824,7 +4899,7 @@ struct kernel_statx {
@@ -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
@@ -134,7 +134,7 @@ Index: chromium-136.0.7103.48/third_party/lss/linux_syscall_support.h
#undef LSS_SC_LOADARGS_0
#define LSS_SC_LOADARGS_0(dummy...)
#undef LSS_SC_LOADARGS_1
@@ -5214,7 +5289,11 @@ struct kernel_statx {
@@ -5216,7 +5291,11 @@ struct kernel_statx {
#endif
#if !defined(__NR_pipe)

View File

@@ -1,37 +0,0 @@
From cca78240860abb63bbcfe94d1e5f04a1f23c527d Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 9 Aug 2018 19:11:56 -0500
Subject: [PATCH 3/4] sandbox/linux/system_headers: Update linux seccomp header
for ppc64
---
sandbox/linux/system_headers/linux_seccomp.h | 10 ++++++++++
1 file changed, 10 insertions(+)
Index: chromium-128.0.6613.113/sandbox/linux/system_headers/linux_seccomp.h
===================================================================
--- chromium-128.0.6613.113.orig/sandbox/linux/system_headers/linux_seccomp.h
+++ chromium-128.0.6613.113/sandbox/linux/system_headers/linux_seccomp.h
@@ -38,6 +38,9 @@
#ifndef EM_AARCH64
#define EM_AARCH64 183
#endif
+#ifndef EM_PPC64
+#define EM_PPC64 21
+#endif
#ifndef __AUDIT_ARCH_64BIT
#define __AUDIT_ARCH_64BIT 0x80000000
@@ -70,6 +73,12 @@
#ifndef AUDIT_ARCH_AARCH64
#define AUDIT_ARCH_AARCH64 (EM_AARCH64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE)
#endif
+#ifndef AUDIT_ARCH_PPC64
+#define AUDIT_ARCH_PPC64 (EM_PPC64 | __AUDIT_ARCH_64BIT)
+#endif
+#ifndef AUDIT_ARCH_PPC64LE
+#define AUDIT_ARCH_PPC64LE (EM_PPC64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE)
+#endif
// For prctl.h
#ifndef PR_SET_SECCOMP

View File

@@ -1,7 +1,7 @@
Index: chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
===================================================================
--- /dev/null
+++ chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
@@ -0,0 +1,316 @@
+// This file is generated. Do not edit.
+#ifndef VP8_RTCD_H_
@@ -319,10 +319,10 @@ Index: chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vp8_r
+#endif
+
+#endif
Index: chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
===================================================================
--- /dev/null
+++ chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
@@ -0,0 +1,267 @@
+// This file is generated. Do not edit.
+#ifndef VP9_RTCD_H_
@@ -591,10 +591,10 @@ Index: chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vp9_r
+#endif
+
+#endif
Index: chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
===================================================================
--- /dev/null
+++ chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
@@ -0,0 +1,107 @@
+@ This file was created from a .asm file
+@ using the ads2gas.pl script.
@@ -703,10 +703,10 @@ Index: chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vpx_c
+.equ DECODE_WIDTH_LIMIT , 16384
+.equ DECODE_HEIGHT_LIMIT , 16384
+ .section .note.GNU-stack,"",%progbits
Index: chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
===================================================================
--- /dev/null
+++ chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
@@ -0,0 +1,10 @@
+/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */
+/* */
@@ -718,10 +718,10 @@ Index: chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vpx_c
+#include "vpx/vpx_codec.h"
+static const char* const cfg = "--target=generic-gnu --enable-vp9-highbitdepth --enable-external-build --enable-postproc --enable-multi-res-encoding --enable-temporal-denoising --enable-vp9-temporal-denoising --enable-vp9-postproc --size-limit=16384x16384 --enable-realtime-only --disable-install-docs --disable-libyuv";
+const char *vpx_codec_build_config(void) {return cfg;}
Index: chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
===================================================================
--- /dev/null
+++ chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
@@ -0,0 +1,116 @@
+/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */
+/* */
@@ -839,10 +839,10 @@ Index: chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vpx_c
+#define DECODE_WIDTH_LIMIT 16384
+#define DECODE_HEIGHT_LIMIT 16384
+#endif /* VPX_CONFIG_H */
Index: chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
===================================================================
--- /dev/null
+++ chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
@@ -0,0 +1,4128 @@
+// This file is generated. Do not edit.
+#ifndef VPX_DSP_RTCD_H_
@@ -4972,10 +4972,10 @@ Index: chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vpx_d
+#endif
+
+#endif
Index: chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
===================================================================
--- /dev/null
+++ chromium-136.0.7103.48/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
@@ -0,0 +1,96 @@
+// This file is generated. Do not edit.
+#ifndef VPX_SCALE_RTCD_H_

View File

@@ -1,23 +0,0 @@
From 298df3dc44f7121cd8cb9a06b29fa3b16c959b8d Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 9 Aug 2018 19:13:25 -0500
Subject: [PATCH 4/4] sandbox/linux/system_headers: Update linux signal header
for ppc64
---
sandbox/linux/system_headers/linux_signal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: chromium-128.0.6613.113/sandbox/linux/system_headers/linux_signal.h
===================================================================
--- chromium-128.0.6613.113.orig/sandbox/linux/system_headers/linux_signal.h
+++ chromium-128.0.6613.113/sandbox/linux/system_headers/linux_signal.h
@@ -13,7 +13,7 @@
// (not undefined, but defined different values and in different memory
// layouts). So, fill the gap here.
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
#define LINUX_SIGHUP 1
#define LINUX_SIGINT 2

View File

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

View File

@@ -1,7 +1,7 @@
Index: chromium-136.0.7103.48/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
===================================================================
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
+++ chromium-136.0.7103.48/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));
}
@@ -137,10 +137,10 @@ Index: chromium-136.0.7103.48/third_party/libvpx/source/libvpx/vp9/encoder/ppc/v
eob = vec_max(eob, vec_or(scan0, zero_coeff0));
eob2 = vec_max(vec_or(scan1, zero_coeff1), vec_or(scan2, zero_coeff2));
Index: chromium-136.0.7103.48/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
===================================================================
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
+++ chromium-136.0.7103.48/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"
@@ -255,10 +255,10 @@ Index: chromium-136.0.7103.48/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct3
}
// Returns 1 if negative 0 if positive
Index: chromium-136.0.7103.48/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
===================================================================
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
+++ chromium-136.0.7103.48/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"

View File

@@ -1,107 +0,0 @@
From 1d44643a7c7cf650efd1093d22cd5bf859fdcb51 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 9 Aug 2018 20:52:13 -0500
Subject: [PATCH] sandbox/linux/seccomp-bpf: Add ppc64 syscall stub
---
sandbox/linux/seccomp-bpf/syscall.cc | 53 ++++++++++++++++++++++++++--
1 file changed, 51 insertions(+), 2 deletions(-)
Index: chromium-128.0.6613.113/sandbox/linux/seccomp-bpf/syscall.cc
===================================================================
--- chromium-128.0.6613.113.orig/sandbox/linux/seccomp-bpf/syscall.cc
+++ chromium-128.0.6613.113/sandbox/linux/seccomp-bpf/syscall.cc
@@ -23,7 +23,7 @@ namespace sandbox {
namespace {
#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
- defined(ARCH_CPU_MIPS_FAMILY)
+ defined(ARCH_CPU_MIPS_FAMILY) || defined (ARCH_CPU_PPC64_FAMILY)
// Number that's not currently used by any Linux kernel ABIs.
const int kInvalidSyscallNumber = 0x351d3;
#else
@@ -313,10 +313,54 @@ asm(// We need to be able to tell the ke
"2:ret\n"
".cfi_endproc\n"
".size SyscallAsm, .-SyscallAsm\n"
+#elif defined(__powerpc64__)
+ ".text\n"
+ ".align 4\n"
+ ".type SyscallAsm @function\n"
+ "SyscallAsm:\n"
+ ".cfi_startproc\n"
+
+ // Check if r3 is negative
+ "cmpdi 3, 0\n"
+ "bgt 2f\n"
+
+ // Load address of 3f into r3 and return
+ "mflr 10\n"
+ "bl 1f\n"
+ "1: mflr 3\n"
+ "mtlr 10\n"
+ "addi 3, 3, 4*13\n"
+ "blr\n"
+
+ // Load arguments from array into r3-8
+ // save param 3 in r10
+ "2:\n"
+ "mr 0, 3\n"
+ "ld 3, 0(4)\n"
+ "ld 5, 16(4)\n"
+ "ld 6, 24(4)\n"
+ "ld 7, 32(4)\n"
+ "ld 8, 40(4)\n"
+ "ld 4, 8(4)\n"
+ "li 9, 0\n"
+
+ // Enter kernel
+ "sc\n"
+
+ // Magic return address
+ "3:\n"
+ // Like MIPS, ppc64 return values are always positive.
+ // Check for error in cr0.SO and negate upon error
+ "bc 4, 3, 4f\n"
+ "neg 3, 3\n"
+ "4: blr\n"
+
+ ".cfi_endproc\n"
+ ".size SyscallAsm, .-SyscallAsm\n"
#endif
); // asm
-#if defined(__x86_64__)
+#if defined(__x86_64__) || defined(__powerpc64__)
extern "C" {
intptr_t SyscallAsm(intptr_t nr, const intptr_t args[6]);
}
@@ -430,6 +474,8 @@ intptr_t Syscall::Call(int nr,
ret = inout;
}
+#elif defined(__powerpc64__)
+ intptr_t ret = SyscallAsm(nr, args);
#else
#error "Unimplemented architecture"
#endif
@@ -446,8 +492,18 @@ void Syscall::PutValueInUcontext(intptr_
// needs to be changed back.
ret_val = -ret_val;
SECCOMP_PARM4(ctx) = 1;
- } else
+ } else {
SECCOMP_PARM4(ctx) = 0;
+ }
+#endif
+#if defined(__powerpc64__)
+ // Same as MIPS, need to invert ret and set error register (cr0.SO)
+ if (ret_val <= -1 && ret_val >= -4095) {
+ ret_val = -ret_val;
+ ctx->uc_mcontext.regs->ccr |= (1 << 28);
+ } else {
+ ctx->uc_mcontext.regs->ccr &= ~(1 << 28);
+ }
#endif
SECCOMP_RESULT(ctx) = static_cast<greg_t>(ret_val);
}

View File

@@ -1,24 +0,0 @@
From 6a852c4135864ba87b3cbdd0880d7cfecf7cd654 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 13 Sep 2018 15:12:22 -0500
Subject: [PATCH 5/6] sandbox/linux: update unit test for ppc64
---
sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: chromium-128.0.6613.113/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
===================================================================
--- chromium-128.0.6613.113.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
+++ chromium-128.0.6613.113/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
@@ -352,8 +352,10 @@
#if !defined(__aarch64__)
TEST_BASELINE_SIGSYS(__NR_inotify_init)
+#if !defined(__powerpc64__)
TEST_BASELINE_SIGSYS(__NR_vserver)
#endif
+#endif
#if defined(LIBC_GLIBC) && !BUILDFLAG(IS_CHROMEOS)
BPF_TEST_C(BaselinePolicy, FutexEINVAL, BaselinePolicy) {

View File

@@ -1,14 +0,0 @@
Index: chromium-128.0.6613.113/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
===================================================================
--- chromium-128.0.6613.113.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ chromium-128.0.6613.113/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -374,7 +374,9 @@ bool SyscallSets::IsAllowedSignalHandlin
#if defined(__i386__) || defined(__arm__) || \
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
defined(__powerpc64__)
+#if !defined(__powerpc64__)
case __NR_rt_sigtimedwait_time64:
+#endif
case __NR_sigaction:
case __NR_sigprocmask:
case __NR_sigreturn:

View File

@@ -1,33 +0,0 @@
Index: chromium-128.0.6613.113/sandbox/linux/system_headers/linux_stat.h
===================================================================
--- chromium-128.0.6613.113.orig/sandbox/linux/system_headers/linux_stat.h
+++ chromium-128.0.6613.113/sandbox/linux/system_headers/linux_stat.h
@@ -173,6 +173,28 @@ struct kernel_stat {
unsigned int __unused4;
unsigned int __unused5;
};
+#elif defined(__powerpc64__)
+struct kernel_stat {
+ unsigned long st_dev;
+ ino_t st_ino;
+ unsigned long st_nlink;
+ mode_t st_mode;
+ uid_t st_uid;
+ gid_t st_gid;
+ unsigned long st_rdev;
+ long st_size;
+ unsigned long st_blksize;
+ unsigned long st_blocks;
+ // unsigned long st_atime;
+ unsigned long st_atime_nsec;
+ //unsigned long st_mtime;
+ unsigned long st_mtime_nsec;
+ //unsigned long st_ctime;
+ unsigned long st_ctime_nsec;
+ unsigned long __unused4;
+ unsigned long __unused5;
+ unsigned long __unused6;
+};
#endif
#if !defined(AT_EMPTY_PATH)

View File

@@ -1,90 +0,0 @@
Index: chromium-134.0.6998.35/sandbox/policy/linux/bpf_utility_policy_linux.cc
===================================================================
--- chromium-134.0.6998.35.orig/sandbox/policy/linux/bpf_utility_policy_linux.cc
+++ chromium-134.0.6998.35/sandbox/policy/linux/bpf_utility_policy_linux.cc
@@ -34,7 +34,7 @@ ResultExpr UtilityProcessPolicy::Evaluat
case __NR_fdatasync:
case __NR_fsync:
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_getrlimit:
#endif
#if defined(__i386__) || defined(__arm__)
Index: chromium-134.0.6998.35/sandbox/policy/linux/bpf_renderer_policy_linux.cc
===================================================================
--- chromium-134.0.6998.35.orig/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+++ chromium-134.0.6998.35/sandbox/policy/linux/bpf_renderer_policy_linux.cc
@@ -90,7 +90,7 @@ ResultExpr RendererProcessPolicy::Evalua
case __NR_ftruncate64:
#endif
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_getrlimit:
case __NR_setrlimit:
// We allow setrlimit to dynamically adjust the address space limit as
Index: chromium-134.0.6998.35/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
===================================================================
--- chromium-134.0.6998.35.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
+++ chromium-134.0.6998.35/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
@@ -58,9 +58,9 @@
#elif defined(__powerpc64__)
-#include <asm/unistd.h>
+#include <asm-generic/unistd.h>
#define MIN_SYSCALL 0u
-#define MAX_PUBLIC_SYSCALL 386u
+#define MAX_PUBLIC_SYSCALL __NR_syscalls
#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
#else
Index: chromium-134.0.6998.35/sandbox/linux/services/credentials.cc
===================================================================
--- chromium-134.0.6998.35.orig/sandbox/linux/services/credentials.cc
+++ chromium-134.0.6998.35/sandbox/linux/services/credentials.cc
@@ -96,7 +96,8 @@ bool ChrootToSafeEmptyDir() {
int clone_flags = CLONE_FS | LINUX_SIGCHLD;
void* tls = nullptr;
-#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY)) && \
+#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY) || \
+ defined(ARCH_CPU_PPC64_FAMILY)) && \
!defined(MEMORY_SANITIZER)
// Use CLONE_VM | CLONE_VFORK as an optimization to avoid copying page tables.
// Since clone writes to the new child's TLS before returning, we must set a
@@ -104,6 +105,11 @@ bool ChrootToSafeEmptyDir() {
// glibc performs syscalls by calling a function pointer in TLS, so we do not
// attempt this optimization.
// TODO(crbug.com/40196869) Broken in MSan builds after LLVM f1bb30a4956f.
+ //
+ // NOTE: Without CLONE_VM, fontconfig will attempt to reload configuration
+ // in every thread. Since the rendered threads are sandboxed without
+ // filesystem access (e.g. to /etc/fonts/fonts.conf) this will cause font
+ // configuration loading failures and no fonts will be displayed!
clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
char tls_buf[PTHREAD_STACK_MIN_CONST] = {};
Index: chromium-134.0.6998.35/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
===================================================================
--- chromium-134.0.6998.35.orig/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
+++ chromium-134.0.6998.35/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
@@ -362,7 +362,16 @@ intptr_t SIGSYSFstatatHandler(const stru
if (args.nr == __NR_fstatat_default) {
if (*reinterpret_cast<const char*>(args.args[1]) == '\0' &&
args.args[3] == static_cast<uint64_t>(AT_EMPTY_PATH)) {
- return syscall(__NR_fstat_default, static_cast<int>(args.args[0]),
+ int fd = static_cast<int>(args.args[0]);
+#if defined(__powerpc64__)
+ // On ppc64+glibc, some syscalls seem to accidentally negate the first
+ // parameter which causes checks against it to fail. For now, manually
+ // negate them back.
+ // TODO: Investigate the root cause and fix in glibc
+ if (fd < 0)
+ fd = -fd;
+#endif
+ return syscall(__NR_fstat_default, fd,
reinterpret_cast<default_stat_struct*>(args.args[2]));
}
return -reinterpret_cast<intptr_t>(fs_denied_errno);

View File

@@ -0,0 +1,15 @@
--- a/sandbox/linux/syscall_broker/broker_host.cc
+++ b/sandbox/linux/syscall_broker/broker_host.cc
@@ -287,7 +287,12 @@
return;
}
RAW_CHECK(reply->AddIntToMessage(0));
+#ifdef __powerpc64__
+ // kernel stat can be padded, triggering std::has_unique_object_representations_v to return false
+ RAW_CHECK(reply->AddDataToMessage(base::byte_span_from_ref(base::allow_nonunique_obj, sb)));
+#else
RAW_CHECK(reply->AddDataToMessage(base::byte_span_from_ref(sb)));
+#endif
} else {
#if defined(__NR_fstatat64)
DCHECK(command_type == COMMAND_STAT64);

View File

@@ -1,7 +1,8 @@
diff -up chromium-131.0.6778.69/base/compiler_specific.h.me chromium-131.0.6778.69/base/compiler_specific.h
--- chromium-131.0.6778.69/base/compiler_specific.h.me 2024-11-19 20:44:12.404060581 +0100
+++ chromium-131.0.6778.69/base/compiler_specific.h 2024-11-19 20:44:54.434121935 +0100
@@ -152,7 +152,7 @@
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.
// }
// ```
@@ -10,15 +11,3 @@ diff -up chromium-131.0.6778.69/base/compiler_specific.h.me chromium-131.0.6778.
#define MUSTTAIL [[clang::musttail]]
#else
#define MUSTTAIL
diff -up chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h.me chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
--- chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h.me 2024-11-20 18:50:28.690761262 +0100
+++ chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h 2024-11-20 18:54:49.374711202 +0100
@@ -138,7 +138,7 @@
// PA_MUSTTAIL return Func1(d + 1); // `Func1()` will be tail-called.
// }
// ```
-#if PA_HAS_CPP_ATTRIBUTE(clang::musttail)
+#if PA_HAS_CPP_ATTRIBUTE(clang::musttail) && !defined(__powerpc64__)
#define PA_MUSTTAIL [[clang::musttail]]
#else
#define PA_MUSTTAIL

View File

@@ -0,0 +1,13 @@
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,8 +1,8 @@
Index: chromium-136.0.7103.48/third_party/libvpx/generate_gni.sh
Index: chromium-144.0.7559.59/third_party/libvpx/generate_gni.sh
===================================================================
--- chromium-136.0.7103.48.orig/third_party/libvpx/generate_gni.sh
+++ chromium-136.0.7103.48/third_party/libvpx/generate_gni.sh
@@ -433,7 +433,7 @@ gen_config_files linux/mipsel "--target=
--- 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}"
@@ -11,10 +11,10 @@ Index: chromium-136.0.7103.48/third_party/libvpx/generate_gni.sh
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-136.0.7103.48/third_party/libvpx/source/libvpx/build/make/rtcd.pl
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/build/make/rtcd.pl
===================================================================
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/libvpx/build/make/rtcd.pl
+++ chromium-136.0.7103.48/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;
@@ -27,11 +27,11 @@ Index: chromium-136.0.7103.48/third_party/libvpx/source/libvpx/build/make/rtcd.p
} elsif ($opts{arch} =~ /loongarch/ ) {
@ALL_ARCHS = filter(qw/lsx lasx/);
loongarch;
Index: chromium-136.0.7103.48/third_party/libvpx/BUILD.gn
Index: chromium-144.0.7559.59/third_party/libvpx/BUILD.gn
===================================================================
--- chromium-136.0.7103.48.orig/third_party/libvpx/BUILD.gn
+++ chromium-136.0.7103.48/third_party/libvpx/BUILD.gn
@@ -102,6 +102,14 @@ config("libvpx_config") {
--- 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",
]
}

View File

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

View File

@@ -1,11 +0,0 @@
--- chromium-141.0.7390.54/sandbox/linux/services/credentials.cc 2025/10/01 15:37:41 1.1
+++ chromium-141.0.7390.54/sandbox/linux/services/credentials.cc 2025/10/01 15:38:14
@@ -85,7 +85,7 @@
alignas(16) std::array<char, PTHREAD_STACK_MIN_CONST> stack_buf;
#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)
// SAFETY: This is the `stack` argument of `clone(2)`. Because the stack grows
// downward on these architectures, this is the topmost address of the memory
// space for the stack, and the address will not be dereferenced.

View File

@@ -1,6 +1,8 @@
--- a/base/system/sys_info.cc
+++ b/base/system/sys_info.cc
@@ -255,6 +255,8 @@
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";

View File

@@ -1,8 +1,8 @@
Index: chromium-128.0.6613.113/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
Index: chromium-144.0.7559.59/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
===================================================================
--- chromium-128.0.6613.113.orig/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
+++ chromium-128.0.6613.113/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
@@ -383,6 +383,8 @@
--- 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;
@@ -11,11 +11,11 @@ Index: chromium-128.0.6613.113/chrome/browser/extensions/api/runtime/chrome_runt
} else {
NOTREACHED();
}
Index: chromium-128.0.6613.113/extensions/common/api/runtime.json
Index: chromium-144.0.7559.59/extensions/common/api/runtime.json
===================================================================
--- chromium-128.0.6613.113.orig/extensions/common/api/runtime.json
+++ chromium-128.0.6613.113/extensions/common/api/runtime.json
@@ -99,7 +99,8 @@
--- 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."},
@@ -25,3 +25,13 @@ Index: chromium-128.0.6613.113/extensions/common/api/runtime.json
],
"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,6 +1,8 @@
--- a/base/process/launch.h
+++ b/base/process/launch.h
@@ -58,6 +58,9 @@
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)

View File

@@ -1,6 +1,8 @@
--- a/third_party/dawn/src/dawn/common/Platform.h
+++ b/third_party/dawn/src/dawn/common/Platform.h
@@ -159,10 +159,12 @@
Index: chromium-144.0.7559.59/third_party/dawn/src/dawn/common/Platform.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/dawn/src/dawn/common/Platform.h
+++ chromium-144.0.7559.59/third_party/dawn/src/dawn/common/Platform.h
@@ -163,10 +163,12 @@
#elif defined(__s390x__)
#define DAWN_PLATFORM_IS_S390X 1

View File

@@ -1,8 +1,8 @@
Index: chromium-128.0.6613.113/third_party/breakpad/BUILD.gn
Index: chromium-144.0.7559.59/third_party/breakpad/BUILD.gn
===================================================================
--- chromium-128.0.6613.113.orig/third_party/breakpad/BUILD.gn
+++ chromium-128.0.6613.113/third_party/breakpad/BUILD.gn
@@ -782,7 +782,6 @@ if (is_linux || is_chromeos || is_androi
--- chromium-144.0.7559.59.orig/third_party/breakpad/BUILD.gn
+++ chromium-144.0.7559.59/third_party/breakpad/BUILD.gn
@@ -804,7 +804,6 @@ if (is_linux || is_chromeos || is_androi
"breakpad/src/client/minidump_file_writer.h",
"breakpad/src/common/convert_UTF.cc",
"breakpad/src/common/convert_UTF.h",
@@ -10,7 +10,7 @@ Index: chromium-128.0.6613.113/third_party/breakpad/BUILD.gn
"breakpad/src/common/linux/elf_core_dump.cc",
"breakpad/src/common/linux/elf_core_dump.h",
"breakpad/src/common/linux/elfutils.cc",
@@ -814,6 +813,8 @@ if (is_linux || is_chromeos || is_androi
@@ -836,6 +835,8 @@ if (is_linux || is_chromeos || is_androi
configs += [ "//build/config/compiler:no_chromium_code" ]
public_configs = [ ":client_config" ]
@@ -19,7 +19,7 @@ Index: chromium-128.0.6613.113/third_party/breakpad/BUILD.gn
if (current_cpu == "arm" && is_chromeos_ash) {
# Avoid running out of registers in
# linux_syscall_support.h:sys_clone()'s inline assembly.
@@ -871,7 +872,6 @@ if (is_linux || is_chromeos || is_androi
@@ -893,7 +894,6 @@ if (is_linux || is_chromeos || is_androi
"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",

View File

@@ -24,11 +24,11 @@ inconsistency in data layouts when targeting this particular platform.
The error reported by the linker is not technically an error, however, only
a warning goosed up by a --fatal-warnings flag.
Index: chromium-128.0.6613.113/build/config/compiler/BUILD.gn
Index: chromium-144.0.7559.59/build/config/compiler/BUILD.gn
===================================================================
--- chromium-128.0.6613.113.orig/build/config/compiler/BUILD.gn
+++ chromium-128.0.6613.113/build/config/compiler/BUILD.gn
@@ -380,7 +380,7 @@ config("compiler") {
--- chromium-144.0.7559.59.orig/build/config/compiler/BUILD.gn
+++ chromium-144.0.7559.59/build/config/compiler/BUILD.gn
@@ -470,7 +470,7 @@ config("compiler") {
# Linker warnings.
if (fatal_linker_warnings && !is_apple && current_os != "aix" &&

View File

@@ -0,0 +1,26 @@
Index: chromium-145.0.7632.45/base/allocator/dispatcher/tls.h
===================================================================
--- chromium-145.0.7632.45.orig/base/allocator/dispatcher/tls.h
+++ chromium-145.0.7632.45/base/allocator/dispatcher/tls.h
@@ -83,6 +83,8 @@ struct BASE_EXPORT MMapAllocator {
constexpr static size_t AllocationChunkSize = 16384;
#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)
constexpr static size_t AllocationChunkSize = 16384;
+#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_PPC64)
+ constexpr static size_t AllocationChunkSize = 16384;
#else
constexpr static size_t AllocationChunkSize = 4096;
#endif
Index: chromium-145.0.7632.45/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
===================================================================
--- chromium-145.0.7632.45.orig/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
+++ chromium-145.0.7632.45/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
@@ -394,7 +394,7 @@ PA_ALWAYS_INLINE constexpr size_t MaxDir
// TODO(casey.smalley@arm.com): under 64k pages we can end up in a situation
// where a normal slot span will be large enough to contain multiple items,
// but the address will go over the final partition page after being aligned.
-#if PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)
+#if PA_BUILDFLAG(IS_LINUX) && (PA_BUILDFLAG(PA_ARCH_CPU_ARM64) || PA_BUILDFLAG(PA_ARCH_CPU_PPC64))
inline constexpr size_t kMaxSupportedAlignment = kSuperPageSize / 4;
#else
inline constexpr size_t kMaxSupportedAlignment = kSuperPageSize / 2;

View File

@@ -1,6 +1,10 @@
--- chromium-139.0.7258.5/base/allocator/partition_allocator/partition_alloc.gni 2025/06/30 09:01:19 1.1
+++ chromium-139.0.7258.5/base/allocator/partition_allocator/partition_alloc.gni 2025/06/30 09:01:57
@@ -66,7 +66,7 @@
kIndex: chromium-114.0.5735.45/base/allocator/partition_allocator/partition_alloc.gni
===================================================================
Index: chromium-144.0.7559.59/base/allocator/partition_allocator/partition_alloc.gni
===================================================================
--- chromium-144.0.7559.59.orig/base/allocator/partition_allocator/partition_alloc.gni
+++ chromium-144.0.7559.59/base/allocator/partition_allocator/partition_alloc.gni
@@ -71,7 +71,7 @@ is_clang_or_gcc = is_clang || !is_win
# Whether 64-bit pointers are used.
# A static_assert in partition_alloc_config.h verifies that.
if (current_cpu == "x64" || current_cpu == "arm64" || current_cpu == "arm64e" ||

View File

@@ -1,26 +0,0 @@
Index: chromium-128.0.6613.113/sandbox/linux/system_headers/ppc64_linux_syscalls.h
===================================================================
--- chromium-128.0.6613.113.orig/sandbox/linux/system_headers/ppc64_linux_syscalls.h
+++ chromium-128.0.6613.113/sandbox/linux/system_headers/ppc64_linux_syscalls.h
@@ -8,5 +8,21 @@
#include <asm/unistd.h>
//TODO: is it necessary to redefine syscall numbers for PPC64?
+// Needed for Ubuntu/Debian/Centos/RHEL:
+#if !defined(__NR_shmget)
+#define __NR_shmget 395
+#endif
+#if !defined(__NR_shmdt)
+#define __NR_shmdt 398
+#endif
+#if !defined(__NR_shmctl)
+#define __NR_shmctl 396
+#endif
+#if !defined(__NR_shmat)
+#define __NR_shmat 397
+#endif
+#if !defined(__NR_mseal)
+#define __NR_mseal 462
+#endif
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_

View File

@@ -1,8 +1,8 @@
Index: chromium-128.0.6613.113/build/toolchain/gcc_toolchain.gni
Index: chromium-144.0.7559.59/build/toolchain/gcc_toolchain.gni
===================================================================
--- chromium-128.0.6613.113.orig/build/toolchain/gcc_toolchain.gni
+++ chromium-128.0.6613.113/build/toolchain/gcc_toolchain.gni
@@ -441,7 +441,13 @@ template("single_gcc_toolchain") {
--- chromium-144.0.7559.59.orig/build/toolchain/gcc_toolchain.gni
+++ chromium-144.0.7559.59/build/toolchain/gcc_toolchain.gni
@@ -415,7 +415,13 @@ template("single_gcc_toolchain") {
# -soname flag is not available on aix ld
soname_flag = "-Wl,-soname=\"$soname\""
}
@@ -17,7 +17,7 @@ Index: chromium-128.0.6613.113/build/toolchain/gcc_toolchain.gni
# Generate a map file to be used for binary size analysis.
# Map file adds ~10% to the link time on a z620.
@@ -553,7 +559,13 @@ template("single_gcc_toolchain") {
@@ -527,7 +533,13 @@ template("single_gcc_toolchain") {
whole_archive_flag = "-Wl,--whole-archive"
no_whole_archive_flag = "-Wl,--no-whole-archive"
}

View File

@@ -0,0 +1,16 @@
author: Andres Salomon <dilinger@debian.org>
description: allow ppc64le to build by using proper rustc target
Index: chromium-144.0.7559.59/build/config/rust.gni
===================================================================
--- chromium-144.0.7559.59.orig/build/config/rust.gni
+++ chromium-144.0.7559.59/build/config/rust.gni
@@ -186,6 +186,9 @@ rust_abi_target = ""
if (is_linux || is_chromeos) {
if (current_cpu == "arm64") {
rust_abi_target = "aarch64-unknown-linux-gnu"
+ } else if (current_cpu == "ppc64") {
+ rust_abi_target = "powerpc64le-unknown-linux-gnu"
+ cargo_target_abi = ""
} else if (current_cpu == "x86") {
rust_abi_target = "i686-unknown-linux-gnu"
} else if (current_cpu == "x64") {

View File

@@ -1,6 +1,8 @@
--- a/components/variations/proto/study.proto
+++ b/components/variations/proto/study.proto
@@ -264,6 +264,9 @@
Index: chromium-144.0.7559.59/components/variations/proto/study.proto
===================================================================
--- chromium-144.0.7559.59.orig/components/variations/proto/study.proto
+++ chromium-144.0.7559.59/components/variations/proto/study.proto
@@ -293,6 +293,9 @@ message Study {
// A Mac-only value, indicating an x86-64 binary running on an arm64 host
// via "Rosetta 2" binary translation.
TRANSLATED_X86_64 = 4;
@@ -10,9 +12,11 @@
}
// Enum to pass as optional bool.
--- chromium-140.0.7339.5/components/variations/service/variations_field_trial_creator.cc 2025/08/12 14:50:52 1.1
+++ chromium-140.0.7339.5/components/variations/service/variations_field_trial_creator.cc 2025/08/12 14:51:32
@@ -105,6 +105,9 @@
Index: chromium-144.0.7559.59/components/variations/service/variations_field_trial_creator.cc
===================================================================
--- chromium-144.0.7559.59.orig/components/variations/service/variations_field_trial_creator.cc
+++ chromium-144.0.7559.59/components/variations/service/variations_field_trial_creator.cc
@@ -108,6 +108,9 @@ Study::CpuArchitecture GetCurrentCpuArch
if (process_arch == "x86") {
return Study::X86_32;
}

View File

@@ -1,29 +1,8 @@
Index: chromium-128.0.6613.113/build/config/compiler/BUILD.gn
Index: chromium-144.0.7559.59/build/config/compiler/BUILD.gn
===================================================================
--- chromium-128.0.6613.113.orig/build/config/compiler/BUILD.gn
+++ chromium-128.0.6613.113/build/config/compiler/BUILD.gn
@@ -1835,12 +1835,16 @@
cflags_cc += [
# See comment for -Wno-c++11-narrowing.
"-Wno-narrowing",
-
- # -Wno-class-memaccess warns about hash table and vector in blink.
- # But the violation is intentional.
- "-Wno-class-memaccess",
]
+ if (current_cpu != "ppc64") {
+ cflags_cc += [
+ # -Wno-class-memaccess warns about hash table and vector in blink.
+ # But the violation is intentional.
+ "-Wno-class-memaccess",
+ ]
+ }
+
# -Wunused-local-typedefs is broken in gcc,
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
cflags += [ "-Wno-unused-local-typedefs" ]
@@ -1854,7 +1854,9 @@ config("default_warnings") {
--- chromium-144.0.7559.59.orig/build/config/compiler/BUILD.gn
+++ chromium-144.0.7559.59/build/config/compiler/BUILD.gn
@@ -2129,7 +2129,9 @@ config("default_warnings") {
# Don't warn about "maybe" uninitialized. Clang doesn't include this
# in -Wall but gcc does, and it gives false positives.
@@ -34,7 +13,7 @@ Index: chromium-128.0.6613.113/build/config/compiler/BUILD.gn
cflags += [ "-Wno-deprecated-declarations" ]
# -Wcomment gives too many false positives in the case a
@@ -1865,7 +1867,9 @@ config("default_warnings") {
@@ -2140,7 +2142,9 @@ config("default_warnings") {
# -Wpacked-not-aligned complains all generated mojom-shared-internal.h
# files.

View File

@@ -1,8 +1,8 @@
Index: chromium-138.0.7204.35/third_party/skia/BUILD.gn
Index: chromium-144.0.7559.59/third_party/skia/BUILD.gn
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/BUILD.gn
+++ chromium-138.0.7204.35/third_party/skia/BUILD.gn
@@ -193,6 +193,12 @@ opts("lasx") {
--- chromium-144.0.7559.59.orig/third_party/skia/BUILD.gn
+++ chromium-144.0.7559.59/third_party/skia/BUILD.gn
@@ -199,6 +199,12 @@ opts("lasx") {
cflags = [ "-mlasx" ]
}
@@ -15,7 +15,7 @@ Index: chromium-138.0.7204.35/third_party/skia/BUILD.gn
# Any feature of Skia that requires third-party code should be optional and use this template.
template("optional") {
if (invoker.enabled) {
@@ -1661,6 +1667,7 @@ skia_component("skia") {
@@ -1700,6 +1706,7 @@ skia_component("skia") {
":skx",
":typeface_fontations",
":vello",
@@ -23,11 +23,11 @@ Index: chromium-138.0.7204.35/third_party/skia/BUILD.gn
":webp_decode",
":wuffs",
":xml",
Index: chromium-138.0.7204.35/third_party/skia/gn/skia/BUILD.gn
Index: chromium-144.0.7559.59/third_party/skia/gn/skia/BUILD.gn
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/gn/skia/BUILD.gn
+++ chromium-138.0.7204.35/third_party/skia/gn/skia/BUILD.gn
@@ -175,6 +175,8 @@ config("default") {
--- chromium-144.0.7559.59.orig/third_party/skia/gn/skia/BUILD.gn
+++ chromium-144.0.7559.59/third_party/skia/gn/skia/BUILD.gn
@@ -142,6 +142,8 @@ config("default") {
"-mfpmath=sse",
]
ldflags += [ "-m32" ]
@@ -36,11 +36,11 @@ Index: chromium-138.0.7204.35/third_party/skia/gn/skia/BUILD.gn
} else if (current_cpu == "loong64") {
cflags += [
"-mlsx",
Index: chromium-138.0.7204.35/third_party/skia/include/core/SkTypes.h
Index: chromium-144.0.7559.59/third_party/skia/include/core/SkTypes.h
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/include/core/SkTypes.h
+++ chromium-138.0.7204.35/third_party/skia/include/core/SkTypes.h
@@ -194,4 +194,43 @@ static constexpr uint32_t SK_InvalidGenI
--- chromium-144.0.7559.59.orig/third_party/skia/include/core/SkTypes.h
+++ chromium-144.0.7559.59/third_party/skia/include/core/SkTypes.h
@@ -198,4 +198,43 @@ static constexpr uint32_t SK_InvalidGenI
*/
static constexpr uint32_t SK_InvalidUniqueID = 0;
@@ -84,10 +84,10 @@ Index: chromium-138.0.7204.35/third_party/skia/include/core/SkTypes.h
+#endif
+
#endif
Index: chromium-138.0.7204.35/third_party/skia/src/base/SkSpinlock.cpp
Index: chromium-144.0.7559.59/third_party/skia/src/base/SkSpinlock.cpp
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/src/base/SkSpinlock.cpp
+++ chromium-138.0.7204.35/third_party/skia/src/base/SkSpinlock.cpp
--- chromium-144.0.7559.59.orig/third_party/skia/src/base/SkSpinlock.cpp
+++ chromium-144.0.7559.59/third_party/skia/src/base/SkSpinlock.cpp
@@ -33,7 +33,8 @@
#endif
@@ -98,10 +98,10 @@ Index: chromium-138.0.7204.35/third_party/skia/src/base/SkSpinlock.cpp
#include <emmintrin.h>
static void do_pause() { _mm_pause(); }
#else
Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkBitmapProcState_opts.h
Index: chromium-144.0.7559.59/third_party/skia/src/opts/SkBitmapProcState_opts.h
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/src/opts/SkBitmapProcState_opts.h
+++ chromium-138.0.7204.35/third_party/skia/src/opts/SkBitmapProcState_opts.h
--- chromium-144.0.7559.59.orig/third_party/skia/src/opts/SkBitmapProcState_opts.h
+++ chromium-144.0.7559.59/third_party/skia/src/opts/SkBitmapProcState_opts.h
@@ -21,7 +21,13 @@
// The rest are scattershot at the moment but I want to get them
// all migrated to be normal code inside SkBitmapProcState.cpp.
@@ -117,10 +117,10 @@ Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkBitmapProcState_opts.h
#include <immintrin.h>
#elif defined(SK_ARM_HAS_NEON)
#include <arm_neon.h>
Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkBlitRow_opts.h
Index: chromium-144.0.7559.59/third_party/skia/src/opts/SkBlitRow_opts.h
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/src/opts/SkBlitRow_opts.h
+++ chromium-138.0.7204.35/third_party/skia/src/opts/SkBlitRow_opts.h
--- chromium-144.0.7559.59.orig/third_party/skia/src/opts/SkBlitRow_opts.h
+++ chromium-144.0.7559.59/third_party/skia/src/opts/SkBlitRow_opts.h
@@ -69,7 +69,7 @@
#endif
@@ -130,10 +130,10 @@ Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkBlitRow_opts.h
static inline __m128i SkPMSrcOver_SSE2(const __m128i& src, const __m128i& dst) {
__m128i scale = _mm_sub_epi32(_mm_set1_epi32(256),
Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkRasterPipeline_opts.h
Index: chromium-144.0.7559.59/third_party/skia/src/opts/SkRasterPipeline_opts.h
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/src/opts/SkRasterPipeline_opts.h
+++ chromium-138.0.7204.35/third_party/skia/src/opts/SkRasterPipeline_opts.h
--- chromium-144.0.7559.59.orig/third_party/skia/src/opts/SkRasterPipeline_opts.h
+++ chromium-144.0.7559.59/third_party/skia/src/opts/SkRasterPipeline_opts.h
@@ -1,5 +1,6 @@
/*
* Copyright 2018 Google Inc.
@@ -394,7 +394,7 @@ Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkRasterPipeline_opts.h
// These platforms are ideal for wider stages, and their default ABI is ideal.
#define ABI
#define SKRP_NARROW_STAGES 0
@@ -5539,6 +5749,10 @@ SI F sqrt_(F x) {
@@ -5600,6 +5810,10 @@ SI F sqrt_(F x) {
float32x4_t lo,hi;
split(x, &lo,&hi);
return join<F>(sqrt(lo), sqrt(hi));
@@ -405,7 +405,7 @@ Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkRasterPipeline_opts.h
#elif defined(SKRP_CPU_LASX)
__m256 lo,hi;
split(x, &lo,&hi);
@@ -5570,6 +5784,10 @@ SI F floor_(F x) {
@@ -5631,6 +5845,10 @@ SI F floor_(F x) {
__m128 lo,hi;
split(x, &lo,&hi);
return join<F>(_mm_floor_ps(lo), _mm_floor_ps(hi));
@@ -416,7 +416,7 @@ Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkRasterPipeline_opts.h
#elif defined(SKRP_CPU_LASX)
__m256 lo,hi;
split(x, &lo,&hi);
@@ -5589,6 +5807,7 @@ SI F floor_(F x) {
@@ -5650,6 +5868,7 @@ SI F floor_(F x) {
// (2 * a * b + (1 << 15)) >> 16
// The result is a number on [-1, 1).
// Note: on neon this is a saturating multiply while the others are not.
@@ -424,7 +424,7 @@ Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkRasterPipeline_opts.h
SI I16 scaled_mult(I16 a, I16 b) {
#if defined(SKRP_CPU_SKX)
return (I16)_mm256_mulhrs_epi16((__m256i)a, (__m256i)b);
@@ -5600,6 +5819,22 @@ SI I16 scaled_mult(I16 a, I16 b) {
@@ -5661,6 +5880,22 @@ SI I16 scaled_mult(I16 a, I16 b) {
return vqrdmulhq_s16(a, b);
#elif defined(SKRP_CPU_NEON)
return vqrdmulhq_s16(a, b);
@@ -447,7 +447,7 @@ Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkRasterPipeline_opts.h
#elif defined(SKRP_CPU_LASX)
I16 res = __lasx_xvmuh_h(a, b);
return __lasx_xvslli_h(res, 1);
@@ -5627,7 +5862,26 @@ SI U16 constrained_add(I16 a, U16 b) {
@@ -5688,7 +5923,26 @@ SI U16 constrained_add(I16 a, U16 b) {
SkASSERT(-ib <= ia && ia <= 65535 - ib);
}
#endif
@@ -474,7 +474,7 @@ Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkRasterPipeline_opts.h
}
SI F fract(F x) { return x - floor_(x); }
@@ -6683,8 +6937,14 @@ LOWP_STAGE_GP(bilerp_clamp_8888, const S
@@ -6744,8 +6998,14 @@ LOWP_STAGE_GP(bilerp_clamp_8888, const S
// 2^-8 * v = 2^-9 * (tx*(R - L) + (R + L))
// v = 1/2 * (tx*(R - L) + (R + L))
auto lerpX = [&](U16 left, U16 right) -> U16 {
@@ -489,7 +489,7 @@ Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkRasterPipeline_opts.h
// The constrained_add is the most subtle part of lerp. The first term is on the interval
// [-1, 1), and the second term is on the interval is on the interval [0, 1) because
// both terms are too high by a factor of 2 which will be handled below. (Both R and L are
@@ -6696,7 +6956,12 @@ LOWP_STAGE_GP(bilerp_clamp_8888, const S
@@ -6757,7 +7017,12 @@ LOWP_STAGE_GP(bilerp_clamp_8888, const S
U16 v2 = constrained_add(scaled_mult(tx, width), middle) + 1;
// Divide by 2 to calculate v and at the same time bring the intermediate value onto the
// interval [0, 1/2] to set up for the lerpY.
@@ -502,7 +502,7 @@ Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkRasterPipeline_opts.h
};
const uint32_t* ptr;
@@ -6730,9 +6995,15 @@ LOWP_STAGE_GP(bilerp_clamp_8888, const S
@@ -6791,9 +7056,15 @@ LOWP_STAGE_GP(bilerp_clamp_8888, const S
I16 width = (I16)bottom - (I16)top;
U16 middle = bottom + top;
// Add + 0x80 for rounding.
@@ -519,10 +519,10 @@ Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkRasterPipeline_opts.h
};
r = lerpY(topR, bottomR);
Index: chromium-138.0.7204.35/third_party/skia/src/base/SkVx.h
Index: chromium-144.0.7559.59/third_party/skia/src/base/SkVx.h
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/src/base/SkVx.h
+++ chromium-138.0.7204.35/third_party/skia/src/base/SkVx.h
--- chromium-144.0.7559.59.orig/third_party/skia/src/base/SkVx.h
+++ chromium-144.0.7559.59/third_party/skia/src/base/SkVx.h
@@ -41,7 +41,12 @@
#endif
@@ -537,10 +537,10 @@ Index: chromium-138.0.7204.35/third_party/skia/src/base/SkVx.h
#include <immintrin.h>
#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE41
#include <smmintrin.h>
Index: chromium-138.0.7204.35/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
Index: chromium-144.0.7559.59/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
+++ chromium-138.0.7204.35/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
--- chromium-144.0.7559.59.orig/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
+++ chromium-144.0.7559.59/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
@@ -9,7 +9,7 @@
#include "src/core/SkBlitMask.h"
#include "src/core/SkOptsTargets.h"
@@ -550,10 +550,10 @@ Index: chromium-138.0.7204.35/third_party/skia/src/core/SkBlitMask_opts_ssse3.cp
// The order of these includes is important:
// 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget
Index: chromium-138.0.7204.35/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
Index: chromium-144.0.7559.59/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
+++ chromium-138.0.7204.35/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
--- chromium-144.0.7559.59.orig/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
+++ chromium-144.0.7559.59/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
@@ -10,7 +10,7 @@
#include "src/core/SkOptsTargets.h"
#include "src/core/SkSwizzlePriv.h"
@@ -563,10 +563,10 @@ Index: chromium-138.0.7204.35/third_party/skia/src/core/SkSwizzler_opts_ssse3.cp
!defined(SK_ENABLE_OPTIMIZE_SIZE) && \
SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
Index: chromium-138.0.7204.35/third_party/skia/src/core/SkBlitMask_opts.cpp
Index: chromium-144.0.7559.59/third_party/skia/src/core/SkBlitMask_opts.cpp
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/src/core/SkBlitMask_opts.cpp
+++ chromium-138.0.7204.35/third_party/skia/src/core/SkBlitMask_opts.cpp
--- chromium-144.0.7559.59.orig/third_party/skia/src/core/SkBlitMask_opts.cpp
+++ chromium-144.0.7559.59/third_party/skia/src/core/SkBlitMask_opts.cpp
@@ -25,7 +25,7 @@ namespace SkOpts {
static bool init() {
#if defined(SK_ENABLE_OPTIMIZE_SIZE)
@@ -576,10 +576,10 @@ Index: chromium-138.0.7204.35/third_party/skia/src/core/SkBlitMask_opts.cpp
#if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
if (SkCpu::Supports(SkCpu::SSSE3)) { Init_BlitMask_ssse3(); }
#endif
Index: chromium-138.0.7204.35/third_party/skia/src/core/SkBitmapProcState_opts.cpp
Index: chromium-144.0.7559.59/third_party/skia/src/core/SkBitmapProcState_opts.cpp
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/src/core/SkBitmapProcState_opts.cpp
+++ chromium-138.0.7204.35/third_party/skia/src/core/SkBitmapProcState_opts.cpp
--- chromium-144.0.7559.59.orig/third_party/skia/src/core/SkBitmapProcState_opts.cpp
+++ chromium-144.0.7559.59/third_party/skia/src/core/SkBitmapProcState_opts.cpp
@@ -27,7 +27,7 @@ namespace SkOpts {
static bool init() {
#if defined(SK_ENABLE_OPTIMIZE_SIZE)
@@ -589,10 +589,10 @@ Index: chromium-138.0.7204.35/third_party/skia/src/core/SkBitmapProcState_opts.c
#if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
if (SkCpu::Supports(SkCpu::SSSE3)) { Init_BitmapProcState_ssse3(); }
#endif
Index: chromium-138.0.7204.35/third_party/skia/src/core/SkCpu.h
Index: chromium-144.0.7559.59/third_party/skia/src/core/SkCpu.h
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/src/core/SkCpu.h
+++ chromium-138.0.7204.35/third_party/skia/src/core/SkCpu.h
--- chromium-144.0.7559.59.orig/third_party/skia/src/core/SkCpu.h
+++ chromium-144.0.7559.59/third_party/skia/src/core/SkCpu.h
@@ -60,7 +60,7 @@ inline bool SkCpu::Supports(uint32_t mas
// If we mask in compile-time known lower limits, the compiler can
@@ -602,10 +602,10 @@ Index: chromium-138.0.7204.35/third_party/skia/src/core/SkCpu.h
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1
features |= SSE1;
#endif
Index: chromium-138.0.7204.35/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
Index: chromium-144.0.7559.59/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
+++ chromium-138.0.7204.35/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
--- chromium-144.0.7559.59.orig/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
+++ chromium-144.0.7559.59/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
@@ -8,7 +8,7 @@
#include "include/private/base/SkFeatures.h"
#include "src/core/SkOptsTargets.h"
@@ -615,10 +615,10 @@ Index: chromium-138.0.7204.35/third_party/skia/src/core/SkBitmapProcState_opts_s
// The order of these includes is important:
// 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget
Index: chromium-138.0.7204.35/third_party/skia/include/private/base/SkFeatures.h
Index: chromium-144.0.7559.59/third_party/skia/include/private/base/SkFeatures.h
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/include/private/base/SkFeatures.h
+++ chromium-138.0.7204.35/third_party/skia/include/private/base/SkFeatures.h
--- chromium-144.0.7559.59.orig/third_party/skia/include/private/base/SkFeatures.h
+++ chromium-144.0.7559.59/third_party/skia/include/private/base/SkFeatures.h
@@ -63,6 +63,8 @@
#if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
@@ -628,10 +628,10 @@ Index: chromium-138.0.7204.35/third_party/skia/include/private/base/SkFeatures.h
#endif
#if defined(__loongarch__) || defined (__loongarch64)
Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkSwizzler_opts.inc
Index: chromium-144.0.7559.59/third_party/skia/src/opts/SkSwizzler_opts.inc
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/src/opts/SkSwizzler_opts.inc
+++ chromium-138.0.7204.35/third_party/skia/src/opts/SkSwizzler_opts.inc
--- chromium-144.0.7559.59.orig/third_party/skia/src/opts/SkSwizzler_opts.inc
+++ chromium-144.0.7559.59/third_party/skia/src/opts/SkSwizzler_opts.inc
@@ -14,7 +14,10 @@
#include <cmath>
#include <utility>
@@ -678,10 +678,10 @@ Index: chromium-138.0.7204.35/third_party/skia/src/opts/SkSwizzler_opts.inc
#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 && (defined(__clang__) || !defined(_MSC_VER))
// -- SSE -- Harden against timing attacks -- MSVC is not supported.
using F4 = __m128;
Index: chromium-138.0.7204.35/third_party/skia/src/core/SkBlitter_ARGB32.cpp
Index: chromium-144.0.7559.59/third_party/skia/src/core/SkBlitter_ARGB32.cpp
===================================================================
--- chromium-138.0.7204.35.orig/third_party/skia/src/core/SkBlitter_ARGB32.cpp
+++ chromium-138.0.7204.35/third_party/skia/src/core/SkBlitter_ARGB32.cpp
--- chromium-144.0.7559.59.orig/third_party/skia/src/core/SkBlitter_ARGB32.cpp
+++ chromium-144.0.7559.59/third_party/skia/src/core/SkBlitter_ARGB32.cpp
@@ -129,6 +129,16 @@ static inline SkPMColor blend_lcd16_opaq
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
#include <emmintrin.h>

View File

@@ -1,16 +0,0 @@
Index: chromium-128.0.6613.113/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h
===================================================================
--- chromium-128.0.6613.113.orig/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h
+++ chromium-128.0.6613.113/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h
@@ -187,7 +187,11 @@ SystemPageBaseMask() {
return ~SystemPageOffsetMask();
}
+#if PA_BUILDFLAG(PA_ARCH_CPU_PPC64_FAMILY)
+constexpr size_t kPageMetadataShift = 6; // 64 bytes per partition page.
+#else
constexpr size_t kPageMetadataShift = 5; // 32 bytes per partition page.
+#endif
constexpr size_t kPageMetadataSize = 1 << kPageMetadataShift;
} // namespace internal

BIN
rollup-linux-arm64-gnu-4.22.4.tgz LFS Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -31,8 +31,8 @@ Index: chromium-142.0.7444.3/ui/ozone/platform/drm/gpu/hardware_display_controll
===================================================================
--- chromium-142.0.7444.3.orig/ui/ozone/platform/drm/gpu/hardware_display_controller.cc
+++ chromium-142.0.7444.3/ui/ozone/platform/drm/gpu/hardware_display_controller.cc
@@ -19,7 +19,7 @@
#include "base/metrics/histogram_macros.h"
@@ -18,7 +18,7 @@
#include "base/logging.h"
#include "base/trace_event/typed_macros.h"
#include "components/viz/common/resources/shared_image_format_utils.h"
-#include "third_party/libdrm/src/include/drm/drm_fourcc.h"