Octocontrabass wrote: ↑Mon Mar 09, 2026 2:01 pm
DslsDZC wrote: ↑Mon Mar 09, 2026 12:35 pmBut HIC’s foundation is physical isolation: each privileged service runs in its own contiguous physical memory region, mapped directly 1:1. This is what enables:
· Hardware‑enforced isolation (no two services share physical pages).
Hardware-enforced isolation works just as well without contiguous physical memory.
DslsDZC wrote: ↑Mon Mar 09, 2026 12:35 pm· Direct, same‑privilege calls between services and Core‑0 (no page‑table switches).
How much security do you want? Some CPU speculative execution security vulnerabilities can only be mitigated by switching page tables.
DslsDZC wrote: ↑Mon Mar 09, 2026 12:35 pm· Deterministic performance (no TLB misses or page faults for service memory).
You can't avoid TLB misses on x86-64.
DslsDZC wrote: ↑Mon Mar 09, 2026 12:35 pmIf we allocated memory page‑by‑page, a service’s memory would be scattered across physical RAM, forcing us to use complex page tables and breaking the 1:1 mapping—which would reintroduce the very overheads HIC aims to eliminate.
No matter how you allocate memory, x86-64 forces you to use complex page tables. Larger pages can make the page tables simpler, but it will make allocation more complicated.
It sounds like some of your design choices may not be based on reality...
Thank you for your thoughtful and detailed feedback — it's exactly this kind of critical discussion that helps refine ideas. Let me address your points one by one.
1. On hardware-enforced isolation without contiguous memory
You're right that page tables can provide isolation without requiring physical contiguity. However, HIC's choice of contiguous physical regions is driven by two goals:
· Using large pages (e.g., 2MB or 1GB) to minimize TLB misses and make page tables extremely shallow. This is a practical reality on x86-64: large pages reduce TLB pressure and improve performance determinism.
· Simplifying the memory model for formal verification: contiguous regions make it easier to reason about memory safety and isolation at the hardware level.
Yes, x86-64 still requires page tables, but with large pages they become minimal — often just 2 or 3 levels instead of 4, and they rarely need to be switched.
2. On speculative execution vulnerabilities and page-table switches
This is a very valid concern. HIC's baseline design assumes that most services are trustworthy, largely because Privileged-1 services are official modules that undergo rigorous auditing — they are code-reviewed, security-tested, and digitally signed before being admitted to the official list. Moreover, all API access is strictly controlled by the capability system: each service can only invoke interfaces it has explicit capabilities for; any unauthorized attempt is blocked and logged by Core‑0. This multi‑layer defence significantly reduces the attack surface. For cases where additional mitigation is needed, HIC can adopt techniques similar to kernel page-table isolation (KPTI), but only switched in when crossing trust boundaries — not on every service call. The goal is to keep the fast path truly fast, while still allowing stronger isolation when required.
3. On TLB misses
You're absolutely correct — you can't avoid TLB misses entirely on x86-64. But HIC's use of large pages and minimal page-table switching drastically reduces their frequency. In a typical HIC system, a service's entire memory region can be covered by a single 2MB or 1GB page, so TLB misses are rare (mostly on first access or after context switches). The claim "no TLB misses" was perhaps too absolute — I should have said "predictably low TLB miss rate" or "no TLB misses for service-internal accesses after warm-up". Thank you for catching that.
4. On page-table complexity
You're right that x86-64 forces us to use page tables, regardless of allocation strategy. But HIC's approach simplifies the page-table structure itself:
· With contiguous physical memory, we can use a single large-page entry for most of a service's address space.
· This reduces the number of page-table levels and entries, making the TLB's job easier and reducing memory overhead.
Compare that to a fully paged, scattered allocation, which would require many small-page entries and deeper page tables — that's the "complexity" HIC avoids.
5. On "not based on reality"
I appreciate your skepticism — it's healthy. HIC's design choices are indeed grounded in real hardware characteristics (large pages, TLB behavior, MMU capabilities) and real-world requirements (deterministic performance, verifiable security). They may not align with every use case, but they are optimized for high-security, high-assurance environments where predictability and minimal attack surface matter more than raw memory utilization.
6. On the trustworthiness of official modules and API access control
Finally, I'd like to emphasize HIC's foundation of trust: all Privileged-1 services (including the core Module Manager) are official modules that undergo strict auditing — code review, security testing, and digital signature verification — before being included in the official list. Module loading and updates are centrally managed by the Module Manager, and every API access is tightly restricted by the capability system: any cross‑domain invocation requires the corresponding capability. This means that even if a service contains an undiscovered vulnerability, an attacker cannot abuse unauthorised APIs or access other services' memory. It is this combination of least privilege + mandatory auditing that makes the baseline assumption ("most services are trustworthy") practical in real deployments.
I'd be happy to discuss this further — either here, on GitHub, or wherever you prefer. Your insights are valuable, and I'd love to hear more about your own experiences with OS design.