Re: [PATCH 1/5] kallsyms: pass buffer size in sprint_* APIs

2022-05-22 Thread Andy Shevchenko
On Fri, May 20, 2022 at 03:52:01PM -0400, Waiman Long wrote: > On 5/20/22 04:36, Maninder Singh wrote: ... > > - sprint_symbol(sym, addr); > > + sprint_symbol(sym, KSYM_SYMBOL_LEN, addr); > > Instead of hardcoding KSYM_SYMBOL_LEN everywhere, will it better to hide it > like

Re: [PATCH 1/5] kallsyms: pass buffer size in sprint_* APIs

2022-05-20 Thread Waiman Long
On 5/20/22 04:36, Maninder Singh wrote: As of now sprint_* APIs don't pass buffer size as an argument and use sprintf directly. To replace dangerous sprintf API to scnprintf, buffer size is required in arguments. Co-developed-by: Onkarnath Signed-off-by: Onkarnath Signed-off-by: Maninder

[PATCH 1/5] kallsyms: pass buffer size in sprint_* APIs

2022-05-20 Thread Maninder Singh
As of now sprint_* APIs don't pass buffer size as an argument and use sprintf directly. To replace dangerous sprintf API to scnprintf, buffer size is required in arguments. Co-developed-by: Onkarnath Signed-off-by: Onkarnath Signed-off-by: Maninder Singh --- arch/s390/lib/test_unwind.c|