[LU-15406] Using the native fscrypt for Ubuntu20 5.4 kernel fails several migration test Created: 03/Jan/22 Updated: 21/Mar/22 Resolved: 18/Jan/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.15.0 |
| Fix Version/s: | Lustre 2.15.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | James A Simmons | Assignee: | Sebastien Buisson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu20 client running 5.4 kernel. |
||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
To validate the port of fscrypt for RHEL8 which is from a 5.4 kernel I changed the build system to automatically use the native fscrypt for the Ubuntu 5.4 kernel. In theory it should have identical results. This is not the case which you can see the test failures with patch https://review.whamcloud.com/#/c/45907. |
| Comments |
| Comment by Peter Jones [ 04/Jan/22 ] |
|
Seb Could you please investigate? Thanks Peter |
| Comment by Gerrit Updater [ 06/Jan/22 ] |
|
"Sebastien Buisson <sbuisson@ddn.com>" uploaded a new patch: https://review.whamcloud.com/45987 |
| Comment by Sebastien Buisson [ 06/Jan/22 ] |
|
This problem seen with the in-kernel fscrypt library is limited to file migration (sanity-sec test_52 and test_59b). In this use case, Lustre creates a temporary, volatile file to migrate data. For encrypted files, we explicitly set the encryption context of the volatile file (directly on server side) to be the same as the original file, so that data is encrypted with the same key. Problem is the encryption context of the original file is simply not retrieved when using the in-kernel fscrypt lib. So the volatile file has its own encryption context, which makes the migrated content encrypted with a different key. And this key is trashed. As a consequence, the content of the file after migration cannot just be decrypted properly. I have pushed https://review.whamcloud.com/45987 to fix this issue. |
| Comment by James A Simmons [ 06/Jan/22 ] |
|
Thank you. I will test. |
| Comment by Gerrit Updater [ 18/Jan/22 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45987/ |
| Comment by Peter Jones [ 18/Jan/22 ] |
|
Landed for 2.15 |