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=-3.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 6D548C282D7 for ; Thu, 31 Jan 2019 02:12:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 368C520881 for ; Thu, 31 Jan 2019 02:12:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548900770; bh=6K+61mwOjAfUwGOnen/4GfMQscY0t3CchKSAj5ocrGU=; h=From:To:CC:Subject:Date:List-ID:From; b=JAkxliRlf9Dr50x8JVns/qgZ+pa5BawCyNdZQ7wY7SQpdqgvTvZgHK3HR4gw/8rIe 8yTaviojx8b2BxQ18OhRV88mR20aWwakF9EzlY3YRi+6deUDAa0KBox7lmH/zJuzSK U/VHb6OJidm60dhU+t83AjJQZVpwlYK1Wm26ilIU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727031AbfAaCMt convert rfc822-to-8bit (ORCPT ); Wed, 30 Jan 2019 21:12:49 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:51950 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725535AbfAaCMs (ORCPT ); Wed, 30 Jan 2019 21:12:48 -0500 Received: from pps.filterd (m0148461.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0V287dD000880 for ; Wed, 30 Jan 2019 18:12:48 -0800 Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2qbqjxr2m8-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 30 Jan 2019 18:12:48 -0800 Received: from mx-out.facebook.com (2620:10d:c081:10::13) by mail.thefacebook.com (2620:10d:c081:35::127) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1531.3; Wed, 30 Jan 2019 18:12:47 -0800 Received: by devbig007.ftw2.facebook.com (Postfix, from userid 572438) id 600DF760ADF; Wed, 30 Jan 2019 18:12:45 -0800 (PST) Smtp-Origin-Hostprefix: devbig From: Alexei Starovoitov Smtp-Origin-Hostname: devbig007.ftw2.facebook.com To: CC: , , , , , Smtp-Origin-Cluster: ftw2c04 Subject: [PATCH v2 bpf 0/3] bpf: fixes for lockdep and deadlocks Date: Wed, 30 Jan 2019 18:12:42 -0800 Message-ID: <20190131021245.1905869-1-ast@kernel.org> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-01-31_01:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org v1->v2: - reworded 2nd patch. It's a real dead lock. Not a false positive - dropped the lockdep fix for up_read_non_owner in bpf_get_stackid In addition to preempt_disable patch for socket filters https://patchwork.ozlabs.org/patch/1032437/ First patch fixes lockdep false positive in percpu_freelist Second patch fixes potential deadlock in bpf_prog_register Third patch fixes another potential deadlock in stackmap access from tracing bpf prog and from syscall. Alexei Starovoitov (2): bpf: fix lockdep false positive in percpu_freelist bpf: fix potential deadlock in bpf_prog_register Martin KaFai Lau (1): bpf: Fix syscall's stackmap lookup potential deadlock kernel/bpf/hashtab.c | 4 ++-- kernel/bpf/percpu_freelist.c | 41 +++++++++++++++++++++++++----------- kernel/bpf/percpu_freelist.h | 4 ++++ kernel/bpf/syscall.c | 12 +++++++++-- kernel/trace/bpf_trace.c | 14 ++---------- 5 files changed, 47 insertions(+), 28 deletions(-) -- 2.20.0