lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <CDC1FE3A-5513-4EE0-8656-EF388B99D24D@linux.vnet.ibm.com>
Date: Wed, 24 Jul 2024 11:08:02 +0530
From: Athira Rajeev <atrajeev@...ux.vnet.ibm.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Jiri Olsa <jolsa@...nel.org>, Adrian Hunter <adrian.hunter@...el.com>,
        Ian Rogers <irogers@...gle.com>, Namhyung Kim <namhyung@...nel.org>,
        Segher Boessenkool <segher@...nel.crashing.org>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-perf-users <linux-perf-users@...r.kernel.org>,
        linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>, akanksha@...ux.ibm.com,
        Madhavan Srinivasan <maddy@...ux.ibm.com>,
        Kajol Jain <kjain@...ux.ibm.com>,
        Hari Bathini <hbathini@...ux.ibm.com>,
        Disha Goel <disgoel@...ux.vnet.ibm.com>
Subject: Re: [PATCH V8 03/15] tools/perf: Update TYPE_STATE_MAX_REGS to
 include max of regs in powerpc



> On 24 Jul 2024, at 12:36 AM, Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
> 
> On Thu, Jul 18, 2024 at 02:13:46PM +0530, Athira Rajeev wrote:
>> TYPE_STATE_MAX_REGS is arch-dependent. Currently this is defined
>> to be 16. While checking if reg is valid using has_reg_type,
>> max value is checked using TYPE_STATE_MAX_REGS value. Define
>> this conditionally for powerpc.
> 
> So what would happen if I get a perf.data file on a powerpc system and
> then try to do data-type profiling on a x86 system?
> 
> I'm processing this now, but please consider fixing this up in some
> other fashion, I think we have support for collecting registers in a way
> that perf.data has all that is needed for us to print them in a cross
> arch way, no?
> 
> I see there is the FIXME there, ok.
> 
> - Arnaldo
> 

Hi Arnaldo

Sure,  thanks.
>> Reviewed-and-tested-by: Kajol Jain <kjain@...ux.ibm.com>
>> Reviewed-by: Namhyung Kim <namhyung@...nel.org>
>> Signed-off-by: Athira Rajeev<atrajeev@...ux.vnet.ibm.com>
>> ---
>> tools/perf/util/annotate-data.h | 4 ++++
>> 1 file changed, 4 insertions(+)
>> 
>> diff --git a/tools/perf/util/annotate-data.h b/tools/perf/util/annotate-data.h
>> index 6fe8ee8b8410..992b7ce4bd11 100644
>> --- a/tools/perf/util/annotate-data.h
>> +++ b/tools/perf/util/annotate-data.h
>> @@ -189,7 +189,11 @@ struct type_state_stack {
>> };
>> 
>> /* FIXME: This should be arch-dependent */
>> +#ifdef __powerpc__
>> +#define TYPE_STATE_MAX_REGS  32
>> +#else
>> #define TYPE_STATE_MAX_REGS  16
>> +#endif
>> 
>> /*
>>  * State table to maintain type info in each register and stack location.
>> -- 
>> 2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ