Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3138256imm; Fri, 20 Jul 2018 10:47:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdLNwLMAZu3tiDkomZ9ySJRynZ7wWE5rDODyc91/DXo4ZYpXTY+52h7Tfw5771siyIqXoVR X-Received: by 2002:a65:64cf:: with SMTP id t15-v6mr2915684pgv.79.1532108850999; Fri, 20 Jul 2018 10:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532108850; cv=none; d=google.com; s=arc-20160816; b=Hi3U7CSAKGwEP6FU34plpVMz2NjwaS1VJXmjhS0S1zffLBXXLhTW/7xkttanu6cfsw UyNs39t/piz5ql03WC4uaLFcph+sbWXOg7QQ2aA45/OSOQGNIPhtcIfFExck0e6mW4Xv g6o5AG1DaMAj6wf+JbAQ2RQCuEr0Mo/vm2EV5IW1MYlBt3Orvy26RAa2qhG9esyVgxQ5 24A+rrjcI312GzsSYtTPqzYQMl4UV5v0/2VERUtCXNyAtrCpTnHqdC9Typ/MNOFxzc9H LUvd9kVaJ1sKAw5rRHNqvx6MHmz8rEOggxIOO6LJ3YhN9rZRfBn4l1d8TrTX4I811+ws jLPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-signature :arc-authentication-results; bh=qGtDowD9XKbzM8Jae4SYFfVcCSuFG5sG+sEXv0fEVv0=; b=Zu1rMPP5CwdignCdkkAPl5gtAz5QKpoN7ye2r81kVYUIUkYljtV15EtbPsDekfIHHT pgaX8j/oQ6asaEfydMC85bakEqIwwRk2UuN7IorDdvfCxDh7ytq2ijgqSKfkcM9A1PRu k6PADRgIsP0W8xPzSURou5r+uiWF2ru1wPPaL18YgxUT4kWJP4IChGHyaYOSTlme2c2y RLur+9WJXGC1wBSsIZE1sFmKev7UaVPTrIWmi048y0eUSO5nvmAtxcMWQiNPv/Rpkhym giRNYHA0T82lqiHs9b24dAEy30J389oqS/ajkcc0AIDMqIyTTbZYJJ13ZQ7sMJqqA8YL l7LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=I8dqMZf8; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=IXGoUi8f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1-v6si2082732pld.485.2018.07.20.10.47.15; Fri, 20 Jul 2018 10:47:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=I8dqMZf8; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=IXGoUi8f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388359AbeGTSgC (ORCPT + 99 others); Fri, 20 Jul 2018 14:36:02 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:38250 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387881AbeGTSgB (ORCPT ); Fri, 20 Jul 2018 14:36:01 -0400 Received: from pps.filterd (m0044008.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6KHhh0s025812; Fri, 20 Jul 2018 10:46:26 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=qGtDowD9XKbzM8Jae4SYFfVcCSuFG5sG+sEXv0fEVv0=; b=I8dqMZf8HD8fNM4Q26ekiMt6CAnqKAM3wkJK3NNTtacKzomBdz66E2L+xYwGO8BlSPFj UZK7+OI8R5N56VP7IqpKOAaWexc/18TxFaOEqCy/omYDEehh0voCp+cbY7zECwPNxI0A xXjuaeSkm0rAvGbRp6sCaSzBIC3oPiIFJ5g= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2kbmbv80dv-4 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 20 Jul 2018 10:46:26 -0700 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.31) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 20 Jul 2018 13:46:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qGtDowD9XKbzM8Jae4SYFfVcCSuFG5sG+sEXv0fEVv0=; b=IXGoUi8fjPm6xr3qZQUPo2s34vhkNQ7KURKuPYmI8UabUVPkxcTqCaXAy8ACLyinigSJgv+a7pWpKmPzctEY9NwT84NiU0hn1TcKgyyMFVbAbCaHD5+aLxoe3SofLrSz0qskra73vlm9zRwSkSq68DkMv+1mgMDMaxMlk9ANiqQ= Received: from castle.thefacebook.com (2620:10d:c090:200::6:ca05) by SN1PR15MB0175.namprd15.prod.outlook.com (2a01:111:e400:58cf::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Fri, 20 Jul 2018 17:46:21 +0000 From: Roman Gushchin To: CC: , , Roman Gushchin , Alexei Starovoitov , Daniel Borkmann Subject: [PATCH v3 bpf-next 07/14] bpf: don't allow create maps of cgroup local storages Date: Fri, 20 Jul 2018 10:45:51 -0700 Message-ID: <20180720174558.5829-8-guro@fb.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180720174558.5829-1-guro@fb.com> References: <20180720174558.5829-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [2620:10d:c090:200::6:ca05] X-ClientProxiedBy: MWHPR17CA0096.namprd17.prod.outlook.com (2603:10b6:300:c2::34) To SN1PR15MB0175.namprd15.prod.outlook.com (2a01:111:e400:58cf::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3c8d2bc7-b913-4239-586e-08d5ee68b4a3 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600067)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020);SRVR:SN1PR15MB0175; X-Microsoft-Exchange-Diagnostics: 1;SN1PR15MB0175;3:VjL2fahZfqsPVBz5581ZfaTrGhlH3mGT/isSz8JQEz2DwlH4Szs0dSSDrZmZd1sqXmqCK9hnrIst8HaJ6IABDp74whTDgQ0Jm+w0KIQHPPHo0pVsrXk18LxLyFIGiDPNR5Vedoex3/J4HbGN2FvQrSWHD6QQ9yWmIKt5JABkdz3OijmfmA4tTRIkcEkAl//GQVVCRuujaizgj8w1UloTcw6xznD4/dfoxvEJlzuAfoWL8rHbi2xUFKr0Koc6oWeh;25:89mM1L9sV4s2jI4s85pmGMA9DUykKvaA1qV+bcPi2e97sn+Nhj4YPF7/2eRv3KVKckdupmHZnTk84pePp89gaFVcckFuFNvYGM/0e9YPQNm3+ASo9wbL2iq4P42Nm6wU6+dfV2o0ul0ia+QwADV1cyhfwCWca+UyYrSeX5fYXcZceCgFR6YZbnKAvJ8BIrVbfY9IaIJXFwYGSB/EXXp6Z1pzD3fbMuADtDWKPewQVOz4auGwpvrTrnqU16YWKbejKdNIAz1sMzi1zQihse6R7oM6mIGNBhUdbAsfhp1b5gCKJbhDij205sn+emLrQTAjKGrhHOld/e7aG7MDtxb/fA==;31:RjI/hyQb9JBBnDDwIaGIQwZMCqnkenc/gGrrTCAV0ZmpzHxKzgL6G2JZNJIVVDBv1dF+852PR4IeFNLPMrP83UiDOidlN7lMP6mwx6a3ICPWR4aYcBiMuoVp/97p1NSLqWBySVUJ9+inZYy0FcDFFL2ROSeD5VuEqG+mIp6p0aclpGpei3m+2apCVBCPyfQBRrRcNyBGOhT4iV2yRptK1b59wnYPV5rEfUpiayuw2vg= X-MS-TrafficTypeDiagnostic: SN1PR15MB0175: X-Microsoft-Exchange-Diagnostics: 1;SN1PR15MB0175;20:zgjqDJuh3Ty2iOSOnpW99BH1QHlin1Wi4FFp7bXmKFL0XHcV6GafkGwECfka8uHsWJ1AYGwKt321B7Ptqal131vwkAahIJdWUMDmfpYTI2IuTZyill9fbZJhxg07PNZ4stC5XSN60NQDsCdcKgx7XtcwfVCetBdkKWbD2g57151M+lQlqYTgosSDO4BbYKHgovhuXFSSprNCzj145O2TjFEOPkfuoprW1qnM/KSai6ACCD31XNbT+GZjGLa/hLeRksh0NZEhtAZ7jp+tbEbpGM/yr20UuXydolBRbCfIs73XPJTYNUTr/uhCTh31h2y8WvTGYoRZyCvWgRbJ8ASr00xE6pJRagpVyuYRZ4ctdfKvhBMGPbbaRHYVKWTjrZ8Dvq192i0ycLybWzLqvnnlc+3hYEZqk59ZYibiG15raV55a0ASEFKVa0wca1vYTJX/jZ2mjRKhpf7kQOWkxKjOldJ4azh35uFZfDngjXeHYTuos0UDbx+XuOlIAXv+v9ra;4:qY+S9EH4JSH5kQKpqXIkk0Kn63Pq7FQpHglovodD68JTmd48GbamExN1HlERcY8Q9xQ3oQCQAHVIgbkUvg6XyernvutfGIQADlihDr+TCnt93R0chK736XQTngLeImymTORrH/X+dVWnAxhQmmJwXY0M1826mOQvCQmL70O64tIRvEQ0Zp2HWJ9wWmRYptpKELAVfxv5wzFZwy0dBCgb12dUkosxDlz5wJxHaJdL4B9/VURNcKJdyAPk7GRqb7NSQCwMR357u9JXTlEqLLej9ZVQUXcj8WT+JE7Nji4ExTSZR8hBjSOejiSePQInHJAe X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231311)(11241501184)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123560045)(20161123564045)(6072148)(201708071742011)(7699016);SRVR:SN1PR15MB0175;BCL:0;PCL:0;RULEID:;SRVR:SN1PR15MB0175; X-Forefront-PRVS: 073966E86B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(346002)(39860400002)(366004)(136003)(376002)(396003)(189003)(199004)(2906002)(6666003)(50466002)(81166006)(53416004)(8676002)(48376002)(2351001)(68736007)(81156014)(106356001)(8936002)(25786009)(105586002)(1076002)(5660300001)(6512007)(6486002)(36756003)(478600001)(86362001)(69596002)(7736002)(6116002)(305945005)(97736004)(2361001)(16586007)(316002)(52116002)(51416003)(52396003)(446003)(50226002)(46003)(54906003)(14444005)(47776003)(2616005)(476003)(486006)(6916009)(11346002)(386003)(76176011)(16526019)(53936002)(6506007)(186003)(4326008)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN1PR15MB0175;H:castle.thefacebook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN1PR15MB0175;23:pAhKgDpBpDOMZt8M28M76uYnl6txA4p611BUPIdI4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IRY88BurpExPtofGYGQUP78V5dVOAqtEfagvyZGRjipQsZwea/42XuyjjS/AsmUHgdRcw7CkaTQmNSl5w/E8C8MFaxU/uXdycvdSxZv+a3fD7cD5jp3f1TjxOQ/eXUCZtILzvi70LN0heFdO6zWigzYszdP2WdJzxG3pZh8XEzTwWNIT8TxeTeQJE3Y/RIz2FvPah98utFrIEqEn/ia8TyCizWt3kCSfcTGrDrCQahzNt/dFhvGMDYk0DyVu9ej6TpIsDUlzgxPzSfxegAHJjxlqtIjOOOXE0JCH0a3xA5ADXmWIQs3uHqA==;5:wQk8NtTas/qT2bhTyPSe0CafOR7ki6KxU+B6nU/6/I+MiGh9JGiRnnJPgIu5kZy1MVm8GqVyeiHbfaYL4t4f4CJBzsW6BzG5WUA3TV4YMQVVWkoqjYQlv7dSfSm3aQllIKP+Fm7ohtow44Oqd8T9+5+edZ2frHrvStNBZga5C0U=;7:+B9CLWTr1HZonaLsRaXcUw/dx0Oui9F8IlDT4m2wrpR+sw3mdYBgHQ2d2NyniG5Ljt3/CBqYVWRB2R7FfJyj1ZxEzFEujICOUOKJ9TAWAVm9wfBV2cj9iPcvHSXzdd8Z/KI38bE+ykJgBTEYCca9fz77twhbrxi0c/q4WpwrphhIvhFbaQog+IjvHzg2oWZqEIA1Zys5mCFohNaPdKFqPR3u63r/bFmq90wsYnFsrMeSjPuJQhMYLB7vQX77Pbby SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN1PR15MB0175;20:/CLhRWDqowtDePz5RbdbnryPJSXOLK5fl68Le7jHNTxv1B8wTbxeZC+maYWWeId15xhGGhjoVJSqcetXEBZEGNtg4YSBS4+pkERabyz1KMDJXEL7804KdjRwvbDHjN4AZjAlDmA25pBSdz9qV4mRJDUucrTxst14PSnhjbwj/FI= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2018 17:46:21.0360 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3c8d2bc7-b913-4239-586e-08d5ee68b4a3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR15MB0175 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-20_05:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As there is one-to-one relation between a bpf program and cgroup local storage map, there is no sense in creating a map of cgroup local storage maps. Forbid it explicitly to avoid possible side effects. Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel Borkmann Acked-by: Martin KaFai Lau --- kernel/bpf/map_in_map.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/bpf/map_in_map.c b/kernel/bpf/map_in_map.c index 1da574612bea..3bfbf4464416 100644 --- a/kernel/bpf/map_in_map.c +++ b/kernel/bpf/map_in_map.c @@ -23,7 +23,8 @@ struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd) * is a runtime binding. Doing static check alone * in the verifier is not enough. */ - if (inner_map->map_type == BPF_MAP_TYPE_PROG_ARRAY) { + if (inner_map->map_type == BPF_MAP_TYPE_PROG_ARRAY || + inner_map->map_type == BPF_MAP_TYPE_CGROUP_STORAGE) { fdput(f); return ERR_PTR(-ENOTSUPP); } -- 2.14.4