Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • lib
  • list_debug.c
Find file BlameHistoryPermalink
  • Kees Cook's avatar
    list: Split list_add() debug checking into separate function · d7c81673
    Kees Cook authored Aug 17, 2016
    
    
    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: default avatarKees Cook <keescook@chromium.org>
    Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
    Acked-by: default avatarRik van Riel <riel@redhat.com>
    d7c81673
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7