mtd-utils: mkfs.ubifs with fscrypt does not crypt hardlink files

Richard Weinberger richard.weinberger at gmail.com
Tue Jun 23 09:20:21 EDT 2020


On Tue, Jun 23, 2020 at 2:31 PM Manuel Dipolt <mdipolt at robart.cc> wrote:
>
> hi,
>
> sorry i overlooked that already posted similar patch: (searched only for hardlink)
>
> https://www.spinics.net/lists/linux-mtd/msg10556.html
>
> question is how to handle the inherit for fscrypt correctly cause hardlink files have two parents or?
> with using root context only it worked in my case (opening file on both places was possible)

The inode will always have just one parent, it has just more than one name.
Right now fscrypt seems to have a simple inheritance model where
always from the root context is inherited.
This is why the patch you mentioned works. But this can change in
future fscrypt modes.
See fscrypt_inherit_context().

So I suggest implementing it properly in mkfs.ubifs.

Anyway, thanks a lot for bringing this issue up again! I completely
forgot about it.
If you have further questions, don't hesitate to ask.

-- 
Thanks,
//richard



More information about the linux-mtd mailing list