Skip to content

Add forbid(unsafe) to every library crate that can currently support it #1355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2025

Conversation

smalis-msft
Copy link
Contributor

@smalis-msft smalis-msft commented May 14, 2025

Just brute forcing this, there's almost certainly more cleanup that can be done to reduce unsafe code elsewhere. After this PR the following crates are the only ones that do not have #![forbid(unsafe_code)] or #![expect(unsafe_code)] at the top level in their lib.rs file:

flowey/flowey_core
openhcl/build_info
openhcl/diag_server
openhcl/lower_vtl_permissions_guard
openhcl/underhill_mem
openhcl/virt_mshv_vtl
openvmm/membacking
support/cache_topology
support/mesh/mesh_channel
support/mesh/mesh_channel_core
support/mesh/mesh_node
support/mesh/mesh_remote
support/mesh/mesh_worker
support/pal/pal_async
support/pal
support/sev_guest_device
support/tdx_guest_device
support/uevent
support/unix_socket
support/vmsocket
tmk/tmk_tests
vm/devices/get/get_protocol
vm/devices/net/net_consomme/consomme
vm/devices/net/net_tap
vm/devices/storage/block_crypto
vm/devices/support/fs/fuse
vm/devices/support/fs/lx
vm/devices/support/fs/lxutil
vm/devices/user_driver_emulated_mock
vm/devices/virtio/virtio
vm/devices/virtio/virtiofs
vm/page_pool_alloc
vm/vmgs/vmgs
vmm_core/virt

@smalis-msft smalis-msft requested review from a team as code owners May 14, 2025 16:51
@smalis-msft smalis-msft enabled auto-merge (squash) May 14, 2025 17:21
@smalis-msft smalis-msft merged commit 5149939 into microsoft:main May 14, 2025
28 checks passed
@smalis-msft smalis-msft deleted the forbid-unsafe-everywhere branch May 14, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants