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: <7d5b53dd-2e86-da0e-a7b6-9dd94ebcb49c@huawei.com>
Date:   Thu, 8 Feb 2018 15:31:24 +0000
From:   John Garry <john.garry@...wei.com>
To:     Alan Cox <gnomes@...rguk.ukuu.org.uk>, Jiri Olsa <jolsa@...hat.com>
CC:     <peterz@...radead.org>, <mingo@...hat.com>, <acme@...nel.org>,
        <alexander.shishkin@...ux.intel.com>, <namhyung@...nel.org>,
        <ak@...ux.intel.com>, <wcohen@...hat.com>, <will.deacon@....com>,
        <ganapatrao.kulkarni@...ium.com>, <linux-kernel@...r.kernel.org>,
        <linuxarm@...wei.com>, <zhangshaokun@...ilicon.com>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 5/9] perf utils: add support for arch standard events

On 08/02/2018 14:02, Alan Cox wrote:
> On Thu, 8 Feb 2018 14:54:23 +0100
> Jiri Olsa <jolsa@...hat.com> wrote:
>
>> On Wed, Feb 07, 2018 at 01:45:00AM +0800, John Garry wrote:
>>
>> SNIP
>>
>>>  static void print_events_table_suffix(FILE *outfp)
>>>  {
>>>  	fprintf(outfp, "{\n");
>>> @@ -407,6 +469,52 @@ static char *real_event(const char *name, char *event)
>>>  	return event;
>>>  }
>>>
>>> +static void fixup_field(char *from, char **to)
>>> +{
>>> +	*to = malloc(strlen(from));
>>> +
>>> +	strcpy(*to, from);
>>> +}
>>
>> could you just call '*to = strdup(from)' in here?

Right

>
> And check for malloc returning NULL.
>

Right again,

> Alan
>

I should have concentrated on the coding as much as the feature being 
added...

Thanks,
John
> .
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ