在 2025/7/23 15:31, Kees Cook 写道:
On Wed, Jul 23, 2025 at 03:23:49PM +0800, Xuanye Liu wrote:Good idea! I'll gather more feedback from others and then update to v2.
The check_mm() function verifies the correctness of rss counters inWhy not just convert the pr_alert to a WARN?
struct mm_struct. Currently, it only prints an alert when a bad
rss-counter state is detected, but lacks sufficient context for
debugging.
This patch adds a dump_stack() call to provide a stack trace when
the rss-counter state is invalid. This helps developers identify
where the corrupted mm_struct is being checked and trace the
underlying cause of the inconsistency.