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

Issue 7833003: code for encrypting sensitive tcmalloc metadata (Closed)

Created:
9 years, 3 months ago by bxx
Modified:
6 years, 9 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

code for encrypting sensitive tcmalloc metadata BUG=NONE TEST=NONE

Patch Set 1 : metadata encryption #

Total comments: 18

Patch Set 2 : Responding to Justin's comments #

Patch Set 3 : Responding to Jim's comments #

Patch Set 4 : fixed so will compile on windows #

Patch Set 5 : make encode/decode more generic, fixes #

Patch Set 6 : changed where encryption is initialized #

Patch Set 7 : fixed bug of key_ existing as multiple copies #

Unified diffs Side-by-side diffs Delta from patch set Stats (+220 lines, -98 lines) Patch
M base/allocator/allocator.gyp View 1 2 3 4 5 6 3 chunks +6 lines, -1 line 0 comments Download
A third_party/tcmalloc/chromium/src/config_hardening.h View 1 2 3 1 chunk +42 lines, -0 lines 0 comments Download
M third_party/tcmalloc/chromium/src/free_list.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/tcmalloc/chromium/src/free_list.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
A + third_party/tcmalloc/chromium/src/metadata_encode.h View 1 2 3 4 5 2 chunks +38 lines, -32 lines 0 comments Download
A + third_party/tcmalloc/chromium/src/metadata_encode_disabled.h View 1 2 3 4 5 2 chunks +16 lines, -33 lines 0 comments Download
A + third_party/tcmalloc/chromium/src/metadata_encode_posix.h View 1 2 3 4 5 6 2 chunks +17 lines, -32 lines 0 comments Download
A third_party/tcmalloc/chromium/src/metadata_encode_posix.cc View 1 2 3 4 5 6 1 chunk +96 lines, -0 lines 0 comments Download
M third_party/tcmalloc/chromium/src/static_vars.cc View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/tcmalloc/chromium/src/tcmalloc.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
jschuh
http://codereview.chromium.org/7833003/diff/5006/base/allocator/allocator.gyp File base/allocator/allocator.gyp (right): http://codereview.chromium.org/7833003/diff/5006/base/allocator/allocator.gyp#newcode14 base/allocator/allocator.gyp:14: 'defines' : ["TCMALLOC_SPAN_ENCRYPT"], You'll probably want a flag in ...
9 years, 3 months ago (2011-09-13 16:37:12 UTC) #1
jar (doing other things)
As a security guy, the name "encryption" is surprising, and seemingly misleading. Encryption has a ...
9 years, 3 months ago (2011-09-13 18:15:18 UTC) #2
bxx
These are in response to Justin's comments. Also, it looks like cl picked up on ...
9 years, 3 months ago (2011-09-13 19:36:08 UTC) #3
bxx
Submitted a patch responding to Jim's comments. http://codereview.chromium.org/7833003/diff/5006/third_party/tcmalloc/chromium/src/metadata_encrypt_generic.h File third_party/tcmalloc/chromium/src/metadata_encrypt_generic.h (right): http://codereview.chromium.org/7833003/diff/5006/third_party/tcmalloc/chromium/src/metadata_encrypt_generic.h#newcode51 third_party/tcmalloc/chromium/src/metadata_encrypt_generic.h:51: // Ensure ...
9 years, 3 months ago (2011-09-13 20:06:58 UTC) #4
bxx_google.com
9 years, 3 months ago (2011-09-16 04:03:50 UTC) #5
I patched this code a bunch of times since the last review and I want to
explain my last change and see if you have any advice-- on a different
branch I patched the free lists so the pointers are encrypted  and found
that the current metadata_encode_posix.h implementation with inlined
functions wasn't going to cut it.  The problem is that we ended up with
multiple copies of the key we were encrypting against and in only one
location does key get set as a random value.  Unfortunately I couldn't think
of a clean way of keeping encryption/decryption inline functions when they
need access to a global variable.  We can still use inline functions when we
use Window's EncodePointer and I wanted to take advantage that.  My solution
to all of this is in the last set of patches.  The posix implementation is a
bit ugly and proof-of-concepty at the moment.  Let me know if you have any
ideas of how to make it nicer.  I did it the way I did so I still can
control which implementation gets used purely from the metadata_encryption.h
file.

The good news is that I do have encrypted pointers on the free lists
working, the bad news is that it is all dependent on this changeset so I am
holding off from posting it for code review at the moment.

_bx

Powered by Google App Engine
This is Rietveld 408576698