Comments (4)
Can probably be closed with https://github.com/sunriseos/SunriseOS/blob/master/shell/img/meme7.gif
from sunriseos.
Given the number of "reboot and use some state left in RAM" attacks on various systems, I think that you cannot assume that never-used pages are clean.
There's a trade-off between whether you want allocation to be fast, or freeing to be fast. If you zero on allocation:
- You don't have to clean never-used pages until they are actually used.
- On the other hand, this may mean that stuff sticks around for a long time in memory, even if inaccessible.
- Free (shouldn't) have to do anything extra.
If you zero on free:
- Never-used pages should be cleared at boot.
- Attacker controlled values go away as soon as the page is freed.
- As a side-effect, I'd think this accomplishes 'zero memory on shutdown' kinda automatically
- Allocation (shouldn't) have to do anything extra.
- All kernel pages are zeroed too, because there are no free dirty pages.
Upon thinking about this, I think I actually prefer zeroing on free due to the implications it has. Either a page is used and has valid(?) data, or is zero.
from sunriseos.
We should at least clean up on deallocation
from sunriseos.
One unmentioned problem is that to bzero a page, it needs to be mapped. However the allocation of pages and their mapping is highly decoupled (frame_allocator vs. paging). This means we either have to:
- have the frame_allocator re-map a frame every time it needs to bzero it (either at allocation or at free). This is a lot of overhead, and clearly not ideal.
- map the whole RAM in our address space somewhere in the KernelLand, so that frame_allocator can bzero freed frames by accessing them directly. This is the preferred solution for 64-bit address spaces, however this is not applicable for 32-bit address spaces, since a 4GB address space isn't big enough.
- find a way to re-couple the frame_allocator and paging on this matter. If we end up going for the 'zero on free' solution, we should use the 'dirty' bit in the page tables to skip pages that haven't been modified.
from sunriseos.
Related Issues (20)
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Dependabot couldn't fetch the branch/reference for https://github.com/KokaKiwi/rust-hex
- Build gets errors on macOS Big Sur HOT 7
- Will this project continue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sunriseos.