Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bundle: allow installing bundle from ZFS partitions #689

Merged
merged 1 commit into from
Jan 25, 2021
Merged

bundle: allow installing bundle from ZFS partitions #689

merged 1 commit into from
Jan 25, 2021

Conversation

zonque
Copy link
Contributor

@zonque zonque commented Jan 25, 2021

Add ZFS_SUPER_MAGIC as defines in openzfs.

Copy link
Member

@jluebbe jluebbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/openzfs/zfs/blob/master/include/sys/fs/zfs.h#L1198 calls it LINUX_ZFS_SUPER_MAGIC. Please add it to the list in https://github.com/rauc/rauc/blob/master/src/bundle.c#L21-L81 with a comment where it was found.

Add `ZFS_SUPER_MAGIC` as defines in openzfs.

Signed-off-by: Daniel Mack <daniel@zonque.org>
@zonque
Copy link
Contributor Author

zonque commented Jan 25, 2021

https://github.com/openzfs/zfs/blob/master/include/sys/fs/zfs.h#L1198 calls it LINUX_ZFS_SUPER_MAGIC. Please add it to the list in https://github.com/rauc/rauc/blob/master/src/bundle.c#L21-L81 with a comment where it was found.

Ah, I missed that list. Thanks!

Also, ZFS apparently cannot be checked with the rdev check in bundle.c so we have to set mount_checked to TRUE immediately. Will update.

@zonque
Copy link
Contributor Author

zonque commented Jan 25, 2021

Updated. PTAL.

@codecov
Copy link

codecov bot commented Jan 25, 2021

Codecov Report

Merging #689 (21bb303) into master (f81061c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #689   +/-   ##
=======================================
  Coverage   72.81%   72.81%           
=======================================
  Files          28       28           
  Lines        8645     8645           
=======================================
  Hits         6295     6295           
  Misses       2350     2350           
Impacted Files Coverage Δ
src/bundle.c 62.79% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f81061c...21bb303. Read the comment docs.

@jluebbe jluebbe merged commit a34d1d8 into rauc:master Jan 25, 2021
@jluebbe
Copy link
Member

jluebbe commented Jan 25, 2021

This should also help with #688.

@zonque You're actually installing from ZFS on embedded devices? Have you tried the verity bundle format?

@zonque
Copy link
Contributor Author

zonque commented Jan 25, 2021

@zonque You're actually installing from ZFS on embedded devices?

Yes, we're using it both on x86 and raspberrypis.

Have you tried the verity bundle format?

No, how would that help?

@jluebbe
Copy link
Member

jluebbe commented Jan 26, 2021

Have you tried the verity bundle format?

No, how would that help?

With plain bundles, RAUC uses these checks to protect against the TOCTOU vulnerability:
https://rauc.readthedocs.io/en/latest/advanced.html#protection-against-concurrent-bundle-modification

If it detects a verity bundle, these checks are not necessary and skipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants