From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 646F5C33CB1 for ; Tue, 14 Jan 2020 11:08:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 39F342467E for ; Tue, 14 Jan 2020 11:08:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="mDLkJsF3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729541AbgANLId (ORCPT ); Tue, 14 Jan 2020 06:08:33 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:42797 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729085AbgANLIc (ORCPT ); Tue, 14 Jan 2020 06:08:32 -0500 Received: by mail-qk1-f193.google.com with SMTP id z14so11658353qkg.9 for ; Tue, 14 Jan 2020 03:08:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=ukU/HTx3Lur+oN5f1R5Yulqfuax6so7AyFG3I+NXijE=; b=mDLkJsF382qFbmEkUJXrjKsSsU0bztLQnJuEdueVjG+YHKn129QRMVkFBhaHs02jlb S5JV36BNDDNUfL8KemT5hOsLWqTvUggPzEAa8N2CZKjqEUL2gsDnvv40g+BB+uela7dh Jgrx9rDjz5OErwlXPsX7nNM+dSWsRNE8nulA4QnYl74qcvdSBJGmDk3He16/4mFZs33S IzPGb27j4W2dHx0T8+OODSyZm7E16IzcLQzguhPs5vHLJASI9JeNCkexh2az/dQ96t3u ruWKhzckHLSdD4ijmd79+MvrNJzlzIX0uzlRXCf+RicfDnuUK7rhsIpo8bqFBLTAzkrn doog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=ukU/HTx3Lur+oN5f1R5Yulqfuax6so7AyFG3I+NXijE=; b=GImS+PBUW7aWcTEei8MW6DCHgbHNoSdstcGgo2+yhHXv26qcRSkxXH+S9aney+z8uz etKmjtgAFaBI8fMOfGW3uQhzH+Lo5CJG26UrCgtzKonKRKhlpZVgtf2GiLUSxyPOhPjY yi0/Nu9Y+cphpIf1MHiuoFsAh/dV5ukW0Nks2DPTuRO0NMJ2dkTx7rr0G7XWqooNeG7B 9YNqeRXg/mPj3QwFcVfHhR/8e97h48XoG4DfPAUZ8R2orC9gbop14AezDcNrz1QZeSqL QH8/o9mLK046mgavwpGNj+1AeidbBOoLHGqjYkexin6oLwJzncryEG8Cbg9ioPmHulSi AIdQ== X-Gm-Message-State: APjAAAWiKEfYid4o4spWfRW8y9qFWUFsXTKPfn3S1AWWi8TJf5XfwO+E 6rZmwshDz3ayVBxqB1o6mUIWter6zD2g9g== X-Google-Smtp-Source: APXvYqw+K7nK6v62iaPG8IRuXo2+JcN5WoG4smCXzjE2do7qUArjfSk6sdyUR46tJD8UtoLaDUB45w== X-Received: by 2002:a37:4b93:: with SMTP id y141mr21982856qka.205.1579000111263; Tue, 14 Jan 2020 03:08:31 -0800 (PST) Received: from [192.168.1.183] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id i16sm6406845qkh.120.2020.01.14.03.08.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Jan 2020 03:08:30 -0800 (PST) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable From: Qian Cai Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v4 01/10] kcsan: Add Kernel Concurrency Sanitizer infrastructure Date: Tue, 14 Jan 2020 06:08:29 -0500 Message-Id: <53F6B915-AC53-41BB-BF32-33732515B3A0@lca.pw> References: Cc: LKMM Maintainers -- Akira Yokosawa , Alan Stern , Alexander Potapenko , Andrea Parri , Andrey Konovalov , Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Boqun Feng , Borislav Petkov , Daniel Axtens , Daniel Lustig , Dave Hansen , David Howells , Dmitry Vyukov , "H. Peter Anvin" , Ingo Molnar , Jade Alglave , Joel Fernandes , Jonathan Corbet , Josh Poimboeuf , Luc Maranget , Mark Rutland , Nicholas Piggin , "Paul E. McKenney" , Peter Zijlstra , Thomas Gleixner , Will Deacon , Eric Dumazet , kasan-dev , linux-arch , "open list:DOCUMENTATION" , linux-efi@vger.kernel.org, Linux Kbuild mailing list , LKML , Linux Memory Management List , the arch/x86 maintainers In-Reply-To: To: Marco Elver X-Mailer: iPhone Mail (17C54) Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org > On Jan 6, 2020, at 7:47 AM, Marco Elver wrote: >=20 > Thanks, I'll look into KCSAN + lockdep compatibility. It's probably > missing some KCSAN_SANITIZE :=3D n in some Makefile. Can I have a update on fixing this? It looks like more of a problem that kcs= an_setup_watchpoint() will disable IRQs and then dive into the page allocato= r where it would complain because it might sleep. BTW, I saw Paul sent a pull request for 5.6 but it is ugly to have everybody= could trigger a deadlock (sleep function called in atomic context) like thi= s during boot once this hits the mainline not to mention about only recently= it is possible to test this feature (thanks to warning ratelimit) with the e= xisting debugging options because it was unable to boot due to the brokennes= s with debug_pagealloc as mentioned in this thread, so this does sounds like= it needs more soak time for the mainline to me. 0000000000000400 [ 13.416814][ T1] Call Trace: [ 13.416814][ T1] lock_is_held_type+0x66/0x160 [ 13.416814][ T1] ___might_sleep+0xc1/0x1d0 [ 13.416814][ T1] __might_sleep+0x5b/0xa0 [ 13.416814][ T1] slab_pre_alloc_hook+0x7b/0xa0 [ 13.416814][ T1] __kmalloc_node+0x60/0x300 [ 13.416814 T1] ? alloc_cpumask_var_node+0x44/0x70 [ 13.416814][ T1] ? topology_phys_to_logical_die+0x7e/0x180 [ 13.416814][ T1] alloc_cpumask_var_node+0x44/0x70 [ 13.416814][ T1] zalloc_cpumask_var+0x2a/0x40 [ 13.416814][ T1] native_smp_prepare_cpus+0x246/0x425 [ 13.416814][ T1] kernel_init_freeable+0x1b8/0x496 [ 13.416814][ T1] ? rest_init+0x381/0x381 [ 13.416814][ T1] kernel_init+0x18/0x17f [ 13.416814][ T1] ? rest_init+0x381/0x381 [ 13.416814][ T1] ret_from_fork+0x3a/0x50 [ 13.416814][ T1] irq event stamp: 910 [ 13.416814][ T1] hardirqs last enabled at (909): []= _raw_write_unlock_irqrestore+0x53/0x57 [ 13.416814][ T1] hardirqs last disabled at (910): []= kcsan_setup_watchpoint+0x96/0x460 [ 13.416814][ T1] softirqs last enabled at (0): [] c= opy_process+0x11fa/0x34f0 [ 13.416814][ T1] softirqs last disabled at (0): [<0000000000000000>] 0= x0 [ 13.416814][ T1] ---[ end trace 7d1df66da055aa92 ]--- [ 13.416814][ T1] possible reason: unannotated irqs-on. [ 13.416814][ent stamp: 910 [ 13.416814][ T1] hardirqs last enabled at (909): []= _raw_write_unlock_irqrestore+0x53/0x57 [ 13.416814][ T1] hardirqs last disabled at (910): []= kcsan_setup_watchpoint+0x96/0x460 [ 13.416814][ T1] softirqs last enabled at (0): [] c= opy_process+0x11fa/0x34f0 [ 13.416814][ T1] softirqs last disabled at (0): [<0000000000000000>] 0= x0=