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: <8f9ec1f7-f1d6-2c4c-952f-69a706dce1f6@linux.vnet.ibm.com>
Date:   Wed, 21 Dec 2016 18:48:36 +0530
From:   Hari Bathini <hbathini@...ux.vnet.ibm.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     ast@...com, peterz@...radead.org,
        lkml <linux-kernel@...r.kernel.org>, acme@...nel.org,
        alexander.shishkin@...ux.intel.com, mingo@...hat.com,
        daniel@...earbox.net, rostedt@...dmis.org,
        Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>,
        ebiederm@...ssion.com, sargun@...gun.me,
        Aravinda Prasad <aravinda@...ux.vnet.ibm.com>,
        brendan.d.gregg@...il.com
Subject: Re: [PATCH v4 2/3] perf tool: add PERF_RECORD_NAMESPACES to include
 namespaces related info

Hi Jiri,


On Saturday 17 December 2016 11:10 PM, Jiri Olsa wrote:
> On Fri, Dec 16, 2016 at 12:07:20AM +0530, Hari Bathini wrote:
>
> SNIP
>
>> +
>> +int thread__set_namespaces(struct thread *thread, u64 timestamp,
>> +			   struct namespaces_event *event)
>> +{
>> +	struct namespaces *new, *curr = thread__namespaces(thread);
>> +
>> +	new = namespaces__new(event);
>> +	if (!new)
>> +		return -ENOMEM;
>> +
>> +	list_add(&new->list, &thread->namespaces_list);
>> +
>> +	if (timestamp && curr) {
>> +		/*
>> +		 * setns syscall must have changed few or all the namespaces
>> +		 * of this thread. Update end time for the namespaces
>> +		 * previously used.
>> +		 */
>> +		curr = list_next_entry(new, list);
>> +		curr->end_time = timestamp;
> hi,
> couldn't you use just the curr you got from thread__namespaces?
> why to retrieve it again via 'new' pointer?
>

Adding the new namespaces info to the list while keeping the old ones
along with the change timestamp to retain the multiple changes made
for the namespaces of each thread.

Thanks
Hari

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ