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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 06C65C433DB for ; Thu, 18 Mar 2021 17:45:18 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3D64964E99 for ; Thu, 18 Mar 2021 17:45:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D64964E99 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paul-moore.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=linux-audit-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-547-dDrm25b9PFyW1gbKDKgClw-1; Thu, 18 Mar 2021 13:45:13 -0400 X-MC-Unique: dDrm25b9PFyW1gbKDKgClw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B44641009465; Thu, 18 Mar 2021 17:45:09 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7EDDF5C230; Thu, 18 Mar 2021 17:45:09 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 55D861809C83; Thu, 18 Mar 2021 17:45:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12IHiY41012671 for ; Thu, 18 Mar 2021 13:44:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 636D310EB2BC; Thu, 18 Mar 2021 17:44:34 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5F08110EB2BB for ; Thu, 18 Mar 2021 17:44:32 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E8A888007B1 for ; Thu, 18 Mar 2021 17:44:31 +0000 (UTC) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-128-xCz2TcW3NgCli26i1V9VBQ-1; Thu, 18 Mar 2021 13:44:29 -0400 X-MC-Unique: xCz2TcW3NgCli26i1V9VBQ-1 Received: by mail-ej1-f45.google.com with SMTP id b7so5303410ejv.1 for ; Thu, 18 Mar 2021 10:44:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qU1aub0/jj/+qJtgvXqKzP6GZJ9Mncd2OEdNT9QZSDo=; b=uN40MsS72QDWEJBNFpRMiWnbMqZjcV3M7EaxrLGZN8xT6Kv2HsK5vnP0ojvmP5bV/d 68FuWIEFdORkNRcnAyfKvH8gUMu7v/9WzBJj0ln2i2UH620iR8mqDW+livJMQ6DgFEI9 kKuT8+n+810YyZ5mnPCc+1Dd05JofJli7h3v9CPLYcOhFh9SjnZqNxXA4AtW5ZKnrBpw 1U8yg/xP0dABfIlB7Exr2xi9GNADkakPAapAubLui0eJNreyYlExauBSNRxTeVtF9k5q TwiUZVhlOSn476NVmvN5F6gZFDwccs7jeKZNO53FeuslMoKEeAZggnetKUOfnu568+gk 57DQ== X-Gm-Message-State: AOAM530n9w8hTRezVtb1hxI7N//fBJA5gyAviDQXKQ2qj4txKPUb5hZq rbv54nZbT2XKoNUQrdLYrDBmtOoLExWbxNxDgj7H X-Google-Smtp-Source: ABdhPJwPWNcgnTRsosElvQoIKogEpbe3lSGJ5tmxa6D3WGDmH/m/+olCJtP/t5WzyO3NNwbARO28cBcRNdrntraV1mI= X-Received: by 2002:a17:906:edca:: with SMTP id sb10mr25272305ejb.398.1616089467599; Thu, 18 Mar 2021 10:44:27 -0700 (PDT) MIME-Version: 1.0 References: <2ed7a55e-7def-7faf-fc47-991b867bff9e@iogearbox.net> <1e410caf-019a-ade7-465d-3d936d2f7dc6@iogearbox.net> <5845cef9-5aaf-f85e-8280-472f61ddaeed@iogearbox.net> <61494cfb-1ceb-4886-3023-1ac0b35697d6@iogearbox.net> In-Reply-To: From: Paul Moore Date: Thu, 18 Mar 2021 13:44:16 -0400 Message-ID: Subject: Re: deadlock bug related to bpf,audit subsystems To: Serhei Makarov X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: linux-audit@redhat.com Cc: Jerome Marchand , Daniel Borkmann , ast@kernel.org, Frank Eigler , linux-audit@redhat.com, bpf@vger.kernel.org, Jiri Olsa , guro@fb.com X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=linux-audit-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Thu, Mar 18, 2021 at 12:57 PM Serhei Makarov wrote: > On Thu, Mar 18, 2021 at 10:43 AM Serhei Makarov wrote: > > Jiri Olsa also reports seeing a similar deadlock at v5.10. I'm in the > > middle of double-checking my bisection which ended up at a > > seemingly-unrelated commit [2] > > > > [1] https://bugzilla.redhat.com/show_bug.cgi?id=1938312 > > [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.11-rc7&id=2dcb3964544177c51853a210b6ad400de78ef17d > > I've confirmed that my first bisection was incorrect by testing > @1c2f67308af4 mm: thp: fix MADV_REMOVE deadlock on shmem THP > and reproducing the deadlock. Previously this commit was marked as > good, so it seems a kernel with the bug can sometimes pass the test. > > I'll double check rc6 next since I have the kernel handy. If > 5.11.0-rc6 can also be made to fail, with Jiri Olsa's report it'd be > necessary to do a wider search. > There may be commits with intent similar to > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8d92db5c04d103 > which tightened some of the behaviour of kernel reads, but affecting > the audit subsystem? > The actual stack trace that leads to deadlock goes through > security_locked_down() which was present since the original patch > reworking probe_read into separate probe_read_{user,kernel} helpers > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.11-rc7&id=6ae08ae3dea2 Added thee SELinux list to the To/CC line; they should really be involved. I'm also CC'ing the LSM list for good measure as there may be other people that care about this. FYI, the first instance of this thread that I saw can be found here via the linux-audit list: https://lore.kernel.org/linux-audit/CANYvDQN7H5tVp47fbYcRasv4XF07eUbsDwT_eDCHXJUj43J7jQ@mail.gmail.com/ -- paul moore www.paul-moore.com -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit