lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250407130836.5e52ab2aa2e77c67f890637b@linux-foundation.org>
Date: Mon, 7 Apr 2025 13:08:36 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Lance Yang <ioworker0@...il.com>
Cc: will@...nel.org, peterz@...radead.org, mingo@...hat.com,
 longman@...hat.com, mhiramat@...nel.org, anna.schumaker@...cle.com,
 boqun.feng@...il.com, joel.granados@...nel.org, kent.overstreet@...ux.dev,
 leonylgao@...cent.com, linux-kernel@...r.kernel.org, rostedt@...dmis.org,
 senozhatsky@...omium.org, tfiga@...omium.org, amaindex@...look.com,
 jstultz@...gle.com, Mingzhe Yang <mingzhe.yang@...com>
Subject: Re: [PATCH v4 2/3] hung_task: show the blocker task if the task is
 hung on semaphore

On Thu, 20 Mar 2025 14:49:22 +0800 Lance Yang <ioworker0@...il.com> wrote:

> Inspired by mutex blocker tracking[1], this patch makes a trade-off to
> balance the overhead and utility of the hung task detector.
> 
> Unlike mutexes, semaphores lack explicit ownership tracking, making it
> challenging to identify the root cause of hangs. To address this, we
> introduce a last_holder field to the semaphore structure, which is
> updated when a task successfully calls down() and cleared during up().
> 
> The assumption is that if a task is blocked on a semaphore, the holders
> must not have released it. While this does not guarantee that the last
> holder is one of the current blockers, it likely provides a practical hint
> for diagnosing semaphore-related stalls.
> 
> With this change, the hung task detector can now show blocker task's info
> like below:

+#ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
+#ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
+#ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
+#ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
+#ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
+#ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
+#ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
+#ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER

It looks pretty simple to reduce the amount of ifdeffery which this
patch adds.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ