extra/chromium to 51.0.2704.63-1

This commit is contained in:
Kevin Mihelich 2016-05-27 18:12:15 +00:00
parent 9a85b9c82d
commit acc0cfb36c
3 changed files with 15 additions and 148 deletions

View file

@ -1,7 +1,7 @@
From a8e03faa56efeacd50fe8b64bda65ac17c83ea8e Mon Sep 17 00:00:00 2001
From 3e466a13cbd0fbc4db71d9ad9b60e3d6cf6a94c7 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sun, 6 Mar 2016 20:26:53 -0700
Subject: [PATCH 1/2] system ffmpeg fixes
Subject: [PATCH] system ffmpeg fixes
---
media/ffmpeg/ffmpeg_common.h | 5 -----
@ -9,10 +9,10 @@ Subject: [PATCH 1/2] system ffmpeg fixes
2 files changed, 23 deletions(-)
diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
index 55e3ab7..0ec595c 100644
index d5ad132..04140e2 100644
--- a/media/ffmpeg/ffmpeg_common.h
+++ b/media/ffmpeg/ffmpeg_common.h
@@ -21,10 +21,6 @@
@@ -22,10 +22,6 @@
// Include FFmpeg header files.
extern "C" {
@ -23,7 +23,7 @@ index 55e3ab7..0ec595c 100644
// Upstream libavcodec/utils.c still uses the deprecated
// av_dup_packet(), causing deprecation warnings.
// The normal fix for such things is to disable the feature as below,
@@ -38,7 +34,6 @@ extern "C" {
@@ -39,7 +35,6 @@ extern "C" {
MSVC_PUSH_DISABLE_WARNING(4244);
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
@ -32,10 +32,10 @@ index 55e3ab7..0ec595c 100644
#include <libavutil/avutil.h>
#include <libavutil/imgutils.h>
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 20adebe..166cea6 100644
index c7e00ce..fe3a39d 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -1034,24 +1034,6 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
@@ -1092,24 +1092,6 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
// If no estimate is found, the stream entry will be kInfiniteDuration().
std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams,
kInfiniteDuration());
@ -58,8 +58,8 @@ index 20adebe..166cea6 100644
- }
- }
scoped_ptr<MediaTracks> media_tracks(new MediaTracks());
AVStream* audio_stream = NULL;
AudioDecoderConfig audio_config;
--
2.8.0
2.7.2

View file

@ -1,130 +0,0 @@
From 3dafa17489a30f5e2a9d274f842a8caa9f881698 Mon Sep 17 00:00:00 2001
From: "riku.voipio" <riku.voipio@linaro.org>
Date: Tue, 1 Mar 2016 08:02:43 -0800
Subject: [PATCH 2/2] Linux Sandbox: whitelist arm64 syscalls
On debian/arm64, two syscalls needed whitelisting for chromium to work with seccomp:
epoll_pwait, replacing epoll_wait which is a legacy syscall not available on arm64. epoll_wait implmentation in glibc calls epoll_pwait behind scenes, so this needs to be enabled.
getrlimit, missing #ifdef for arm64 in several policy definitions. test for arm64 added for each case.
BUG=581018
R=keescook@chromium.org,jln@chromium.org,rsesek@chromium.org
TEST=Start chrome on arm64 with seccomp enabled kernel
Review URL: https://codereview.chromium.org/1613883002
Cr-Commit-Position: refs/heads/master@{#378440}
---
components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc | 3 ++-
content/common/sandbox_linux/bpf_renderer_policy_linux.cc | 3 ++-
content/common/sandbox_linux/bpf_utility_policy_linux.cc | 3 ++-
mojo/shell/runner/host/linux_sandbox.cc | 7 ++++++-
sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc | 2 +-
5 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc b/components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc
index 66a606a..3e88304 100644
--- a/components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc
+++ b/components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc
@@ -106,7 +106,8 @@ ResultExpr NaClBPFSandboxPolicy::EvaluateSyscall(int sysno) const {
// NaCl uses custom signal stacks.
case __NR_sigaltstack:
// Below is fairly similar to the policy for a Chromium renderer.
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__aarch64__)
case __NR_getrlimit:
#endif
#if defined(__i386__) || defined(__arm__)
diff --git a/content/common/sandbox_linux/bpf_renderer_policy_linux.cc b/content/common/sandbox_linux/bpf_renderer_policy_linux.cc
index e799273..993e2a5 100644
--- a/content/common/sandbox_linux/bpf_renderer_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_renderer_policy_linux.cc
@@ -60,7 +60,8 @@ ResultExpr RendererProcessPolicy::EvaluateSyscall(int sysno) const {
// Allow the system calls below.
case __NR_fdatasync:
case __NR_fsync:
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__aarch64__)
case __NR_getrlimit:
#endif
#if defined(__i386__) || defined(__arm__)
diff --git a/content/common/sandbox_linux/bpf_utility_policy_linux.cc b/content/common/sandbox_linux/bpf_utility_policy_linux.cc
index 3ead1c8..1336796 100644
--- a/content/common/sandbox_linux/bpf_utility_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_utility_policy_linux.cc
@@ -32,7 +32,8 @@ ResultExpr UtilityProcessPolicy::EvaluateSyscall(int sysno) const {
// Allow the system calls below.
case __NR_fdatasync:
case __NR_fsync:
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__aarch64__)
case __NR_getrlimit:
#endif
#if defined(__i386__) || defined(__arm__)
diff --git a/mojo/shell/runner/host/linux_sandbox.cc b/mojo/shell/runner/host/linux_sandbox.cc
index 6cd3750..0d9082c 100644
--- a/mojo/shell/runner/host/linux_sandbox.cc
+++ b/mojo/shell/runner/host/linux_sandbox.cc
@@ -39,12 +39,14 @@ intptr_t SandboxSIGSYSHandler(const struct sandbox::arch_seccomp_data& args,
const sandbox::syscall_broker::BrokerProcess* broker_process =
static_cast<const sandbox::syscall_broker::BrokerProcess*>(aux);
switch (args.nr) {
+#if !defined(__aarch64__)
case __NR_access:
return broker_process->Access(reinterpret_cast<const char*>(args.args[0]),
static_cast<int>(args.args[1]));
case __NR_open:
return broker_process->Open(reinterpret_cast<const char*>(args.args[0]),
static_cast<int>(args.args[1]));
+#endif
case __NR_faccessat:
if (static_cast<int>(args.args[0]) == AT_FDCWD) {
return broker_process->Access(
@@ -77,15 +79,18 @@ class SandboxPolicy : public sandbox::BaselinePolicy {
sandbox::bpf_dsl::ResultExpr EvaluateSyscall(int sysno) const override {
// This policy is only advisory/for noticing FS access for the moment.
switch (sysno) {
+#if !defined(__aarch64__)
case __NR_access:
case __NR_open:
+#endif
case __NR_faccessat:
case __NR_openat:
return sandbox::bpf_dsl::Trap(SandboxSIGSYSHandler, broker_process_);
case __NR_sched_getaffinity:
return sandbox::RestrictSchedTarget(policy_pid(), sysno);
case __NR_ftruncate:
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__aarch64__)
// Per #ifdefs in
// content/common/sandbox_linux/bpf_renderer_policy_linux.cc
case __NR_getrlimit:
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
index 10278dc..b30b3e6 100644
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -414,6 +414,7 @@ bool SyscallSets::IsAllowedEpoll(int sysno) {
case __NR_epoll_create:
case __NR_epoll_wait:
#endif
+ case __NR_epoll_pwait:
case __NR_epoll_create1:
case __NR_epoll_ctl:
return true;
@@ -421,7 +422,6 @@ bool SyscallSets::IsAllowedEpoll(int sysno) {
#if defined(__x86_64__)
case __NR_epoll_ctl_old:
#endif
- case __NR_epoll_pwait:
#if defined(__x86_64__)
case __NR_epoll_wait_old:
#endif
--
2.8.0

View file

@ -19,7 +19,7 @@ buildarch=12
highmem=1
pkgname=chromium
pkgver=50.0.2661.102
pkgver=51.0.2704.63
pkgrel=1
_launcher_ver=3
pkgdesc="The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser"
@ -42,8 +42,8 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgn
chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz
chromium.desktop
chromium-widevine.patch
0001-system-ffmpeg-fixes.patch
0002-Linux-Sandbox-whitelist-arm64-syscalls.patch)
PNGImageDecoder.patch
0001-system-ffmpeg-fixes.patch)
sha256sums=('12135ef890c2bd13b653a06e2a44e8f251a65fe9e91404c792d27e346c5d57c6'
'8b01fb4efe58146279858a754d90b49e5a38c9a0b36a1f84cbb7d12f92b84c28'
'028a748a5c275de9b8f776f97909f999a8583a4b77fd1cd600b4fc5c0c3e91e9'
@ -66,21 +66,18 @@ prepare() {
# https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion
touch chrome/test/data/webui/i18n_process_css_test.html
# https://code.google.com/p/chromium/issues/detail?id=541273
sed -i "/'target_name': 'libvpx'/s/libvpx/&_new/" build/linux/unbundle/libvpx.gyp
# Enable support for the Widevine CDM plugin
# libwidevinecdm.so is not included, but can be copied over from Chrome
# (Version string doesn't seem to matter so let's go with "Pinkie Pie")
sed "s/@WIDEVINE_VERSION@/Pinkie Pie/" ../chromium-widevine.patch |
patch -Np1
# Chromium 51 won't build without this patch. Not reported upstream yet AFAIK.
patch -p1 -i "$srcdir"/PNGImageDecoder.patch
# Fix building with system ffmpeg
patch -Np1 -i ../0001-system-ffmpeg-fixes.patch
# Upstream AArch64 fixes
patch -Np1 -i ../0002-Linux-Sandbox-whitelist-arm64-syscalls.patch
# Commentception use bundled ICU due to build failures (50.0.2661.75)
# See https://crbug.com/584920 and https://crbug.com/592268
# ---