mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 23:03:57 -04:00
kernel/ksysfs.c: export kernel cpu byteorder
Certain files in procfs are formatted in byteorder-dependent formats. For example the IP addresses in /proc/net/udp. When using emulation like qemu-user, applications are not guaranteed to be using the same byteorder as the kernel. Therefore the kernel needs to provide a way for applications to discover the byteorder used in API-filesystems. Using systemcalls is not enough because these are intercepted and translated by the emulation. Also this makes it easier for non-compiled applications like shellscripts to discover the byteorder. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20221103152407.3348-1-linux@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
52c4d11f1d
commit
d3d76fbde1
12
Documentation/ABI/testing/sysfs-kernel-cpu_byteorder
Normal file
12
Documentation/ABI/testing/sysfs-kernel-cpu_byteorder
Normal file
@@ -0,0 +1,12 @@
|
||||
What: /sys/kernel/cpu_byteorder
|
||||
Date: February 2023
|
||||
KernelVersion: 6.2
|
||||
Contact: Thomas Weißschuh <linux@weissschuh.net>
|
||||
Description:
|
||||
The endianness of the running kernel.
|
||||
|
||||
Access: Read
|
||||
|
||||
Valid values:
|
||||
"little", "big"
|
||||
Users: util-linux
|
||||
Reference in New Issue
Block a user