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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <000001d1e94d$c24dfea0$46e9fbe0$@hitachi.com>
Date:	Fri, 29 Jul 2016 13:00:34 +0900
From:	"Tomoki Sekiyama" <tomoki.sekiyama.qu@...achi.com>
To:	"'Masami Hiramatsu'" <mhiramat@...nel.org>
Cc:	<linux-kernel@...r.kernel.org>,
	<ltc-kernel@...ml.intra.hitachi.co.jp>,
	森谷真寿美 / MORITANI,MASUMI 
	<masumi.moritani.ju@...achi.com>, "Jiri Olsa" <jolsa@...nel.org>,
	"David Ahern" <dsahern@...il.com>,
	"Namhyung Kim" <namhyung@...nel.org>,
	"Peter Zijlstra" <a.p.zijlstra@...llo.nl>
Subject: RE: [PATCH v2] perf sched: fix wrong conversion of task state

Hi Hiramatsu-san,

On 2016/7/28, 2016 8:43, Masami Hiramatsu wrote:
> Hmm, this includes several fixes and enhancements.
> 1. Use first bit of the state instead of state itself (critical bug to
avoid crash?)
> 2. Check the range of the array and return '?' if out (minor bug, it can
access data area)
> 3. Fix TASK_STATE_TO_CHAR_STR to swap X and Z.
> 4. Add new 'N+' to TASK_STATE_TO_CHAR_STR. (how about 'n'?)
> 5. Treat a preempted task as THREAD_WAIT_CPU.
>
> so IMHO, it is better to split this patch into atleast 2, #1 and #2
(critical bugfix),
> #3, #4, and #5 (minor update).

This time I will fix only the invalid array access and
adapting to the current kernel TASK_STATE, and leave the
preempted task handling for later follow-up.

 [..]
>> @@ -897,9 +898,10 @@ static int thread_atoms_insert(struct perf_sched
*sched, struct thread *thread)
>> +	return bit < sizeof(str) - 1 ? str[bit] : '?';
>
> You'd better use ARRAY_SIZE(str) instead of sizeof() for array here.

OK, will change this to use ARRAY_SIZE on the next update.

Thanks,
Tomoki Sekiyama

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ