hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/Documentation/process/adding-syscalls.rst
....@@ -1,3 +1,6 @@
1
+
2
+.. _addsyscalls:
3
+
14 Adding a New System Call
25 ========================
36
....@@ -30,7 +33,7 @@
3033 to a somewhat opaque API.
3134
3235 - If you're just exposing runtime system information, a new node in sysfs
33
- (see ``Documentation/filesystems/sysfs.txt``) or the ``/proc`` filesystem may
36
+ (see ``Documentation/filesystems/sysfs.rst``) or the ``/proc`` filesystem may
3437 be more appropriate. However, access to these mechanisms requires that the
3538 relevant filesystem is mounted, which might not always be the case (e.g.
3639 in a namespaced/sandboxed/chrooted environment). Avoid adding any API to
....@@ -232,7 +235,7 @@
232235 by the option.
233236 - Make the option depend on EXPERT if it should be hidden from normal users.
234237 - Make any new source files implementing the function dependent on the CONFIG
235
- option in the Makefile (e.g. ``obj-$(CONFIG_XYZZY_SYSCALL) += xyzzy.c``).
238
+ option in the Makefile (e.g. ``obj-$(CONFIG_XYZZY_SYSCALL) += xyzzy.o``).
236239 - Double check that the kernel still builds with the new CONFIG option turned
237240 off.
238241
....@@ -538,9 +541,9 @@
538541 :manpage:`syscall(2)` man-page:
539542 http://man7.org/linux/man-pages/man2/syscall.2.html#NOTES
540543 - Collated emails from Linus Torvalds discussing the problems with ``ioctl()``:
541
- http://yarchive.net/comp/linux/ioctl.html
544
+ https://yarchive.net/comp/linux/ioctl.html
542545 - "How to not invent kernel interfaces", Arnd Bergmann,
543
- http://www.ukuug.org/events/linux2007/2007/papers/Bergmann.pdf
546
+ https://www.ukuug.org/events/linux2007/2007/papers/Bergmann.pdf
544547 - LWN article from Michael Kerrisk on avoiding new uses of CAP_SYS_ADMIN:
545548 https://lwn.net/Articles/486306/
546549 - Recommendation from Andrew Morton that all related information for a new