ARMmbed / ARMmbed/mbed-crypto

ITS should call fsync

Open
#209 2 comments 0 reactions 0 assignees View on GitHub
enhancement Jira status: REOPENED mirrored type: enhancement
Dominant language
C
Stars
108
Forks
95
PR merge metrics
No merged PRs in 30d

Description

### Description

The PSA ITS implementation in Mbed Crypto was originally developed for testing. It modifies files atomically, so it's resilient to interruptions such as a process crash, but it does not call any disk synchronization primitives, so it is not resilient to an operating system crash.

PSA ITS should call a disk synchronization primitive that is configurable at build time. On Unix systems, it should call `fsync` on the file and on the containing directory.

Cc @paulhowardarm

### Issue request type

[ ] Question
[x] Enhancement
[ ] Bug

Contributor guide

Open the contributing guide

Research direction

Start at the PSA ITS implementation and inspect its atomic file-update path and build configuration. Verify how the disk synchronization primitive is selected, then ensure Unix handling synchronizes both the file and its containing directory with fsync. Done means persistence is resilient to operating-system crashes while retaining atomic updates.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.