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 B0FB03A3813 for ; Thu, 30 Apr 2026 09:21:38 +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=1777540900; cv=none; b=tKBy1wBMyfLyZUTkqAHpheZOLVkty0K72+EDDeYrD4KzmXqiFMfBt/eykRG3jfn60IR865n2anOr7OOXw3VznHQDSN7ZYPpQLh0+zRDDOOMoauZDAdKGpLESXgEgsTu9ygKI8Ni5vdx+enRAKCOd4xdSR81MLEG/3cfITDoQzKE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777540900; c=relaxed/simple; bh=5VbGrAjbaukprpJqt2wW7jnukrcStD38ZA9lfHMjQ7U=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=asIVw1YbKLPbvC5qZL7SRdw+p29BQEQHc+IPBG0zmXWz/KbJ69anTDHEP6PEtUaKKqlYDhJ+yhuGq8Ws8P6lS0Ek2rpnHurQCbIW/chCDiyJquL5SJsCY2SkGzxmFHDhMU1kOSMwdrLO53Ajb/A3684c/iW0w/5639Zk+/61BDY= 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=BLzIlbwn; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=ZR3YlaR5; 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="BLzIlbwn"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="ZR3YlaR5" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63U5xI3t3992973 for ; Thu, 30 Apr 2026 09:21:38 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= o1WNaMKL0REcbyyi9G+CV0fM9H39t5QBIQfH9Xvc+Vg=; b=BLzIlbwnQ05OHk82 LMkyessnHkjifiel+N3dItvb62jlZuUCmQ3jkSTwM2UtQm8OZ2QAnMtbIFdHYCKP J3oA+Ly273tzT1F9635jWua9o4VSh9wEiqu5gPYgWhSQVhcdYIde9Lz371Y7j63E tFa4XUHxVcxEqOt1mcVmNZ8zDrU/Bu4J+ztSje+nshOZ2fucjww6BZbdDx3h93RV p9M2sVminOXNt5vtO0guuJdVaIubZDnIbGK5CG9mz5GNwFnYIpy04CR0BXRewKUb /jSXm2E1bRFOm04Ikzw3MiGw25D6m/1DDxkrw5RMBV87+Yl6kI7MG50Q2d+tP5+/ YNT1tg== Received: from mail-dy1-f200.google.com (mail-dy1-f200.google.com [74.125.82.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4duhx945tu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 30 Apr 2026 09:21:37 +0000 (GMT) Received: by mail-dy1-f200.google.com with SMTP id 5a478bee46e88-2da19227bc1so2772399eec.1 for ; Thu, 30 Apr 2026 02:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777540897; x=1778145697; 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=o1WNaMKL0REcbyyi9G+CV0fM9H39t5QBIQfH9Xvc+Vg=; b=ZR3YlaR5jM1lsSIuquKYxDwzGL0jkqFGYXRtidFnAvjI8E8vWztQ4yjhbOOF5HYdVW QswHWYTReIhIPhJjbhmwep4QRB2bP1jNeUD7AsbbUt8YzCUxSfirioRiWvOc6JTyLZWY 2abG8a+Ee0LKcmmmgKyN0N6NsnYqkHszdi7xdC70yMRpeh8j6hM6Zd9dWSRkOYK+hH62 J7M5G3qMXbPyMSaozgf0SyW3K/KljRK24LjVF7AjXucWO1JwUk4bJZgiX+HNlkapNdJW muVgdjz5be3MCWPIcrE8eY98j7yTH/Eb/ml+R34UiFc/orfKXEtTIts5i8/NCDmdkcCS Oomg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777540897; x=1778145697; h=content-transfer-encoding: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; bh=o1WNaMKL0REcbyyi9G+CV0fM9H39t5QBIQfH9Xvc+Vg=; b=DX3DS3saqh44R8L7Atx3bQqVcHVec+PZhg4OCLfTdmlJwAyIl3kWPoG2iULlCYUYD8 yanhV9gteRdekqA6PHEdsQnJbCQfKuL814ObDP282R5LkpA6fJEiu6R6XYNcV/hIhlJC mCpl4HCwbHmVNPIzohQyKWbkVHWLuqW3LfmW1NoSUzio48Glb4H+v+BoGCOHgtweiial jmrOGoE/MzcqSjRzbHWqpK42MavIjPqJxVb4c5+bdIG2B2JZAMcEcKimaAPNolxyqmFN zJIHqflvx5lcL7kNvXP2d9vsA4+8pHcQ3C8zSrKaIGDpc9itwSPzysqWodOLlN4I05OK 9E+g== X-Forwarded-Encrypted: i=1; AFNElJ+on+L3fMd+zSbmC1wxg43sFTLUiq0/M8wLVcaEIDz+0GYFKAqvrPFJGjbg0ebBLZGhJlDohB+d8/OuyoE=@vger.kernel.org X-Gm-Message-State: AOJu0Yxv8K1D5XBc3bd0zgq99I/sN0UZeR5C7ZR6poYq7xdbt+msEifF Nn7VGsQFsn6omeO2+KmoCdTu16fYQ4NBZOdV8buZnNVUTIcMDxmFHLwqKycqmynr54g1glWK/GW fbm6nJKo94bVZAvtD73lgJ2bYe3cgjL3F3nju4P6olRMCHfw73tV65GfukBPVi80Qcn8= X-Gm-Gg: AeBDiesWdR3Hm8HmV43ztmHHCvtbgV3PKpEA66kNag/zmuBaLZdrsVBfgzEiQ3sc10k hdQb3GsdQG/DNHMdk+jyk3ceAXo3oABOAwfftKIKfOI8kAtabNX1dvMbWksrD2t8KlXl0AZqZVJ U7hloh7C2scdj+Sq+57kHmjscFol1qL2eIVEzpuDUV2d0jwjDs5xHgcYX20Y8Y34ZhXXUts0xWx G8UdgTjiylJ4LgZkzxJJz1kzc5ZqHaKokEyrvy5jl29FFRov+sOY3DO/jhFvRhFaNZRW6cLTfYg OzUVOt2fntmg4O9qNzxA+fqNqcduCfVVvQ2W8scP1OBaD+A1crxXFhHnCRj0wW9ESSA3Hbry+UO sxlLT9HkIA+rWPsT7YeQ99Yvka6CwmKjXhwXwcWpMll0zcijjkbnxaxBMtPAuHg0Wz30VZqACAj fDsSyAvgXjPBU6hA== X-Received: by 2002:a05:7300:7b95:b0:2c5:b23e:48a9 with SMTP id 5a478bee46e88-2ed3e491075mr988858eec.25.1777540897199; Thu, 30 Apr 2026 02:21:37 -0700 (PDT) X-Received: by 2002:a05:7300:7b95:b0:2c5:b23e:48a9 with SMTP id 5a478bee46e88-2ed3e491075mr988838eec.25.1777540896448; Thu, 30 Apr 2026 02:21:36 -0700 (PDT) Received: from [10.110.45.159] (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ed1c09c6e3sm5667943eec.25.2026.04.30.02.21.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Apr 2026 02:21:36 -0700 (PDT) Message-ID: Date: Thu, 30 Apr 2026 17:21:31 +0800 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 v2 2/3] dm-inlinecrypt: add target for inline block device encryption To: Benjamin Marzinski Cc: linux-block@vger.kernel.org, ebiggers@kernel.org, mpatocka@redhat.com, gmazyland@gmail.com, linux-kernel@vger.kernel.org, adrianvovk@gmail.com, dm-devel@lists.linux.dev, quic_mdalam@quicinc.com, israelr@nvidia.com, hch@infradead.org, axboe@kernel.dk References: <20260410134031.2880675-1-linlin.zhang@oss.qualcomm.com> <20260410134031.2880675-3-linlin.zhang@oss.qualcomm.com> <6390db35-7f8e-4d00-9c1f-43d676007910@oss.qualcomm.com> <7ab5cd97-30b7-42ca-80ce-6d9cd8c45b73@oss.qualcomm.com> Content-Language: en-US From: Linlin Zhang In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDMwMDA5MyBTYWx0ZWRfX3p3B9eUMFli3 TFhgGgY9oiVflwznWvc+JWdJcae70oHaMNgdkDjeP0G8OdgkONxOxoaH1feN5VALDDeFBc228PL KtfFaZm2ohIw/ZteqmPSszV+N+0lbtCYHl/43PlxY7LFjwlrtFqCktQHb6tzX7/6wpwqtm0BLgb jy2ljh4qKm4Ee2CtrY01NfreNT0+cPOzO4OhbnKvw7iXepwdh3msQkUR6f4J2RJh6Dw22E9/ynR 6h1uESKlZ4IsIr6gmxBu+LEHGqyX0E9uLH06hCfwo08dP6ksH5z7v555ww+EECevDBo7oLYhmnd vxsq+FIwJW+AaxFidxzWRRDraMAiR7c1y/qGtff/WylkoPYvvJnr5FlEbPk7nsP879qY/1N7lcM LC/w2lcD5UJO/ehvDcY6lWQmsOznenldlwLDVyrVUTKNZTLBacJ5R2g210kYFQ4dJkiENgnJxuU g+ytepihYvrEzs8m+ew== X-Proofpoint-ORIG-GUID: o1eU5-yEOZluG8hTth3PvDZ-mP73T713 X-Authority-Analysis: v=2.4 cv=O5oJeh9W c=1 sm=1 tr=0 ts=69f31f21 cx=c_pps a=PfFC4Oe2JQzmKTvty2cRDw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=lklvTEQ6XvIVcFA1PqMA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=6Ab_bkdmUrQuMsNx7PHu:22 X-Proofpoint-GUID: o1eU5-yEOZluG8hTth3PvDZ-mP73T713 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-30_02,2026-04-28_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 adultscore=0 phishscore=0 suspectscore=0 impostorscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604300093 On 4/29/2026 11:58 PM, Benjamin Marzinski wrote: > On Wed, Apr 29, 2026 at 11:25:04AM -0400, Benjamin Marzinski wrote: >> On Wed, Apr 29, 2026 at 08:34:00PM +0800, Linlin Zhang wrote: > [...] >>> >>> Thanks for the suggestions. >>> >>> Adding a bool need_acct parameter to __blk_crypto_submit_bio() would require >>> updating all existing callers, which feels rather intrusive given that the >>> accounting issue only affects the blk‑crypto fallback write slow‑path. I’m a >>> bit concerned that this would broaden the scope of the change more than >>> necessary for the problem at hand. >> >> I get your concern, and I'd like a second opinion on how much we should >> care about this, but it doesn't look like there are many other callers >> that would be effected here. The only existing caller of >> __blk_crypto_submit_bio() is blk_crypto_submit_bio(), which would just >> call it with "need_acct=true". Looking at the code path below >> __blk_crypto_submit_bio() that would need to change for submitting the >> bios: >> >> __blk_crypto_submit_bio() is the only caller of >> blk_crypto_fallback_bio_prep() >> >> blk_crypto_fallback_bio_prep() is the only caller of >> blk_crypto_fallback_encrypt_bio(). >> >> blk_crypto_fallback_encrypt_bio() is the only caller of >> __blk_crypto_fallback_encrypt_bio(), which is the function that would >> need to choose between submit_bio() and submit_bio_noacct(). >> >> Doing this would change the crypto API (by necessity, since we're adding >> a new argument to __blk_crypto_submit_bio() for stacking devices to >> use), and it is adds a extra argument to a number of functions, just to >> handle this corner case. But it is still a relatively contained change. > > Having discussed this a bit, I'm fine with leaving this as a TODO for > now. If anyone wants to chime in with an opinion on how acceptable it > would be to add a new bio flag for skipping accounting, that would be > great. Thanks, Ben. I’d appreciate it if someone else could chime in on these two approaches. > > -Ben >