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=-11.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS 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 CB8C5C433DB for ; Thu, 18 Mar 2021 16:57:34 +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 3ED7C64D74 for ; Thu, 18 Mar 2021 16:57:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3ED7C64D74 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=linux-audit-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616086653; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Ut7EjPyCgSn2qmYHGkVh1Sp45QoLNkWvnaxvSHRUNVk=; b=iYCmAqwpVETnYAxtlDR9p79cDmePNJAP9uk43l9z2hJn8JMihf+ZV1fXppM+oy5HifPtBF A65Pg52kOGMZl/sFzcEKmt0QU65Zkcpg5T0g6kZ6v9x5lA8k8za24jJrgJZubVside+sxx +BeMyZz+gbk5hUFzi9ZdhxZ25FzlLJc= 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-397-g3MwVQqWPfC2Lo9EXuGf_Q-1; Thu, 18 Mar 2021 12:57:31 -0400 X-MC-Unique: g3MwVQqWPfC2Lo9EXuGf_Q-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A8A811013722; Thu, 18 Mar 2021 16:57:27 +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 85BD56064B; Thu, 18 Mar 2021 16:57:27 +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 396AE1800216; Thu, 18 Mar 2021 16:57:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12IGhKXg029585 for ; Thu, 18 Mar 2021 12:43:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id B9CB72166BCC; Thu, 18 Mar 2021 16:43:20 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B33DE2166BA9 for ; Thu, 18 Mar 2021 16:43:17 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (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 99AC185520F for ; Thu, 18 Mar 2021 16:43:17 +0000 (UTC) Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-113-8FciznpJOWiLS87qgKHgwQ-1; Thu, 18 Mar 2021 12:43:15 -0400 X-MC-Unique: 8FciznpJOWiLS87qgKHgwQ-1 Received: by mail-wm1-f72.google.com with SMTP id o9so4233980wmq.9 for ; Thu, 18 Mar 2021 09:43:15 -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=xMH16K1Vk3sQr9cJFMbSFsVVc6ukC0diu3TY4hvT3V8=; b=j90AEr4uWstd/M+JhnZ7iZRP1+YXEKGZFXn9i9TJpb9kQz+kIVGlKhpdH3oZvuA1+l EjN0QayH1sptwA9cmbVf4douTkZ8DCxm4gjrDSeTeMtVquNepol7yauQAKBdWR7UryvL DAI1xOaIkAyGP+lBKE2fWzbwPM6ncsrtbHXN11m5al9Fo24JtT/0ZDUEvFMDon81ULA6 lS+9+6AMUc7kus+SWDSHKsyVqhS64FvIOA99O8lImkDae4RCFFLWNjNVOtBMUUg7qDK2 bPe2whysESEnJxOyIBhsm0o4ZqPT0H/o7mQnIquNUX4fu9fM4P+aI2L7jFn3bKGsl4oz YuKA== X-Gm-Message-State: AOAM530st3uKVLeN7nUhdRpJ2jfZxvR35kB+Q4EixmM0efstiKpbEAVx SrRIb/Oet/xJQP0h2xCtbtcv1OvKpJOsHAuBhRoVzCnHjpZFzRGqHOJFlVZSTcL50eCbMFyFL0f /ACPttNxg20/C3qNQlatMXNohL30d/ZVPCTs= X-Received: by 2002:a5d:4ecf:: with SMTP id s15mr201587wrv.222.1616085794527; Thu, 18 Mar 2021 09:43:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNeNypcp+XHyJTGZ8spn3LHjP3NH4oxZpMKd2THyQxn7pG5dxPB2k0bkCYChYIhaq3pgrGoGCwOWHOyS3DRRM= X-Received: by 2002:a5d:4ecf:: with SMTP id s15mr201567wrv.222.1616085794358; Thu, 18 Mar 2021 09:43:14 -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: Serhei Makarov Date: Thu, 18 Mar 2021 12:43:03 -0400 Message-ID: Subject: Re: deadlock bug related to bpf,audit subsystems To: linux-audit@redhat.com, bpf@vger.kernel.org X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: linux-audit@redhat.com X-Mailman-Approved-At: Thu, 18 Mar 2021 12:56:46 -0400 Cc: Jerome Marchand , Daniel Borkmann , ast@kernel.org, Frank Eigler , 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.11 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 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 -- Serhei -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit