From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-188.mta0.migadu.com (out-188.mta0.migadu.com [91.218.175.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D677225416 for ; Thu, 12 Feb 2026 05:51:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770875484; cv=none; b=ZrOXSZeaIr81IPNM6nFeVgmThcYGgaq2yjHvZmCpq/eakxUlDL2srMMoqFTkpbE4dDRxDZnoQGBICzi1o+geRimCegW+sq+/SmrCQlObmSe6mvu/N6XWcnyzb0Wyib6eiLNtFcSxx9elDOxA3BVvhowSw+JII4U6T01uF3NYaRE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770875484; c=relaxed/simple; bh=ITFFE+Y9xAEMp5AudZR5uOd/8/E8Aen1/L0Kk1ZG32s=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Wz4/m24mD5urQNkgTsiZBwVULJFeqzAxYUp9d2hZOqSVo2AegiTyXZm4vNTBsMN69sGVYJ9voTmijKspYdmLbOuDicHGbI4OtO6FclAzYsmrwCGtrl3dd/xade/soRyxWn1AeqNaWs11ZoZaNmUeolcdLLmFW4jLFP5iT5avi7w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=dsYQo/2N; arc=none smtp.client-ip=91.218.175.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="dsYQo/2N" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770875471; 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=4H5BjXvuYmpiukksAJPTofzvZx4Nicd87hlIkcl1KmU=; b=dsYQo/2NRqB0Cag+DQnCxJfmsDD9nBXXmrtmzp/zBkH0/XEodaDLaHB7jzOGk6/O1e/TYO Ir8M/LuINHWNY8lPqSpc8YcsPiq+0kPLXSvCP/1UhQ6GWyDAnU0nUuiVcb/IzTA5G6D6mu DE2ef12zL8NaII23UW8Uab8BYTx8peg= Date: Thu, 12 Feb 2026 13:50:55 +0800 Precedence: bulk X-Mailing-List: linux-api@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH bpf-next v10 3/8] bpf: Refactor reporting log_true_size for prog_load Content-Language: en-US To: Andrii Nakryiko Cc: bpf@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , Christian Brauner , Seth Forshee , Yuichiro Tsuji , Andrey Albershteyn , Willem de Bruijn , Jason Xing , Tao Chen , Mykyta Yatsenko , Kumar Kartikeya Dwivedi , Anton Protopopov , Amery Hung , Rong Tao , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-patches-bot@fb.com References: <20260211151115.78013-1-leon.hwang@linux.dev> <20260211151115.78013-4-leon.hwang@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Leon Hwang In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 12/2/26 06:10, Andrii Nakryiko wrote: > On Wed, Feb 11, 2026 at 7:13 AM Leon Hwang wrote: >> [...] >> @@ -6241,7 +6244,11 @@ static int __sys_bpf(enum bpf_cmd cmd, bpfptr_t uattr, unsigned int size, >> err = map_freeze(&attr); >> break; >> case BPF_PROG_LOAD: >> - err = bpf_prog_load(&attr, uattr, size); >> + if (from_user && size >= offsetofend(union bpf_attr, log_true_size)) >> + log_true_size = uattr.user + offsetof(union bpf_attr, log_true_size); > > LGTM, so > > Acked-by: Andrii Nakryiko > Thanks for the review and the Ack! > but it caught my eye that we will never return log_true_size if > SYSCALL program tried to load another BPF program (light skeleton > case), which seems limiting, but we can perhaps address that > separately as a follow up > Correct. Currently, struct bpf_verifier_log and the log_true_size back-propagation mechanism are designed specifically for user space and are not compatible with in-kernel callers. I’ll look into whether this can be improved in a follow-up. Thanks, Leon [...]