wip(keystore): add F1 Phase A diagnostic logs in updateAad path
Instrumentation-only. Logs entry (primitive class, callingUid, input size) and throwable propagation (class, SSE error code, message, stack top) in both SoftwareOperation.updateAad and SoftwareOperationBinder.updateAad. Intended to distinguish F1 hypotheses H1 (binder swallows SSE) vs H3 (AIDL signature drift) once duck's probe key is routed through our simulator instead of the real TEE.
This commit is contained in:
+17
-1
@@ -254,10 +254,18 @@ class SoftwareOperation(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun updateAad(aadInput: ByteArray?) {
|
fun updateAad(aadInput: ByteArray?) {
|
||||||
SystemLogger.debug("[SoftwareOp TX_ID: $txId] updateAad() inputSize=${aadInput?.size ?: 0}")
|
SystemLogger.info("[SoftwareOp TX_ID: $txId] updateAad() ENTRY inputSize=${aadInput?.size ?: 0} primitive=${primitive::class.simpleName}")
|
||||||
checkActive()
|
checkActive()
|
||||||
checkInputLength(aadInput)
|
checkInputLength(aadInput)
|
||||||
|
try {
|
||||||
primitive.updateAad(aadInput)
|
primitive.updateAad(aadInput)
|
||||||
|
SystemLogger.info("[SoftwareOp TX_ID: $txId] updateAad() RETURNED_NORMALLY (unexpected for non-AEAD)")
|
||||||
|
} catch (throwable: Throwable) {
|
||||||
|
val top = throwable.stackTrace.firstOrNull()?.toString() ?: "<no-frame>"
|
||||||
|
val code = (throwable as? ServiceSpecificException)?.errorCode
|
||||||
|
SystemLogger.info("[SoftwareOp TX_ID: $txId] updateAad() THREW class=${throwable::class.java.name} code=$code msg=${throwable.message} top=$top")
|
||||||
|
throw throwable
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun update(data: ByteArray?): ByteArray? {
|
fun update(data: ByteArray?): ByteArray? {
|
||||||
@@ -387,7 +395,15 @@ class SoftwareOperationBinder(private val operation: SoftwareOperation) :
|
|||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
override fun updateAad(aadInput: ByteArray?) {
|
override fun updateAad(aadInput: ByteArray?) {
|
||||||
|
SystemLogger.info("[SoftwareOpBinder] updateAad() ENTRY callingUid=${android.os.Binder.getCallingUid()} size=${aadInput?.size ?: 0}")
|
||||||
|
try {
|
||||||
operation.updateAad(aadInput)
|
operation.updateAad(aadInput)
|
||||||
|
SystemLogger.info("[SoftwareOpBinder] updateAad() RETURNED_NORMALLY")
|
||||||
|
} catch (throwable: Throwable) {
|
||||||
|
val code = (throwable as? ServiceSpecificException)?.errorCode
|
||||||
|
SystemLogger.info("[SoftwareOpBinder] updateAad() PROPAGATING class=${throwable::class.java.name} code=$code msg=${throwable.message}")
|
||||||
|
throw throwable
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
|
|||||||
Reference in New Issue
Block a user