Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G gnome-keyring
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 94
    • Issues 94
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • gnome-keyring
  • Merge requests
  • !43

egg-secure-memory: Allocate enough space for the guard pointers

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Simon McVittie requested to merge wip/smcv/allow-for-overhead into master Sep 26, 2021
  • Overview 2
  • Commits 2
  • Pipelines 1
  • Changes 1
  • egg-secure-memory: Allocate enough space for the guard pointers

    Cell allocations have an overhead of two pointer-sized words, which we need to take into account. Otherwise, whenever we try to allocate a new block to hold at least DEFAULT_BLOCK_SIZE - 2 * sizeof (void *) bytes, it will end up too small to allocate a cell of that size and we will fall back to non-mlock'd memory with a warning.

    Fixes: 982aadd9 "Completely overhaul the secure memory allocator"
    Resolves: #36

  • egg-secure-memory: Add a warning if #36 happens again

    If we call sec_block_create() to allocate a block sized to hold length bytes, and we succeed, then we should really be able to sec_alloc() a cell of length bytes within that block. If we can't, then we chose the size of the block incorrectly.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip/smcv/allow-for-overhead