From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 A0A1D22154F for ; Wed, 26 Nov 2025 06:16:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764137815; cv=none; b=UTjUIbZ9Lqudqa+xUF0fpRE93jDecDhjz2hOaQ5yJzYvGJU6Ue/q8MgW0dz7kr+XKqmvzfTgqD5cWtUiToIm4gdoELarZvCG9dw6BMBCEQkl5UEPHO79GMk3XDs8mBTQq1m6nlAZF3VqTE5ouyIM4HEa0LC68N9Eh+GRjhJZl5M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764137815; c=relaxed/simple; bh=9eZFQ/q2ekN9iEIvDQdSQ38X/rI9wfSyOhAKw/Kv9D4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qEctBaTwx8IIJoAY24hLLuT1BohGjjV+ktxb9balU8ZDm2QjInJPXAWrwrLisqEXHx0/05yLBqRfjyCxr2K5RF7ty6fNzCdkBb4gHMB6L3ihYLN8GqQTmWqsdG80sJf6row1LenrmfV60Mq7rEqCddoRB/2jS+GyEZ1wz10C6ho= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=chepW5mW; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=pG8WQ0GE; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="chepW5mW"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="pG8WQ0GE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764137812; 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=o3+pnApkvuyBTQ8Q+gd0V8CxAyLJyzgJMoX4H7LnP6Q=; b=chepW5mWSki+81b6YdHJS+u2GRjfwrF12KlsSqHXCnCL0L120oU2Jr9Mxp6ep872jHxdiL kGrMLPKzF+bSqmVQoRgK9tZFj2VsonlSo13BZ37SKR7SKBkSureY73Q+EgtYNtFLwuQbZ4 1rQov14eYl33wfkesZO9fO+y7gp5YJs= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-171-mINrEAZENxi98ZKkxS_Hzw-1; Wed, 26 Nov 2025 01:16:50 -0500 X-MC-Unique: mINrEAZENxi98ZKkxS_Hzw-1 X-Mimecast-MFC-AGG-ID: mINrEAZENxi98ZKkxS_Hzw_1764137810 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-6418122dd7bso8990992a12.0 for ; Tue, 25 Nov 2025 22:16:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1764137809; x=1764742609; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=o3+pnApkvuyBTQ8Q+gd0V8CxAyLJyzgJMoX4H7LnP6Q=; b=pG8WQ0GE1jW3XU+z9vw6vV+VbETeuBP/bpUG0CU8bYTuwywO9NqSvd9ci484K6F9q+ VVYBbH0xlR/Dto+SVDkMOvfaV2Ql1yeR1hT6mBVp5RJwCwZCVf1avVLgfSPTtmuUe6O1 t0pYkwtbv/RI3EZ4KHql2eGo6iF/D+DtAc4c6Z4Ys88ctiEMIL+VpP9y9v55hMXbel60 Mdoiagi0H8d0a55ZmuurFWQ3+a1Swgomm8Ufe47hGz105pXQ5xYTCwClfPRt5gWRqQUY D1vNuIqsTI4/JuqNBvsF8yiWMVEqZ7esTGW3nzaaATtbG6aOf+Q2oqgvkFBOTwzuxY0g sj2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764137809; x=1764742609; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=o3+pnApkvuyBTQ8Q+gd0V8CxAyLJyzgJMoX4H7LnP6Q=; b=C3BuHAt32fprXf5RGYiwicLRdQzdq/EXjsN+lflk2aKB1cxlsKS/TFP9C9LTX2nR9z TTE6u7uGANNwP9XbL2+bnyu73P6dy2yKXtX+JQNNKeDP2tvpglZuoj7jxSRj4y36F9Dq 9oZYhO6WMH/1BjFNB00vReTLi3IhG17hzIbO1zpJcGtR8Rcq1kwdQlErlZ6SmiNWaXI2 /mC/a+bG1sSnnyLd1HngCiPt3krIGQzDjcD8e9jYbUDjhGCwjE9N+CoYmoZE/zx82l0M A74J62OwmCFyhBNBUZvZ9l+A+/ilt2P+RGI0bEG0pWdyiBuZzKJ1qGi6IS8rz1W1xdqG g5oQ== X-Forwarded-Encrypted: i=1; AJvYcCV06OerDEHOZAnxQXwe0SFg6jasREwMGfEs9+Q0Cs7S7trR/LdhgggkY6G1MiR6+Rvsea1MImZZdhyOvRE=@vger.kernel.org X-Gm-Message-State: AOJu0YzFs5tfjvZIiSox37YvZ8wh2oojDiZF/H6pAyRORRwLPmUefvv/ 6F9JV0eiYw1QKId1LFHx7BK/omqWrJ99n8R+PPMonM/33uVxF6Q+tSdTz7cKGd/vthk+SYrMSgG 8bkShR3tJfoFZEBPRUa2PGnUXi1iNMECG1M/pnUsWwsdHghAF0VoOOa2BuY7C24v2 X-Gm-Gg: ASbGncvCL4X5J/poP/UO6dBVLYA4TqU3Cd1Bcv3Xat+BwhIBLc5iiZ0nSIIKVdfuhvQ Hlj/CsRqUBE2lWYl68qIn88JeAQIycH1oWwwgBQ9jLITFstzSlLKt/hYOmbDPdhntQ5Rld93brb J1X6q1zA9uFUV0k6a1z5NsKXQHheY8HzHWwkUWtkiKN/ElV1VceyZpLYQnkc6/5/SUWHvwIHSO/ 2x2iHiHc4J9XRT7Sg5ELDWLM1ZPxo3eR0yIf8qa1zFKw8ZLKEhWz77c59VvzUfcFh5ttqCox3RX FXO0P+M0k6zrm8gutrmba3nRCKIzKBDMLkxdYW3P+CFP9qAqluaVA0BHi/Ui6pT67DSRDsTQUru m+7fLwsHQYw7pf9lshD+UVV19yg+wPV43IXMNQO/13R0= X-Received: by 2002:a05:6402:909:b0:641:24cc:26d7 with SMTP id 4fb4d7f45d1cf-645eb23d89emr5073803a12.14.1764137809594; Tue, 25 Nov 2025 22:16:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IE6sQiMKowZpXuXDvXhg7pCLn/B03mdbNUfdFSc/JPw5sFieDhc6SZi6GKr3IsucbbmQ6hX5A== X-Received: by 2002:a05:6402:909:b0:641:24cc:26d7 with SMTP id 4fb4d7f45d1cf-645eb23d89emr5073780a12.14.1764137809168; Tue, 25 Nov 2025 22:16:49 -0800 (PST) Received: from [192.168.0.102] (185-219-167-205-static.vivo.cz. [185.219.167.205]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6453642d321sm17101222a12.20.2025.11.25.22.16.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Nov 2025 22:16:48 -0800 (PST) Message-ID: Date: Wed, 26 Nov 2025 07:16:46 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH bpf-next v3 1/4] bpf: crypto: Use the correct destructor kfunc type To: Sami Tolvanen Cc: bpf@vger.kernel.org, Vadim Fedorenko , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Jamal Hadi Salim , Cong Wang , Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20250728202656.559071-6-samitolvanen@google.com> <20250728202656.559071-7-samitolvanen@google.com> <2bcc2005-e124-455e-b4db-b15093463782@redhat.com> From: Viktor Malik Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 11/25/25 21:16, Sami Tolvanen wrote: > Hi Viktor, > > On Fri, Nov 21, 2025 at 8:06 AM Viktor Malik wrote: >> >> On 7/28/25 22:26, Sami Tolvanen wrote: >>> With CONFIG_CFI_CLANG enabled, the kernel strictly enforces that >>> indirect function calls use a function pointer type that matches the >>> target function. I ran into the following type mismatch when running >>> BPF self-tests: >>> >>> CFI failure at bpf_obj_free_fields+0x190/0x238 (target: >>> bpf_crypto_ctx_release+0x0/0x94; expected type: 0xa488ebfc) >>> Internal error: Oops - CFI: 00000000f2008228 [#1] SMP >>> ... >>> >>> As bpf_crypto_ctx_release() is also used in BPF programs and using >>> a void pointer as the argument would make the verifier unhappy, add >>> a simple stub function with the correct type and register it as the >>> destructor kfunc instead. >> >> Hi, >> >> this patchset got somehow forgotten and I'd like to revive it. >> >> We're hitting kernel oops when running the crypto cases from test_progs >> (`./test_progs -t crypto`) on CPUs with IBT (Indirect Branch Tracking) >> support. I managed to reproduce this on the latest bpf-next, see the >> relevant part of dmesg at the end of this email. >> >> After applying this patch, the oops no longer happens. >> >> It looks like the series is stuck on a sparse warning reported by kernel >> test robot, which seems like a false positive. Could we somehow resolve >> it and proceed with reviewing and merging this? > > I agree, it does look like a false positive. > >> Since this resolves our issue, adding my tested-by: >> >> Tested-by: Viktor Malik > > Thanks for testing! I can resend this series when I have a chance to > put it back in the review queue. The CFI config option also changed > from CONFIG_CFI_CLANG to just CONFIG_CFI since this was sent, so the > commit message could use an update too. That would be very useful, thanks Sami! Viktor > > Sami >