Messages in this thread | | | From | Miguel Ojeda <> | Date | Mon, 14 Feb 2022 15:04:47 +0100 | Subject | Re: [PATCH v4 12/20] vsprintf: add new `%pA` format specifier |
| |
On Mon, Feb 14, 2022 at 12:37 PM David Laight <David.Laight@aculab.com> wrote: > > Doesn't that stand a reasonable chance of blowing the kernel stack? > > vsnprintf() is likely to be on the 'worst case' stack path anyway. > Anything vaguely like a recursive call, or anything 'stack expensive' > inside vsnprintf() stands a real chance of overflowing the stack.
There should be no recursion going on, but stack usage could be a concern depending on what the formatted types attempt to do (thus we need to be mindful when implementing `Display`) and what the compiler could possibly generate on a worst case (Gary, bjorn3 et. al. may want to give details about this).
Cheers, Miguel
| |