Commit Graph

21 Commits

Author SHA1 Message Date
Dominique Martinet
9ec0aeeab5 debug.h: merge both instances into ihk/debug.h
We do not need two debug.h files.

Take Fujitsu's STATIC_ASSERT over BUILD_BUG_ON because it is more used

Change-Id: If04c17fbb7406ab15fe86267fed8d6da460cec62
Fujitsu: POSTK_DEBUG_ARCH_DEP_9
2019-03-01 05:10:35 +00:00
Dominique Martinet
4bdd9cf512 ubsan: remove most sprintf calls
sprintf is implemented as snprintf(..., INT_MAX, ...) which will overflow
the argument pointer for the end, then fix the end to be -1.
This technically works but we know the actual buffer size in all these
call sites, might as well do this properly

Change-Id: I807d09f46a0221f539063fda515e1c504e658d40
2019-02-14 16:44:09 +09:00
Dominique Martinet
3185334c1c debug messages: implement dynamic debug
Heavily inspired off linux kernel's dynamic debug:
 * add a /sys/kernel/debug/dynamic_debug/control file
 (accessible from linux side in /sys/class/mcos/mcos0/sys/kernel/debug/dynamic_debug/control)
 * read from file to list debug statements (currently limited to 4k in size)
 * write to file with '[file foo ][func bar ][line [x][-[y]]] [+-]p' to change values

Side effects:
 * reindented all linker scripts, there is a new __verbose section
 * added string function strpbrk

Change-Id: I36d7707274dcc3ecaf200075a31a2f0f76021059
2018-07-26 14:16:31 +09:00
Dominique Martinet
ad2cb6375a kprintf: only call eventfd() if it is safe to interrupt
Missing ARM64 implementation, cannot test right now

Change-Id: Ia05e8b7952b19bcd8fdac1f920d9bfe341be8b97
2018-07-26 04:57:30 +00:00
Takayuki Okamoto
3bd0137c25 Fix some race condition on arm64
* move barrier() to architecture depended region
* add barrier() in issue_ipi, kprintf, map_virtual
* enable the workaround for cavium thunderx
2017-10-18 09:20:51 +09:00
Masamichi Takagi
5b51eb80a3 Redirect kmsg to /dev/log and detect hungup
1. ihkmond retrieves kmsg when the amount of kmsg exceeds the threashold and
   /dev/mcosX is deleted
2. ihkmond periodically monitors OS status change to detect hungup
2017-09-20 15:25:19 +09:00
e29005
0b0aa6c0e0 Start mcklogd before McKernel to avoid deadlock
McKernel blocks forever waiting for mcklogd to retrieve kmsg when
kmsg bufer is full with boot log and mcklogd isn't running.
2016-10-19 16:40:32 +09:00
Balazs Gerofi
5fd68eae54 PF handler: fix up various error msgs 2016-08-18 07:31:25 +09:00
takatori
fff7744907 mcklogd support 2016-02-22 13:32:20 +09:00
Tomoki Shirasawa
04e193de13 refactoring process structures 2015-10-13 23:04:08 +09:00
NAKAMURA Gou
0e98e87b95 change type of kprintf_lock() to "unsigned long"
to match type of ihk_mc_spinlock_lock().
2015-02-18 20:49:46 +09:00
Balazs Gerofi bgerofi@riken.jp
a2515747cf print CPU core ID in debug messages 2014-03-27 15:32:23 +09:00
Yuji Saeki
cd04de3131 cls.c, copy.c, debug.c, listeners.c, mikc.c copyright 2013-11-14 17:00:37 +09:00
Masamichi Takagi m-takagi@ab.jp.nec.com
1d4babcd32 make kputs (write debug message onto kmsg_buf.str) truncate size of input string when it's greater than kmsg_buf.len.
http://postpeta.pccluster.org/bugzilla/show_bug.cgi?id=19
2013-05-10 17:06:46 +09:00
Tomoki Shirasawa
4693789608 change function names 2012-12-17 16:15:05 +09:00
Tomoki Shirasawa
0a808057eb modify include lines and Makefiles 2012-12-17 16:10:56 +09:00
Balazs Gerofi
7c85ac93e8 passing argc, argv and envp to main() 2012-05-10 22:07:23 +09:00
Balazs Gerofi
56577b55b7 separate kmsg lock and print functions for multi-line atomic messages 2012-05-10 14:15:14 +09:00
Taku Shimosawa
7999653a00 a commit 2011-12-02 12:35:38 +09:00
Taku Shimosawa
deaaf12d01 kputs fixed and lock added for kmsg 2011-10-26 13:02:12 +09:00
Taku Shimosawa
1311337438 Kernel: initial version 2011-09-22 18:57:51 +09:00