Go to file
Petr Mladek 37eed892cc vsprintf: Use %p4chR instead of %p4cn for reading data in reversed host ordering
The generic FourCC format always prints the data using the big endian
order. It is generic because it allows to read the data using a custom
ordering.

The current code uses "n" for reading data in the reverse host ordering.
It makes the 4 variants [hnbl] consistent with the generic printing
of IPv4 addresses.

Unfortunately, it creates confusion on big endian systems. For example,
it shows the data &(u32)0x67503030 as

	%p4cn	00Pg (0x30305067)

But people expect that the ordering stays the same. The network ordering
is a big-endian ordering.

The problem is that the semantic is not the same. The modifiers affect
the output ordering of IPv4 addresses while they affect the reading order
in case of FourCC code.

Avoid the confusion by replacing the "n" modifier with "hR", aka
reverse host ordering. It is inspired by the existing %p[mM]R printf
format.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Closes: https://lore.kernel.org/r/CAMuHMdV9tX=TG7E_CrSF=2PY206tXf+_yYRuacG48EWEtJLo-Q@mail.gmail.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Aditya Garg <gargaditya08@live.com>
Link: https://lore.kernel.org/r/20250428123132.578771-1-pmladek@suse.com
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2025-04-29 09:29:33 -04:00
arch bpf-fixes 2025-04-12 12:48:10 -07:00
block treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
certs sign-file,extract-cert: use pkcs11 provider for OPENSSL MAJOR >= 3 2024-09-20 19:52:48 +03:00
crypto This push fixes reverts the multibuffer hash testing as it is buggy. 2025-04-02 09:14:59 -07:00
Documentation vsprintf: Use %p4chR instead of %p4cn for reading data in reversed host ordering 2025-04-29 09:29:33 -04:00
drivers drm/st7571-i2c: select CONFIG_DRM_CLIENT_SELECTION 2025-04-29 12:29:24 +02:00
fs Changes since last update: 2025-04-13 10:52:04 -07:00
include drm/panthor: Add driver IOCTL for setting BO labels 2025-04-23 10:35:35 +02:00
init Miscellaneous scheduler fixes/updates: 2025-04-06 10:44:58 -07:00
io_uring io_uring/kbuf: reject zero sized provided buffers 2025-04-07 07:51:23 -06:00
ipc treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
kernel tracing fixes for v6.15 2025-04-12 15:37:40 -07:00
lib vsprintf: Use %p4chR instead of %p4cn for reading data in reversed host ordering 2025-04-29 09:29:33 -04:00
LICENSES LICENSES: add 0BSD license text 2024-09-01 20:43:24 -07:00
mm Disable SLUB_TINY for build testing 2025-04-06 10:00:04 -07:00
net bpf-fixes 2025-04-12 12:48:10 -07:00
rust Kbuild updates for v6.15 2025-04-05 15:46:50 -07:00
samples treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
scripts lib/vsprintf: Add support for generic FourCCs by extending %p4cc 2025-04-21 10:18:30 -04:00
security mseal sysmap: kernel config and header change 2025-04-01 15:17:14 -07:00
sound soundwire fix for 6.15-rc1 2025-04-06 12:04:53 -07:00
tools memblock: fix build of memblock test 2025-04-13 07:11:33 -07:00
usr kbuild: hdrcheck: fix cross build with clang 2025-03-05 04:06:45 +09:00
virt ARM: 2025-04-08 13:47:55 -07:00
.clang-format drm/vkms: Allow to attach connectors and encoders 2025-03-07 10:58:28 +01:00
.clippy.toml rust: give Clippy the minimum supported Rust version 2025-01-10 00:17:25 +01:00
.cocciconfig
.editorconfig
.get_maintainer.ignore MAINTAINERS: Retire Ralf Baechle 2024-11-12 15:48:59 +01:00
.gitattributes
.gitignore kbuild: Create intermediate vmlinux build with relocations preserved 2025-03-17 00:29:50 +09:00
.mailmap mailmap: add an entry for Nicolas Schier 2025-04-01 15:20:45 -07:00
.rustfmt.toml
COPYING
CREDITS Including fixes from netfilter. 2025-04-04 09:15:35 -07:00
Kbuild drm: ensure drm headers are self-contained and pass kernel-doc 2025-02-12 10:44:43 +02:00
Kconfig io_uring: Rename KConfig to Kconfig 2025-02-19 14:53:27 -07:00
MAINTAINERS MAINTAINERS: add entry for Sitronix ST7571 LCD Controller 2025-04-23 21:47:23 +02:00
Makefile Linux 6.15-rc2 2025-04-13 11:54:49 -07:00
README

Linux kernel

There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first.

In order to build the documentation, use make htmldocs or make pdfdocs. The formatted documentation can also be read online at:

https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory, several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.