2

I would like to authenticate a squashfs image, using a public-key signature. For an elegant implementation, it would be ideal if such a signature could simply be appended to the end of the squashfs image file.

Can squashfs tools, including kernel mount code, handle a squashfs image with some extra data appended to the end of the file, without any ill effect?

1 Answer 1

1

As squashfs can reside on block devices, which have no relation in size to the filesystem size, apart from being at least as big, I would estimate that appending random data to a squashfs is unlikely to cause problems.

A quick browse through the kernel super.c driver function squashfs_fill_super() which seems to mount a squashfs, does not show it being concerned with data beyond the end of the bytes_used size given in the superblock, which is at the start of the filesystem, and no error messages seem relevant either.

Note, however, that a squashfs file is usually padded at the end to be a multiple of 4Kibytes, so that it can be used with loopback block devices. Make sure whatever you add is also a multiple of 4096 bytes.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.