haproxy/doc/internals
Willy Tarreau 9192d20f02 MINOR: pools: make DEBUG_UAF a runtime setting
Since the massive pools cleanup that happened in 2.6, the pools
architecture was made quite more hierarchical and many alternate code
blocks could be moved to runtime flags set by -dM. One of them had not
been converted by then, DEBUG_UAF. It's not much more difficult actually,
since it only acts on a pair of functions indirection on the slow path
(OS-level allocator) and a default setting for the cache activation.

This patch adds the "uaf" setting to the options permitted in -dM so
that it now becomes possible to set or unset UAF at boot time without
recompiling. This is particularly convenient, because every 3 months on
average, developers ask a user to recompile haproxy with DEBUG_UAF to
understand a bug. Now it will not be needed anymore, instead the user
will only have to disable pools and enable uaf using -dMuaf. Note that
-dMuaf only disables previously enabled pools, but it remains possible
to re-enable caching by specifying the cache after, like -dMuaf,cache.
A few tests with this mode show that it can be an interesting combination
which catches significantly less UAF but will do so with much less
overhead, so it might be compatible with some high-traffic deployments.

The change is very small and isolated. It could be helpful to backport
this at least to 2.7 once confirmed not to cause build issues on exotic
systems, and even to 2.6 a bit later as this has proven to be useful
over time, and could be even more if it did not require a rebuild. If
a backport is desired, the following patches are needed as well:

  CLEANUP: pools: move the write before free to the uaf-only function
  CLEANUP: pool: only include pool-os from pool.c not pool.h
  REORG: pool: move all the OS specific code to pool-os.h
  CLEANUP: pools: get rid of CONFIG_HAP_POOLS
  DEBUG: pool: show a few examples in -dMhelp
2022-12-08 18:54:59 +01:00
..
api MINOR: pools: make DEBUG_UAF a runtime setting 2022-12-08 18:54:59 +01:00
acl.txt DOC: fix some spelling issues over multiple files 2021-01-08 14:53:47 +01:00
body-parsing.txt
connect-status.txt
connection-header.txt
connection-scale.txt
entities-v2.txt
entities.txt
fd-migration.txt CLEANUP: assorted typo fixes in the code and comments 2021-08-16 12:37:59 +02:00
hashing.txt [RELEASE] Released version 2.4-dev19 2021-05-10 07:50:26 +02:00
header-parser-speed.txt
header-tree.txt
http-cookies.txt
http-docs.txt
http-parsing.txt
list.fig [RELEASE] Released version 2.4-dev17 2021-04-23 19:11:10 +02:00
list.png CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
listener-states.fig
listener-states.png
lua_socket.fig
lua_socket.pdf
muxes.fig DOC: internal: update the muxes doc to mention the stconn 2022-05-27 19:33:35 +02:00
muxes.pdf DOC: internal: update the muxes doc to mention the stconn 2022-05-27 19:33:35 +02:00
muxes.png DOC: internal: update the muxes doc to mention the stconn 2022-05-27 19:33:35 +02:00
muxes.svg DOC: internal: update the muxes doc to mention the stconn 2022-05-27 19:33:35 +02:00
naming.txt
notes-layers.txt
notes-poll-connect.txt DOC: internal: commit notes about polling states and flags on connect() 2022-11-17 16:49:00 +01:00
notes-pollhup.txt DOC: internal: commit notes about polling states and flags 2022-11-17 16:49:00 +01:00
notes-polling.txt DOC: internal: commit notes about polling states and flags 2022-11-17 16:49:00 +01:00
pattern.dia
pattern.pdf
polling-states.fig [RELEASE] Released version 2.3-dev7 2020-10-17 10:31:50 +02:00
repartition-be-fe-fi.txt
sched.fig [RELEASE] Released version 2.4-dev10 2021-02-26 22:49:10 +01:00
sched.pdf DOC: scheduler: add a diagram showing the different queues and their usages 2021-02-26 17:49:37 +01:00
sched.png DOC: scheduler: add a diagram showing the different queues and their usages 2021-02-26 17:49:37 +01:00
sched.svg DOC: scheduler: add a diagram showing the different queues and their usages 2021-02-26 17:49:37 +01:00
ssl_cert.dia DOC: internals: update the SSL architecture schema 2021-05-17 10:50:24 +02:00
stats-v2.txt
stream-sock-states.fig