Need some readonly /proc/sys/vm values on WSL1
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
**Is your feature request related to a problem? Please describe.**
WSL1 currently does not work with qemu. The symptoms are basically the same as termux/termux-packages#6172, with:
```
qemu-i386-static: Unable to reserve 0xfffff000 bytes of virtual address space at 0x1000 (Operation not supported) for use as guest address space (check your virtual memory ulimit setting, min_mmap_addr or reserve less using -R option)
```
This is due to `/proc/sys/vm/mmap_min_addr` not existing, at all.
**Describe the solution you'd like**
Add some readonly values so applications can read them. I know changing them is not something to really expect, but reading is required for a lot of things.
This is the same as @Dakkaron's question in https://github.com/microsoft/WSL/issues/3126#issuecomment-476236942:
> Would it be possible to create that file as read-only with a fitting value in it? I keep getting errors with programs that expect that value to exist, e.g. Elastic Search. I don't care too much about what that value is, but scripts keep crashing because that file does not exist. Maybe just make that file writable but ignored or something.
**Describe alternatives you've considered**
I suppose I could use WSL2 or compile my own qemu. Hyper-V is kept off due to gaming reasons. Building my own qemu or asking my distribution to do a patch does not make sense.
**Additional context**
Linux [hostname] 4.4.0-22621-Microsoft #1610-Microsoft Fri Jan 01 08:00:00 PST 2016 x86_64 GNU/Linux
Contributor guide
Research direction
Start with the WSL1 behavior described for /proc/sys/vm/mmap_min_addr and reproduce the qemu-i386-static failure shown in the issue. Determine which readonly /proc/sys/vm values are required and what fitting values WSL1 can expose; done means applications can read them without expecting writable kernel controls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100