From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC94EC001DE for ; Tue, 25 Jul 2023 17:58:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231561AbjGYR6C (ORCPT ); Tue, 25 Jul 2023 13:58:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231234AbjGYR5z (ORCPT ); Tue, 25 Jul 2023 13:57:55 -0400 X-Greylist: delayed 81 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 25 Jul 2023 10:57:54 PDT Received: from out-41.mta0.migadu.com (out-41.mta0.migadu.com [91.218.175.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 792571BE for ; Tue, 25 Jul 2023 10:57:54 -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 Precedence: bulk List-ID: X-Mailing-List: io-uring@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.