schwarze
951df98fb8
HISTORY; tweaks and ok sobrado@ jmc@
11 years ago
tedu
3d36d226ed
Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarze
12 years ago
djm
83081452a3
Add a new malloc option 'U' => "Free unmap" that does the guarding/
unmapping of freed allocations without disabling chunk randomisation
like the "Freeguard" ('F') option does. Make security 'S' option
use 'U' and not 'F'.
Rationale: guarding with no chunk randomisation is great for debugging
use-after-free, but chunk randomisation offers better defence against
"heap feng shui" style attacks that depend on carefully constructing a
particular heap layout so we should leave this enabled when requesting
security options.
12 years ago
otto
10c1e27ddb
Show (in the example) that < and > can be used multiple times; ok jmc@
jasper@
13 years ago
jasper
32dcb18e53
- add a MALLOC_OPTIONS section header. the content is already there, but having
a section will help people looking for just the MALLOC_OPTIONS.
ok otto@ jmc@
13 years ago
jmc
ffc1056ac2
oops - forgot to check for trailing whitespace;
15 years ago
thib
7087fc1c2f
reword the 'D' dump bit to make it clear that the malloc.out file needs
to exist before exit for malloc to dump stats in it.
tweaks from jmc@
ok otto@,jmc@
15 years ago
tedu
bbe8fdc923
add posix_madvise, posix_memalign, strndup, and strnlen. mostly from
brad and millert, with hints from guenther, jmc, and otto I think.
ok previous.
15 years ago
jmc
652f4e1cc3
stucture -> structure;
15 years ago
otto
f816214aa0
New options 'S', as a shorthand for the options most suitable as an
extra safeguard (FGJ). Idea from deraadt@; ok deraadt@ dlg@
15 years ago
otto
65dc48b142
rewrite the history section, prompted by Paul Stoeber; ok deraadt@ jmc@
15 years ago
jmc
2024268fd6
kill whitespace at eol;
16 years ago
otto
69f875a94f
decribe 'F' better and mention flags are debugging aids; ok tedu@ jmc@
16 years ago
djm
d835fe24d1
Remove mprotecting of struct dir_info introduced in previous commit
(MALLOC_OPTIONS=L). It was too slow to turn on by default, and we
don't do optional security.
requested by deraadt@ grumbling ok otto@
16 years ago
djm
b1b6e37e4e
extra paranoia for malloc(3):
Move all runtime options into a structure that is made read-only
(via mprotect) after initialisation to protect against attacks that
overwrite options to turn off malloc protections (e.g. use-after-free)
Allocate the main bookkeeping data (struct dir_info) using mmap(),
thereby giving it an unpredictable address. Place a PROT_NONE guard
page on either side to further frustrate attacks on it.
Add a new 'L' option that maps struct dir_info PROT_NONE except when
in the allocator code itself. Makes attacks on it basically impossible.
feedback tedu deraadt otto canacar
ok otto
16 years ago
pedro
09239b2280
Fix typo, okay jmc@.
16 years ago
otto
5b2827b23a
move allocations between half a page and a page as close to the end of
the page as possible (i.e. make malloc option P a default).
ok art@ millert@ krw@
16 years ago
otto
e19c3ba2dd
fix markup of example line and description of G flag; partly from and
ok jmc@
16 years ago
otto
96f3e731f5
remove distinction between warnings and errors, ok deraadt@ djm@
16 years ago
otto
3b4110eeac
small cleanup of error/warning strings
16 years ago
otto
1eac738a69
man page bits for new malloc; ok jmc@
16 years ago
jmc
c52fe5a85f
kill an Xr to a non-existent man page, ulimit(1);
17 years ago
otto
a8ec3b0eb8
remove recalloc(3); it is buggy and impossible to repair without big
costs; ok jmc@ for the man page bits; ok millert@ deraadt@
17 years ago
deraadt
58f16dd9e2
no need to talk about bits; ok millert jmc
17 years ago
millert
6441b2ef99
Update free(3) section--we use mmap()/munmap(), not brk().
Based on a diff from Mike Belopuhov. OK jmc@
17 years ago
millert
63cad49094
add recaloc(3)
17 years ago
millert
ad911583f0
Clarify the example about avoiding overflow. OK ray@ deraadt@
17 years ago
jmc
14302f5699
convert to new .Dd format;
18 years ago
pedro
244553b30f
Fix 'double by a factor of two' and make cache options a bit more
descriptive while at it, input and okay jmc@
19 years ago
otto
e9112488f5
Use SIZE_MAX instead of SIZE_T_MAX, the latter is not POSIX and
remove redundant check on size. ok millert@ deraadt@
19 years ago
ray
eb202d0369
Add warning about malloc(num * size) and recommend calloc() instead,
or if malloc must be used suggest check.
Get rid of "one".
OK deraadt@ and jmc@, OK kjell@ to earlier version with "one"s.
19 years ago
jakemsr
f7752f35a4
missing auxillary verb
"yes, that is correct." jmc@ (a while back)
19 years ago
jaredy
eb2659255c
- typos, punctuation, layout, macro tweaks
- break long lines
ok jmc
19 years ago
jmc
7b3d0afba2
no need to insert spacing between list members;
20 years ago
tedu
b1d9a6e152
adding pointer protection to 'G' was too heavyweight. Since malloc guard
should be generally usable, split this out into option 'P'. ok deraadt
20 years ago
tedu
64bb2c38e9
add a note describing latest guard feature
20 years ago
jmc
9ddc3b1129
kill dead .Xr to memory(3);
from kjell@
21 years ago
espie
5e55855984
punctuate variable; okay jmc@.
21 years ago
jmc
eba3d1f25d
H comes before J;
21 years ago
tedu
67a5c4680e
'F'reeguard doc, as reported missing by brad. nit free thanks to jmc
21 years ago
jmc
532d62d8fc
wording improvements from Brian Poole;
kill a .Pp before a display;
21 years ago
tedu
b2f289ed65
by popular demand, malloc guard pages. insert an unreadable/unwriteable
page after each page size allocation to detect overrun. this is
somewhat electric fence like, while attempting to be mostly usable in
production. also, use tdeval's chunk randomization code.
enabled with the G option.
ok deraadt and co.
21 years ago
millert
2a6996bfa4
It is safe to pass free() a NULL pointer since C89; update example to
this effect. OK deraadt@ pvalchev@
21 years ago
deraadt
1d84434b97
improve example even more
21 years ago
tedu
637ad405c4
expand on the realloc no-no section to include adjusting a length before
the allocation. ok deraadt@ markus@
21 years ago
millert
679cd5d050
Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.
22 years ago
jmc
fdc9cd7b4e
- section reorder
- merge COMPATIBILITY
- kill whitespace at EOL
22 years ago
krw
31a3573e90
Delete reference to /usr/share/doc/papers/malloc.ascii.gz as we do not
have it. We don't even have the directory /usr/share/doc/papers.
ok millert@.
22 years ago
jmc
a23019ca33
typos;
ok deraadt@
22 years ago
deraadt
656331798e
document how malloc(0) blobbies are stored, and their character
23 years ago