vanilla-system-operator icon indicating copy to clipboard operation
vanilla-system-operator copied to clipboard

Waydroid/binder module not working

Open TaeHagen opened this issue 2 years ago • 17 comments

Issue Description

I can't use Waydroid at all, setup fails complaining /dev/binderfs/binder-control doesn't exist.

Steps to Reproduce

As far as I can tell, it is caused by using Orchid with IBT enabled (11th gen intel or newer)

On what version of Vanilla OS this happens?

Unreleased

Additional Information

Attempting to mount /dev/binderfs mount crashes with a segfault, dmesg shows a missing endbr instruction. This is a security feature being triggered caused by the binder module not being compiled with the right options, see https://lwn.net/Articles/889475/

At a glance, it would appear the module should be compiled with -fcf-protection=branch, but i'm not sure how that needs to happen, nor if it's anbox's issue or an issue with dkms.

TaeHagen avatar Feb 04 '24 07:02 TaeHagen

This might be a similar issue, I'm facing although I don't have logs Vanilla-OS/desktop-image#111

ghost avatar May 11 '24 12:05 ghost

Make sure that you have secure boot disabled, the module cannot be loaded if it is enabled.

axtloss avatar May 11 '24 12:05 axtloss

I pushed a fix that checks if secure boot is enabled and then raise the proper error. Let me know if the problem persist once the fix is distributed. Feel free to re-open.

mirkobrombin avatar May 11 '24 14:05 mirkobrombin

Re-opening since I now have the same problem on another laptop (with secure boot disabled): image

mirkobrombin avatar May 11 '24 14:05 mirkobrombin

I don't think it has anything to do with secure boot, it's a feature of Intel IBT on 11th gen and later processors. You need to compile the waydroid module with different flags iirc. You can disable IBT via the kernel command line, but that weakens security and isn't a solution.

TaeHagen avatar May 11 '24 19:05 TaeHagen

I've applied the fix proposed by @TaeHagen in desktop-image's vso-waydroid-fcf-protection branch. @mirkobrombin could you try if that solves it for you?

mks-h avatar May 14 '24 14:05 mks-h

You can disable IBT via the kernel command line, but that weakens security and isn't a solution.

@TaeHagen, I assume it works for you when disabling IBT, right?

mks-h avatar May 14 '24 14:05 mks-h

Honestly haven't tried, based on the error I assumed that would fix it.

TaeHagen avatar May 14 '24 14:05 TaeHagen

It would be helpful if you could verify, so that we can know for sure.

mks-h avatar May 14 '24 16:05 mks-h

The proposed fix is included in the new update.

mks-h avatar May 15 '24 12:05 mks-h

I updated to the latest beta version, still getting same error. Is the fix included in the latest build? How do I know I have the fix?

TaeHagen avatar May 15 '24 23:05 TaeHagen

I updated to the latest beta version, still getting same error. Is the fix included in the latest build? How do I know I have the fix?

Hi, are you in a VM in your installation using the vm image? (Seems like a build for it hasn't been triggered, will do it now)

kbdharun avatar May 16 '24 01:05 kbdharun

No, I'm using raw standard hardware (non-nvidia)

TaeHagen avatar May 16 '24 03:05 TaeHagen

I updated to the latest beta version, still getting same error. Is the fix included in the latest build? How do I know I have the fix?

What's the result of abroot status?

mirkobrombin avatar May 16 '24 18:05 mirkobrombin

ABRoot Partitions: • Present: vos-b ✓ • Future: vos-a

Loaded Configuration: /etc/abroot/abroot.json

Device Specifications: • CPU: 11th Gen Intel(R) Core(TM) i5-1155G7 @ 2.50GHz • GPU: [Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] (rev 03)] • Memory: 23827 MB

ABImage: • Digest: sha256:7d3e5bd662a3d22dc27cc93c025d34c021c8d3f6b9f798b9cf068651e6c0cf51 • Timestamp: 2024-05-15 17:36:45 • Image: ghcr.io/vanilla-os/desktop:main

Kernel Arguments: %s quiet splash bgrt_disable $vt_handoff

Packages: • Added: docker.io • Removed: • Unstaged: docker.io There are 1 unstaged packages. Please run 'abroot pkg apply' to apply them.

Package agreement: true

TaeHagen avatar May 19 '24 22:05 TaeHagen

Hi, I am pretty sure this issue is no longer present, I tested Waydroid implementation a few days ago with Secure boot disabled on Intel hardware and it works fine, can you try checking it again?

kbdharun avatar Jul 23 '24 14:07 kbdharun

Sorry, I think there's been a misunderstanding. This issue has nothing to do with secure boot. It affects 11th gen and higher intel chips, regardless of whether secure boot is enabled or not. It is a problem with indirect branch tracking. It has nothing to do with secure boot. IBT can be disabled with a kernel command line argument, but that reduces security.

Thank you!

TaeHagen avatar Jul 23 '24 18:07 TaeHagen