Skip to content
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

lxc: Only add /dev/ashmem to config_nodes when it exists #672

Merged
merged 1 commit into from Jan 15, 2023

Conversation

JamiKettunen
Copy link
Contributor

@JamiKettunen JamiKettunen commented Jan 4, 2023

This hasn't existed in mainline Linux kernels since v5.18 and trying to always mount it regardless just adds to the noise in waydroid log in most cases, so simply don't add it to config_nodes unless it actually exists.

Silences the following:

lxc-start: waydroid: ../src/lxc/utils.c: safe_mount: 1221 No such file or directory - Failed to mount "/dev/ashmem" onto "/usr/lib/lxc/rootfs/dev/ashmem"

@JamiKettunen JamiKettunen force-pushed the no-ashmem-log-spam branch 2 times, most recently from 84287c2 to 4065e26 Compare January 4, 2023 00:23
@cniw
Copy link
Contributor

cniw commented Jan 4, 2023

Fixes: #661

@JamiKettunen
Copy link
Contributor Author

JamiKettunen commented Jan 4, 2023

Hm I now wonder if helpers.drivers.probeAshmemDriver(args) should be called before make_entry("/dev/ashmem") so it could be potentially picked up during the config creation in case the module wasn't already probed, or if there is any other way this could be silenced on systems where ashmem is irrelevant

@aleasto
Copy link
Member

aleasto commented Jan 8, 2023

Hm I now wonder if helpers.drivers.probeAshmemDriver(args) should be called before make_entry("/dev/ashmem") so it could be potentially picked up during the config creation in case the module wasn't already probed

Yeah do that.
Discussion in AOSP seems to be moving towards enabling sys.use_memfd by default but also keep ashmem to support applications that use /dev/ashmem directly

This hasn't existed in mainline Linux kernels since v5.18 and trying to
always mount it regardless just adds to the noise in "waydroid log" in
most cases, so simply don't add it to config_nodes unless it actually
exists.

Silences the following:

  lxc-start: waydroid: ../src/lxc/utils.c: safe_mount: 1221 No such file or directory - Failed to mount "/dev/ashmem" onto "/usr/lib/lxc/rootfs/dev/ashmem"
@aleasto
Copy link
Member

aleasto commented Jan 15, 2023

works

@aleasto aleasto merged commit 8f6570b into waydroid:main Jan 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants