{"id":30223636,"url":"https://github.com/platform-system-interface/ptvis","last_synced_at":"2025-10-11T02:44:02.486Z","repository":{"id":308757012,"uuid":"1033990089","full_name":"platform-system-interface/ptvis","owner":"platform-system-interface","description":"A graphical page table visualization tool","archived":false,"fork":false,"pushed_at":"2025-08-07T17:12:56.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-07T19:09:36.577Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/platform-system-interface.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-07T16:57:43.000Z","updated_at":"2025-08-07T17:13:00.000Z","dependencies_parsed_at":"2025-08-07T19:09:43.404Z","dependency_job_id":"5ffb26a9-69d2-4e3c-aef1-c175bdbaba13","html_url":"https://github.com/platform-system-interface/ptvis","commit_stats":null,"previous_names":["platform-system-interface/ptvis"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/platform-system-interface/ptvis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platform-system-interface%2Fptvis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platform-system-interface%2Fptvis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platform-system-interface%2Fptvis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platform-system-interface%2Fptvis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/platform-system-interface","download_url":"https://codeload.github.com/platform-system-interface/ptvis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platform-system-interface%2Fptvis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270422667,"owners_count":24580835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-14T12:47:55.971Z","updated_at":"2025-10-11T02:43:57.457Z","avatar_url":"https://github.com/platform-system-interface.png","language":"TypeScript","readme":"# ptvis\n\nA web tool to visualize [page tables](https://en.wikipedia.org/wiki/Page_table),\nearly draft.\n\n## Basics\n\nPage table basics are commonly [taught in university courses and labs](\nhttps://pdos.csail.mit.edu/6.1810/2023/labs/pgtbl.html) as well as [strategies\nto handle their size](https://pages.cs.wisc.edu/~remzi/OSTEP/vm-smalltables.pdf)\nand applied in the wider context of [generally managing memory](\nhttps://cseweb.ucsd.edu/classes/su09/cse120/lectures/Lecture8.pdf).\n\nStudents learn what the entries in page tables look like, usually with a given\narchitecture to simplify the example, and how a memory management unit (MMU)\ntranslates a virtual address (VA) into a physical address (PA). When page tables\nare explained, it is common to omit tables not involved in the translation of\nthe given VA, i.e., only one table per level is drawn, since otherwise there is\nnot enough space. However, that may limit the understanding somewhat.\n\n## Goal\n\nThe goal of this tool is to help understand the tables themselves and quickly\nlook at different architectures. The exact how is not clear at this point.\nUnlike a sketch on a chalkboard, a digital approach allows for having more\ncontext nevertheless, since the virtual canvas we draw on is infinite and we can\nhide and show parts as we please, offering toggles and many other controls.\n\nWe do not want to get down do the detail of addressing a single byte, since that\nis commonly a simple offset once a physical page is found and too much to show.\n\n## Background\n\nPage tables are tricky to organize in a way such that constructing VAs and using\nthe phyiscal pages becomes efficient and secure. Note that the page table setup\nhas implications on managing the page tables themselves, both in terms of\nbookkeeping and updating them during memory allocation and process termination.\n[FreeBSD has an article](https://docs.freebsd.org/en/articles/vm-design/)\nexplaining why the design is hard and how theirs evolved over time. Bear in mind\nthat this article is from the year 2000 and some things differ today from what\nis described therein.\n\nThere are multiple ways to _define_ page tables, each ISA being a bit different,\npossibly offering different variants (_schemes_), e.g. RISC-V's SV32, SV39, etc.\n\nAt the same time, there are different ways to _use_ page tables.\nFor example, the [Hypatia hypervisor proposes _recursive page tables_](\nhttps://github.com/hypatia-hypervisor/hypatia/blob/main/docs/hdp/0015).\nLinux documents its specific setups per architecture, such as [on RISC-V](\nhttps://www.kernel.org/doc/html/v6.6/riscv/vm-layout.html) and [on x86](\nhttps://www.kernel.org/doc/html/v6.6/arch/x86/x86_64/mm.html).\n\nFinally, there are multiple ways to look at and thus _visualize_ page tables.\n\nHere are some other projects looking at different aspects:\n\n- \u003chttp://publications.alex-ionescu.com/BlackHat/BlackHat%202013%20-%20Visualizing%20Page%20Tables%20for%20Hacking%20Like%20in%20the%20Movies.pdf\u003e\n    - Presentation: \u003chttps://media.blackhat.com/us-13/US-13-Wicherski-Hacking-like-in-the-Movies-Visualizing-Page-Tables-WP.pdf\u003e\n    - Based on \u003chttps://binvis.io/\u003e / \u003chttps://corte.si/posts/visualisation/binvis/\u003e\n    - Security view on how pages are marked RWX etc\n\n## Development\n\nThis is a [Next.js](https://nextjs.org) project bootstrapped with\n[`create-next-app`](https://nextjs.org/docs/pages/api-reference/create-next-app).\n\nTo run the development server:\n\n```bash\nnpm start\n```\n\nHere is a first example screenshot:\n\n![](docs/screenshot.png)\n\nRefer to the [Next.js documentation](https://nextjs.org/docs) for more.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplatform-system-interface%2Fptvis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplatform-system-interface%2Fptvis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplatform-system-interface%2Fptvis/lists"}