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

Should Android use linux_raw by default? #1095

Open
sunfishcode opened this issue Jul 24, 2024 · 1 comment
Open

Should Android use linux_raw by default? #1095

sunfishcode opened this issue Jul 24, 2024 · 1 comment

Comments

@sunfishcode
Copy link
Member

#1090 proposes to switch the default backend on Android from libc to linux_raw. I myself don't have enough context to determine whether this is a good idea. I'm opening this issue in case anyone who sees this has any insight to add.

@maurer
Copy link

maurer commented Aug 13, 2024

As a data point, in the platform, we use the libc backend explicitly. Changing the default won't cause us any trouble, but we chose to do it this way because:

  1. It makes it possible to automatically use newer syscalls on newer platforms. For example, open will use openat, but on older systems, it would use open directly. This means that using libc allows you to get new kernel features as they're available, rather than being stuck with the lowest common denominator of system call options of all the devices you want to target.
  2. There are various sanitizer and tracking tools that plug into bionic. Continuing with the open example, fdtrack is implemented inside bionic - by using the system calls directly, code using Rustix will be hidden from these. Opting out of them is fine, but I would expect most folks to want interaction to work by default.
  3. That's the ABI we actually require to work. We don't technically require that OEMs ship Linux, that's just by far the easiest way to meet the requirements. libc on the other hand has to work, and has a defined stable ABI. This one is likely of less interest to you, since in practice, nearly every Android device runs Linux.

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

No branches or pull requests

2 participants