File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1227,7 +1227,8 @@ async fn run_from_opt(opt: Opt) -> Result<()> {
12271227 FsverityOpts :: Enable { path } => {
12281228 let fd =
12291229 std:: fs:: File :: open ( & path) . with_context ( || format ! ( "Reading {path}" ) ) ?;
1230- fsverity:: enable_verity_raw :: < fsverity:: Sha256HashValue > ( & fd) ?;
1230+ // Note this is not robust to forks, we're not using the _maybe_copy variant
1231+ fsverity:: enable_verity_with_retry :: < fsverity:: Sha256HashValue > ( & fd) ?;
12311232 Ok ( ( ) )
12321233 }
12331234 } ,
Original file line number Diff line number Diff line change @@ -65,7 +65,11 @@ fn enable_fsverity_in_objdir(d: &Dir) -> anyhow::Result<()> {
6565 let enabled =
6666 composefs:: fsverity:: measure_verity_opt :: < Sha256HashValue > ( f. as_fd ( ) ) ?. is_some ( ) ;
6767 if !enabled {
68- composefs_fsverity:: enable_verity_raw :: < Sha256HashValue > ( & f) ?;
68+ // NOTE: We're not using the _with_copy API here because for us it'd require
69+ // copying all the metadata too which is mildly tedious.
70+ // For main composefs we don't need to care about the per-file metadata
71+ // in general which simplifies a lot.
72+ composefs_fsverity:: enable_verity_with_retry :: < Sha256HashValue > ( f. as_fd ( ) ) ?;
6973 }
7074 }
7175 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments