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:   Thu, 28 Oct 2021 06:32:04 +0800
From:   Tao Zhou <tao.zhou@...ux.dev>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Daniel Bristot de Oliveira <bristot@...nel.org>,
        Ingo Molnar <mingo@...hat.com>,
        Tom Zanussi <zanussi@...nel.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Clark Williams <williams@...hat.com>,
        John Kacur <jkacur@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        linux-rt-users@...r.kernel.org, linux-trace-devel@...r.kernel.org,
        linux-kernel@...r.kernel.org, Tao Zhou <tao.zhou@...ux.dev>
Subject: Re: [PATCH V6 11/20] rtla/osnoise: Add the hist mode

Hi Steven,

On Wed, Oct 27, 2021 at 02:29:18PM -0400, Steven Rostedt wrote:

> On Thu, 28 Oct 2021 02:11:24 +0800
> Tao Zhou <tao.zhou@...ux.dev> wrote:
> 
> > > +	/* one histogram for IRQ and one for thread, per cpu */
> > > +	for (cpu = 0; cpu < nr_cpus; cpu++) {
> > > +		data->hist[cpu].samples = calloc(1, sizeof(*data->hist) * (entries + 1));  
> > 
> > @samples is a pointer to int and used for int array. The "sizeof(*data->hist)"
> > should be "sizeof(int)" or am I totally wrong.
> 
> Or standard approach is: 
> 
> 		data->hist[cpu].samples = calloc(1, sizeof(*data->hist->samples) * (entries + 1));

Right, thanks. I am not totally waken up now. Ha.


> -- Steve



Thanks,
Tao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ