Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4863978rdb; Tue, 12 Dec 2023 11:20:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFsZcu71AGSqtq/q5TU6YlkYP7Rqm2vKOr81RgTRAhMsOcGlBtND9JVMaxMk7ta0LXHubM6 X-Received: by 2002:a17:902:ced2:b0:1d0:6ffd:6e68 with SMTP id d18-20020a170902ced200b001d06ffd6e68mr4038423plg.96.1702408802583; Tue, 12 Dec 2023 11:20:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702408802; cv=none; d=google.com; s=arc-20160816; b=UPkWM0qfNo51ohrRvzJh2pn+8q14pRo4fC1sH7lpXxNzty0dBr/URgYl8VkQaHckZL 2MNoYq/YcpsSmvlE1UUYC3Ru67EV21EqZ6qibMpam5zMUvrlDHsJDioFIKbzbujPKaIc iNP0JLvd2M9aAA8yJBjSym7GLfFKJ9VZ7sVGlVqwsNtTGsiEOfmOz3a1rpXsQGsRMqyr kzxAQJmW/I4Kb81ArSsblMMtFRy7PcVrGaPjCYQR5VJHGkzxPUCkH1nYvzkXZS3AnciZ 8QQ+ACjLXGFtRD5tkRm2jHHi8HimChzmO0ifAmKHPsWAdBNEAowbEw0OY4rOZwdgOdE4 ppSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=Mkw8JtiCsJ7Vl1QsUbzE+YPMdmlFa+V9d5Dq1ZeMtcg=; fh=TWK0qUFsTP2L+Fd4zyciLqy5GiVsnukpRq8jAOGERfY=; b=pMXxbNEM0J5I+R1b1c25waU1LO1aJRgzA5VhVC9j1WNmpKwNQYE+si0z1VAFDGeibW yEGF0S4zDZYAIuSI46kl4y/U1d3GYK2xj5jsYm+wcZI4tr12hq4p2XzisjYsmoXPd5Fs JEbsYpLTxyOOnWYJKYkpgJUDTHe4tJaGnN23Qn7QFr566aZ6sxpYxp2LqdIg4ZP4JqV8 xLNJehcBiL10q5Af5FeHexPi02i15oCVpi3P2vwWHWrjFCOcm78F2ng2oZV3yUaq8qwU 4g4S/z6W+/NnXvvXHUhFZSvj8/VyXHYxQnPXNVID+EPwUru/0DYWk78abSPLw/K2DiEI sv6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=d6nwsqet; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=q96ghufp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id i18-20020a17090332d200b001bb8c4279f5si8435339plr.148.2023.12.12.11.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 11:20:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=d6nwsqet; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=q96ghufp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A5AD18047549; Tue, 12 Dec 2023 11:20:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376975AbjLLTTr (ORCPT + 99 others); Tue, 12 Dec 2023 14:19:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233051AbjLLTTq (ORCPT ); Tue, 12 Dec 2023 14:19:46 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6ECDB7 for ; Tue, 12 Dec 2023 11:19:50 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1702408788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Mkw8JtiCsJ7Vl1QsUbzE+YPMdmlFa+V9d5Dq1ZeMtcg=; b=d6nwsqetR2ucbIY6xrRRRbb/rNiQpPWHgVEsptGHLwKfTlq40KfGslD1rRMh27nku9fUjJ Iv6MexGumb2wdebAgrmcgByGSsodCWc/vzCmPXxeQfHZzDpWVkHgm6aitKoZITWqSB+gav t37GzUnWkQOJlvISwLvAwu2aNsU3mxtjx6bV5UVzs0xtw0NLMov4LTJ+01B4t3tY/bVN/W w4C5xLB8au2Sl6baY/w2Ls7k/b8IKY706GJizfjTK/wBEDZX0GiYU69CcYzwBom8jMlrT4 ZMxjkPF37QxAgHxu/pF2vfPA7Z+F759MOEjAhiUoUCD+bCotSlBacxucqZ8epg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1702408788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Mkw8JtiCsJ7Vl1QsUbzE+YPMdmlFa+V9d5Dq1ZeMtcg=; b=q96ghufpNLOIMSR+mzJKN7xpP9jxSrmd5YuaG4anK3gyn7MN7OKEqZYiqc1UmHalUxmNX4 Pw0QgWMV3p+LG0Dg== To: xingwei lee Cc: syzbot+f2c4e7bfcca6c6d6324c@syzkaller.appspotmail.com, jstultz@google.com, linux-kernel@vger.kernel.org, sboyd@kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [kernel?] possible deadlock in alarm_handle_timer In-Reply-To: References: <87o7f0qslm.ffs@tglx> Date: Tue, 12 Dec 2023 20:19:47 +0100 Message-ID: <87o7evp6ss.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 12 Dec 2023 11:20:00 -0800 (PST) On Sat, Dec 09 2023 at 11:08, xingwei lee wrote: > Hello, tglx. Please do not top-post: https://people.kernel.org/tglx/notes-about-netiquette > I reprduce this bug with > linux-next commit: > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/?id=eff99d8edbed7918317331ebd1e365d8e955d65e > kernel config: https://syzkaller.appspot.com/text?tag=KernelConfig&x=61991b2630c19677 > the same configuration as the syzbot dashboard: > https://syzkaller.appspot.com/bug?extid=f2c4e7bfcca6c6d6324c. If you want that people look after your report, then the report needs to carry the information right away. > However, I do not entangled the information and just try to generate > repro.c with the configuration provided by syzbot dashboard. The reproducer file alone is useless without the rest of the information. > When I try the repro.c in the lasted upstream commit: > f2e8a57ee9036c7d5443382b6c3c09b51a92ec7e, it can't crash the kernel at > all. Should I assume this bug was fixed by the mainline? Assumptions are not helpful. And if you look at the syzkaller report then it's entirely clear that the problem is _NOT_ in alarm_handle_timer(). Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sighand->siglock); local_irq_disable(); lock(&new_timer->it_lock); lock(&sighand->siglock); lock(&new_timer->it_lock); *** DEADLOCK *** So it's clear that sighand->siglock is taken without interrupts disabled somewhere and the report tells you exactly where: -> (&sighand->siglock){+.+.}-{2:2} { HARDIRQ-ON-W at: ptrace_set_stopped kernel/ptrace.c:391 [inline] ptrace_attach+0x401/0x650 kernel/ptrace.c:478 Now if you'd dig into the git history of linux-next then you'd figure out that the commit which introduced the problem: 5431fdd2c181 ("ptrace: Convert ptrace_attach() to use lock guards") was removed from linux-next on 2023-11-20, which is 3 days later than the commit tag you linked to and never came back and therefore is not in mainline. It's all fine if you try to get a reproducer for something, but you could have spared all of us a lot of time if you validated that the problem still persists in linux-next and upstream. Thanks, tglx