From 3639d6464972ddecb4fd59a805eabd05bbfde61a Mon Sep 17 00:00:00 2001 From: Mark Poliakov Date: Thu, 31 Oct 2024 22:53:46 +0200 Subject: [PATCH] refactor: move to rust 1.84.0-nightly + implement disable_aslr --- Cargo.lock | 484 ++++++++++-------- boot/yboot-proto/src/lib.rs | 1 - boot/yboot/src/main.rs | 2 +- etc/aarch64-unknown-qemu.json | 2 +- kernel/arch/aarch64/src/lib.rs | 2 +- kernel/arch/i686/src/lib.rs | 6 +- kernel/arch/x86/src/lib.rs | 2 +- kernel/arch/x86_64/src/lib.rs | 14 +- kernel/arch/x86_64/src/mem/mod.rs | 2 +- kernel/driver/block/nvme/src/lib.rs | 2 +- kernel/driver/block/nvme/src/queue.rs | 16 +- kernel/driver/fs/memfs/src/lib.rs | 1 - kernel/driver/virtio/net/src/lib.rs | 2 - kernel/libk/libk-mm/interface/src/lib.rs | 2 +- kernel/libk/libk-mm/src/lib.rs | 1 - kernel/libk/libk-util/src/lib.rs | 1 - kernel/libk/src/lib.rs | 5 +- kernel/libk/src/task/binary/elf.rs | 43 +- kernel/libk/src/task/binary/mod.rs | 39 +- kernel/libk/src/task/thread.rs | 1 + kernel/libk/src/task/types.rs | 19 +- kernel/libk/src/vfs/timer.rs | 5 +- kernel/src/init.rs | 1 + kernel/src/main.rs | 5 +- kernel/src/proc/mod.rs | 4 +- kernel/src/syscall/imp/sys_process.rs | 5 +- lib/abi/def/process.abi | 7 + lib/abi/src/process/mod.rs | 4 +- lib/libyalloc/src/lib.rs | 3 - lib/libyalloc/src/sys.rs | 2 +- lib/runtime/src/lib.rs | 2 +- lib/runtime/src/process.rs | 83 ++- lib/runtime/src/time.rs | 11 +- tool/abi-generator/src/abi/mod.rs | 27 +- tool/abi-generator/src/lib.rs | 2 +- .../abi-generator/src/syntax/bitfield_type.rs | 14 +- userspace/Cargo.lock | 265 +++++++--- userspace/dynload-program/Cargo.toml | 2 +- userspace/lib/cross/Cargo.toml | 3 + userspace/lib/serde-ipc/Cargo.toml | 3 + userspace/rdb/Cargo.toml | 3 + userspace/rsh/Cargo.toml | 2 +- userspace/rsh/src/rshd/main.rs | 6 +- userspace/sysutils/Cargo.toml | 8 +- xtask/src/build/userspace.rs | 2 +- 45 files changed, 721 insertions(+), 395 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index de3cb0cc..8a9686cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "aarch64-cpu" @@ -17,7 +17,7 @@ version = "0.1.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.85", "thiserror", ] @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" dependencies = [ "anstyle", "anstyle-parse", @@ -128,47 +128,47 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.85", ] [[package]] @@ -179,14 +179,14 @@ checksum = "99e1aca718ea7b89985790c94aad72d77533063fe00bc497bb79a7c2dae6a661" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.85", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bit-set" @@ -235,9 +235,9 @@ dependencies = [ [[package]] name = "btree_monstrousity" -version = "0.0.4" +version = "0.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4d0977e9c15f276380f16f2e9594257c258172b23af39ffd2e4cf5971cb38c7" +checksum = "2ec92912346b936c974181a172d9abc81f50d41e40118fc101dac8aa8134bee3" dependencies = [ "cfg-if", "rustversion", @@ -251,22 +251,22 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.16.1" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.85", ] [[package]] @@ -277,13 +277,13 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cc" -version = "1.0.99" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -308,9 +308,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.6" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9689a29b593160de5bc4aacab7b5d54fb52231de70122626c178e6a368994c7" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -318,9 +318,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.6" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5387378c84f6faa26890ebf9f0a92989f8873d4d380467bcd0d8d8620424df" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -330,42 +330,42 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.5" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.85", ] [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "compiler_builtins" -version = "0.1.112" +version = "0.1.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15acab2bb4fe4dad1f1e31f3d9e714f50ef561a0f87dd8a9da004f14d455e1a" +checksum = "33ccee9dd499d7ada4c81533382ce87e88c52b0676c7320b2e617d29e1bb3a3f" dependencies = [ "rustc-std-workspace-core", ] [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "crossbeam-queue" @@ -405,7 +405,7 @@ version = "0.1.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.85", ] [[package]] @@ -422,7 +422,7 @@ dependencies = [ [[package]] name = "discrete_range_map" version = "0.6.2" -source = "git+https://git.alnyan.me/yggdrasil/discrete_range_map.git#10fd79828d2918bd079a11c2b2c623eede170c3f" +source = "git+https://git.alnyan.me/yggdrasil/discrete_range_map.git#6b54882b190b02fb013f22cbe9664f6273e846ae" dependencies = [ "btree_monstrousity", "either", @@ -432,16 +432,16 @@ dependencies = [ [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elf" version = "0.7.2" source = "git+https://git.alnyan.me/yggdrasil/yggdrasil-elf.git#419cd311de2e9514b5033677cde9a33f7d0ba4a2" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -473,14 +473,14 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.85", ] [[package]] name = "env_filter" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ "log", "regex", @@ -488,9 +488,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ "anstream", "anstyle", @@ -512,7 +512,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -536,9 +536,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fatfs" @@ -570,14 +570,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys", + "libredox", + "windows-sys 0.59.0", ] [[package]] @@ -592,6 +592,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -618,21 +624,21 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-task", @@ -680,7 +686,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.85", ] [[package]] @@ -703,9 +709,16 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" dependencies = [ - "ahash", "allocator-api2", + "equivalent", + "foldhash", ] [[package]] @@ -720,7 +733,7 @@ version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -731,9 +744,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -764,19 +777,19 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.0", ] [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -804,18 +817,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -916,15 +929,15 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" dependencies = [ "rustc-std-workspace-core", ] @@ -1014,12 +1027,6 @@ dependencies = [ "yggdrasil-abi", ] -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - [[package]] name = "libm" version = "0.2.8" @@ -1029,6 +1036,23 @@ dependencies = [ "rustc-std-workspace-core", ] +[[package]] +name = "libm" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", + "redox_syscall", +] + [[package]] name = "libssh2-sys" version = "0.3.0" @@ -1055,9 +1079,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.18" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" +checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" dependencies = [ "cc", "libc", @@ -1089,18 +1113,18 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.12.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown", + "hashbrown 0.15.0", ] [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memfs" @@ -1156,14 +1180,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", - "libm 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libm 0.2.11", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl-probe" @@ -1173,9 +1197,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -1207,9 +1231,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -1219,40 +1243,43 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.66", + "syn 2.0.85", ] [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", @@ -1280,9 +1307,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1334,18 +1361,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -1355,9 +1382,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -1366,9 +1393,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rsdp" @@ -1401,22 +1428,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" dependencies = [ "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "rusty-fork" @@ -1477,44 +1504,51 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.85", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "spinning_top" version = "0.2.5" @@ -1549,9 +1583,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" dependencies = [ "proc-macro2", "quote", @@ -1566,9 +1600,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" dependencies = [ "filetime", "libc", @@ -1577,41 +1611,42 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.85", ] [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -1630,9 +1665,9 @@ checksum = "696941a0aee7e276a165a978b37918fd5d22c55c3d6bda197813070ca9c0f21c" [[package]] name = "toml" -version = "0.8.14" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -1642,18 +1677,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.14" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", "serde", @@ -1670,21 +1705,21 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] @@ -1697,9 +1732,9 @@ checksum = "1230ec65f13e0f9b28d789da20d2d419511893ea9dac2c1f4ef67b8b14e5da80" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -1714,9 +1749,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "bytemuck", ] @@ -1729,9 +1764,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vmalloc" @@ -1770,34 +1805,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.85", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1805,28 +1841,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.85", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "which" -version = "6.0.1" +version = "6.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8211e4f58a2b2805adfbefbc07bab82958fc91e3836339b1ab7ae32465dce0d7" +checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" dependencies = [ "either", "home", @@ -1836,11 +1872,11 @@ dependencies = [ [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -1862,10 +1898,19 @@ dependencies = [ ] [[package]] -name = "windows-targets" -version = "0.52.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -1879,57 +1924,57 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.13" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -1963,7 +2008,7 @@ dependencies = [ [[package]] name = "xhci" version = "0.9.2" -source = "git+https://github.com/rust-osdev/xhci.git#6144829ff13c2499dc812cea09df4e5a1d0862cc" +source = "git+https://github.com/rust-osdev/xhci.git#f2254c86d5ba12754259bf0ae483c6c8dc821aad" dependencies = [ "accessor", "bit_field", @@ -2231,7 +2276,7 @@ dependencies = [ "abi-lib", "cc", "compiler_builtins", - "libm 0.2.8 (git+https://git.alnyan.me/yggdrasil/libm.git)", + "libm 0.2.8", "prettyplease", "rustc-std-workspace-alloc", "rustc-std-workspace-core", @@ -2240,20 +2285,21 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.85", ] diff --git a/boot/yboot-proto/src/lib.rs b/boot/yboot-proto/src/lib.rs index 72c0e16b..6458dd35 100644 --- a/boot/yboot-proto/src/lib.rs +++ b/boot/yboot-proto/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(const_mut_refs)] #![no_std] use bytemuck::{Pod, Zeroable}; diff --git a/boot/yboot/src/main.rs b/boot/yboot/src/main.rs index a2c7b30f..92833ad8 100644 --- a/boot/yboot/src/main.rs +++ b/boot/yboot/src/main.rs @@ -1,4 +1,4 @@ -#![feature(asm_const)] +#![allow(static_mut_refs)] #![no_std] #![no_main] diff --git a/etc/aarch64-unknown-qemu.json b/etc/aarch64-unknown-qemu.json index 37262517..00bbe669 100644 --- a/etc/aarch64-unknown-qemu.json +++ b/etc/aarch64-unknown-qemu.json @@ -3,7 +3,7 @@ "arch": "aarch64", "os": "none", "llvm-target": "aarch64-unknown-none", - "data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", + "data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32", "max-atomic-width": 128, "target-pointer-width": "64", "features": "+v8a,+strict-align,-neon,-fp-armv8", diff --git a/kernel/arch/aarch64/src/lib.rs b/kernel/arch/aarch64/src/lib.rs index 563f4f6b..f780010e 100644 --- a/kernel/arch/aarch64/src/lib.rs +++ b/kernel/arch/aarch64/src/lib.rs @@ -37,7 +37,7 @@ pub static CPU_COUNT: AtomicUsize = AtomicUsize::new(1); #[naked] extern "C" fn idle_task(_: usize) -> ! { unsafe { - core::arch::asm!("1: nop; b 1b", options(noreturn)); + core::arch::naked_asm!("1: nop; b 1b"); } } diff --git a/kernel/arch/i686/src/lib.rs b/kernel/arch/i686/src/lib.rs index d2a4a2c7..8462e86d 100644 --- a/kernel/arch/i686/src/lib.rs +++ b/kernel/arch/i686/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(never_type, naked_functions, asm_const, strict_provenance)] +#![feature(never_type, naked_functions)] #![no_std] extern crate alloc; @@ -34,13 +34,13 @@ static mut CPU: *mut () = null_mut(); #[naked] extern "C" fn idle_task(_: usize) -> ! { unsafe { - core::arch::asm!( + core::arch::naked_asm!( r#" 1: nop jmp 1b "#, - options(att_syntax, noreturn) + options(att_syntax) ); } } diff --git a/kernel/arch/x86/src/lib.rs b/kernel/arch/x86/src/lib.rs index 2728e530..2a94722d 100644 --- a/kernel/arch/x86/src/lib.rs +++ b/kernel/arch/x86/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(iter_chain, strict_provenance)] +#![feature(iter_chain)] #![allow(clippy::new_without_default)] #![no_std] diff --git a/kernel/arch/x86_64/src/lib.rs b/kernel/arch/x86_64/src/lib.rs index 30fada4f..36ae4d98 100644 --- a/kernel/arch/x86_64/src/lib.rs +++ b/kernel/arch/x86_64/src/lib.rs @@ -1,6 +1,6 @@ #![no_std] #![allow(clippy::new_without_default)] -#![feature(strict_provenance, asm_const, naked_functions, trait_upcasting)] +#![feature(naked_functions, trait_upcasting)] extern crate alloc; @@ -69,13 +69,13 @@ pub static CPU_COUNT: AtomicUsize = AtomicUsize::new(1); #[naked] extern "C" fn idle_task(_: usize) -> ! { unsafe { - core::arch::asm!( + core::arch::naked_asm!( r#" - 1: - nop - jmp 1b - "#, - options(noreturn, att_syntax) + 1: + nop + jmp 1b + "#, + options(att_syntax) ); } } diff --git a/kernel/arch/x86_64/src/mem/mod.rs b/kernel/arch/x86_64/src/mem/mod.rs index de854df5..d4d68673 100644 --- a/kernel/arch/x86_64/src/mem/mod.rs +++ b/kernel/arch/x86_64/src/mem/mod.rs @@ -384,7 +384,7 @@ pub unsafe fn init_fixed_tables() { (ram_mapping_l1_phys as u64) | (PageAttributes::WRITABLE | PageAttributes::PRESENT).bits(); // TODO ENABLE EFER.NXE - let cr3 = &KERNEL_TABLES.l0 as *const _ as usize - KERNEL_VIRT_OFFSET; + let cr3 = &raw const KERNEL_TABLES.l0 as usize - KERNEL_VIRT_OFFSET; CR3.set_address(cr3); } diff --git a/kernel/driver/block/nvme/src/lib.rs b/kernel/driver/block/nvme/src/lib.rs index 360d5c2b..3693ee26 100644 --- a/kernel/driver/block/nvme/src/lib.rs +++ b/kernel/driver/block/nvme/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(strict_provenance, const_trait_impl, let_chains, if_let_guard)] +#![feature(const_trait_impl, let_chains, if_let_guard)] #![allow(missing_docs)] #![no_std] diff --git a/kernel/driver/block/nvme/src/queue.rs b/kernel/driver/block/nvme/src/queue.rs index 15a1b180..dcc4504f 100644 --- a/kernel/driver/block/nvme/src/queue.rs +++ b/kernel/driver/block/nvme/src/queue.rs @@ -282,15 +282,15 @@ impl QueuePair { self.cq_base } - pub fn poll_completion(&self, command_id: u32) -> Poll> { - let mut inner = self.inner.lock(); + // pub fn poll_completion(&self, command_id: u32) -> Poll> { + // let mut inner = self.inner.lock(); - match inner.completed.remove(&command_id) { - Some(result) if let Some(_error) = result.error() => todo!(), - Some(_) => Poll::Ready(Ok(())), - None => Poll::Pending, - } - } + // match inner.completed.remove(&command_id) { + // Some(result) if let Some(_error) = result.error() => todo!(), + // Some(_) => Poll::Ready(Ok(())), + // None => Poll::Pending, + // } + // } pub fn wait_for_completion<'r, T: Unpin + 'r>( &'r self, diff --git a/kernel/driver/fs/memfs/src/lib.rs b/kernel/driver/fs/memfs/src/lib.rs index d16889b6..71808d57 100644 --- a/kernel/driver/fs/memfs/src/lib.rs +++ b/kernel/driver/fs/memfs/src/lib.rs @@ -3,7 +3,6 @@ #![deny(missing_docs)] #![allow(clippy::new_without_default, clippy::new_ret_no_self)] #![feature( - const_mut_refs, maybe_uninit_uninit_array, const_maybe_uninit_uninit_array, maybe_uninit_array_assume_init diff --git a/kernel/driver/virtio/net/src/lib.rs b/kernel/driver/virtio/net/src/lib.rs index ffe2dba1..7c6819af 100644 --- a/kernel/driver/virtio/net/src/lib.rs +++ b/kernel/driver/virtio/net/src/lib.rs @@ -1,5 +1,4 @@ // TODO use more fancy features of virtio-net, TCP/IP checksum offloading would be nice -#![feature(strict_provenance)] #![no_std] extern crate alloc; @@ -248,7 +247,6 @@ impl InterruptHandler for VirtioNet { let (queue_irq, config_irq) = self.transport.lock().read_interrupt_status(); if queue_irq { - log::debug!("Handle IRQ"); self.handle_receive_interrupt(0); } diff --git a/kernel/libk/libk-mm/interface/src/lib.rs b/kernel/libk/libk-mm/interface/src/lib.rs index 7a1b2b99..eeb5814e 100644 --- a/kernel/libk/libk-mm/interface/src/lib.rs +++ b/kernel/libk/libk-mm/interface/src/lib.rs @@ -1,5 +1,5 @@ #![no_std] -#![feature(step_trait, const_trait_impl, strict_provenance)] +#![feature(step_trait, const_trait_impl)] use core::ops::{Deref, DerefMut}; diff --git a/kernel/libk/libk-mm/src/lib.rs b/kernel/libk/libk-mm/src/lib.rs index de646bcb..0f615b90 100644 --- a/kernel/libk/libk-mm/src/lib.rs +++ b/kernel/libk/libk-mm/src/lib.rs @@ -1,5 +1,4 @@ #![feature( - strict_provenance, maybe_uninit_slice, slice_ptr_get, step_trait, diff --git a/kernel/libk/libk-util/src/lib.rs b/kernel/libk/libk-util/src/lib.rs index d534f53c..60055424 100644 --- a/kernel/libk/libk-util/src/lib.rs +++ b/kernel/libk/libk-util/src/lib.rs @@ -4,7 +4,6 @@ async_fn_traits, async_closure, maybe_uninit_slice, - new_uninit, allocator_api, let_chains, const_trait_impl, diff --git a/kernel/libk/src/lib.rs b/kernel/libk/src/lib.rs index 81503872..26ebefe6 100644 --- a/kernel/libk/src/lib.rs +++ b/kernel/libk/src/lib.rs @@ -10,18 +10,17 @@ step_trait, const_trait_impl, slice_ptr_get, - strict_provenance, never_type, let_chains, allocator_api, maybe_uninit_uninit_array, const_maybe_uninit_uninit_array, - new_uninit, trait_alias, if_let_guard, trait_upcasting, arbitrary_self_types, - slice_split_once + slice_split_once, + arbitrary_self_types_pointers )] extern crate alloc; diff --git a/kernel/libk/src/task/binary/elf.rs b/kernel/libk/src/task/binary/elf.rs index dd9b604a..34ef2403 100644 --- a/kernel/libk/src/task/binary/elf.rs +++ b/kernel/libk/src/task/binary/elf.rs @@ -178,6 +178,7 @@ pub fn load_elf_from_file( space: &ProcessAddressSpace, mut elf: ElfStream>, file: FileReader, + aslr: bool, ) -> Result { // TODO get information about interpreter: this could be a dynamic (not just relocatable) // executable with required dependency libraries @@ -186,7 +187,7 @@ pub fn load_elf_from_file( let (vaddr_min, vaddr_max) = elf_virtual_range(&elf); let image_load_size = vaddr_max - vaddr_min; let (image_load_base, ip_offset) = - elf_load_address(elf.ehdr.e_type, vaddr_min, image_load_size); + elf_load_address(aslr, elf.ehdr.e_type, vaddr_min, image_load_size); log::debug!( "Loading ELF virtual {:#x?} -> real {:#x?}", @@ -306,24 +307,33 @@ pub fn elf_virtual_range( (vaddr_min, vaddr_max) } -fn elf_load_address(elf_type: u16, virtual_address: usize, size: usize) -> (usize, usize) { +fn elf_load_address( + aslr: bool, + elf_type: u16, + virtual_address: usize, + #[allow(unused)] size: usize, +) -> (usize, usize) { match elf_type { elf::abi::ET_EXEC => (virtual_address, 0), elf::abi::ET_DYN => { - #[cfg(any(target_pointer_width = "32", rust_analyzer))] - { - let ceiling = (0x30000000 - size) / 0x1000 - 0x500; + let base = if aslr { + #[cfg(any(target_pointer_width = "32", rust_analyzer))] + { + let ceiling = (0x30000000 - size) / 0x1000 - 0x500; - let index = random::range(0x500, ceiling as _); - let base = (index as usize) * 0x1000; - (base, base) - } - #[cfg(any(target_pointer_width = "64", rust_analyzer))] - { - let index = random::range(0x5000, 0x20000); - let base = (index as usize) * 0x1000; - (base, base) - } + let index = random::range(0x500, ceiling as _); + (index as usize) * 0x1000 + } + #[cfg(any(target_pointer_width = "64", rust_analyzer))] + { + let index = random::range(0x5000, 0x20000); + (index as usize) * 0x1000 + } + } else { + 0x400000 + }; + + (base, base) } // Handled in load_elf_from_file() _ => unreachable!(), @@ -404,8 +414,8 @@ fn handle_tls( if data_size > 0 { load_bytes( space, - master_copy_base, master_copy_base + data_offset, + data_size, |off, mut dst| { file.file .seek(SeekFrom::Start(tls_segment.p_offset + off as u64))?; @@ -569,7 +579,6 @@ where F: FnMut(usize, PhysicalRefMut<'_, [u8]>) -> Result<(), Error>, { // TODO check for crazy addresses here - let dst_page_off = addr & 0xFFF; let dst_page_aligned = addr & !0xFFF; let mut off = 0usize; diff --git a/kernel/libk/src/task/binary/mod.rs b/kernel/libk/src/task/binary/mod.rs index 5b97e960..0a830c07 100644 --- a/kernel/libk/src/task/binary/mod.rs +++ b/kernel/libk/src/task/binary/mod.rs @@ -44,6 +44,7 @@ pub struct LoadOptions<'e, P: AsRef> { pub args: &'e [&'e str], pub envs: &'e [&'e str], pub single_step: bool, + pub disable_aslr: bool, } struct BufferPlacer<'a> { @@ -208,24 +209,13 @@ where Ok((process, main)) } -// fn load_binary( -// head: &[u8], -// file: Arc, -// space: &ProcessAddressSpace, -// ) -> Result { -// if head.starts_with(b"\x7FELF") { -// elf::load_elf_from_file(space, file) -// } else { -// Err(Error::UnrecognizedExecutable) -// } -// } - fn xxx_load_program>( space: &ProcessAddressSpace, ioctx: &mut IoContext, path: P, args: Vec, envs: Vec, + aslr: bool, ) -> Result<(ProcessImage, Vec, Vec), Error> { let mut head = [0; 256]; let path = path.as_ref(); @@ -246,7 +236,14 @@ fn xxx_load_program>( } shebang_args.extend_from_slice(&args); - return xxx_load_program(space, ioctx, shebang_args[0].clone(), shebang_args, envs); + return xxx_load_program( + space, + ioctx, + shebang_args[0].clone(), + shebang_args, + envs, + aslr, + ); } file.seek(SeekFrom::Start(0))?; @@ -254,7 +251,7 @@ fn xxx_load_program>( if head.starts_with(b"\x7FELF") { match elf::open_elf_file(file)? { ElfKind::Static(elf, file) => { - let image = elf::load_elf_from_file(space, elf, file)?; + let image = elf::load_elf_from_file(space, elf, file, aslr)?; Ok((image, args, envs)) } @@ -263,7 +260,7 @@ fn xxx_load_program>( let mut interp_args = Vec::new(); interp_args.push(interp.as_str().into()); interp_args.extend_from_slice(&args); - xxx_load_program(space, ioctx, interp, interp_args, envs) + xxx_load_program(space, ioctx, interp, interp_args, envs, aslr) } } } else { @@ -281,7 +278,8 @@ pub fn load>( let envs = options.envs.iter().map(|&s| s.to_owned()).collect(); let space = ProcessAddressSpace::new()?; - let (image, args, envs) = xxx_load_program(&space, ioctx, path, args, envs)?; + let (image, args, envs) = + xxx_load_program(&space, ioctx, path, args, envs, !options.disable_aslr)?; let name = path.display(); let name = match name.rsplit_once('/') { Some((_, name)) => name, @@ -301,7 +299,14 @@ pub fn load_into>( let path = options.path.as_ref().to_owned(); let space = process.space(); space.clear()?; - let (image, args, envs) = xxx_load_program(&space, io.ioctx_mut(), &path, args, envs)?; + let (image, args, envs) = xxx_load_program( + &space, + io.ioctx_mut(), + &path, + args, + envs, + !options.disable_aslr, + )?; let context = setup_context(options, &space, &image, &args, &envs)?; Ok((context, image)) diff --git a/kernel/libk/src/task/thread.rs b/kernel/libk/src/task/thread.rs index 1cc28342..8a16a86c 100644 --- a/kernel/libk/src/task/thread.rs +++ b/kernel/libk/src/task/thread.rs @@ -176,6 +176,7 @@ impl Thread { /// # Safety /// /// `sp` must be a valid writable pointer to the task's stack, growing downward. + #[allow(unused)] pub unsafe fn setup_stack_header( space: &ProcessAddressSpace, mut sp: *mut usize, diff --git a/kernel/libk/src/task/types.rs b/kernel/libk/src/task/types.rs index 970b1e2d..b7ac730a 100644 --- a/kernel/libk/src/task/types.rs +++ b/kernel/libk/src/task/types.rs @@ -163,13 +163,15 @@ impl ProcessTlsLayout { debug_assert!(align.is_power_of_two()); let tls_block0_offset = (size_of::() * 2 + align - 1) & !(align - 1); + // Allocate two words in the back for extra storage + let back_size = size_of::() * 2; - let full_size = (tls_block0_offset + mem_size + align - 1) & !(align - 1); + let full_size = back_size + (tls_block0_offset + mem_size + align - 1) & !(align - 1); Self { - data_offset: tls_block0_offset, - uthread_offset: 0, - ptr_offset: 0, + data_offset: tls_block0_offset + back_size, + uthread_offset: back_size, + ptr_offset: back_size, data_size, mem_size, @@ -188,8 +190,11 @@ impl ProcessTlsLayout { // TP points to the TCB debug_assert!(align.is_power_of_two()); let back_size = (mem_size + align - 1) & !(align - 1); - // Self-pointer - let forward_size = size_of::() * 2; + // 0: self-pointer + // 1: - + // 2: segment pointer + // 3: segment size + let forward_size = size_of::() * 4; let full_size = back_size + forward_size; @@ -212,7 +217,7 @@ impl ProcessTlsLayout { debug_assert!(align.is_power_of_two()); let back_size = (mem_size + align - 1) & !(align - 1); - let forward_size = size_of::(); + let forward_size = size_of::() * 4; let full_size = back_size + forward_size; Self { diff --git a/kernel/libk/src/vfs/timer.rs b/kernel/libk/src/vfs/timer.rs index aa5076d9..87dd1b02 100644 --- a/kernel/libk/src/vfs/timer.rs +++ b/kernel/libk/src/vfs/timer.rs @@ -1,6 +1,5 @@ use core::{ mem::size_of, - sync::atomic::AtomicBool, task::{Context, Poll}, time::Duration, }; @@ -37,8 +36,8 @@ impl TimerFile { } } -impl TimerFile { - pub fn read(&self, buf: &mut [u8]) -> Result { +impl Read for TimerFile { + fn read(&self, buf: &mut [u8]) -> Result { if buf.len() < size_of::() { return Err(Error::BufferTooSmall); } diff --git a/kernel/src/init.rs b/kernel/src/init.rs index 70ffa5e3..da855dc8 100644 --- a/kernel/src/init.rs +++ b/kernel/src/init.rs @@ -82,6 +82,7 @@ pub fn kinit() -> Result<(), Error> { args: &["/init", "xxx"], envs: &[], single_step: false, + disable_aslr: false, }; let (user_init, user_init_main) = proc::load_binary(&mut ioctx, &options)?; diff --git a/kernel/src/main.rs b/kernel/src/main.rs index 6d8e4e52..6de84ddd 100644 --- a/kernel/src/main.rs +++ b/kernel/src/main.rs @@ -4,18 +4,15 @@ step_trait, decl_macro, naked_functions, - asm_const, optimize_attribute, const_trait_impl, maybe_uninit_slice, arbitrary_self_types, - const_mut_refs, let_chains, linked_list_cursors, rustc_private, allocator_api, trait_alias, - strict_provenance, slice_ptr_get, slice_split_once, iter_collect_into, @@ -36,6 +33,8 @@ #![deny(missing_docs)] #![no_std] #![no_main] +// XXX FIXME TODO +#![allow(static_mut_refs)] use arch::Platform; use kernel_arch::{Architecture, ArchitectureImpl}; diff --git a/kernel/src/proc/mod.rs b/kernel/src/proc/mod.rs index 6b380e02..d4719537 100644 --- a/kernel/src/proc/mod.rs +++ b/kernel/src/proc/mod.rs @@ -13,5 +13,7 @@ pub fn load_binary>( ioctx: &mut IoContext, options: &LoadOptions

, ) -> Result<(Arc, Arc), Error> { - libk::task::binary::load(ioctx, options) + libk::task::binary::load(ioctx, options).inspect_err(|e| { + log::warn!("Failed to load binary: {e:?}"); + }) } diff --git a/kernel/src/syscall/imp/sys_process.rs b/kernel/src/syscall/imp/sys_process.rs index a49fa9c6..e8e45c78 100644 --- a/kernel/src/syscall/imp/sys_process.rs +++ b/kernel/src/syscall/imp/sys_process.rs @@ -5,8 +5,8 @@ use abi::{ io::DeviceRequest, mem::MappingSource, process::{ - ExitCode, MutexOperation, ProcessGroupId, ProcessId, Signal, SpawnOption, SpawnOptions, - ThreadSpawnOptions, + ExitCode, MutexOperation, ProcessGroupId, ProcessId, Signal, SpawnFlags, SpawnOption, + SpawnOptions, ThreadSpawnOptions, }, }; use alloc::sync::Arc; @@ -114,6 +114,7 @@ pub(crate) fn spawn_process(options: &SpawnOptions<'_>) -> Result { pub environment: &'a [&'a str], /// Optional arguments to specify details of the creation pub optional: &'a [SpawnOption], + /// Extra flags controlling the new process behavior + pub flags: SpawnFlags, } /// Legacy execve(2) arguments diff --git a/lib/abi/src/process/mod.rs b/lib/abi/src/process/mod.rs index 8f06d547..67b920f2 100644 --- a/lib/abi/src/process/mod.rs +++ b/lib/abi/src/process/mod.rs @@ -10,8 +10,8 @@ use crate::{ mod exit; pub use crate::generated::{ - ExecveOptions, ProcessGroupId, ProcessId, Signal, SignalEntryData, SpawnOptions, ThreadId, - ThreadSpawnOptions, + ExecveOptions, ProcessGroupId, ProcessId, Signal, SignalEntryData, SpawnFlags, SpawnOptions, + ThreadId, ThreadSpawnOptions, }; pub use exit::ExitCode; diff --git a/lib/libyalloc/src/lib.rs b/lib/libyalloc/src/lib.rs index 4db15a3d..b945b2bc 100644 --- a/lib/libyalloc/src/lib.rs +++ b/lib/libyalloc/src/lib.rs @@ -1,15 +1,12 @@ #![feature( generic_const_exprs, arbitrary_self_types, - strict_provenance, - exposed_provenance, let_chains, test, allocator_api )] #![cfg_attr(not(test), no_std)] #![allow(incomplete_features, unexpected_cfgs, clippy::new_without_default)] -#![deny(fuzzy_provenance_casts, lossy_provenance_casts)] #[cfg(test)] extern crate test; diff --git a/lib/libyalloc/src/sys.rs b/lib/libyalloc/src/sys.rs index 33a041e0..209a1fcd 100644 --- a/lib/libyalloc/src/sys.rs +++ b/lib/libyalloc/src/sys.rs @@ -46,7 +46,7 @@ impl PageProvider for OsPageProvider { } .ok()?; - NonNull::new(core::ptr::from_exposed_addr_mut(address)) + NonNull::new(core::ptr::with_exposed_provenance_mut(address)) } fn unmap_pages(address: NonNull, count: usize) { diff --git a/lib/runtime/src/lib.rs b/lib/runtime/src/lib.rs index 5247f48c..45feb273 100644 --- a/lib/runtime/src/lib.rs +++ b/lib/runtime/src/lib.rs @@ -1,5 +1,5 @@ //! Yggdrasil OS application runtime -#![feature(rustc_private, strict_provenance)] +#![feature(rustc_private)] #![no_std] #![deny(missing_docs)] #![allow(nonstandard_style)] diff --git a/lib/runtime/src/process.rs b/lib/runtime/src/process.rs index e9996838..eeaa15e4 100644 --- a/lib/runtime/src/process.rs +++ b/lib/runtime/src/process.rs @@ -1,7 +1,88 @@ //! Process management data types +use abi::mem::MappingSource; pub use abi::process::{ ExecveOptions, ExitCode, MutexOperation, ProcessGroupId, ProcessId, ProcessInfoElement, - ProgramArgumentInner, Signal, SignalEntryData, SpawnOption, SpawnOptions, ThreadId, + ProgramArgumentInner, Signal, SignalEntryData, SpawnFlags, SpawnOption, SpawnOptions, ThreadId, ThreadSpawnOptions, }; + +use crate::sys; + +const THREAD_LOCAL_AREA_SIZE: usize = 4096 / size_of::(); + +/// # Safety +/// +/// `tp` must be a proper and aligned pointer to a pair of [usize] words. +unsafe fn thread_local_area_common(tp: usize) -> &'static mut [*mut u8] { + // 0: segment pointer, 1: segment len + // seg ptr -> thread-local pointer list base + let ptr: *mut *mut *mut u8 = core::ptr::with_exposed_provenance_mut(tp); + let len: *mut usize = core::ptr::with_exposed_provenance_mut(tp + size_of::()); + + let (base, len) = if unsafe { (*ptr).is_null() } { + // If segment is NULL, allocate some memory and map it here + let base = unsafe { sys::map_memory(None, 4096, &MappingSource::Anonymous) } + .expect("Could not allocate TLS storage"); + let base = core::ptr::with_exposed_provenance_mut::<*mut u8>(base); + + unsafe { + *ptr = base; + *len = THREAD_LOCAL_AREA_SIZE; + } + + (base, THREAD_LOCAL_AREA_SIZE) + } else { + // Otherwise return the existing values + unsafe { (*ptr, *len) } + }; + + unsafe { core::slice::from_raw_parts_mut(base, len) } +} + +#[cfg(any(target_arch = "x86", target_arch = "x86_64", rust_analyzer))] +fn thread_local_area_impl() -> &'static mut [*mut u8] { + #[cfg(any(target_arch = "x86", rust_analyzer))] + fn get_tls() -> usize { + let tp: usize; + unsafe { + core::arch::asm!("mov %gs:0, {0}", out(reg) tp, options(att_syntax)); + } + tp + } + #[cfg(any(target_arch = "x86_64", rust_analyzer))] + fn get_tls() -> usize { + let tp: usize; + unsafe { + core::arch::asm!("mov %fs:0, {0}", out(reg) tp, options(att_syntax)); + } + tp + } + + let tp = get_tls(); + + // Skip self-pointer + assert_eq!(tp % size_of::(), 0); + let tp = tp + size_of::() * 2; + + unsafe { thread_local_area_common(tp) } +} + +#[cfg(any(target_arch = "aarch64", rust_analyzer))] +fn thread_local_area_impl() -> &'static mut [*mut u8] { + let tp: usize; + unsafe { + core::arch::asm!("mrs {0}, tpidr_el0", out(reg) tp); + } + // Kernel reserves two words below the TP + assert_eq!(tp % size_of::(), 0); + let tp = tp - size_of::() * 2; + + unsafe { thread_local_area_common(tp) } +} + +/// Returns a reference to the thread-local area, which contains thread-local pointers +pub fn thread_local_area() -> &'static mut [*mut u8] { + // TODO grow thread local areas based on size requested? + thread_local_area_impl() +} diff --git a/lib/runtime/src/time.rs b/lib/runtime/src/time.rs index 5816068d..ef417a20 100644 --- a/lib/runtime/src/time.rs +++ b/lib/runtime/src/time.rs @@ -11,8 +11,17 @@ pub struct Timespec { } impl Timespec { + /// Zero [Timespec] + pub const ZERO: Self = Self { + seconds: 0, + nanoseconds: 0, + }; + /// Constructs a [Timespec] with all components set to zero pub const fn zero() -> Self { - Self { seconds: 0, nanoseconds: 0 } + Self { + seconds: 0, + nanoseconds: 0, + } } } diff --git a/tool/abi-generator/src/abi/mod.rs b/tool/abi-generator/src/abi/mod.rs index 978d9862..da37594e 100644 --- a/tool/abi-generator/src/abi/mod.rs +++ b/tool/abi-generator/src/abi/mod.rs @@ -475,15 +475,26 @@ impl GenerateTypeDefinition for BitfieldType { let const_default_fn = if let Some(default_attr) = default_attr { // TODO handle error let default_attr = default_attr.unwrap(); - let value = default_attr - .items - .into_iter() - .map(|ident| quote!(Self::#ident.bits())) - .collect::>(); - quote! { - pub const fn const_default() -> Self { - Self(#value) + match default_attr { + BitfieldDefaultValue::Empty(_) => { + quote! { + pub const fn const_default() -> Self { + Self::empty() + } + } + } + BitfieldDefaultValue::Fields(items) => { + let value = items + .into_iter() + .map(|ident| quote!(Self::#ident.bits())) + .collect::>(); + + quote! { + pub const fn const_default() -> Self { + Self(#value) + } + } } } } else { diff --git a/tool/abi-generator/src/lib.rs b/tool/abi-generator/src/lib.rs index e9ec0178..bc49ae63 100644 --- a/tool/abi-generator/src/lib.rs +++ b/tool/abi-generator/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(if_let_guard, extend_one, proc_macro_span, strict_provenance)] +#![feature(if_let_guard, extend_one, proc_macro_span)] use crate::abi::ty::TypeWidth; diff --git a/tool/abi-generator/src/syntax/bitfield_type.rs b/tool/abi-generator/src/syntax/bitfield_type.rs index 3b33f4c9..e09cbd2d 100644 --- a/tool/abi-generator/src/syntax/bitfield_type.rs +++ b/tool/abi-generator/src/syntax/bitfield_type.rs @@ -8,8 +8,9 @@ use super::{ }; #[derive(Clone)] -pub struct BitfieldDefaultValue { - pub items: Punctuated, +pub enum BitfieldDefaultValue { + Fields(Punctuated), + Empty(Token![_]), } #[derive(Clone)] @@ -41,8 +42,13 @@ impl DocumentItemAttributes for BitfieldType { impl syn::parse::Parse for BitfieldDefaultValue { fn parse(input: syn::parse::ParseStream<'_>) -> syn::Result { - let items = input.parse_terminated(syn::Ident::parse, Token![|])?; - Ok(Self { items }) + if input.peek(Token![_]) { + let empty = input.parse()?; + Ok(Self::Empty(empty)) + } else { + let items = input.parse_terminated(syn::Ident::parse, Token![|])?; + Ok(Self::Fields(items)) + } } } diff --git a/userspace/Cargo.lock b/userspace/Cargo.lock index 5982382f..58b501ab 100644 --- a/userspace/Cargo.lock +++ b/userspace/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "abi-generator" @@ -34,6 +34,12 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "bitflags" version = "1.3.2" @@ -46,6 +52,15 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + [[package]] name = "bytemuck" version = "1.19.0" @@ -147,6 +162,21 @@ dependencies = [ "yggdrasil-abi", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "cpufeatures" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +dependencies = [ + "libc", +] + [[package]] name = "cross" version = "0.1.0" @@ -179,6 +209,53 @@ dependencies = [ "winapi", ] +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + [[package]] name = "deranged" version = "0.3.11" @@ -188,6 +265,40 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "serde", + "sha2", + "subtle", + "zeroize", +] + [[package]] name = "elf" version = "0.7.4" @@ -234,6 +345,12 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "flexbuffers" version = "2.0.0" @@ -293,10 +410,20 @@ dependencies = [ "slab", ] +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "getrandom" version = "0.2.12" -source = "git+https://git.alnyan.me/yggdrasil/getrandom.git?branch=alnyan/yggdrasil#0c156352b5ebf7a3b137b460ee5536c2c3a1e835" +source = "git+https://git.alnyan.me/yggdrasil/getrandom.git?branch=alnyan%2Fyggdrasil#0c156352b5ebf7a3b137b460ee5536c2c3a1e835" dependencies = [ "cfg-if", "libc", @@ -608,6 +735,16 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -664,27 +801,36 @@ dependencies = [ [[package]] name = "rand" version = "0.9.0" -source = "git+https://git.alnyan.me/yggdrasil/rand.git?branch=alnyan/yggdrasil#9fac921fcc405a936b9a88b6bb9f2ced264bc0ec" +source = "git+https://git.alnyan.me/yggdrasil/rand.git?branch=alnyan%2Fyggdrasil#9fac921fcc405a936b9a88b6bb9f2ced264bc0ec" dependencies = [ "libc", "rand_chacha", - "rand_core", + "rand_core 0.7.0", "zerocopy", ] [[package]] name = "rand_chacha" version = "0.4.0" -source = "git+https://git.alnyan.me/yggdrasil/rand.git?branch=alnyan/yggdrasil#9fac921fcc405a936b9a88b6bb9f2ced264bc0ec" +source = "git+https://git.alnyan.me/yggdrasil/rand.git?branch=alnyan%2Fyggdrasil#9fac921fcc405a936b9a88b6bb9f2ced264bc0ec" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.7.0", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", ] [[package]] name = "rand_core" version = "0.7.0" -source = "git+https://git.alnyan.me/yggdrasil/rand.git?branch=alnyan/yggdrasil#9fac921fcc405a936b9a88b6bb9f2ced264bc0ec" +source = "git+https://git.alnyan.me/yggdrasil/rand.git?branch=alnyan%2Fyggdrasil#9fac921fcc405a936b9a88b6bb9f2ced264bc0ec" dependencies = [ "getrandom 0.2.12", "zerocopy", @@ -746,21 +892,6 @@ dependencies = [ "bitflags 2.6.0", ] -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.15", - "libc", - "spin", - "untrusted", - "windows-sys 0.52.0", -] - [[package]] name = "rsh" version = "0.1.0" @@ -768,9 +899,9 @@ dependencies = [ "bytemuck", "clap", "cross", + "ed25519-dalek", "flexbuffers", "libterm", - "rustls", "serde", "smallvec", "thiserror", @@ -782,6 +913,15 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rustix" version = "0.38.38" @@ -795,36 +935,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.23.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" -dependencies = [ - "once_cell", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pki-types" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" - -[[package]] -name = "rustls-webpki" -version = "0.102.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - [[package]] name = "ryu" version = "1.0.18" @@ -837,6 +947,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + [[package]] name = "serde" version = "1.0.214" @@ -879,6 +995,17 @@ dependencies = [ "serde", ] +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "shell" version = "0.1.0" @@ -927,6 +1054,15 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "slab" version = "0.4.9" @@ -946,10 +1082,14 @@ dependencies = [ ] [[package]] -name = "spin" -version = "0.9.8" +name = "spki" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] [[package]] name = "spmc" @@ -1015,6 +1155,7 @@ dependencies = [ "rand", "serde", "serde_json", + "sha2", "thiserror", "yggdrasil-abi", "yggdrasil-rt", @@ -1134,6 +1275,12 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + [[package]] name = "unicode-bidi" version = "0.3.17" @@ -1161,12 +1308,6 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - [[package]] name = "url" version = "2.5.2" diff --git a/userspace/dynload-program/Cargo.toml b/userspace/dynload-program/Cargo.toml index b32c9c38..8e3f2c25 100644 --- a/userspace/dynload-program/Cargo.toml +++ b/userspace/dynload-program/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" edition = "2021" [dependencies] -yggdrasil-rt.workspace = true +yggdrasil-rt.path = "../../lib/runtime" diff --git a/userspace/lib/cross/Cargo.toml b/userspace/lib/cross/Cargo.toml index 83b2a178..a140707f 100644 --- a/userspace/lib/cross/Cargo.toml +++ b/userspace/lib/cross/Cargo.toml @@ -10,3 +10,6 @@ libc = "*" [dev-dependencies] libc = "*" + +[lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(rust_analyzer)'] } diff --git a/userspace/lib/serde-ipc/Cargo.toml b/userspace/lib/serde-ipc/Cargo.toml index 97e104d7..5c9ba247 100644 --- a/userspace/lib/serde-ipc/Cargo.toml +++ b/userspace/lib/serde-ipc/Cargo.toml @@ -10,3 +10,6 @@ serde.workspace = true thiserror.workspace = true tempfile = "3.12.0" + +[lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(rust_analyzer)'] } diff --git a/userspace/rdb/Cargo.toml b/userspace/rdb/Cargo.toml index 7e17f679..b76ca4e1 100644 --- a/userspace/rdb/Cargo.toml +++ b/userspace/rdb/Cargo.toml @@ -21,3 +21,6 @@ iced-x86 = { version = "1.21.0", default-features = false, features = ["gas", "d [dev-dependencies] iced-x86 = { version = "1.21.0", default-features = false, features = ["gas", "decoder", "std"] } + +[lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(rust_analyzer)'] } diff --git a/userspace/rsh/Cargo.toml b/userspace/rsh/Cargo.toml index ebcdc7d1..b51e8c2b 100644 --- a/userspace/rsh/Cargo.toml +++ b/userspace/rsh/Cargo.toml @@ -17,4 +17,4 @@ cross.workspace = true bytemuck.workspace = true smallvec = { version = "1.13.2", features = ["serde"] } -rustls = { version = "0.23.16", default-features = false } +ed25519-dalek = "2.1.1" diff --git a/userspace/rsh/src/rshd/main.rs b/userspace/rsh/src/rshd/main.rs index 298e53fd..e97459d6 100644 --- a/userspace/rsh/src/rshd/main.rs +++ b/userspace/rsh/src/rshd/main.rs @@ -245,7 +245,11 @@ impl Server { } fn remove_session_by_fd(&mut self, fd: RawFd) -> Result, Error> { - if let Some(session) = self.pty_to_session.remove(&fd) { + if let Some(mut session) = self.pty_to_session.remove(&fd) { + // TODO: implement kernel support for pidfd or something, to poll the exit status of + // the task instead of doing it here. + // NOTE: this will block the whole server while the process finishes. + session.shell.wait().ok(); self.addr_to_session.remove(&session.remote).unwrap(); self.poll.remove(&fd)?; Ok(Some(session)) diff --git a/userspace/sysutils/Cargo.toml b/userspace/sysutils/Cargo.toml index a1b49ed1..ec0fe0bb 100644 --- a/userspace/sysutils/Cargo.toml +++ b/userspace/sysutils/Cargo.toml @@ -18,7 +18,7 @@ serde_json.workspace = true # TODO own impl humansize = { version = "2.1.3", features = ["impl_style"] } -# sha2 = { version = "0.10.8" } +sha2 = { version = "0.10.8" } init = { path = "../init" } @@ -87,9 +87,9 @@ path = "src/view.rs" name = "chmod" path = "src/chmod.rs" -# [[bin]] -# name = "sha256sum" -# path = "src/sha256sum.rs" +[[bin]] +name = "sha256sum" +path = "src/sha256sum.rs" [[bin]] name = "sysmon" diff --git a/xtask/src/build/userspace.rs b/xtask/src/build/userspace.rs index 192b7a79..06c23ac4 100644 --- a/xtask/src/build/userspace.rs +++ b/xtask/src/build/userspace.rs @@ -32,7 +32,7 @@ const PROGRAMS: &[(&str, &str)] = &[ ("random", "bin/random"), ("view", "bin/view"), ("chmod", "bin/chmod"), - // ("sha256sum", "bin/sha256sum"), + ("sha256sum", "bin/sha256sum"), ("sysmon", "bin/sysmon"), ("tst", "bin/tst"), // netutils