aws / aws/aws-nitro-enclaves-cli
Allocator service triggers EINVAL error in dmesg
- Dominant language
- Rust
- Stars
- 156
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
This piece of code https://github.com/aws/aws-nitro-enclaves-cli/blame/main/bootstrap/nitro-enclaves-allocator#L129-L138 is called every time the allocator service is started.
It writes an empty string to /sys/module/nitro_enclaves/parameters/ne_cpus. The driver however doesn't know how to interpret this empty string (see https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/virt/nitro_enclaves/ne_misc_dev.c#n431) so it tries to allocate this invalid cpu pool, fails, then prints EINVAL to dmesg.
Everything works perfectly fine however, so no actual issue just that seeing errors in dmesg is super confusing when debugging other stuff.
Edit: this is not an issue with nitro-cli, just with the driver.
Contributor guide
Research direction
Inspect bootstrap/nitro-enclaves-allocator around lines 129-138 and the linked Linux driver code at ne_misc_dev.c around line 431. Start by reproducing allocator service startup and checking dmesg; done means startup no longer produces the confusing EINVAL message, noting that the requested driver change is outside nitro-cli.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux, shell
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100