Граф коммитов

29 Коммитов

Автор SHA1 Сообщение Дата
Chris Pearce f706b0c753 Bug 1245789 - Add GMPAdapter which can be passed to GMPLoader to adapt non GMP library to GMP API. r=gerald
This means we can pass a non GMP library to GMPLoader::Load() and the adapter will make it usable.


MozReview-Commit-ID: GihjX2JRw3l
2016-04-12 16:12:20 +12:00
Jean-Yves Avenard a9394d5946 Bug 1240411: P5. Clean up GMP headers. r=cpearce
Remove redundant virtual keywords
2016-01-19 19:47:32 +11:00
Nathan Froyd ffeb7c7fe3 Bug 1229963 - use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in dom/media/; r=cpearce 2015-12-02 18:07:59 -05:00
Ehsan Akhgari 2bc6fae605 Add a missing include to GMPLoader.cpp to fix local OSX builds, no bug 2015-11-23 10:10:44 -05:00
Gerald Squelart 2617625048 Bug 1220326 - Wipe stack after Mac node id generation. r=jrmuizel
Implemented GetStackAfterCurrentFrame() for Mac, by finding which Mach VM
region contains the stack, then erasing everything between the start of the
region (lowest possible stack address) and the current stack frame pointer.
2015-11-16 11:51:00 -05:00
Gerald Squelart ccb6be36b4 Bug 1214018 - p4: Use machine_id_mac in GMPLoader - r=cpearce
Having HASH_NODE_ID_WITH_DEVICE_ID #defined is enough for GMPLoader to start
using the Mac version of GetRawMachineId.

Note: The stack (that may contain information gathered during GetRawMachineId)
is not erased, so it could theoretically be possible for a compromised GMP to
find out some sensitive user information. Another bug will deal with this.
2015-10-29 16:27:00 +01:00
Gerald Squelart b5784fbd39 Bug 1214018 - p1: Using vector to pass machine id - r=cpearce
GetRawMachineId was returning its generated data through a 'string16', which on
Windows was conveniently equivalent to a std::wstring.

However on Mac, wstring uses 32-bit characters, so in order to comply with the
string16 interface, a lot of non-trivial code would have to be imported and
vetted.

Also, in the end GMPLoader::Load passes this string16 to SHA256_Update() as a
sequence of bytes, the actual type of the data is lost!

So to simplify this work, GetRawMachineId will now return its data through a
vector of bytes, and the platform-dependent implementations may use whatever
data type they want internally.

The Windows GetRawMachineId actually returns the same data in this vector, so
it stays compatible with the previous code.
2015-10-29 16:25:00 +01:00
Bob Owen 2233e7518a Bug 1187031: Move back to using USER_LOCKDOWN for the GMP sandbox policy on Windows. r=aklotz
This also removes turning off optimization for the Load function. That was an
attempt to fix the side-by-side loading. It may also have helped with ensuring
that the memsets were not optimized, but that has been fixed by Bug 1208892.
2015-10-21 08:46:57 +01:00
Ehsan Akhgari ad3a3c6527 Bug 1208892 - Replace the uses of memset to clean up data in GMPLoader::Load with an inline memset; r=cpearce
This is found by Viva64.  Because the data we're memsetting to 0
may not be used after this point, the compiler can eliminate the
memsets.  We need to roll our own inline memset that cannot be
optimized away.
2015-09-27 17:46:04 -04:00
Bob Owen 607371b8d4 Bug 1197007: Turn off optimization for GMPLoaderImpl::Load. r=cpearce 2015-09-09 07:34:56 +01:00
Jacek Caban 403c515868 Bug 1188439 - Fixed GMPLoader.cpp compilation with sandbox disabled. r=cpearce 2015-07-29 12:27:07 +02:00
Chris Pearce c629cf3789 Bug 1184333 - Handle UTF8 paths as input for GMP loading. r=bobowen 2015-07-17 11:09:49 +12:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Chris Pearce aa0f7c2a75 Bug 1164245 - Add envvar check to disable stack clearing after generating GMP node id. r=edwin 2015-06-10 14:42:10 +12:00
Steven Michaud 551b2900b8 Bug 1167494 - Build error with --disable-sandbox on OS X. r=jld 2015-05-29 11:07:06 -05:00
Steven Michaud 33228918ed Bug 1110911 - Move Mac sandboxing code into plugin-container. r=cpearce,areinald,jld 2015-04-03 11:51:41 -05:00
Bob Owen eef3ca5f6e Bug 1119878 Part 1: Change SandboxTarget to hold sandbox target services to provide functions. r=aklotz, r=glandium, r=cpearce 2015-04-01 09:40:35 +01:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Bob Owen 9bff5f0ad0 Bug 1094370: Use the USER_LOCKDOWN access token for GMP processes. r=aklotz 2015-01-26 10:14:39 +00:00
Masatoshi Kimura bf312ad056 Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo 2015-01-11 11:34:52 +09:00
Chris Pearce 2e9cf595cd Bug 1114867 - Manually inline RtlSecureZeroMemory in GMPLoader, to ensure it doesn't wipe its own stack while running. r=dmajor 2015-01-06 07:36:42 +13:00
Chris Pearce 93923b922e Bug 1114867 - Revert c29ebd2b4a10. r=dmajor 2015-01-06 07:36:39 +13:00
Chris Pearce 03dbaa0232 Bug 1101308 - Remove code to zero stack after GMP device binding as it's causing crashes. r=edwin 2014-12-22 19:59:00 +01:00
Daniel Holbert 3229ae5426 Bug 1105065: Remove an #ifdef, to fix a -Wunused-private-field build warning in GMPLoader.cpp for builds with --disable-sandbox. r=cpearce 2014-12-19 10:12:23 -08:00
Jed Davis e78aaded67 Bug 1101170 - Move GMP's LinuxSandboxStarter into plugin-container. r=cpearce r=glandium 2014-11-24 15:22:14 -08:00
Jacek Caban c44c25bce3 Bug 1100963 - Fixed Windows compilation with disabled sandbox. r=cpearce 2014-11-19 11:07:52 +01:00
Chris Pearce a5cac33aae Bug 1088488 - During GMP loading, zero stack memory after binding origin salt with device id. r=dmajor 2014-11-14 21:39:24 +13:00
Chris Pearce eb5bfa0cf3 Bug 1088488 - On Windows only, use librlz and SHA256 code to generate a device-bound node id inside plugin-container, pass to GMP. r=henri,r=jesup 2014-11-14 21:39:18 +13:00
Chris Pearce f3af16c459 Bug 1088488 - Add GMPLoader interface to encapsulate loading GMPs, pass that to XRE_InitChildProcess. r=jesup,r=bsmedberg,r=glandium 2014-11-14 21:26:24 +13:00