Skip to content

RFC Enable GCM support

Will Morrison ecryptfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3eCryptfs: Add mount option for cipher modefs/ecryptfs/crypto.c fs/ecryptfs/ecryptfs_kernel.h fs/ecryptfs/main.c+59 -10 replies
2/3eCryptfs: Extend file headers to store cipher mode.fs/ecryptfs/crypto.c fs/ecryptfs/ecryptfs_kernel.h fs/ecryptfs/keystore.c +1 more+208 -210 replies
3/3Enable GCM support in eCryptfsfs/ecryptfs/Kconfig fs/ecryptfs/crypto.c fs/ecryptfs/ecryptfs_kernel.h +5 more+319 -461 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/3] Enable GCM support

This set of patches is the work we've done so far on adding integrity protection. We've been using a modified version of the test suite, available at
https://code.launchpad.net/~zmanji/ecryptfs/1270455/+merge/202197 to test GCM using the existing tests. This is done by passing -o "ecryptfs_cipher_mode=gcm" to the test script along with other flags.

When GCM mode is used, most of the test suite passes, but several tests involving truncating a file to a larger size fail. We believe this to be a result of calling read_mapping_page at mmap.c:49, which sometimes calls ecryptfs_readpage with a fresh page. This new page does not have a valid auth tag, so E_BADMSG is returned. We think this was fine before, as whatever was in the page would get overwritten and ignored, but now we're doing integrity checks, so we run into issues.

We'd like to know if there is an alternative to read_mapping_page that preserves the necessary semantics, or if there is some field in the page that gets passed to ecryptfs_readpage that would allow us to distinguish between pages we have never written to before and pages that were just fetched from the cache or disk.

-Will