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, 7 Apr 2016 01:05:52 +0800
From:	Zhao Lei <zhaolei@...fujitsu.com>
To:	'Srikar Dronamraju' <srikar@...ux.vnet.ibm.com>,
	'Anton Blanchard' <anton@...ba.org>
CC:	'Peter Zijlstra' <peterz@...radead.org>,
	'Ingo Molnar' <mingo@...nel.org>, <tglx@...utronix.de>,
	<efault@....de>, <htejun@...il.com>,
	<linux-kernel@...r.kernel.org>, <tj@...nel.org>,
	<torvalds@...ux-foundation.org>, <yangds.fnst@...fujitsu.com>,
	<hpa@...or.com>, 'Stephen Rothwell' <sfr@...b.auug.org.au>,
	'Michael Ellerman' <mpe@...erman.id.au>,
	<linuxppc-dev@...ts.ozlabs.org>
Subject: RE: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()



> -----Original Message-----
> From: Srikar Dronamraju [mailto:srikar@...ux.vnet.ibm.com]
> Sent: Wednesday, April 06, 2016 9:27 PM
> To: Anton Blanchard <anton@...ba.org>
> Cc: Peter Zijlstra <peterz@...radead.org>; Ingo Molnar <mingo@...nel.org>;
> tglx@...utronix.de; efault@....de; htejun@...il.com;
> linux-kernel@...r.kernel.org; tj@...nel.org; torvalds@...ux-foundation.org;
> zhaolei@...fujitsu.com; yangds.fnst@...fujitsu.com; hpa@...or.com; Stephen
> Rothwell <sfr@...b.auug.org.au>; Michael Ellerman <mpe@...erman.id.au>;
> linuxppc-dev@...ts.ozlabs.org
> Subject: Re: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()
> 
> * Anton Blanchard <anton@...ba.org> [2016-04-06 21:59:50]:
> 
> > Looks good, and the patch below does fix the oops for me.
> >
> > Anton
> > --
> >
> > task_pt_regs() can return NULL for kernel threads, so add a check.
> > This fixes an oops at boot on ppc64.
> >
> > Signed-off-by: Anton Blanchard <anton@...ba.org>
> 
> Works for me too.
> 
> Reported-and-Tested-by: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
> 
Thanks, all

I tested it in the vm(can not boot before fix):

[single cpu]
# for f in cpuacct.*; do echo "$f: "; cat $f; done
cpuacct.stat:
user 260
system 451
cpuacct.usage:
6923456654
cpuacct.usage_percpu:
6963446178
cpuacct.usage_percpu_sys:
2610934362
cpuacct.usage_percpu_user:
4451667140
cpuacct.usage_sys:
2612684054
cpuacct.usage_user:
4540275322
#

[2 cpu wih 8 maxcpus]
# for f in cpuacct.*; do echo "$f: "; cat $f; done
cpuacct.stat:
user 205
system 536
cpuacct.usage:
7293688020
cpuacct.usage_percpu:
3785674990 3551323200 0 0 0 0 0 0
cpuacct.usage_percpu_sys:
2227281124 1635060584 0 0 0 0 0 0
cpuacct.usage_percpu_user:
1567487176 1992278818 0 0 0 0 0 0
cpuacct.usage_sys:
3863445982
cpuacct.usage_user:
3643874038
#

# cat /proc/cpuinfo
processor       : 0
cpu             : POWER7 (raw), altivec supported
clock           : 1000.000000MHz
revision        : 2.3 (pvr 003f 0203)

processor       : 1
cpu             : POWER7 (raw), altivec supported
clock           : 1000.000000MHz
revision        : 2.3 (pvr 003f 0203)

timebase        : 512000000
platform        : pSeries
model           : IBM pSeries (emulated by qemu)
machine         : CHRP IBM pSeries (emulated by qemu)
#

Thanks
Zhaolei

> --
> Thanks and Regards
> Srikar Dronamraju
> 




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ