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 03882C61D92 for ; Wed, 22 Nov 2023 05:36:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232932AbjKVFgr (ORCPT ); Wed, 22 Nov 2023 00:36:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjKVFgo (ORCPT ); Wed, 22 Nov 2023 00:36:44 -0500 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF14D12A for ; Tue, 21 Nov 2023 21:36:39 -0800 (PST) Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-517ab9a4a13so4885352a12.1 for ; Tue, 21 Nov 2023 21:36:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1700631399; x=1701236199; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=OPmH0R/ZGatN6+UwwJY3MEok1l+rZDRi+gW+Psbpgp4=; b=em2DzhAjzA6+M6CAZujzfRwbEZCqdGSRYk74aXSfvrwfC9i0A5Oyz+J+5tXb6LB8dK pb1g2PGElnuo2VdvsfPqhH/zL4esxIz8rbH83DzmAT67TQcpdWYKKVZUIut7hb1C1Dbk SSU7+oZWwp6PD3mXy/vhPNk2gTDZAD15xboH/Ew9BYswQvTRf1/GEiDSNQyn9VaGj5b4 uApyRPYUw0IJVUcMc8WuX08ZPTfmQ8+6n3cXr8qZCA5fJ6k/UaM5+Ibswq/4Y3EzKHvu R9g/W7fzIJjmilMuHgWda6NsgQYaM4/F5jzzQu3bTAx4UkOXhFHVQUVBoyK2tkqx17Ww LxCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700631399; x=1701236199; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OPmH0R/ZGatN6+UwwJY3MEok1l+rZDRi+gW+Psbpgp4=; b=ChS7SK93vUZE03VaEx/Ao6iYWWpSH8SQQHFtqmedhgPMpXQTcOg84+q/M34f2Fc0C0 0DN3LeKm2O+E7CnSNf3KoCdaweSeQ+ZS73w0zliHwCdCfYXS7BGvSiuOP2DirU22HnDQ eOEgeyy4Y30bcVQmkTjdqwRUNPGVMo3xRjY9akNbiU42WSGkX4wibomHlk1+LL6IGNVP cm900Ft4Qu/XtaqMiiUFA2tJ5H0USNXdF6h9VlIgCybPiOUqotUlyKlQz1L0cThui+Wh 8SfAKcsDtimeJLRMCnLgYH7g/9yvQ3MLKm/w4hb8qkAXAPpglaCRbZ7WggynCYgZMyTh wt+Q== X-Gm-Message-State: AOJu0Yw0fRqk3NgXbSWdINomEOsQGvUh9lDuPOltVXmDkxsXDNfzImM2 BE6igz+OzVBb8ePAnDhNKQB3nw== X-Google-Smtp-Source: AGHT+IE67Eq9oO1uEot/zjxOXNvgyCk21nCZbXVKotApAyu3bet6Avb8lU17DWWWT9joNIuvOnZhJw== X-Received: by 2002:a05:6a20:8f1d:b0:17a:e941:b0a3 with SMTP id b29-20020a056a208f1d00b0017ae941b0a3mr1395905pzk.39.1700631399364; Tue, 21 Nov 2023 21:36:39 -0800 (PST) Received: from [157.82.205.15] ([157.82.205.15]) by smtp.gmail.com with ESMTPSA id gj13-20020a17090b108d00b002839a4f65c5sm454781pjb.30.2023.11.21.21.36.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Nov 2023 21:36:39 -0800 (PST) Message-ID: <664003d3-aadb-4938-80f6-67fab1c9dcdd@daynix.com> Date: Wed, 22 Nov 2023 14:36:32 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v2 1/7] bpf: Introduce BPF_PROG_TYPE_VNET_HASH To: Song Liu Cc: Alexei Starovoitov , Jason Wang , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Jonathan Corbet , Willem de Bruijn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Xuan Zhuo , Mykola Lysenko , Shuah Khan , bpf , "open list:DOCUMENTATION" , LKML , Network Development , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, "open list:KERNEL SELFTEST FRAMEWORK" , Yuri Benditovich , Andrew Melnychenko References: <20231015141644.260646-1-akihiko.odaki@daynix.com> <20231015141644.260646-2-akihiko.odaki@daynix.com> <2594bb24-74dc-4785-b46d-e1bffcc3e7ed@daynix.com> <9a4853ad-5ef4-4b15-a49e-9edb5ae4468e@daynix.com> <6253fb6b-9a53-484a-9be5-8facd46c051e@daynix.com> Content-Language: en-US From: Akihiko Odaki In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/11/22 14:25, Song Liu wrote: > On Mon, Nov 20, 2023 at 12:05 AM Akihiko Odaki wrote: >> >> On 2023/11/20 6:02, Song Liu wrote: > [...] >>>> In contrast, our intended use case is more like a normal application. >>>> So, for example, a user may download a container and run QEMU (including >>>> the BPF program) installed in the container. As such, it is nice if the >>>> ABI is stable across kernel releases, but it is not guaranteed for >>>> kfuncs. Such a use case is already covered with the eBPF steering >>>> program so I want to maintain it if possible. >>> >>> TBH, I don't think stability should be a concern for kfuncs used by QEMU. >>> Many core BPF APIs are now implemented as kfuncs: bpf_dynptr_*, >>> bpf_rcu_*, etc. As long as there are valid use cases,these kfuncs will >>> be supported. >> >> Documentation/bpf/kfuncs.rst still says: >> > kfuncs provide a kernel <-> kernel API, and thus are not bound by any >> > of the strict stability restrictions associated with kernel <-> user >> > UAPIs. >> >> Is it possible to change the statement like as follows: >> "Most kfuncs provide a kernel <-> kernel API, and thus are not bound by >> any of the strict stability restrictions associated with kernel <-> user >> UAPIs. kfuncs that have same stability restrictions associated with >> UAPIs are exceptional, and must be carefully reviewed by subsystem (and >> BPF?) maintainers as any other UAPIs are." > > I am afraid this is against the intention to not guarantee UAPI-level stability > for kfuncs. Is it possible to ensure that a QEMU binary with the eBPF program included works on different kernel versions without UAPI-level stability then? Otherwise, I think we need to think of the minimal UAPI addition that exposes the feature I propose, and the two options I presented first are the candidates of such: the stable BPF change or tuntap interface change. Regards, Akihiko Odaki