Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22478226rwd; Fri, 30 Jun 2023 08:28:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlF3s95R504Cyl6qznpZW5p/AOUfE6d7xmJqOGBX+G43ZTH8iWk5jJ4SoWWgOAYRaGMSoILo X-Received: by 2002:a92:d307:0:b0:345:c72d:33a5 with SMTP id x7-20020a92d307000000b00345c72d33a5mr2622423ila.19.1688138935427; Fri, 30 Jun 2023 08:28:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688138935; cv=none; d=google.com; s=arc-20160816; b=mMy/5sRuMGb8A0o0g/QJwtOQA/qUSpCp5d9ZO0+zpby4/I+zVn1Zg+Pnf3VcB7uKCu o12q/D+7R1PaulkcgG+zMq4gZHRENbCvLn2k8JhBgtQhMdOg1fTIALOEfu7trHVBB2Pe 5zWzpxwelCCe37V0hqjNydMXGe2o0rsfmjNdOW1VIBo4N3Z9/H8gZCoD+IxobMS6nKeh y9Uh731WWfQeE1qrYmcimVMeo4ug3cAIc+2x197OfV8dvpOw1Kcp8z7xfgePit1eTQBt lNSCA3P0mAMPVYPPXKfynnKY5IS477rjBWFGSci9iYRLDw9WndCdD3xgeZUMRv5ZRQLO Zx/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=O2hR/KhNASLMJVxFauqxU4XhDOn7bSDTmrq/J7vDv7o=; fh=CbzlcU0CDDDp0M+Dq44VafVEtzO/IuimejOCzxM7aiE=; b=xAw5B5lhTz27xQGsqCfdDOglesyZyrCU4DVE2I+P526T3WIZCWwbPlB5jSAdZq4BDE ByVILY5ASwLbsbqfJb6H1EkjZVQahFrUhIgO+hYQx2f5OUR/eSxEP7UOx5KftWnjZuVc 4Ifbivb+DIOHOijS2cQV00wpH2sM5tjUeZ2b0fs9+iNIHpizuz0/i93VWc0hKVFrPhdi 6WvMcFfY+r40nt3VeAq7BBhzyhOwQzL0ajKBpwpgLqicodEDoDQfvGFJnpDukexnzZqs 1gg8VvumLBrlK89rjCr8sMALgfr7mPlmAPhMAh0shDwG1SloHnNWk5fniGCgj10gxL5k n8Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=TRZxNMjM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q7-20020a656247000000b0054ff7740abfsi12684711pgv.482.2023.06.30.08.28.42; Fri, 30 Jun 2023 08:28:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=TRZxNMjM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232425AbjF3PR2 (ORCPT + 99 others); Fri, 30 Jun 2023 11:17:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232527AbjF3PRH (ORCPT ); Fri, 30 Jun 2023 11:17:07 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9807644BE for ; Fri, 30 Jun 2023 08:16:24 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3fbca6a9ae4so30115e9.0 for ; Fri, 30 Jun 2023 08:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1688138180; x=1690730180; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=O2hR/KhNASLMJVxFauqxU4XhDOn7bSDTmrq/J7vDv7o=; b=TRZxNMjM5RO1JNNZKgZOR5RH0Yv5C4Vn/RneOeTsb/05jK/UeLFCidNiyWhwyUaf5Z aupF/jUOf2e3MicdLXmgIL0Ub+YmBEQYQcerycEdzdn2KKJhfmpJqDh7CqFLInXofjtP OZXzw+wFgvv6XOU1YSmGEQm+w388OMDhu2eXlR8bp70x8p6OC91xXw3YwfrQggnC9IC9 WmFbW3TVfFf9vavDHIWsGS928BqHQoqNa/G6UV10Fg8X3Rvaqzy7AQ9kLz3P4VzdQO/k 0vQSKmKKQJj0qm7Il8kPYMhj/Z7nil2hqR6c2Dhfm315YIX3rNVztxyRHs4/o8MfQDR/ HHkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688138180; x=1690730180; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O2hR/KhNASLMJVxFauqxU4XhDOn7bSDTmrq/J7vDv7o=; b=J+O/aD2ecrMif86f0CWkxNJhNyidySfZxOdoxkjphv2rXUeZytheOKo3VsYBTaqGTq qhfS2ONlQkGqxrNaGwigBiwa8Ab+jgeG2rf11YinZ2fKxYSEsoGM2f2QLQI1khzdpvnx Rr6sXRjvehFJBom/TmGvMDs3k19T4WX/nDtgCtNQyGQNBUOB09FR05ASFMA21Qcio7Ap QmSA3j8QkBfXbCgwFN1yome+uUJ7v7c3ltv1/xAFex27fhu/5YMCtxC8okgyR+VtlWB1 JVJP4su5aitpodUUcvtbymkaifgS0gF5SWLjYFK2MCht5QmtG/lfVsal1BZJLqvN+xPf DDaA== X-Gm-Message-State: AC+VfDyG3shOF+q3m3RKD7xG4tMIfcoO2UxxkaO0Q6eXXs5oqtyJRU3u VX+YRY6EXFstiRn6lm4ie07oKIeMp6iFXBx4NnZPMu0qbhY4KoZZ8HQ= X-Received: by 2002:a05:600c:860c:b0:3f4:fb7:48d4 with SMTP id ha12-20020a05600c860c00b003f40fb748d4mr378270wmb.3.1688138180627; Fri, 30 Jun 2023 08:16:20 -0700 (PDT) MIME-Version: 1.0 References: <20230630151003.3622786-1-matteorizzo@google.com> <20230630151003.3622786-2-matteorizzo@google.com> In-Reply-To: <20230630151003.3622786-2-matteorizzo@google.com> From: Jann Horn Date: Fri, 30 Jun 2023 17:15:44 +0200 Message-ID: Subject: Re: [PATCH v3 1/1] io_uring: add a sysctl to disable io_uring system-wide To: Matteo Rizzo Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, io-uring@vger.kernel.org, axboe@kernel.dk, asml.silence@gmail.com, corbet@lwn.net, akpm@linux-foundation.org, keescook@chromium.org, ribalda@chromium.org, rostedt@goodmis.org, chenhuacai@kernel.org, gpiccoli@igalia.com, ldufour@linux.ibm.com, evn@google.com, poprdi@google.com, jordyzomer@google.com, jmoyer@redhat.com, krisman@suse.de Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 30, 2023 at 5:10=E2=80=AFPM Matteo Rizzo wrote: > Introduce a new sysctl (io_uring_disabled) which can be either 0, 1, > or 2. When 0 (the default), all processes are allowed to create io_uring > instances, which is the current behavior. When 1, all calls to > io_uring_setup fail with -EPERM unless the calling process has > CAP_SYS_ADMIN. When 2, calls to io_uring_setup fail with -EPERM > regardless of privilege. > > Signed-off-by: Matteo Rizzo > Reviewed-by: Jeff Moyer > Reviewed-by: Gabriel Krisman Bertazi Reviewed-by: Jann Horn