Generated source and diagnostic ABI

struct reg_src_register_args #

Total size 24 bytes.

OffsetSizeTypeField
04__u32hive_count
44__u32_pad
88__u64max_sequence
168__u64hives_ptr

struct reg_src_negotiate_args #

Total size 16 bytes.

OffsetSizeTypeField
04__u32version
44__u32flags
88__u64session

struct reg_src_request_context_args #

Total size 40 bytes.

OffsetSizeTypeField
08__u64session
88__u64request_id
168__u64request_deadline_ns
248__u64lifetime_deadline_ns
328__u64lease_deadline_ns

struct reg_src_renew_args #

Total size 32 bytes.

OffsetSizeTypeField
08__u64session
88__u64transaction_id
168__u64lifetime_deadline_ns
248__u64lease_deadline_ns

struct reg_src_hive_entry #

Total size 56 bytes.

OffsetSizeTypeField
04__u32name_len
44__u32_pad0
88__u64name_ptr
1616__u8``[16]root_guid
324__u32flags
364__u32_pad1
4016__u8``[16]scope_guid

Tracepoint diagnostic codes #

From uapi/pkm/trace.h. These are a diagnostic contract for ftrace, perf and eBPF consumers, letting a tool decode an lcs: event's reason, op or state field without recompiling against a specific kernel. No LCS syscall accepts or returns them, and values are append-only.

lcs_rsi_request op — which of the 18 RSI dispatch verbs a source-side request admission record describes. Emitted by lcs:lcs_rsi_request on successful queue admission and on the admission error rungs; the rung is read from ret (0 == enqueued, -EAGAIN == in-flight at limit / backpressure, -EIO == source gone / fd closing, -EOVERFLOW == request-id space exhausted, other == build reject). The same op enum tags the round-trip begin marker (lcs_rsi_roundtrip). Never records a pathname, key name, GUID, or frame bytes — only this op code, ids, counts and ret.

ConstantValueNotes
LCS_OP_LOOKUP0RSI_LOOKUP
LCS_OP_READ_KEY1RSI_READ_KEY
LCS_OP_ENUM_CHILDREN2RSI_ENUM_CHILDREN
LCS_OP_QUERY_VALUES3RSI_QUERY_VALUES
LCS_OP_SET_VALUE4RSI_SET_VALUE
LCS_OP_DELETE_VALUE5RSI_DELETE_VALUE_ENTRY
LCS_OP_BLANKET_TOMBSTONE6RSI_SET_BLANKET_TOMBSTONE
LCS_OP_DROP_KEY7RSI_DROP_KEY
LCS_OP_CREATE_ENTRY8RSI_CREATE_ENTRY
LCS_OP_HIDE_ENTRY9RSI_HIDE_ENTRY
LCS_OP_DELETE_ENTRY10RSI_DELETE_ENTRY
LCS_OP_CREATE_KEY11RSI_CREATE_KEY
LCS_OP_WRITE_KEY12RSI_WRITE_KEY
LCS_OP_TXN_BEGIN13RSI_BEGIN_TRANSACTION
LCS_OP_TXN_COMMIT14RSI_COMMIT_TRANSACTION
LCS_OP_TXN_ABORT15RSI_ABORT_TRANSACTION
LCS_OP_FLUSH16RSI_FLUSH
LCS_OP_DELETE_LAYER17RSI_DELETE_LAYER

lcs_rsi_response reason — the outcome of accepting/validating a source's RSI response frame, and the late-response effects that silently mark a source DOWN. ACCEPTED is the clean path; DESYNC / OP_MISMATCH / UNKNOWN_STATUS are the accept-time rejects that all surface as -EINVAL/-EIO; MALFORMED_PAYLOAD is a per-op body validation reject; the LATE_* codes mark a response whose deferred effect (commit/mutation/begin bookkeeping) failed and took the source DOWN. Verdict/outcome is also in ret. Never records name/GUID/frame bytes.

ConstantValueNotes
LCS_RESP_ACCEPTED0response matched an in-flight request
LCS_RESP_DESYNC1no matching delivered/unaccepted record
LCS_RESP_OP_MISMATCH2response op != request op | RESPONSE_BIT
LCS_RESP_UNKNOWN_STATUS3rsi_status not a known status code
LCS_RESP_MALFORMED_PAYLOAD4per-op response body failed validation
LCS_RESP_LATE_COMMIT_FAIL5commit late-effect failed; source DOWN
LCS_RESP_LATE_MUTATION_FAIL6mutation late-effect failed; source DOWN
LCS_RESP_LATE_BEGIN_FAIL7begin-txn late-effect failed; source DOWN

lcs_source_fd reason — which source-fd lifecycle transition a record marks.

OPEN is a fresh /dev/pkm_registry fd; the remaining codes are the entry points that drive a source to the DOWN/closing state. source_down_id is the source id that transitioned DOWN (0 if the call was a no-op). The semantic cause of a late-effect-driven DOWN is carried by lcs_rsi_response (LCS_RESP_LATE_*); here EXPLICIT/MARK_BY_ID are the mechanical transitions. No pathname/SD bytes.

ConstantValueNotes
LCS_SRC_OPEN0new source fd issued (post-TCB check)
LCS_SRC_RELEASE1fd .release() teardown
LCS_SRC_MALFORMED2malformed protocol frame -> mark down
LCS_SRC_EXPLICIT3explicit mark-down of this fd
LCS_SRC_MARK_BY_ID4mark-down requested by source id

lcs_in_flight reason — an in-flight RSI request table transition (kept lean; insert on admission, delivered when handed to the source's read(), release on response completion or teardown). in_flight_count is the post-transition depth. Emitted by lcs:lcs_in_flight.

ConstantValueNotes
LCS_IF_INSERT0request inserted into in-flight table
LCS_IF_DELIVERED1request delivered to source read()
LCS_IF_RELEASE2request released from in-flight table

lcs_route op — which resolution the lcs:lcs_route event describes.

ConstantValueNotes
LCS_ROUTE_HIVE_NAME0hive-name -> source/root resolution
LCS_ROUTE_ABSOLUTE_PATH1absolute-path -> source/root resolution
LCS_ROUTE_SYMLINK_TARGET2symlink-target -> source/root resolution

lcs_registration decision — the source registration path.

NEW/RESUME_DOWN are publish verdicts; COPY is the input-copy stage; REPLAY_FAIL/OVERFLOW_FAIL are resume post-publish -EIO paths that mark the resumed source down. Emitted by lcs:lcs_source_register / _registration_publish / _registration_copy.

ConstantValueNotes
LCS_REG_NEW0new source slot admitted
LCS_REG_RESUME_DOWN1down source slot resumed
LCS_REG_COPY2registration input copied from user
LCS_REG_REPLAY_FAIL3resume pending-delete replay failed (EIO)
LCS_REG_OVERFLOW_FAIL4resume overflow dispatch failed (EIO)

lcs_bootstrap stage — the phase of a bootstrap / self-config refresh.

Emitted by lcs:lcs_bootstrap_refresh / _self_config_refresh / _self_config_publish.

ConstantValueNotes
LCS_BOOT_REGISTRY0registry root discover phase
LCS_BOOT_KMES1kmes config root discover phase
LCS_BOOT_LAYERS2layer metadata root discover phase
LCS_BOOT_SELF_WATCH3self-watch arm phase
LCS_BOOT_COMPLETE4bootstrap refresh completed
LCS_BOOT_SELF_CONFIG_REFRESH5self-config refresh-from-key outcome
LCS_BOOT_SELF_CONFIG_PARAM_INVALID6self-config publish rejected a parameter

lcs_runtime_limits field_id — which runtime-limit field a validate reject names, or LCS_LIM_ALL for a successful whole-struct publish. Emitted by lcs:lcs_limits_validate (-EINVAL, value offending) and lcs:lcs_limits_publish.

ConstantValueNotes
LCS_LIM_REQUEST_TIMEOUT_MS0
LCS_LIM_TRANSACTION_TIMEOUT_MS1
LCS_LIM_NOTIFICATION_QUEUE_SIZE2
LCS_LIM_SYMLINK_DEPTH_LIMIT3
LCS_LIM_MAX_VALUE_SIZE4
LCS_LIM_MAX_KEY_DEPTH5
LCS_LIM_MAX_PATH_COMPONENT_LENGTH6
LCS_LIM_MAX_TOTAL_PATH_LENGTH7
LCS_LIM_MAX_LAYERS_PER_VALUE8
LCS_LIM_MAX_BOUND_TRANSACTIONS_PER_SOURCE9
LCS_LIM_MAX_READ_ONLY_TRANSACTIONS_PER_SOURCE10
LCS_LIM_MAX_TOTAL_LAYERS11
LCS_LIM_MAX_REGISTERED_SOURCES12
LCS_LIM_MAX_HIVES_PER_SOURCE13
LCS_LIM_MAX_CONCURRENT_RSI_REQUESTS14
LCS_LIM_MAX_SCOPE_GUIDS_PER_TOKEN15
LCS_LIM_MAX_PRIVATE_LAYERS_PER_TOKEN16
LCS_LIM_MAX_SUBTREE_WATCH_DEPTH17
LCS_LIM_MAX_TRANSACTION_WATCH_EVENT_BURST18
LCS_LIM_ALL19whole-struct publish (success)

lcs_audit event_type_id — which LCS audit event a record describes.

Emitted by lcs:lcs_audit_emit and lcs:lcs_audit_emit_failed. result_errno carries the op-specific numeric. No SD or raw GUID bytes; key GUID is a u64 hash.

ConstantValueNotes
LCS_AUDIT_KEY_OPEN0key-open SACL audit
LCS_AUDIT_BACKUP_START1
LCS_AUDIT_BACKUP_COMPLETE2
LCS_AUDIT_RESTORE_START3
LCS_AUDIT_RESTORE_COMPLETE4
LCS_AUDIT_VALIDATION_FAILURE5source validation-failure audit
LCS_AUDIT_SELF_CONFIG_INVALID6self-config-invalid audit

lcs_txn state — the transaction-fd state machine state carried in old_state new_state.

Emitted by lcs:lcs_txn_begin / _first_bind / _bind_mutation _commit / _abort / _timeout / _source_down.

ConstantValueNotes
LCS_TXN_ST_ACTIVE_UNBOUND0allocated, not yet source-bound
LCS_TXN_ST_ACTIVE_BOUND1bound to a source + root guid
LCS_TXN_ST_COMMITTED2commit round-trip succeeded
LCS_TXN_ST_ABORTED3aborted (close / layer writer abort)
LCS_TXN_ST_TIMED_OUT4deadline timer or commit timeout
LCS_TXN_ST_SOURCE_DOWN5bound source marked down

lcs_key_fd cmd — the key-fd ioctl verb (also stamped on lcs_key_mutation).

LCS_KCMD_NONE is used by publish/release/read. Never records key/name/SD bytes. Emitted by lcs:lcs_key_ioctl / _mutation.

ConstantValueNotes
LCS_KCMD_NONE0no ioctl verb (publish/release/read)
LCS_KCMD_SET_VALUE1
LCS_KCMD_DELETE_VALUE2
LCS_KCMD_BLANKET_TOMBSTONE3
LCS_KCMD_DELETE_KEY4
LCS_KCMD_HIDE_KEY5
LCS_KCMD_QUERY_VALUE6
LCS_KCMD_QUERY_VALUES_BATCH7
LCS_KCMD_ENUM_VALUES8
LCS_KCMD_ENUM_SUBKEYS9
LCS_KCMD_QUERY_KEY_INFO10
LCS_KCMD_GET_SECURITY11
LCS_KCMD_SET_SECURITY12
LCS_KCMD_FLUSH13
LCS_KCMD_BACKUP14
LCS_KCMD_RESTORE15
LCS_KCMD_NOTIFY16

Edit this page