Commit Graph

910 Commits

Author SHA1 Message Date
Alex Shelkovnykov
30ccf384e0 interpreter: add error motes 2024-01-31 17:11:31 +09:00
Alex Shelkovnykov
af1b00bc9c stack: check for stack overflow 2024-01-31 17:10:01 +09:00
Edward Amsden
8e45025228
Merge pull request #190 from urbit/eamsden/jet-turn
jets: jet +turn
2024-01-22 13:21:15 -06:00
Matthew LeVan
d4e0d983de pma: declare _bt_falloc iterator variables before start label 2024-01-18 10:00:54 -05:00
Matthew LeVan
d1e8ef632d Merge branch 'status' into msl/ares-crypto 2024-01-18 08:42:29 -05:00
Matthew LeVan
c4c1388573 noun: remove IndirectAtom::as_mut_bytes 2024-01-17 20:46:45 -05:00
Edward Amsden
2706cb5834 jets: format 2024-01-17 19:37:19 -06:00
Edward Amsden
b884cb3130 jets: add safety check to jet cache in jet_turn 2024-01-17 18:54:39 -06:00
Edward Amsden
98b6b67cdc Merge branch 'status' into eamsden/jet-turn 2024-01-17 18:34:27 -06:00
Edward Amsden
5336ca7a91
Merge pull request #201 from urbit/barter-simsum/file-extension
PMA file extension
2024-01-17 17:39:10 -06:00
barter-simsum
85a878a85c pma: remove comments referring to the persistent file's "frontier" 2024-01-17 18:07:56 -05:00
Philip Quirk
25239fd475 don't fsync on every nock event while tracing 2024-01-16 12:04:42 -06:00
barter-simsum
390c1c3356 pma: file extension bug fixes. test changes
file extension seems to be working now after reordering freelist restoration and
calling _bt_falloc in _nlist_new to create the first partition

should be able to move on to partition striping now and the explicit call to
_bt_falloc will make this easier
2024-01-12 20:02:59 -05:00
barter-simsum
a604f19d74 pma: nlist creation depends on flist existence
reordered to handle this dependency. Still debugging an issue with _flist_grow

The dependency is natural and will be required to implement partition
striping. All node partitions should call falloc and be represented in the flist
2024-01-12 19:41:19 -05:00
barter-simsum
aaa6f5e2ff pma: persistent file growth highpg tracking attempted fix
spent a while debugging this, but there are still issues on restoration. We
cannot simply call _flist_new and _flist_record_alloc on persistent state
restoration since _flist_new won't properly set the highpg. If restoring, we
should derive the high flist page (alloced or not) from state->file_size_p. I
think I way overcomplicated this
2024-01-12 18:11:42 -05:00
barter-simsum
6a08d08c0f pma: file resize test in btest.c and fixes to resize logic 2024-01-11 18:26:33 -05:00
barter-simsum
f6213bd1ce pma: minor cleanup 2024-01-10 19:15:34 -05:00
barter-simsum
aa21d14739 pma: remove frontier and only rely on state->file_size_p 2024-01-10 18:49:55 -05:00
barter-simsum
19fd0e4fb4 pma: file extension - to be revised 2024-01-10 18:27:31 -05:00
Matthew LeVan
718842a49a build: remove test_vs_urcrypt as default feature 2024-01-10 11:52:03 -05:00
Matthew LeVan
1a323204e3 jets: add comment explaining length matching 2024-01-08 18:18:04 -05:00
Matthew LeVan
824e6cf7e9 jets: handle zero-length messages in ed 2024-01-08 18:11:25 -05:00
Matthew LeVan
723372a0ea jets: handle zero-length messages in aes_siv 2024-01-08 17:39:11 -05:00
Matthew LeVan
528270bbd4 jets: handle zero-length messages in sha 2024-01-08 17:23:25 -05:00
Matthew LeVan
5b0b389775 jets: rip out as_mut_bytes 2024-01-08 17:01:37 -05:00
Edward Amsden
0f9175ada6 devex: add static glibc to flake.nix 2023-12-27 08:03:42 -06:00
Matthew LeVan
95f36e00dd cargo: format 2023-12-21 15:19:44 -05:00
Matthew LeVan
315f78824f cargo: appease clippy 2023-12-21 15:00:06 -05:00
Matthew LeVan
7f87000711 cargo: appease clippy 2023-12-21 14:57:38 -05:00
Matthew LeVan
82d5ebdc52 ares_crypto: remove decryption tests in aes_siv; add comments 2023-12-21 14:51:15 -05:00
Matthew LeVan
93a5c87178 ares_crypto: remove unused imports 2023-12-21 14:35:45 -05:00
Matthew LeVan
769dfca33f jets: simplify aes_siv greatly and use random inputs for tests 2023-12-21 14:32:38 -05:00
Matthew LeVan
7155e9909a jets: use explicitly sized byte arrays in ed jets 2023-12-21 10:25:28 -05:00
Edward Amsden
0f6c8b4659 noun: add IndirectAtom::new_raw_mut_bytearray to allocate indirect atoms with mutable memory returned as a reference to a fixed-sized byte array. 2023-12-21 07:51:44 -06:00
Matthew LeVan
9f88799fe2 Merge branch 'status' into msl/ares-crypto 2023-12-20 21:21:48 -05:00
Matthew LeVan
afbb5ea245 jets: boots without urcrypt 2023-12-20 21:14:00 -05:00
Alex Shelkovnykov
976e4dfbbc jets: lint 2023-12-20 19:05:41 -03:00
Alex Shelkovnykov
90475fd794 Merge branch 'status' into parse 2023-12-20 19:03:08 -03:00
Alex Shelkovnykov
084167defe jets: add comments for StirPair 2023-12-20 19:01:47 -03:00
Alex Shelkovnykov
9a00b9a798 jets: +stew changes 2023-12-20 18:46:36 -03:00
Matthew LeVan
38f9bd4e26 wip: replace urcrypt in aes 2023-12-20 16:09:59 -05:00
Alex Shelkovnykov
ef6045e249 jets: keep jet order consistent with Arvo 2023-12-20 17:01:05 -03:00
Matthew LeVan
70a3744218 jets: replace urcrypt with ares_crypto functions in ed jets 2023-12-20 13:52:50 -05:00
Edward Amsden
a96c669b22
Merge pull request #193 from urbit/jon/fix-rev
jets: fix jet_rev
2023-12-20 11:05:22 -06:00
Matthew LeVan
8437982ea3 jets: replace urcrypt with ares_crypto in sha jets 2023-12-20 12:01:58 -05:00
Matthew LeVan
0f683464a5 sha: sha1, shal, shay, shas 2023-12-20 11:13:28 -05:00
Matthew LeVan
0fb271c53a ares_crypto: cleanup cargo files 2023-12-20 10:24:34 -05:00
Matthew LeVan
ab27d667a0 ed: shar 2023-12-20 09:50:07 -05:00
barter-simsum
4c8851c385 pma: simpler pending freelist merge. fixes use after free 2023-12-20 09:37:04 -05:00
Edward Amsden
4080f50145 pma: format 2023-12-20 00:20:10 -06:00
Edward Amsden
3ae877f655 pma: lint and c warnings cleanup 2023-12-20 00:16:55 -06:00
Edward Amsden
58c49bc5e1 pma: dont assert loidx != in _bt_dirty, it could well be! 2023-12-19 21:36:27 -06:00
Edward Amsden
86a8922e0f pma: make sure unifying equality dirties for unifying a cell in the PMA, not just an indirect atom 2023-12-19 20:56:33 -06:00
Edward Amsden
feeb278794 pma: lots of c-side bugfixes 2023-12-19 20:55:57 -06:00
Edward Amsden
2c1f1fa285 Merge branch 'status' into eamsden/integrate-pma-tmp 2023-12-19 18:38:40 -06:00
barter-simsum
2762872a94 pma: wip test revisions 2023-12-19 17:48:04 -05:00
barter-simsum
0dac274a63 pma: minor bug fixes 2023-12-19 17:47:57 -05:00
Matthew LeVan
78068c2820 aes_siv: improved error handling 2023-12-19 16:40:38 -05:00
barter-simsum
232a5bdff5 pma: freelist restoration using *_record_alloc and insertdat bugfix 2023-12-19 16:29:03 -05:00
Matthew LeVan
b903e5784d aes_siv: complete siv{a,b,c}_{en,de} with tests 2023-12-19 15:39:39 -05:00
Alex Shelkovnykov
a30e020d17 jets: remove more +zing debug code 2023-12-19 16:50:16 -03:00
Alex Shelkovnykov
485ee10858 jets: remove +zing debug code 2023-12-19 16:49:33 -03:00
Alex Shelkovnykov
d2a5c5aaeb serf: remove debug eprintln 2023-12-19 16:47:31 -03:00
Matthew LeVan
f53534b366 aes: siv_en works 2023-12-19 14:45:50 -05:00
Alex Shelkovnykov
5bc00a175b jets: boolean helpers for comparator jets 2023-12-19 16:44:51 -03:00
Matthew LeVan
1251583052 ed: fix typo 2023-12-19 14:18:02 -05:00
Matthew LeVan
93644c12d0 wip: aes_siv crate does not support RFC 5297.4 2023-12-19 14:13:16 -05:00
Jonathan Paprocki
16c91e96d9 jets: rev PR comment 2023-12-19 13:56:46 -05:00
Jonathan Paprocki
24ce412a1f jets: fix jet_rev 2023-12-19 12:58:37 -05:00
Alex Shelkovnykov
e1e79bbef4 jets: cargo fmt + lint 2023-12-19 14:51:21 -03:00
Alex Shelkovnykov
9d65f6ecbc Merge branch 'status' into parse 2023-12-19 14:39:15 -03:00
Matthew LeVan
017b488b74 wip: siv_en encrypts but is incorrect 2023-12-19 11:22:46 -05:00
Edward Amsden
f601a61827 pma: clean up a bunch of warnings (not all though) 2023-12-19 09:56:34 -06:00
barter-simsum
9a74aff3e8 pma: significant revisions to freelist logic 2023-12-18 22:02:58 -05:00
Matthew LeVan
d12656e7c3 wip: aes mess 2023-12-18 21:22:06 -05:00
Matthew LeVan
f8c5620752 ed: add comments 2023-12-18 16:14:29 -05:00
Matthew LeVan
3767f89272 wip: all but shar work for ed 2023-12-18 16:08:22 -05:00
Matthew LeVan
7878b775ab ed: veri 2023-12-18 15:03:44 -05:00
Philip Quirk
760b317a3e add a warning to discourage use of check_all feature flag 2023-12-18 13:48:20 -06:00
Matthew LeVan
228ab7f5b7 ed: sign 2023-12-18 14:08:59 -05:00
Matthew LeVan
561701aaf1 wip: shar 2023-12-18 12:55:13 -05:00
Edward Amsden
7b2684aa26 jets: jet +turn 2023-12-18 10:46:34 -06:00
Matthew LeVan
eb77dad57f ed: puck 2023-12-18 11:39:09 -05:00
Edward Amsden
64367a9037 ares_crypto: cargo lock 2023-12-17 21:46:26 -06:00
Edward Amsden
087b90db90 ares_crypto: add scaffolding for tests vs urcrypt 2023-12-17 21:46:04 -06:00
barter-simsum
c0e68a27f6 pma: btest ephemeral structure equality tests 2023-12-17 20:05:03 -05:00
Matthew LeVan
bdaeed22c4 wip: ares_crypto initial commit 2023-12-17 18:57:51 -05:00
Alex Shelkovnykov
be96c495a8 serf: implement %live %exit 2023-12-17 14:00:19 -03:00
barter-simsum
3a6ed42054 pma: depth passed to _flist_read2 should be 1 not 0 2023-12-15 19:49:35 -05:00
barter-simsum
2c016500ac pma: restore mmaps before regenerating ephemeral state 2023-12-15 19:24:37 -05:00
barter-simsum
9a8229837d pma: initialize state->which to 0 in bt_state_open 2023-12-15 18:41:50 -05:00
barter-simsum
0ec984663c pma: revisions to codepath handling opening of existing pma 2023-12-15 18:38:52 -05:00
barter-simsum
0496de5f4c pma: testing out a mmap call /before/ reading header 2023-12-15 16:01:34 -05:00
Edward Amsden
012a7bac22
Merge pull request #180 from urbit/sigilante/remove-doublejam
serf:  removal of snapshotting
2023-12-15 13:41:18 -06:00
Edward Amsden
011d452156 main: add stop_for_debug feature to stop Ares when it starts for a debugger to attach 2023-12-15 13:12:05 -06:00
Edward Amsden
820b1ac57a main: add stop_for_debug feature to stop Ares when it starts for a debugger to attach 2023-12-15 12:27:17 -06:00
Edward Amsden
f092c482ee pma: format 2023-12-15 11:17:08 -06:00
Edward Amsden
dd814b3e1f pma: add crate feature to control debugging printfs 2023-12-15 11:16:38 -06:00
Sigilante
a4d67e01fd serf: placate linter 2023-12-15 10:39:02 -06:00
Edward Amsden
3acf8e74c1 serf: ensure locals are preserved and top frame flipped after PMA save 2023-12-15 10:00:38 -06:00
barter-simsum
02b1ae3dd2 pma: btest.c changes 2023-12-15 06:36:53 -05:00
barter-simsum
66aaa255f7 pma: fix freelist node size calculation in _mlist_insert 2023-12-15 06:36:30 -05:00
barter-simsum
031e583c3c pma: fix DPRINTF in bt_malloc 2023-12-15 05:38:35 -05:00
barter-simsum
965865da13 pma: mmap freespace ahead of first node partition 2023-12-15 03:24:42 -05:00
barter-simsum
40a04ec8ab pma: _bt_printnode print to stderr 2023-12-15 01:19:28 -05:00
Edward Amsden
a37cf3e779 pma: when persisting hamt check if buffer already in PMA 2023-12-15 00:15:40 -06:00
barter-simsum
ff204263ff pma: misc fixes
- primarily fixes a bug in _mlist_insert and _pending_flist_insert
- also updates some tests
- disables node data printing on _bt_insertdat with DEBUG_PRINTNODE macro
2023-12-15 00:50:26 -05:00
Edward Amsden
bdccac7ff2 pma: fixup of global static PMA 2023-12-14 22:17:25 -06:00
Edward Amsden
8fb0953247 pma: dirty in unifying equality
This changes the PMA to be a static global instead of a threaded-through handle.
We use a OnceLock to enforce one-time-only opening of the PMA. There is
no public PMA type any more, just a collection of module-level methods
which act through the global reference.

This is consistent with the assumptions of the underlying C code, that
there will be only one PMA open in a process, and avoids the need to
thread the PMA to unifying equality calls.
2023-12-14 21:42:31 -06:00
Edward Amsden
caeea6ec2d unifying equality: move to own module 2023-12-14 18:08:55 -06:00
barter-simsum
a509c2fabe pma: even more msync/mprotect changes 2023-12-14 16:40:42 -05:00
barter-simsum
a8b3619e9f pma: more msync/mprotect abort 2023-12-14 16:35:33 -05:00
Edward Amsden
fa30180b68 pma: noun and hamt persist fixes 2023-12-14 15:31:06 -06:00
barter-simsum
92c1a23b7d pma: abort on failed msync/mprotect 2023-12-14 16:30:29 -05:00
Edward Amsden
adfc9ddb10 pma: fix assert in save_to_pma 2023-12-14 14:28:27 -06:00
Sigilante
854e4bd544
Recomment debugging printfs 2023-12-14 09:39:49 -06:00
Edward Amsden
bfdb1b9eb7 pma: fix and simplify copy_to_buffer for Noun 2023-12-14 00:56:39 -06:00
Edward Amsden
5598442304 pma: fix save_to_pma buffer size assertions 2023-12-14 00:45:09 -06:00
Edward Amsden
59180a704b Merge branch 'revert-177-revert-175-eamsden/gc-top-frame' into eamsden/integrate-pma-tmp-fix-gc 2023-12-13 22:39:11 -06:00
barter-simsum
92bb42683d pma: fix c test3 2023-12-13 21:36:34 -05:00
Edward Amsden
be4a6552e1 Merge remote-tracking branch 'origin/status' into revert-177-revert-175-eamsden/gc-top-frame 2023-12-13 20:33:33 -06:00
barter-simsum
20693a32ce pma: tests 2023-12-13 21:32:45 -05:00
Edward Amsden
05b0609b5b 2stackz: comment explaining null checks in is_in_frame 2023-12-13 20:32:01 -06:00
Edward Amsden
f8615b5a4e 2stackz: lint 2023-12-13 19:53:33 -06:00
Edward Amsden
a98524bfd7 2stackz: format 2023-12-13 19:48:34 -06:00
Edward Amsden
046c435fa7 2stackz: fix is_in_frame check for top frame 2023-12-13 19:46:59 -06:00
Edward Amsden
b841fe2f63 hot: fix preserve instance 2023-12-13 19:46:39 -06:00
Alex Shelkovnykov
3d98ab2684
Merge pull request #179 from urbit/as/comments
docs: add comments explaining invariants / algorithms
2023-12-13 18:42:03 -06:00
Alex Shelkovnykov
51e8986327 docs: cargo fmt 2023-12-13 21:19:40 -03:00
barter-simsum
3786277230 pma: remove mkdir call from bt_state_open 2023-12-13 18:25:35 -05:00
Sigilante
3207660eac serf: placate linter 2023-12-13 14:33:04 -06:00
Sigilante
cd92209131 serf: placate linter 2023-12-13 14:31:34 -06:00
Sigilante
a715c961c5 serf: placate linter 2023-12-13 14:30:10 -06:00
Sigilante
b1eaf8e853 serf: placate linter 2023-12-13 14:20:38 -06:00
Sigilante
8438fe8e5d serf: removal of snapshotting 2023-12-13 14:14:59 -06:00
Alex Shelkovnykov
235d8c54f1 docs: add comments explaining invariants / algorithms 2023-12-13 12:11:56 -03:00
barter-simsum
c4b1888020 pma: update mprotect calls to use BT_PROT_* macros 2023-12-13 07:52:36 -05:00
barter-simsum
e630016584 pma: mmap changes appear to be working 2023-12-13 07:45:44 -05:00
barter-simsum
88fdfe0755 pma: misc bug fixes
currently debugging an "invalid argument" error in the mmap call in bt_free
2023-12-13 07:17:05 -05:00
barter-simsum
7dfc32681a pma: more mmap changes. WIP 2023-12-12 22:34:26 -05:00
Matthew LeVan
38c1b3cef3
Revert "Revert "2stackz: gc top frame by flipping polarity"" 2023-12-12 21:04:10 -05:00
Matthew LeVan
5bfc83673c
Revert "2stackz: gc top frame by flipping polarity" 2023-12-12 20:48:55 -05:00
barter-simsum
13b5f6bee6 pma: set protection of leaf data when syncing 2023-12-12 20:34:12 -05:00
barter-simsum
e96d7ecb4c pma: mmap and mprotect revisions wip 2023-12-12 18:23:37 -05:00
Edward Amsden
9271deb3d6 pma: set -DDEBUG for default profile 2023-12-11 23:16:32 -06:00
Edward Amsden
94d92e4a3e pma: add a missing ftruncate and mmap call, and lots of notes 2023-12-11 23:15:53 -06:00
Edward Amsden
bbaa758c95 hamt: fix persist instance 2023-12-11 23:15:18 -06:00
Edward Amsden
548dc3f3c4 hamt: when preserving, actually write outermost stem pointer back to mutable self 2023-12-11 19:06:57 -06:00
Edward Amsden
ede9918c03 pma: some quick fixes 2023-12-11 18:34:06 -06:00
Edward Amsden
fd1af932c6 2stackz: fix wrong-end previous allocation pointer in flip_top_frame() 2023-12-11 15:56:05 -06:00