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, 01 Oct 2014 11:18:48 +0900
From:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Fengguang Wu <fengguang.wu@...el.com>,
	Ingo Molnar <mingo@...nel.org>, Jet Chen <jet.chen@...el.com>,
	Su Tao <tao.su@...el.com>, Yuanhan Liu <yuanhan.liu@...el.com>,
	LKP <lkp@...org>, linux-kernel@...r.kernel.org
Subject: Re: Re: [hw_breakpoint] WARNING: at kernel/trace/trace_kprobe.c:1393
 kprobe_trace_self_tests_init()

(2014/10/01 2:58), Oleg Nesterov wrote:
> Hi Fengguang,
> 
> On 09/30, Fengguang Wu wrote:
>>
>> Hi Oleg,
>>
>> 0day kernel testing robot got the below dmesg and the first bad commit is
>>
>> commit 8b4d801b2b123b6c09742f861fe44a8527b84d47
>> Author:     Oleg Nesterov <oleg@...hat.com>
>> AuthorDate: Thu Jun 20 17:50:06 2013 +0200
>> Commit:     Ingo Molnar <mingo@...nel.org>
>> CommitDate: Thu Jun 20 17:57:00 2013 +0200
>>
>>     hw_breakpoint: Fix cpu check in task_bp_pinned(cpu)
>>
>>     trinity fuzzer triggered WARN_ONCE("Can't find any breakpoint
>>     slot") in arch_install_hw_breakpoint() but the problem is not
>>     arch-specific.
>>
>>     The problem is, task_bp_pinned(cpu) checks "cpu == iter->cpu"
>>     but this doesn't account the "all cpus" events with iter->cpu <
>>     0.
>>
>>     This means that, say, register_user_hw_breakpoint(tsk) can
>>     happily create the arbitrary number > HBP_NUM of breakpoints
>>     which can not be activated. toggle_bp_task_slot() is equally
>>     wrong by the same reason and nr_task_bp_pinned[] can have
>>     negative entries.
>>
>>     Simple test:
>>
>>     	# perl -e 'sleep 1 while 1' &
>>     	# perf record -e mem:0x10,mem:0x10,mem:0x10,mem:0x10,mem:0x10 -p `pidof perl`
>>
>>     Before this patch this triggers the same problem/WARN_ON(),
>>     after the patch it correctly fails with -ENOSPC.
>>
>>     Reported-by: Vince Weaver <vincent.weaver@...ne.edu>
>>     Signed-off-by: Oleg Nesterov <oleg@...hat.com>
>>     Acked-by: Frederic Weisbecker <fweisbec@...il.com>
>>     Cc: <stable@...r.kernel.org>
>>     Link: http://lkml.kernel.org/r/20130620155006.GA6324@redhat.com
>>     Signed-off-by: Ingo Molnar <mingo@...nel.org>
>>
>> +-----------------------------------------------------------------------+------------+------------+------------------+
>> |                                                                       | 003002e04e | 8b4d801b2b | v3.17-rc7_093000 |
>> +-----------------------------------------------------------------------+------------+------------+------------------+
>> | boot_successes                                                        | 60         | 0          | 0                |
>> | boot_failures                                                         | 0          | 20         | 11               |
>> | WARNING:at_kernel/trace/trace_kprobe.c:kprobe_trace_self_tests_init() | 0          | 20         | 11               |
>> | backtrace:kprobe_trace_self_tests_init                                | 0          | 20         | 11               |
>> | backtrace:warn_slowpath_null                                          | 0          | 20         | 11               |
>> | backtrace:kernel_init_freeable                                        | 0          | 20         | 11               |
>> +-----------------------------------------------------------------------+------------+------------+------------------+
>>
>> [    4.188679] Testing kprobe tracing:
>> [    4.189810] Could not insert probe at kprobe_trace_selftest_target+0: -22
> 
> __register_trace_kprobe() fails.
> 
> No, I am very sure this can't be caused by the commit above. If nothing else,
> task_bp_pinned() changed by this commit is not even called in this case.

Uh, right. I'm trying to reproduce this to analyze...

Anyway, I'd like to remove the whole of kprobe_trace selftest from the
kernel binary. Instead of that, we already have ftracetest scripts.
We can run the test after the kernel booted.

Thank you,

-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@...achi.com


--
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