NaCl uses a 32bit process for sandboxing, even on 64 bit Windows. This leads to the interesting scenario of 32bit and 64bit processes talking using our IPC channel. While the communication only uses one or two messages now, there will be problems if any size_t's are sent across, since Visual Studio's crt typedefs it as unsigned int/__int64 depending on the platform. Also, if the past is anything to go by, once we have the capability to talk between 32 and 64 bit processes, it will probably get used in other places.So it seems we have no choice but to switch from size_t back to int for IPC. Granted it's not as clean, but it's needed. I'll be sending out code reviews, but I wanted to give a heads up so people know why it's happening
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
NaCl uses a 32bit process for sandboxing, even on 64 bit Windows.
This leads to the interesting scenario of 32bit and 64bit processes talking using our IPC channel. While the communication only uses one or two messages now, there will be problems if any size_t's are sent across, since Visual Studio's crt typedefs it as unsigned int/__int64 depending on the platform.
On Wed, Feb 3, 2010 at 5:53 PM, John Abd-El-Malek <j...@chromium.org> wrote:NaCl uses a 32bit process for sandboxing, even on 64 bit Windows. This leads to the interesting scenario of 32bit and 64bit processes talking using our IPC channel. While the communication only uses one or two messages now, there will be problems if any size_t's are sent across, since Visual Studio's crt typedefs it as unsigned int/__int64 depending on the platform. Also, if the past is anything to go by, once we have the capability to talk between 32 and 64 bit processes, it will probably get used in other places.So it seems we have no choice but to switch from size_t back to int for IPC. Granted it's not as clean, but it's needed. I'll be sending out code reviews, but I wanted to give a heads up so people know why it's happeningAre you talking about all IPC, or just IPC between NaCl processes and the browser?
On Wed, Feb 3, 2010 at 5:53 PM, John Abd-El-Malek <j...@chromium.org> wrote:NaCl uses a 32bit process for sandboxing, even on 64 bit Windows.Can we fix that?
This leads to the interesting scenario of 32bit and 64bit processes talking using our IPC channel. While the communication only uses one or two messages now, there will be problems if any size_t's are sent across, since Visual Studio's crt typedefs it as unsigned int/__int64 depending on the platform.size_t isn't the only type that can vary. How about e.g. ptrdiff_t.
PK
On Wed, Feb 3, 2010 at 6:10 PM, Peter Kasting <pkas...@google.com> wrote:On Wed, Feb 3, 2010 at 5:53 PM, John Abd-El-Malek <j...@chromium.org> wrote:NaCl uses a 32bit process for sandboxing, even on 64 bit Windows.Can we fix that?No, this is a limitation caused by the OS. The 32 bit sandbox that NaCl doesn't work on 64 bit systems, so NaCl modules will have to run inside a 64 bit process there.
I think we should avoid non-precise-sized types in IPC.
Mark
On Wed, Feb 3, 2010 at 6:17 PM, John Abd-El-Malek <j...@chromium.org> wrote:On Wed, Feb 3, 2010 at 6:10 PM, Peter Kasting <pkas...@google.com> wrote:On Wed, Feb 3, 2010 at 5:53 PM, John Abd-El-Malek <j...@chromium.org> wrote:NaCl uses a 32bit process for sandboxing, even on 64 bit Windows.Can we fix that?No, this is a limitation caused by the OS. The 32 bit sandbox that NaCl doesn't work on 64 bit systems, so NaCl modules will have to run inside a 64 bit process there.That wasn't a grammatical sentence, and sadly as a result I'm not quite sure what you meant.
My recollection was that NaCl was building a different sandbox for 64-bit systems. Is it still a 32 bit process that runs in WoW or something?
I'm just really uneasy about this change. size_t -> uint32_t feels icky anyway, but besides that lots of the other types can vary too. Nothing prevents a compiler from making int or long 64 bits. Maybe we don't have any environments where this is true now, but I wouldn't necessarily rely on that being true forever, with Chrome getting ported to more places. If you want the types to be safe between any process, you should consider switching the IPC layer to only use explicitly sized types.
PK
We'll wind up with similar problems on the Mac when we run a 64-bit
browser but need to host a 32-bit plugin.
On Wed, Feb 3, 2010 at 6:25 PM, Peter Kasting <pkas...@google.com> wrote:
On Wed, Feb 3, 2010 at 6:17 PM, John Abd-El-Malek <j...@chromium.org> wrote:
On Wed, Feb 3, 2010 at 6:10 PM, Peter Kasting <pkas...@google.com> wrote:
On Wed, Feb 3, 2010 at 5:53 PM, John Abd-El-Malek <j...@chromium.org> wrote:
NaCl uses a 32bit process for sandboxing, even on 64 bit Windows.
No, this is a limitation caused by the OS. The 32 bit sandbox that NaCl doesn't work on 64 bit systems, so NaCl modules will have to run inside a 64 bit process there.
... that NaCl _uses_ doesn't ...
It's a 64 bit process. Chrome will still be 32 bit even on 64 bit Windows.
On Wed, Feb 3, 2010 at 6:43 PM, John Abd-El-Malek <j...@chromium.org> wrote:On Wed, Feb 3, 2010 at 6:25 PM, Peter Kasting <pkas...@google.com> wrote:On Wed, Feb 3, 2010 at 6:17 PM, John Abd-El-Malek <j...@chromium.org> wrote:On Wed, Feb 3, 2010 at 6:10 PM, Peter Kasting <pkas...@google.com> wrote:On Wed, Feb 3, 2010 at 5:53 PM, John Abd-El-Malek <j...@chromium.org> wrote:NaCl uses a 32bit process for sandboxing, even on 64 bit Windows.No, this is a limitation caused by the OS. The 32 bit sandbox that NaCl doesn't work on 64 bit systems, so NaCl modules will have to run inside a 64 bit process there.... that NaCl _uses_ doesn't ...It's a 64 bit process. Chrome will still be 32 bit even on 64 bit Windows.So, backwards from what you originally said? I'm still confused, but I guess it doesn't matter.
Also, I can pretty much guarantee you Chrome won't be 32-bit only on Windows forever.
I agree with Mark; just used explicitly-sized types everywhere, it's clear and safe and if someone adds a new message it's obvious what to do.
PK
I agree with Mark; just used explicitly-sized types everywhere, it's clear and safe and if someone adds a new message it's obvious what to do.Agreed, which is why this is happening :)
PK
Yes, it definitely will be. We're just waiting on support from a
couple of dependencies now - mostly Breakpad.
Mark