Skip to content

Commit 5959a2a

Browse files
committed
chromium: Refresh musl patches
Fixes patch fuzz Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 parent 3711d7f commit 5959a2a

9 files changed

+23
-34
lines changed

meta-chromium/recipes-browser/chromium/files/musl/0001-mallinfo-implementation-is-glibc-specific.patch

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
5050
#endif
5151
--- a/base/trace_event/malloc_dump_provider.cc
5252
+++ b/base/trace_event/malloc_dump_provider.cc
53-
@@ -218,7 +218,6 @@ bool MallocDumpProvider::OnMemoryDump(co
53+
@@ -219,7 +219,6 @@ bool MallocDumpProvider::OnMemoryDump(co
5454
#define MALLINFO2_FOUND_IN_LIBC
5555
struct mallinfo2 info = mallinfo2();
5656
#endif
5757
-#endif // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
5858
#if !defined(MALLINFO2_FOUND_IN_LIBC)
5959
struct mallinfo info = mallinfo();
6060
#endif
61-
@@ -231,6 +230,7 @@ bool MallocDumpProvider::OnMemoryDump(co
61+
@@ -232,6 +231,7 @@ bool MallocDumpProvider::OnMemoryDump(co
6262

6363
// Total allocated space is given by |uordblks|.
6464
allocated_objects_size = info.uordblks;
@@ -68,23 +68,23 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
6868
MemoryAllocatorDump* outer_dump = pmd->CreateAllocatorDump("malloc");
6969
--- a/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
7070
+++ b/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
71-
@@ -130,7 +130,7 @@
71+
@@ -133,7 +133,7 @@
7272
/* #undef HAVE_MALLCTL */
7373

7474
/* Define to 1 if you have the `mallinfo' function. */
7575
-#define HAVE_MALLINFO 1
7676
+/* #undef HAVE_MALLINFO */
7777

78-
/* Define to 1 if you have the <malloc.h> header file. */
79-
#define HAVE_MALLOC_H 1
78+
/* Some projects using SwiftShader bypass cmake (eg Chromium via gn) */
79+
/* so we need to check glibc version for the new API to be safe */
8080
--- a/third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h
8181
+++ b/third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h
82-
@@ -125,7 +125,7 @@
82+
@@ -128,7 +128,7 @@
8383
/* #undef HAVE_MALLCTL */
8484

8585
/* Define to 1 if you have the `mallinfo' function. */
8686
-#define HAVE_MALLINFO 1
8787
+/* #undef HAVE_MALLINFO */
8888

89-
/* Define to 1 if you have the <malloc/malloc.h> header file. */
90-
/* #undef HAVE_MALLOC_MALLOC_H */
89+
/* Some projects using SwiftShader bypass cmake (eg Chromium via gn) */
90+
/* so we need to check glibc version for the new API to be safe */

meta-chromium/recipes-browser/chromium/files/musl/0002-execinfo-implementation-is-glibc-specific.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
6666
StreamBacktraceOutputHandler handler(os);
6767
--- a/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
6868
+++ b/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
69-
@@ -55,7 +55,7 @@
69+
@@ -58,7 +58,7 @@
7070
#define HAVE_ERRNO_H 1
7171

7272
/* Define to 1 if you have the <execinfo.h> header file. */

meta-chromium/recipes-browser/chromium/files/musl/0007-__libc_malloc-is-internal-to-glibc.patch

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1111
base/process/memory_linux.cc | 2 +-
1212
1 file changed, 1 insertion(+), 1 deletion(-)
1313

14-
diff --git a/base/process/memory_linux.cc b/base/process/memory_linux.cc
15-
index 3bada77710..7d0341aeec 100644
1614
--- a/base/process/memory_linux.cc
1715
+++ b/base/process/memory_linux.cc
18-
@@ -151,7 +151,7 @@ bool UncheckedMalloc(size_t size, void** result) {
16+
@@ -119,7 +119,7 @@ bool UncheckedMalloc(size_t size, void**
1917
(!defined(LIBC_GLIBC) && !BUILDFLAG(USE_TCMALLOC))
2018
*result = malloc(size);
2119
#elif defined(LIBC_GLIBC) && !BUILDFLAG(USE_TCMALLOC)

meta-chromium/recipes-browser/chromium/files/musl/0008-gnu_libc_version-API-is-glibc-specific.patch

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1111
.../metrics/chrome_browser_main_extra_parts_metrics.cc | 10 ++++++----
1212
1 file changed, 6 insertions(+), 4 deletions(-)
1313

14-
diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
15-
index 78e4af0790..0b17551d10 100644
1614
--- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
1715
+++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
18-
@@ -55,8 +55,9 @@
16+
@@ -61,8 +61,9 @@
1917
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
2018
// of lacros-chrome is complete.
2119
#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
@@ -26,7 +24,7 @@ index 78e4af0790..0b17551d10 100644
2624
#include "base/linux_util.h"
2725
#include "base/strings/string_split.h"
2826
#include "base/strings/string_util.h"
29-
@@ -235,7 +236,7 @@ void RecordStartupMetrics() {
27+
@@ -246,7 +247,7 @@ void RecordStartupMetrics() {
3028

3129
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
3230
// of lacros-chrome is complete.
@@ -35,7 +33,7 @@ index 78e4af0790..0b17551d10 100644
3533
void RecordLinuxDistroSpecific(const std::string& version_string,
3634
size_t parts,
3735
const char* histogram_name) {
38-
@@ -316,7 +317,8 @@ void RecordLinuxDistro() {
36+
@@ -329,7 +330,8 @@ void RecordLinuxDistro() {
3937
void RecordLinuxGlibcVersion() {
4038
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
4139
// of lacros-chrome is complete.
@@ -45,7 +43,7 @@ index 78e4af0790..0b17551d10 100644
4543
base::Version version(gnu_get_libc_version());
4644

4745
UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE;
48-
@@ -629,7 +631,7 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserStart() {
46+
@@ -722,7 +724,7 @@ void ChromeBrowserMainExtraPartsMetrics:
4947
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN};
5048
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
5149
// of lacros-chrome is complete.

meta-chromium/recipes-browser/chromium/files/musl/0009-provide-res_ninit-and-nclose-APIs-on-non-glibc-linux.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2323

2424
--- a/net/dns/host_resolver_manager.cc
2525
+++ b/net/dns/host_resolver_manager.cc
26-
@@ -2536,8 +2536,7 @@ HostResolverManager::HostResolverManager
26+
@@ -2720,8 +2720,7 @@ HostResolverManager::HostResolverManager
2727
NetworkChangeNotifier::AddConnectionTypeObserver(this);
2828
if (system_dns_config_notifier_)
2929
system_dns_config_notifier_->AddObserver(this);

meta-chromium/recipes-browser/chromium/files/musl/0012-debug-Fix-build-with-musl.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1919

2020
--- a/base/debug/stack_trace.cc
2121
+++ b/base/debug/stack_trace.cc
22-
@@ -259,14 +259,14 @@ std::string StackTrace::ToString() const
22+
@@ -260,14 +260,14 @@ std::string StackTrace::ToString() const
2323
}
2424
std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
2525
std::stringstream stream;

meta-chromium/recipes-browser/chromium/files/musl/0013-socket-initialize-msghdr-in-a-compatible-manner.patch

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2222
net/socket/udp_socket_posix.cc | 8 ++++++--
2323
1 file changed, 6 insertions(+), 2 deletions(-)
2424

25-
diff --git a/net/socket/udp_socket_posix.cc b/net/socket/udp_socket_posix.cc
26-
index 988794f94f..e398f5dd67 100644
2725
--- a/net/socket/udp_socket_posix.cc
2826
+++ b/net/socket/udp_socket_posix.cc
29-
@@ -1152,8 +1152,12 @@ SendResult UDPSocketPosixSender::InternalSendmmsgBuffers(
27+
@@ -1161,8 +1161,12 @@ SendResult UDPSocketPosixSender::Interna
3028
for (auto& buffer : buffers)
3129
msg_iov->push_back({const_cast<char*>(buffer->data()), buffer->length()});
3230
msgvec->reserve(buffers.size());

meta-chromium/recipes-browser/chromium/files/musl/0018--Use-monotonic-clock-for-pthread_cond_timedwait-with-.patch

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1212
v8/src/base/platform/condition-variable.cc | 4 ++--
1313
1 file changed, 2 insertions(+), 2 deletions(-)
1414

15-
diff --git a/v8/src/base/platform/condition-variable.cc b/v8/src/base/platform/condition-variable.cc
16-
index 04ea29181..d121acdc5 100644
1715
--- a/v8/src/base/platform/condition-variable.cc
1816
+++ b/v8/src/base/platform/condition-variable.cc
19-
@@ -16,7 +16,7 @@ namespace base {
17+
@@ -20,7 +20,7 @@ namespace base {
2018

2119
ConditionVariable::ConditionVariable() {
2220
#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
@@ -25,7 +23,7 @@ index 04ea29181..d121acdc5 100644
2523
// On Free/Net/OpenBSD and Linux with glibc we can change the time
2624
// source for pthread_cond_timedwait() to use the monotonic clock.
2725
pthread_condattr_t attr;
28-
@@ -92,7 +92,7 @@ bool ConditionVariable::WaitFor(Mutex* mutex, const TimeDelta& rel_time) {
26+
@@ -96,7 +96,7 @@ bool ConditionVariable::WaitFor(Mutex* m
2927
&native_handle_, &mutex->native_handle(), &ts);
3028
#else
3129
#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
@@ -34,6 +32,3 @@ index 04ea29181..d121acdc5 100644
3432
// On Free/Net/OpenBSD and Linux with glibc we can change the time
3533
// source for pthread_cond_timedwait() to use the monotonic clock.
3634
result = clock_gettime(CLOCK_MONOTONIC, &ts);
37-
--
38-
2.31.0
39-

meta-chromium/recipes-browser/chromium/files/musl/0020-Fix-tab-crashes-on-musl.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,23 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
5757
}
5858
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
5959
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
60-
@@ -417,6 +417,7 @@ bool SyscallSets::IsAllowedProcessStartO
60+
@@ -418,6 +418,7 @@ bool SyscallSets::IsAllowedProcessStartO
6161
#if defined(__i386__)
6262
case __NR_waitpid:
6363
#endif
6464
+ case __NR_set_tid_address:
6565
return true;
6666
case __NR_clone: // Should be parameter-restricted.
6767
case __NR_setns: // Privileged.
68-
@@ -429,7 +430,6 @@ bool SyscallSets::IsAllowedProcessStartO
68+
@@ -430,7 +431,6 @@ bool SyscallSets::IsAllowedProcessStartO
6969
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
7070
case __NR_set_thread_area:
7171
#endif
7272
- case __NR_set_tid_address:
7373
case __NR_unshare:
7474
#if !defined(__mips__) && !defined(__aarch64__)
7575
case __NR_vfork:
76-
@@ -543,6 +543,8 @@ bool SyscallSets::IsAllowedAddressSpaceA
76+
@@ -544,6 +544,8 @@ bool SyscallSets::IsAllowedAddressSpaceA
7777
case __NR_mlock:
7878
case __NR_munlock:
7979
case __NR_munmap:
@@ -82,7 +82,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
8282
return true;
8383
case __NR_madvise:
8484
case __NR_mincore:
85-
@@ -560,7 +562,6 @@ bool SyscallSets::IsAllowedAddressSpaceA
85+
@@ -561,7 +563,6 @@ bool SyscallSets::IsAllowedAddressSpaceA
8686
case __NR_modify_ldt:
8787
#endif
8888
case __NR_mprotect:

0 commit comments

Comments
 (0)