summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel.cc
Commit message (Collapse)AuthorAgeFilesLines
* Switch to standard integer types in ipc/.avi2015-12-221-0/+2
| | | | | | | | | BUG=138542 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1546533002 Cr-Commit-Position: refs/heads/master@{#366527}
* ipc: Add the inner class OutputElement to Channel.erikchen2015-09-101-0/+10
| | | | | | | | | | | | OutputElement is a wrapper around messages that are going to be written to the underlying OS IPC mechanism. It can wrap either a Message, or a data buffer which contains serialized attachment broker metainformation. BUG=493414 Review URL: https://codereview.chromium.org/1309003003 Cr-Commit-Position: refs/heads/master@{#348229}
* ipc: Convert int types from basictypes.h to the ones from stdint.htfarina2015-09-041-1/+3
| | | | | | | | | | | | | | Now that the supported toolchain has stdint.h, use the integer types from this standard header file. BUG=138542 TEST=ipc_tests R=tsepez@chromium.org TBR=sadrul@chromium.org # for ui/ Review URL: https://codereview.chromium.org/1322253003 Cr-Commit-Position: refs/heads/master@{#347457}
* Revert of IPC: Add attachment brokering support to the message header. ↵erikchen2015-08-271-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #3 id:40001 of https://codereview.chromium.org/1303103002/ ) Reason for revert: Reverting on suspicion of causing crashes in Canary. https://code.google.com/p/chromium/issues/detail?id=524032 Original issue's description: > Reland #1: IPC: Add attachment brokering support to the message header. > > This reland fixes a race condition in the unit test SendHandleTwice that caused > the test to flakily fail, mostly on XP machines. This reland also updates switch > statements to contain a block for the newly added enum > BrokerableAttachment::PLACEHOLDER, which was causing problems with the clang > Windows build. > > > Message dispatch happens before message translation, and message dispatch > > requires that all brokered attachments have been received. This means that > > attachment brokering needs to function without message translation. This is > > accomplished by modifying the message header to include a new field > > num_brokered_attachments, and writing the attachment ids into the IPC Channel > > immediately following the pickled message itself. > > > > AttachmentBrokerPrivilegedWinUnittest was expanded to test ChannelReader in the > > receiving process. It is now a fully functional end-to-end test of attachment > > brokering. > > > > BUG=493414 > > TBR=tsepez@chromium.org > BUG=493414 > > Committed: https://crrev.com/37a2e0b682555bf35852d707dbd74b68f345841f > Cr-Commit-Position: refs/heads/master@{#344933} TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=493414 Review URL: https://codereview.chromium.org/1312433009 Cr-Commit-Position: refs/heads/master@{#345960}
* Reland #1: IPC: Add attachment brokering support to the message header.erikchen2015-08-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reland fixes a race condition in the unit test SendHandleTwice that caused the test to flakily fail, mostly on XP machines. This reland also updates switch statements to contain a block for the newly added enum BrokerableAttachment::PLACEHOLDER, which was causing problems with the clang Windows build. > Message dispatch happens before message translation, and message dispatch > requires that all brokered attachments have been received. This means that > attachment brokering needs to function without message translation. This is > accomplished by modifying the message header to include a new field > num_brokered_attachments, and writing the attachment ids into the IPC Channel > immediately following the pickled message itself. > > AttachmentBrokerPrivilegedWinUnittest was expanded to test ChannelReader in the > receiving process. It is now a fully functional end-to-end test of attachment > brokering. > > BUG=493414 TBR=tsepez@chromium.org BUG=493414 Review URL: https://codereview.chromium.org/1303103002 Cr-Commit-Position: refs/heads/master@{#344933}
* Revert of IPC: Add attachment brokering support to the message header. ↵ricea2015-08-201-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #20 id:420001 of https://codereview.chromium.org/1286253002/ ) Reason for revert: Suspected of breaking XP Tests. See, for example https://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/39586 . Original issue's description: > IPC: Add attachment brokering support to the message header. > > Message dispatch happens before message translation, and message dispatch > requires that all brokered attachments have been received. This means that > attachment brokering needs to function without message translation. This is > accomplished by modifying the message header to include a new field > num_brokered_attachments, and writing the attachment ids into the IPC Channel > immediately following the pickled message itself. > > AttachmentBrokerPrivilegedWinUnittest was expanded to test ChannelReader in the > receiving process. It is now a fully functional end-to-end test of attachment > brokering. > > BUG=493414 > > Committed: https://crrev.com/e8e4f4fa67ee9db6c2910020ef49318e5df68481 > Cr-Commit-Position: refs/heads/master@{#344389} TBR=tsepez@chromium.org,thakis@chromium.org,erikchen@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=493414 Review URL: https://codereview.chromium.org/1286883003 Cr-Commit-Position: refs/heads/master@{#344461}
* IPC: Add attachment brokering support to the message header.erikchen2015-08-201-0/+22
| | | | | | | | | | | | | | | | | | | Message dispatch happens before message translation, and message dispatch requires that all brokered attachments have been received. This means that attachment brokering needs to function without message translation. This is accomplished by modifying the message header to include a new field num_brokered_attachments, and writing the attachment ids into the IPC Channel immediately following the pickled message itself. AttachmentBrokerPrivilegedWinUnittest was expanded to test ChannelReader in the receiving process. It is now a fully functional end-to-end test of attachment brokering. BUG=493414 Review URL: https://codereview.chromium.org/1286253002 Cr-Commit-Position: refs/heads/master@{#344389}
* Non-SFI mode: Use dummy PID for NaCl's IPC channel for nacl_helper_nonsfi.hidehiko2015-02-031-1/+6
| | | | | | | | | | | | | | | | | | | | | In nacl_helper_nonsfi, getpid() is prohibited to be called by seccomp-bpf (will be implemented somehow soon). So, base::GetCurrentProcID() used in IPC library, which uses getpid(), would cause a SIGSYS crashing. As, in nacl_helper_nonsfi, PID is actually not used, so this CL replaces it with -1 (dummy PID). Note that the more generic CL crrev.com/695353005, which replaces PID with dummy also on Linux platforms, was landed once, but reverted due to it was still in use (crbug.com/441312). This CL extracts only Non-SFI related part to avoid breakage. TEST=Ran bots. BUG=358465, 441312 CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_rel_precise32,linux_arm Review URL: https://codereview.chromium.org/879303004 Cr-Commit-Position: refs/heads/master@{#314283}
* Revert "Non-SFI mode: Use dummy PID for NaCl's IPC channel and IPC channel ↵perkj2014-12-111-7/+0
| | | | | | | | | | | | | | | | on Linux platform." This reverts commit d3eb0838097cbffb09005db2b66ffcdd7e2b9417. Reason for revert, it breaks chrome://webrtc_internals on Linux. BUG=441312,358465 TBR=hidehiko@chromium.org Review URL: https://codereview.chromium.org/795153002 Cr-Commit-Position: refs/heads/master@{#307922}
* Non-SFI mode: Use dummy PID for NaCl's IPC channel and IPC channel on Linux ↵hidehiko2014-12-111-0/+7
| | | | | | | | | | | | | | | | platform. We do not want to expose PID from process on Linux, because it does not play any security role. Specifically, in NaCl processes, now although getpid() syscall is prohibited by seccomp sandbox, it looks working, probably because of the cache in libc layer. By this CL, Linux IPC, including nacl_helper_nonsfi, uses dummy PID (-1). Note; as for nacl_helper process, currently, the process is under PID namespace, so "dummy-like-" PID is already used. BUG=358465 TEST=Ran trybot. Review URL: https://codereview.chromium.org/695353005 Cr-Commit-Position: refs/heads/master@{#307853}
* Non-SFI Mode: Build ipc/ library by PNaCl toolchain for nacl_helper_nonsfi.hidehiko2014-10-241-3/+0
| | | | | | | | | | | | | | | | | | This CL is to build ipc/ for nacl_helper_nonsfi. The library is similar to ipc_nacl, but slightly different: - The IPC::Channel should use ChannelPosix rather than ChannelNaCl, as it runs under linux directly. - Some features of ChannelPosix cannot be compiled by PNaCl toolchain for Non-SFI build, but these are not necessary for nacl_helper_nonsfi. These are dropped by "ifdef" guard. Note that this library is not used yet, but should be built successfully. BUG=358465 TEST=Ran trybot. Implement nacl_helper_nonsfi on top of this CL, and made sure it works. Review URL: https://codereview.chromium.org/659243002 Cr-Commit-Position: refs/heads/master@{#301037}
* Update include paths in ipc for base/process changes.rsesek@chromium.org2013-07-241-1/+0
| | | | | | | | | BUG=242290 R=cpu@chromium.org Review URL: https://chromiumcodereview.appspot.com/19525007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213349 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in ipc/, jingle/, media/.avi@chromium.org2013-06-111-1/+1
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16684003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205436 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build warnings in NaCl IPC proxy.bbudge@chromium.org2012-09-281-4/+0
| | | | | | | | | BUG=116317 TEST=builds Review URL: https://chromiumcodereview.appspot.com/10982031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159344 0039d316-1c4b-4281-b951-d872f2087c98
* nacl: Fix a bunch of compiler warningsthakis@chromium.org2012-09-241-0/+2
| | | | | | | | | BUG=148648 TBR=dmichael Review URL: https://codereview.chromium.org/10959063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158232 0039d316-1c4b-4281-b951-d872f2087c98
* Add untrusted NaCl build for PPAPI proxy.bbudge@chromium.org2012-06-161-5/+4
| | | | | | | | | | This patch refactors ppapi_shared.gypi and ppapi_proxy.gypi into proper includes, adds ppapi_shared_untrusted and ppapi_proxy_untrusted .gyp files, and integrates them into the nacl_irt build (ppapi/native_client/native_client.gyp). In order to build without link errors, it includes our plugin side initialization of PluginDispatcher, and a PpapiPluginMain definition. When the 'build_ppapi_ipc_proxy_untrusted' gyp flag is set to '1', this will build a working NaCl IRT using the Chrome IPC proxy. BUG=116317 TEST=compiles, runs HelloWorld and GetURL SDK examples. Review URL: https://chromiumcodereview.appspot.com/10565015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142540 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 142482 - Add untrusted NaCl build for PPAPI proxy.bbudge@chromium.org2012-06-151-4/+5
| | | | | | | | | | | | | This patch refactors ppapi_shared.gypi and ppapi_proxy.gypi into proper includes, adds ppapi_shared_untrusted and ppapi_proxy_untrusted .gyp files, and integrates them into the nacl_irt build (ppapi/native_client/native_client.gyp). In order to build without link errors, it includes our plugin side initialization of PluginDispatcher, and a PpapiPluginMain definition. When the 'build_ppapi_ipc_proxy_untrusted' gyp flag is set to '1', this will build a working NaCl IRT using the Chrome IPC proxy. BUG=116317 TEST=compiles, runs HelloWorld and GetURL SDK examples. Review URL: https://chromiumcodereview.appspot.com/10546140 TBR=bbudge@chromium.org Review URL: https://chromiumcodereview.appspot.com/10565012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142494 0039d316-1c4b-4281-b951-d872f2087c98
* Add untrusted NaCl build for PPAPI proxy.bbudge@chromium.org2012-06-151-5/+4
| | | | | | | | | | This patch refactors ppapi_shared.gypi and ppapi_proxy.gypi into proper includes, adds ppapi_shared_untrusted and ppapi_proxy_untrusted .gyp files, and integrates them into the nacl_irt build (ppapi/native_client/native_client.gyp). In order to build without link errors, it includes our plugin side initialization of PluginDispatcher, and a PpapiPluginMain definition. When the 'build_ppapi_ipc_proxy_untrusted' gyp flag is set to '1', this will build a working NaCl IRT using the Chrome IPC proxy. BUG=116317 TEST=compiles, runs HelloWorld and GetURL SDK examples. Review URL: https://chromiumcodereview.appspot.com/10546140 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142482 0039d316-1c4b-4281-b951-d872f2087c98
* Add ipc_channel_nacl to the untrusted build and fix all compile/link errors.bbudge@chromium.org2012-04-231-1/+7
| | | | | | | | | ppapi_proxy_untrusted.gyp should now build with a single link error for main. BUG=116317 TEST=builds with a single link error for main(). Review URL: https://chromiumcodereview.appspot.com/10167024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133519 0039d316-1c4b-4281-b951-d872f2087c98
* Verify the child process with a secret hellojschuh@chromium.org2012-03-171-0/+40
BUG=117627 TEST=IPCSyncChannelTest.Verified Review URL: http://codereview.chromium.org/9692035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127327 0039d316-1c4b-4281-b951-d872f2087c98