Re: [PATCH 2/2] powerpc/xmon: use KSYM_NAME_LEN in array size

2023-08-02 Thread Benjamin Gray
On 30/5/23 10:54 pm, Miguel Ojeda wrote: Side-note: in `get_function_bounds()`, I see `kallsyms_lookup()` being used, but the name seems discarded? Can `kallsyms_lookup_size_offset()` be used instead, thus avoiding the usage of the buffer there to begin with? I'm not familiar with the kallsyms

Re: [PATCH 2/2] powerpc/xmon: use KSYM_NAME_LEN in array size

2023-06-01 Thread Michael Ellerman
Miguel Ojeda writes: > On Thu, Jun 1, 2023 at 4:02 AM Michael Ellerman wrote: >> >> > Side-note: in `get_function_bounds()`, I see `kallsyms_lookup()` being >> > used, but the name seems discarded? Can >> > `kallsyms_lookup_size_offset()` be used instead, thus avoiding the >> > usage of the

Re: [PATCH 2/2] powerpc/xmon: use KSYM_NAME_LEN in array size

2023-06-01 Thread Miguel Ojeda
On Thu, Jun 1, 2023 at 4:02 AM Michael Ellerman wrote: > > > Side-note: in `get_function_bounds()`, I see `kallsyms_lookup()` being > > used, but the name seems discarded? Can > > `kallsyms_lookup_size_offset()` be used instead, thus avoiding the > > usage of the buffer there to begin with? > > A

Re: [PATCH 2/2] powerpc/xmon: use KSYM_NAME_LEN in array size

2023-05-31 Thread Michael Ellerman
Miguel Ojeda writes: > On Mon, May 29, 2023 at 1:14 PM Maninder Singh > wrote: >> >> +static char tmpstr[KSYM_NAME_LEN]; > > Reviewed-by: Miguel Ojeda > > Side-note: in `get_function_bounds()`, I see `kallsyms_lookup()` being > used, but the name seems discarded? Can >

Re: [PATCH 2/2] powerpc/xmon: use KSYM_NAME_LEN in array size

2023-05-30 Thread Miguel Ojeda
On Mon, May 29, 2023 at 1:14 PM Maninder Singh wrote: > > +static char tmpstr[KSYM_NAME_LEN]; Reviewed-by: Miguel Ojeda Side-note: in `get_function_bounds()`, I see `kallsyms_lookup()` being used, but the name seems discarded? Can `kallsyms_lookup_size_offset()` be used instead, thus avoiding

Re: [PATCH 2/2] powerpc/xmon: use KSYM_NAME_LEN in array size

2023-05-30 Thread Michael Ellerman
Maninder Singh writes: > 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 it was defined as "128" directly. > and commit '61968dbc2d5d' changed define value to 512, > So both were

[PATCH 2/2] powerpc/xmon: use KSYM_NAME_LEN in array size

2023-05-29 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 it was defined as "128" directly. and commit '61968dbc2d5d' changed define value to 512, So both were missed to update with new size.