<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/lib/vsprintf.c, branch v7.2-rc1</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Merge tag 'printk-for-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux</title>
<updated>2026-06-17T19:05:20+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-06-17T19:05:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0db1496dcb6621648b007ad0e7d55b876ae0f0bb'/>
<id>0db1496dcb6621648b007ad0e7d55b876ae0f0bb</id>
<content type='text'>
Pull printk updates from Petr Mladek:

 - Add upper case flavor for printing MAC addresses (%p[mM][U]) and use
   it in the nintendo driver

 - Fix matching of hash_pointers= parameter modes

 - Fix size check of vsprintf() field_width and precision values

 - Add check of size returned by vsprintf()

 - Add KUnit test for restricted pointer printing (%pK)

 - Some code cleanup

* tag 'printk-for-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux:
  HID: nintendo: Use %pM format specifier for MAC addresses
  vsprintf: Add upper case flavour to %p[mM]
  lib/vsprintf: replace min_t/max_t with min/max
  printk: fix typos in comments
  lib/vsprintf: Require exact hash_pointers mode matches
  vsprintf: Add test for restricted kernel pointers
  vsprintf: Only export no_hash_pointers to test module
  lib/vsprintf: Limit the returning size to INT_MAX
  lib/vsprintf: Fix to check field_width and precision
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull printk updates from Petr Mladek:

 - Add upper case flavor for printing MAC addresses (%p[mM][U]) and use
   it in the nintendo driver

 - Fix matching of hash_pointers= parameter modes

 - Fix size check of vsprintf() field_width and precision values

 - Add check of size returned by vsprintf()

 - Add KUnit test for restricted pointer printing (%pK)

 - Some code cleanup

* tag 'printk-for-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux:
  HID: nintendo: Use %pM format specifier for MAC addresses
  vsprintf: Add upper case flavour to %p[mM]
  lib/vsprintf: replace min_t/max_t with min/max
  printk: fix typos in comments
  lib/vsprintf: Require exact hash_pointers mode matches
  vsprintf: Add test for restricted kernel pointers
  vsprintf: Only export no_hash_pointers to test module
  lib/vsprintf: Limit the returning size to INT_MAX
  lib/vsprintf: Fix to check field_width and precision
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-7.2-vsprintf-pmM-uppercase' into for-linus</title>
<updated>2026-06-17T06:58:22+00:00</updated>
<author>
<name>Petr Mladek</name>
<email>pmladek@suse.com</email>
</author>
<published>2026-06-17T06:58:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2a706d98d50a28dd635b3d028531d839c1f5f19a'/>
<id>2a706d98d50a28dd635b3d028531d839c1f5f19a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-7.2-vsprintf-size-checks' into for-linus</title>
<updated>2026-06-17T06:58:09+00:00</updated>
<author>
<name>Petr Mladek</name>
<email>pmladek@suse.com</email>
</author>
<published>2026-06-17T06:58:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=809967e0aed09a851ad7e3aa19fd1ac6ec464337'/>
<id>809967e0aed09a851ad7e3aa19fd1ac6ec464337</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>vsprintf: Add upper case flavour to %p[mM]</title>
<updated>2026-06-12T12:20:25+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2026-06-03T10:34:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=76c9ed5b81ea5e9a0837902fbd677f183e0a6df4'/>
<id>76c9ed5b81ea5e9a0837902fbd677f183e0a6df4</id>
<content type='text'>
Some of the (ABI aware) code needs an upper case when printing MAC
addresses. Introduce an extension for that into the existing %p[mM].

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Petr Mladek &lt;pmladek@suse.com&gt;
Link: https://patch.msgid.link/20260603104351.152085-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some of the (ABI aware) code needs an upper case when printing MAC
addresses. Introduce an extension for that into the existing %p[mM].

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Petr Mladek &lt;pmladek@suse.com&gt;
Link: https://patch.msgid.link/20260603104351.152085-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/vsprintf: replace min_t/max_t with min/max</title>
<updated>2026-06-03T11:37:42+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2026-05-18T12:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=26ea7f319a1fe48cfcf0714a5f459443742aca31'/>
<id>26ea7f319a1fe48cfcf0714a5f459443742aca31</id>
<content type='text'>
Use the simpler min()/max() macros since the values are all compatible.

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Link: https://patch.msgid.link/20260518123145.79411-3-thorsten.blum@linux.dev
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the simpler min()/max() macros since the values are all compatible.

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Link: https://patch.msgid.link/20260518123145.79411-3-thorsten.blum@linux.dev
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/vsprintf: Require exact hash_pointers mode matches</title>
<updated>2026-05-26T09:06:12+00:00</updated>
<author>
<name>Kaitao Cheng</name>
<email>chengkaitao@kylinos.cn</email>
</author>
<published>2026-05-19T13:01:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b09b6d0c404d62480dbc23865c763c63598511f5'/>
<id>b09b6d0c404d62480dbc23865c763c63598511f5</id>
<content type='text'>
hash_pointers= accepts a small set of mode strings, but the parser uses
strncmp() with the length of each valid mode.  That accepts values with
trailing garbage, such as hash_pointers=autobots or
hash_pointers=nevermind, as valid aliases for auto and never.

Use strcmp() so that only the documented mode strings are accepted.
Invalid values will continue to fall back to auto through the existing
unknown-mode path.

Signed-off-by: Kaitao Cheng &lt;chengkaitao@kylinos.cn&gt;
Reviewed-by: Petr Mladek &lt;pmladek@suse.com&gt;
Link: https://patch.msgid.link/20260519130117.48097-1-kaitao.cheng@linux.dev
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
hash_pointers= accepts a small set of mode strings, but the parser uses
strncmp() with the length of each valid mode.  That accepts values with
trailing garbage, such as hash_pointers=autobots or
hash_pointers=nevermind, as valid aliases for auto and never.

Use strcmp() so that only the documented mode strings are accepted.
Invalid values will continue to fall back to auto through the existing
unknown-mode path.

Signed-off-by: Kaitao Cheng &lt;chengkaitao@kylinos.cn&gt;
Reviewed-by: Petr Mladek &lt;pmladek@suse.com&gt;
Link: https://patch.msgid.link/20260519130117.48097-1-kaitao.cheng@linux.dev
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vsprintf: Add test for restricted kernel pointers</title>
<updated>2026-05-21T14:04:54+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-05-04T10:43:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4d56efe69decb086796b68826aad2a4eeb9b788d'/>
<id>4d56efe69decb086796b68826aad2a4eeb9b788d</id>
<content type='text'>
Fill out the tests for restricted kernel pointers, using the %pK format.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Reviewed-by: Petr Mladek &lt;pmladek@suse.com&gt;
Tested-by: Petr Mladek &lt;pmladek@suse.com&gt;
Link: https://patch.msgid.link/20260504-restricted-pointers-kunit-test-v2-2-19e8b1c0fbeb@linutronix.de
[pmladek@suse.com: Removed questionable ifdeffery.]
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fill out the tests for restricted kernel pointers, using the %pK format.

Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Reviewed-by: Petr Mladek &lt;pmladek@suse.com&gt;
Tested-by: Petr Mladek &lt;pmladek@suse.com&gt;
Link: https://patch.msgid.link/20260504-restricted-pointers-kunit-test-v2-2-19e8b1c0fbeb@linutronix.de
[pmladek@suse.com: Removed questionable ifdeffery.]
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vsprintf: Only export no_hash_pointers to test module</title>
<updated>2026-05-21T14:01:52+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-05-04T10:43:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d1c9b60b6d7bb6ac973e9fb3f430618ab237ea9b'/>
<id>d1c9b60b6d7bb6ac973e9fb3f430618ab237ea9b</id>
<content type='text'>
Aside from the printf test module, no module should ever use this symbol.

Suggested-by: Petr Mladek &lt;pmladek@suse.com&gt;
Link: https://lore.kernel.org/all/aWpwMyFEfpCNN297@pathway.suse.cz/
Suggested-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/all/aW3em-KplLVofU5z@smile.fi.intel.com/
Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Reviewed-by: Petr Mladek &lt;pmladek@suse.com&gt;
Tested-by: Petr Mladek &lt;pmladek@suse.com&gt;
Link: https://patch.msgid.link/20260504-restricted-pointers-kunit-test-v2-1-19e8b1c0fbeb@linutronix.de
[pmladek@suse.com: Removed questionable ifdeffery.]
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Aside from the printf test module, no module should ever use this symbol.

Suggested-by: Petr Mladek &lt;pmladek@suse.com&gt;
Link: https://lore.kernel.org/all/aWpwMyFEfpCNN297@pathway.suse.cz/
Suggested-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/all/aW3em-KplLVofU5z@smile.fi.intel.com/
Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Reviewed-by: Petr Mladek &lt;pmladek@suse.com&gt;
Tested-by: Petr Mladek &lt;pmladek@suse.com&gt;
Link: https://patch.msgid.link/20260504-restricted-pointers-kunit-test-v2-1-19e8b1c0fbeb@linutronix.de
[pmladek@suse.com: Removed questionable ifdeffery.]
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vsprintf: Revert "add simple_strntoul"</title>
<updated>2026-05-21T07:32:46+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2026-03-31T06:57:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=54d30551e460b74b171a6d4a1b49157999d68247'/>
<id>54d30551e460b74b171a6d4a1b49157999d68247</id>
<content type='text'>
No users anymore and none should be in the first place.

This reverts commit fcc155008a20fa31b01569e105250490750f0687.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://patch.msgid.link/20260331070519.5974-6-ddiss@suse.de
Acked-by: Petr Mladek &lt;pmladek@suse.com&gt;
Reviewed-by: David Disseldorp &lt;ddiss@suse.de&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No users anymore and none should be in the first place.

This reverts commit fcc155008a20fa31b01569e105250490750f0687.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://patch.msgid.link/20260331070519.5974-6-ddiss@suse.de
Acked-by: Petr Mladek &lt;pmladek@suse.com&gt;
Reviewed-by: David Disseldorp &lt;ddiss@suse.de&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/vsprintf: Limit the returning size to INT_MAX</title>
<updated>2026-05-05T08:19:15+00:00</updated>
<author>
<name>Masami Hiramatsu (Google)</name>
<email>mhiramat@kernel.org</email>
</author>
<published>2026-03-26T12:12:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e56185668dc12983dd0e75e38ed6dea98b01d2d2'/>
<id>e56185668dc12983dd0e75e38ed6dea98b01d2d2</id>
<content type='text'>
The return value of vsnprintf() and bstr_printf() can overflow INT_MAX
and return a minus value. In the @size is checked input overflow, but
it does not check the output, which is expected required size.

This should never happen but it should be checked and limited.

Signed-off-by: Masami Hiramatsu (Google) &lt;mhiramat@kernel.org&gt;
Reviewed-by: Petr Mladek &lt;pmladek@suse.com&gt;
Link: https://patch.msgid.link/177452713020.197965.3164174544083829000.stgit@devnote2
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The return value of vsnprintf() and bstr_printf() can overflow INT_MAX
and return a minus value. In the @size is checked input overflow, but
it does not check the output, which is expected required size.

This should never happen but it should be checked and limited.

Signed-off-by: Masami Hiramatsu (Google) &lt;mhiramat@kernel.org&gt;
Reviewed-by: Petr Mladek &lt;pmladek@suse.com&gt;
Link: https://patch.msgid.link/177452713020.197965.3164174544083829000.stgit@devnote2
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
