lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <SYBPR01MB7881F31A023E33A746B0FBFFAFC3A@SYBPR01MB7881.ausprd01.prod.outlook.com>
Date: Fri,  7 Nov 2025 13:16:12 +0800
From: Junrui Luo <moonafterrain@...look.com>
To: linux-kernel@...r.kernel.org
Cc: pmladek@...e.com,
	rostedt@...dmis.org,
	andriy.shevchenko@...ux.intel.com,
	akpm@...ux-foundation.org,
	tiwai@...e.com,
	perex@...ex.cz,
	linux-sound@...r.kernel.org,
	mchehab@...nel.org,
	awalls@...metrocast.net,
	linux-media@...r.kernel.org,
	davem@...emloft.net,
	edumazet@...gle.com,
	kuba@...nel.org,
	pabeni@...hat.com,
	netdev@...r.kernel.org,
	Junrui Luo <moonafterrain@...look.com>
Subject: [PATCH 0/4] Add scnprintf_append() helper 

This patch series was suggested by Takashi Iwai:
https://lore.kernel.org/all/874irai0ag.wl-tiwai@suse.de/

It introduces a generic scnprintf_append() helper function
to lib/vsprintf.c and converts several users across different subsystems.

The pattern of building strings incrementally using strlen() + sprintf/snprintf()
appears frequently throughout the kernel. This helper simplifies such code,
and provides proper bounds checking.

Patch 1 adds the scnprintf_append() helper to the kernel's string library.
This is a common pattern where strings are built incrementally by appending
formatted text.

Patches 2-4 convert users in different subsystems:
- Patch 2: sound/isa/wavefront
- Patch 3: drivers/media/pci/ivtv
- Patch 4: drivers/net/ethernet/qlogic/qede

These conversions demonstrate the helper's applicability.

Junrui Luo (4):
  lib/sprintf: add scnprintf_append() helper function
  ALSA: wavefront: use scnprintf_append for longname construction
  media: ivtv: use scnprintf_append for i2c adapter name
  net: qede: use scnprintf_append for version string

 drivers/media/pci/ivtv/ivtv-i2c.c            |  3 +-
 drivers/net/ethernet/qlogic/qede/qede_main.c |  7 ++--
 include/linux/sprintf.h                      |  1 +
 lib/vsprintf.c                               | 29 +++++++++++++++
 sound/isa/wavefront/wavefront.c              | 37 ++++++++++----------
 5 files changed, 52 insertions(+), 25 deletions(-)

-- 
2.51.1.dirty


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ