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]
Date:	Wed, 2 Jan 2013 18:07:07 +0100
From:	Stephane Eranian <eranian@...gle.com>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	"mingo@...e.hu" <mingo@...e.hu>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Namhyung Kim <namhyung.kim@....com>
Subject: Re: [PATCH v4 01/18] perf, x86: Support CPU specific sysfs events

On Wed, Jan 2, 2013 at 3:04 PM, Jiri Olsa <jolsa@...hat.com> wrote:
> On Thu, Dec 20, 2012 at 04:41:31PM +0100, Stephane Eranian wrote:
>> From: Andi Kleen <ak@...ux.intel.com>
>>
>> Add a way for the CPU initialization code to register additional events,
>> and merge them into the events attribute directory. Used in the next
>> patch.
>>
>> Signed-off-by: Andi Kleen <ak@...ux.intel.com>
>> ---
>>  arch/x86/kernel/cpu/perf_event.c |   29 +++++++++++++++++++++++++++++
>>  arch/x86/kernel/cpu/perf_event.h |    1 +
>>  2 files changed, 30 insertions(+)
>>
>> diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
>> index 4428fd1..83f4c1a 100644
>> --- a/arch/x86/kernel/cpu/perf_event.c
>> +++ b/arch/x86/kernel/cpu/perf_event.c
>> @@ -1341,6 +1341,30 @@ static void __init filter_events(struct attribute **attrs)
>>       }
>>  }
>>
>> +/* Merge two pointer arrays */
>> +static __init struct attribute **merge_attr(struct attribute **a,
>> +                                         struct attribute **b)
>> +{
>> +     struct attribute **new;
>> +     int j, i;
>> +
>> +     for (j = 0; a[j]; j++)
>> +             ;
>> +     for (i = 0; b[i]; i++)
>> +             j++;
>> +     j++;
>> +     new = kmalloc(sizeof(struct attribute *) * j, GFP_KERNEL);
>> +     if (!new)
>> +             return a;
>
> not likely to happen, but still.. do we want proper error handling?
>
Ok, will fix the error path from Andi's patch.
Thanks.

> other than that the patch looks ok to me
>
> jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ