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,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS,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 4CA54C43381 for ; Wed, 27 Feb 2019 21:23:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 104192083D for ; Wed, 27 Feb 2019 21:23:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=fb.com header.i=@fb.com header.b="QtEvNvmx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730474AbfB0VXH (ORCPT ); Wed, 27 Feb 2019 16:23:07 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:36471 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729412AbfB0VXG (ORCPT ); Wed, 27 Feb 2019 16:23:06 -0500 Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1RLEY8U023028 for ; Wed, 27 Feb 2019 13:23:02 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=facebook; bh=Zr53N+PFk/q5ppleMv7GfyjWLqyvWCUlHXlrzmH0duM=; b=QtEvNvmx1dMiFnKqsnip4XriD90LNVZlnIzVdhl30cP63YAN3h7Oyav+RoATAhzJM4Ym OUTJxxQKfmUfQVkw3B4f2knXOVhK+xWoaHE/ZN6ia4bUmUmXNGbNkI3TB6N4kPVKXpLi 78vPBZd6oOaUt1Vc6bKsRtgG7nY5idHPlVU= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2qx28t0112-14 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 27 Feb 2019 13:23:02 -0800 Received: from mx-out.facebook.com (2620:10d:c0a1:3::13) by mail.thefacebook.com (2620:10d:c021:18::174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1531.3; Wed, 27 Feb 2019 13:22:57 -0800 Received: by devbig003.ftw2.facebook.com (Postfix, from userid 128203) id 2C4AF3702395; Wed, 27 Feb 2019 13:22:56 -0800 (PST) Smtp-Origin-Hostprefix: devbig From: Yonghong Song Smtp-Origin-Hostname: devbig003.ftw2.facebook.com To: CC: Alexei Starovoitov , Daniel Borkmann , , Yonghong Song Smtp-Origin-Cluster: ftw2c04 Subject: [PATCH bpf-next 0/2] bpf: set inner_map_meta->spin_lock_off correctly Date: Wed, 27 Feb 2019 13:22:56 -0800 Message-ID: <20190227212256.3856416-1-yhs@fb.com> X-Mailer: git-send-email 2.17.1 X-FB-Internal: Safe MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-27_14:,, 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 The inner_map_meta->spin_lock_off is not set correctly during map creation for BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS. This may lead verifier error due to misinformation. This patch set fixed the issue with Patch #1 for the kernel change and Patch #2 for enhanced selftest test_maps. Yonghong Song (2): bpf: set inner_map_meta->spin_lock_off correctly tools/bpf: selftests: add map lookup to test_map_in_map bpf prog kernel/bpf/map_in_map.c | 1 + tools/testing/selftests/bpf/progs/test_map_in_map.c | 4 ++++ 2 files changed, 5 insertions(+) -- 2.17.1