From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 A630036728F for ; Wed, 2 Sep 2026 06:03:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788328988; cv=none; b=nbgWp9ZPX3rFpMnsmca11flAYNeJNLvaEkRMj91DJeCRi2PFVEnXylo8Nf3QZHcsgbZwfjOFleGO1hQiMKMUR99h5eSEHQcm+FE5fhJ3ggtAKtSPB/d2daxEoIHR5lGSXsS31khOON9gGrxBrynrFx3UaQZHnFTqgWWJdFde/Lk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788328988; c=relaxed/simple; bh=lbpHvV9nwxHUmABpWmOFrhwkTXsjfOSaP08IrwX0zyA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ogm8wLpvMAJc7z4HxyMbA9WBnPFS78iQvDAhvhvr5Hf8ohJ8tNXiacsOCWrywZo+WvCNhQwu0yCNjeCcQjUJ/vfXsyB9W5qj2knjWFLhlSsmozkDPoUox4Cx3zAgEc4/D1d2ekGiw3qHBDXmi6aH9K4ItmfJfIF8N+/TOd0hKdg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=fZXk6xUH; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=KYonrtqb; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="fZXk6xUH"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="KYonrtqb" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6825YNkv1731399 for ; Wed, 2 Sep 2026 06:03:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= EcSnLB6WKmAsBeRVJJ+St11n89Sukxc1aDDh+R8r5IQ=; b=fZXk6xUHRubKSz4v PWhkAY7U0kvr7kfm3f9+8ynciDF6bPIo655pYwp75e6CrJQJJSXuVoELWNyLQXKu 8NbxmXHh9TWZ/6CUdoNfLK/3TcPzELEx2C1lr3zhU5LJLHKGVwEGqIeHC298ROwG Jq1+zES01/2Rj9c2aqlqx5LWp4sZf0WBJ3SLV1L4L3/pwYHF+uERoFGNRCn/y2dj RpMft9/++EtmMnUpM8LYJAl28inGtjTm0+E7iLKEq55Gk05aiQgUfIBuLwVOxOJq QQy8JuifLdoY8CpUpm922uwCMnFLLYCk5UhhatZbvpQ5NMmS1sjdohV7rxsQClfq omwfCw== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ge8whh1kk-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 02 Sep 2026 06:03:04 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-3965ba1ba3eso875663a91.2 for ; Tue, 01 Sep 2026 23:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788328984; x=1788933784; darn=vger.kernel.org; h=content-transfer-encoding:content-type: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 :content-type; bh=EcSnLB6WKmAsBeRVJJ+St11n89Sukxc1aDDh+R8r5IQ=; b=KYonrtqbd7vL4151Rfih8vykYU0k/roN24sz+cq4yO91efPmrU3z4TIJW3vA0u+lF6 y1YWpkJjn/DfE2fUAWGC+vqlXb3IAB8I5R0XrTZSChK97RRckYVfygyqcCxp9HeEKbkX VVEOugPTfdwy5CPQgaiBx8yEQSNUK09zBVQ04tWyQ0gTtb1XFudmHpLpota9duGmR+Am ub7n92/4qaH93VSMDc5jvIyWS+Duf5dVOspbC+BnIiGbpazZo/RgNTpwn7AhcR0a6VnY SosQUOBkymSFg9zFqNKUgwOi8Z38Gvu88cMK00R83x6WVXoNLb3CAdOtwlYTt2o5SalE cXgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788328984; x=1788933784; h=content-transfer-encoding:content-type:in-reply-to:from :content-language: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:content-type; bh=EcSnLB6WKmAsBeRVJJ+St11n89Sukxc1aDDh+R8r5IQ=; b=pZ3qK2Mo/9DOHIU55WyixT/0dO5A16+KKwQ+dNw5O+tGn05cdsQyEw84ASDHmFQBZa gP0Nrc89apYa1PRPPLczNjEuq2aYjBNK0BswRlJ3zXNOu93bXI21z52g+hEnz97cj2sH jqAJZtCxDI+G7rp70cv1N7kZhtm2/pPh3+rHIrsJ7OadMJRwg19a1MUNhUTm950GDPcc ptt7V1sshk9Vbvbk2pJ4YCaMUKZdTUHOMCDUpczPkAPWY5SceGdPail6a8Ef3J/zTLUz Y0smBfRrA+XEXikArS1EYXZJ7Z+xDXrN6lr/vYVaLcpHhNX6hW4QyivC/gCT473qDiCy m7dw== X-Forwarded-Encrypted: i=1; AKwUvBxZuRPHItsct4tFxIqLlZ5C52Xzhc4TyYZznfni1htN1Kqxyvm7IlK4Tzr3P4xGx0fKp8VQhJnw7sYm@vger.kernel.org X-Gm-Message-State: AFuF++kTYx91nQ0drrdIWaAkJxZC38BxXDGXV1C0BhgTAVgqJPXUrQ3n D6QO0+2+A1LDpqY4LQGRiJrS8Q4A0XyzAI6o89rQNfRu2ciNow39SM3UGDKn9Y/pX28IwaDbf7L 2XGvElxm5n4Aj+ND2N29B2B+OW4Bel9OGNCL1/Ev1jPfVjvO4bjAdubnS39kKqprA X-Gm-Gg: AYBFou2x2e/t+SUQA+VYlUJH63S5prTZiNRbBfsXYZ4aXYoBF4seF4Q1l+9kniyrPkl 05nrP6UD3sVe6p5YvDkbGFBvxb9CiAhzXW6DD6qX1rW2XxhS8FDQKVscX4N6Rwq5oQXHyw/cIUz wWU7VF3YkQYkiOgIpvlMpIdKDEzKbFNhUGCLgILAaoVCIOG9ORNPJ7LtIkPEEPbJxU+CfM3bbZh BBFJ39rlf0Y+6bbA+LDklr7TSwBiIj6HkGM0z3B5e9zfPiP7g6KWmAkUHEd+pJFhpKTd6nZRq9i N2Vxj0VYH7WyAgFhdTfY73nfw/krOt5vlSvY8Z4aIdzlR+rYs8nJyUIcMj8nD+0mn3Ab9prsaR4 vKOFsE75vMAMot0jBLYiw5Hh12oIFfjosY36Oa8+dOe/HqPNtyVpyfLmn X-Received: by 2002:a17:90b:55ce:b0:395:4de5:1054 with SMTP id 98e67ed59e1d1-39aee066e9fmr3902089a91.16.1788328984257; Tue, 01 Sep 2026 23:03:04 -0700 (PDT) X-Received: by 2002:a17:90b:55ce:b0:395:4de5:1054 with SMTP id 98e67ed59e1d1-39aee066e9fmr3901979a91.16.1788328983698; Tue, 01 Sep 2026 23:03:03 -0700 (PDT) Received: from [10.110.50.50] (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1430e9eb4dasm5534267c88.2.2026.09.01.23.02.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Sep 2026 23:03:03 -0700 (PDT) Message-ID: <9352d44e-ef61-43f5-85c9-eae267762e84@oss.qualcomm.com> Date: Wed, 2 Sep 2026 14:02:56 +0800 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 07/11] blk-crypto: move bio_crypt_dun_increment() to the public header To: Stefan Hajnoczi Cc: ebiggers@kernel.org, axboe@kernel.dk, mst@redhat.com, jasowangio@gmail.com, James.Bottomley@hansenpartnership.com, martin.petersen@oracle.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, linux-block@vger.kernel.org, linux-crypto@vger.kernel.org, linux-scsi@vger.kernel.org, virtualization@lists.linux.dev, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, neeraj.soni@oss.qualcomm.com, gaurav.kashyap@oss.qualcomm.com, mani@kernel.org, andersson@kernel.org, konradybcio@kernel.org, bvanassche@acm.org, alim.akhtar@samsung.com, avri.altman@sandisk.com, pbonzini@redhat.com, eperezma@redhat.com, xuanzhuo@linux.alibaba.com, linux-kernel@vger.kernel.org References: <20260827160806.1295313-1-linlin.zhang@oss.qualcomm.com> <20260827160806.1295313-8-linlin.zhang@oss.qualcomm.com> <20260901191342.GC729142@fedora> Content-Language: en-US From: Linlin Zhang In-Reply-To: <20260901191342.GC729142@fedora> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=fLkJG5ae c=1 sm=1 tr=0 ts=6a97bc18 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=-2wExInEUDM6fBQoz8IA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-ORIG-GUID: MPhYy82ym7agkCO-A-_YtuYLXu5fDptY X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTAyMDA1MSBTYWx0ZWRfXwCXgOBXNLhwH zsKqX0AXi0oGUCq7GkfXa1ilqk+6psflO0cvL++RYS6q4TMHuGfrXo0EfVOugqEenliyYzhav3g Y6B8W6YpIBsqsqKJBtVaX5XkS/uu524JtInuu2yXXw6/NkpAbjOzO2AmNdnx6OuBfwp8lkbvGNV 5XdNLiY9y++KZC3CfMou9GLlaw/CCmVZw4FJKvDxFC+8Gontlh+OdOyQComLw++HjGTRNX7em0y 2NxQ4GI/Ap1AW7/xpjg6CKnUJIBjqHkhlV6V5QChooLXIeJKGajR6mz5P+ESpPPgD6sIi8McJku 7PvzUKU08ghps/Vz63WRCR6nKTgmGVLOazyOUR3aY8EpD4OnxjUj+8rQxbSS0AQyA/q6sa6BQpB FheOs37Id4ViuR8Ryka0ee57TQ7r7i6hkZ9sHTf9PPfmv35qJfZQgarfnv2uJTW28l3YUsXQu7c 7DNtfpN6EKm1MP0Sbsg== X-Proofpoint-Spam-Info: AW1haW4tMjYwOTAyMDA1MSBTYWx0ZWRfXzO6briu0ogzb Pj9u10eQJJaDfIK4hPX54sT/mzOYkPag4JoROpoNjARAnR5ih+2xGH6eRy1V34qRa8j9GEMVLSA VnczLV1z83gX+ypjrq98KOegKDyVbMA= X-Proofpoint-GUID: MPhYy82ym7agkCO-A-_YtuYLXu5fDptY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-01_06,2026-09-01_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 malwarescore=0 impostorscore=0 clxscore=1015 priorityscore=1501 spamscore=0 phishscore=0 lowpriorityscore=0 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2609020051 On 9/2/2026 3:13 AM, Stefan Hajnoczi wrote: > On Thu, Aug 27, 2026 at 09:07:16AM -0700, Linlin Zhang wrote: >> From: linlzhan >> >> bio_crypt_dun_increment() is currently declared only in >> block/blk-crypto-internal.h, which is not accessible to code >> outside of block/. Drivers that manage inline-encrypted I/O >> directly need to advance the DUN across bio_vecs within a bio, >> or across multiple bios in a request, and have no other way >> to call this function. >> >> Move the declaration from block/blk-crypto-internal.h to >> include/linux/blk-crypto.h alongside the existing >> bio_crypt_dun_is_contiguous() and blk_crypto_init_key() >> declarations. The implementation in block/blk-crypto.c is >> unchanged. >> >> Signed-off-by: linlzhan >> --- >> block/blk-crypto-internal.h | 3 --- >> include/linux/blk-crypto.h | 3 +++ >> 2 files changed, 3 insertions(+), 3 deletions(-) > > Other include/linux/blk-crypto.h functions export their symbols. Does > bio_crypt_dun_increment() need EXPORT_SYMBOL_GPL() like > bio_crypt_set_ctx() and friends? > ACK your're right. EXPORT_SYMBOL_GPL is needed. It will be added in next patch. >> >> diff --git a/block/blk-crypto-internal.h b/block/blk-crypto-internal.h >> index 04035d237f03..32c720aabba7 100644 >> --- a/block/blk-crypto-internal.h >> +++ b/block/blk-crypto-internal.h >> @@ -26,9 +26,6 @@ int blk_crypto_sysfs_register(struct gendisk *disk); >> >> void blk_crypto_sysfs_unregister(struct gendisk *disk); >> >> -void bio_crypt_dun_increment(u64 dun[BLK_CRYPTO_DUN_ARRAY_SIZE], >> - unsigned int inc); >> - >> bool bio_crypt_rq_ctx_compatible(struct request *rq, struct bio *bio); >> >> bool bio_crypt_ctx_mergeable(struct bio_crypt_ctx *bc1, unsigned int bc1_bytes, >> diff --git a/include/linux/blk-crypto.h b/include/linux/blk-crypto.h >> index 33ae52b77522..c9f436b6b2ef 100644 >> --- a/include/linux/blk-crypto.h >> +++ b/include/linux/blk-crypto.h >> @@ -181,6 +181,9 @@ bool bio_crypt_dun_is_contiguous(const struct bio_crypt_ctx *bc, >> unsigned int bytes, >> const u64 next_dun[BLK_CRYPTO_DUN_ARRAY_SIZE]); >> >> +void bio_crypt_dun_increment(u64 dun[BLK_CRYPTO_DUN_ARRAY_SIZE], >> + unsigned int inc); >> + >> int blk_crypto_init_key(struct blk_crypto_key *blk_key, >> const u8 *key_bytes, size_t key_size, >> enum blk_crypto_key_type key_type, >> -- >> 2.34.1 >>