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)
Thu, May 2, 8:32 AM
Unknown Object (File)
Thu, May 2, 1:23 AM
Unknown Object (File)
Sun, Apr 21, 3:28 AM
Unknown Object (File)
Feb 15 2024, 10:29 PM
Unknown Object (File)
Dec 28 2023, 9:40 PM
Unknown Object (File)
Dec 28 2023, 9:40 PM
Unknown Object (File)
Dec 28 2023, 9:39 PM
Unknown Object (File)
Dec 28 2023, 9:28 PM
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.