Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCrypter using secure allocator vector. #1488

Merged

Conversation

furszy
Copy link

@furszy furszy commented Apr 3, 2020

Built on top of #1486. Commits starting in d058064 .

This PR back port, partially, upstream@8753 . -- The last three commits left to back port in a future PR --

Containing the following changes:

  1. Changing CCrypter to use vectors with secure allocator instead of have to lock stack memory pages to prevent the memory from being swapped to disk.

  2. Removing the unused LockObject and UnlockObject methods.

  3. Adding a missing lock in the CCryptoKeyStore::GetKeys method.

@furszy furszy self-assigned this Apr 3, 2020
@Fuzzbawls Fuzzbawls added this to the Future milestone Apr 7, 2020
@random-zebra random-zebra modified the milestones: Future, 5.0.0 Apr 24, 2020
@Fuzzbawls
Copy link
Collaborator

can be rebased now that #1486 is merged

furszy added 3 commits May 16, 2020 11:24
Change CCrypter to use vectors with secure allocator instead of buffers
on in the object itself which will end up on the stack. This avoids
having to call LockedPageManager to lock stack memory pages to prevent the
memory from being swapped to disk. This is wasteful.

Coming from upstream 999e4c9
@furszy furszy force-pushed the 2020_crypter_use_secure_allocator branch from 596e917 to f8fd095 Compare May 16, 2020 14:37
@furszy
Copy link
Author

furszy commented May 16, 2020

rebased, ready for review.

@furszy furszy requested review from Fuzzbawls and random-zebra May 16, 2020 23:37
Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK f8fd095

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK f8fd095 and merging...

@random-zebra random-zebra merged commit cc84157 into PIVX-Project:master May 17, 2020
furszy added a commit that referenced this pull request Apr 5, 2021
1c04a35 [Trivial] Use C++11 nulltpr instead of NULL macro in allocators files (random-zebra)
68a3f8f bench: Add benchmark for lockedpool allocation/deallocation (Wladimir J. van der Laan)
cd34088 rpc: Add `getmemoryinfo` call (Wladimir J. van der Laan)
2d2e331 support: Add LockedPool (Wladimir J. van der Laan)
6ca6470 allocators: split allocators and pagelocker (random-zebra)

Pull request description:

  First commit adapts btc d7d187e.
  Then backport the last 3 commits of bitcoin#8753, which were left out in #1488.

ACKs for top commit:
  Fuzzbawls:
    ACK 1c04a35
  furszy:
    ACK 1c04a35 .

Tree-SHA512: 9ee1100df3648a73e1fcd9b98f7fb793d3eb342ad239d3d4f9b2dd32dc0bacfdb29825e84e4e2ba4e621aedb0a62ae66dfba4d76a435b77dd5e2af1a01541890
@furszy furszy deleted the 2020_crypter_use_secure_allocator branch November 29, 2022 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants