Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp21149414rwd; Thu, 29 Jun 2023 11:38:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlGWamOyaYLKs8Q3projEhKCIxjTmKq734hNqJNTGgKIGh2fhpTH4/LV3MNk8nwWJUOorbIt X-Received: by 2002:a17:902:dad1:b0:1b8:4485:6971 with SMTP id q17-20020a170902dad100b001b844856971mr4808224plx.60.1688063929095; Thu, 29 Jun 2023 11:38:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688063929; cv=none; d=google.com; s=arc-20160816; b=PVLbtnEssH2shZFcppoKYVjGhbUitIaMlg/quKQlvoflUUEaR5Kww6dagFtsZ9OvrU CAgLJquyxX6w3mGHdM9rgaNf3RjauZxCn9/9BAXfJ/6H15wkncMkQgTqnQSsGhyY4tym j8d7yCfhqDZvOWN2DogrW++V8exNCYS5M2SwuSxGcxowD7dseCew1ZScno1/pchFVYwt kBVhJMBQ/IyyedYCJfNuPMQqba+hcjJggM1/z+GCwS+1d5Bn/A6wSaO+ULkxgL2S91IY zQj5YpuTvKzMDfYgl1jKOzFTqtSaAuUd+lpF469QHAVi7NZm3snPT/VEOMFNK2OmeLlS C7KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature:dkim-signature; bh=NpDYPW1OunBedfGdGzw//TqToXDXavsydJ4o33sx74A=; fh=S/zG86ynn7myFRCQobgtHcxfNyzxLL0y02Z7pRV29sY=; b=UwbGhx5jZUpQcDa2gww6hDNwA7MZjfs875CM3QXjARFk7rvPW1XdrtzDcdA25Tvrlo R8txh8b6oiffoaxYN8pSQckJZEzyOR3EgDyxpBmH2xiPXU2R8KteKZFRHiGoBtpRvtzV ERngICV3C7CEpwZOfQL8bHJ91eyIrJL8JGQj63GwsMVS8AbrM4iMiOD9voJB9PtfTeiZ DuhSRRv5QgaB/Swy7xtbOYFYBiHqjLUQmV9XmuQdT8qFwkBhF1BCDrzhD4zBZGxRueYE p2IHdmgaYGaMT/V0Ii6YMo24JOB/CqBN/zozzUaM1X6r9VzJWswCmR3ixbDLLrnnmcsD Qt7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ipKHiUiQ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iz19-20020a170902ef9300b001b7e0039e31si10319018plb.170.2023.06.29.11.38.35; Thu, 29 Jun 2023 11:38:49 -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=@suse.de header.s=susede2_rsa header.b=ipKHiUiQ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232099AbjF2ShB (ORCPT + 99 others); Thu, 29 Jun 2023 14:37:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232351AbjF2Sgl (ORCPT ); Thu, 29 Jun 2023 14:36:41 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89511E4; Thu, 29 Jun 2023 11:36:40 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id F3D5A1F74C; Thu, 29 Jun 2023 18:36:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688063799; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NpDYPW1OunBedfGdGzw//TqToXDXavsydJ4o33sx74A=; b=ipKHiUiQ6qzcSpd/TokouNutQLqy2LdK4UkX03Ga2GJb/az+OtniBt0jN0L0d9qgcL7mXI g0HUYfMcgVVnpNLJrPe25D90ZcbY93evm3xf4KHGazyF8rwOjbfGzXgdykHAVcWU3E/gNt VoPsxhY64T7hraqzjQaW+e995awKs1E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688063799; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NpDYPW1OunBedfGdGzw//TqToXDXavsydJ4o33sx74A=; b=NHxMeELHtPZieSmsEYTo39T7CUlgWs3BqZPrJ380WjaUbIMxygZ8fW4JRT6VecAf2dDya+ KG+JNzXg6IRvb8Dw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B3AAB139FF; Thu, 29 Jun 2023 18:36:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id m/VpJjbPnWRXDgAAMHmgww (envelope-from ); Thu, 29 Jun 2023 18:36:38 +0000 From: Gabriel Krisman Bertazi To: Matteo Rizzo Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, io-uring@vger.kernel.org, jordyzomer@google.com, evn@google.com, poprdi@google.com, corbet@lwn.net, axboe@kernel.dk, asml.silence@gmail.com, akpm@linux-foundation.org, keescook@chromium.org, rostedt@goodmis.org, dave.hansen@linux.intel.com, ribalda@chromium.org, chenhuacai@kernel.org, steve@sk2.org, gpiccoli@igalia.com, ldufour@linux.ibm.com, bhe@redhat.com, oleksandr@natalenko.name Subject: Re: [PATCH v2 1/1] Add a new sysctl to disable io_uring system-wide References: <20230629132711.1712536-1-matteorizzo@google.com> <20230629132711.1712536-2-matteorizzo@google.com> Date: Thu, 29 Jun 2023 14:36:37 -0400 In-Reply-To: <20230629132711.1712536-2-matteorizzo@google.com> (Matteo Rizzo's message of "Thu, 29 Jun 2023 13:27:11 +0000") Message-ID: <87bkgyt8sq.fsf@suse.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Matteo Rizzo writes: > 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 > --- Thanks for adding the extra level for root-only rings. The patch looks good to me. Reviewed-by: Gabriel Krisman Bertazi -- Gabriel Krisman Bertazi