Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp86817imm; Thu, 2 Aug 2018 14:30:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpff+H85VExgr+6KZu6PZzSdaUu8zC+iB5eA6vM7Ik9gqtWXLY6k21VDIa30B9C7N4hBJeEw X-Received: by 2002:a17:902:722:: with SMTP id 31-v6mr973557pli.207.1533245419159; Thu, 02 Aug 2018 14:30:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533245419; cv=none; d=google.com; s=arc-20160816; b=EvCMcykKToubqL+SIpuWfVOYAhvmT9cQ/nbaVo4DBenvKZrSyBF42OWBruiGxShVBV K8nV9rjG7IKiPCbcBZbXu8us/U/jH001r8jrfuWCoMspWvQ35lgsf70Udr9rY8nJ/od7 GCa3Q7icwreu5N/c/OdKkyArjbfD/pQ3CRiMb+rZx96NPCoeZF5+09h/iKD3Flw8t9an 6jueJ/DaOVNBblwIrBUR2r8dJdoSgLqRIQZ8eYtHiPkSjKB6f6bVfcb3cV/2YlE6qS2W 70dJD1Iko9DUCxpc6Pm8lfOSo2G44PK9Zg37B8uje2HEkaImwgKwA5qwcUF+U3m+q8py WBwQ== 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=RSvnzZbxqpB/3Th05HcAZ6JQBrehI5zubaXptU8e4YlPlVQzKO6trKJoXSR9G4brHq gF6uRVr3GxOQb8LDMv5ZP/53eKEIKxGLZheiNCxLInU4opo1gDboPo68b4ML2YUrnVVO hO7xX0kXjLsw1opj80fd9HZefjyQx2O8AdPmNoLQJawUi1FM9rY3A7J2+qFK/4E7UWxz +Zyfc+3N0XKK1Pyqe9VbAIANUSoUETwgD72VCFN80tYUbQF4aOZalAHdGfoP8PSNBUFc IREKX+TB5wV8RSjmhVCWxod82HrsqA85YNrh+xR53Z07pHVdIMgG7hHJP0IAx30SG5Qp IWKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=rqb2Cs3l; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=UpOdc8Yf; 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 v21-v6si2143903plo.397.2018.08.02.14.30.04; Thu, 02 Aug 2018 14:30:19 -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=rqb2Cs3l; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=UpOdc8Yf; 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 S1732281AbeHBXV2 (ORCPT + 99 others); Thu, 2 Aug 2018 19:21:28 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:59164 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727262AbeHBXV0 (ORCPT ); Thu, 2 Aug 2018 19:21:26 -0400 Received: from pps.filterd (m0001255.ppops.net [127.0.0.1]) by mx0b-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w72LROUh012185; Thu, 2 Aug 2018 14:28:08 -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=rqb2Cs3lBB/vrmEwhHH0iChW97zYL17o2ZRlHtemdglQtcm+4szPSEXNEK9DF0TP+OV5 krFSRcvSb2ieds8LaIYbqWHHq2wHxTCCJ9mUwJRpA8tSe9Vdx7gXVjV9u6F1yZiDUznl +1SmBrcxq8KDe2lHD0fhLJsZX5Yo0bbloao= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0b-00082601.pphosted.com with ESMTP id 2km6jy8nt5-8 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 02 Aug 2018 14:28:08 -0700 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.20) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 2 Aug 2018 14:28:04 -0700 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=UpOdc8YfSeIZfPN0i1KJdIqir2EU1BSeR1IT3NAJUNFCIUVgMWvOHMA6IE3MSuNOGormupgvxasSaSmiGW5dNEavhZz1/gRSto4my/MQuox2AMGdLtjJQwGky1yI/mrIFd79+BhJmT3TRroMlcbvpyFYisVymfHjaQcs5/cKt1o= Received: from castle.thefacebook.com (2620:10d:c090:200::4:6653) by BY2PR15MB0167.namprd15.prod.outlook.com (2a01:111:e400:58e0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.19; Thu, 2 Aug 2018 21:28:00 +0000 From: Roman Gushchin To: CC: , , Roman Gushchin , Alexei Starovoitov , Daniel Borkmann Subject: [PATCH v7 bpf-next 07/14] bpf: don't allow create maps of cgroup local storages Date: Thu, 2 Aug 2018 14:27:23 -0700 Message-ID: <20180802212730.18579-8-guro@fb.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180802212730.18579-1-guro@fb.com> References: <20180802212730.18579-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [2620:10d:c090:200::4:6653] X-ClientProxiedBy: MWHPR19CA0058.namprd19.prod.outlook.com (2603:10b6:300:94::20) To BY2PR15MB0167.namprd15.prod.outlook.com (2a01:111:e400:58e0::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a85a6187-2645-4c2b-0715-08d5f8bed2f1 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020);SRVR:BY2PR15MB0167; X-Microsoft-Exchange-Diagnostics: 1;BY2PR15MB0167;3:vspuHGY0842SjXLonZpaAbNkrNA29jNyU+ryHD0ehqq6NGzjRl/9PJO+aZ1bhsfDEMuA0P2FwrkqbUrylFP/05yJ/ifm5D+T9gK4CuhgY8ruC/FW/n1Xx//0hjQF48YvxoG/+d3nNmkwpFXv0UuXnclxIuh8pxltg3EZtzDlJsPolJLyzLNi2DXB/KQSgp0mKYHvCc7qc4Ib1RNwxUxYuyebPm8y2XccB+kCDSPTUYTPaHj+qoCp/G3zmcjBp80b;25:Ft8P9cIYUAA/IzjvwIiOpwOyhs0Q5WuDloGqwhzVOW2qWL6AUt8OVZ4Q6WBlSVRBSN67a+4SOeeKiQPpx+LRyLsHwubFPxV1Kcv/gKO0bEWCmWvThZGhwKaL0/vIBQOfFnkYBzCGR+k8BgtiP7wLQbhSr0uAXFO4g4dmQTjVWzM2gwTxGlqNue/QzChC+gG0Bc/aMmS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Sf44XuLhKNF8YlBMuE7I4ChLa+WPJsW0hI2vt7wCiSFqBpCTLAi+3DMbfdLI6q/nW2YNO8k64cHfvpEfQCOD52YSDwkyg4NdDK99k+UWFwkdY5KUgf8TaBmPnjmERRUsRc5E5d3Ld2N5bYB83KU5LUm8OWgtQr0TD2M6vatsCjNp3tG8d0UL2G+2igyXZuRTp14iwouLfSypqpwVUKU 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)(3231311)(11241501184)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011)(7699016);SRVR:BY2PR15MB0167;BCL:0;PCL:0;RULEID:;SRVR:BY2PR15MB0167; X-Forefront-PRVS: 07521929C1 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(396003)(136003)(346002)(376002)(366004)(39860400002)(199004)(189003)(446003)(48376002)(2906002)(97736004)(86362001)(1076002)(305945005)(8676002)(186003)(8936002)(11346002)(6916009)(6666003)(7736002)(486006)(6116002)(2351001)(476003)(14444005)(106356001)(81156014)(2616005)(2361001)(105586002)(16526019)(478600001)(81166006)(69596002)(47776003)(46003)(53416004)(36756003)(316002)(53936002)(51416003)(4326008)(52116002)(50226002)(16586007)(68736007)(54906003)(50466002)(52396003)(386003)(6506007)(5660300001)(76176011)(6486002)(25786009)(6512007)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR15MB0167;H:castle.thefacebook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR15MB0167;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FQwnU4hxJnev+96bib8b/JJRfml7CIQlEtqoMoE3TKgtIeHFvECDB27kmPTttQ2EtzQ6r4/shg6B7J3i6UUpwN8ZZk26PAG+yPlC56FyZ7BoNhsmYXvLOQRfxeaQ0vRsJog/1/6pc8tLinG3RCdMxD23mf+5oCiXxrN8geiq+7In/FV0SbiOXE3CLOdS9v+F7QlKDeqsqECRb5rVr52EYnjyZP2LawHfdFoPiOGHj4So9gly1kisJzYPR59EaTxOtPDhX3j6GY+UVA/xHt8AbtQsvyHmBk8T3HhT9TCidYIdEfJLo/ZPU8skN2sDm/4iQSyVyxgvpaCxMY66SUCqWA==;5:YNstZiax4nh+qoPk+0YcnPuocOOgCB9Iy58uNCR9H2BojO2j1Zsf8GYv+uqqg61npZ0laF5xN45nbyb4EGfeRzfwFl5S71LShE0HZfAa/0KlYJkl3z151Fb/O5z0FQfHnuEOghnP4Hs8Fo7st2RJ9v5540G8igacLVnqaiAaroU=;7:ygOWIANcgHWHO37K28DfVpunP8krnTzmL748N4hDlgrOFKiYK2NpBGAAH6iOO4z7iFnZ/rebZ2qR68ZDM+fOZy9J2Qr6jmRG/DVJHn8qPJOc4T3+xN4wM5TxC2qBhaEBe8pbViBZe9WUKDIBzOimlDBfzT1yNn+hPuQveEUOi3egIDCWmtfLS5WgkR5bWejRWGMoV+X70QKPpb6Xz1fME1uQGB1WB5yG9ykr4CEQyClq7a27lwubKXpqCkN05Qnn SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR15MB0167;20:tPWDH+77d8wc0y00e80S9BotVGo9xBr6lQ8oovjG8/c7GNQm9mWI+tnTe8XKlwHSZXf7JJ7wxXyfUeWYjyMwEv2QbG6LZY5xd/0y8UsUaGtTQA9aiUcr9Y5TyTN9WujACuvLHaQUNdZKSADRhkM47jE9AMYSe4Jpakd/fcJVFtA= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2018 21:28:00.2392 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a85a6187-2645-4c2b-0715-08d5f8bed2f1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR15MB0167 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-02_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