summaryrefslogtreecommitdiffstats
path: root/man2type
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-08-22 00:49:53 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-08-24 21:05:25 +0200
commit2294974b3a1341e457edb682c08c5f4b2d14675e (patch)
tree7181a411ecb3947c9e9d5a65f04a088e3699b88d /man2type
parente3ad11c9a4542c83324edf549e548767535cae63 (diff)
Many pages: Document fixed-width types with ISO C namingman-pages-6.0-rc1
Kernel __u64 and similar types are ABI-compatible, and mostly API-compatible with ISO C types. User-space programmers don't care about kernel details, and should only use libc types. Document syscalls and structures provided by the Linux kernel as if they used libc types. There's work in the kernel to remove this small API incompatibility, which is only for pointers or printf specifiers. Since I couldn't find any structure that uses pointers, there shouldn't be any issues here. Also, the only pointer I found was in a syscall parameter, but since syscall(2) doesn't check its arguments' types, we're also safe there. This patch doesn't go without controversy. Check the discussions in the links below. Found with: $ grep -rn '\b_*[su][8136][624]*\b' man* \ | grep -v -e /bpf-helpers.7 -e /proc.5 -e /epoll_event.3type -e /wcscmp.3 \ -e /crypt.3 -e /mempcpy.3 -e /memcmp.3 -e /string.3 -e /wcsncmp.3 \ -e /wcscasecmp.3 -e /wmemcmp.3 -e /strcasecmp.3 -e /bcmp.3 \ -e /bstring.3 -e /endian.3 -e /strverscmp.3 -e /wcsncasecmp.3 \ -e /strcoll.3 -e /strcmp.3 \ | tee /dev/tty \ | wc -l; Link: <https://lore.kernel.org/linux-man/20210423230609.13519-1-alx.manpages@gmail.com/T/> Link: <https://lore.kernel.org/lkml/YZvIlz7J6vOEY+Xu@yuki/T/> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> Nacked-by: Alexei Starovoitov <ast@kernel.org> Nacked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Nacked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Zack Weinberg <zackw@panix.com> Cc: LKML <linux-kernel@vger.kernel.org> Cc: glibc <libc-alpha@sourceware.org> Cc: GCC <gcc-patches@gcc.gnu.org> Cc: bpf <bpf@vger.kernel.org> Cc: LTP List <ltp@lists.linux.it> Cc: Linux API <linux-api@vger.kernel.org> Cc: linux-arch <linux-arch@vger.kernel.org> Cc: David Laight <David.Laight@ACULAB.COM> Cc: Joseph Myers <joseph@codesourcery.com> Cc: Florian Weimer <fweimer@redhat.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Cyril Hrubis <chrubis@suse.cz> Cc: David Howells <dhowells@redhat.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Florian Weimer <fweimer@redhat.com> Cc: Rich Felker <dalias@libc.org> Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'man2type')
-rw-r--r--man2type/open_how.2type6
1 files changed, 3 insertions, 3 deletions
diff --git a/man2type/open_how.2type b/man2type/open_how.2type
index 6037f0a01..311feafc3 100644
--- a/man2type/open_how.2type
+++ b/man2type/open_how.2type
@@ -13,9 +13,9 @@ Linux kernel headers
.B #include <linux/openat2.h>
.PP
.B struct open_how {
-.BR " u64 flags;" " /* " O_ "* flags */"
-.BR " u64 mode;" " /* Mode for " O_ { CREAT , TMPFILE "} */"
-.BR " u64 resolve;" " /* " RESOLVE_ "* flags */"
+.BR " uint64_t flags;" " /* " O_ "* flags */"
+.BR " uint64_t mode;" " /* Mode for " O_ { CREAT , TMPFILE "} */"
+.BR " uint64_t resolve;" " /* " RESOLVE_ "* flags */"
/* ... */
.B };
.fi