Commit Graph

13 Commits

Author SHA1 Message Date
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
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