Re: [PATCH 1/1] arch:hexagon/powerpc: use KSYM_NAME_LEN in array size

2023-06-18 Thread Miguel Ojeda
On Wed, May 31, 2023 at 1:14 AM Kees Cook wrote: > > On Mon, May 29, 2023 at 04:50:45PM +0200, Miguel Ojeda wrote: > > Kees: what is the current stance on `[static N]` parameters? Something like: > > > > const char *kallsyms_lookup(unsigned long addr, > > unsign

Re: [PATCH 1/1] arch:hexagon/powerpc: use KSYM_NAME_LEN in array size

2023-05-30 Thread Kees Cook
On Mon, May 29, 2023 at 04:50:45PM +0200, Miguel Ojeda wrote: > Kees: what is the current stance on `[static N]` parameters? Something like: > > const char *kallsyms_lookup(unsigned long addr, > unsigned long *symbolsize, > unsign

RE: [PATCH 1/1] arch:hexagon/powerpc: use KSYM_NAME_LEN in array size

2023-05-30 Thread Maninder Singh
Hi Peter, > > The best solution would be to pass the buffer size as an extra > parameter. Especially when some code passes buffers that are > allocated/reserved dynamically. > > Sigh, I am not sure how many changes it would require in kallsyms > API and all the callers. But it would be really app

Re: [PATCH 1/1] arch:hexagon/powerpc: use KSYM_NAME_LEN in array size

2023-05-30 Thread Petr Mladek
On Mon 2023-05-29 16:50:45, Miguel Ojeda wrote: > On Mon, May 29, 2023 at 1:08 PM Maninder Singh > wrote: > > > > I Will add co-developed-by` tag. > > because this change was identified while we were working on kallsyms some > > time back. > > https://lore.kernel.org/lkml/yontol4zc4cyt...@infrad

Re: [PATCH 1/1] arch:hexagon/powerpc: use KSYM_NAME_LEN in array size

2023-05-29 Thread Miguel Ojeda
On Mon, May 29, 2023 at 1:08 PM Maninder Singh wrote: > > I Will add co-developed-by` tag. > because this change was identified while we were working on kallsyms some > time back. > https://lore.kernel.org/lkml/yontol4zc4cyt...@infradead.org/t/ > > this patch set is pending and we will start work

RE: [PATCH 1/1] arch:hexagon/powerpc: use KSYM_NAME_LEN in array size

2023-05-29 Thread Maninder Singh
Hi, >> >> kallsyms_lookup which in turn calls for kallsyms_lookup_buildid() >> writes on index "KSYM_NAME_LEN - 1". >> >> Thus array size should be KSYM_NAME_LEN. >> >> for powerpc and hexagon it was defined as "128" directly. >> and commit '61968dbc2d5d' changed define value to 512, >> So both we

Re: [PATCH 1/1] arch:hexagon/powerpc: use KSYM_NAME_LEN in array size

2023-05-29 Thread Miguel Ojeda
On Mon, May 29, 2023 at 7:44 AM Maninder Singh wrote: > > kallsyms_lookup which in turn calls for kallsyms_lookup_buildid() > writes on index "KSYM_NAME_LEN - 1". > > Thus array size should be KSYM_NAME_LEN. > > for powerpc and hexagon it was defined as "128" directly. > and commit '61968dbc2d5d'

[PATCH 1/1] arch:hexagon/powerpc: use KSYM_NAME_LEN in array size

2023-05-28 Thread Maninder Singh
kallsyms_lookup which in turn calls for kallsyms_lookup_buildid() writes on index "KSYM_NAME_LEN - 1". Thus array size should be KSYM_NAME_LEN. for powerpc and hexagon it was defined as "128" directly. and commit '61968dbc2d5d' changed define value to 512, So both were missed to update with new s