Comments (9)
And recover a simple version of VMO (#76), even if it will fail many core-tests.
from zcore.
Let's do some simple fixes first.
- Allocate a child vmar with size larger the parent should be an INVALID_ARGS instead of a NO_MEMORY (see Vmar.AllocateUnsatisfiableTest)
- We should not check the permission of a mapping in zx_vmar_map, since we can add the permission with zx_vmar_protect later (see Vmar.VmarMapRangeOffsetTest)
- the
actual
in zx_process_*_memory should be a pointer to usize - You cannot use MAP_RANGE with SPECIFIC_OVERWRITE in zx_vmar_map (see Vmar.InvalidArgsTest)
- Length in zx_vmar_map cannot be zero (see Vmar.InvalidArgsTest)
- Invalid bits in zx_vm_option_t should be rejected
from zcore.
We somehow handles permission of a VmMapping incorrectly. We should storage a limitation of permission in the VmMapping, and allowing increasing premission with zx_vmar_protect .
from zcore.
zx_vmar_protect is actually doing nothing. I attempted to fix it but since it do not support partially protect a VmMapping it will break at startup.
Maybe we should store flags of each pages in the VmMapping?
from zcore.
Currently there is a workaround in VmAddressRegion::new_root
to separate address space of different processes. We do not need this in qemu since we have the real page table, so we should remove this workaround on qemu.
from zcore.
Another easy fix: vmar.*_memory should limit length with map size
Also, we should add support to multiple mappings.
Should we use a unified lock in vmar instead to avoid race condition when read/write memory?
from zcore.
zx_vmar_protect somehow works now when I modified how the flags of each page storaged.
The next thing could be implement the ZX_VM_MAP_RANGE flag
from zcore.
It seems the content of the vmo is not correct if we do not always map the vmo in the page table(!)
See core-test VmoClone2TestCase.ManyCloneMappingOffset
The first issue is: we should not map the page as writable when we page fault when reading the page, otherwise we will breaks the copy-on-write semantic.
The second issue is: after a vmo.write call, the correct page to map should be changed. However, if we need to update page table when commiting the page, we get a deadlock when mapping the pages. But fortunately, If we are updating the page table, we do not need to update it with vmo, so it should be OK to just use try_lock instead of lock.
from zcore.
It should be possible to commit the page in vmo when we are copying things to user space! (See core-test VmoTestCase.MapRead etc.)
We need #146 to solve this problem
Another thing: VmoTestCase.ZeroPage encounter page fault forever since the 0x8 bit is set in the error_code
Another thing: vmo contiguous may breaks
from zcore.
Related Issues (20)
- 关于本地测试和 Github CI 的一些改进意见 HOT 13
- 关于boot option HOT 5
- Panic when run `make image ARCH=riscv64` HOT 3
- Could not compile & run. HOT 17
- update alpine to 3.16 HOT 1
- 升级到 2022/06/17 PR #325 导致缓存失效 HOT 3
- linux_libc_test and linux-syscall test failed in x86_64 Qemu HOT 1
- 工具链和构建中间产物管理 HOT 1
- bulid error HOT 9
- zCore Pages不能显示所有的文档
- Encounter errors at dtb-walker when using Qemu-7.0 on Ubuntu 20.04.1 LTS HOT 6
- Unable to run qemu in macOS HOT 9
- Support for FU740 board HOT 3
- 硬件测试问题汇总 HOT 2
- zCore连续运行程序报错 HOT 1
- zCore使用qemu测试时无法使用pci HOT 14
- xtask 更改qemu网卡mac地址编译选项无效 HOT 1
- nvme磁盘测试报错 HOT 1
- C906/C910的拓展页表设置MAEE该如何关闭? HOT 3
- 编译报错
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 zcore.