Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1410007imm; Wed, 1 Aug 2018 15:42:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeIlA08UhqObtgmnUk10KUZyB6h2L+YP0+hQdr1IVyuKY0Sjo9WmrTwF3FHRiDcaDMjKfA9 X-Received: by 2002:a63:844:: with SMTP id 65-v6mr238382pgi.406.1533163324182; Wed, 01 Aug 2018 15:42:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533163324; cv=none; d=google.com; s=arc-20160816; b=skabKAW+kZfZVehGkzD3rfdv1GK4B4o4fLwatEEytuGT8RlSSF8pd7+pQMTCEo77D/ B4O7sSC5A1vLWVFus/lICr6EvdyYtIGbCTdzcPc9bquoRXZnhtYH+liI28R3DKktHEHN WO0XEwswu2iE+OT7GmTRdUc/EuBGBNzNvs5uohgCiYa93Be+YRV1mlCe6fzzeB8Yqo0s 29LN+sycE+RpFcLeDbF9RW8qOZQyrSSTYv/d3wbE/Uh4IqJRebGrpn30Q9zjzsOzXtmz 2NepHL88yaDXoUbBx0LWec1lVwG/DFey4O3cmE0+7ta8zfj79pxO25qd138LUkakmC14 JibA== 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=AM4S86SAov1vqC/t/Byrpi+v/WUhoC6N2CUpFGXbQPZRSyFn8cmmkwz/hpeMHBW6vB GHTl/c6FnJBy5PD80X58avLHAQmwg/bFO9ydsNcKx93urlgUcnAoLPyh8QFmzMEkUm1k btBOZ/bhPdcRC3tZSiyYax0+56z3Su4BQxspzegignL/PVX5aOwPfUWib9Gu/RUEE9tH K9bxbXKJtwCw6XD34ECcQUTvn2MYTH/NqQKvDh95FPCWlayfKXr89HJQnNAy3pS3Nyjp gesC/PCMQQxdApYkSh2dXTZEgL1qqn1eXmnjMVbWynAVwXSHYqj6ieMHx8vohG8IH/xd Ac1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=FhMxhbfE; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=UmJD32fy; 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 11-v6si148885plb.383.2018.08.01.15.41.50; Wed, 01 Aug 2018 15:42:04 -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=FhMxhbfE; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=UmJD32fy; 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 S2387537AbeHBA0v (ORCPT + 99 others); Wed, 1 Aug 2018 20:26:51 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:54032 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730632AbeHBA0t (ORCPT ); Wed, 1 Aug 2018 20:26:49 -0400 Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w71MYfoo016468; Wed, 1 Aug 2018 15:38:25 -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=FhMxhbfECWZ89m8I8hYWKjJLQNxns0xhX2bU+UFqvRd//9hWYT1OG4grPiq1sKp56JHm NSglJydc7MeoLkkWjC3xlFfMnAUeMIOQsA5D3xwooMEZZcbmnGKWdfDyOoLkd1OQ+KOa 7gLjfPwHQA9Mh8PNFYQUlvYaCSB9aBKSem0= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2kknrj80d0-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 01 Aug 2018 15:38:25 -0700 Received: from PRN-CHUB02.TheFacebook.com (2620:10d:c081:35::11) by PRN-CHUB09.TheFacebook.com (2620:10d:c081:35::18) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 1 Aug 2018 15:38:24 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.12) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 1 Aug 2018 15:38:23 -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=UmJD32fy3G38h/pSOlhqJcDRGf1Pu1WLG9IdY7RONNm1uUJA2IREpk8VJDGnpqWO8j4QKfPQlgv9d48VxNWSv7EePGqzZahE4q04qMndIDv60XJM5YpIoFigdTp9tZsu7SU9AqLQRgl42ZLYHrLllGB1LbgUa2MSpm+rInP2FQc= Received: from castle.thefacebook.com (2620:10d:c090:200::5:7cca) by SN1PR15MB0176.namprd15.prod.outlook.com (2a01:111:e400:58cf::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.19; Wed, 1 Aug 2018 22:38:20 +0000 From: Roman Gushchin To: CC: , , Roman Gushchin , Alexei Starovoitov , Daniel Borkmann Subject: [PATCH v6 bpf-next 07/14] bpf: don't allow create maps of cgroup local storages Date: Wed, 1 Aug 2018 15:37:33 -0700 Message-ID: <20180801223740.11252-8-guro@fb.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180801223740.11252-1-guro@fb.com> References: <20180801223740.11252-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [2620:10d:c090:200::5:7cca] X-ClientProxiedBy: MWHPR1601CA0016.namprd16.prod.outlook.com (2603:10b6:300:da::26) To SN1PR15MB0176.namprd15.prod.outlook.com (2a01:111:e400:58cf::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 54ba96b2-2991-49b9-f627-08d5f7ff7c41 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020);SRVR:SN1PR15MB0176; X-Microsoft-Exchange-Diagnostics: 1;SN1PR15MB0176;3:Lm1PAn/7eVZSjUz6hHhbb44NA6O7+o5xMPXYnIAjU1qVm4E7ZH9BAANcDzj2wR0oIscTigmoAIq/vNWOgEtsRHTjxE4JNrkowmg0oCsHI0C8XJXqaWA7bzmv7nz6KBzOjNP1VZ9f+cbLceV/msABIVMG6ivZUs4Lqwt50wyAoQAHCsUiTduEoTxYHX/4il5fRWw/5Z/PpyyjdfGyl7lXTLsg8L9tGyVvX3t3LmnWUCSfYDDhdC+G8cBLSjhfQ6CC;25:A1u8nMeHMQSbHXIckaPEovGFZH4aUa/foPypmRP1qhOGcddYFkZjnre/QaByLoMq1kA2tkU78Ig4vWw2X5lurx8d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JzLulBGaRG7P;4:BZ/u3+MK1xKTPvGyVqkw1JfYU/hKV7W/r1QLUSlz9rU98sQ3CTMbXJT3uNQiFcRJZRyeN2cawMZq0vW8VXd8yn9cSydCjUIXoF0AdT50UipRoHob97ZKTo4UIfA9iKqZnPQIMEHvGLiKlZK13wvqJ4q9GVoZb0Mex+51UwwL+jtWYAKmD+dFSj9HLczuO/E44xBABay5k9aqmB4ORrXhXYPEfvliLnifCzS5nNw1p6/NM2G3hhFzdNmyi1k5/llw+rWFQnlIs5wmfZbnDKiVkkUFqLHFNktUyA4IPiINLFD6azQGAzvJ+qGrS20+kA6A 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)(10201501046)(3231311)(11241501184)(944501410)(52105095)(3002001)(93006095)(93001095)(149027)(150027)(6041310)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:SN1PR15MB0176;BCL:0;PCL:0;RULEID:;SRVR:SN1PR15MB0176; X-Forefront-PRVS: 0751474A44 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(366004)(376002)(39860400002)(346002)(396003)(136003)(199004)(189003)(11346002)(6486002)(6512007)(50226002)(6916009)(2361001)(5660300001)(53416004)(68736007)(6666003)(386003)(106356001)(6506007)(76176011)(105586002)(52116002)(51416003)(86362001)(36756003)(486006)(2616005)(8936002)(81166006)(16586007)(54906003)(478600001)(50466002)(316002)(81156014)(6116002)(2351001)(69596002)(7736002)(1076002)(52396003)(14444005)(16526019)(46003)(8676002)(4326008)(476003)(97736004)(47776003)(305945005)(446003)(186003)(2906002)(48376002)(25786009)(53936002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN1PR15MB0176;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;SN1PR15MB0176;23:2G0Zb2r/ayRvQGnyKCgh9e9Hbke6CFyS8libfkDxN?= =?us-ascii?Q?g3KpkdyNF2MfReflI+zpva5eGYIGMVxItzHZ+673nfsBxUJrgBss2TJSv1Mj?= =?us-ascii?Q?VQADg4NkiPzkrNfC6pT8+yej5yZWCR2jZpSsUFEB0dPkqShVD5sQH6cxOT9p?= =?us-ascii?Q?hF5gkJdsVosf70tiVeRM15r53IMFi4lAxFxt4lp9a9L/Ik4vypRt1OWUvmmB?= =?us-ascii?Q?XCQXTi9dkwYzo5NYnrmpTG5tboNOJPILYwIvs3ZYzeGy4zsyK3HtAIrno1vK?= =?us-ascii?Q?Kb9TROKjJgRx2XnVCXD15W4GUxucBjlUEjgkmge/eN759fRsggCV0+vWLOSZ?= =?us-ascii?Q?7NtIF6lo8B1LQeza3/LyL+yK1J1ndsUWGdeuHkeXUI6xFO7nhiXOnnocNrdX?= =?us-ascii?Q?3tQFzEH+DHJ3R0eNrFetxeg5oqGRBDr+D1bunNOgGrNsOJG8EclTbL2Hm3gM?= =?us-ascii?Q?nefk1bGK+gd8qVVGpOgPBOM9vLH4o7Dv2Ge9K8oKXDMYvaYoZF1y+o22R+Ad?= =?us-ascii?Q?Z49u/Db7MJF9jznM8zWlFAJ3NvsVOxx3XMnGPeHwsu+d0RHnEKb/GaMb17uR?= =?us-ascii?Q?O35Aj8HhlHBgTjqqWExaU5V7sFvTtxQQXnKADHCkCTwoPpS2697Xi3W10YN7?= =?us-ascii?Q?nmUYCQr3kPcBQziJHp1cR4a4VH4IBBHC+jRTZJaQ9G1y8sf+5A2E/L08+Wyr?= =?us-ascii?Q?pPMOAjIPqKcw2qEcW74LKXfXzMURKsMvZjOzTaWA/do/OmDE6o8eHWR1nsnt?= =?us-ascii?Q?6pJu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Nb6tRgB6Sp73oA4WbELqFrfBwKJbQWjvEtHMLk8uxXhseyfeecNw6yiQfNwyIWUvdn+QZa4XeBuY+5QzpgWGIeOOvM= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2018 22:38:20.9996 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 54ba96b2-2991-49b9-f627-08d5f7ff7c41 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR15MB0176 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-01_08:,, 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