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: <5f902ab4-c156-8011-7cbc-8706cc96489f@linux.ibm.com>
Date:   Wed, 26 Aug 2020 17:03:19 +0530
From:   kajoljain <kjain@...ux.ibm.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     acme@...nel.org, ak@...ux.intel.com, yao.jin@...ux.intel.com,
        linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
        irogers@...gle.com, maddy@...ux.ibm.com,
        ravi.bangoria@...ux.ibm.com
Subject: Re: [RFC] perf/jevents: Add new structure to pass json fields.



On 8/26/20 4:27 PM, Jiri Olsa wrote:
> On Tue, Aug 25, 2020 at 01:10:41PM +0530, Kajol Jain wrote:
> 
> SNIP
> 
>>  	}
>>  }
>>  
>> -static int save_arch_std_events(void *data, char *name, char *event,
>> -				char *desc, char *long_desc, char *pmu,
>> -				char *unit, char *perpkg, char *metric_expr,
>> -				char *metric_name, char *metric_group,
>> -				char *deprecated, char *metric_constraint)
>> +static int save_arch_std_events(void *data, struct json_event *je)
>>  {
>>  	struct event_struct *es;
>>  
>> @@ -485,11 +476,8 @@ static char *real_event(const char *name, char *event)
>>  }
>>  
>>  static int
>> -try_fixup(const char *fn, char *arch_std, char **event, char **desc,
>> -	  char **name, char **long_desc, char **pmu, char **filter,
>> -	  char **perpkg, char **unit, char **metric_expr, char **metric_name,
>> -	  char **metric_group, unsigned long long eventcode,
>> -	  char **deprecated, char **metric_constraint)
>> +try_fixup(const char *fn, char *arch_std, unsigned long long eventcode,
>> +	  struct json_event *je)
>>  {
>>  	/* try to find matching event from arch standard values */
>>  	struct event_struct *es;
>> @@ -498,8 +486,7 @@ try_fixup(const char *fn, char *arch_std, char **event, char **desc,
>>  		if (!strcmp(arch_std, es->name)) {
>>  			if (!eventcode && es->event) {
>>  				/* allow EventCode to be overridden */
>> -				free(*event);
>> -				*event = NULL;
>> +				je->event = NULL;
> 
> should you free je->event in here?

Sure, I will add that.

Thanks,
Kajol Jain
> 
> jirka
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ