| Summary: | add bounds-checked load/store instructions for WebAssembly | ||
|---|---|---|---|
| Product: | Libre-SOC's first SoC | Reporter: | Jacob Lifshay <programmerjake> |
| Component: | Specification | Assignee: | Jacob Lifshay <programmerjake> |
| Status: | CONFIRMED --- | ||
| Severity: | enhancement | CC: | libre-soc-isa, lkcl, programmerjake |
| Priority: | --- | ||
| Version: | unspecified | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| See Also: |
https://bugs.libre-soc.org/show_bug.cgi?id=905 https://bugs.libre-soc.org/show_bug.cgi?id=928 |
||
| NLnet milestone: | --- | total budget (EUR) for completion of task and all subtasks: | 0 |
| budget (EUR) for this task, excluding subtasks' budget: | 0 | parent task for budget allocation: | |
| child tasks for budget allocation: | The table of payments (in EUR) for this task; TOML format: | ||
| Bug Depends on: | |||
| Bug Blocks: | 584 | ||
|
Description
Jacob Lifshay
2021-01-27 16:45:17 GMT
i wonder if fine-grained IOMMU would do the job well. fixed wraparound bug in semantics code. 64-bit wasm memory addresses are a proposed wasm extension: https://github.com/WebAssembly/memory64 another proposed wasm extension is having multiple accessible wasm memories: https://github.com/webassembly/multi-memory this would mean having a small table of wasm-base-address-spr wasm-limit-spr pairs, instructions would have an immediate telling them which table entry to use. (In reply to Luke Kenneth Casson Leighton from comment #1) > i wonder if fine-grained IOMMU would do the job well. I don't think that's the right place to do the bounds checking, since it needs to happen before the MMU's page table lookup (IOMMU happens after MMU translation iirc) otherwise we have to allocate 4GB of memory space again (or have a separate bounds check beforehand for 64-bit wasm addresses) defeating the whole purpose of the additional support. remember, wasm is designed to run potential-attacker code in-process with runtime bounds checks to prevent wasm from accessing memory outside of the assigned range. Mentioned on the WASM 64-bit memory proposal repo: https://github.com/WebAssembly/memory64/issues/15 Bounds-check semantics for 64-bit memory: https://github.com/WebAssembly/memory64/issues/3 wasm ld/st ops could fit in the new WIP ld/st-shift encoding space: https://bugs.libre-soc.org/show_bug.cgi?id=905#c9 a separate only-calculate-address op is still needed for memcpy, atomics, OS read/write, etc. |