From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-181.mta1.migadu.com (out-181.mta1.migadu.com [95.215.58.181]) (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 B5E0D3BBA0D for ; Mon, 30 Mar 2026 10:35:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774866957; cv=none; b=tDVpX/mCYHp73gRcgZ1ZXD9bnnBXM0u/R+48aF18qPkz3Mw4PXZRut0TlFI2Mo6Wbz4YRoNd63rukusVoTQB2ieEsybvnFvhCVADp9vUyif5Wgk0XuJBnJXRCZOrTLl8j7Ci83VFJBEBzLtw5jpR0tUu1fqqwzz8/x8tVMZDVgo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774866957; c=relaxed/simple; bh=i6Yuwo4RTk2gB2RMasRmLtxpxX83S/slTd/WcePBHP4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GbXlBMXi0tvVBvuZxOJBwwIP7tusSvCX60LJmdqZ9rOpTPxpvPl8ZOsPa5UMj/+4RN8Digu6VDONLEhCSDjvBLPp7y6IleANHved6TUd686swaicxUDOizL0g+iyecehz+nFhloK9ufPeg0BA8cESh6g7eL2SIfxRM+8+odjVHQ= 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=XGfAqmBe; arc=none smtp.client-ip=95.215.58.181 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="XGfAqmBe" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1774866953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nQnDJppw4Lt1MmEwTXnpkr/2Fa3d5p5uRIHkXoRQKqc=; b=XGfAqmBedw/LZGap5xyaRcME+aTiP7GEktaqwhm6B8mmj7SFtYsav4REfQ2wuLsVyP33D8 b4mzDDnQlTZsoHNQlP0wKrpTgiSMEc7O6P2QrnX6XbzWPoAsqzpXnifcU6IYbNZ1Wa89Z1 NKB1je4u1MWw2WPuAt1S30jelNxcE4s= From: Thorsten Blum To: Tyler Hicks , Thorsten Blum , Christian Brauner , Eric Biggers , Ard Biesheuvel , Kees Cook , Amir Goldstein , Jeff Layton Cc: Damien Le Moal , Zipeng Zhang , ecryptfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ecryptfs: Drop TODO comment in ecryptfs_derive_iv Date: Mon, 30 Mar 2026 12:35:17 +0200 Message-ID: <20260330103515.389346-6-thorsten.blum@linux.dev> In-Reply-To: <20260330103515.389346-4-thorsten.blum@linux.dev> References: <20260330103515.389346-4-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: ecryptfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=913; i=thorsten.blum@linux.dev; h=from:subject; bh=i6Yuwo4RTk2gB2RMasRmLtxpxX83S/slTd/WcePBHP4=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDJmnAl8mTwszm3Mz6u+emolWsrtPifbc3zP1dPDOMmWDt TEtaiw8HaUsDGJcDLJiiiwPZv2Y4VtaU7nJJGInzBxWJpAhDFycAjARpr8M/5P1Q9J4ZJb3O/7Z JxCYonA+rF5hkRLH9rdRm29xG6w65cnIsMb+TPl+pUlVm0UEmTyaN8Y6t3HeuHvkTdnzxZJrAh2 7GAE= X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Remove the TODO from 2006. Signed-off-by: Thorsten Blum --- fs/ecryptfs/crypto.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index 585bad6577ed..92fbd28e9178 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c @@ -89,10 +89,6 @@ void ecryptfs_derive_iv(char *iv, struct ecryptfs_crypt_stat *crypt_stat, ecryptfs_printk(KERN_DEBUG, "root iv:\n"); ecryptfs_dump_hex(crypt_stat->root_iv, crypt_stat->iv_bytes); } - /* TODO: It is probably secure to just cast the least - * significant bits of the root IV into an unsigned long and - * add the offset to that rather than go through all this - * hashing business. -Halcrow */ memcpy(src, crypt_stat->root_iv, crypt_stat->iv_bytes); memset((src + crypt_stat->iv_bytes), 0, 16); snprintf((src + crypt_stat->iv_bytes), 16, "%lld", offset);