Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp714rwb; Tue, 25 Jul 2023 10:59:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlEdUh1nYRhl/l4MWmxvkf6LXqRit2v8LjPCZCnr2qltVmBcRGNoZe7dXMAuDDsrfmxrgy7Q X-Received: by 2002:a17:906:3013:b0:992:5135:4106 with SMTP id 19-20020a170906301300b0099251354106mr12382663ejz.29.1690307953891; Tue, 25 Jul 2023 10:59:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690307953; cv=none; d=google.com; s=arc-20160816; b=wNWWAy4dZfMZ7uVVjhOaMghqncrjkoOwrSwL0p0djQctJ8wy9MoN0bdUCZAkVF4+sJ bUzFBRV7m087nLhDZfbOZSUrQNdzuqFg0izMH2Hs0qkjoCrowfrERcbDps8XpKw8L11Z kV+rP3D3zSIr8X2D9KFKPENpkLuoXTiLL7TU3Y8uVWRDUlZLj1pE/qqVf+PEWgnuCN4H UeKnn3PshidS3m99EafAL/bVYufcshBkLpA1YNIHtSTeVISv1nApaCRloN1glSDk/ERn K9YrEAFyiTxYV0P5UR1PuOKxpjhuY/+zDYHPvui3ZFZhulXELGiV/olmyViZpFLGZp3+ XgtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=EHcSrzVLuqg7vsezDCAcR+Ts57qI809p7b33W2KdD0w=; fh=xPNrP+FsJ2+nncN7M9gBrfA/CapE58eI66oGNZbc9gg=; b=Hum/w3AG4TRP0M1hVCS6HiLeCFlvnUdyODB3vgYx3I1lpbPWGTKst4GqsElfOXTdra GNtahfpJg5JNU2F3f7nIGXr1fJIidYIThk2rVRVjQdrQZjwPQbKaMfv3yT/wUxWGff5t ypi2Vy1zMd9bJN/+PP6++B5n9UKVVG0hXH5Ov2iw2IrZEIFyDYiHY/izBUe99DWY8fUw m+vt8bYBhfQkLM5E1bpSR6uzC6QCxT2J62DFYN7DZMqQck7BMEuid8W1z3f0VsEuqhy2 FKnHi2XmMc+ovNp1ZuOQ6AIr3UpfFFfIZM7SMR1tz8+LSTw45Q1GRJJH9fT55IY8JOZv Dd3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=whGT7e5e; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g24-20020a170906595800b00992f45c9348si8187778ejr.1010.2023.07.25.10.57.57; Tue, 25 Jul 2023 10:59:13 -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=@linux.dev header.s=key1 header.b=whGT7e5e; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230430AbjGYR4e (ORCPT + 99 others); Tue, 25 Jul 2023 13:56:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229626AbjGYR4d (ORCPT ); Tue, 25 Jul 2023 13:56:33 -0400 X-Greylist: delayed 61383 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 25 Jul 2023 10:56:31 PDT Received: from out-55.mta0.migadu.com (out-55.mta0.migadu.com [IPv6:2001:41d0:1004:224b::37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC9A3194 for ; Tue, 25 Jul 2023 10:56:31 -0700 (PDT) Message-ID: <87fa06c9-d8a9-fda4-d069-6812605aa10b@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1690307790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EHcSrzVLuqg7vsezDCAcR+Ts57qI809p7b33W2KdD0w=; b=whGT7e5egGQVoPWhvX97cwbVVw3dUoUz9IAVmNp7vYZqlB+Qk/L3M6BbtJSM+iNCmYDXgK jKslWJg5b1CpTf7FDTiy7k4Hy4bYDt2Re8klOcz0zUt9+2NcBzW8FJE+zR7yw7KCaf2/tn hhr3zdTjr6IvqR+0PIGG8BC9rKzDqEY= Date: Tue, 25 Jul 2023 10:56:23 -0700 MIME-Version: 1.0 Subject: Re: [PATCH 2/4] io_uring/cmd: Introduce SOCKET_URING_OP_GETSOCKOPT Content-Language: en-US To: Stanislav Fomichev , Breno Leitao Cc: asml.silence@gmail.com, axboe@kernel.dk, io-uring@vger.kernel.org, netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, edumazet@google.com, pabeni@redhat.com, linux-kernel@vger.kernel.org, leit@meta.com, bpf@vger.kernel.org, ast@kernel.org References: <20230724142237.358769-1-leitao@debian.org> <20230724142237.358769-3-leitao@debian.org> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On 7/25/23 10:02 AM, Stanislav Fomichev wrote: > On 07/25, Breno Leitao wrote: >> On Mon, Jul 24, 2023 at 10:31:28AM -0700, Stanislav Fomichev wrote: >>> On 07/24, Breno Leitao wrote: >>>> Add support for getsockopt command (SOCKET_URING_OP_GETSOCKOPT), where >>>> level is SOL_SOCKET. This is leveraging the sockptr_t infrastructure, >>>> where a sockptr_t is either userspace or kernel space, and handled as >>>> such. >>>> >>>> Function io_uring_cmd_getsockopt() is inspired by __sys_getsockopt(). >>> >>> We probably need to also have bpf bits in the new >>> io_uring_cmd_getsockopt? I also think this inconsistency behavior should be avoided. >> >> It might be interesting to have the BPF hook for this function as >> well, but I would like to do it in a following patch, so, I can >> experiment with it better, if that is OK. > > We are not using io_uring, so fine with me. However, having a way to bypass > get/setsockopt bpf might be problematic for some other heavy io_uring > users. > > Lemme CC a bunch of Meta folks explicitly. I'm not sure what that state > of bpf support in io_uring. We have use cases on the "cgroup/{g,s}etsockopt". It will be a surprise when the user moves from the syscall {g,s}etsockopt to SOCKET_URING_OP_*SOCKOPT and figured that the bpf handling is skipped.