Re:Re: [PATCH] kernel/hung_task: Add a whitelist and blacklist mechanism.
From: 周传高
Date: Sun Apr 18 2021 - 22:22:16 EST
>On 2021/04/17 23:13, zhouchuangao wrote:
>> The main purpose of this patch is to add a whitelist and blacklist
>> mechanism to the hung task thread.
>
>We stopped using the term 'whitelist'/'blacklist' for new code in Linux kernel,
>and what you are proposing is something like 'ignorelist'/'fatallist'.
>
>I think that matching based on comm name is poor, for comm name is subjected to
>impersonation by malicious user processes.
>
>Moreover, speak of syzkaller testing, most of hang task reports are reaction to
>somebody else consuming too much CPU resources (e.g. printk() flooding, too many
>pending workqueue requests). Even if some process is in 'ignorelist', it is
>possible that some problem that should be reported is already happening. Even if
>some process is in 'fatallist', it is possible that the cause of hang is simply
>somebody else is consuming too much CPU.
>
>By the way, I wish that khungtaskd can report recent top CPU consumers, for it is
>rare that the cause of hung is locking dependency problems / hardware problems.
>
Thank you for your suggestions,
Some SOC vendors' drivers or user-mode processes may be in D state for a long time,
and normally they do not configure HUNG TASK, so we need to ignore these tasks if
we use HUNG TASK.
By default, ignorelist and fatallist are empty and can be configured by the user
(assuming the user knows what they are doing).
I will try to implement the function of khungtaskd to report top CPU consumers.
Thanks,
zhouchaungao