History log of /system/keymaster/operation_table.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0f906ec40f6ade7955c6b967ea522aade54ea2e4 20-Jun-2015 Shawn Willden <swillden@google.com> Add buffer wrap checks and disable throwing of std::bad_alloc.

Android is built with exceptions disabled, but "operator new" and
"operator new[]" still throw std::bad_alloc on failure rather than
returning new. In general this is a good thing, because it will cause
an immediate crash of the process rather than assigning a null pointer
which is probably not checked. But most memory allocations in Keymaster
are checked, because it's written to run in an environment where new
does *not* throw. This CL updates the code to explicitly use the
non-throwing new.

A handful of throwing news remain, but only in places where a crash on
failure is appropriate.

In addition, this CL also inserts buffer wrap checks in key locations
and changes the development-machine Makefile to build in 32-bit mode, to
make memory problems more apparent.

Bug: 21888473
Change-Id: I8ebc5ec12053e4f5274f6f57ce312abc10611cef
/system/keymaster/operation_table.cpp
344549836442988693f27be8252c31bd2ebefdee 30-Apr-2015 Shawn Willden <swillden@google.com> Modify RAND_bytes calls to handle -1 return code.

Bug: 20554394
Change-Id: I54dce88f7bb90bd5660e9d3a7be9b9646bcc12bd
(cherry picked from commit 9ee79fb55049c242b12e067df1a824f18622ccfd)
/system/keymaster/operation_table.cpp
6f49e5f4e0e9698357417ea8ea26f3b86a2793db 20-Mar-2015 Chad Brubaker <cbrubaker@google.com> Remove calls to Entry::~Entry in Delete

The code was using ~Entry to clear the entry for later using a
destructed object is undefined behavior and the object wasn't actually
being zeroed causing the table to fill up and no new operations could be
started.

Change-Id: I236043cc9796e2c6def210b10634de7fa489a8d9
/system/keymaster/operation_table.cpp
23d4a742109fa29d6be20d3dc56a1b48797fe7b2 19-Mar-2015 Shawn Willden <swillden@google.com> Revert "Revert "Refactor GoogleKeymaster's operation table to a new class.""

This reverts commit 5a665cdeb6b4e44c57b0c0855e09045f8e2d2226. It also
incorporates one small change: operation_table.h #includes keymaster_defs.h
rather than keymaster1.h. This is important to avoid breaking Trusty.

Change-Id: Ia320d8599ea1d73930669fa61a82201ec1f833e8
/system/keymaster/operation_table.cpp
bfd323c639dae9a9c8f386cf099aec3e810a934b 19-Mar-2015 Shawn Willden <swillden@google.com> Revert "Refactor GoogleKeymaster's operation table to a new class."

This reverts commit 09d4ba3322e9a8b7c0e2d4a6c3dcacd7aed5ae22.

This is to unbreak Trusty build.

Change-Id: I47f90516a9e80e0c24bcea956072226bb7829991
/system/keymaster/operation_table.cpp
09d4ba3322e9a8b7c0e2d4a6c3dcacd7aed5ae22 04-Mar-2015 Shawn Willden <swillden@google.com> Refactor GoogleKeymaster's operation table to a new class.

This makes it reusable for Keymaster0Adapter.

Bug: 19508876
Change-Id: I38bdcf2ef9e9945ded2f15172962f6a997279100
/system/keymaster/operation_table.cpp