Kees Cook d7c816733d list: Split list_add() debug checking into separate function
Right now, __list_add() code is repeated either in list.h or in
list_debug.c, but the only differences between the two versions
are the debug checks. This commit therefore extracts these debug
checks into a separate __list_add_valid() function and consolidates
__list_add(). Additionally this new __list_add_valid() function will stop
list manipulations if a corruption is detected, instead of allowing for
further corruption that may lead to even worse conditions.

This is slight refactoring of the same hardening done in PaX and Grsecurity.

Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Rik van Riel <riel@redhat.com>
2016-10-31 13:01:56 -07:00
..
2014-10-09 11:35:48 +03:00
2016-07-29 18:30:16 +08:00
2011-03-11 14:25:50 +00:00
2016-10-11 15:06:30 -07:00
2015-11-23 09:44:58 +01:00
2016-03-17 15:09:34 -07:00
2011-10-29 21:20:22 +02:00
2016-02-29 09:35:20 +01:00
2016-02-07 23:17:59 -08:00
2016-10-06 17:13:54 -07:00
2014-04-30 19:49:37 +01:00
2014-08-06 18:01:25 -07:00
2014-05-05 09:09:14 +02:00
2016-10-14 15:17:12 -07:00
2016-05-23 17:04:14 -07:00
2014-08-08 15:57:25 -07:00
2015-02-12 18:54:15 -08:00
2012-07-30 17:25:16 -07:00
2014-06-25 17:45:43 -07:00
2016-04-23 20:13:24 -04:00
2015-09-08 14:35:59 -07:00
2015-02-12 18:54:16 -08:00
2016-07-06 10:51:14 +01:00
2016-09-20 04:43:36 -04:00
2016-09-19 08:19:40 -06:00
2015-03-23 22:12:08 -04:00
2015-06-25 17:00:40 -07:00
2016-03-17 15:09:34 -07:00
2016-05-30 15:26:57 -07:00
2016-08-02 17:31:41 -04:00