Skip to content

RDKEMW-18043: Release Cryptography Vault singleton SecProcessor handle on deep sleep#4120

Open
sergiygladkyy wants to merge 1 commit into
support/8.5.3.0from
feature/RDKEMW-18043-cryptography-deep-sleep
Open

RDKEMW-18043: Release Cryptography Vault singleton SecProcessor handle on deep sleep#4120
sergiygladkyy wants to merge 1 commit into
support/8.5.3.0from
feature/RDKEMW-18043-cryptography-deep-sleep

Conversation

@sergiygladkyy
Copy link
Copy Markdown

@sergiygladkyy sergiygladkyy commented May 19, 2026

Full rationale, validation, paired changes, and risk notes are in the lead commit message.

JIRA: https://jira.rdkcentral.com/jira/browse/RDKEMW-18043

@sergiygladkyy sergiygladkyy requested review from a team as code owners May 19, 2026 20:31
Copilot AI review requested due to automatic review settings May 19, 2026 20:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a deep-sleep stability issue by ensuring the Cryptography Vault’s SecProcessor handle (held by a process-lifetime singleton) is explicitly released on deep-sleep entry, and by pulling in the corresponding call site from entservices-cryptography.

Changes:

  • Adds a new ThunderClientLibraries patch that exposes a C-ABI vault_processor_release() wrapper calling Implementation::Vault::ProcessorRelease().
  • Updates wpeframework-clientlibraries_4.4.bb to apply the new patch.
  • Bumps entservices-cryptography.bb SRCREV to a commit that calls vault_processor_release() during deep-sleep transition handling.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
recipes-extended/wpe-framework/wpeframework-clientlibraries/r4.4/0002-RDKEMW-18043-Add-vault_processor_release-C-wrapper.patch Adds a C-ABI wrapper to explicitly release the Vault singleton’s SecProcessor handle.
recipes-extended/wpe-framework/wpeframework-clientlibraries_4.4.bb Applies the new clientlibraries patch via SRC_URI.
recipes-extended/entservices/entservices-cryptography.bb Pulls in the paired deep-sleep hook by updating SRCREV.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread recipes-extended/wpe-framework/wpeframework-clientlibraries_4.4.bb
Comment thread recipes-extended/entservices/entservices-cryptography.bb Outdated
@sergiygladkyy sergiygladkyy force-pushed the feature/RDKEMW-18043-cryptography-deep-sleep branch 2 times, most recently from 08a5980 to d2a0a46 Compare May 19, 2026 20:56
…s r4.4

Reason for change:
- Implementation::Vault::ProcessorRelease() exists in ThunderClientLibraries'
  SecApi Vault.cpp (paired with ProcessorAcquire added by
  0001-SecAPI-Re-acquire-sec-handle-after-flush.patch)
- No C ABI symbol exposes it for plugin callers
- Add vault_processor_release() extern "C" wrapper invoking it via
  vault_instance(CRYPTOGRAPHY_VAULT_DEFAULT) so the CryptographyExtAccess
  plugin (rdkcentral/entservices-cryptography
  feature/RDKEMW-18043-cryptography-deep-sleep) can drive SecProcessor
  handle release before deep sleep
- Re-acquire on wake remains automatic via the existing factory

Closes the residual SecProcessor handle leak at /opt/drm/vault/ that
survived destroyImplementation() on deep-sleep entry. The default
Implementation::Vault in vault_instance() is a function-static
(process-lifetime) singleton -- its destructor never runs at deep sleep,
so the SA2 SecProcessor handle stays open across S3 and triggers
SOFTWARE_MASTER_RESET on BCM Dhruv with Network Standby OFF (handle
0xeea3dc00 observed in RDKEMW-18043-8 reboot log).

Validation (RDKEMW-18043-11 image):
- MW IPK build: success (GHA run 25938241837)
- IA full-stack build: success (GHA run 25953125144)
  Firmware: SKXI11BED_DEV_rel-15567_20260516045009_18043-11
- Symbol gates on resulting rootfs:
  * T vault_processor_release in libWPEFrameworkCryptography.so.4.4.1
    (sym 315, addr 0x14e81, 20 bytes)
  * U vault_processor_release in libWPEFrameworkCryptographyExtAccess.so
    (sym 147, UND -- resolves at dlopen)
- DevQA on Dhruv (Network Standby OFF, 3 iterations): no reboots;
  SecProcessor_Release for /opt/drm/vault/ handle observed; existing
  SecProcessor_Release sites for SecManager / DeviceProvisioning /
  Widevine / PlayReady still firing.

Pairs with:
- rdkcentral/entservices-cryptography branch
  feature/RDKEMW-18043-cryptography-deep-sleep (head db7b7d96)
- rdk-e/rdkservices-cpc PR #889 (DeviceProvisioning leg, from -5 / -8)
- rdk-e/meta-middleware-development PR #2777
  (Widevine + PlayReady legs, from -8)

JIRA: https://jira.rdkcentral.com/jira/browse/RDKEMW-18043

Test Procedure: described in the ticket
Implements: bbappend patch on wpeframework-clientlibraries r4.4
Risks: Low
Source: COMCAST
License: Apache-2.0
Upstream-Status: Pending

Version: patch

Signed-off-by: Sergiy Gladkyy <sgladkyy@productengine.com>
@sergiygladkyy sergiygladkyy force-pushed the feature/RDKEMW-18043-cryptography-deep-sleep branch from d2a0a46 to 044e301 Compare May 19, 2026 21:03
Copilot AI review requested due to automatic review settings May 19, 2026 21:25
@sergiygladkyy sergiygladkyy force-pushed the feature/RDKEMW-18043-cryptography-deep-sleep branch from 044e301 to 686b620 Compare May 19, 2026 21:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

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.

2 participants