Re: [PATCH] printf: add bad-pointer tests for %ptT and %ptS
From: Andy Shevchenko
Date: Mon Mar 16 2026 - 10:56:08 EST
On Mon, Mar 16, 2026 at 04:43:34PM +0545, Shuvam Pandey wrote:
> The printf KUnit suite exercises valid %ptR, %ptT, and %ptS inputs,
> but it does not cover bad pointers for the time64_t and timespec64
> paths.
>
> Add NULL and low-address pointer cases for %ptT and %ptS. The new
> checks verify that time_and_date() rejects bad pointers before
> dereferencing them and formats them as "(null)" or "(efault)".
>
> Validated with the printf KUnit suite on arm64 QEMU and an
> incremental W=1 build of lib/tests/printf_kunit.o.
NAK.
It has nothing to do with %pt.
--
With Best Regards,
Andy Shevchenko