Petro Karashchenko
e5dbc3328c
sched/misc/assert: remove extra indentations
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-26 10:26:09 +08:00
Xiang Xiao
99e89809d7
board: Pass the assertion expression to board_crashdump too
...
continue the follow work:
commit 43e7b13697
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date: Sun Jan 22 19:31:32 2023 +0800
assert: Log the assertion expression in case of fail
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-25 16:00:48 -03:00
Xiang Xiao
43e7b13697
assert: Log the assertion expression in case of fail
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-24 15:00:19 -03:00
ligd
c0aaaa94e1
assert: used %p to logout the pointer
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 09:46:40 -03:00
ligd
19f87e88b9
assert: fix build break.
...
misc/assert.c: In function 'show_tasks':
Error: misc/assert.c:411:10: error: format '%p' expects argument of type 'void *', but argument 3 has type 'uintptr_t' {aka 'long unsigned int'} [-Werror=format=]
411 | _alert(" ---- ---"
| ^~~~~~~~~~~~~~
......
424 | , up_get_intstackbase()
| ~~~~~~~~~~~~~~~~~~~~~
| |
| uintptr_t {aka long unsigned int}
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 09:46:40 -03:00
ligd
940de60892
assert: add stackbase dump
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 11:04:12 +08:00
ligd
4de9317373
assert: add uname info to assert message
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 11:04:12 +08:00
anjiahao
9a32cf7a1a
assert:add a last type to call notifier
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-05 22:58:00 +08:00
田昕
96a45e2c75
sched/misc:add linux-like reboot notifier list
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-12-29 19:18:42 +08:00
Xiang Xiao
d5f729ed25
sched/assert: Dump the global state only when it's a fatal error
...
and merge assert_end into _assert
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-29 11:50:31 +09:00
Xiang Xiao
d1497a8d08
sched/assert: Don't call up_check_tcbstack for the kernel stack
...
since up_check_tcbstack only check the userspace stack color
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-29 11:50:31 +09:00
Xiang Xiao
5f99e482b5
sched/assert: Don't call running_task more than once
...
and fix some minor style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-29 11:50:31 +09:00
Xiang Xiao
2e59d832fc
sched/misc: Rename panic.c to panic_notifier.c
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-28 21:42:38 +02:00
zhangyuan21
45394eb6dc
arch: save user context in assert common code
...
This is the work continue with #7875
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-24 13:02:56 +08:00
Ville Juven
172b209f2d
sched/assert: Re-implement assert() into user space
...
_assert is a kernel procedure, entered via system call to make the core
dump in privileged mode.
Running exit() from this context is not OK as it runs the registered
exit functions and flushes streams, which must not be done
from privileged mode as it is a security hole.
Thus, implement assert() into user space (again) and remove the exit()
call from the kernel procedure.
2022-12-22 21:07:47 +08:00
Ville Juven
b0b352f784
sched/assert: Fix printing argv when address environments are in use
...
Instantiate the correct address environment when reading the process's
argument vector. Otherwise doing this will crash the system every time,
causing a recursive assert loop.
Also try to do a bit of sanity checking before attempting to read the
process's memory, it might be in a bad state in which case this will
fail anyway.
2022-12-22 20:35:57 +08:00
yinshengkai
1a8cbc0b99
sched/assert: modify assert message
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-22 20:08:27 +08:00
zhangyuan21
3462061624
task: show thread main entry when display thread name
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-17 14:53:59 +08:00
zhangyuan21
453a1a7332
arch: move stack and task dump to common code
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-17 01:59:35 +08:00
田昕
0382b63f5d
move common assert logic together.
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-12-12 17:05:02 +08:00
田昕
2719869ab2
Move _assert to kernel space.
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-12-06 18:33:21 +08:00