Read / write data using mmap for encrypted filesystem

I am working on an encrypted filesystem that encrypts data just before it is written to disk and decrypts it as soon as it is read from disk. Any file on disk is useless unless it is decrypted first. so far I have changed the standard read and write methods that the filesystem returns.

the problem starts with the mmap

memory mapping used for files. for example, on ext4 filesystem, as far as I know, it does not use standard I / O, so it must be encrypted / decrypted just like read / write system calls. So how can I decrypt the data as it is read from disk and encrypted when the kernel wants to update the memory mapped files?

I want to stay in my filesystem specific module if possible.

UPDATE: read / write works fine in terminal. but:

  • I cannot execute binaries on the encrypted partition.
  • When copying files using a GUI based file system (eg pcmanfm), the result file is corrupted.

so should I edit any other system calls like what I did when reading / writing?

+3
filesystems linux-kernel encryption ext4 vfs


source to share


No one has answered this question yet

Check out similar questions:

2
Filesystem block size when creating filesystem using mkfs
2
Writing a file to contiguous memory blocks
2
Is data loss possible when writing to disk?
1
How to create an in-memory virtual filesystem and then write that structure to disk
1
File system: overwriting data of equal length
1
HSQLDB corruption after file system resize
1
Linux Kernel init shuts down on encrypted filesystem
0
How to create filep for mmap file to work (Linux kernel driver)?
0
Reading Rijndael encrypted file in memory itself for decryption
0
FFMPEG libavformat read and write AES encrypted header



All Articles
Loading...
X
Show
Funny
Dev
Pics