From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C34DF3858D35; Fri, 8 Sep 2023 02:49:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C34DF3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694141358; bh=+kE4xXWFkC28khEeOabtET6EJxXe9vjMIPQ4zSjonic=; h=From:To:Subject:Date:In-Reply-To:References:From; b=saNO7176VaiaP8QpwKHm23dUqTMPKz3FZK7miXUnjIy1MqNqUthwd/Vne0WV/K8Te mpiW67rh4Ada3d8Qpa5MKcdKJolqJ+TZClBO/Lj52JCIYZfvs9xZo+dGYGodADphPz Sd+JluQ8ma81S84fIf6jGjmY2/Fz6B/Mv+TCJ6xY= From: "wcohen at redhat dot com" To: systemtap@sourceware.org Subject: [Bug runtime/30831] Systemtap scripts fail to compile on newest linux 6.6 kernels Date: Fri, 08 Sep 2023 02:49:18 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: runtime X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wcohen at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30831 --- Comment #2 from William Cohen --- A bit more data. The reproducer works with Fedora Rawhide kernel-6.5.0-57.fc40.x86_64. The failure happens with the later 6.6 kernel= s. There are two issues going on: -problem with the type used for the ibt_wrapper for task_work_add. -use of flush_scheduled_work() is frowned upon because of possible deadlock issues. git commit c4f135d643823a869becfa87539f7820ef9d5bfa has details on the iss= ues: Author: Tetsuo Handa 2022-06-01 03:32= :47 Committer: Tejun Heo 2022-06-07 13:07:14 Parent: e71e60cd74df9386c3f684c54888f2367050b831 (Merge tag 'dma-mapping-5.19-2022-06-06' of git://git.infradead.org/users/hch/dma-mapp= ing) Child: 873a400938b31a1e443c4d94b560b78300787540 (workqueue: Fix type of cp= u in trace event) Branches: master, remotes/origin/master, remotes/origin/mmu_gather-race-fix, remotes/origin/x86-rep-insns, remotes/origin/x86-uaccess-cleanup Follows: v5.19-rc1 Precedes: v5.19-rc2 workqueue: Wrap flush_workqueue() using a macro Since flush operation synchronously waits for completion, flushing system-wide WQs (e.g. system_wq) might introduce possibility of deadlock due to unexpected locking dependency. Tejun Heo commented at [1] that it makes no sense at all to call flush_workqueue() on the shared WQs as the caller has no idea what it's gonna end up waiting for. Although there is flush_scheduled_work() which flushes system_wq WQ with "Think twice before calling this function! It's very easy to get into trouble if you don't take great care." warning message, syzbot found a circular locking dependency caused by flushing system_wq WQ [2]. Therefore, let's change the direction to that developers had better use their local WQs if flush_scheduled_work()/flush_workqueue(system_*_wq) = is inevitable. Steps for converting system-wide WQs into local WQs are explained at [3= ], and a conversion to stop flushing system-wide WQs is in progress. Now we want some mechanism for preventing developers who are not aware of this conversion from again start flushing system-wide WQs. Since I found that WARN_ON() is complete but awkward approach for teach= ing developers about this problem, let's use __compiletime_warning() for incomplete but handy approach. For completeness, we will also insert WARN_ON() into __flush_workqueue() after all in-tree users stopped call= ing flush_scheduled_work(). Link: https://lore.kernel.org/all/YgnQGZWT%2Fn3VAITX@slm.duckdns.org/ [= 1] Link: https://syzkaller.appspot.com/bug?extid=3Dbde0f89deacca7c765b8 [2] Link: https://lkml.kernel.org/r/49925af7-78a8-a3dd-bce6-cfc02e1a9236@I-love.SAKUR= A.ne.jp [3] Signed-off-by: Tetsuo Handa Signed-off-by: Tejun Heo --=20 You are receiving this mail because: You are the assignee for the bug.=