From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by arago-project.org (Postfix) with ESMTPS id F034F52982 for ; Thu, 25 May 2017 21:13:41 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v4PLDfnS020402 for ; Thu, 25 May 2017 16:13:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1495746821; bh=3VjWTL9RJjKw0N/xBzRA7EM0KTB2m0G8KIs39szMPGI=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=uIvAHnU3Pn72rT9yuVaOpY7U1oUw78ieia+WQiJ4c0rWbNMeS0v9pwdn9hhDwDVyY 47MZA+b0tGAjurPzGWmQzlZKHZ61Rua+VWJ4/xvW3b15kIW1KhP/+qiDKEcPASmIpv 9iSlmOgcGlKGqZq8NonlxlvUse/uNemS9jfe4zfo= Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v4PLDfD2014188 for ; Thu, 25 May 2017 16:13:41 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Thu, 25 May 2017 16:13:41 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v4PLDfMc018778; Thu, 25 May 2017 16:13:41 -0500 Date: Thu, 25 May 2017 17:13:25 -0400 From: Denys Dmytriyenko To: Eric Ruei Message-ID: <20170525211325.GJ28136@edge> References: <1495746550-49109-1-git-send-email-e-ruei1@ti.com> MIME-Version: 1.0 In-Reply-To: <1495746550-49109-1-git-send-email-e-ruei1@ti.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: meta-arago@arago-project.org Subject: Re: [morty/master][PATCH v2] qtwebengine: add patches as workarond of the following three issues X-BeenThere: meta-arago@arago-project.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Arago metadata layer for TI SDKs - OE-Core/Yocto compatible List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 21:13:42 -0000 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Thanks! I'll queue it up for "next" branch testing. On Thu, May 25, 2017 at 05:09:10PM -0400, Eric Ruei wrote: > - fix system crash due to mismatched GLES2 library version > - set default logging level back to LOG_FATAL to avoid unnecessary warnings > - disable SECCOMP-BPF Sandbox > > > Signed-off-by: Eric Ruei > --- > ...-fix-the-system-crash-due-to-mismatched-G.patch | 71 ++++++++++++++++++++++ > ...-set-default-logging-level-back-to-LOG_FA.patch | 47 ++++++++++++++ > ...-HACK-disable-SECCOMP-BPF-Sandbox-at-star.patch | 34 +++++++++++ > .../recipes-qt/qt5/qtwebengine_git.bbappend | 8 +++ > 4 files changed, 160 insertions(+) > create mode 100755 meta-arago-distro/recipes-qt/qt5/qtwebengine/0001-qtwebengine-fix-the-system-crash-due-to-mismatched-G.patch > create mode 100755 meta-arago-distro/recipes-qt/qt5/qtwebengine/0002-qtwebengine-set-default-logging-level-back-to-LOG_FA.patch > create mode 100755 meta-arago-distro/recipes-qt/qt5/qtwebengine/0003-qtwebengine-HACK-disable-SECCOMP-BPF-Sandbox-at-star.patch > create mode 100644 meta-arago-distro/recipes-qt/qt5/qtwebengine_git.bbappend > > diff --git a/meta-arago-distro/recipes-qt/qt5/qtwebengine/0001-qtwebengine-fix-the-system-crash-due-to-mismatched-G.patch b/meta-arago-distro/recipes-qt/qt5/qtwebengine/0001-qtwebengine-fix-the-system-crash-due-to-mismatched-G.patch > new file mode 100755 > index 0000000..56b724d > --- /dev/null > +++ b/meta-arago-distro/recipes-qt/qt5/qtwebengine/0001-qtwebengine-fix-the-system-crash-due-to-mismatched-G.patch > @@ -0,0 +1,71 @@ > +From e42a0566079a86c3b637b058ac6a5ad3b3ee6f5b Mon Sep 17 00:00:00 2001 > +From: Eric Ruei > +Date: Thu, 25 May 2017 16:44:51 -0400 > +Subject: [PATCH 1/3] qtwebengine: fix the system crash due to mismatched GLES2 > + library version > + > +- define QT_LIB_GLES2 as "libGLESv2.so.1" > +- remove the Q_UNREACHABLE() which causes unnecessary system crash at > + GLSurface::CreateOffscreenGLSurface( > + > +Upstream-Status: Inappropriate > +This patch is for TI only because the libGLESv2.so.1 is provided by IMG DDK 1.14. > +The issue is expected to be resolved by DDK 1.15 or DDK 1.16 when MESA-style > +libraries are provided. > + > +Signed-off-by: Eric Ruei > +--- > + src/core/gl_surface_qt.cpp | 5 +++-- > + src/core/surface_factory_qt.cpp | 11 +++++++++-- > + 2 files changed, 12 insertions(+), 4 deletions(-) > + > +diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp > +index e7b4536..f020be9 100644 > +--- a/src/core/gl_surface_qt.cpp > ++++ b/src/core/gl_surface_qt.cpp > +@@ -619,8 +619,9 @@ GLSurface::CreateOffscreenGLSurface(const gfx::Size& size) > + default: > + break; > + } > +- LOG(ERROR) << "Requested OpenGL platform is not supported."; > +- Q_UNREACHABLE(); > ++ LOG(ERROR) << "Requested OpenGL platform is not supported."; > ++ // This is no longer an unreachable code. It is OK to return NULL if any prior operation fails > ++ // Q_UNREACHABLE(); > + return NULL; > + } > + > +diff --git a/src/core/surface_factory_qt.cpp b/src/core/surface_factory_qt.cpp > +index 48c91bf..134a866 100644 > +--- a/src/core/surface_factory_qt.cpp > ++++ b/src/core/surface_factory_qt.cpp > +@@ -57,8 +57,13 @@ > + #endif > + #ifndef QT_LIBDIR_GLES2 > + #define QT_LIBDIR_GLES2 QT_LIBDIR_EGL > ++#endif > ++ > ++#ifndef QT_LIB_GLES2 > ++#define QT_LIB_GLES2 "libGLESv2.so.1" > + #endif > + > ++ > + namespace QtWebEngineCore { > + > + base::NativeLibrary LoadLibrary(const base::FilePath& filename) { > +@@ -79,8 +84,10 @@ bool SurfaceFactoryQt::LoadEGLGLES2Bindings(AddGLLibraryCallback add_gl_library, > + if (!eglLibrary) > + return false; > + > +- base::FilePath libGLES2Path = QtWebEngineCore::toFilePath(QT_LIBDIR_GLES2); > +- libGLES2Path = libGLES2Path.Append("libGLESv2.so.2"); > ++ base::FilePath libGLES2Path = QtWebEngineCore::toFilePath(QT_LIBDIR_GLES2); > ++ // It does not make sence to expect the version of libGLESv2 to be 2 as libGLESv2.so.2 > ++ // It will be better to use another #define for user to reconfigure the library name > ++ libGLES2Path = libGLES2Path.Append(QT_LIB_GLES2); > + base::NativeLibrary gles2Library = LoadLibrary(libGLES2Path); > + if (!gles2Library) > + return false; > +-- > +1.9.1 > + > diff --git a/meta-arago-distro/recipes-qt/qt5/qtwebengine/0002-qtwebengine-set-default-logging-level-back-to-LOG_FA.patch b/meta-arago-distro/recipes-qt/qt5/qtwebengine/0002-qtwebengine-set-default-logging-level-back-to-LOG_FA.patch > new file mode 100755 > index 0000000..1486d17 > --- /dev/null > +++ b/meta-arago-distro/recipes-qt/qt5/qtwebengine/0002-qtwebengine-set-default-logging-level-back-to-LOG_FA.patch > @@ -0,0 +1,47 @@ > +From 7e2a1b06447693c588a0608cef22636bc6edb466 Mon Sep 17 00:00:00 2001 > +From: Eric Ruei > +Date: Thu, 25 May 2017 16:55:38 -0400 > +Subject: [PATCH 2/3] qtwebengine: set default logging level back to LOG_FATAL > + > +Suppress info, warning and error messages by default to be consistent > +with QT5.6.2 behavior > + > +Upstream-Status: Inappropriate > +It is clear that this workaround reverses the course of QT, but we do need > +this change as described above. > + > +Signed-off-by: Eric Ruei > +--- > + src/core/content_main_delegate_qt.cpp | 9 ++++++++- > + 1 file changed, 8 insertions(+), 1 deletion(-) > + > +diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp > +index 8bd07ef..6d8cfb1 100644 > +--- a/src/core/content_main_delegate_qt.cpp > ++++ b/src/core/content_main_delegate_qt.cpp > +@@ -111,14 +111,21 @@ void ContentMainDelegateQt::PreSandboxStartup() > + settings.logging_dest = DetermineLogMode(*parsedCommandLine); > + logging::InitLogging(settings); > + > ++ // Suppress info, warning and error messages per default. > ++ int logLevel = logging::LOG_FATAL; > ++ > + if (logging::GetMinLogLevel() >= logging::LOG_INFO) { > + if (parsedCommandLine->HasSwitch(switches::kLoggingLevel)) { > + std::string logLevelValue = parsedCommandLine->GetSwitchValueASCII(switches::kLoggingLevel); > + int level = 0; > + if (base::StringToInt(logLevelValue, &level) && level >= logging::LOG_INFO && level < logging::LOG_NUM_SEVERITIES) > +- logging::SetMinLogLevel(level); > ++ logLevel = level; > ++ //logging::SetMinLogLevel(level); > + } > + } > ++ > ++ logging::SetMinLogLevel(logLevel); > ++ > + } > + > + content::ContentBrowserClient *ContentMainDelegateQt::CreateContentBrowserClient() > +-- > +1.9.1 > + > diff --git a/meta-arago-distro/recipes-qt/qt5/qtwebengine/0003-qtwebengine-HACK-disable-SECCOMP-BPF-Sandbox-at-star.patch b/meta-arago-distro/recipes-qt/qt5/qtwebengine/0003-qtwebengine-HACK-disable-SECCOMP-BPF-Sandbox-at-star.patch > new file mode 100755 > index 0000000..8ac434a > --- /dev/null > +++ b/meta-arago-distro/recipes-qt/qt5/qtwebengine/0003-qtwebengine-HACK-disable-SECCOMP-BPF-Sandbox-at-star.patch > @@ -0,0 +1,34 @@ > +From 5e4eef86271cbb83d9a37e889485dc0fde9b8798 Mon Sep 17 00:00:00 2001 > +From: Eric Ruei > +Date: Thu, 25 May 2017 17:00:43 -0400 > +Subject: [PATCH 3/3] qtwebengine: HACK: disable SECCOMP-BPF Sandbox at startup > + > +SECCOMP-BPF Sandbox does not work due to unexpected FUTEX_UNLOCK_PI call > +from the pthread implementation > +Disable this feature temporarily until those issues are resolved. > + > +Upstream-Status: Inappropriate [HACK] > + > +Signed-off-by: Eric Ruei > +--- > + src/core/web_engine_context.cpp | 4 +++- > + 1 file changed, 3 insertions(+), 1 deletion(-) > + > +diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp > +index 39e11a9..ae51097 100644 > +--- a/src/core/web_engine_context.cpp > ++++ b/src/core/web_engine_context.cpp > +@@ -281,7 +281,9 @@ WebEngineContext::WebEngineContext() > + #if defined(Q_OS_WIN) > + parsedCommandLine->AppendSwitch(switches::kNoSandbox); > + #elif defined(Q_OS_LINUX) > +- parsedCommandLine->AppendSwitch(switches::kDisableSetuidSandbox); > ++ parsedCommandLine->AppendSwitch(switches::kDisableSetuidSandbox); > ++ // HACK: disable seccomp filter sandbox for now because it does not work > ++ parsedCommandLine->AppendSwitch(switches::kDisableSeccompFilterSandbox); > + #endif > + } else { > + parsedCommandLine->AppendSwitch(switches::kNoSandbox); > +-- > +1.9.1 > + > diff --git a/meta-arago-distro/recipes-qt/qt5/qtwebengine_git.bbappend b/meta-arago-distro/recipes-qt/qt5/qtwebengine_git.bbappend > new file mode 100644 > index 0000000..794459a > --- /dev/null > +++ b/meta-arago-distro/recipes-qt/qt5/qtwebengine_git.bbappend > @@ -0,0 +1,8 @@ > +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" > +PR_append = ".arago0" > + > +SRC_URI += " \ > + file://0001-qtwebengine-fix-the-system-crash-due-to-mismatched-G.patch \ > + file://0002-qtwebengine-set-default-logging-level-back-to-LOG_FA.patch \ > + file://0003-qtwebengine-HACK-disable-SECCOMP-BPF-Sandbox-at-star.patch \ > +" > -- > 1.9.1 > > _______________________________________________ > meta-arago mailing list > meta-arago@arago-project.org > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago