Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp576561rdb; Thu, 19 Oct 2023 12:33:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFRnFasmwbeZfpkLbUlna1E4R3u2JAB02VXVTXvDGeyWPBn7v7zNWcX7C73/XKXN4dhIQl7 X-Received: by 2002:a05:6e02:2199:b0:357:4630:e98d with SMTP id j25-20020a056e02219900b003574630e98dmr4153260ila.14.1697743980440; Thu, 19 Oct 2023 12:33:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697743980; cv=none; d=google.com; s=arc-20160816; b=lDmEbcqghOrxVkE3C+2fTHotXf45NCoRdRz3+Xc12TvUo4I2gtk7heGolzLzFCv24P U3ujhAepzUEb9bpIAxecz/azqq8LLavUyJ6dIpUSwJKnNFdTked1X89S/oB8rRRF4GK0 WluQH6oDGRgMBVd0bXXs83bdT/fPCMZGazcMZ2uQO+9rj7cfddOlppzriGE7GKuusDyr w2iptp338eMpAnq/RHFaFf366pBEFR8t9ClSTBVJkOp2M8Y0CuYTLT//77KfKfDc1nfh +ijCyBf6qG5CXdl7xOTmffLTXKb954xBPAKGyz+QLfbY6qGXl3sdZgLlgG6Pmf8CRpq6 BcgQ== 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=ePx8zze/iKgcUVaE3WeK6n9PQs3/kF7Mbd+rW2MW/3Y=; fh=CntFv+biRsHOs6e4h5E8rlrA+bHoxUzfu6nr/Y3AdEc=; b=D/1tjbbD73ontpYDOJ00fVmYBAvC86ZK2/CSd3kZsy9vv10FgywCEtmikRRN4ZSmmm L33SXEvAmxIGXPdBTFve32Ut/qNHlwuxWIkn0y7FcNnIOn3lTpl25Ltp6wHL0sYVe1bg 1KusgOr/UpGFGg5SehoeYdUHB1REApTJCC9XMKp5QiDF7OHZ+xZquXCH7nMwOsaKQcAl jrlH7plDb3JlhB3lDrVIVIyMT/qWSF90VMnrdZpKy5wb81fGfxOmRz5fkz3Nxh+ZqWtI VPgSaYBuqiZXyHOCzA3ex/UBKqLA9DTgsRQa4nUJWN3ET4Oc5nup2FhqWT7p5I5aq0Me 9ehQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="h/pvnlOw"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id s24-20020a056a00179800b006bd7cfa8497si340438pfg.83.2023.10.19.12.33.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 12:33:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="h/pvnlOw"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 63484826C0FE; Thu, 19 Oct 2023 12:32:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346407AbjJSTcm (ORCPT + 99 others); Thu, 19 Oct 2023 15:32:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346133AbjJSTcl (ORCPT ); Thu, 19 Oct 2023 15:32:41 -0400 X-Greylist: delayed 1226 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 19 Oct 2023 12:32:39 PDT Received: from out-200.mta0.migadu.com (out-200.mta0.migadu.com [IPv6:2001:41d0:1004:224b::c8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80BDCFA for ; Thu, 19 Oct 2023 12:32:39 -0700 (PDT) Message-ID: <5faad529-4b70-7440-bcfc-087162188827@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1697743957; 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=ePx8zze/iKgcUVaE3WeK6n9PQs3/kF7Mbd+rW2MW/3Y=; b=h/pvnlOwySKO5pMmiVRA+NB3dECa4wXSv0wYkgTaUmyGiJg7SnEwaDIqYMqCoK3v+20mNt fLnEauTnk/n2Ej0zJDZ/QXWVVzV+TfYJBKOFVU2f/+0kZ01Qpz9oHpZvBmwOCxyyin+LCp y/NttlXLfUkfVuPrL5ZMcRMN//zv6ro= Date: Thu, 19 Oct 2023 12:32:31 -0700 MIME-Version: 1.0 Subject: Re: [PATCH v7 02/11] bpf: Add sockptr support for setsockopt Content-Language: en-US To: Breno Leitao Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, io-uring@vger.kernel.org, sdf@google.com, axboe@kernel.dk, asml.silence@gmail.com, willemdebruijn.kernel@gmail.com, kuba@kernel.org, pabeni@redhat.com, krisman@suse.de, Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Song Liu , Yonghong Song , John Fastabend , KP Singh , Hao Luo , Jiri Olsa , "David S. Miller" , Eric Dumazet References: <20231016134750.1381153-1-leitao@debian.org> <20231016134750.1381153-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: <20231016134750.1381153-3-leitao@debian.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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, URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 12:32:59 -0700 (PDT) On 10/16/23 6:47 AM, Breno Leitao wrote: > The whole network stack uses sockptr, and while it doesn't move to > something more modern, let's use sockptr in setsockptr BPF hooks, so, it > could be used by other callers. > > The main motivation for this change is to use it in the io_uring > {g,s}etsockopt(), which will use a userspace pointer for *optval, but, a > kernel value for optlen. Acked-by: Martin KaFai Lau