Commit Graph

603 Commits

Author SHA1 Message Date
Daniel Micay
3dc49f8f73 slightly improve sized deallocation error messages 2018-10-05 01:06:12 -04:00
Daniel Micay
dcd969ae04 use a consistent style for fixed-size int types
The stdint.h types don't cover 128-bit integers and the underscore makes
them ill suited to usage in function suffixes. Instead, use the common
naming style in the Linux kernel and elsewhere including the ChaCha8
implementation included here.
2018-10-04 15:17:11 -04:00
Daniel Micay
92a33182fb port chacha.h to the code style used elsewhere 2018-10-04 04:13:28 -04:00
Daniel Micay
08a633b244 fix another typo in the README 2018-10-04 04:12:21 -04:00
Daniel Micay
ef32a4b7ea add -pipe to CFLAGS 2018-10-04 04:03:48 -04:00
Daniel Micay
e99191d5d4 document tuning vm.max_map_count 2018-10-04 03:44:19 -04:00
Daniel Micay
d12cf324dd add documentation on testing 2018-10-04 03:27:30 -04:00
Daniel Micay
2a31c7291b add basic documentation on configuration 2018-10-04 03:15:55 -04:00
Daniel Micay
642eed81c0 allow using larger guards on large allocations 2018-10-04 02:58:24 -04:00
Daniel Micay
9b7691a2a7 take canaries into account for the offset test 2018-10-04 02:52:20 -04:00
Daniel Micay
71d52d981e fix output of size class offset test 2018-10-04 02:41:01 -04:00
Daniel Micay
15e5e2d0ac fix typo in README 2018-10-03 17:23:20 -04:00
Daniel Micay
5811bd184c avoid unnecessary preprocessor use for canary mask 2018-10-03 17:17:20 -04:00
Daniel Micay
93fcc6a978 add simple string overflow test 2018-10-03 17:15:38 -04:00
Daniel Micay
b24569b6ca zero leading byte of canaries 2018-10-03 17:09:57 -04:00
Daniel Micay
1fbf0e27f5 make error reporting more robust 2018-10-03 16:58:49 -04:00
Daniel Micay
6dfe33b4f1 add prefix to reported errors 2018-10-03 16:22:28 -04:00
Daniel Micay
6372fee410 use consistent macro naming convention 2018-10-03 16:00:37 -04:00
Daniel Micay
829ace403f document free_sized API 2018-10-03 14:37:05 -04:00
Daniel Micay
c3a580727a add MIT license 2018-10-03 13:18:51 -04:00
Daniel Micay
cf449b3df4 add sized deallocation support 2018-09-19 13:05:12 -04:00
Daniel Micay
82314f4471 make get_size_info straightforward for zero size 2018-09-11 14:51:36 -04:00
Daniel Micay
7a404ddbf2 optimize size calculation for 16 byte spaced sizes 2018-09-11 14:46:44 -04:00
Daniel Micay
2d6ad18aa4 make function naming a bit more consistent 2018-09-11 14:18:13 -04:00
Daniel Micay
684291bf6a avoid overhead of init check for slab deallocation 2018-09-11 14:13:43 -04:00
Daniel Micay
ef098fea06 simplify init function 2018-09-11 14:12:27 -04:00
Daniel Micay
433af6d4ba drop 128-bit keys from ChaCha implementation 2018-09-11 10:22:28 -04:00
Daniel Micay
b52d9ca831 aggressive write-after-free check is implemented 2018-09-11 05:17:22 -04:00
Daniel Micay
61684925e8 fix overly naive slab allocation alignment support 2018-09-10 19:01:11 -04:00
Daniel Micay
9a1acce5eb optimize calloc when zero on free is disabled 2018-09-07 16:33:28 -04:00
Daniel Micay
8f921e30be add kernel feature wishlist 2018-09-07 06:33:41 -04:00
Daniel Micay
7ae7abedea mark more unlikely code paths 2018-09-07 02:53:15 -04:00
Daniel Micay
191f9667df add missing include 2018-09-07 02:10:37 -04:00
Daniel Micay
49af83a817 wrap mutex type to enable future optimization 2018-09-07 01:13:08 -04:00
Daniel Micay
fc2473e7ee add configuration for canaries 2018-09-07 00:35:08 -04:00
Daniel Micay
96c538d90f add configuration for zero on free 2018-09-07 00:33:51 -04:00
Daniel Micay
ba3a8b0058 add slot randomization to configuration header 2018-09-07 00:25:02 -04:00
Daniel Micay
bed303a76f remove unnecessary else branch 2018-09-07 00:22:51 -04:00
Daniel Micay
d398384b90 add header for configuration 2018-09-07 00:17:31 -04:00
Daniel Micay
99d68238d2 implement slab allocation write-after-free check 2018-09-07 00:00:32 -04:00
Daniel Micay
918f0d3302 improve write-after-free tests 2018-09-06 23:50:49 -04:00
Daniel Micay
3751b85e47 document minimum musl version for external use 2018-09-06 19:52:09 -04:00
Daniel Micay
684e63a878 handle pthread_atfork calling into malloc
This results in compatibility with the malloc replacement support added
in musl 1.1.20.
2018-09-06 19:48:00 -04:00
Daniel Micay
1be74ec40d add initial guard slabs implementation 2018-09-06 18:55:24 -04:00
Daniel Micay
cc1e79fdba abstract metadata allocation to allow guard slabs 2018-09-06 18:45:41 -04:00
Daniel Micay
d8e18e0011 aligned_alloc is now the same as BSD memalign
The resolution to DR 460 (which is explicitly included in C17) removed
the requirement for the size to be a multiple of the alignment.
2018-09-06 16:30:22 -04:00
Daniel Micay
0d3c2e1988 no need for a dedicated init rng 2018-09-06 16:02:25 -04:00
Daniel Micay
8624201f06 refresh canary value when allocating free slabs 2018-09-06 15:07:01 -04:00
Daniel Micay
a875951e82 fix build with musl 2018-09-06 14:35:08 -04:00
Daniel Micay
e891b40588 implement Android malloc_disable/malloc_enable API 2018-09-06 14:17:23 -04:00