From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-169.mta1.migadu.com (out-169.mta1.migadu.com [95.215.58.169]) (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 BDC343A838A for ; Wed, 5 Aug 2026 01:53:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785894797; cv=none; b=ZgrfrmIrnNIibVfwlzSPNnitop2PM74l4B2WbfJrvOsTKJH2axvGNtB0woSDXxnE0KrkEgfzEjfzgj5YXBy40fk+6njGsMDQuYcnNPS6uEgDDOd8JHZtYjq3RJeeMMK3auXxcxeVtMaoA6uCiWCMu+jc4HapDMmf7ZqRv3myEHg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785894797; c=relaxed/simple; bh=p+yt+NMYZiDZtNW7V1ocafNfHODM07sVNNvQH4cw2lg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Wm2ba/a6mh5yGptURr8J44gWtT8J07hjd7iUkG8UuEpLEAYebON/lX0d3PZqWf1QPbPIWbnkmkxc7kA1HgBfcgZSm1Ewrslp+Cw+bMCvmkXG0Pi4cn8wcA/EmNFtC3+kQ+aEQ24+gSFwOrwvpH8r2uKZ6zg676KKqd5nbjtNAFI= 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=apDTIqy5; arc=none smtp.client-ip=95.215.58.169 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="apDTIqy5" Message-ID: <2bae8670-3b95-4baf-a61f-fe1600ed9ad6@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1785894783; 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=MqZFARE4/jTJNM90sWjl4ngmCPDnLA3TQRiLkSPh6Q4=; b=apDTIqy5eKfvCaBvCwhrA2HO8tBo1kaBCR3B3m1nX/X5akElNIMNfLjEWLgOhYmmk6iCAP IP8oQEi97rab1929hq1QF+Aj5vBOtcokkhS4a45CSVlhoC0c8XgwzFSPzREzYZtaR+UQlD cuIEplPHm1NjcEkjrq7GFO3OyLL/vTc= Date: Wed, 5 Aug 2026 09:52:39 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH bpf-next v3 1/2] bpf: Fix sleepable check for tracing prog To: Andrii Nakryiko Cc: bpf@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Eduard Zingerman , Kumar Kartikeya Dwivedi , Martin KaFai Lau , Song Liu , Yonghong Song , Jiri Olsa , Emil Tsalapatis , Ihor Solodrai , Shuah Khan , Sechang Lim , Varun R Mallya , Viktor Malik , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, netdev@vger.kernel.org References: <20260804145710.43062-1-leon.hwang@linux.dev> <20260804145710.43062-2-leon.hwang@linux.dev> Content-Language: en-US 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 5/8/26 07:39, Andrii Nakryiko wrote: > On Tue, Aug 4, 2026 at 7:57 AM Leon Hwang wrote: [...] >> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c >> index b274004fccfd..7bb541e343b2 100644 >> --- a/kernel/bpf/verifier.c >> +++ b/kernel/bpf/verifier.c >> @@ -19019,6 +19019,9 @@ static int btf_id_allow_sleepable(u32 btf_id, unsigned long addr, const struct b >> >> switch (prog->type) { >> case BPF_PROG_TYPE_TRACING: >> + if (!btf_is_kernel(btf)) >> + return -EINVAL; >> + > > see sashiko reply, just move it outside of switch and disallow > sleepable for anything that is not kernel/module BTF, regardless of > program type > Ack. I think another Fixes tag is needed for the LSM case. Thanks, Leon