raphael / linux-samus

Linux 4.16 on Chromebook Pixel 2015
GNU General Public License v2.0
181 stars 36 forks source link

Allow overlayfs to be mounted from unprivileged user namespaces #176

Closed cernekee closed 7 years ago

cernekee commented 7 years ago

In upstream Linux, unprivileged user namespaces aren't allowed to mount overlay filesystems. But for several years Ubuntu has carried a local kernel patch that allows it, and some container use cases (e.g. certain LXC configurations or vpnns) depend on this capability. AIUI some other distributions, such as SUSE, also apply this change.

This patch adds it back to the samus kernel.

Full disclosure: there have been a number of security holes related to overlayfs + namespaces. Omitting this patch might improve security relative to the stock Ubuntu kernels, at the expense of breaking some functionality.

raphael commented 7 years ago

Thank you for the PR, the Linux directory is generated when building releases so patching a file in this directory is not going to work. The right way to do this would be to tweak the build.sh in the scripts directory to patch the file in $LINUX prior to building. There was a patch.sh script that build.sh was invoking prior to v4.9-1 that would do the patching for sound support - adding it back might be the cleanest approach.

raphael commented 7 years ago

Closing this for now.