From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.136]:47316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751780AbcCZI4H (ORCPT ); Sat, 26 Mar 2016 04:56:07 -0400 Date: Sat, 26 Mar 2016 01:56:06 -0700 From: Jaegeuk Kim To: Eric Biggers Cc: Linus Torvalds , Linux Kernel Mailing List , Linux FS Dev Mailing List , Linux F2FS Dev Mailing List Subject: Re: [GIT PULL] f2fs updates for v4.6 Message-ID: <20160326085606.GA41603@jaegeuk.hsd1.ca.comcast.net> References: <20160320225859.GA5047@jaegeuk.hsd1.ca.comcast.net> <20160321184520.GA8199@jaegeuk.gateway> <20160326061007.GA24620@zzz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160326061007.GA24620@zzz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Mar 26, 2016 at 01:10:07AM -0500, Eric Biggers wrote: > Why was the XTS tweak initialization changed in commit 0b81d0779072 ("fs crypto: > move per-file encryption from f2fs tree to fs/crypto")? > > Old code: > > memcpy(xts_tweak, &index, sizeof(index)); > memset(&xts_tweak[sizeof(index)], 0, > F2FS_XTS_TWEAK_SIZE - sizeof(index)); > > New code: > memcpy(xts_tweak, &inode->i_ino, sizeof(index)); > memset(&xts_tweak[sizeof(index)], 0, > FS_XTS_TWEAK_SIZE - sizeof(index)); > > Now the XTS tweak is the same for all pages of each inode. Thank you for catching this. I've checked several times, but turns out I missed something tho. :( Let me write a patch to fix this. Thanks,