Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Issue 2104533002: Ensure native library isn't actually loaded, and no IO on net thread (Closed)

Created:
4 years, 5 months ago by pauljensen
Modified:
4 years, 5 months ago
Reviewers:
xunjieli
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure native library isn't actually loaded, and no IO on net thread LoadNativeLibrary asserts because IO is possible, so call dlopen() directly with flag ensuring no IO actually happens. We need to access libnetd_client.so, which is guaranteed to be loaded by the point where it's needed as socket() is guaranteed to be called which libnetd_client.so handles. BUG=623555 R=xunjieli Committed: https://crrev.com/25ea5bc3b93a92ced13ac18936a34053521c4bca Cr-Commit-Position: refs/heads/master@{#402817}

Patch Set 1 #

Patch Set 2 : bug link #

Total comments: 2

Patch Set 3 : rebase #

Patch Set 4 : redo with dlopen directly #

Total comments: 4

Patch Set 5 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -4 lines) Patch
M net/udp/udp_socket_posix.cc View 1 2 3 4 2 chunks +11 lines, -4 lines 0 comments Download

Messages

Total messages: 26 (9 generated)
pauljensen
Helen, PTAL.
4 years, 5 months ago (2016-06-27 18:28:45 UTC) #1
xunjieli
https://codereview.chromium.org/2104533002/diff/20001/net/udp/udp_socket_posix.cc File net/udp/udp_socket_posix.cc (right): https://codereview.chromium.org/2104533002/diff/20001/net/udp/udp_socket_posix.cc#newcode355 net/udp/udp_socket_posix.cc:355: base::GetNativeLibraryName(base::ASCIIToUTF16("netd_client")))); If we already have netd_client loaded in Chromium's ...
4 years, 5 months ago (2016-06-27 18:54:16 UTC) #2
pauljensen
https://codereview.chromium.org/2104533002/diff/20001/net/udp/udp_socket_posix.cc File net/udp/udp_socket_posix.cc (right): https://codereview.chromium.org/2104533002/diff/20001/net/udp/udp_socket_posix.cc#newcode355 net/udp/udp_socket_posix.cc:355: base::GetNativeLibraryName(base::ASCIIToUTF16("netd_client")))); On 2016/06/27 18:54:16, xunjieli wrote: > If we ...
4 years, 5 months ago (2016-06-27 19:07:11 UTC) #3
xunjieli
lgtm. Thanks for the explanations! I was reading the code wrong. It makes more sense ...
4 years, 5 months ago (2016-06-27 19:22:58 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2104533002/20001
4 years, 5 months ago (2016-06-28 11:24:28 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: ios-device-gn on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/27920) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 5 months ago (2016-06-28 11:26:03 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2104533002/40001
4 years, 5 months ago (2016-06-28 11:33:19 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/208351)
4 years, 5 months ago (2016-06-28 11:40:11 UTC) #13
pauljensen
Helen, so it appears the ScopedAllowIO thing is quite prohibited (I can't upload without --bypass-hooks ...
4 years, 5 months ago (2016-06-28 13:00:19 UTC) #15
pauljensen
On 2016/06/28 13:00:19, pauljensen wrote: > Helen, so it appears the ScopedAllowIO thing is quite ...
4 years, 5 months ago (2016-06-29 13:12:25 UTC) #16
xunjieli
https://codereview.chromium.org/2104533002/diff/60001/net/udp/udp_socket_posix.cc File net/udp/udp_socket_posix.cc (right): https://codereview.chromium.org/2104533002/diff/60001/net/udp/udp_socket_posix.cc#newcode7 net/udp/udp_socket_posix.cc:7: #include <dlfcn.h> Should this header be in the #if ...
4 years, 5 months ago (2016-06-29 13:35:09 UTC) #17
pauljensen
https://codereview.chromium.org/2104533002/diff/60001/net/udp/udp_socket_posix.cc File net/udp/udp_socket_posix.cc (right): https://codereview.chromium.org/2104533002/diff/60001/net/udp/udp_socket_posix.cc#newcode7 net/udp/udp_socket_posix.cc:7: #include <dlfcn.h> On 2016/06/29 13:35:09, xunjieli wrote: > Should ...
4 years, 5 months ago (2016-06-29 13:45:50 UTC) #18
xunjieli
lgtm
4 years, 5 months ago (2016-06-29 13:54:17 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2104533002/80001
4 years, 5 months ago (2016-06-29 14:18:22 UTC) #21
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 5 months ago (2016-06-29 15:28:25 UTC) #23
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-06-29 15:28:27 UTC) #24
commit-bot: I haz the power
4 years, 5 months ago (2016-06-29 15:31:18 UTC) #26
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/25ea5bc3b93a92ced13ac18936a34053521c4bca
Cr-Commit-Position: refs/heads/master@{#402817}

Powered by Google App Engine
This is Rietveld 408576698