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)
Fri, Jan 24, 8:40 AM
Unknown Object (File)
Dec 12 2024, 6:46 PM
Unknown Object (File)
Nov 17 2024, 3:11 PM
Unknown Object (File)
Nov 14 2024, 8:59 PM
Unknown Object (File)
Oct 8 2024, 9:20 AM
Unknown Object (File)
Oct 8 2024, 9:20 AM
Unknown Object (File)
Oct 8 2024, 9:20 AM
Unknown Object (File)
Oct 8 2024, 8:35 AM
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.