-
Notifications
You must be signed in to change notification settings - Fork 856
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
Enable CONFIG_IKHEADERS=m in WSL kernel #5526
Comments
I like this suggestion, I will see about adding this support. Looks like 4.19 does not support this config flag, but we are moving to 5.4 "soon". |
Heads up archivemount, at least as a thought experiment if not an entirely serious proposal. Given that the idea of a cross-distro |
@benhillis stupid question. I have the git branch for 4.19.104-microsoft-standard built. What are the steps for copying the kernel headers to to a linux-headers-4.19.104-microsoft-standard directory for bpf tools? Ubuntu20.04 if it matters. |
Figured it out. Aww yeah ... BPF tools under WSL2 🥳
|
Any progress on this issue now that 5.4 is way further along? |
Any progress on this issue since 5.10 was released for some time? |
Wondering this myself |
@benhillis Can we get an update of this proposal? It's a trivial (as far as i understand it) change that'll lower the bar for entry to the already complicated enough world of eBPF programming. |
Let's moving forward on this, there are lots of user scenarios requiring linux-headers. Most of them are following some scripts or tech blogs asking e.g. #11942 #11596 #11557 #10967 #10913 #10069 (comment) #7437 #6650 #6635 #4132 #4128 #3235 #2649 #2363 It would be great to take advantage of github actions in https://github.com/microsoft/WSL2-Linux-Kernel that build headers at release. For those who have to built headers themselves and lost in many dup issues.
We need to update config
|
* Enable kernel headers through /sys/kernel/kheaders.tar.xz feature. * Enable trim unused exported kernel symbols feature. * Enable multipath TCP and support IPv6 too. * Related from microsoft/WSL#5526 and Locietta/xanmod-kernel-WSL2#64. Signed-off-by: Yang Jeong Hun <[email protected]>
* Enable kernel headers through /sys/kernel/kheaders.tar.xz feature. * Enable trim unused exported kernel symbols feature. * Enable multipath TCP and support IPv6 too. * Related from microsoft/WSL#5526 and Locietta/xanmod-kernel-WSL2#64. Signed-off-by: Yang Jeong Hun <[email protected]>
Is your feature request related to a problem? Please describe.
I'm using BPF to build profiling tools. This depends on having kernel headers that match the currently running kernel. However, there's (of course) no -headers package in debian for the MS kernel. I can probably pull the kernel source from github and use those headers but this a bit of a pain.
Describe the solution you'd like
Modern kernels can be packaged with the headers as a kernel module using CONFIG_IKHEADERS=m. This is the simplest way to make sure there's headers available that are in sync with the running kernel, esp if that kernel is distributed outside of the distribution I'm running.
Describe alternatives you've considered
I could maybe try to run a stock kernel (this works in WSL2, yes?), or download the headers, but that seems more error prone than the proposal.
Additional context
N/A
The text was updated successfully, but these errors were encountered: