Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • T tails
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 931
    • Issues 931
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • tails
  • tails
  • Repository

Switch branch/tag
  • tails
  • config
  • amnesia
Find file BlameHistoryPermalink
  • intrigeri's avatar
    Zero heap memory at allocation time and at free time (refs: #17236) · 360a8abc
    intrigeri authored Nov 16, 2019 and segfault's avatar segfault committed Jan 05, 2020
    These options are "aimed at preventing possible information leaks and making the
    control-flow bugs that depend on uninitialized values more deterministic"¹.
    All kmalloc()s effectively become kzalloc()s and all kfree()s effectively become
    kzfree()s².
    
    In passing, apart of the defense-in-depth security benefits intended by the
    authors of this Linux feature, init_on_free=1 may ensure we clean more kernel
    memory at shutdown time.
    
    Benchmarks show:
    
    * a negligible performance hit with init_on_alloc=1
    * a 7-25% performance hit with init_on_free=1
    
    Let's see if/how this affects our use cases.
    
    [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6471384af2a6530696fc0203bafe4de41a23c9ef
    [2] https://outflux.net/blog/archives/2019/11/14/security-things-in-linux-v5-3/
    360a8abc

Replace amnesia

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.