microsoft / microsoft/WSL

Enable relevant XZ decoding options in kernel by default

Open
#11,658 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
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.**
Modern distributions (e.g. RH) enable
CONFIG_XZ_DEC_X86=y
CONFIG_XZ_DEC_POWERPC=y
CONFIG_XZ_DEC_IA64=y
CONFIG_XZ_DEC_ARM=y
CONFIG_XZ_DEC_ARMTHUMB=y
CONFIG_XZ_DEC_SPARC=y
CONFIG_XZ_DEC_BCJ=y
in their kernel configuration.
This allows them to mount squashfs filesystems created anywhere.
Default WSL kernel returns IO error with a 'helpful' message of
```
[ 1454.847511] SQUASHFS error: xz decompression failed, data probably corrupt
[ 1454.847907] SQUASHFS error: Failed to read block 0x5c3cb5e: -5
```
recompiling the WSL kernel with above settings fixes the problem.

**Describe the solution you'd like**
Enabling the kernel compilation options is a low-cost solution not leading to code bloat and allows to process various squashfs entries with default WSL kernel.

**Describe alternatives you've considered**
given that squashfs may come from any source, alternative is to unpack squashfs with userlevel tools before using.
squashfs could have high compression ratios, resulting in unneededly high disk usage.

**Additional context**
none

Thanks.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the WSL kernel configuration and the existing SquashFS/XZ settings. Enable the listed CONFIG_XZ_DEC_* options, build the kernel, and verify that SquashFS images using the relevant XZ filters can be mounted without the reported decompression error.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.