Page MenuHomeFreeBSD

Linux ARM v2 3/9
Needs ReviewPublic

Authored by emaste on Sep 20 2016, 2:01 PM.

Details

Test Plan

Linux ARM : Add syscalls definition from arch/arm/kernel/calls.S (linux sources)

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

soutade_gmail.com retitled this revision from to Linux ARM v2 3/9.
soutade_gmail.com updated this object.
soutade_gmail.com edited the test plan for this revision. (Show Details)
soutade_gmail.com set the repository for this revision to rS FreeBSD src repository.
imp accepted this revision.Sep 20 2016, 3:39 PM
imp added a reviewer: imp.
imp added inline comments.
sys/arm/linux/syscalls.master
677

This is the only unimplemented one that I'm at all worried about.... Have you encountered any programs that use it?

This revision is now accepted and ready to land.Sep 20 2016, 3:39 PM
andrew added inline comments.Sep 29 2016, 5:43 PM
sys/arm/linux/syscalls.master
49–50

This doesn't exist in Linux 2.6.32.

66–67

Also missing in 2.6.32

80–81

Also missing in 2.6.32

102–103

Also missing in 2.6.32

116

Also missing in 2.6.32

128–129

Also missing in 2.6.32

159

Also missing in 2.6.32

202

Also missing in 2.6.32

230

Also missing in 2.6.32

233

Also missing in 2.6.32

295–296

Also missing in 2.6.32

677

This range is also invalid, the syscalls start at 0x0f0000 and not 400

sys/arm/linux/syscalls.master
49–50

It all has been extracted and checked from Linux 4.7.

677

Not for now. Maybe some glibc flush functions could use it, but I'm not sure.

677

This is handled in linux_fetch_syscall_args() to avoid breaking syscall numbering.

andrew added inline comments.Sep 30 2016, 7:30 AM
sys/arm/linux/syscalls.master
49–50

None of the syscalls I pointed out exist in my recent git checkout.

677

In that case a comment would help.

soutade_gmail.com edited edge metadata.

Add more comments for ARM specific syscalls

This revision now requires review to proceed.Sep 30 2016, 8:22 AM
sys/arm/linux/syscalls.master
49–50

They are marked as "sys_ni_syscall", but I decied to use the old value if it exists (for old kernel ABI)

andrew edited edge metadata.Sep 30 2016, 9:13 AM

There are also a few syscalls that were removed when they changed to EABI. I don't see a need for us to support the syscalls userspace will never call.

sys/arm/linux/syscalls.master
49–50

Linux hasn't supported them in a non-development kernel since 2.6. This was released in late 2003.

207

This is wrong, on arm this is the syscall syscall (although it's removed from EABI).

There are also a few syscalls that were removed when they changed to EABI. I don't see a need for us to support the syscalls userspace will never call.

Should we also support OBSOLETE syscalls ? It seems related to OABI.

soutade_gmail.com edited edge metadata.

Remove old Linux syscalls (not presents in Linux calls.S). Add dummy linux_syscall.

andrew added a comment.EditedOct 4 2016, 9:14 AM

Syscalls 13 (time), 22 (umount), 25 (stime), 27 (alarm), 30 (utime), 76 (getrlimir), 82 (select), 89 (readdir), 90 (mmap), 102 (socketcall), 113 (syscall), and 117 (ipc) dont seem to be exported to userspace. I would expect the only things that try calling these with the EABI are malicious.

sys/arm/linux/syscalls.master
290

vm86 should be removed.

294

Why was? It seems to be implemented in Linux.

sys/arm/linux/syscalls.master
290

I forgot it !

294
sys/arm/linux/syscalls.master
294

What about OBSOLETE syscalls ? Keep them or remove them ?

andrew added inline comments.Oct 4 2016, 9:49 AM
sys/arm/linux/syscalls.master
294

OK. I think the same thing, but I wanted to be sure before commit another patch.

Remove obsolete syscalls. Add linux_send() and linux_recv()

andrew accepted this revision.Oct 4 2016, 1:31 PM
andrew edited edge metadata.
This revision is now accepted and ready to land.Oct 4 2016, 1:31 PM
emaste added a subscriber: emaste.Jun 17 2017, 9:04 PM
brooks added a comment.May 1 2019, 5:45 PM

Since this is a new file, you might want to consider formatting it in the new, more readable style used in sys/kern/syscalls.master.

emaste added a comment.May 6 2019, 4:19 PM

We'll also want to switch this to the new style -- see rS347186 for arm64.

emaste added a comment.May 6 2019, 4:54 PM

Oh I see @brooks already mentioned that.

emaste commandeered this revision.May 6 2019, 7:47 PM
emaste updated this revision to Diff 57102.
emaste added a reviewer: soutade_gmail.com.

Reformat arm linux syscalls.master per current style

Equivalent to rS339958 for sys/kern/syscalls.master.

Sponsored by: The FreeBSD Foundation

This revision now requires review to proceed.May 6 2019, 7:47 PM