Compare commits
230 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
f4102e7db4 | |
|
|
195ff99138 | |
|
|
e6104161b7 | |
|
|
c9032ad97c | |
|
|
bc9f8fe964 | |
|
|
b86d74344a | |
|
|
5f8b019369 | |
|
|
bf13673b97 | |
|
|
4a80f0e5eb | |
|
|
c8f2cfaeae | |
|
|
d1c9d119b3 | |
|
|
84bced252b | |
|
|
3ae286980e | |
|
|
3d6d91ea18 | |
|
|
a84813150f | |
|
|
81e4c90449 | |
|
|
18f97d01fc | |
|
|
dd25a8ad62 | |
|
|
744e95a819 | |
|
|
5bd40d7bd5 | |
|
|
5d0779bd83 | |
|
|
4f8bbf18a6 | |
|
|
b0407dd517 | |
|
|
ab4e0d9012 | |
|
|
8297da7247 | |
|
|
894f6ba9b4 | |
|
|
6d2ff13a63 | |
|
|
a4f77b12b6 | |
|
|
28fe11e98d | |
|
|
01cf00a4c6 | |
|
|
a599a2c563 | |
|
|
eefdaf4de9 | |
|
|
b11fcdcf0b | |
|
|
08d54ec6ad | |
|
|
fb8c9e0c27 | |
|
|
66ac28c4c2 | |
|
|
ea142155fb | |
|
|
306cc714ae | |
|
|
425cc2d1cf | |
|
|
b1071b6b92 | |
|
|
22dd288b07 | |
|
|
3c959bf0a0 | |
|
|
000ad53c9f | |
|
|
81c2f8d4bd | |
|
|
dee39e21d1 | |
|
|
a82d185154 | |
|
|
a09de99c1d | |
|
|
f055a387a7 | |
|
|
5499436807 | |
|
|
a3314c6432 | |
|
|
459a634e4a | |
|
|
76586dd6fb | |
|
|
b2ea514556 | |
|
|
e4ebd821de | |
|
|
e44d7e2b12 | |
|
|
b7ae738310 | |
|
|
5792b49722 | |
|
|
6a61aa39b0 | |
|
|
43f570730c | |
|
|
6520682360 | |
|
|
98529bdbf0 | |
|
|
db6292a310 | |
|
|
77f0b0e746 | |
|
|
c77c2686d8 | |
|
|
f62ae40188 | |
|
|
bdc1c79770 | |
|
|
e082d4eaa6 | |
|
|
b5518ccd64 | |
|
|
43b8838d6a | |
|
|
d23d25c552 | |
|
|
f58fb66cba | |
|
|
2219e83f8e | |
|
|
b2b6499466 | |
|
|
8e6406ae35 | |
|
|
38d455496b | |
|
|
1e5f2e186c | |
|
|
5d5f0bdcde | |
|
|
505114c17b | |
|
|
815cbf061b | |
|
|
bd72728e04 | |
|
|
1c4fa5b303 | |
|
|
3fa0a105b0 | |
|
|
f1a144b876 | |
|
|
1723e5d944 | |
|
|
e483742852 | |
|
|
1cfe1709ed | |
|
|
7929aaf773 | |
|
|
3e7f321def | |
|
|
7764cd6839 | |
|
|
c1aa8a805c | |
|
|
fdcf5fd0fe | |
|
|
48ccafd7f9 | |
|
|
738d14f3c0 | |
|
|
ed333aa2c9 | |
|
|
d193ba821a | |
|
|
c439df3d02 | |
|
|
bae5de9e8f | |
|
|
4fa2b55e47 | |
|
|
dac3e94bea | |
|
|
3d27b376d7 | |
|
|
d9f4229e6c | |
|
|
8335ba22d9 | |
|
|
1e77c0a938 | |
|
|
4a88b6aa86 | |
|
|
138401b0ab | |
|
|
fedd6dc196 | |
|
|
0565dd1349 | |
|
|
bbb6a63ee4 | |
|
|
8eade9b631 | |
|
|
b25e41dd4f | |
|
|
e6361e5242 | |
|
|
cb5449cf2a | |
|
|
fe633972f3 | |
|
|
184e803869 | |
|
|
8ace76978e | |
|
|
1442060c2d | |
|
|
fc2e8d95c9 | |
|
|
922b204280 | |
|
|
91604c7b51 | |
|
|
284e193823 | |
|
|
413f459e20 | |
|
|
33f370966d | |
|
|
bb9b979586 | |
|
|
02a04f1365 | |
|
|
1bf5b398dc | |
|
|
f2b9e356f1 | |
|
|
4213908366 | |
|
|
c825c0d2c8 | |
|
|
7634a27ba6 | |
|
|
3dd881dec5 | |
|
|
d7cefdb761 | |
|
|
7ed0152d83 | |
|
|
d461f81ecb | |
|
|
2155869920 | |
|
|
4a93b34e3d | |
|
|
1ab7550c83 | |
|
|
a42b4cd078 | |
|
|
6288c057b0 | |
|
|
976f088712 | |
|
|
52085063bf | |
|
|
c09654887c | |
|
|
6f54cc56e7 | |
|
|
01cac4268e | |
|
|
34ab63addb | |
|
|
f4fab3f38a | |
|
|
95fc2ef17f | |
|
|
4f62f2db8e | |
|
|
a0b746fb3f | |
|
|
6eb6968716 | |
|
|
64bac5c7b4 | |
|
|
eb83a38d12 | |
|
|
d18b1dc624 | |
|
|
eb76ded5fc | |
|
|
8397854b37 | |
|
|
48c5891543 | |
|
|
dccf23e283 | |
|
|
bc230b24e1 | |
|
|
dd440c1376 | |
|
|
26ac77c371 | |
|
|
81e9bfa2ee | |
|
|
6ad67309fd | |
|
|
abf8d9f5e4 | |
|
|
71681dd947 | |
|
|
0c30edb5da | |
|
|
8dbb5ecd69 | |
|
|
82ccfcd4c6 | |
|
|
c91d383c91 | |
|
|
033c240d8f | |
|
|
7feb803eab | |
|
|
eee6708aec | |
|
|
142cd4b481 | |
|
|
d19ffac68a | |
|
|
e40091808a | |
|
|
84b235d3dd | |
|
|
1fe337e2fd | |
|
|
cdf4ff398d | |
|
|
f248b83ecc | |
|
|
4263b9be33 | |
|
|
8c090eb0e7 | |
|
|
ebfa7977b1 | |
|
|
046c9f6a94 | |
|
|
ca384fc427 | |
|
|
e92fbe3e69 | |
|
|
545efaa155 | |
|
|
2502e01909 | |
|
|
cf74341805 | |
|
|
7c7dd47b9b | |
|
|
dfe19e4f3c | |
|
|
7dc6fb980f | |
|
|
83c167ed5d | |
|
|
c4e8bf2c21 | |
|
|
b46a02463b | |
|
|
6d1155896d | |
|
|
57399a223c | |
|
|
631cbf92c3 | |
|
|
847ef4c784 | |
|
|
4fdf400d2a | |
|
|
e2f7b0eb73 | |
|
|
2b8ccbf3d2 | |
|
|
586266b086 | |
|
|
bcf8f5e93c | |
|
|
cd7859161d | |
|
|
2c80e0c3a4 | |
|
|
ae3113194a | |
|
|
afe5e59aeb | |
|
|
1ae4bb4743 | |
|
|
6f25a6cdd6 | |
|
|
7106c8acd8 | |
|
|
c7fa152889 | |
|
|
9c4f644bd9 | |
|
|
cc0609bc81 | |
|
|
b8654ed1b9 | |
|
|
4a9820cb11 | |
|
|
e238c56d5a | |
|
|
026b672393 | |
|
|
161dfbf90b | |
|
|
420c54de0e | |
|
|
fff756f116 | |
|
|
9b37e465ee | |
|
|
7caababf8d | |
|
|
b9e640f697 | |
|
|
8f7e6294e9 | |
|
|
302da67903 | |
|
|
f7afb13a67 | |
|
|
2266ce5959 | |
|
|
f30bd698d1 | |
|
|
da67967f6d | |
|
|
4f05bdc891 | |
|
|
49a2cecc81 | |
|
|
ecd0ac9662 |
|
|
@ -1,6 +1,6 @@
|
|||
# Ignore binaries to avoid performance issues
|
||||
target/
|
||||
test/build/
|
||||
test/initramfs/build/
|
||||
|
||||
# QEMU log file
|
||||
qemu.log
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ runs:
|
|||
shell: bash
|
||||
run: |
|
||||
make install_osdk
|
||||
bash test/src/benchmark/bench_linux_and_aster.sh "${{ matrix.benchmarks }}" "${{ inputs.platform }}"
|
||||
bash test/initramfs/src/benchmark/bench_linux_and_aster.sh "${{ matrix.benchmarks }}" "${{ inputs.platform }}"
|
||||
BENCHMARK_ARTIFACT=results_$(echo "${{ matrix.benchmarks }}" | tr '/' '-')
|
||||
echo "BENCHMARK_ARTIFACT=$BENCHMARK_ARTIFACT" >> $GITHUB_ENV
|
||||
|
||||
|
|
@ -76,8 +76,8 @@ runs:
|
|||
BENCHMARK_DIR=$(echo "$benchmark_id" | sed 's/-/\//g')
|
||||
BENCHMARK_SUITE=$(echo "$BENCHMARK_DIR" | awk -F'/' '{print $1}')
|
||||
BENCHMARK_NAME=$(echo "$BENCHMARK_DIR" | sed -E 's|^[^/]+/||; s|/bench_results||g; s|/|_|g')
|
||||
BENCH_RESULT_YAML="test/src/benchmark/${BENCHMARK_DIR}/bench_result.yaml"
|
||||
[ -f "$BENCH_RESULT_YAML" ] || BENCH_RESULT_YAML="test/src/benchmark/${BENCHMARK_DIR}.yaml"
|
||||
BENCH_RESULT_YAML="test/initramfs/src/benchmark/${BENCHMARK_DIR}/bench_result.yaml"
|
||||
[ -f "$BENCH_RESULT_YAML" ] || BENCH_RESULT_YAML="test/initramfs/src/benchmark/${BENCHMARK_DIR}.yaml"
|
||||
|
||||
if [ ! -f "$BENCH_RESULT_YAML" ]; then
|
||||
echo "Warning: YAML file not found for $benchmark_id at $BENCH_RESULT_YAML. Skipping config generation."
|
||||
|
|
@ -91,9 +91,9 @@ runs:
|
|||
DESCRIPTION=$(yq -r '.chart.description // "No description provided"' "$BENCH_RESULT_YAML")
|
||||
|
||||
# Generate summary JSON if needed (only once per suite)
|
||||
SUMMARY_JSON="test/src/benchmark/$BENCHMARK_SUITE/summary.json"
|
||||
SUMMARY_JSON="test/initramfs/src/benchmark/$BENCHMARK_SUITE/summary.json"
|
||||
if [ ! -f "$SUMMARY_JSON" ]; then
|
||||
SUMMARY_YAML="test/src/benchmark/$BENCHMARK_SUITE/summary.yaml"
|
||||
SUMMARY_YAML="test/initramfs/src/benchmark/$BENCHMARK_SUITE/summary.yaml"
|
||||
if [ -f "$SUMMARY_YAML" ]; then
|
||||
yq . "$SUMMARY_YAML" > "$SUMMARY_JSON"
|
||||
echo "Generated $SUMMARY_JSON"
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ runs:
|
|||
run: |
|
||||
CMD=""
|
||||
[[ "${{ matrix.id }}" == "lint" ]] && CMD+="make check"
|
||||
[[ "${{ matrix.id }}" == "compile" ]] && CMD+="make kernel FEATURES=all"
|
||||
[[ "${{ matrix.id }}" == "compile" ]] && CMD+="make kernel"
|
||||
[[ "${{ matrix.id }}" == "usermode_test" ]] && CMD+="make test"
|
||||
[[ "${{ matrix.id }}" == "ktest" ]] && CMD+="make ktest NETDEV=tap"
|
||||
[[ -n "${{ inputs.arch }}" ]] && CMD+=" OSDK_TARGET_ARCH=${{ inputs.arch }}"
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ jobs:
|
|||
max-parallel: 1
|
||||
timeout-minutes: 60
|
||||
container:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
image: asterinas/asterinas:0.17.0-20260114
|
||||
options: --device=/dev/kvm --privileged
|
||||
|
||||
steps:
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ jobs:
|
|||
max-parallel: 1
|
||||
timeout-minutes: 60
|
||||
container:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
image: asterinas/asterinas:0.17.0-20260114
|
||||
options: --device=/dev/kvm --privileged
|
||||
|
||||
steps:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
name: Close stale issues and PRs
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * 1" # Runs on every Monday
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Configurations for issues
|
||||
stale-issue-message: "This issue is stale because it has been open 180 days with no activity. It will be closed in 5 days if no further activity occurs."
|
||||
days-before-issue-stale: 180
|
||||
days-before-issue-close: 5
|
||||
stale-issue-label: "S-stale"
|
||||
|
||||
# Configurations for pull requests
|
||||
stale-pr-message: "This PR is stale because it has been open 180 days with no activity. It will be closed in 5 days to keep the queue clean."
|
||||
days-before-pr-stale: 180
|
||||
days-before-pr-close: 5
|
||||
stale-pr-label: "S-stale"
|
||||
|
|
@ -20,15 +20,18 @@ jobs:
|
|||
check_api_docs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
container: asterinas/asterinas:0.17.0-20251213
|
||||
container: asterinas/asterinas:0.17.0-20260114
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Check API docs
|
||||
- name: Check API docs of crates to publish
|
||||
if: github.event_name == 'pull_request'
|
||||
run: ./tools/github_workflows/publish_api_docs.sh --dry-run
|
||||
|
||||
- name: Check API docs of all crates
|
||||
run: make docs
|
||||
|
||||
- name: Build & Upload Nightly API Docs
|
||||
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -3,14 +3,16 @@ name: Publish AsterNixOS
|
|||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- VERSION
|
||||
|
||||
jobs:
|
||||
push-cachix:
|
||||
runs-on: ubuntu-4-cores-150GB-ssd
|
||||
container:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
image: asterinas/asterinas:0.17.0-20260114
|
||||
options: -v /dev:/dev --privileged
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
|
|
@ -18,11 +20,9 @@ jobs:
|
|||
|
||||
- name: Modify configuration.nix to include xfce and podman
|
||||
run: |
|
||||
sed -i \
|
||||
-e 's/^[[:space:]]*# services\.xserver\.enable = true;/ services.xserver.enable = true;/' \
|
||||
-e 's/^[[:space:]]*# services\.xserver\.desktopManager\.xfce\.enable = true;/ services.xserver.desktopManager.xfce.enable = true;/' \
|
||||
-e 's/^[[:space:]]*# virtualisation\.podman\.enable = true;/ virtualisation.podman.enable = true;/' \
|
||||
distro/etc_nixos/configuration.nix
|
||||
config_path="distro/etc_nixos/configuration.nix"
|
||||
extra_config_path="tools/github_workflows/config_for_publish_cachix.nix"
|
||||
./test/nixos/common/merge_nixos_config.sh ${config_path} ${extra_config_path} ${config_path}
|
||||
|
||||
- name: Build Asterinas NixOS patched packages and push to release cache
|
||||
run: |
|
||||
|
|
@ -35,6 +35,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
needs: [ push-cachix ]
|
||||
outputs:
|
||||
kernel_version: ${{ steps.tag.outputs.kernel_version }}
|
||||
tag: ${{ steps.tag.outputs.tag }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
|
@ -44,9 +45,18 @@ jobs:
|
|||
- name: Get Asterinas version
|
||||
id: tag
|
||||
run: |
|
||||
ASTER_VERSION=$(cat ./VERSION)
|
||||
echo "ASTER_VERSION=${ASTER_VERSION}"
|
||||
echo "tag=${ASTER_VERSION}" >> $GITHUB_OUTPUT
|
||||
kernel_version=$(cat ./VERSION)
|
||||
echo "kernel_version=${kernel_version}"
|
||||
echo "kernel_version=${kernel_version}" >> $GITHUB_OUTPUT
|
||||
tag="v${kernel_version}"
|
||||
echo "tag=$tag"
|
||||
echo "tag=$tag" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Add Git tag
|
||||
uses: pxpm/github-tag-action@1.0.1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ steps.tag.outputs.tag }}
|
||||
|
||||
- name: Create release
|
||||
env:
|
||||
|
|
@ -60,7 +70,7 @@ jobs:
|
|||
if gh release view "$tag" > /dev/null 2>&1; then
|
||||
echo "Release with tag $tag already exists. Skipping creation."
|
||||
else
|
||||
gh release create --draft "$tag" --title "$tag" --notes "$body"
|
||||
gh release create --draft "$tag" --title "$tag" --notes "$body" --verify-tag
|
||||
fi
|
||||
|
||||
build-iso:
|
||||
|
|
@ -83,9 +93,10 @@ jobs:
|
|||
- name: Build ISO
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
image: asterinas/asterinas:0.17.0-20260114
|
||||
options: --privileged -v /dev:/dev -v ${{ github.workspace }}:/root/asterinas
|
||||
run: |
|
||||
export ASTER_BUILD_TIMESTAMP=`date '+%a %b %e %H:%M:%S %Z %Y'`
|
||||
make iso RELEASE=1 AUTO_INSTALL=false ARCH=${{ matrix.arch }}
|
||||
iso_path=$(realpath ./target/nixos/iso_image/iso/*.iso)
|
||||
echo "iso_path=$iso_path"
|
||||
|
|
@ -96,11 +107,12 @@ jobs:
|
|||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
run: |
|
||||
kernel_version="${{ needs.create-github-release.outputs.kernel_version }}"
|
||||
tag="${{ needs.create-github-release.outputs.tag }}"
|
||||
echo "upload asterinas-nixos-$tag-${{ matrix.arch }}.iso"
|
||||
echo "upload asterinas-nixos-$kernel_version-${{ matrix.arch }}.iso"
|
||||
cd ${{ github.workspace }}
|
||||
mv ./asterinas-nixos.iso asterinas-nixos-$tag-${{ matrix.arch }}.iso
|
||||
gh release upload "$tag" "asterinas-nixos-$tag-${{ matrix.arch }}.iso"
|
||||
mv ./asterinas-nixos.iso asterinas-nixos-$kernel_version-${{ matrix.arch }}.iso
|
||||
gh release upload "$tag" "asterinas-nixos-$kernel_version-${{ matrix.arch }}.iso"
|
||||
|
||||
publish-github-release:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ jobs:
|
|||
publish_osdk_image:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: BRAINSia/free-disk-space@v2
|
||||
- uses: actions/checkout@v4
|
||||
- name: Prepare for Docker build and push
|
||||
id: prepare-for-docker-build-and-push
|
||||
|
|
@ -34,6 +35,7 @@ jobs:
|
|||
needs: publish_osdk_image
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: BRAINSia/free-disk-space@v2
|
||||
- uses: actions/checkout@v4
|
||||
- name: Prepare for Docker build and push
|
||||
id: prepare-for-docker-build-and-push
|
||||
|
|
@ -56,6 +58,7 @@ jobs:
|
|||
needs: publish_nix_image
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: BRAINSia/free-disk-space@v2
|
||||
- uses: actions/checkout@v4
|
||||
- name: Prepare for Docker build and push
|
||||
id: prepare-for-docker-build-and-push
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ jobs:
|
|||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
container: asterinas/asterinas:0.17.0-20251213
|
||||
container: asterinas/asterinas:0.17.0-20260114
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
container: asterinas/asterinas:0.17.0-20251213
|
||||
container: asterinas/asterinas:0.17.0-20260114
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ jobs:
|
|||
build_and_deploy:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
container: asterinas/asterinas:0.17.0-20251213
|
||||
container: asterinas/asterinas:0.17.0-20260114
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ jobs:
|
|||
push-pkgs:
|
||||
runs-on: ubuntu-4-cores-150GB-ssd
|
||||
container:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
image: asterinas/asterinas:0.17.0-20260114
|
||||
options: -v /dev:/dev --privileged
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
|
|
@ -25,11 +25,9 @@ jobs:
|
|||
|
||||
- name: Modify configuration.nix to include xfce and podman
|
||||
run: |
|
||||
sed -i \
|
||||
-e 's/^[[:space:]]*# services\.xserver\.enable = true;/ services.xserver.enable = true;/' \
|
||||
-e 's/^[[:space:]]*# services\.xserver\.desktopManager\.xfce\.enable = true;/ services.xserver.desktopManager.xfce.enable = true;/' \
|
||||
-e 's/^[[:space:]]*# virtualisation\.podman\.enable = true;/ virtualisation.podman.enable = true;/' \
|
||||
distro/etc_nixos/configuration.nix
|
||||
config_path="distro/etc_nixos/configuration.nix"
|
||||
extra_config_path="tools/github_workflows/config_for_publish_cachix.nix"
|
||||
./test/nixos/common/merge_nixos_config.sh ${config_path} ${extra_config_path} ${config_path}
|
||||
|
||||
- name: Build Asterinas NixOS patched packages (dry run)
|
||||
if: github.event_name == 'pull_request'
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
# This workflow pushes a new Git tag to the main branch when the version bumps.
|
||||
|
||||
name: Push release tag
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- VERSION
|
||||
|
||||
jobs:
|
||||
tag_main_branch:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add Git tag
|
||||
uses: pxpm/github-tag-action@1.0.1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: v0.17.0
|
||||
|
|
@ -23,7 +23,7 @@ jobs:
|
|||
run: |
|
||||
docker run \
|
||||
--privileged --network=host --device=/dev/kvm \
|
||||
-v ./:/root/asterinas asterinas/asterinas:0.17.0-20251213 \
|
||||
-v ./:/root/asterinas asterinas/asterinas:0.17.0-20260114 \
|
||||
make run_kernel AUTO_TEST=vsock ENABLE_KVM=0 SCHEME=microvm RELEASE_MODE=1 &
|
||||
- name: Run Vsock Client on Host
|
||||
id: host_vsock_client
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@ jobs:
|
|||
iso-test:
|
||||
runs-on: ubuntu-4-cores-150GB-ssd
|
||||
container:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
image: asterinas/asterinas:0.17.0-20260114
|
||||
options: -v /dev:/dev --privileged
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build Asterinas NixOS ISO installer image
|
||||
run: |
|
||||
make iso NIXOS_TEST_COMMAND='hello-asterinas'
|
||||
make iso NIXOS_TEST_SUITE=hello
|
||||
- name: Run ISO image and install Asterinas NixOS
|
||||
run: |
|
||||
make run_iso || true
|
||||
|
|
@ -34,6 +34,4 @@ jobs:
|
|||
echo "Test ISO succeeds!"
|
||||
- name : Run Asterinas NixOS
|
||||
run: |
|
||||
make run_nixos || true
|
||||
tail --lines 10 qemu.log | grep -q "^Hello Asterinas!" || (echo "Test NixOS failed" && exit 1)
|
||||
echo "Test NixOS succeeds!"
|
||||
make run_nixos NIXOS_TEST_SUITE=hello
|
||||
|
|
@ -11,7 +11,7 @@ jobs:
|
|||
basic-test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
image: asterinas/asterinas:0.17.0-20260114
|
||||
options: --device=/dev/kvm --privileged
|
||||
strategy:
|
||||
matrix:
|
||||
|
|
|
|||
|
|
@ -26,54 +26,23 @@ jobs:
|
|||
full-nixos-test:
|
||||
runs-on: ubuntu-4-cores-150GB-ssd
|
||||
container:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
image: asterinas/asterinas:0.17.0-20260114
|
||||
options: -v /dev:/dev --privileged
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Modify configuration.nix to include test-asterinas
|
||||
run: |
|
||||
sed -i 's/environment.systemPackages = with pkgs; \[ hello-asterinas \];/environment.systemPackages = with pkgs; \[ test-asterinas \];/' \
|
||||
distro/etc_nixos/configuration.nix
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test:
|
||||
- name: nix
|
||||
disk_size: 6144
|
||||
- name: podman
|
||||
disk_size: 8192
|
||||
|
||||
- name: Test nix commands
|
||||
run: |
|
||||
make nixos NIXOS_DISK_SIZE_IN_MB=6144 NIXOS_TEST_COMMAND='test-nix-commands'
|
||||
make run_nixos || true
|
||||
|
||||
- name: Check results
|
||||
run: |
|
||||
tail --lines 50 qemu.log | awk '
|
||||
BEGIN { hello_count=0 } {
|
||||
if ($0 ~ /^Hello, world!/) hello_count++
|
||||
}
|
||||
END {
|
||||
if (hello_count == 4) exit 0
|
||||
else exit 1
|
||||
}' || (echo "Test nix commands failed" && exit 1)
|
||||
echo "Test nix commands succeeds!"
|
||||
|
||||
podman-test:
|
||||
runs-on: ubuntu-4-cores-150GB-ssd
|
||||
container:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
options: -v /dev:/dev --privileged
|
||||
name: Test ${{ matrix.test.name }}
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Modify configuration.nix to include test-asterinas and podman
|
||||
- name: Run the ${{ matrix.test.name }} test on AsterNixOS
|
||||
run: |
|
||||
sed -i \
|
||||
-e 's/environment.systemPackages = with pkgs; \[ hello-asterinas \];/environment.systemPackages = with pkgs; \[ test-asterinas \];/' \
|
||||
-e 's/^[[:space:]]*# virtualisation\.podman\.enable = true;/ virtualisation.podman.enable = true;/' \
|
||||
distro/etc_nixos/configuration.nix
|
||||
|
||||
- name: Run podman commands
|
||||
run: |
|
||||
make nixos NIXOS_DISK_SIZE_IN_MB=8192 NIXOS_TEST_COMMAND='test-podman'
|
||||
make run_nixos || true
|
||||
|
||||
- name: Check results
|
||||
run: |
|
||||
tail --lines 50 qemu.log | grep -q "^Test podman succeeds" || (echo "Test podman failed" && exit 1)
|
||||
echo "Test podman succeeds!"
|
||||
make nixos NIXOS_TEST_SUITE=${{ matrix.test.name }} NIXOS_DISK_SIZE_IN_MB=${{ matrix.test.disk_size }}
|
||||
make run_nixos NIXOS_TEST_SUITE=${{ matrix.test.name }}
|
||||
|
|
@ -32,15 +32,12 @@ jobs:
|
|||
remove_haskell: true
|
||||
remove_tool_cache: true
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run a Hello World program on AsterNixOS
|
||||
- name: Run the hello test on AsterNixOS
|
||||
timeout-minutes: 30
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
image: asterinas/asterinas:0.17.0-20260114
|
||||
options: --privileged -v /dev:/dev -v ${{ github.workspace }}:/root/asterinas
|
||||
run: |
|
||||
make nixos NIXOS_DISK_SIZE_IN_MB=6144 NIXOS_TEST_COMMAND='hello-asterinas' || true
|
||||
make run_nixos || true
|
||||
- name: Check results
|
||||
run: |
|
||||
tail --lines 10 ${{ github.workspace }}/qemu.log | grep -q "^Hello Asterinas!" || (echo "Test NixOS failed" && exit 1)
|
||||
echo "Test NixOS succeeds!"
|
||||
make nixos NIXOS_TEST_SUITE=hello NIXOS_DISK_SIZE_IN_MB=6144
|
||||
make run_nixos NIXOS_TEST_SUITE=hello
|
||||
|
|
@ -11,13 +11,23 @@ jobs:
|
|||
basic-test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
image: asterinas/asterinas:0.17.0-20260114
|
||||
options: --device=/dev/kvm --privileged
|
||||
volumes:
|
||||
# Map the following directories on the host into the container so that
|
||||
# the container can remove them to save some precious disk space (~16GB),
|
||||
# which is quite limited on free-tier Github runners.
|
||||
- /usr/lib/google-cloud-sdk:/usr/lib/google-cloud-sdk
|
||||
- /usr/local/lib/android:/usr/local/lib/android
|
||||
- /usr/share/dotnet:/usr/share/dotnet
|
||||
strategy:
|
||||
matrix:
|
||||
id: ['lint', 'compile', 'usermode_test', 'ktest']
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Free disk space
|
||||
# Remove unused packages from the host to save disk space.
|
||||
run: rm -rf /usr/lib/google-cloud-sdk/* /usr/local/lib/android/* /usr/share/dotnet/*
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run basic tests
|
||||
uses: ./.github/actions/test
|
||||
|
|
@ -28,8 +38,15 @@ jobs:
|
|||
integration-test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
image: asterinas/asterinas:0.17.0-20260114
|
||||
options: --device=/dev/kvm --privileged
|
||||
volumes:
|
||||
# Map the following directories on the host into the container so that
|
||||
# the container can remove them to save some precious disk space (~16GB),
|
||||
# which is quite limited on free-tier Github runners.
|
||||
- /usr/lib/google-cloud-sdk:/usr/lib/google-cloud-sdk
|
||||
- /usr/local/lib/android:/usr/local/lib/android
|
||||
- /usr/share/dotnet:/usr/share/dotnet
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
|
|
@ -47,6 +64,9 @@ jobs:
|
|||
smp: 4
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Free disk space
|
||||
# Remove unused packages from the host to save disk space.
|
||||
run: rm -rf /usr/lib/google-cloud-sdk/* /usr/local/lib/android/* /usr/share/dotnet/*
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run integration tests ${{ (startsWith(matrix.test_id, 'syscall') && 'with LTP') || '' }}
|
||||
uses: ./.github/actions/test
|
||||
|
|
|
|||
|
|
@ -11,13 +11,23 @@ jobs:
|
|||
basic-test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
image: asterinas/asterinas:0.17.0-20260114
|
||||
options: --device=/dev/kvm --privileged
|
||||
volumes:
|
||||
# Map the following directories on the host into the container so that
|
||||
# the container can remove them to save some precious disk space (~16GB),
|
||||
# which is quite limited on free-tier Github runners.
|
||||
- /usr/lib/google-cloud-sdk:/usr/lib/google-cloud-sdk
|
||||
- /usr/local/lib/android:/usr/local/lib/android
|
||||
- /usr/share/dotnet:/usr/share/dotnet
|
||||
strategy:
|
||||
matrix:
|
||||
id: ['lint', 'compile', 'usermode_test', 'ktest']
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Free disk space
|
||||
# Remove unused packages from the host to save disk space.
|
||||
run: rm -rf /usr/lib/google-cloud-sdk/* /usr/local/lib/android/* /usr/share/dotnet/*
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run basic tests
|
||||
uses: ./.github/actions/test
|
||||
|
|
@ -28,8 +38,15 @@ jobs:
|
|||
integration-test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
image: asterinas/asterinas:0.17.0-20260114
|
||||
options: --device=/dev/kvm --privileged
|
||||
volumes:
|
||||
# Map the following directories on the host into the container so that
|
||||
# the container can remove them to save some precious disk space (~16GB),
|
||||
# which is quite limited on free-tier Github runners.
|
||||
- /usr/lib/google-cloud-sdk:/usr/lib/google-cloud-sdk
|
||||
- /usr/local/lib/android:/usr/local/lib/android
|
||||
- /usr/share/dotnet:/usr/share/dotnet
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
|
|
@ -78,6 +95,9 @@ jobs:
|
|||
smp: 4
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Free disk space
|
||||
# Remove unused packages from the host to save disk space.
|
||||
run: rm -rf /usr/lib/google-cloud-sdk/* /usr/local/lib/android/* /usr/share/dotnet/*
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run integration tests ${{ (startsWith(matrix.test_id, 'syscall') && 'with LTP') || '' }}
|
||||
uses: ./.github/actions/test
|
||||
|
|
@ -113,7 +133,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
image: ['asterinas/asterinas:0.17.0-20251213', 'asterinas/osdk:0.17.0-20251213']
|
||||
image: ['asterinas/asterinas:0.17.0-20260114', 'asterinas/osdk:0.17.0-20260114']
|
||||
fail-fast: false
|
||||
container:
|
||||
image: ${{ matrix.image }}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
integration-test:
|
||||
runs-on: self-hosted
|
||||
container:
|
||||
image: asterinas/asterinas:0.17.0-20251213
|
||||
image: asterinas/asterinas:0.17.0-20260114
|
||||
options: --device=/dev/kvm --privileged
|
||||
strategy:
|
||||
matrix:
|
||||
|
|
@ -58,7 +58,7 @@ jobs:
|
|||
runs-on: self-hosted
|
||||
strategy:
|
||||
matrix:
|
||||
image: ['asterinas/asterinas:0.17.0-20251213', 'asterinas/osdk:0.17.0-20251213']
|
||||
image: ['asterinas/asterinas:0.17.0-20260114', 'asterinas/osdk:0.17.0-20260114']
|
||||
fail-fast: false
|
||||
container:
|
||||
image: ${{ matrix.image }}
|
||||
|
|
|
|||
|
|
@ -6,19 +6,23 @@ on:
|
|||
paths:
|
||||
- tools/sctrace/**
|
||||
- book/src/kernel/linux-compatibility/syscall-flag-coverage/**
|
||||
- .github/workflows/validate_scmls.yml
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- tools/sctrace/**
|
||||
- book/src/kernel/linux-compatibility/syscall-flag-coverage/**
|
||||
- .github/workflows/validate_scmls.yml
|
||||
|
||||
jobs:
|
||||
validate_scmls:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
container: asterinas/asterinas:0.17.0-20251213
|
||||
container: asterinas/asterinas:0.17.0-20260114
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Validate SCML files with sctrace
|
||||
run: ./tools/sctrace.sh $ASTER_SCML -- echo "Asterinas"
|
||||
run: |
|
||||
export ASTER_SCML=$(find ./book/src/kernel/linux-compatibility/ -name "*.scml")
|
||||
./tools/sctrace.sh $ASTER_SCML -- echo "Asterinas"
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ target/
|
|||
|
||||
# qemu log file
|
||||
qemu.log
|
||||
qemu-serial.log
|
||||
|
||||
# packet dump file
|
||||
virtio-net.pcap
|
||||
|
|
@ -26,12 +27,15 @@ virtio-net.pcap
|
|||
/result_*.json
|
||||
|
||||
# profile results
|
||||
aster-nix-profile-*.json
|
||||
aster-nix-profile-*.folded
|
||||
aster-nix-profile-*.svg
|
||||
aster-kernel-profile-*.json
|
||||
aster-kernel-profile-*.folded
|
||||
aster-kernel-profile-*.svg
|
||||
|
||||
# distro results
|
||||
distro/result
|
||||
|
||||
# cachix package list
|
||||
cachix.list
|
||||
|
||||
# temporary configuration file for NixOS tests
|
||||
distro/etc_nixos/_config_for_test.nix
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ rto = "rto"
|
|||
typ = "typ"
|
||||
sigfault = "sigfault"
|
||||
sems = "sems"
|
||||
THRE = "THRE"
|
||||
|
||||
# Files with svg suffix are ignored to check.
|
||||
[type.svg]
|
||||
|
|
@ -35,8 +36,8 @@ check-file = false
|
|||
# Files listed below are ignored to check.
|
||||
[files]
|
||||
extend-exclude = [
|
||||
"test/src/syscall/gvisor/blocklists/pty_test",
|
||||
"test/build/initramfs/opt/gvisor/blocklists/pty_test",
|
||||
"test/src/syscall/gvisor/blocklists/sync_test",
|
||||
"test/build/initramfs/opt/gvisor/blocklists/sync_test",
|
||||
"test/initramfs/src/syscall/gvisor/blocklists/pty_test",
|
||||
"test/initramfs/build/initramfs/opt/gvisor/blocklists/pty_test",
|
||||
"test/initramfs/src/syscall/gvisor/blocklists/sync_test",
|
||||
"test/initramfs/build/initramfs/opt/gvisor/blocklists/sync_test",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#=============================================================================
|
||||
|
||||
/book/ @tatetian
|
||||
/book/src/kernel/linux-compatibility/syscall-flag-coverage/ @tatetian @taosue
|
||||
/book/src/kernel/linux-compatibility/syscall-flag-coverage/ @taosue @tatetian
|
||||
|
||||
#=============================================================================
|
||||
# The Asterinas kernel
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
/osdk/tools/docker/ @grief8
|
||||
/test/ @cqs21
|
||||
/tools/ @grief8
|
||||
/tools/sctrace/ @tatetian @taosue
|
||||
/tools/sctrace/ @taosue @tatetian
|
||||
/triagebot.toml @grief8
|
||||
|
||||
/Makefile @junyang-zh
|
||||
|
|
@ -93,5 +93,5 @@
|
|||
|
||||
# The following critical files are singled out
|
||||
/CODEOWNERS @tatetian
|
||||
/VERSION @tatetian
|
||||
/RELEASES @tatetian
|
||||
/VERSION @tatetian
|
||||
|
|
|
|||
|
|
@ -66,15 +66,6 @@ dependencies = [
|
|||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "1.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "align_ext"
|
||||
version = "0.1.0"
|
||||
|
|
@ -85,56 +76,6 @@ version = "0.2.21"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
||||
|
||||
[[package]]
|
||||
name = "anstream"
|
||||
version = "0.6.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"anstyle-parse",
|
||||
"anstyle-query",
|
||||
"anstyle-wincon",
|
||||
"colorchoice",
|
||||
"is_terminal_polyfill",
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle"
|
||||
version = "1.0.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-parse"
|
||||
version = "0.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
|
||||
dependencies = [
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-query"
|
||||
version = "1.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2"
|
||||
dependencies = [
|
||||
"windows-sys 0.60.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-wincon"
|
||||
version = "3.0.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"once_cell_polyfill",
|
||||
"windows-sys 0.60.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aster-bigtcp"
|
||||
version = "0.1.0"
|
||||
|
|
@ -162,7 +103,9 @@ dependencies = [
|
|||
"int-to-c-enum",
|
||||
"log",
|
||||
"ostd",
|
||||
"ostd-pod",
|
||||
"spin",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -220,55 +163,13 @@ dependencies = [
|
|||
"component",
|
||||
"log",
|
||||
"ostd",
|
||||
"spin",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aster-logger"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"aster-console",
|
||||
"component",
|
||||
"log",
|
||||
"ostd",
|
||||
"owo-colors 3.5.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aster-mlsdisk"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"aes-gcm",
|
||||
"aster-block",
|
||||
"bittle",
|
||||
"component",
|
||||
"ctr",
|
||||
"device-id",
|
||||
"hashbrown 0.14.5",
|
||||
"inherit-methods-macro",
|
||||
"lending-iterator",
|
||||
"log",
|
||||
"lru",
|
||||
"ostd",
|
||||
"ostd-pod",
|
||||
"postcard",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aster-network"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"aster-bigtcp",
|
||||
"aster-softirq",
|
||||
"bitvec",
|
||||
"component",
|
||||
"ostd",
|
||||
"spin",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aster-nix"
|
||||
name = "aster-kernel"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"align_ext",
|
||||
|
|
@ -287,6 +188,7 @@ dependencies = [
|
|||
"aster-softirq",
|
||||
"aster-systree",
|
||||
"aster-time",
|
||||
"aster-uart",
|
||||
"aster-util",
|
||||
"aster-virtio",
|
||||
"atomic-integer-wrapper",
|
||||
|
|
@ -294,6 +196,7 @@ dependencies = [
|
|||
"bitvec",
|
||||
"cfg-if",
|
||||
"component",
|
||||
"const_format",
|
||||
"controlled",
|
||||
"core2",
|
||||
"cpio-decoder",
|
||||
|
|
@ -315,6 +218,7 @@ dependencies = [
|
|||
"osdk-frame-allocator",
|
||||
"osdk-heap-allocator",
|
||||
"ostd",
|
||||
"ostd-pod",
|
||||
"paste",
|
||||
"rand",
|
||||
"riscv",
|
||||
|
|
@ -326,6 +230,54 @@ dependencies = [
|
|||
"typeflags-util",
|
||||
"xarray",
|
||||
"xmas-elf",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aster-logger"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"aster-console",
|
||||
"component",
|
||||
"log",
|
||||
"ostd",
|
||||
"owo-colors",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aster-mlsdisk"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"aes-gcm",
|
||||
"aster-block",
|
||||
"bittle",
|
||||
"component",
|
||||
"ctr",
|
||||
"device-id",
|
||||
"hashbrown 0.14.5",
|
||||
"inherit-methods-macro",
|
||||
"lending-iterator",
|
||||
"log",
|
||||
"lru",
|
||||
"ostd",
|
||||
"ostd-pod",
|
||||
"postcard",
|
||||
"serde",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aster-network"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"aster-bigtcp",
|
||||
"aster-softirq",
|
||||
"bitvec",
|
||||
"component",
|
||||
"ostd",
|
||||
"ostd-pod",
|
||||
"spin",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -358,7 +310,7 @@ version = "0.1.0"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
"syn 2.0.101",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -389,7 +341,7 @@ name = "aster-time"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"aster-util",
|
||||
"bitflags 2.9.1",
|
||||
"bitflags 1.3.2",
|
||||
"chrono",
|
||||
"component",
|
||||
"log",
|
||||
|
|
@ -397,6 +349,19 @@ dependencies = [
|
|||
"spin",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aster-uart"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"aster-console",
|
||||
"component",
|
||||
"fdt",
|
||||
"inherit-methods-macro",
|
||||
"log",
|
||||
"ostd",
|
||||
"spin",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aster-util"
|
||||
version = "0.1.0"
|
||||
|
|
@ -406,7 +371,9 @@ dependencies = [
|
|||
"inherit-methods-macro",
|
||||
"osdk-heap-allocator",
|
||||
"ostd",
|
||||
"ostd-pod",
|
||||
"typeflags-util",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -430,9 +397,11 @@ dependencies = [
|
|||
"int-to-c-enum",
|
||||
"log",
|
||||
"ostd",
|
||||
"ostd-pod",
|
||||
"spin",
|
||||
"tdx-guest",
|
||||
"typeflags-util",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -495,26 +464,6 @@ dependencies = [
|
|||
"wyz",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bytemuck"
|
||||
version = "1.23.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c"
|
||||
dependencies = [
|
||||
"bytemuck_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bytemuck_derive"
|
||||
version = "1.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.101",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.5.0"
|
||||
|
|
@ -554,58 +503,12 @@ dependencies = [
|
|||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.51"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
"clap_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.5.51"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
"clap_lex",
|
||||
"strsim 0.11.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_derive"
|
||||
version = "4.5.49"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.101",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_lex"
|
||||
version = "0.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
|
||||
|
||||
[[package]]
|
||||
name = "cobs"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15"
|
||||
|
||||
[[package]]
|
||||
name = "colorchoice"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
|
||||
|
||||
[[package]]
|
||||
name = "component"
|
||||
version = "0.1.0"
|
||||
|
|
@ -628,6 +531,26 @@ dependencies = [
|
|||
"toml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "const_format"
|
||||
version = "0.2.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7faa7469a93a566e9ccc1c73fe783b4a65c274c5ace346038dca9c39fe0030ad"
|
||||
dependencies = [
|
||||
"const_format_proc_macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "const_format_proc_macros"
|
||||
version = "0.2.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "controlled"
|
||||
version = "0.1.0"
|
||||
|
|
@ -717,7 +640,7 @@ dependencies = [
|
|||
"ident_case",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"strsim 0.10.0",
|
||||
"strsim",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
|
|
@ -781,9 +704,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "deranged"
|
||||
version = "0.4.0"
|
||||
version = "0.5.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e"
|
||||
checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587"
|
||||
dependencies = [
|
||||
"powerfmt",
|
||||
]
|
||||
|
|
@ -856,9 +779,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|||
|
||||
[[package]]
|
||||
name = "foldhash"
|
||||
version = "0.1.5"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
||||
checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
|
||||
|
||||
[[package]]
|
||||
name = "font8x8"
|
||||
|
|
@ -884,14 +807,14 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.3.3"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4"
|
||||
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"r-efi",
|
||||
"wasi",
|
||||
"wasip2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -973,6 +896,12 @@ name = "hashbrown"
|
|||
version = "0.15.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3"
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.16.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
|
||||
dependencies = [
|
||||
"allocator-api2",
|
||||
"equivalent",
|
||||
|
|
@ -1003,12 +932,6 @@ dependencies = [
|
|||
"stable_deref_trait",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
||||
|
||||
[[package]]
|
||||
name = "iced-x86"
|
||||
version = "1.21.0"
|
||||
|
|
@ -1086,12 +1009,6 @@ dependencies = [
|
|||
"ghost",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "is_terminal_polyfill"
|
||||
version = "1.70.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.10.5"
|
||||
|
|
@ -1189,10 +1106,11 @@ version = "0.17.0"
|
|||
dependencies = [
|
||||
"align_ext",
|
||||
"bitflags 1.3.2",
|
||||
"bytemuck",
|
||||
"libflate",
|
||||
"ostd-pod",
|
||||
"serde",
|
||||
"xmas-elf",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1231,7 +1149,7 @@ checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
|||
name = "logo-ascii-art"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"owo-colors 4.2.2",
|
||||
"owo-colors",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1246,11 +1164,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lru"
|
||||
version = "0.12.5"
|
||||
version = "0.16.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
|
||||
checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593"
|
||||
dependencies = [
|
||||
"hashbrown 0.15.3",
|
||||
"hashbrown 0.16.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1300,12 +1218,6 @@ dependencies = [
|
|||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "minimal-lexical"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
||||
|
||||
[[package]]
|
||||
name = "multiboot2"
|
||||
version = "0.24.0"
|
||||
|
|
@ -1336,27 +1248,6 @@ version = "6.6.666"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf5a574dadd7941adeaa71823ecba5e28331b8313fb2e1c6a5c7e5981ea53ad6"
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.27.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "7.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"minimal-lexical",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nougat"
|
||||
version = "0.2.4"
|
||||
|
|
@ -1399,12 +1290,6 @@ version = "1.21.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
||||
|
||||
[[package]]
|
||||
name = "once_cell_polyfill"
|
||||
version = "1.70.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
|
||||
|
||||
[[package]]
|
||||
name = "opaque-debug"
|
||||
version = "0.3.1"
|
||||
|
|
@ -1433,7 +1318,7 @@ name = "osdk-test-kernel"
|
|||
version = "0.17.0"
|
||||
dependencies = [
|
||||
"ostd",
|
||||
"owo-colors 4.2.2",
|
||||
"owo-colors",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1471,6 +1356,7 @@ dependencies = [
|
|||
"volatile 0.6.1",
|
||||
"x86",
|
||||
"x86_64",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1485,38 +1371,44 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ostd-pod"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/asterinas/ostd-pod?rev=c4644be#c4644be401cae1e046a810574078b64e35924f5f"
|
||||
version = "0.4.0"
|
||||
dependencies = [
|
||||
"ostd-pod-derive",
|
||||
"ostd-pod-macros",
|
||||
"padding-struct",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ostd-pod-derive"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/asterinas/ostd-pod?rev=c4644be#c4644be401cae1e046a810574078b64e35924f5f"
|
||||
name = "ostd-pod-macros"
|
||||
version = "0.4.0"
|
||||
dependencies = [
|
||||
"ostd-pod",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
"syn 2.0.101",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ostd-test"
|
||||
version = "0.17.0"
|
||||
|
||||
[[package]]
|
||||
name = "owo-colors"
|
||||
version = "3.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f"
|
||||
|
||||
[[package]]
|
||||
name = "owo-colors"
|
||||
version = "4.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "48dd4f4a2c8405440fd0462561f0e5806bd0f77e86f51c761481bdd4018b545e"
|
||||
|
||||
[[package]]
|
||||
name = "padding-struct"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.101",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "paste"
|
||||
version = "1.0.15"
|
||||
|
|
@ -1703,35 +1595,6 @@ dependencies = [
|
|||
"bitflags 1.3.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.12.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-automata",
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.4.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.8.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
|
||||
|
||||
[[package]]
|
||||
name = "riscv"
|
||||
version = "0.15.0"
|
||||
|
|
@ -1813,16 +1676,6 @@ version = "1.2.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
||||
|
||||
[[package]]
|
||||
name = "sctrace"
|
||||
version = "0.17.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"nix",
|
||||
"nom",
|
||||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "1.0.26"
|
||||
|
|
@ -1905,12 +1758,6 @@ version = "0.10.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
||||
|
||||
[[package]]
|
||||
name = "subtle"
|
||||
version = "2.4.1"
|
||||
|
|
@ -1953,12 +1800,13 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
|
|||
|
||||
[[package]]
|
||||
name = "tdx-guest"
|
||||
version = "0.2.2"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "15fda2de9c0a2fdcc22e802af4f7f1e8f609a206f34d30986e3cd974b04911f0"
|
||||
checksum = "be70e62fdd829b19d5e1e03969f125391347e4e33d1419addfe59a45b043005d"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"iced-x86",
|
||||
"log",
|
||||
"raw-cpuid",
|
||||
"x86_64",
|
||||
]
|
||||
|
|
@ -1985,9 +1833,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.3.41"
|
||||
version = "0.3.44"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40"
|
||||
checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d"
|
||||
dependencies = [
|
||||
"deranged",
|
||||
"num-conv",
|
||||
|
|
@ -1998,9 +1846,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "time-core"
|
||||
version = "0.1.4"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c"
|
||||
checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b"
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
|
|
@ -2043,7 +1891,7 @@ dependencies = [
|
|||
"itertools",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
"syn 2.0.101",
|
||||
"typeflags-util",
|
||||
]
|
||||
|
||||
|
|
@ -2128,6 +1976,12 @@ version = "1.0.18"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
|
||||
|
||||
[[package]]
|
||||
name = "universal-hash"
|
||||
version = "0.4.1"
|
||||
|
|
@ -2147,12 +2001,6 @@ dependencies = [
|
|||
"gimli 0.32.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "utf8parse"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.5"
|
||||
|
|
@ -2181,15 +2029,6 @@ dependencies = [
|
|||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.14.7+wasi-0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c"
|
||||
dependencies = [
|
||||
"wasip2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasip2"
|
||||
version = "1.0.1+wasi-0.2.4"
|
||||
|
|
@ -2205,31 +2044,16 @@ version = "0.1.9"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
||||
dependencies = [
|
||||
"windows-sys 0.59.0",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-link"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.59.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
||||
dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.60.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
|
||||
dependencies = [
|
||||
"windows-targets 0.53.5",
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2238,31 +2062,14 @@ version = "0.52.6"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm 0.52.6",
|
||||
"windows_aarch64_msvc 0.52.6",
|
||||
"windows_i686_gnu 0.52.6",
|
||||
"windows_i686_gnullvm 0.52.6",
|
||||
"windows_i686_msvc 0.52.6",
|
||||
"windows_x86_64_gnu 0.52.6",
|
||||
"windows_x86_64_gnullvm 0.52.6",
|
||||
"windows_x86_64_msvc 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.53.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
|
||||
dependencies = [
|
||||
"windows-link",
|
||||
"windows_aarch64_gnullvm 0.53.1",
|
||||
"windows_aarch64_msvc 0.53.1",
|
||||
"windows_i686_gnu 0.53.1",
|
||||
"windows_i686_gnullvm 0.53.1",
|
||||
"windows_i686_msvc 0.53.1",
|
||||
"windows_x86_64_gnu 0.53.1",
|
||||
"windows_x86_64_gnullvm 0.53.1",
|
||||
"windows_x86_64_msvc 0.53.1",
|
||||
"windows_aarch64_gnullvm",
|
||||
"windows_aarch64_msvc",
|
||||
"windows_i686_gnu",
|
||||
"windows_i686_gnullvm",
|
||||
"windows_i686_msvc",
|
||||
"windows_x86_64_gnu",
|
||||
"windows_x86_64_gnullvm",
|
||||
"windows_x86_64_msvc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2271,96 +2078,48 @@ version = "0.52.6"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnullvm"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.5.40"
|
||||
|
|
@ -2432,18 +2191,18 @@ checksum = "2fe21bcc34ca7fe6dd56cc2cb1261ea59d6b93620215aefb5ea6032265527784"
|
|||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
version = "0.8.25"
|
||||
version = "0.8.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb"
|
||||
checksum = "71ddd76bcebeed25db614f82bf31a9f4222d3fbba300e6fb6c00afa26cbd4d9d"
|
||||
dependencies = [
|
||||
"zerocopy-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy-derive"
|
||||
version = "0.8.25"
|
||||
version = "0.8.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef"
|
||||
checksum = "d8187381b52e32220d50b255276aa16a084ec0a9017a0ca2152a1f55c539758d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
|
|||
167
Cargo.toml
167
Cargo.toml
|
|
@ -1,3 +1,10 @@
|
|||
# The Cargo workspace configurations shared by all in-kernel crates.
|
||||
#
|
||||
# As a kernel project, most crates in Asterinas are written and built for the kernel space.
|
||||
# But there are also a few userspace crates
|
||||
# whose crate-level `Cargo.toml` files are not affected by this workspace-level `Cargo.toml`.
|
||||
# The complete list can be found in the `workspace.exclude` field.
|
||||
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
members = [
|
||||
|
|
@ -6,43 +13,46 @@ members = [
|
|||
"osdk/deps/test-kernel",
|
||||
"ostd",
|
||||
"ostd/libs/align_ext",
|
||||
"ostd/libs/ostd-macros",
|
||||
"ostd/libs/id-alloc",
|
||||
"ostd/libs/linux-bzimage/builder",
|
||||
"ostd/libs/int-to-c-enum",
|
||||
"ostd/libs/int-to-c-enum/derive",
|
||||
"ostd/libs/linux-bzimage/boot-params",
|
||||
"ostd/libs/linux-bzimage/builder",
|
||||
"ostd/libs/linux-bzimage/setup",
|
||||
"ostd/libs/ostd-pod",
|
||||
"ostd/libs/ostd-pod/macros",
|
||||
"ostd/libs/ostd-macros",
|
||||
"ostd/libs/ostd-test",
|
||||
"ostd/libs/padding-struct",
|
||||
"kernel",
|
||||
"kernel/comps/block",
|
||||
"kernel/comps/cmdline",
|
||||
"kernel/comps/console",
|
||||
"kernel/comps/framebuffer",
|
||||
"kernel/comps/input",
|
||||
"kernel/comps/i8042",
|
||||
"kernel/comps/network",
|
||||
"kernel/comps/softirq",
|
||||
"kernel/comps/systree",
|
||||
"kernel/comps/input",
|
||||
"kernel/comps/logger",
|
||||
"kernel/comps/mlsdisk",
|
||||
"kernel/comps/time",
|
||||
"kernel/comps/virtio",
|
||||
"kernel/comps/network",
|
||||
"kernel/comps/pci",
|
||||
"kernel/libs/cpio-decoder",
|
||||
"kernel/libs/int-to-c-enum",
|
||||
"kernel/libs/int-to-c-enum/derive",
|
||||
"kernel/comps/softirq",
|
||||
"kernel/comps/systree",
|
||||
"kernel/comps/time",
|
||||
"kernel/comps/uart",
|
||||
"kernel/comps/virtio",
|
||||
"kernel/libs/aster-bigtcp",
|
||||
"kernel/libs/aster-rights",
|
||||
"kernel/libs/aster-rights-proc",
|
||||
"kernel/libs/aster-util",
|
||||
"kernel/libs/aster-bigtcp",
|
||||
"kernel/libs/atomic-integer-wrapper",
|
||||
"kernel/libs/cpio-decoder",
|
||||
"kernel/libs/device-id",
|
||||
"kernel/libs/jhash",
|
||||
"kernel/libs/keyable-arc",
|
||||
"kernel/libs/logo-ascii-art",
|
||||
"kernel/libs/typeflags",
|
||||
"kernel/libs/typeflags-util",
|
||||
"kernel/libs/atomic-integer-wrapper",
|
||||
"kernel/libs/xarray",
|
||||
"tools/sctrace",
|
||||
]
|
||||
exclude = [
|
||||
"kernel/libs/comp-sys/cargo-component",
|
||||
|
|
@ -59,6 +69,135 @@ unexpected_cfgs = { level = "allow", check-cfg = ['cfg(ktest)'] }
|
|||
|
||||
[workspace.lints.clippy]
|
||||
allow_attributes = "warn"
|
||||
redundant_test_prefix = "warn"
|
||||
|
||||
# Keys under `workspace.package` and the `package` section of each crate
|
||||
# follow the ordering suggested at:
|
||||
# https://github.com/crate-ci/cargo-cargofmt/issues/29#issuecomment-3647516745
|
||||
#
|
||||
# FIXME: The current key order is not yet finalized.
|
||||
# Once `cargo-cargofmt` becomes stable, we will use it to enforce a consistent key order.
|
||||
[workspace.package]
|
||||
version = "0.17.0"
|
||||
repository = "https://github.com/asterinas/asterinas"
|
||||
license = "MPL-2.0"
|
||||
edition = "2024"
|
||||
|
||||
[workspace.dependencies]
|
||||
ostd = { version = "0.17.0", path = "ostd" }
|
||||
|
||||
# Crates under ostd/libs
|
||||
align_ext = { path = "ostd/libs/align_ext", version = "0.1.0" }
|
||||
id-alloc = { path = "ostd/libs/id-alloc", version = "0.1.0" }
|
||||
int-to-c-enum = { path = "ostd/libs/int-to-c-enum", version = "0.1.0" }
|
||||
linux-boot-params = { version = "0.17.0", path = "ostd/libs/linux-bzimage/boot-params" }
|
||||
ostd-macros = { version = "0.17.0", path = "ostd/libs/ostd-macros" }
|
||||
ostd-pod = { path = "ostd/libs/ostd-pod", version = "0.4.0" }
|
||||
ostd-test = { version = "0.17.0", path = "ostd/libs/ostd-test" }
|
||||
|
||||
# Crates under kernel/comps
|
||||
aster-block = { path = "kernel/comps/block" }
|
||||
aster-cmdline = { path = "kernel/comps/cmdline" }
|
||||
aster-console = { path = "kernel/comps/console" }
|
||||
aster-framebuffer = { path = "kernel/comps/framebuffer" }
|
||||
aster-i8042 = { path = "kernel/comps/i8042" }
|
||||
aster-input = { path = "kernel/comps/input" }
|
||||
aster-logger = { path = "kernel/comps/logger" }
|
||||
aster-mlsdisk = { path = "kernel/comps/mlsdisk" }
|
||||
aster-network = { path = "kernel/comps/network" }
|
||||
aster-pci = { path = "kernel/comps/pci" }
|
||||
aster-softirq = { path = "kernel/comps/softirq" }
|
||||
aster-systree = { path = "kernel/comps/systree" }
|
||||
aster-time = { path = "kernel/comps/time" }
|
||||
aster-uart = { path = "kernel/comps/uart" }
|
||||
aster-virtio = { path = "kernel/comps/virtio" }
|
||||
|
||||
# Crates under kernel/libs
|
||||
aster-bigtcp = { path = "kernel/libs/aster-bigtcp" }
|
||||
aster-rights = { path = "kernel/libs/aster-rights" }
|
||||
aster-rights-proc = { path = "kernel/libs/aster-rights-proc" }
|
||||
aster-util = { path = "kernel/libs/aster-util" }
|
||||
atomic-integer-wrapper = { path = "kernel/libs/atomic-integer-wrapper" }
|
||||
cpio-decoder = { path = "kernel/libs/cpio-decoder" }
|
||||
device-id = { path = "kernel/libs/device-id" }
|
||||
jhash = { path = "kernel/libs/jhash" }
|
||||
keyable-arc = { path = "kernel/libs/keyable-arc" }
|
||||
logo-ascii-art = { path = "kernel/libs/logo-ascii-art" }
|
||||
typeflags = { path = "kernel/libs/typeflags" }
|
||||
typeflags-util = { path = "kernel/libs/typeflags-util" }
|
||||
xarray = { path = "kernel/libs/xarray" }
|
||||
|
||||
# Crates under kernel/libs/comp-sys
|
||||
component = { path = "kernel/libs/comp-sys/component" }
|
||||
controlled = { path = "kernel/libs/comp-sys/controlled" }
|
||||
|
||||
# Crates under osdk/deps
|
||||
osdk-frame-allocator = { path = "osdk/deps/frame-allocator" }
|
||||
osdk-heap-allocator = { path = "osdk/deps/heap-allocator" }
|
||||
|
||||
# External dependencies only for unsafe crates (i.e., crates under ostd directory)
|
||||
bit_field = "0.10.1"
|
||||
gimli = { version = "0.28", default-features = false, features = ["read-core"] }
|
||||
minicov = "0.3"
|
||||
num-traits = { version = "0.2", default-features = false }
|
||||
serde = { version = "1.0.192", default-features = false, features = ["alloc", "derive"] }
|
||||
smallvec = "1.13.2"
|
||||
uart_16550 = "0.3.0"
|
||||
volatile = "0.6.1"
|
||||
|
||||
# External dependencies only for safe crates (i.e., crates under kernel or osdk/deps directories)
|
||||
#
|
||||
# Enable `force-soft` feature to disable `AES-NI` and `CLMUL` intrinsics, ensuring that the implementation
|
||||
# relies solely on software, and in the software implementation, unsafe code is rarely used.
|
||||
# FIXME: to utilize `AES-NI` and `CLMUL` intrinsics, some specific flags must be added to `RUSTFLAGS`,
|
||||
# i.e. `-Ctarget-cpu=sandybridge -Ctarget-feature=+aes,+sse2,+sse4.1,+ssse3`.
|
||||
# This suggests that `Asterinas` should support saving and restoring the `FPU` state within the kernel context,
|
||||
# a capability it currently lacks.
|
||||
aes-gcm = { version = "0.9.4", features = ["force-soft"] }
|
||||
bittle = "0.5.6"
|
||||
const_format = "0.2.35"
|
||||
ctr = "0.8.0"
|
||||
font8x8 = { version = "0.2.5", default-features = false, features = [ "unicode" ] }
|
||||
getset = "0.1.2"
|
||||
hashbrown = { version = "0.14.3", features = ["serde"] }
|
||||
itertools = "0.10.5"
|
||||
lending-iterator = "0.1.7"
|
||||
lru = "0.16.3"
|
||||
owo-colors = "4.2.2"
|
||||
paste = "1.0.15"
|
||||
postcard = "1.0.6"
|
||||
smoltcp = { git = "https://github.com/asterinas/smoltcp", tag = "r_2024-11-08_f07e5b5", default-features = false, features = [
|
||||
"alloc",
|
||||
"log",
|
||||
"medium-ethernet",
|
||||
"medium-ip",
|
||||
"proto-ipv4",
|
||||
"socket-udp",
|
||||
"socket-tcp",
|
||||
] }
|
||||
takeable = "0.2.2"
|
||||
time = { version = "0.3", default-features = false, features = ["alloc"] }
|
||||
|
||||
# External dependencies for both safe and unsafe crates
|
||||
bitflags = "1.3"
|
||||
bitvec = { version = "1.0.1", default-features = false, features = ["alloc"] }
|
||||
cfg-if = "1.0"
|
||||
core2 = { version = "0.4.0", default-features = false, features = ["alloc", "nightly"] }
|
||||
inherit-methods-macro = { git = "https://github.com/asterinas/inherit-methods-macro", rev = "98f7e3e", version = "0.1.0" }
|
||||
intrusive-collections = { version = "0.9.6", features = ["nightly"] }
|
||||
libflate = { version = "2.1.0", default-features = false }
|
||||
log = "0.4"
|
||||
rand = { version = "0.9.2", default-features = false }
|
||||
spin = "0.9.4"
|
||||
xmas-elf = "0.10.0"
|
||||
# Note: when updating the zerocopy version,
|
||||
# also update it in `ostd/libs/ostd-pod/README.md`.
|
||||
zerocopy = { version = "0.8.34", features = [ "derive" ] }
|
||||
|
||||
# Proc-macro dependencies
|
||||
proc-macro2 = { version = "1.0.95", features = ["span-locations"] }
|
||||
quote = "1.0.35"
|
||||
syn = { version = "2.0.77", features = ["full", "parsing", "fold"] }
|
||||
|
||||
# Cargo only looks at the profile settings
|
||||
# in the Cargo.toml manifest at the root of the workspace
|
||||
|
|
|
|||
|
|
@ -1,20 +1,21 @@
|
|||
# template
|
||||
[components]
|
||||
nix = { name = "aster-nix" }
|
||||
virtio = { name = "aster-virtio" }
|
||||
input = { name = "aster-input" }
|
||||
block = { name = "aster-block" }
|
||||
console = { name = "aster-console" }
|
||||
softirq = { name = "aster-softirq" }
|
||||
logger = { name = "aster-logger" }
|
||||
time = { name = "aster-time" }
|
||||
framebuffer = { name = "aster-framebuffer" }
|
||||
network = { name = "aster-network" }
|
||||
mlsdisk = { name = "aster-mlsdisk" }
|
||||
systree = { name = "aster-systree" }
|
||||
i8042 = { name = "aster-i8042" }
|
||||
pci = { name = "aster-pci" }
|
||||
cmdline = { name = "aster-cmdline" }
|
||||
console = { name = "aster-console" }
|
||||
framebuffer = { name = "aster-framebuffer" }
|
||||
i8042 = { name = "aster-i8042" }
|
||||
input = { name = "aster-input" }
|
||||
kernel = { name = "aster-kernel" }
|
||||
logger = { name = "aster-logger" }
|
||||
mlsdisk = { name = "aster-mlsdisk" }
|
||||
network = { name = "aster-network" }
|
||||
pci = { name = "aster-pci" }
|
||||
softirq = { name = "aster-softirq" }
|
||||
systree = { name = "aster-systree" }
|
||||
time = { name = "aster-time" }
|
||||
uart = { name = "aster-uart" }
|
||||
virtio = { name = "aster-virtio" }
|
||||
|
||||
[whitelist]
|
||||
[whitelist.nix.main]
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
0.17.0-20251213
|
||||
0.17.0-20260114
|
||||
94
Makefile
94
Makefile
|
|
@ -21,10 +21,12 @@ OSTD_TASK_STACK_SIZE_IN_PAGES ?= 64
|
|||
FEATURES ?=
|
||||
NO_DEFAULT_FEATURES ?= 0
|
||||
COVERAGE ?= 0
|
||||
# Specify whether to build regression tests under `test/initramfs/src/apps`.
|
||||
ENABLE_BASIC_TEST ?= false
|
||||
# Specify the primary system console (supported: hvc0, tty0).
|
||||
# - hvc0: The virtio-console terminal.
|
||||
# Specify the primary system console (supported: tty0, ttyS0, hvc0).
|
||||
# - tty0: The active virtual terminal (VT).
|
||||
# - ttyS0: The serial (UART) terminal.
|
||||
# - hvc0: The virtio-console terminal.
|
||||
# Asterinas will automatically fall back to tty0 if hvc0 is not available.
|
||||
# Note that currently the virtual terminal (tty0) can only work with
|
||||
# linux-efi-handover64 and linux-efi-pe64 boot protocol.
|
||||
|
|
@ -57,7 +59,6 @@ DNS_SERVER ?= none
|
|||
# NixOS settings
|
||||
NIXOS_DISK_SIZE_IN_MB ?= 8192
|
||||
NIXOS_DISABLE_SYSTEMD ?= false
|
||||
NIXOS_TEST_COMMAND ?=
|
||||
# The following option is only effective when NIXOS_DISABLE_SYSTEMD is set to 'true'.
|
||||
# Use a login shell to ensure that environment variables are initialized correctly.
|
||||
NIXOS_STAGE_2_INIT ?= /bin/sh -l
|
||||
|
|
@ -191,7 +192,7 @@ endif
|
|||
|
||||
# Skip GZIP to make encoding and decoding of initramfs faster
|
||||
ifeq ($(INITRAMFS_SKIP_GZIP),1)
|
||||
CARGO_OSDK_INITRAMFS_OPTION := --initramfs=$(abspath test/build/initramfs.cpio)
|
||||
CARGO_OSDK_INITRAMFS_OPTION := --initramfs=$(abspath test/initramfs/build/initramfs.cpio)
|
||||
CARGO_OSDK_COMMON_ARGS += $(CARGO_OSDK_INITRAMFS_OPTION)
|
||||
endif
|
||||
|
||||
|
|
@ -206,22 +207,24 @@ export
|
|||
NON_OSDK_CRATES := \
|
||||
ostd/libs/align_ext \
|
||||
ostd/libs/id-alloc \
|
||||
ostd/libs/linux-bzimage/builder \
|
||||
ostd/libs/int-to-c-enum \
|
||||
ostd/libs/int-to-c-enum/derive \
|
||||
ostd/libs/linux-bzimage/boot-params \
|
||||
ostd/libs/linux-bzimage/builder \
|
||||
ostd/libs/ostd-macros \
|
||||
ostd/libs/ostd-pod \
|
||||
ostd/libs/ostd-pod/macros \
|
||||
ostd/libs/ostd-test \
|
||||
ostd/libs/padding-struct \
|
||||
kernel/libs/aster-rights \
|
||||
kernel/libs/aster-rights-proc \
|
||||
kernel/libs/atomic-integer-wrapper \
|
||||
kernel/libs/cpio-decoder \
|
||||
kernel/libs/int-to-c-enum \
|
||||
kernel/libs/int-to-c-enum/derive \
|
||||
kernel/libs/jhash \
|
||||
kernel/libs/keyable-arc \
|
||||
kernel/libs/logo-ascii-art \
|
||||
kernel/libs/typeflags \
|
||||
kernel/libs/typeflags-util \
|
||||
tools/sctrace
|
||||
kernel/libs/typeflags-util
|
||||
|
||||
# In contrast, OSDK crates depend on OSTD (or being `ostd` itself)
|
||||
# and need to be built or tested with OSDK.
|
||||
|
|
@ -236,18 +239,19 @@ OSDK_CRATES := \
|
|||
kernel/comps/cmdline \
|
||||
kernel/comps/console \
|
||||
kernel/comps/framebuffer \
|
||||
kernel/comps/input \
|
||||
kernel/comps/i8042 \
|
||||
kernel/comps/network \
|
||||
kernel/comps/softirq \
|
||||
kernel/comps/systree \
|
||||
kernel/comps/input \
|
||||
kernel/comps/logger \
|
||||
kernel/comps/mlsdisk \
|
||||
kernel/comps/time \
|
||||
kernel/comps/virtio \
|
||||
kernel/comps/network \
|
||||
kernel/comps/pci \
|
||||
kernel/libs/aster-util \
|
||||
kernel/comps/softirq \
|
||||
kernel/comps/systree \
|
||||
kernel/comps/time \
|
||||
kernel/comps/uart \
|
||||
kernel/comps/virtio \
|
||||
kernel/libs/aster-bigtcp \
|
||||
kernel/libs/aster-util \
|
||||
kernel/libs/device-id \
|
||||
kernel/libs/xarray
|
||||
|
||||
|
|
@ -273,7 +277,9 @@ $(CARGO_OSDK): $(OSDK_SRC_FILES)
|
|||
|
||||
.PHONY: check_osdk
|
||||
check_osdk:
|
||||
@cd osdk && cargo clippy -- -D warnings
|
||||
@# Run clippy on OSDK with and without the test configuration.
|
||||
@cd osdk && RUSTFLAGS="-Dwarnings" cargo clippy --no-deps
|
||||
@cd osdk && RUSTFLAGS="-Dwarnings" cargo clippy --tests --no-deps
|
||||
|
||||
.PHONY: test_osdk
|
||||
test_osdk:
|
||||
|
|
@ -285,7 +291,7 @@ test_osdk:
|
|||
check_vdso:
|
||||
@# Checking `VDSO_LIBRARY_DIR` environment variable
|
||||
@if [ -z "$(VDSO_LIBRARY_DIR)" ]; then \
|
||||
echo "Error: the \$(VDSO_LIBRARY_DIR) environment variable must be given."; \
|
||||
echo "Error: the VDSO_LIBRARY_DIR environment variable must be given."; \
|
||||
echo " This variable points to a directory that provides Linux's vDSO files,"; \
|
||||
echo " which is required to build Asterinas. Search for VDSO_LIBRARY_DIR"; \
|
||||
echo " in Asterinas's Dockerfile for more information."; \
|
||||
|
|
@ -294,7 +300,7 @@ check_vdso:
|
|||
|
||||
.PHONY: initramfs
|
||||
initramfs: check_vdso
|
||||
@$(MAKE) --no-print-directory -C test
|
||||
@$(MAKE) --no-print-directory -C test/initramfs
|
||||
|
||||
# Build the kernel with an initramfs
|
||||
.PHONY: kernel
|
||||
|
|
@ -324,29 +330,40 @@ endif
|
|||
iso: BOOT_PROTOCOL = linux-efi-handover64
|
||||
iso:
|
||||
@make kernel
|
||||
@./tools/nixos/build_iso.sh
|
||||
@if [ -n "$(NIXOS_TEST_SUITE)" ]; then \
|
||||
$(MAKE) --no-print-directory -C test/nixos iso; \
|
||||
else \
|
||||
./tools/nixos/build_iso.sh; \
|
||||
fi
|
||||
|
||||
# Build the Asterinas NixOS ISO installer image and then do installation
|
||||
run_iso: OVMF = off
|
||||
run_iso:
|
||||
@./tools/nixos/run_iso.sh
|
||||
@./tools/nixos/run.sh iso
|
||||
|
||||
# Create an Asterinas NixOS installation on host
|
||||
nixos: BOOT_PROTOCOL = linux-efi-handover64
|
||||
nixos:
|
||||
@make kernel
|
||||
@./tools/nixos/build_nixos.sh
|
||||
@if [ -n "$(NIXOS_TEST_SUITE)" ]; then \
|
||||
$(MAKE) --no-print-directory -C test/nixos nixos; \
|
||||
else \
|
||||
./tools/nixos/build_nixos.sh; \
|
||||
fi
|
||||
|
||||
# After creating a Asterinas NixOS installation (via either the `run_iso` or `nixos` target),
|
||||
# run the NixOS
|
||||
run_nixos: OVMF = off
|
||||
run_nixos:
|
||||
@./tools/nixos/run_nixos.sh target/nixos
|
||||
@if [ -n "$(NIXOS_TEST_SUITE)" ]; then \
|
||||
$(MAKE) --no-print-directory -C test/nixos run_nixos; \
|
||||
else \
|
||||
./tools/nixos/run.sh nixos; \
|
||||
fi
|
||||
|
||||
# Build the Asterinas NixOS patched packages
|
||||
cachix:
|
||||
@nix-build distro/cachix \
|
||||
--argstr test-command "${NIXOS_TEST_COMMAND}" \
|
||||
--option extra-substituters "${RELEASE_SUBSTITUTER} ${DEV_SUBSTITUTER}" \
|
||||
--option extra-trusted-public-keys "${RELEASE_TRUSTED_PUBLIC_KEY} ${DEV_TRUSTED_PUBLIC_KEY}" \
|
||||
--out-link cachix.list
|
||||
|
|
@ -402,10 +419,17 @@ ktest: initramfs $(CARGO_OSDK)
|
|||
.PHONY: docs
|
||||
docs: $(CARGO_OSDK)
|
||||
@for dir in $(NON_OSDK_CRATES); do \
|
||||
(cd $$dir && cargo doc --no-deps) || exit 1; \
|
||||
(cd $$dir && RUSTDOCFLAGS="-Dwarnings" cargo doc --no-deps) || exit 1; \
|
||||
done
|
||||
@for dir in $(OSDK_CRATES); do \
|
||||
(cd $$dir && cargo osdk doc --no-deps) || exit 1; \
|
||||
EXTRA_DOC_FLAGS=""; \
|
||||
# The kernel crate is primarily composed of private items. \
|
||||
# We include the --document-private-items flag \
|
||||
# to ensure documentation of the internal items is fully checked. \
|
||||
if [ "$$dir" = "kernel" ]; then \
|
||||
EXTRA_DOC_FLAGS="--document-private-items -Arustdoc::private_intra_doc_links"; \
|
||||
fi; \
|
||||
(cd $$dir && RUSTDOCFLAGS="-Dwarnings $$EXTRA_DOC_FLAGS" cargo osdk doc --no-deps) || exit 1; \
|
||||
done
|
||||
|
||||
.PHONY: book
|
||||
|
|
@ -416,7 +440,8 @@ book:
|
|||
format:
|
||||
@./tools/format_all.sh
|
||||
@nixfmt ./distro
|
||||
@$(MAKE) --no-print-directory -C test format
|
||||
@$(MAKE) --no-print-directory -C test/initramfs format
|
||||
@$(MAKE) --no-print-directory -C test/nixos format
|
||||
|
||||
.PHONY: check
|
||||
check: initramfs $(CARGO_OSDK)
|
||||
|
|
@ -445,18 +470,25 @@ check: initramfs $(CARGO_OSDK)
|
|||
@# Check compilation of the Rust code
|
||||
@for dir in $(NON_OSDK_CRATES); do \
|
||||
echo "Checking $$dir"; \
|
||||
(cd $$dir && cargo clippy -- -D warnings) || exit 1; \
|
||||
# Run clippy on each crate with and without the test configuration. \
|
||||
(cd $$dir && RUSTFLAGS="-Dwarnings" cargo clippy --no-deps) || exit 1; \
|
||||
(cd $$dir && RUSTFLAGS="-Dwarnings" cargo clippy --tests --no-deps) || exit 1; \
|
||||
done
|
||||
@for dir in $(OSDK_CRATES); do \
|
||||
echo "Checking $$dir"; \
|
||||
# Exclude linux-bzimage-setup since it only supports x86-64 currently and will panic \
|
||||
# in other architectures. \
|
||||
[ "$$dir" = "ostd/libs/linux-bzimage/setup" ] && [ "$(OSDK_TARGET_ARCH)" != "x86_64" ] && continue; \
|
||||
(cd $$dir && cargo osdk clippy -- -- -D warnings) || exit 1; \
|
||||
# Run clippy on each crate with and without the ktest configuration. \
|
||||
(cd $$dir && RUSTFLAGS="-Dwarnings" cargo osdk clippy -- --no-deps) || exit 1; \
|
||||
(cd $$dir && RUSTFLAGS="-Dwarnings" cargo osdk clippy --ktests -- --no-deps) || exit 1; \
|
||||
done
|
||||
@
|
||||
@# Check formatting issues of the C code and Nix files (regression tests)
|
||||
@$(MAKE) --no-print-directory -C test check
|
||||
@$(MAKE) --no-print-directory -C test/initramfs check
|
||||
@
|
||||
@# Check formatting issues of the Rust code in NixOS tests
|
||||
@$(MAKE) --no-print-directory -C test/nixos check
|
||||
@
|
||||
@# Check typos
|
||||
@typos
|
||||
|
|
@ -472,6 +504,6 @@ clean:
|
|||
@echo "Cleaning up mdBook output files"
|
||||
@cd book && mdbook clean
|
||||
@echo "Cleaning up test target files"
|
||||
@$(MAKE) --no-print-directory -C test clean
|
||||
@$(MAKE) --no-print-directory -C test/initramfs clean
|
||||
@echo "Uninstalling OSDK"
|
||||
@rm -f $(CARGO_OSDK)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
method = "grub-rescue-iso"
|
||||
|
||||
[grub]
|
||||
protocol = "multiboot2"
|
||||
boot_protocol = "multiboot2"
|
||||
|
||||
[qemu]
|
||||
args = "$(./tools/qemu_args.sh normal)"
|
||||
|
|
@ -22,7 +22,7 @@ kcmd_args = [
|
|||
"init=/usr/bin/busybox",
|
||||
]
|
||||
init_args = ["sh", "-l"]
|
||||
initramfs = "test/build/initramfs.cpio.gz"
|
||||
initramfs = "test/initramfs/build/initramfs.cpio.gz"
|
||||
|
||||
# Special options for testing
|
||||
[test.qemu]
|
||||
|
|
@ -62,8 +62,8 @@ qemu.args = """\
|
|||
-serial chardev:mux \
|
||||
-monitor chardev:mux \
|
||||
-chardev stdio,id=mux,mux=on,signal=off,logfile=qemu.log \
|
||||
-drive if=none,format=raw,id=x0,file=./test/build/ext2.img \
|
||||
-drive if=none,format=raw,id=x1,file=./test/build/exfat.img \
|
||||
-drive if=none,format=raw,id=x0,file=./test/initramfs/build/ext2.img \
|
||||
-drive if=none,format=raw,id=x1,file=./test/initramfs/build/exfat.img \
|
||||
# NOTE: The `/etc/profile.d/init.sh` assumes that `ext2.img` appears as the first block device (`/dev/vda`).
|
||||
# The ordering below ensures `x1` (ext2.img) is discovered before `x0`, maintaining this assumption.
|
||||
# TODO: Once UUID-based mounting is implemented, this strict ordering will no longer be required.
|
||||
|
|
|
|||
89
README.md
89
README.md
|
|
@ -1,6 +1,6 @@
|
|||
<p align="center">
|
||||
<img src="book/src/images/logo_en.svg" alt="asterinas-logo" width="620"><br>
|
||||
A secure, fast, and general-purpose OS kernel written in Rust and compatible with Linux<br/>
|
||||
Toward a production-grade Linux alternative—memory safe, high-performance, and more<br/>
|
||||
</p>
|
||||
|
||||
<!-- Asterinas NixOS 0.17.0 demo. It is uploaded as a Github attachment
|
||||
|
|
@ -34,37 +34,63 @@ Congratulations to the Asterinas community🎉🎉🎉
|
|||
|
||||
## Introducing Asterinas
|
||||
|
||||
Asterinas is a _secure_, _fast_, and _general-purpose_ OS kernel
|
||||
that provides _Linux-compatible_ ABI.
|
||||
It can serve as a seamless replacement for Linux
|
||||
while enhancing _memory safety_ and _developer friendliness_.
|
||||
The future of operating systems (OSes) belongs to Rust—a modern systems programming language (PL)
|
||||
that delivers safety, efficiency, and productivity at once.
|
||||
The open question is not _whether_ OS kernels should transition from C to Rust,
|
||||
but _how_ we get there.
|
||||
|
||||
* Asterinas prioritizes memory safety
|
||||
by employing Rust as its sole programming language
|
||||
and limiting the use of _unsafe Rust_
|
||||
to a clearly defined and minimal Trusted Computing Base (TCB).
|
||||
This innovative approach,
|
||||
known as [the framekernel architecture](https://asterinas.github.io/book/kernel/the-framekernel-architecture.html),
|
||||
establishes Asterinas as a more secure and dependable kernel option.
|
||||
Linux follows an _incremental_ path.
|
||||
While the Rust for Linux project has successfully integrated Rust as an official second PL,
|
||||
this approach faces _inherent friction_.
|
||||
As a newcomer within a massive C codebase,
|
||||
Rust must often compromise on safety, efficiency, clarity, and ergonomics
|
||||
to maintain compatibility with legacy structures.
|
||||
And while new Rust code can improve what it touches,
|
||||
it cannot retroactively eliminate _vulnerabilities_ in decades of existing C code.
|
||||
|
||||
* Asterinas surpasses Linux in terms of developer friendliness.
|
||||
It empowers kernel developers to
|
||||
(1) utilize the more productive Rust programming language,
|
||||
(2) leverage a purpose-built toolkit called [OSDK](https://asterinas.github.io/book/osdk/guide/index.html) to streamline their workflows,
|
||||
and (3) choose between releasing their kernel modules as open source
|
||||
or keeping them proprietary,
|
||||
thanks to the flexibility offered by [MPL](#License).
|
||||
Asterinas takes a _clean-slate_ approach.
|
||||
By building a Linux-compatible, general-purpose OS kernel from the ground up in Rust,
|
||||
we are liberated from the constraints of a legacy C codebase—its interfaces, designs, and assumptions—and from the need to preserve historical compatibility for outdated platforms.
|
||||
**Languages—including PLs—shape our way of thinking**.
|
||||
Through the lens of a modern PL, Asterinas rethinks and modernizes the construction of OS kernels:
|
||||
|
||||
While the journey towards a production-grade OS kernel is challenging,
|
||||
we are steadfastly progressing towards this goal.
|
||||
Over the course of 2024,
|
||||
we significantly enhanced Asterinas's maturity,
|
||||
as detailed in [our end-year report](https://asterinas.github.io/2025/01/20/asterinas-in-2024.html).
|
||||
In December 2025,
|
||||
we launched [Asterinas NixOS](https://asterinas.github.io/book/distro/index.html),
|
||||
an Asterinas distribution based on [NixOS](https://nixos.org/).
|
||||
This release marks Asterinas reaching the Minimum Viable Product (MVP) milestone.
|
||||
In 2026, we aim to make Asterinas production-ready on x86-64 virtual machines and attract real users.
|
||||
* **Modern architecture.**
|
||||
Asterinas pioneers the [_framekernel_](https://asterinas.github.io/book/kernel/the-framekernel-architecture.html) architecture,
|
||||
combining monolithic-kernel performance with microkernel-inspired separation.
|
||||
Unsafe Rust is confined to a small, auditable framework called [OSTD](https://asterinas.github.io/api-docs-nightly/ostd/),
|
||||
while the rest of the kernel is written in safe Rust,
|
||||
keeping the memory-safety TCB intentionally minimal.
|
||||
|
||||
* **Modern design.**
|
||||
Asterinas learns from Linux's hard-won engineering lessons,
|
||||
but it is not afraid to deviate when the design warrants it.
|
||||
For example, Asterinas improves the CPU scalability of its memory management subsystem
|
||||
with a novel scheme called [CortenMM](https://dl.acm.org/doi/10.1145/3731569.3764836).
|
||||
|
||||
* **Modern code.**
|
||||
Asterinas's codebase prioritizes safety, clarity, and maintainability.
|
||||
Performance is pursued aggressively, but never by compromising safety guarantees.
|
||||
Readability is treated as a feature, not a luxury,
|
||||
and the codebase is structured to avoid hidden, cross-module coupling.
|
||||
|
||||
* **Modern tooling.**
|
||||
Asterinas ships a purpose-built toolkit, [OSDK](https://asterinas.github.io/book/osdk/guide/index.html),
|
||||
to facilitate building, running, and testing Rust kernels or kernel components.
|
||||
Powered by OSTD,
|
||||
OSDK makes kernel development as easy and fluid as writing a standard Rust application, eliminating the traditional friction of OS engineering.
|
||||
|
||||
Asterinas aims to become **a production-grade, memory-safe Linux alternative**,
|
||||
with performance that matches Linux—and in some scenarios, exceeds it.
|
||||
The project has been under active development for four years,
|
||||
supports 230+ Linux system calls,
|
||||
and has launched an experimental distribution,
|
||||
[Asterinas NixOS](https://asterinas.github.io/book/distro/index.html).
|
||||
|
||||
In 2026, our priority is to advance project maturity toward production readiness,
|
||||
specifically targeting standard and confidential virtual machines on x86-64.
|
||||
Looking ahead, we will continue to expand functionality and
|
||||
harden the system for **mission-critical deployments**
|
||||
in data centers, autonomous vehicles, and embodied AI.
|
||||
|
||||
## Getting Started
|
||||
|
||||
|
|
@ -75,6 +101,9 @@ to make the Asterinas kernel more accessible for early adopters and enthusiasts.
|
|||
We encourage you to try out Asterinas NixOS and share feedback.
|
||||
Instructions on how to use the ISO installer can be found [here](https://asterinas.github.io/book/distro/index.html#end-users).
|
||||
|
||||
**Disclaimer: Asterinas is an independent, community-led project.
|
||||
Asterinas NixOS is _not_ an official NixOS project and has _no_ affiliation with the NixOS Foundation. _No_ sponsorship or endorsement is implied.**
|
||||
|
||||
### For Kernel Developers
|
||||
|
||||
Follow the steps below to get Asterinas up and running.
|
||||
|
|
@ -88,7 +117,7 @@ Follow the steps below to get Asterinas up and running.
|
|||
2. Run a Docker container as the development environment:
|
||||
|
||||
```bash
|
||||
docker run -it --privileged --network=host -v /dev:/dev -v $(pwd)/asterinas:/root/asterinas asterinas/asterinas:0.17.0-20251213
|
||||
docker run -it --privileged --network=host -v /dev:/dev -v $(pwd)/asterinas:/root/asterinas asterinas/asterinas:0.17.0-20260114
|
||||
```
|
||||
|
||||
3. Inside the container,
|
||||
|
|
|
|||
146
RELEASES.md
146
RELEASES.md
|
|
@ -1,3 +1,143 @@
|
|||
# Version 0.17.0 (2025-12-17)
|
||||
|
||||
This release marks a significant milestone in the evolution of Asterinas as we transition from "just a kernel" to a more complete, usable system. The headline of this release is the introduction of **Asterinas NixOS**, our first distribution that integrates the Asterinas kernel with the NixOS userspace, and enables real applications and services out of the box—including **XFCE**, **Podman**, and **systemd**. To support this growth, we are also strengthening our governance by establishing **the formal RFC (Request for Comments) process**, ensuring that major architectural decisions—starting with Asterinas NixOS itself—are designed transparently and collaboratively.
|
||||
|
||||
On the architecture front, **RISC-V support** has improved dramatically, with support for SMP (Symmetric Multiprocessing), FPU (Floating-Point Unit), VirtIO, and the SiFive HiFive Unleashed QEMU machine type. The kernel has also expanded with a new **input subsystem** (supporting keyboards and mice) and initial support for **namespaces and cgroups**. For filesystem developers, the big news is the addition of an **FS event notification mechanism (`inotify`)**, a new **ioctl infrastructure**, and a new filesystem type, **ConfigFS**. Finally, we are introducing **`sctrace`**—a dedicated tool for tracing and debugging syscall compatibility—now published on [crates.io](https://crates.io/crates/sctrace).
|
||||
|
||||
## Asterinas NixOS
|
||||
|
||||
We have made the following key changes to Asterinas NixOS:
|
||||
|
||||
* [Add NixOS as a distribution for Asterinas](https://github.com/asterinas/asterinas/pull/2621)
|
||||
* [Add the XFCE Nix module](https://github.com/asterinas/asterinas/pull/2670)
|
||||
* [Add the Podman Nix module](https://github.com/asterinas/asterinas/pull/2683)
|
||||
* [Enable systemd](https://github.com/asterinas/asterinas/pull/2687)
|
||||
* [Add Asterinas NixOS ISO installer](https://github.com/asterinas/asterinas/pull/2652)
|
||||
* [Add Cachix as a source for pre-built binaries](https://github.com/asterinas/asterinas/pull/2685)
|
||||
* [Add GitHub workflows to publish ISO images](https://github.com/asterinas/asterinas/pull/2743)
|
||||
|
||||
## Asterinas Kernel
|
||||
|
||||
We have made the following key changes to the Asterinas kernel:
|
||||
|
||||
* CPU architectures:
|
||||
* x86
|
||||
* [Add TSM-based attestation support for TDX via ConfigFS](https://github.com/asterinas/asterinas/pull/2505)
|
||||
* RISC-V
|
||||
* [Implement arch-aware vDSO](https://github.com/asterinas/asterinas/pull/2319)
|
||||
* [Add VirtIO support for RISC-V platforms](https://github.com/asterinas/asterinas/pull/2299)
|
||||
* Memory management
|
||||
* [Support sealing memfd files](https://github.com/asterinas/asterinas/pull/2408)
|
||||
* [Support executing memfd files and then `open("/proc/self/exe")`](https://github.com/asterinas/asterinas/pull/2521)
|
||||
* Process management
|
||||
* [Support `CLONE_PARENT` flag](https://github.com/asterinas/asterinas/pull/2447)
|
||||
* [Support `execve` in multithreaded process](https://github.com/asterinas/asterinas/pull/2459)
|
||||
* [Support `PR_SET`/`GET_SECUREBITS`](https://github.com/asterinas/asterinas/pull/2551)
|
||||
* [Fix some `kill`-related behavior](https://github.com/asterinas/asterinas/pull/2516)
|
||||
* IPC
|
||||
* [Add `rt_sigtimedwait` syscall](https://github.com/asterinas/asterinas/pull/2705)
|
||||
* [Enqueue ignored signals if the signals are blocked](https://github.com/asterinas/asterinas/pull/2503)
|
||||
* [Refactor `NamedPipe` to correct its opening and blocking behaviors](https://github.com/asterinas/asterinas/pull/2434)
|
||||
* [Support reopening anonymous pipes from `/proc`](https://github.com/asterinas/asterinas/pull/2694)
|
||||
* [Fix or clarify some futexes bugs](https://github.com/asterinas/asterinas/pull/2515)
|
||||
* File systems
|
||||
* VFS
|
||||
* [Add `inotify`-related syscalls](https://github.com/asterinas/asterinas/pull/2083)
|
||||
* [Add new ioctl infrastructure](https://github.com/asterinas/asterinas/pull/2686)
|
||||
* [Add `chmod` and `mkmod` macros](https://github.com/asterinas/asterinas/pull/2440)
|
||||
* [Add `syncfs` syscall](https://github.com/asterinas/asterinas/pull/2682)
|
||||
* [Add `fchmodat2` syscall](https://github.com/asterinas/asterinas/pull/2666)
|
||||
* [Support mount bind with a file](https://github.com/asterinas/asterinas/pull/2418)
|
||||
* [Support `MS_REMOUNT` flag](https://github.com/asterinas/asterinas/pull/2432)
|
||||
* [Ensure that every `FileLike` is associated with a `dyn Inode`](https://github.com/asterinas/asterinas/pull/2555)
|
||||
* Devtmpfs
|
||||
* [Add `/dev/full` device](https://github.com/asterinas/asterinas/pull/2439)
|
||||
* [Support registering char devices](https://github.com/asterinas/asterinas/pull/2598)
|
||||
* [Support registering block device (and their partitions)](https://github.com/asterinas/asterinas/pull/2560)
|
||||
* Procfs
|
||||
* Add [`/proc/cmdline`](https://github.com/asterinas/asterinas/pull/2420), [`/proc/stat`, `/proc/uptime`](https://github.com/asterinas/asterinas/pull/2370), [`/proc/version`](https://github.com/asterinas/asterinas/pull/2679), [`/proc/[pid]/environ`](https://github.com/asterinas/asterinas/pull/2371), [`/proc/[pid]/oom_score_adj`](https://github.com/asterinas/asterinas/pull/2410), [`/proc/[pid]/cmdline`, `/proc/[pid]/mem`](https://github.com/asterinas/asterinas/pull/2449), [`/proc/[pid]/mountinfo`](https://github.com/asterinas/asterinas/pull/2399), [`/proc/[pid]/fdinfo`](https://github.com/asterinas/asterinas/pull/2526), and [`/proc/[pid]/maps`](https://github.com/asterinas/asterinas/pull/2725)
|
||||
* [Support the sleeping and stopping states in `/proc/[pid]/stat`](https://github.com/asterinas/asterinas/pull/2491)
|
||||
* [Introduce `VmPrinter`](https://github.com/asterinas/asterinas/pull/2414) and [refactor procfs with `VmPrinter`](https://github.com/asterinas/asterinas/pull/2583)
|
||||
* [Fix a lot of bugs in procfs](https://github.com/asterinas/asterinas/pull/2553)
|
||||
* Ext2
|
||||
* [Support Ext2 handling of FIFO and devices](https://github.com/asterinas/asterinas/pull/2658)
|
||||
* [Fix Ext2 directory entry iteration](https://github.com/asterinas/asterinas/pull/2624)
|
||||
* [Fix the behavior of syncing BlockGroup metadata in Ext2](https://github.com/asterinas/asterinas/pull/2611)
|
||||
* [Fix some bugs in Ext2 superblock](https://github.com/asterinas/asterinas/pull/2675)
|
||||
* Configfs
|
||||
* [Add basic configfs implementation](https://github.com/asterinas/asterinas/pull/2186)
|
||||
* Sockets and networking
|
||||
* [Support UNIX datagram sockets](https://github.com/asterinas/asterinas/pull/2412)
|
||||
* [Add `sendmmsg` syscall](https://github.com/asterinas/asterinas/pull/2676)
|
||||
* [Add `sethostname` and `setdomainname` syscalls](https://github.com/asterinas/asterinas/pull/2442)
|
||||
* [Support `SO_BROADCAST` and `IP_RECVERR`](https://github.com/asterinas/asterinas/pull/2572)
|
||||
* Namespace and cgroups
|
||||
* [Add the namespace framework (along with `unshare` and `setns` syscalls)](https://github.com/asterinas/asterinas/pull/2312)
|
||||
* [Add the mount namespace](https://github.com/asterinas/asterinas/pull/2379)
|
||||
* [Support `/proc/[pid]/uid_map` and `/proc/[pid]/gid_map`](https://github.com/asterinas/asterinas/pull/2454)
|
||||
* [Implement controller framework for cgroup subsystem](https://github.com/asterinas/asterinas/pull/2282)
|
||||
* [Enable process management for cgroups](https://github.com/asterinas/asterinas/pull/2160)
|
||||
* Devices
|
||||
* Input devices
|
||||
* [Add the input subsystem](https://github.com/asterinas/asterinas/pull/2364)
|
||||
* [Map the I/O memory to the userspace](https://github.com/asterinas/asterinas/pull/2099)
|
||||
* [Add the input devices `/dev/input/eventX`](https://github.com/asterinas/asterinas/pull/2561)
|
||||
* [Add the framebuffer device `/dev/fb0`](https://github.com/asterinas/asterinas/pull/2216)
|
||||
* [Add i8042 mouse](https://github.com/asterinas/asterinas/pull/2479)
|
||||
* [Make i8042 initialization stable on real hardware](https://github.com/asterinas/asterinas/pull/2646)
|
||||
* TTY and PTY
|
||||
* [Add `KDSETMODE`/`KDSKBMODE` ioctls](https://github.com/asterinas/asterinas/pull/2525)
|
||||
* [Fix PTY closing behavior](https://github.com/asterinas/asterinas/pull/2550)
|
||||
* [Make PTY master reads block if no PTY slave is open](https://github.com/asterinas/asterinas/pull/2581)
|
||||
* [Make the semantics of TTY-related devices correct](https://github.com/asterinas/asterinas/pull/2566)
|
||||
* [Support PTY packet mode](https://github.com/asterinas/asterinas/pull/2594)
|
||||
* System management
|
||||
* [Add `reboot` syscall](https://github.com/asterinas/asterinas/pull/2552)
|
||||
* [Make `reboot -f` work on real hardware](https://github.com/asterinas/asterinas/pull/2636)
|
||||
* [Support `RUSAGE_CHILDREN` for `getrusage`](https://github.com/asterinas/asterinas/pull/2438)
|
||||
* Misc
|
||||
* [Upgrade to Rust 2024 edition and the 20251208 nightly toolchain](https://github.com/asterinas/asterinas/pull/2701)
|
||||
* [Introduce the ASCII art of Asterinas logo in gradient colors](https://github.com/asterinas/asterinas/pull/2427)
|
||||
* [Add stage support for `init_component` macro](https://github.com/asterinas/asterinas/pull/2415)
|
||||
* [Add a new tool called Syscall Compatibility Tracer (`sctrace`)](https://github.com/asterinas/asterinas/pull/2456)
|
||||
|
||||
## Asterinas OSTD & OSDK
|
||||
|
||||
We have made the following key changes to OSTD and/or OSDK:
|
||||
|
||||
* CPU architectures
|
||||
* Common
|
||||
* [Reorganize `ostd::arch::irq`](https://github.com/asterinas/asterinas/pull/2504)
|
||||
* x86
|
||||
* [Better x86 CPU feature detection by rewriting all CPUID-related code](https://github.com/asterinas/asterinas/pull/2395)
|
||||
* [Set `CR0.WP/NE/MP` explicitly to fix AP behavior](https://github.com/asterinas/asterinas/pull/2422)
|
||||
* [Extend cache policies for the x86 Architecture](https://github.com/asterinas/asterinas/pull/2570)
|
||||
* RISC-V
|
||||
* [Add support for RISC-V PLIC](https://github.com/asterinas/asterinas/pull/2106)
|
||||
* [Refactor RISC-V trap handling](https://github.com/asterinas/asterinas/pull/2318)
|
||||
* [Add RISC-V FPU support](https://github.com/asterinas/asterinas/pull/2320)
|
||||
* [Implement fallible memory operations on RISC-V platform](https://github.com/asterinas/asterinas/pull/2462)
|
||||
* [Support bootup on SiFive HiFive Unleashed](https://github.com/asterinas/asterinas/pull/2481)
|
||||
* [RISC-V SMP boot](https://github.com/asterinas/asterinas/pull/2368)
|
||||
* [Full (<=32) RISC-V SMP support](https://github.com/asterinas/asterinas/pull/2547)
|
||||
* CPU
|
||||
* [Extract `CpuId` into a dedicated sub-module](https://github.com/asterinas/asterinas/pull/2514)
|
||||
* Memory management
|
||||
* [Make `UniqueFrame::repurpose` sound](https://github.com/asterinas/asterinas/pull/2441)
|
||||
* Interrupt handling
|
||||
* [Refactor OSTD's `irq` module for improved clarity](https://github.com/asterinas/asterinas/pull/2429)
|
||||
* Misc
|
||||
* [Move PCI bus out of OSTD](https://github.com/asterinas/asterinas/pull/2027)
|
||||
|
||||
## Asterinas Book
|
||||
|
||||
We have made the following key changes to the Book:
|
||||
|
||||
* [Add the first RFC: "Establish the RFC process"](https://github.com/asterinas/asterinas/pull/2365)
|
||||
* [Add the second RFC: "Asterinas NixOS"](https://github.com/asterinas/asterinas/pull/2584)
|
||||
* [Add a new "Limitations on System Calls" section to the book](https://github.com/asterinas/asterinas/pull/2314)
|
||||
* [Add the Asterinas NixOS volume](https://github.com/asterinas/asterinas/pull/2750)
|
||||
|
||||
# Version 0.16.0 (2025-08-04)
|
||||
|
||||
This release introduces initial support for the **LoongArch CPU architecture**, a major milestone for the project. Version 0.16.0 also significantly expands our Linux ABI compatibility with the addition of **nine new system calls** such as `memfd_create` and `pidfd_open`.
|
||||
|
|
@ -48,7 +188,7 @@ We have made the following key changes to the Asterinas kernel:
|
|||
* [Introduce the system call tests from LTP](https://github.com/asterinas/asterinas/pull/2053)
|
||||
* [Use Nix to build initramfs](https://github.com/asterinas/asterinas/pull/2101)
|
||||
|
||||
## OSTD & OSDK
|
||||
## Asterinas OSTD & OSDK
|
||||
|
||||
We have made the following key changes to OSTD:
|
||||
|
||||
|
|
@ -64,12 +204,12 @@ We have made the following key changes to OSTD:
|
|||
* LoongArch:
|
||||
* [Add the initial LoongArch support](https://github.com/asterinas/asterinas/pull/2260)
|
||||
* CPU:
|
||||
* [Add support for dynamically-allocated CPU-local objects](https://github.com/asterinas/asterinas/pull/2036)
|
||||
* [Add support for dynamicall-allocated CPU-local objects](https://github.com/asterinas/asterinas/pull/2036)
|
||||
* [Require `T: Send` for `CpuLocal<T, S>`](https://github.com/asterinas/asterinas/pull/2171)
|
||||
* Memory management:
|
||||
* [Adopt a two-phase locking scheme for page tables](https://github.com/asterinas/asterinas/pull/1948)
|
||||
* Trap handling:
|
||||
* [Create `IrqChip` abstraction](https://github.com/asterinas/asterinas/pull/2107)
|
||||
* [Create `IrqChip` abstraction](https://github.com/asterinas/asterinas/pull/2107)
|
||||
* Task and scheduling:
|
||||
* [Rewrite the Rust doc of OSTD's scheduling module](https://github.com/asterinas/asterinas/pull/2284)
|
||||
* [Fix the race between enabling IRQs and halting CPU](https://github.com/asterinas/asterinas/pull/2052)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
[book]
|
||||
authors = ["The Asterinas authors"]
|
||||
language = "en"
|
||||
multilingual = false
|
||||
src = "src"
|
||||
title = "The Asterinas Book"
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
# How to Contribute
|
||||
|
||||
* [Before You Contribute]()
|
||||
* [Before You Contribute](to-contribute/README.md)
|
||||
* [Code Organization]()
|
||||
* [Style Guidelines]()
|
||||
* [General Guidelines]()
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ except that it replaces Linux with Asterinas as its kernel.
|
|||
For more rationale about choosing NixOS,
|
||||
see [the RFC](https://asterinas.github.io/book/rfcs/0002-asterinas-nixos.html).
|
||||
|
||||
**Disclaimer: Asterinas is an independent, community-led project.
|
||||
Asterinas NixOS is _not_ an official NixOS project and has _no_ affiliation with the NixOS Foundation. _No_ sponsorship or endorsement is implied.**
|
||||
|
||||
Asterinas NixOS is not ready for production use.
|
||||
We provide Asterinas NixOS to make the Asterinas kernel more accessible,
|
||||
allowing early adopters and enthusiasts to try it out and provide feedback.
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ Follow the three simple steps below to get Asterinas up and running.
|
|||
--network=host \
|
||||
--device=/dev/kvm \
|
||||
-v $(pwd)/asterinas:/root/asterinas \
|
||||
asterinas/asterinas:0.17.0-20251213
|
||||
asterinas/asterinas:0.17.0-20260114
|
||||
```
|
||||
|
||||
3. Inside the container, go to the project folder to build and run Asterinas.
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ cargo osdk test
|
|||
|
||||
### General Test
|
||||
|
||||
The following command builds and runs the test binaries in `test/src/apps` directory on Asterinas.
|
||||
The following command builds and runs the test binaries in `test/initramfs/src/apps` directory on Asterinas.
|
||||
|
||||
```bash
|
||||
make run_kernel AUTO_TEST=test
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ The following result is an example:
|
|||
2. Run a Docker container as the development environment.
|
||||
|
||||
```bash
|
||||
docker run -it --privileged --network=host --device=/dev/kvm -v $(pwd)/asterinas:/root/asterinas asterinas/asterinas:0.17.0-20251213
|
||||
docker run -it --privileged --network=host --device=/dev/kvm -v $(pwd)/asterinas:/root/asterinas asterinas/asterinas:0.17.0-20260114
|
||||
```
|
||||
|
||||
3. Inside the container,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ which are summarized in the table below.
|
|||
| 4 | stat | ✅ | 💯 |
|
||||
| 5 | fstat | ✅ | 💯 |
|
||||
| 6 | lstat | ✅ | 💯 |
|
||||
| 7 | poll | ✅ | [⚠️](syscall-flag-coverage/file-descriptor-and-io-control/#poll) |
|
||||
| 7 | poll | ✅ | [⚠️](syscall-flag-coverage/file-descriptor-and-io-control/#poll-and-ppoll) |
|
||||
| 8 | lseek | ✅ | [⚠️](syscall-flag-coverage/file-and-directory-operations/#lseek) |
|
||||
| 9 | mmap | ✅ | [⚠️](syscall-flag-coverage/memory-management/#mmap-and-munmap) |
|
||||
| 10 | mprotect | ✅ | [⚠️](syscall-flag-coverage/memory-management/#mprotect) |
|
||||
|
|
@ -36,7 +36,7 @@ which are summarized in the table below.
|
|||
| 13 | rt_sigaction | ✅ | [⚠️](syscall-flag-coverage/signals-and-timers/#rt_sigaction) |
|
||||
| 14 | rt_sigprocmask | ✅ | [⚠️](syscall-flag-coverage/signals-and-timers/#rt_sigprocmask) |
|
||||
| 15 | rt_sigreturn | ✅ | 💯 |
|
||||
| 16 | ioctl | ✅ | ❓ |
|
||||
| 16 | ioctl | ✅ | [⚠️](syscall-flag-coverage/file-descriptor-and-io-control/#ioctl) |
|
||||
| 17 | pread64 | ✅ | 💯 |
|
||||
| 18 | pwrite64 | ✅ | 💯 |
|
||||
| 19 | readv | ✅ | 💯 |
|
||||
|
|
@ -55,30 +55,30 @@ which are summarized in the table below.
|
|||
| 32 | dup | ✅ | 💯 |
|
||||
| 33 | dup2 | ✅ | 💯 |
|
||||
| 34 | pause | ✅ | 💯 |
|
||||
| 35 | nanosleep | ✅ | ❓ |
|
||||
| 36 | getitimer | ✅ | ❓ |
|
||||
| 35 | nanosleep | ✅ | 💯 |
|
||||
| 36 | getitimer | ✅ | 💯 |
|
||||
| 37 | alarm | ✅ | 💯 |
|
||||
| 38 | setitimer | ✅ | ❓ |
|
||||
| 38 | setitimer | ✅ | 💯 |
|
||||
| 39 | getpid | ✅ | 💯 |
|
||||
| 40 | sendfile | ✅ | 💯 |
|
||||
| 41 | socket | ✅ | [⚠️](syscall-flag-coverage/networking-and-sockets/#socket) |
|
||||
| 42 | connect | ✅ | [⚠️](syscall-flag-coverage/networking-and-sockets/#connect) |
|
||||
| 43 | accept | ✅ | ❓ |
|
||||
| 43 | accept | ✅ | [⚠️](syscall-flag-coverage/networking-and-sockets/#accept-and-accept4) |
|
||||
| 44 | sendto | ✅ | [⚠️](syscall-flag-coverage/networking-and-sockets/#sendto-sendmsg-and-sendmmsg) |
|
||||
| 45 | recvfrom | ✅ | [⚠️](syscall-flag-coverage/networking-and-sockets/#recvfrom-and-recvmsg) |
|
||||
| 46 | sendmsg | ✅ | [⚠️](syscall-flag-coverage/networking-and-sockets/#sendto-sendmsg-and-sendmmsg) |
|
||||
| 47 | recvmsg | ✅ | [⚠️](syscall-flag-coverage/networking-and-sockets/#recvfrom-and-recvmsg) |
|
||||
| 48 | shutdown | ✅ | ❓ |
|
||||
| 48 | shutdown | ✅ | 💯 |
|
||||
| 49 | bind | ✅ | [⚠️](syscall-flag-coverage/networking-and-sockets/#bind) |
|
||||
| 50 | listen | ✅ | ❓ |
|
||||
| 50 | listen | ✅ | 💯 |
|
||||
| 51 | getsockname | ✅ | 💯 |
|
||||
| 52 | getpeername | ✅ | ❓ |
|
||||
| 52 | getpeername | ✅ | 💯 |
|
||||
| 53 | socketpair | ✅ | [⚠️](syscall-flag-coverage/networking-and-sockets/#socketpair) |
|
||||
| 54 | setsockopt | ✅ | [⚠️](syscall-flag-coverage/networking-and-sockets/#getsockopt-and-setsockopt) |
|
||||
| 55 | getsockopt | ✅ | [⚠️](syscall-flag-coverage/networking-and-sockets/#getsockopt-and-setsockopt) |
|
||||
| 56 | clone | ✅ | [⚠️](syscall-flag-coverage/process-and-thread-management/#clone) |
|
||||
| 56 | clone | ✅ | [⚠️](syscall-flag-coverage/process-and-thread-management/#clone-and-clone3) |
|
||||
| 57 | fork | ✅ | 💯 |
|
||||
| 58 | vfork | ❌ | N/A |
|
||||
| 58 | vfork | ✅ | 💯 |
|
||||
| 59 | execve | ✅ | 💯 |
|
||||
| 60 | exit | ✅ | 💯 |
|
||||
| 61 | wait4 | ✅ | [⚠️](syscall-flag-coverage/process-and-thread-management/#wait4) |
|
||||
|
|
@ -93,7 +93,7 @@ which are summarized in the table below.
|
|||
| 70 | msgrcv | ❌ | N/A |
|
||||
| 71 | msgctl | ❌ | N/A |
|
||||
| 72 | fcntl | ✅ | [⚠️](syscall-flag-coverage/file-descriptor-and-io-control/#fcntl) |
|
||||
| 73 | flock | ✅ | ❓ |
|
||||
| 73 | flock | ✅ | 💯 |
|
||||
| 74 | fsync | ✅ | 💯 |
|
||||
| 75 | fdatasync | ✅ | 💯 |
|
||||
| 76 | truncate | ✅ | 💯 |
|
||||
|
|
@ -151,7 +151,7 @@ which are summarized in the table below.
|
|||
| 128 | rt_sigtimedwait | ✅ | 💯 |
|
||||
| 129 | rt_sigqueueinfo | ❌ | N/A |
|
||||
| 130 | rt_sigsuspend | ✅ | 💯 |
|
||||
| 131 | sigaltstack | ✅ | ❓ |
|
||||
| 131 | sigaltstack | ✅ | 💯 |
|
||||
| 132 | utime | ✅ | 💯 |
|
||||
| 133 | mknod | ✅ | 💯 |
|
||||
| 134 | uselib | ❌ | N/A |
|
||||
|
|
@ -241,9 +241,9 @@ which are summarized in the table below.
|
|||
| 218 | set_tid_address | ✅ | 💯 |
|
||||
| 219 | restart_syscall | ❌ | N/A |
|
||||
| 220 | semtimedop | ✅ | [⚠️](syscall-flag-coverage/inter-process-communication/#semop-and-semtimedop) |
|
||||
| 221 | fadvise64 | ✅ | ❓ |
|
||||
| 221 | fadvise64 | ✅ | [⚠️](syscall-flag-coverage/file-descriptor-and-io-control/#fadvise64) |
|
||||
| 222 | timer_create | ✅ | [⚠️](syscall-flag-coverage/signals-and-timers/#timer_create) |
|
||||
| 223 | timer_settime | ✅ | ❓ |
|
||||
| 223 | timer_settime | ✅ | 💯 |
|
||||
| 224 | timer_gettime | ✅ | 💯 |
|
||||
| 225 | timer_getoverrun | ❌ | N/A |
|
||||
| 226 | timer_delete | ✅ | 💯 |
|
||||
|
|
@ -267,12 +267,12 @@ which are summarized in the table below.
|
|||
| 244 | mq_notify | ❌ | N/A |
|
||||
| 245 | mq_getsetattr | ❌ | N/A |
|
||||
| 246 | kexec_load | ❌ | N/A |
|
||||
| 247 | waitid | ✅ | ❓ |
|
||||
| 247 | waitid | ✅ | [⚠️](syscall-flag-coverage/process-and-thread-management/#waitid) |
|
||||
| 248 | add_key | ❌ | N/A |
|
||||
| 249 | request_key | ❌ | N/A |
|
||||
| 250 | keyctl | ❌ | N/A |
|
||||
| 251 | ioprio_set | ✅ | ❓ |
|
||||
| 252 | ioprio_get | ✅ | ❓ |
|
||||
| 251 | ioprio_set | ✅ | [⚠️](syscall-flag-coverage/file-descriptor-and-io-control/#ioprio_set-and-ioprio_get) |
|
||||
| 252 | ioprio_get | ✅ | [⚠️](syscall-flag-coverage/file-descriptor-and-io-control/#ioprio_set-and-ioprio_get) |
|
||||
| 253 | inotify_init | ✅ | 💯 |
|
||||
| 254 | inotify_add_watch | ✅ | [⚠️](syscall-flag-coverage/file-systems-and-mount-control/#inotify_add_watch) |
|
||||
| 255 | inotify_rm_watch | ✅ | 💯 |
|
||||
|
|
@ -291,8 +291,8 @@ which are summarized in the table below.
|
|||
| 268 | fchmodat | ✅ | 💯 |
|
||||
| 269 | faccessat | ✅ | 💯 |
|
||||
| 270 | pselect6 | ✅ | 💯 |
|
||||
| 271 | ppoll | ✅ | ❓ |
|
||||
| 272 | unshare | ✅ | ❓ |
|
||||
| 271 | ppoll | ✅ | [⚠️](syscall-flag-coverage/file-descriptor-and-io-control/#poll-and-ppoll) |
|
||||
| 272 | unshare | ✅ | [⚠️](syscall-flag-coverage/namespaces-cgroups-and-security/#unshare) |
|
||||
| 273 | set_robust_list | ✅ | 💯 |
|
||||
| 274 | get_robust_list | ❌ | N/A |
|
||||
| 275 | splice | ❌ | N/A |
|
||||
|
|
@ -300,15 +300,15 @@ which are summarized in the table below.
|
|||
| 277 | sync_file_range | ❌ | N/A |
|
||||
| 278 | vmsplice | ❌ | N/A |
|
||||
| 279 | move_pages | ❌ | N/A |
|
||||
| 280 | utimensat | ✅ | ❓ |
|
||||
| 280 | utimensat | ✅ | [⚠️](syscall-flag-coverage/file-and-directory-operations/#utimensat) |
|
||||
| 281 | epoll_pwait | ✅ | 💯 |
|
||||
| 282 | signalfd | ✅ | 💯 |
|
||||
| 283 | timerfd_create | ✅ | ❓ |
|
||||
| 283 | timerfd_create | ✅ | [⚠️](syscall-flag-coverage/signals-and-timers/#timerfd_create) |
|
||||
| 284 | eventfd | ✅ | 💯 |
|
||||
| 285 | fallocate | ✅ | ❓ |
|
||||
| 286 | timerfd_settime | ✅ | ❓ |
|
||||
| 285 | fallocate | ✅ | [⚠️](syscall-flag-coverage/file-and-directory-operations/#fallocate) |
|
||||
| 286 | timerfd_settime | ✅ | [⚠️](syscall-flag-coverage/signals-and-timers/#timerfd_settime) |
|
||||
| 287 | timerfd_gettime | ✅ | 💯 |
|
||||
| 288 | accept4 | ✅ | ❓ |
|
||||
| 288 | accept4 | ✅ | [⚠️](syscall-flag-coverage/networking-and-sockets/#accept-and-accept4) |
|
||||
| 289 | signalfd4 | ✅ | 💯 |
|
||||
| 290 | eventfd2 | ✅ | [⚠️](syscall-flag-coverage/file-descriptor-and-io-control/#eventfd-and-eventfd2) |
|
||||
| 291 | epoll_create1 | ✅ | 💯 |
|
||||
|
|
@ -328,7 +328,7 @@ which are summarized in the table below.
|
|||
| 305 | clock_adjtime | ❌ | N/A |
|
||||
| 306 | syncfs | ✅ | 💯 |
|
||||
| 307 | sendmmsg | ✅ | [⚠️](syscall-flag-coverage/networking-and-sockets/#sendto-sendmsg-and-sendmmsg) |
|
||||
| 308 | setns | ✅ | ❓ |
|
||||
| 308 | setns | ✅ | [⚠️](syscall-flag-coverage/namespaces-cgroups-and-security/#setns) |
|
||||
| 309 | getcpu | ✅ | 💯 |
|
||||
| 310 | process_vm_readv | ❌ | N/A |
|
||||
| 311 | process_vm_writev | ❌ | N/A |
|
||||
|
|
@ -339,14 +339,16 @@ which are summarized in the table below.
|
|||
| 316 | renameat2 | ✅ | [⚠️](syscall-flag-coverage/file-and-directory-operations/#renameat2) |
|
||||
| 318 | getrandom | ✅ | [⚠️](syscall-flag-coverage/system-information-and-misc/#getrandom) |
|
||||
| 319 | memfd_create | ✅ | [⚠️](syscall-flag-coverage/file-descriptor-and-io-control/#memfd_create) |
|
||||
| 322 | execveat | ✅ | ❓ |
|
||||
| 322 | execveat | ✅ | 💯 |
|
||||
| 327 | preadv2 | ✅ | [⚠️](syscall-flag-coverage/file-and-directory-operations/#preadv2-and-pwritev2) |
|
||||
| 328 | pwritev2 | ✅ | [⚠️](syscall-flag-coverage/file-and-directory-operations/#preadv2-and-pwritev2) |
|
||||
| 332 | statx | ✅ | ❓ |
|
||||
| 434 | pidfd_open | ✅ | ❓ |
|
||||
| 435 | clone3 | ✅ | ❓ |
|
||||
| 436 | close_range | ✅ | ❓ |
|
||||
| 439 | faccessat2 | ✅ | ❓ |
|
||||
| 332 | statx | ✅ | [⚠️](syscall-flag-coverage/file-and-directory-operations/#statx) |
|
||||
| 424 | pidfd_send_signal | ✅ | 💯 |
|
||||
| 434 | pidfd_open | ✅ | 💯 |
|
||||
| 435 | clone3 | ✅ | [⚠️](syscall-flag-coverage/process-and-thread-management/#clone-and-clone3) |
|
||||
| 436 | close_range | ✅ | 💯 |
|
||||
| 438 | pidfd_getfd | ✅ | 💯 |
|
||||
| 439 | faccessat2 | ✅ | [⚠️](syscall-flag-coverage/file-and-directory-operations/#faccessat2) |
|
||||
| 441 | epoll_pwait2 | ✅ | 💯 |
|
||||
| 452 | fchmodat2 | ✅ | 💯 |
|
||||
|
||||
|
|
|
|||
|
|
@ -103,3 +103,71 @@ Unsupported flags:
|
|||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/preadv2.2.html).
|
||||
|
||||
### `faccessat2`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include faccessat2.scml}}
|
||||
```
|
||||
|
||||
Silently-ignored flags:
|
||||
* `AT_EACCESS`
|
||||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/faccessat2.2.html).
|
||||
|
||||
### `statx`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include statx.scml}}
|
||||
```
|
||||
|
||||
Silently-ignored flags:
|
||||
* `AT_NO_AUTOMOUNT`
|
||||
* `AT_STATX_FORCE_SYNC`
|
||||
* `AT_STATX_DONT_SYNC`
|
||||
|
||||
Silently-ignored masks:
|
||||
* `STATX_DIOALIGN`
|
||||
* `STATX_MNT_ID_UNIQUE`
|
||||
* `STATX_SUBVOL`
|
||||
* `STATX_WRITE_ATOMIC`
|
||||
* `STATX_DIO_READ_ALIGN`
|
||||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/statx.2.html).
|
||||
|
||||
### `fallocate`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include fallocate.scml}}
|
||||
```
|
||||
|
||||
Unsupported modes:
|
||||
* `FALLOC_FL_UNSHARE_RANGE`
|
||||
* `FALLOC_FL_COLLAPSE_RANGE`
|
||||
* `FALLOC_FL_ZERO_RANGE`
|
||||
* `FALLOC_FL_INSERT_RANGE`
|
||||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/fallocate.2.html).
|
||||
|
||||
### `utimensat`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include utimensat.scml}}
|
||||
```
|
||||
|
||||
Unsupported flags:
|
||||
* `AT_EMPTY_PATH`
|
||||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/utimensat.2.html).
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
// Check user's permissions for a file
|
||||
faccessat2(
|
||||
dirfd, path, mode,
|
||||
flags = AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW
|
||||
);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
// Allocate disk space within the range specified
|
||||
fallocate(fd, mode = FALLOC_FL_KEEP_SIZE, offset, size);
|
||||
|
||||
// Deallocate space (create a hole) while keeping the file size unchanged
|
||||
fallocate(fd, mode = FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, offset, size);
|
||||
|
|
@ -118,3 +118,6 @@ fremovexattr(fd, name);
|
|||
|
||||
// Check user's permissions for a file
|
||||
faccessat(dirfd, path, mode);
|
||||
|
||||
// Apply or remove an advisory lock on an open file
|
||||
flock(fd, op = LOCK_SH | LOCK_EX | LOCK_UN | LOCK_NB);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
statx_flags = AT_EMPTY_PATH | AT_NO_AUTOMOUNT | AT_STATX_FORCE_SYNC |
|
||||
AT_STATX_DONT_SYNC | AT_STATX_SYNC_AS_STAT | AT_SYMLINK_NOFOLLOW;
|
||||
statx_mask = STATX_TYPE | STATX_MODE | STATX_NLINK | STATX_UID | STATX_GID |
|
||||
STATX_ATIME | STATX_MTIME | STATX_CTIME | STATX_INO | STATX_SIZE |
|
||||
STATX_BLOCKS | STATX_BASIC_STATS | STATX_BTIME | STATX_ALL |
|
||||
STATX_MNT_ID | STATX_DIOALIGN | STATX_MNT_ID_UNIQUE | STATX_SUBVOL |
|
||||
STATX_WRITE_ATOMIC | STATX_DIO_READ_ALIGN;
|
||||
|
||||
// Get file status (extended)
|
||||
statx(
|
||||
dirfd, pathname,
|
||||
flags = <statx_flags>,
|
||||
mask = <statx_mask>,
|
||||
statxbuf
|
||||
);
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
// Change file timestamps with nanosecond precision
|
||||
utimensat(dirfd, path, times, flags = AT_SYMLINK_NOFOLLOW);
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
<!--
|
||||
Put system calls such as
|
||||
dup, dup2, dup3, fcntl, ioctl, pipe, pipe2, splice, tee, vmsplice, sendfile,
|
||||
eventfd, eventfd2 and memfd_create
|
||||
eventfd, eventfd2, memfd_create and fadvise64
|
||||
under this category.
|
||||
-->
|
||||
|
||||
|
|
@ -86,6 +86,25 @@ Unsupported flags:
|
|||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/memfd_create.2.html).
|
||||
|
||||
### `fadvise64`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include fadvise64.scml}}
|
||||
```
|
||||
|
||||
Silently-ignored flags:
|
||||
* `POSIX_FADV_NORMAL`
|
||||
* `POSIX_FADV_RANDOM`
|
||||
* `POSIX_FADV_SEQUENTIAL`
|
||||
* `POSIX_FADV_WILLNEED`
|
||||
* `POSIX_FADV_DONTNEED`
|
||||
* `POSIX_FADV_NOREUSE`
|
||||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/posix_fadvise.2.html).
|
||||
|
||||
### `epoll_ctl`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
|
@ -101,12 +120,12 @@ Unsupported flags in events:
|
|||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/epoll_ctl.2.html).
|
||||
|
||||
### `poll`
|
||||
### `poll` and `ppoll`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include poll.scml}}
|
||||
{{#include poll_and_ppoll.scml}}
|
||||
```
|
||||
|
||||
Unsupported events:
|
||||
|
|
@ -116,3 +135,29 @@ Unsupported events:
|
|||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/poll.2.html).
|
||||
|
||||
### `ioctl`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include ioctl.scml}}
|
||||
```
|
||||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/ioctl.2.html).
|
||||
|
||||
### `ioprio_set` and `ioprio_get`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include ioprio_get_and_set.scml}}
|
||||
```
|
||||
|
||||
Unsupported selectors:
|
||||
* `IOPRIO_WHO_PGRP`
|
||||
* `IOPRIO_WHO_USER`
|
||||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/ioprio_set.2.html).
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
// Announce an intention to access file data in a specific pattern in the future
|
||||
fadvise64(fd, offset, len, advice = 0);
|
||||
|
|
@ -28,3 +28,12 @@ epoll_pwait2(epfd, events, maxevents, timeout, sigmask);
|
|||
|
||||
// Wait for I/O event on the file descriptors set in read, write or except bitmaps
|
||||
select(nfds, readfds, writefds, exceptfds, timeout);
|
||||
|
||||
// Obtain a file descriptor that refers to a process
|
||||
pidfd_open(pid, flags = PIDFD_NONBLOCK);
|
||||
|
||||
// Obtain a duplicate of another process's file descriptor
|
||||
pidfd_getfd(pidfd, targetfd, flags = 0);
|
||||
|
||||
// Close all file descriptors in the inclusive range [first, last]
|
||||
close_range(first, last, flags = CLOSE_RANGE_UNSHARE | CLOSE_RANGE_CLOEXEC);
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
tty_ops = TCGETS | TCSETS | TCSETSW | TCSETSF | TIOCGWINSZ | TIOCSWINSZ |
|
||||
TIOCGPTN | FIONREAD | KDFONTOP | KDSETMODE | KDGETMODE |
|
||||
KDSKBMODE | KDGKBMODE;
|
||||
term_ops = TIOCGPGRP | TIOCSPGRP | TIOCSCTTY | TIOCNOTTY | TIOCGSID;
|
||||
pty_master_ops = TIOCSPTLCK | TIOCGPTLCK | TIOCGPTPEER | TIOCPKT | TIOCGPKT;
|
||||
|
||||
// Control file descriptor flags and I/O modes
|
||||
ioctl(fd, op = FIONCLEX | FIOCLEX | FIONBIO | FIOASYNC, ..);
|
||||
|
||||
// Control terminal devices
|
||||
ioctl(fd, op = <pty_master_ops> | <tty_ops> | <term_ops>, ..);
|
||||
|
||||
// Control framebuffer display
|
||||
ioctl(
|
||||
fd,
|
||||
op = FBIOGET_VSCREENINFO | FBIOPUT_VSCREENINFO | FBIOGET_FSCREENINFO |
|
||||
FBIOGETCMAP | FBIOPUTCMAP | FBIOPAN_DISPLAY | FBIOBLANK,
|
||||
..
|
||||
);
|
||||
|
||||
// Control Event devices (evdev)
|
||||
ioctl(
|
||||
fd,
|
||||
op = EVIOCGVERSION | EVIOCGID | EVIOCGNAME | EVIOCGPHYS | EVIOCGUNIQ |
|
||||
EVIOCGKEY | EVIOCGLED | EVIOCGSW | EVIOCSCLOCKID | EVIOCGBIT,
|
||||
..
|
||||
);
|
||||
|
||||
// Control block devices
|
||||
ioctl(fd, op = BLKGETSIZE64, ..);
|
||||
|
||||
// Control Trust Domain Extensions (TDX) guest devices
|
||||
ioctl(fd, op = TDX_CMD_GET_REPORT0, ..);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
// Set the I/O priority for a single thread
|
||||
ioprio_set(which = IOPRIO_WHO_PROCESS, who, ioprio);
|
||||
|
||||
// Get the I/O priority for a single thread
|
||||
ioprio_get(which = IOPRIO_WHO_PROCESS, who);
|
||||
|
|
@ -6,3 +6,6 @@ struct pollfd = {
|
|||
|
||||
// Wait for I/O event on a set of file descriptors
|
||||
poll(fds = [ <pollfd> ], nfds, timeout);
|
||||
|
||||
// Wait for I/O event on a set of file descriptors with specified signals temporarily blocked
|
||||
ppoll(fds = [ <pollfd> ], nfds, timeout, sigset, sigset_size);
|
||||
|
|
@ -90,7 +90,6 @@ Unsupported event flags:
|
|||
|
||||
Unsupported control flags:
|
||||
* `IN_EXCL_UNLINK` - Events on unlinked files are not excluded
|
||||
* `IN_ONESHOT` - Watches are not automatically removed after the first event
|
||||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man7/inotify.7.html).
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ inotify_events = IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE |
|
|||
IN_DELETE_SELF | IN_CLOSE;
|
||||
|
||||
inotify_controls = IN_ONLYDIR | IN_DONT_FOLLOW | IN_MASK_CREATE |
|
||||
IN_MASK_ADD | IN_ISDIR;
|
||||
IN_MASK_ADD | IN_ONESHOT;
|
||||
|
||||
// Add a watch to an initialized inotify instance
|
||||
inotify_add_watch(fd, pathname, mask = <inotify_events> | <inotify_controls>);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ Silently-ignored flags:
|
|||
* `MAP_NONBLOCK`
|
||||
* `MAP_NORESERVE`
|
||||
* `MAP_POPULATE`
|
||||
* `MAP_SYNC`
|
||||
|
||||
Partially supported flags:
|
||||
* `MAP_FIXED_NOREPLACE` is treated as `MAP_FIXED`
|
||||
|
|
@ -89,15 +88,20 @@ Supported functionality in SCML:
|
|||
```
|
||||
|
||||
Silently-ignored advice:
|
||||
* `MADV_DONTNEED`
|
||||
* `MADV_NOHUGEPAGE`
|
||||
* `MADV_HUGEPAGE`
|
||||
* `MADV_NORMAL`
|
||||
* `MADV_RANDOM`
|
||||
* `MADV_SEQUENTIAL`
|
||||
* `MADV_WILLNEED`
|
||||
* `MADV_FREE`
|
||||
* `MADV_MERGEABLE`
|
||||
* `MADV_DONTFORK`
|
||||
* `MADV_UNMERGEABLE`
|
||||
* `MADV_HUGEPAGE`
|
||||
* `MADV_NOHUGEPAGE`
|
||||
|
||||
Unsupported advice:
|
||||
* `MADV_RANDOM`
|
||||
* `MADV_REMOVE`
|
||||
* `MADV_DONTFORK`
|
||||
* `MADV_DOFORK`
|
||||
* `MADV_HWPOISON`
|
||||
* `MADV_UNMERGEABLE`
|
||||
|
|
|
|||
|
|
@ -1,11 +1,2 @@
|
|||
// Apply the default memory access pattern with no special optimizations
|
||||
madvise(addr, length, advice = MADV_NORMAL);
|
||||
|
||||
// Indicate sequential access to enable aggressive read-ahead and immediate page release
|
||||
madvise(addr, length, advice = MADV_SEQUENTIAL);
|
||||
|
||||
// Prefetch pages for near-future access to reduce latency
|
||||
madvise(addr, length, advice = MADV_WILLNEED);
|
||||
|
||||
// Mark pages for lazy reclamation to allow the kernel to free them under memory pressure
|
||||
madvise(addr, length, advice = MADV_FREE);
|
||||
// Do not expect access in the near future and free associated resources
|
||||
madvise(addr, length, advice = MADV_DONTNEED);
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ opt_flags =
|
|||
MAP_LOCKED |
|
||||
MAP_NONBLOCK |
|
||||
MAP_NORESERVE |
|
||||
MAP_POPULATE |
|
||||
MAP_SYNC;
|
||||
MAP_POPULATE;
|
||||
|
||||
// Create a private memory mapping
|
||||
mmap(
|
||||
|
|
|
|||
|
|
@ -64,3 +64,44 @@ Unsupported versions:
|
|||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/capget.2.html).
|
||||
|
||||
### `unshare`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include unshare.scml}}
|
||||
```
|
||||
|
||||
Unsupported flags:
|
||||
* `CLONE_NEWCGROUP`
|
||||
* `CLONE_NEWIPC`
|
||||
* `CLONE_NEWNET`
|
||||
* `CLONE_NEWPID`
|
||||
* `CLONE_NEWTIME`
|
||||
* `CLONE_NEWUSER`
|
||||
|
||||
Silently-ignored flags:
|
||||
* `CLONE_SYSVSEM`
|
||||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/unshare.2.html).
|
||||
|
||||
### `setns`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include setns.scml}}
|
||||
```
|
||||
|
||||
Unsupported flags:
|
||||
* `CLONE_NEWCGROUP`
|
||||
* `CLONE_NEWIPC`
|
||||
* `CLONE_NEWNET`
|
||||
* `CLONE_NEWPID`
|
||||
* `CLONE_NEWTIME`
|
||||
* `CLONE_NEWUSER`
|
||||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/setns.2.html).
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
// Reassociate thread with a namespace
|
||||
setns(fd, ns_type = CLONE_NEWNS | CLONE_NEWUTS);
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
// Disassociate parts of the process execution context
|
||||
unshare(flags = CLONE_FILES | CLONE_FS | CLONE_NEWNS | CLONE_NEWUTS | CLONE_THREAD | CLONE_SIGHAND | CLONE_VM);
|
||||
|
|
@ -57,6 +57,17 @@ Supported functionality in SCML:
|
|||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/connect.2.html).
|
||||
|
||||
### `accept` and `accept4`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include accept_and_accept4.scml}}
|
||||
```
|
||||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/accept.2.html).
|
||||
|
||||
## Socket Communication
|
||||
|
||||
### `sendto`, `sendmsg` and `sendmmsg`
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
struct sockaddr = {
|
||||
sa_family = AF_INET | AF_UNIX | AF_VSOCK,
|
||||
..
|
||||
};
|
||||
|
||||
// Accept an incoming connection
|
||||
accept(
|
||||
sockfd, addr = <sockaddr>, addrlen
|
||||
);
|
||||
|
||||
// Accept an incoming connection and set flags for the new socket
|
||||
accept4(
|
||||
sockfd, addr = <sockaddr>, addrlen,
|
||||
flags = SOCK_NONBLOCK | SOCK_CLOEXEC
|
||||
);
|
||||
|
|
@ -1,2 +1,11 @@
|
|||
// Get socket name
|
||||
getsockname(sockfd, addr, addrlen);
|
||||
|
||||
// Get name of connected peer socket
|
||||
getpeername(sockfd, addr, addrlen);
|
||||
|
||||
// Listen for connections on a socket
|
||||
listen(sockfd, backlog);
|
||||
|
||||
// Shut down part of a full-duplex connection
|
||||
shutdown(sockfd, how = SHUT_RD | SHUT_WR | SHUT_RDWR);
|
||||
|
|
|
|||
|
|
@ -42,12 +42,12 @@ Ignored options:
|
|||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/wait4.2.html).
|
||||
|
||||
### `clone`
|
||||
### `clone` and `clone3`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include clone.scml}}
|
||||
{{#include clone_and_clone3.scml}}
|
||||
```
|
||||
|
||||
For more information,
|
||||
|
|
@ -66,3 +66,17 @@ Unsupported policies or flags:
|
|||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/sched_setscheduler.2.html).
|
||||
|
||||
### `waitid`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include waitid.scml}}
|
||||
```
|
||||
|
||||
Ignored options:
|
||||
* `WEXITED`
|
||||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/waitid.2.html).
|
||||
|
|
@ -45,3 +45,12 @@ clone(
|
|||
flags = <opt_flags> | <signal_flags>,
|
||||
func_arg, ..
|
||||
);
|
||||
|
||||
// Create a thread or process with enhanced control by providing structured arguments
|
||||
clone3(
|
||||
clone_args = {
|
||||
flags = <opt_flags>,
|
||||
..
|
||||
},
|
||||
size
|
||||
);
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
// Execute program
|
||||
execve(pathname, argv, envp);
|
||||
|
||||
// Execute program relative to a directory file descriptor
|
||||
execveat(dirfd, path, argv, envp, flags = AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW);
|
||||
|
||||
// Exit all threads in a process
|
||||
exit_group(status);
|
||||
|
||||
|
|
@ -54,6 +57,9 @@ sched_yield();
|
|||
// Create a child process
|
||||
fork();
|
||||
|
||||
// Create a child process and block parent
|
||||
vfork();
|
||||
|
||||
// Terminate the calling process
|
||||
exit(status);
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
// Wait for a child process to change state
|
||||
waitid(
|
||||
which = P_PID | P_PIDFD | P_PGID | P_ALL,
|
||||
pid, infop,
|
||||
options = WNOHANG | WSTOPPED | WCONTINUED | WNOWAIT,
|
||||
ru
|
||||
);
|
||||
|
|
@ -47,6 +47,9 @@ Supported functionality in SCML:
|
|||
{{#include timer_create.scml}}
|
||||
```
|
||||
|
||||
Partially-supported clock IDs:
|
||||
* `CLOCK_BOOTTIME` is treated as `CLOCK_MONOTONIC`
|
||||
|
||||
Unsupported predefined clock IDs:
|
||||
* `CLOCK_REALTIME_ALARM`
|
||||
* `CLOCK_BOOTTIME_ALARM`
|
||||
|
|
@ -57,3 +60,35 @@ Unsupported notification methods:
|
|||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/timer_create.2.html).
|
||||
|
||||
### `timerfd_create`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include timerfd_create.scml}}
|
||||
```
|
||||
|
||||
Partially-supported clock IDs:
|
||||
* `CLOCK_BOOTTIME` is treated as `CLOCK_MONOTONIC`
|
||||
|
||||
Unsupported predefined clock IDs:
|
||||
* `CLOCK_REALTIME_ALARM`
|
||||
* `CLOCK_BOOTTIME_ALARM`
|
||||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/timerfd_create.2.html).
|
||||
|
||||
### `timerfd_settime`
|
||||
|
||||
Supported functionality in SCML:
|
||||
|
||||
```c
|
||||
{{#include timerfd_settime.scml}}
|
||||
```
|
||||
|
||||
Ignored flags:
|
||||
* `TFD_TIMER_CANCEL_ON_SET`
|
||||
|
||||
For more information,
|
||||
see [the man page](https://man7.org/linux/man-pages/man2/timerfd_create.2.html).
|
||||
|
|
@ -1,6 +1,12 @@
|
|||
// Get value of an interval timer
|
||||
getitimer(which, value);
|
||||
|
||||
// Set an alarm clock for delivery of a signal
|
||||
alarm(seconds);
|
||||
|
||||
// Set value of an interval timer
|
||||
setitimer(which, value, ovalue);
|
||||
|
||||
// Return from signal handler and cleanup stack frame
|
||||
rt_sigreturn(arg);
|
||||
|
||||
|
|
@ -10,6 +16,9 @@ kill(pid, sig);
|
|||
// Send signal to a thread
|
||||
tgkill(tgid, tid, sig);
|
||||
|
||||
// Send signal to the target process referred to by pidfd
|
||||
pidfd_send_signal(pidfd, sig, info, flags = PIDFD_SIGNAL_THREAD | PIDFD_SIGNAL_THREAD_GROUP | PIDFD_SIGNAL_PROCESS_GROUP);
|
||||
|
||||
// Wait for signal
|
||||
pause();
|
||||
|
||||
|
|
@ -36,3 +45,13 @@ time(tloc);
|
|||
|
||||
// Synchronously wait for a signal with a timeout
|
||||
rt_sigtimedwait(set, info, timeout, sigsetsize);
|
||||
|
||||
// Arm or disarm a POSIX per-process timer
|
||||
timer_settime(timer_id, flags, new_setting, old_setting);
|
||||
|
||||
struct stack_t = {
|
||||
sp, flags = SS_AUTODISARM | SS_ONSTACK | SS_DISABLE, size
|
||||
};
|
||||
|
||||
// Set and/or get signal stack context
|
||||
sigaltstack(stack = <stack_t>, old_stack = <stack_t>);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ opt_notify_methods = SIGEV_NONE | SIGEV_SIGNAL | SIGEV_THREAD_ID;
|
|||
|
||||
// Create a timer with predefined clock source
|
||||
timer_create(
|
||||
clockid = CLOCK_PROCESS_CPUTIME_ID | CLOCK_THREAD_CPUTIME_ID | CLOCK_REALTIME | CLOCK_MONOTONIC | CLOCK_BOOTTIME,
|
||||
clockid = CLOCK_PROCESS_CPUTIME_ID | CLOCK_THREAD_CPUTIME_ID | CLOCK_REALTIME | CLOCK_MONOTONIC,
|
||||
sevp = {
|
||||
sigev_notify = <opt_notify_methods>,
|
||||
..
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
// Create a timer file descriptor with a predefined clock source
|
||||
timerfd_create(
|
||||
clockid = CLOCK_REALTIME | CLOCK_MONOTONIC,
|
||||
flags = TFD_CLOEXEC | TFD_NONBLOCK
|
||||
);
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
// Arm or disarm a timer file descriptor
|
||||
timerfd_settime(
|
||||
ufd,
|
||||
flags = TFD_TIMER_ABSTIME,
|
||||
utmr,
|
||||
otmr
|
||||
);
|
||||
|
|
@ -63,7 +63,6 @@ Unsupported `op` flags:
|
|||
* `LINUX_REBOOT_CMD_CAD_OFF`
|
||||
* `LINUX_REBOOT_CMD_CAD_ON`
|
||||
* `LINUX_REBOOT_CMD_KEXEC`
|
||||
* `LINUX_REBOOT_CMD_RESTART`
|
||||
* `LINUX_REBOOT_CMD_RESTART2`
|
||||
* `LINUX_REBOOT_CMD_SW_SUSPEND`
|
||||
|
||||
|
|
|
|||
|
|
@ -16,3 +16,6 @@ sethostname(name, size);
|
|||
|
||||
// Set Network Information Service (NIS) domain name
|
||||
setdomainname(name, size);
|
||||
|
||||
// Sleep for the specified duration
|
||||
nanosleep(duration, remain);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ reboot_magic2 = LINUX_REBOOT_MAGIC2 | LINUX_REBOOT_MAGIC2A | LINUX_REBOOT_MAGIC2
|
|||
reboot(
|
||||
magic = LINUX_REBOOT_MAGIC1,
|
||||
magic2 = <reboot_magic2>,
|
||||
op = LINUX_REBOOT_CMD_HALT | LINUX_REBOOT_CMD_POWER_OFF,
|
||||
op = LINUX_REBOOT_CMD_HALT | LINUX_REBOOT_CMD_POWER_OFF | LINUX_REBOOT_CMD_RESTART,
|
||||
arg
|
||||
);
|
||||
);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ Therefore, it is recommended to use a Docker image to deploy the environment.
|
|||
Run a TDX Docker container:
|
||||
|
||||
```bash
|
||||
docker run -it --privileged --network=host --device=/dev/kvm asterinas/osdk:0.17.0-20251213
|
||||
docker run -it --privileged --network=host --device=/dev/kvm asterinas/osdk:0.17.0-20260114
|
||||
```
|
||||
|
||||
## Edit `OSDK.toml` for Intel TDX support
|
||||
|
|
@ -50,8 +50,8 @@ For example, you can append the following TDX-specific scheme to your `OSDK.toml
|
|||
supported_archs = ["x86_64"]
|
||||
boot.method = "grub-qcow2"
|
||||
grub.mkrescue_path = "~/tdx-tools/grub"
|
||||
grub.protocol = "linux"
|
||||
qemu.args = """\
|
||||
grub.boot_protocol = "linux"
|
||||
qemu.args = '''\
|
||||
-accel kvm \
|
||||
-m 8G \
|
||||
-vga none \
|
||||
|
|
@ -60,11 +60,12 @@ qemu.args = """\
|
|||
-drive file=target/osdk/asterinas/asterinas.qcow2,if=virtio,format=qcow2 \
|
||||
-monitor telnet:127.0.0.1:9001,server,nowait \
|
||||
-bios /root/ovmf/release/OVMF.fd \
|
||||
-object '{ \"qom-type\": \"tdx-guest\", \"id\": \"tdx0\", \"sept-ve-disable\": true, \"quote-generation-socket\": { \"type\": \"vsock\", \"cid\": \"2\", \"port\": \"4050\" } }' \
|
||||
-cpu host,-kvm-steal-time,pmu=off \
|
||||
-machine q35,kernel-irqchip=split,confidential-guest-support=tdx0 \
|
||||
-smp 1 \
|
||||
-nographic \
|
||||
"""
|
||||
'''
|
||||
```
|
||||
|
||||
To choose the configurations specified by the TDX scheme over the default ones,
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ init_args = ["sh", "-l"] # <11>
|
|||
initramfs = "path/to/it" # <12>
|
||||
[grub] # <13>
|
||||
mkrescue_path = "path/to/it" # <14>
|
||||
protocol = "multiboot2" # <15>
|
||||
boot_protocol = "multiboot2" # <15>
|
||||
display_grub_menu = false # <16>
|
||||
[qemu] # <17>
|
||||
path = "path/to/it" # <18>
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
# Before You Contribute
|
||||
|
||||
This part of the Book provides guidelines for contributing to Asterinas.
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
{ disable-systemd ? "false", stage-2-hook ? "/bin/sh -l", log-level ? "error"
|
||||
, console ? "hvc0", test-command ? "", extra-substituters ? ""
|
||||
, extra-trusted-public-keys ? "", pkgs ? import <nixpkgs> { } }:
|
||||
, console ? "hvc0", extra-substituters ? "", extra-trusted-public-keys ? ""
|
||||
, config-file-name ? "configuration.nix", pkgs ? import <nixpkgs> { } }:
|
||||
let
|
||||
aster-kernel = builtins.path {
|
||||
name = "aster-nix-osdk-bin";
|
||||
path = ../../target/osdk/iso_root/boot/aster-nix-osdk-bin;
|
||||
name = "aster-kernel-osdk-bin";
|
||||
path = ../../target/osdk/iso_root/boot/aster-kernel-osdk-bin;
|
||||
};
|
||||
etc-nixos = builtins.path { path = ../etc_nixos; };
|
||||
|
||||
|
|
@ -16,7 +16,6 @@ let
|
|||
aster-stage-2-hook = stage-2-hook;
|
||||
aster-log-level = log-level;
|
||||
aster-console = console;
|
||||
aster-test-command = test-command;
|
||||
aster-substituters = extra-substituters;
|
||||
aster-trusted-public-keys = extra-trusted-public-keys;
|
||||
};
|
||||
|
|
@ -38,7 +37,7 @@ in pkgs.stdenv.mkDerivation {
|
|||
mkdir -p $out/{bin,etc_nixos}
|
||||
cp ${install_aster_nixos} $out/bin/install_aster_nixos.sh
|
||||
cp -L ${aster_configuration} $out/etc_nixos/aster_configuration.nix
|
||||
cp -L ${etc-nixos}/configuration.nix $out/etc_nixos/configuration.nix
|
||||
cp -L ${etc-nixos}/${config-file-name} $out/etc_nixos/configuration.nix
|
||||
cp -r ${etc-nixos}/modules $out/etc_nixos/modules
|
||||
cp -r ${etc-nixos}/overlays $out/etc_nixos/overlays
|
||||
ln -s ${aster-kernel} $out/kernel
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
(import ./overlays/podman/default.nix)
|
||||
(import ./overlays/switch-to-configuration-ng/default.nix)
|
||||
(import ./overlays/systemd/default.nix)
|
||||
(import ./overlays/test-asterinas/default.nix)
|
||||
];
|
||||
|
||||
# The Asterinas NixOS special options.
|
||||
|
|
@ -64,11 +63,6 @@
|
|||
default = "@aster-console@";
|
||||
description = "The console device.";
|
||||
};
|
||||
test-command = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "@aster-test-command@";
|
||||
description = "The test command.";
|
||||
};
|
||||
break-into-stage-1-shell = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ cleanup() {
|
|||
}
|
||||
trap cleanup EXIT INT TERM ERR
|
||||
|
||||
cp $CONFIG_PATH ${BUILD_DIR}/etc/nixos
|
||||
cp $CONFIG_PATH ${BUILD_DIR}/etc/nixos/configuration.nix
|
||||
cp @aster-configuration@ ${BUILD_DIR}/etc/nixos/aster_configuration.nix
|
||||
cp -r @aster-etc-nixos@/modules ${BUILD_DIR}/etc/nixos
|
||||
cp -r @aster-etc-nixos@/overlays ${BUILD_DIR}/etc/nixos
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ pkgs ? import <nixpkgs> { }, test-command ? "", extra-substituters ? ""
|
||||
{ pkgs ? import <nixpkgs> { }, extra-substituters ? ""
|
||||
, extra-trusted-public-keys ? "", ... }:
|
||||
let
|
||||
installer = pkgs.callPackage ../aster_nixos_installer {
|
||||
inherit test-command extra-substituters extra-trusted-public-keys;
|
||||
inherit extra-substituters extra-trusted-public-keys;
|
||||
};
|
||||
nixos = pkgs.nixos (import "${installer}/etc_nixos/configuration.nix");
|
||||
cachixPkgs = with nixos.pkgs;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ config, lib, pkgs, options, ... }:
|
||||
let
|
||||
kernel = builtins.path {
|
||||
name = "aster-nix-osdk-bin";
|
||||
name = "aster-kernel-osdk-bin";
|
||||
path = config.aster_nixos.kernel;
|
||||
};
|
||||
stage-1-init = pkgs.writeShellScript "stage-1-init" ''
|
||||
|
|
@ -74,15 +74,6 @@ in {
|
|||
${config.aster_nixos.stage-2-hook}
|
||||
fi
|
||||
'';
|
||||
# Execute test-command on hvc0 console after boot if the test-command is
|
||||
# not empty (for CI testing).
|
||||
environment.loginShellInit =
|
||||
lib.mkIf ("${config.aster_nixos.test-command}" != "") ''
|
||||
if [ "$(tty)" = "/dev/hvc0" ]; then
|
||||
${config.aster_nixos.test-command}
|
||||
poweroff
|
||||
fi
|
||||
'';
|
||||
# Suppress error and warning messages of systemd.
|
||||
# TODO: Fix errors and warnings from systemd and remove this setting.
|
||||
environment.sessionVariables = { SYSTEMD_LOG_LEVEL = "crit"; };
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
final: prev: {
|
||||
test-asterinas = prev.stdenv.mkDerivation {
|
||||
name = "test-asterinas";
|
||||
version = "0.1.0";
|
||||
|
||||
src = ./.;
|
||||
|
||||
installPhase = ''
|
||||
install -m755 -D $src/test-nix-commands.sh $out/bin/test-nix-commands
|
||||
install -m755 -D $src/test-podman.sh $out/bin/test-podman
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
set -e
|
||||
|
||||
# Test nix-env
|
||||
nix-env -iA nixos.hello
|
||||
hello
|
||||
nix-env -e hello
|
||||
|
||||
# Test nix-shell
|
||||
nix-shell -p hello --command hello
|
||||
|
||||
# Test nix-build
|
||||
nix-build "<nixpkgs>" -A hello
|
||||
./result/bin/hello
|
||||
|
||||
# Test nixos-rebuild
|
||||
sed -i "s/environment.systemPackages = with pkgs; \[ test-asterinas \];/environment.systemPackages = with pkgs; \[ test-asterinas hello \];/" \
|
||||
/etc/nixos/configuration.nix
|
||||
nixos-rebuild test
|
||||
# Clean the hash cache to use the hello installed by nixos-rebuild
|
||||
hash -r
|
||||
hello
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
set -e
|
||||
|
||||
CONTAINER_NAME=c1
|
||||
IMAGE_NAME=docker.io/library/alpine
|
||||
|
||||
podman run --name=${CONTAINER_NAME} ${IMAGE_NAME} ls /etc \
|
||||
| grep -q "^alpine-release" \
|
||||
|| (echo "Test 'podman run' failed" && exit 1)
|
||||
podman image ls \
|
||||
| grep -q ${IMAGE_NAME} \
|
||||
|| (echo "Test 'podman image ls' failed" && exit 1)
|
||||
podman ps -a \
|
||||
| grep -q "Exited (0)" \
|
||||
|| (echo "Test 'podman ps -a' failed" && exit 1)
|
||||
podman rm ${CONTAINER_NAME} || (echo "Test 'podman rm' failed" && exit 1)
|
||||
|
||||
echo "Test podman succeeds"
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
{ pkgs ? import <nixpkgs> { }, autoInstall ? false, test-command ? ""
|
||||
, extra-substituters ? "", extra-trusted-public-keys ? "", version ? "", ... }:
|
||||
{ pkgs ? import <nixpkgs> { }, autoInstall ? false, extra-substituters ? ""
|
||||
, config-file-name ? "configuration.nix", extra-trusted-public-keys ? ""
|
||||
, version ? "", ... }:
|
||||
let
|
||||
installer = pkgs.callPackage ../aster_nixos_installer {
|
||||
inherit test-command extra-substituters extra-trusted-public-keys;
|
||||
inherit extra-substituters extra-trusted-public-keys config-file-name;
|
||||
};
|
||||
configuration = {
|
||||
imports = [
|
||||
|
|
|
|||
|
|
@ -1,73 +1,73 @@
|
|||
[package]
|
||||
name = "aster-nix"
|
||||
name = "aster-kernel"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
edition.workspace = true
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
align_ext = { path = "../ostd/libs/align_ext" }
|
||||
aster-input = { path = "comps/input" }
|
||||
aster-block = { path = "comps/block" }
|
||||
aster-network = { path = "comps/network" }
|
||||
aster-cmdline = { path = "comps/cmdline" }
|
||||
aster-console = { path = "comps/console" }
|
||||
aster-framebuffer = { path = "comps/framebuffer" }
|
||||
aster-softirq = { path = "comps/softirq" }
|
||||
aster-logger = { path = "comps/logger" }
|
||||
aster-mlsdisk = { path = "comps/mlsdisk" }
|
||||
aster-time = { path = "comps/time" }
|
||||
aster-virtio = { path = "comps/virtio" }
|
||||
aster-rights = { path = "libs/aster-rights" }
|
||||
aster-systree = { path = "comps/systree" }
|
||||
aster-i8042 = { path = "comps/i8042" }
|
||||
component = { path = "libs/comp-sys/component" }
|
||||
controlled = { path = "libs/comp-sys/controlled" }
|
||||
logo-ascii-art = { path = "libs/logo-ascii-art" }
|
||||
osdk-frame-allocator = { path = "../osdk/deps/frame-allocator" }
|
||||
osdk-heap-allocator = { path = "../osdk/deps/heap-allocator" }
|
||||
ostd = { path = "../ostd" }
|
||||
typeflags = { path = "libs/typeflags" }
|
||||
typeflags-util = { path = "libs/typeflags-util" }
|
||||
aster-rights-proc = { path = "libs/aster-rights-proc" }
|
||||
aster-util = { path = "libs/aster-util" }
|
||||
aster-bigtcp = { path = "libs/aster-bigtcp" }
|
||||
atomic-integer-wrapper = { path = "libs/atomic-integer-wrapper" }
|
||||
device-id = { path = "libs/device-id" }
|
||||
id-alloc = { path = "../ostd/libs/id-alloc" }
|
||||
int-to-c-enum = { path = "libs/int-to-c-enum" }
|
||||
jhash = { path = "libs/jhash" }
|
||||
cpio-decoder = { path = "libs/cpio-decoder" }
|
||||
xarray = { path = "libs/xarray" }
|
||||
intrusive-collections = "0.9.5"
|
||||
paste = "1.0"
|
||||
time = { version = "0.3", default-features = false, features = ["alloc"] }
|
||||
|
||||
# parse elf file
|
||||
xmas-elf = "0.10.0"
|
||||
# data-structures
|
||||
bitflags = "1.3"
|
||||
keyable-arc = { path = "libs/keyable-arc" }
|
||||
# unzip initramfs
|
||||
libflate = { version = "2", default-features = false }
|
||||
core2 = { version = "0.4", default-features = false, features = ["alloc"] }
|
||||
lending-iterator = "0.1.7"
|
||||
spin = "0.9.4"
|
||||
lru = "0.12.3"
|
||||
log = "0.4"
|
||||
bitvec = { version = "1.0", default-features = false, features = ["alloc"] }
|
||||
hashbrown = "0.14"
|
||||
rand = { version = "0.9.2", default-features = false, features = [
|
||||
align_ext.workspace = true
|
||||
aster-bigtcp.workspace = true
|
||||
aster-block.workspace = true
|
||||
aster-cmdline.workspace = true
|
||||
aster-console.workspace = true
|
||||
aster-framebuffer.workspace = true
|
||||
aster-i8042.workspace = true
|
||||
aster-input.workspace = true
|
||||
aster-logger.workspace = true
|
||||
aster-mlsdisk.workspace = true
|
||||
aster-network.workspace = true
|
||||
aster-rights.workspace = true
|
||||
aster-rights-proc.workspace = true
|
||||
aster-softirq.workspace = true
|
||||
aster-systree.workspace = true
|
||||
aster-time.workspace = true
|
||||
aster-uart.workspace = true
|
||||
aster-util.workspace = true
|
||||
aster-virtio.workspace = true
|
||||
atomic-integer-wrapper.workspace = true
|
||||
bitflags.workspace = true
|
||||
bitvec.workspace = true
|
||||
cfg-if.workspace = true
|
||||
component.workspace = true
|
||||
const_format.workspace = true
|
||||
controlled.workspace = true
|
||||
core2.workspace = true
|
||||
cpio-decoder.workspace = true
|
||||
device-id.workspace = true
|
||||
getset.workspace = true
|
||||
hashbrown.workspace = true
|
||||
id-alloc.workspace = true
|
||||
inherit-methods-macro.workspace = true
|
||||
intrusive-collections.workspace = true
|
||||
int-to-c-enum.workspace = true
|
||||
jhash.workspace = true
|
||||
keyable-arc.workspace = true
|
||||
lending-iterator.workspace = true
|
||||
libflate.workspace = true
|
||||
log.workspace = true
|
||||
logo-ascii-art.workspace = true
|
||||
lru.workspace = true
|
||||
osdk-frame-allocator.workspace = true
|
||||
osdk-heap-allocator.workspace = true
|
||||
ostd.workspace = true
|
||||
ostd-pod.workspace = true
|
||||
paste.workspace = true
|
||||
rand = { workspace = true, features = [
|
||||
"small_rng",
|
||||
"std_rng",
|
||||
] }
|
||||
inherit-methods-macro = { git = "https://github.com/asterinas/inherit-methods-macro", rev = "98f7e3e" }
|
||||
getset = "0.1.2"
|
||||
takeable = "0.2.2"
|
||||
cfg-if = "1.0"
|
||||
spin.workspace = true
|
||||
takeable.workspace = true
|
||||
time.workspace = true
|
||||
typeflags.workspace = true
|
||||
typeflags-util.workspace = true
|
||||
xarray.workspace = true
|
||||
xmas-elf.workspace = true
|
||||
zerocopy.workspace = true
|
||||
|
||||
[target.x86_64-unknown-none.dependencies]
|
||||
tdx-guest = { version = "0.2.2", optional = true }
|
||||
tdx-guest = { version = "0.2.4", optional = true }
|
||||
|
||||
[target.riscv64imac-unknown-none-elf.dependencies]
|
||||
riscv = { version = "0.15.0", features = ["s-mode"] }
|
||||
|
|
@ -76,9 +76,9 @@ riscv = { version = "0.15.0", features = ["s-mode"] }
|
|||
loongArch64 = "0.2.5"
|
||||
|
||||
[features]
|
||||
all = ["cvm_guest"]
|
||||
cvm_guest = ["dep:tdx-guest", "ostd/cvm_guest", "aster-virtio/cvm_guest"]
|
||||
default = ["cvm_guest"]
|
||||
coverage = ["ostd/coverage"]
|
||||
cvm_guest = ["dep:tdx-guest", "ostd/cvm_guest", "aster-virtio/cvm_guest"]
|
||||
# By default we use the Sv48 address translation mode.
|
||||
riscv_sv39_mode = ["ostd/riscv_sv39_mode"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,23 @@
|
|||
[package]
|
||||
name = "aster-block"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
edition.workspace = true
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
spin = "0.9.4"
|
||||
ostd = { path = "../../../ostd" }
|
||||
align_ext = { path = "../../../ostd/libs/align_ext" }
|
||||
id-alloc = { path = "../../../ostd/libs/id-alloc" }
|
||||
int-to-c-enum = { path = "../../libs/int-to-c-enum" }
|
||||
aster-util = { path = "../../libs/aster-util" }
|
||||
component = { path = "../../libs/comp-sys/component" }
|
||||
device-id = { path = "../../libs/device-id" }
|
||||
log = "0.4"
|
||||
bitvec = { version = "1.0.1", default-features = false, features = ["alloc"] }
|
||||
align_ext.workspace = true
|
||||
aster-util.workspace = true
|
||||
bitvec.workspace = true
|
||||
component.workspace = true
|
||||
device-id.workspace = true
|
||||
id-alloc.workspace = true
|
||||
int-to-c-enum.workspace = true
|
||||
log.workspace = true
|
||||
ostd.workspace = true
|
||||
ostd-pod.workspace = true
|
||||
spin.workspace = true
|
||||
zerocopy.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ use int_to_c_enum::TryFromInt;
|
|||
use ostd::{
|
||||
Error,
|
||||
mm::{
|
||||
DmaDirection, DmaStream, FrameAllocOptions, HasSize, Infallible, USegment, VmReader,
|
||||
VmWriter,
|
||||
HasSize, Infallible, USegment, VmReader, VmWriter,
|
||||
dma::DmaStream,
|
||||
io_util::{HasVmReaderWriter, VmReaderWriterResult},
|
||||
},
|
||||
sync::{SpinLock, WaitQueue},
|
||||
|
|
@ -394,7 +394,9 @@ pub struct BioSegment {
|
|||
#[derive(Debug)]
|
||||
struct BioSegmentInner {
|
||||
/// Internal DMA slice.
|
||||
// TODO: The direction is currently `FromAndToDevice`. Implement compile-time checking.
|
||||
dma_slice: Slice<Arc<DmaStream>>,
|
||||
direction: BioDirection,
|
||||
/// Whether the segment is allocated from the pool.
|
||||
from_pool: bool,
|
||||
}
|
||||
|
|
@ -444,13 +446,10 @@ impl BioSegment {
|
|||
let bio_segment_inner = target_pool(direction)
|
||||
.and_then(|pool| pool.alloc(nblocks, offset, len))
|
||||
.unwrap_or_else(|| {
|
||||
let segment = FrameAllocOptions::new()
|
||||
.zeroed(false)
|
||||
.alloc_segment(nblocks)
|
||||
.unwrap();
|
||||
let dma_stream = DmaStream::map(segment.into(), direction.into(), false).unwrap();
|
||||
let dma_stream = DmaStream::alloc_uninit(nblocks, false).unwrap();
|
||||
BioSegmentInner {
|
||||
dma_slice: Slice::new(Arc::new(dma_stream), offset..offset + len),
|
||||
direction,
|
||||
from_pool: false,
|
||||
}
|
||||
});
|
||||
|
|
@ -463,10 +462,11 @@ impl BioSegment {
|
|||
/// Constructs a new `BioSegment` with a given `USegment` and the bio direction.
|
||||
pub fn new_from_segment(segment: USegment, direction: BioDirection) -> Self {
|
||||
let len = segment.size();
|
||||
let dma_stream = DmaStream::map(segment, direction.into(), false).unwrap();
|
||||
let dma_stream = DmaStream::map(segment, false).unwrap();
|
||||
Self {
|
||||
inner: Arc::new(BioSegmentInner {
|
||||
dma_slice: Slice::new(Arc::new(dma_stream), 0..len),
|
||||
direction,
|
||||
from_pool: false,
|
||||
}),
|
||||
}
|
||||
|
|
@ -497,10 +497,12 @@ impl BioSegment {
|
|||
&self.inner.dma_slice
|
||||
}
|
||||
|
||||
/// Returns the inner VM segment.
|
||||
/// Returns the inner DMA object.
|
||||
///
|
||||
/// Note that the slicing will be ignored. This is only for testing.
|
||||
#[cfg(ktest)]
|
||||
pub fn inner_segment(&self) -> &USegment {
|
||||
self.inner.dma_slice.mem_obj().segment()
|
||||
pub fn inner_dma(&self) -> &Arc<DmaStream> {
|
||||
self.inner.dma_slice.mem_obj()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -531,11 +533,7 @@ impl Drop for BioSegmentInner {
|
|||
impl BioSegmentInner {
|
||||
/// Returns the bio direction.
|
||||
fn direction(&self) -> BioDirection {
|
||||
match self.dma_slice.mem_obj().direction() {
|
||||
DmaDirection::FromDevice => BioDirection::FromDevice,
|
||||
DmaDirection::ToDevice => BioDirection::ToDevice,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
self.direction
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -569,13 +567,7 @@ impl BioSegmentPool {
|
|||
/// The new pool will be allocated and mapped for later allocation.
|
||||
pub fn new(direction: BioDirection) -> Self {
|
||||
let total_blocks = POOL_DEFAULT_NBLOCKS;
|
||||
let pool = {
|
||||
let segment = FrameAllocOptions::new()
|
||||
.zeroed(false)
|
||||
.alloc_segment(total_blocks)
|
||||
.unwrap();
|
||||
DmaStream::map(segment.into(), direction.into(), false).unwrap()
|
||||
};
|
||||
let pool = DmaStream::alloc_uninit(total_blocks, false).unwrap();
|
||||
let manager = SpinLock::new(PoolSlotManager {
|
||||
occupied: BitArray::ZERO,
|
||||
min_free: 0,
|
||||
|
|
@ -650,6 +642,7 @@ impl BioSegmentPool {
|
|||
};
|
||||
let bio_segment = BioSegmentInner {
|
||||
dma_slice,
|
||||
direction: self.direction,
|
||||
from_pool: true,
|
||||
};
|
||||
Some(bio_segment)
|
||||
|
|
@ -706,15 +699,6 @@ fn target_pool(direction: BioDirection) -> Option<&'static Arc<BioSegmentPool>>
|
|||
}
|
||||
}
|
||||
|
||||
impl From<BioDirection> for DmaDirection {
|
||||
fn from(direction: BioDirection) -> Self {
|
||||
match direction {
|
||||
BioDirection::FromDevice => DmaDirection::FromDevice,
|
||||
BioDirection::ToDevice => DmaDirection::ToDevice,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Checks if the given offset is aligned to sector.
|
||||
pub fn is_sector_aligned(offset: usize) -> bool {
|
||||
offset.is_multiple_of(SECTOR_SIZE)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use core::{
|
|||
ops::{Add, Sub},
|
||||
};
|
||||
|
||||
use ostd::{Pod, const_assert};
|
||||
use ostd::const_assert;
|
||||
|
||||
/// The block index used in the filesystem.
|
||||
pub type Bid = BlockId<BLOCK_SIZE>;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@
|
|||
#![feature(step_trait)]
|
||||
|
||||
extern crate alloc;
|
||||
#[macro_use]
|
||||
extern crate ostd_pod;
|
||||
|
||||
pub mod bio;
|
||||
mod device_id;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use device_id::DeviceId;
|
||||
use ostd::{Pod, mm::VmIo};
|
||||
use ostd::mm::VmIo;
|
||||
use ostd_pod::Pod;
|
||||
|
||||
use crate::{
|
||||
BlockDevice, BlockDeviceMeta, SECTOR_SIZE,
|
||||
|
|
@ -228,7 +229,7 @@ fn parse_gpt(device: &Arc<dyn BlockDevice>) -> Vec<Option<PartitionInfo>> {
|
|||
|
||||
for j in 0..entries_per_sector {
|
||||
let entry_offset = j * gpt.size_of_partition_entry as usize;
|
||||
let entry = GptEntry::from_bytes(&buf[entry_offset..entry_offset + entry_size]);
|
||||
let entry = GptEntry::from_first_bytes(&buf[entry_offset..entry_offset + entry_size]);
|
||||
if entry.is_valid() {
|
||||
partitions.push(Some(PartitionInfo::Gpt(entry)));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
[package]
|
||||
name = "aster-cmdline"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
edition.workspace = true
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
component = { path = "../../libs/comp-sys/component" }
|
||||
ostd = { path = "../../../ostd" }
|
||||
log = "0.4"
|
||||
spin = "0.9.4"
|
||||
component.workspace = true
|
||||
log.workspace = true
|
||||
ostd.workspace = true
|
||||
spin.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
[package]
|
||||
name = "aster-console"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
edition.workspace = true
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
ostd = { path = "../../../ostd" }
|
||||
component = { path = "../../libs/comp-sys/component" }
|
||||
spin = "0.9.4"
|
||||
font8x8 = { version = "0.2.5", default-features = false, features = [ "unicode" ] }
|
||||
int-to-c-enum = { path = "../../libs/int-to-c-enum" }
|
||||
component.workspace = true
|
||||
font8x8.workspace = true
|
||||
int-to-c-enum.workspace = true
|
||||
ostd.workspace = true
|
||||
spin.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
|||
|
|
@ -8,10 +8,7 @@ use font8x8::UnicodeFonts;
|
|||
|
||||
/// A bitmap font.
|
||||
///
|
||||
/// Currently it's mainly used to draw texts on the framebuffer console. See
|
||||
/// [`FramebufferConsole::set_font`].
|
||||
///
|
||||
/// [`FramebufferConsole::set_font`]: crate::FramebufferConsole::set_font
|
||||
/// Currently it's mainly used to draw texts on the framebuffer console.
|
||||
#[derive(Debug)]
|
||||
pub struct BitmapFont {
|
||||
width: usize,
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
[package]
|
||||
name = "aster-framebuffer"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
edition.workspace = true
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
ostd = { path = "../../../ostd" }
|
||||
component = { path = "../../libs/comp-sys/component" }
|
||||
aster-console = { path = "../console" }
|
||||
aster-input = { path = "../input" }
|
||||
log = "0.4"
|
||||
spin = "0.9.4"
|
||||
aster-console.workspace = true
|
||||
aster-input.workspace = true
|
||||
component.workspace = true
|
||||
log.workspace = true
|
||||
ostd.workspace = true
|
||||
spin.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
|||
|
|
@ -213,8 +213,7 @@ impl FbConsoleHandler {
|
|||
}
|
||||
KeyCode::CapsLock => {
|
||||
if key_status == KeyStatus::Pressed {
|
||||
let new_caps = !self.caps_lock.load(Ordering::Relaxed);
|
||||
self.caps_lock.store(new_caps, Ordering::Relaxed);
|
||||
self.caps_lock.fetch_xor(true, Ordering::Relaxed);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
[package]
|
||||
name = "aster-i8042"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
edition.workspace = true
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
component = { path = "../../libs/comp-sys/component" }
|
||||
ostd = { path = "../../../ostd" }
|
||||
aster-cmdline.workspace = true
|
||||
aster-input.workspace = true
|
||||
bitflags = "2.5"
|
||||
log = "0.4"
|
||||
spin = "0.9.4"
|
||||
aster-input = { path = "../input" }
|
||||
aster-cmdline = { path = "../cmdline" }
|
||||
component.workspace = true
|
||||
ostd.workspace = true
|
||||
log.workspace = true
|
||||
spin.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue