Page MenuHomeFreeBSD

Make 32-bit system calls end up in svc_handler().
ClosedPublic

Authored by ed on Nov 18 2017, 1:17 PM.
Referenced Files
Unknown Object (File)
Tue, Nov 19, 2:40 AM
Unknown Object (File)
Oct 24 2024, 10:28 AM
Unknown Object (File)
Oct 5 2024, 12:50 PM
Unknown Object (File)
Oct 5 2024, 4:45 AM
Unknown Object (File)
Oct 5 2024, 3:14 AM
Unknown Object (File)
Oct 4 2024, 8:54 PM
Unknown Object (File)
Oct 2 2024, 12:33 PM
Unknown Object (File)
Oct 2 2024, 6:16 AM
Subscribers

Details

Summary

The nice thing about ARM64 is that it's pretty elegant to install
separate trap/exception handlers for 32-bit and 64-bit processes. That
said, for all other architectures (e.g., i386 on amd64) we always let
32-bit counterparts go through the regular system call codepath. Let's
do the same on ARM64.

Test Plan

This change, and others, allow me to run CloudABI ARMv6 and
ARMv7 executables on FreeBSD/arm64.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I split the syncronous exception out into a new handler in my compat32 patch as it allows further sanity checks, e.g. that the kernel thinks the current process should be in 32-bit mode.

I split the syncronous exception out into a new handler in my compat32 patch as it allows further sanity checks, e.g. that the kernel thinks the current process should be in 32-bit mode.

At the cost of duplicating code, right? If we keep the 32-bit compatibility mode as simple as possible, there wouldn't be any strong need for further sanity checks.

Andrew,

Considering that there is no need to split up this into two code paths for 32-bit/64-bit at least for what I'm trying to achieve, would you mind if I went ahead, committing this change as is? Once this change and D13148 land, I can work towards getting the sysent for cloudabi32 committed.

I looked at some of the other operating systems (e.g., Linux) and they seem to take the same approach as what I'm proposing here, making me assume it's not all that bad. If you want, I can add a comment somewhere to state that splitting up into two separate handlers could be considered.

Ed

This revision is now accepted and ready to land.Nov 26 2017, 1:00 PM
This revision was automatically updated to reflect the committed changes.