- Notifications
You must be signed in to change notification settings - Fork0
unsoundsystem/tlsf-allocator-verification-progress-report
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Rust実装の正当性を保証したい
現在やったこと・やっていること現状
[DOING] option 1: Verusによる検証を検討中
option 2: Cのコードベースを検証する
VSTによる検証
Rustコードベースから使うことを想定しており、FFIを通じたバグの混入を避けるためRustコードベースの検証を先に検討したい
RefinedRustの適用を試みる 利用したいRustの言語仕様の多くに未対応なため断念
非技術的な動機
safety criticalな利用目的なので出来るだけfoundationalな検証を目指したい
自分のスキルセットなどを鑑みて定理証明による手法が使いたい
symbol | status |
---|---|
wip | 実装・証明に取り組み中(未完) |
done | 完了(以後問題が発覚しなければ) |
(empty) | 他のタスクを優先中、あるいはブロッキングタスクがあるため手を付けていない |
rlsfの関数 | 実装の移植 | 形式仕様記述 | 証明 |
---|---|---|---|
| wip | ||
| done | done | |
| done | done | wip |
| done | done | wip |
| done | done | |
| wip | wip | |
| done | done | |
| done | done |
この表に現れないブロッキングタスク
仕様記述は、実行可能関数に依らないモデル化のタスクによってブロックされている可能性がある
Verusの非対応機能に対するworkaround、その他Verusのプラクティス上の問題
補題の証明
❏ data structure wf-ness
✓ correctness doubly linked list on free block headers
❏ singly-linked list on all headers
✓ bitwise operations
✓ rotate shift
✓ relation between spec mode math & bitwise ops
✓ index calculation
✓ BlockIndex type
✓ state lemmas for uniqueness/existance of block size classes cf. zhang et.al.
❏ data structure wf-ness
✓ correctness doubly linked list on free block headers
❏ singly-linked list on all headers
bitwise operations
❏ lemmas for rotate shift properties
✓
lemma_usize_rotate_right_0_eq
❏
lemma_usize_rotate_right_low_mask_shl
✓
lemma_usize_rotate_right_mod0_noop
❏
lemma_usize_rotate_right_distr
❏
lemma_usize_rotate_right_reversible
❏ relation between spec mode math & bitwise ops
❏
usize_trailing_zeros_is_log2_when_pow2_given
index calculation
❏ uniqueness:
index_unique_range
❏
lemma_index_unique_range_fl
❏
lemma_index_unique_range_sl
❏ existance:
index_exists_for_valid_size
Verusで
Tlsf::allocate
を検証する❏ 対象とするユースケースやTCB,証明のためのproof constractなどの設計をまとめたdesign docを作る
❏ usecase
❏ TCB
❏ about rational_numbers module
global directiveの管理
プラットフォーム毎に唯一の
usize
幅を想定してほしいcfgで公理を含むモジュールのインポートを分岐させる
インデックス計算
bits
❏
usize_trailing_zeros_is_log2_when_pow2_given
rotate_rightの形式仕様
理論的性質
✓ 有理数上の半開区間に移植する
✓ 有理数の形式化
❏ optional: 四則演算に関する自動化を整備する e.g. more broadcast
❏
index_unique_range
❏
index_exists_for_valid_size
❏
lemma_block_size_range_mono
(optional)❏ optional: interval orderによるブロックサイズ範囲の整列https://en.wikipedia.org/wiki/Interval_order
メモリ操作
メモリ領域の正当性の公理化・伝播
❏ Tlsf構造体内の情報に関する証明内追跡用の構造体の設計
❏ realisticなリンクリストの検証PoCを移植する
❏ Deallocation tokenの設計
❏
DeallocToken
の再考: deallocateで前後のブロックを結合する際にヘッダ全体の権限をユーザーが持っていると問題になりそう
検証の対象とする性質の検討
Rustのアロケータとして要求される仕様について検討する
メモリプールの扱い(固定長/動的に拡張可能?)
About
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.