Commit graph

7 commits

Author SHA1 Message Date
Stephen Hines
b0775ca517 Switch to memcpy for accessing misaligned data.
Bug: http://b/31532493

Using misaligned pointers forces us to potentially take the address of
members in a packed structure (which is now a warning/error in the
latest Clang). Using memcpy() is the proper way to handle this kind of
problem, as the compiler can insert the proper instructions (and usually
elide the memcpy() entirely).

Test: Built correctly with updated compilers.
Change-Id: Ia1f6eb62cf19404ff76b71d3c6c7ffffa1403120
2016-12-07 03:46:55 -08:00
Elliott Hughes
4f71319df0 Track rename of base/ to android-base/.
Change-Id: Idf9444fece4aa89c93e15640de59a91f6e758ccf
2015-12-04 22:00:26 -08:00
Andres Morales
70309ff8c7 [gatekeeperd] copy uid to local before passing to u_map
The compiler will issue the unaligned access instuctions
when reading from a packed struct. Since 'find' takes a
reference, if we pass the field directly it is removed
from its packed context and may be unreadable.

Read the field out directly from the packed struct and pass
in aligned to u_map to fix.

Bug: 22367550
Change-Id: Ia3b639c7518154ff5a2b7c233b752e154eab9aad
(cherry picked from commit 6e83dc4d325d68b568c841d3e88fda2a93e00663)
2015-11-05 11:09:21 -08:00
Andres Morales
9ea9a06b06 [gatekeeperd] invalidate stale password cache
password may change offline, invalidate the cache if it is
stale

Bug: 22019187
Change-Id: I2aaae978c8bd4629a0f93df3778d8679ae9b53d5
2015-06-23 11:29:57 -07:00
Andres Morales
c7ab1e8177 [gatekeeperd] add fast path for SW password verification
Bug: 21445004
Change-Id: I5e36ddbefaf1fa8de8623858fd785ac8fb651a4f
2015-06-22 12:05:57 -07:00
Andres Morales
e1f827fc1f [gatekeeperd] track gk failure record changes
Bug:21118563
Change-Id: Ia726dc4db6ec5c6a1e8e08a689ec82568ff1e5aa
2015-06-03 18:24:36 -07:00
Andres Morales
ae242929da [gatekeeperd] return brute-force throttling information
Bug: 21118563
Change-Id: I13c6a44f61668be8b4c1fde8c84dcfebab84517c
2015-05-27 07:45:22 -07:00