Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1300837imm; Fri, 27 Jul 2018 14:56:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfwuM9GlIoqdEWp3PLopu3DKhAgUWdAmnmy3iCT6wKNkmRDQXn+S9xIhESynFeuZshIkN1K X-Received: by 2002:a63:d244:: with SMTP id t4-v6mr7632459pgi.335.1532728583808; Fri, 27 Jul 2018 14:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532728583; cv=none; d=google.com; s=arc-20160816; b=AGgGnyn8RzU6n95oDdYcV7+Vk4uXbZxXBlOwYQBT0/iReC/q6/I0WLxPD8l+INrdqy 0SYwA5bv9L7l94csRMUsdM0EeRHPYlB9Enjb5vP3LjxGaMUb9XD6/jTMebIdwcoELfeI SF5Rr4zXvlZ8SNHCOk6/C5OSjbD+QvTpJtGiuSNwBpkKKFdRk20nRc8As32gIV7dijxb RzAH2I//a1Topv1LeV7IWCS2HhgigOkfx+5XBHjv7fZfodM++ORt3CjmFVGE0HIiy+Rr MQw4gdkbtF0JIf+FRU/GDqNNqTwk9Jj+eYgp7PCkgNEv2ycVMbO4shYr1VM4psg4ebpM K5DA== 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=EScpjSWxz0MgyYunaaxWKLcKu96+lPe1kdzQiyXYUGf7GjMDcouUhVVIfiBQG2WE9l AbecKXE151N0jDo6vIJownet2HGN/D8k8zdLGcLHbf0Q2XIGNmtQMLu33NMa72olkL/Q XZnNH9yERsV/x22ZLH0fpUqdR1lKgGYEmDGdn9umYd2YC/CdvbmZZpKXXDizORdmKgmj ZM5E+d9c34EE7JHC+GGZQUEYTA6ioIjVQ7mLo2gzgHL/azKNeEHrdrgz8as0zVu1uMtu iuPzSCi8SW5ETegYR1ZgVU+M2LqLpKCwzFT1Jx/Y9sER/HzAlrXZDz5C2hYDdygFp9VY jROQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=MkYT0i1D; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=KQJ2OgnR; 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 t128-v6si4246919pgt.614.2018.07.27.14.56.09; Fri, 27 Jul 2018 14:56:23 -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=MkYT0i1D; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=KQJ2OgnR; 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 S2389981AbeG0XRV (ORCPT + 99 others); Fri, 27 Jul 2018 19:17:21 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:60008 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389907AbeG0XRU (ORCPT ); Fri, 27 Jul 2018 19:17:20 -0400 Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6RLiF6s032150; Fri, 27 Jul 2018 14:53:10 -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=MkYT0i1D8SAxhmBLmVG25nDTer6AuWBynnENivMGvj6jOpJNGFEdON9vVhkSWU62cM24 V/lLBV9WohGC7osrECCgyTDSK9y22GU5Mm0WavQji1Czi0VgFn/yZTQjt3ft0EiYy+RS +Lh1J8ZdS0/cLgIulCByLAgW898BH1eJMHs= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2kgb52r2t4-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 27 Jul 2018 14:53:10 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.30) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 27 Jul 2018 17:53:08 -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=KQJ2OgnR8wcEApIZkSOROd7YxV69LL++/wqHH/StQp1MGZFj/ydHS0iEWQZHsfgrZEQEtEcZotxskOXaXFuQFQBy9lz1YIJOy2YxHgcMcNZglXIsbeo44ZnU7dGstDWr/wFqQtBxAyKoY6DW973452gOe9h8qhRSbs1dgdP6Mdo= Received: from castle.thefacebook.com (2620:10d:c090:200::5:fd07) by CY1PR15MB0171.namprd15.prod.outlook.com (2a01:111:e400:58bb::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.17; Fri, 27 Jul 2018 21:53:05 +0000 From: Roman Gushchin To: CC: , , Roman Gushchin , Alexei Starovoitov , Daniel Borkmann Subject: [PATCH v4 bpf-next 07/14] bpf: don't allow create maps of cgroup local storages Date: Fri, 27 Jul 2018 14:52:36 -0700 Message-ID: <20180727215243.3850-8-guro@fb.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180727215243.3850-1-guro@fb.com> References: <20180727215243.3850-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [2620:10d:c090:200::5:fd07] X-ClientProxiedBy: MWHPR11CA0020.namprd11.prod.outlook.com (2603:10b6:301:1::30) To CY1PR15MB0171.namprd15.prod.outlook.com (2a01:111:e400:58bb::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ab4f1599-5a64-4e2f-215f-08d5f40b55bf X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020);SRVR:CY1PR15MB0171; X-Microsoft-Exchange-Diagnostics: 1;CY1PR15MB0171;3:oGrfPXUG/gOoho6n1MzbY7YjiklUeJ3pim6XltqgxghXNE+TuVtudb0SX+RuxylBI+HmE33HA2Xvm25Fs/4cJrF18v26APN6w+eCOQ7ExibMUbubU8GAiTn5t53Aw6Y+8fQRtoMZKGbnHocwFFDx0ZBY9j8GmJ111cgrfPtP9O08EpH7QMAVylC5ko2lu7DRImOkxC/iKvJqUHu/L5vv9EsLmCGMqxkSQAo9DuxdKAphEvptKJjdujTWB/5bvlAv;25:VKa8OgooCwQ5uobfSaTIAwfZViDhoK8v4mTWjv/SSdMMGXOZmGfwWld6gY/MGmVPwrCIkKw9IwbopvoNy5m2glR99Y3CHS3xPcrKh7FRBUdjcq5+uN7Io2/Jhr2BKTbYxKbHyXJjtYDf3YbUolYeq3fxlX7nKqJ6Lb6P4n8XmlifYzpyCQAYlYbVkXyoiyExYPzLrNGw0dhX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wAohZgdaqJlKUZrE9jwCkS7HjlOLOj8lRes3H7pt0PSXEbMIssKYn4pW8QURD1SSUASI22MhBmCCIp6b/dgHvOxMgjxSsLjtph441/nxviubiCTen/61iItQF6vhJRXq5OtFYtuoLU4n8O+rbVYqUR/MwYrNSFxXUg1qw/hNXD2uRKU+SNye5HU0pTVVge0CV9fwck+Ref 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)(5005006)(8121501046)(3231311)(11241501184)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(149027)(150027)(6041310)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:CY1PR15MB0171;BCL:0;PCL:0;RULEID:;SRVR:CY1PR15MB0171; X-Forefront-PRVS: 07467C4D33 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(366004)(39860400002)(136003)(376002)(346002)(396003)(199004)(189003)(478600001)(36756003)(52116002)(76176011)(106356001)(52396003)(316002)(50226002)(53416004)(51416003)(6512007)(68736007)(50466002)(48376002)(105586002)(2361001)(4326008)(53936002)(25786009)(16586007)(54906003)(2351001)(97736004)(6506007)(386003)(305945005)(7736002)(11346002)(446003)(46003)(486006)(2616005)(69596002)(6666003)(186003)(16526019)(5660300001)(47776003)(476003)(6486002)(6916009)(8936002)(86362001)(6116002)(14444005)(1076002)(81156014)(8676002)(81166006)(2906002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR15MB0171;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;CY1PR15MB0171;23:WB2Jj8KB7SFv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yx4IRD9bQN2Ak41/LMp3dUa/NozGMs7B+PChV+naiOiSHM6q?= =?us-ascii?Q?fP0WDMFkBllrMI6WigNlTBNn8zX4ay/2HNt0VIFbchl3cyGkLm7EzPT/oqdM?= =?us-ascii?Q?xJGdZozFxRwhupW5+rmBrJ0aOzGYEcXels0QzjxkldIs1+BpzBp+M9lwLS8u?= =?us-ascii?Q?MwpoLyrSKgUoiMu51VVrmvvrWICvYLLupI/GD59fXNd9ts3Jb2dBry9vGWs0?= =?us-ascii?Q?naDSeof6y8bl2EYDHHIbLh8Il5IhxlGUwEsbig7/R6BO9iaLheXBwNZYPGxn?= =?us-ascii?Q?Zawzli6eK+GIODddqpbNrwDFx8ZHzp9cLaw4nmmiA8MikNqnzO6G+DccXyI6?= =?us-ascii?Q?AcjFK13/QvtI3JxKtM9bLZyhngtoFli897IKpuil8pm2f+Z4x6nHFgyJ3ZNE?= =?us-ascii?B?QT09?= X-Microsoft-Antispam-Message-Info: BjQEa2ErOx4vp5mBw1CitBo+X5gMSTn+wQ1shYN+IQYVF9qQ8THFuQ97Pd9AhseaoIQ0Nnd/KVl1/UyDV/fS312ghR7P/YwJaMvJJA3mHYivwIpPn6uAHO/PVm9esKwMddzsEaeOIp/6nNYxW81wl90PXq2vmWHpGlu03jyszrw2Ey3zRC0ZWsEFXwuvHNrvjW/B5/YYej57/MpW8qZQbxh4VEEzWROlGsZZFjFGnBjZs62qnoEYrKllXPGYtrNiH2bc2dTFKuAcOV6yimZtDQvBMZIiAkVRdSCFRq50YmohnIVH6GUN6CypwpiW6qf/6NWmAJAvu8BWYrcSkVcE9dtaWAyIRtOZmt6vRpUjvzc= X-Microsoft-Exchange-Diagnostics: 1;CY1PR15MB0171;6:t9rhnwGCRhWFKH2WbmKOTXAdw2FD2ie83Aw0yUHUp8OvkiRBbAO1EOrO6ESUUk7HeEtm426SNPi6/CZ7oWL115mOhDf7D2g+XSz7ehbQUuL0wcWYlch/prMn4LdYchTS2PP7EQu2jyBcCwfgOjzOEiHkCNxP/aCxl5bKJ9ZhrPwdaGqFyly5Ww8i2lQ4uGwPGvel/qetEABK2l3kZL7d74hM7d1SIxU1wwsecXoF9EVNsZJPQS1fWPvyShIN4dsdQJRyBxyARr5D8yoBd0pv7b2vIhAlPm5RyQyIduIt4DafduH0RQSzY07ycwnd2v/EbqSt8vj1uaofwnKhwBXsSrPJcIbIzxsBche4Dx2VK2Z4T8FQEFABcHzDFqn5IWQFquZVUuupU+BGb1EZq/+CYTD1rC2SWG2w3LQ0Kq6EPXUpzvFyFvaXjqSk2bsnWfFyCO2F5E4S9Yl//V2wyR+udA==;5:QTFAVgoa2wE8Su8eo5/gnm/a2+1Xx0XBbByGHLUA/KUrN+/ynJ5npuNj6d1kSMDkd9JN1mkD7J48WRRzDMBIt/oocK/lMRPNaM1oXj44PxS/j9BMiDbmObiiZZ64vLwkvVTm1kir36HeKkLZzt+5EGVy2wsAgs/6Cnkil6E8tyI=;7:rYPov3r5JMAL8RcREBHfr9iuljUW0doE2IAC+2JDdSVNwd3RK7hIMX6GR+O6sVT3it1cWiUvKDoWX9IDNMAXWt2oo5ywI+w1efCk3PP1gtt2SHPvnDosdPjXQko7Dimj2eOZnVBfgL/RncnAN/T75S/I93zyPPTfYghed05ipnnbCndMbFwYOfK0r5m74gt0cl+bfslpfR7gNOnGrnHbwADs3Y6b7sAtQJt7QXUwQNiNnqaRAKT0WVSlxE0vMpMF SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY1PR15MB0171;20:Boyw2EddZ6DCuZ+wUHFm2VhaRovtjmr8GWz4AoqleSuvYaY7oUy555Hs9mp5EEB3TEfTOHC59Tiay3VuhqYmC3P1UC2O88Lhsk15Kfli8aTXvDak3BrjPItGV7phBJ2Su07EZE5AUdvcXmobeLc1Fp8D+NSN6IkcNECQhwM0e+I= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2018 21:53:05.8796 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ab4f1599-5a64-4e2f-215f-08d5f40b55bf X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR15MB0171 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-27_09:,, 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