Page MenuHomeFreeBSD

Reduce duplication in dynamic syscall registration code.
ClosedPublic

Authored by brooks on Feb 12 2018, 10:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 11:50 AM
Unknown Object (File)
Dec 20 2023, 12:44 AM
Unknown Object (File)
Sep 30 2023, 9:01 AM
Unknown Object (File)
Aug 28 2023, 10:43 AM
Unknown Object (File)
Aug 28 2023, 10:41 AM
Unknown Object (File)
Aug 28 2023, 10:37 AM
Unknown Object (File)
Aug 28 2023, 10:21 AM
Unknown Object (File)
Aug 8 2023, 2:57 PM
Subscribers

Details

Summary

Remove the unused syscall_(de)register() functions in favor of the
better documented and easier to use syscall_helper_(un)register(9)
functions.

The default and freebsd32 versions differed in which array of struct
sysents they used so code was entierly duplicated.

Diff Detail

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

Event Timeline

Comments below are mostly just observations of differences between the forked versions of these routines. Probably accidental divergence rather than intentional.

sys/kern/kern_syscalls.c
133–134 ↗(On Diff #39225)

This KASSERT was not present in the old syscall32_register, FWIW.

136 ↗(On Diff #39225)

This assignment was not present in syscall32_register.

144 ↗(On Diff #39225)

old_sysent could be const struct sysent *.

152–154 ↗(On Diff #39225)

This logic (check for static + drain) was not present in the syscall32_deregister.

177 ↗(On Diff #39225)

flags was always SY_THR_STATIC_KLD in syscall32 version

This revision is now accepted and ready to land.Feb 14 2018, 5:37 AM
This revision was automatically updated to reflect the committed changes.