-
Notifications
You must be signed in to change notification settings - Fork 26
Add: Qualcomm User Data Encryption test script & Document #141
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
base: main
Are you sure you want to change the base?
Conversation
xbharani
commented
Aug 11, 2025
- Checks for fscryptctl binary presence
- Creates a random sw encryption key
- Applies and verifies encryption policy
- Confirms functionality with a test file
Runner/suites/Kernel/Baseport/UserDataEncryption/README_UserDataEncryption.md
Outdated
Show resolved
Hide resolved
|
This pull request has been marked as stale due to 30 days of inactivity. To prevent automatic closure in 7 days, remove the stale label or add a comment. You can reopen a closed pull request at any time. |
|
@xbharani Any update on the requested changes? |
|
This pull request has been marked as stale due to 30 days of inactivity. To prevent automatic closure in 7 days, remove the stale label or add a comment. You can reopen a closed pull request at any time. |
bd6eccf to
56d715d
Compare
686cf9f to
8f29437
Compare
smuppand
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the script is close, but a few things will bite in CI / reliability, plus a couple of correctness/safety issues.
- Checks for fscryptctl binary presence - Creates a random sw encryption key - Applies and verifies encryption policy - Confirms functionality with a test file - Added yaml config Signed-off-by: Bharani Bhuvanagiri <bbharani@qti.qualcomm.com>
smuppand
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few additional minor changes are required. Other than that, everything appears to be fine.
|
|
||
| if [ -z "${__INIT_ENV_LOADED:-}" ]; then | ||
| # shellcheck disable=SC1090 | ||
| . "$INIT_ENV" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
init_evn sourcing isn't idempotent missing __INIT_ENV_LOADED=1
|
|
||
| ## Notes | ||
|
|
||
| - The script uses /data/UserDataEncryption for all operations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script is set to use /mnt as the base directory (with /UDE as a fallback), but it still seems to reference /data here.
|
|
||
| Ensure the following components are present on the target device: | ||
|
|
||
| - `fscryptctl` binary available in `/data/` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update here, as the data will not be available.
|
|
||
|
|
||
| ## kernel config check | ||
| if [ -r /proc/config.gz ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Step 6: Verify policy | ||
| log_info "Verifying encryption policy" | ||
|
|
||
| if ! policy_output=$("$FSCRYPTCTL" get_policy "$MOUNT_DIR" 2>/dev/null); then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many commands redirect to /dev/null (eg add_key, key_status, get_policy) When something fails, logs won't explain why. Please capture stderr into a variable and log it on failure