Exports for Kernel.
More...
|
| | VITASDK_BUILD_ASSERT_EQ (0x34, SceCoredumpTriggerParam) |
| |
| int | ksceCoredumpCafInit (void) |
| | Initializes CAF cryptographic support.
|
| |
| SceUID | ksceCoredumpCafContextCreate (void) |
| | Creates a CAF cryptographic context.
|
| |
| int | ksceCoredumpCafContextDestroy (SceUID ctx) |
| | Destroys a CAF cryptographic context.
|
| |
| int | ksceCoredumpCafCreateIv (void *iv, SceSize iv_size) |
| | Generates a CAF initialization vector.
|
| |
| int | ksceCoredumpCafHeaderInit (SceUID ctx, SceUInt32 hmac_key_id) |
| | Initializes the HMAC-SHA256 state for a CAF header.
|
| |
| int | ksceCoredumpCafHeaderTransform (SceUID ctx, const void *data, SceSize size) |
| | Adds data to the CAF header's HMAC-SHA256 calculation.
|
| |
| int | ksceCoredumpCafHeaderFinal (SceUID ctx, void *digest, SceSize digest_size) |
| | Finalizes the CAF header and writes its HMAC-SHA256 digest.
|
| |
| int | ksceCoredumpCafSegmentFinal (SceUID ctx, void *digest, SceSize digest_size) |
| | Finalizes the current CAF segment and writes its HMAC-SHA256 digest.
|
| |
| int | ksceCoredumpCafSegmentInit (SceUID ctx, SceUInt32 hmac_key_id, SceCoredumpCafSegmentMode mode, SceUInt32 aes_key_id, const void *iv, SceSize iv_size) |
| | Initializes the cryptographic state for a CAF segment.
|
| |
| int | ksceCoredumpCafSegmentTransform (SceUID ctx, const void *src, void *dst, SceSize size) |
| | Transforms and authenticates CAF segment data.
|
| |
| int | ksceCoredumpCreateDump (ScePID pid, const char *titleid, SceSize titleid_len, const char *app_name, SceSize app_name_len, int app_version, char *path, SceSize path_size) |
| | Creates a coredump for a process and waits for completion.
|
| |
| int | ksceCoredumpDeleteCrashReportCaf (void) |
| | Deletes the CAF crash-report file at ux0:data/crash_report.caf.
|
| |
| int | ksceCoredumpCafFinal (void) |
| | Finalizes CAF cryptographic support.
|
| |
Exports for Kernel.
Using this library in your project
Include the header file in your project:
Link the library to the executable:
SceCoredumpForDriver_stub
◆ SceCoredumpTriggerParam
| struct SceCoredumpTriggerParam |
| Data Fields |
|
SceSize |
size |
Size supplied from the start of this structure; normally sizeof(SceCoredumpTriggerParam). |
|
int |
data_0x04 |
|
|
int |
data_0x08 |
|
|
int |
data_0x0C |
|
|
int |
data_0x10 |
|
|
SceSize |
titleid_len |
Number of bytes to copy from titleid; maximum 10. |
|
const char * |
titleid |
Title ID; required when titleid_len is nonzero. |
|
SceSize |
app_name_len |
Number of bytes to copy from app_name; maximum 0x80. |
|
const char * |
app_name |
Application name; required when app_name_len is nonzero. |
|
int |
data_0x24 |
|
|
int |
data_0x28 |
|
|
SceUID |
crash_thid |
Thread whose stop reason is inspected when crash_cause does not force a stop reason. |
|
int |
data_0x30 |
|
◆ SceKernelCoredumpStateUpdateCallback
| typedef int(* SceKernelCoredumpStateUpdateCallback) (int task_id, ScePID pid, int progress) |
Coredump progress callback.
FW 3.60 reports percentages from 0 through 100, with intermediate updates at multiples of five percentage points. The callback return value is ignored.
- Parameters
-
| [in] | task_id | Coredump task identifier. |
| [in] | pid | Process identifier. |
| [in] | progress | Current coredump progress. |
◆ SceKernelCoredumpStateFinishCallback
| typedef int(* SceKernelCoredumpStateFinishCallback) (int task_id, ScePID pid, int result, const char *path, SceSize path_len, int is_caf) |
Coredump completion callback.
- Parameters
-
| [in] | task_id | Coredump task identifier. |
| [in] | pid | Process identifier. |
| [in] | result | Coredump operation result. |
| [in] | path | Path of the generated coredump. |
| [in] | path_len | Length of path including its terminating NUL. |
| [in] | is_caf | Nonzero if path identifies a CAF crash report; zero if it identifies a plain PSP2 coredump. |
The path is owned by SceCoredump and must be copied before this callback returns. The callback return value is ignored.
◆ SceCoredumpDumpLevel
Dump-level presets, including use of the registry configuration.
| Enumerator |
|---|
| SCE_COREDUMP_DUMP_LEVEL_CONFIGURED | Use the FW 3.60 registry configuration.
|
| SCE_COREDUMP_DUMP_LEVEL_MINIMAL | Select the minimal set of dump sections.
|
| SCE_COREDUMP_DUMP_LEVEL_FULL | Select the full set of dump sections.
|
◆ SceCoredumpOutputMode
| Enumerator |
|---|
| SCE_COREDUMP_OUTPUT_MODE_AUTO | Try the configured host0 path, then sd0, then ux0:data.
|
| SCE_COREDUMP_OUTPUT_MODE_HOST0 | Write to the host0 root.
|
| SCE_COREDUMP_OUTPUT_MODE_UX0_DATA | Write to ux0:data.
|
| SCE_COREDUMP_OUTPUT_MODE_HOST0_CUSTOM_PATH | Write below a caller-supplied host0 path.
|
◆ SceCoredumpCafSegmentMode
| Enumerator |
|---|
| SCE_COREDUMP_CAF_SEGMENT_MODE_HMAC_SHA256 | Authenticate the source without encryption.
|
| SCE_COREDUMP_CAF_SEGMENT_MODE_AES_CBC_ENCRYPT | Encrypt, then authenticate the ciphertext.
|
| SCE_COREDUMP_CAF_SEGMENT_MODE_AES_CBC_DECRYPT | Authenticate the ciphertext, then decrypt it.
|
◆ VITASDK_BUILD_ASSERT_EQ()
◆ ksceCoredumpCafInit()
| int ksceCoredumpCafInit |
( |
void |
| ) |
|
Initializes CAF cryptographic support.
This validates and makes the coredump key stores available. A repeated call succeeds when they are already available.
- Returns
- 0 on success, < 0 on error.
◆ ksceCoredumpCafContextCreate()
| SceUID ksceCoredumpCafContextCreate |
( |
void |
| ) |
|
Creates a CAF cryptographic context.
A context keeps the state for one HMAC/AES operation. Initializing a header or segment replaces that state, and its matching final function clears it. Do not use the same context concurrently.
- Returns
- The context UID on success, < 0 on error.
◆ ksceCoredumpCafContextDestroy()
| int ksceCoredumpCafContextDestroy |
( |
SceUID |
ctx | ) |
|
Destroys a CAF cryptographic context.
- Parameters
-
- Returns
- 0 on success, < 0 on error.
◆ ksceCoredumpCafCreateIv()
| int ksceCoredumpCafCreateIv |
( |
void * |
iv, |
|
|
SceSize |
iv_size |
|
) |
| |
Generates a CAF initialization vector.
- Parameters
-
| [out] | iv | Buffer that receives the 16-byte initialization vector. |
| [in] | iv_size | Size of iv. Must be 16 bytes. |
- Returns
- 0 on success, < 0 on error.
◆ ksceCoredumpCafHeaderInit()
Initializes the HMAC-SHA256 state for a CAF header.
- Parameters
-
| [in] | ctx | CAF context UID. |
| [in] | hmac_key_id | ID of the 32-byte HMAC key; 1 through 3. |
- Returns
- 0 on success, < 0 on error.
◆ ksceCoredumpCafHeaderTransform()
| int ksceCoredumpCafHeaderTransform |
( |
SceUID |
ctx, |
|
|
const void * |
data, |
|
|
SceSize |
size |
|
) |
| |
Adds data to the CAF header's HMAC-SHA256 calculation.
- Parameters
-
| [in] | ctx | CAF context UID. |
| [in] | data | Header data. May be NULL only when size is zero. |
| [in] | size | Number of bytes to authenticate. |
- Returns
- 0 on success, < 0 on error.
◆ ksceCoredumpCafHeaderFinal()
| int ksceCoredumpCafHeaderFinal |
( |
SceUID |
ctx, |
|
|
void * |
digest, |
|
|
SceSize |
digest_size |
|
) |
| |
Finalizes the CAF header and writes its HMAC-SHA256 digest.
The header's cryptographic state is cleared after a successful call.
- Parameters
-
| [in] | ctx | CAF context UID. |
| [out] | digest | Buffer that receives the 32-byte digest. May be NULL only when digest_size is zero. |
| [in] | digest_size | Size of digest. Must be at least 32 bytes when digest is non-NULL. |
- Returns
- 0 on success, < 0 on error.
◆ ksceCoredumpCafSegmentFinal()
| int ksceCoredumpCafSegmentFinal |
( |
SceUID |
ctx, |
|
|
void * |
digest, |
|
|
SceSize |
digest_size |
|
) |
| |
Finalizes the current CAF segment and writes its HMAC-SHA256 digest.
The segment's cryptographic state is cleared after a successful call.
- Parameters
-
| [in] | ctx | CAF context UID. |
| [out] | digest | Buffer that receives the 32-byte digest, or NULL to discard it. |
| [in] | digest_size | Size of digest. Must be at least 32 bytes when digest is non-NULL, and zero when digest is NULL. |
- Returns
- 0 on success, < 0 on error.
◆ ksceCoredumpCafSegmentInit()
Initializes the cryptographic state for a CAF segment.
- Parameters
-
| [in] | ctx | CAF context UID. |
| [in] | hmac_key_id | ID of the 32-byte HMAC key; 1 through 3. |
| [in] | mode | One of SceCoredumpCafSegmentMode. |
| [in] | aes_key_id | ID of the 16-byte AES key; 1 through 4 or 0x10000001. |
| [in] | iv | Initialization vector. Exactly 16 bytes are read, including in HMAC-only mode. |
| [in] | iv_size | Size of iv. Must be 16 bytes. |
- Returns
- 0 on success, < 0 on error.
◆ ksceCoredumpCafSegmentTransform()
| int ksceCoredumpCafSegmentTransform |
( |
SceUID |
ctx, |
|
|
const void * |
src, |
|
|
void * |
dst, |
|
|
SceSize |
size |
|
) |
| |
Transforms and authenticates CAF segment data.
HMAC-only mode authenticates src without writing dst. Encryption mode AES-CBC encrypts src to dst and authenticates the ciphertext. Decryption mode authenticates the ciphertext in src before decrypting it to dst.
- Parameters
-
| [in] | ctx | CAF context UID. |
| [in] | src | Source buffer. Must be non-NULL when size is nonzero. |
| [out] | dst | Destination buffer. Must be non-NULL when size is nonzero, including in HMAC-only mode where it is not written. |
| [in] | size | Number of bytes to process. Must be a multiple of 16 in the AES-CBC modes. |
- Returns
- 0 on success, < 0 on error.
◆ ksceCoredumpCreateDump()
| int ksceCoredumpCreateDump |
( |
ScePID |
pid, |
|
|
const char * |
titleid, |
|
|
SceSize |
titleid_len, |
|
|
const char * |
app_name, |
|
|
SceSize |
app_name_len, |
|
|
int |
app_version, |
|
|
char * |
path, |
|
|
SceSize |
path_size |
|
) |
| |
Creates a coredump for a process and waits for completion.
FW 3.60 selects plaintext PSP2DMP or encrypted CAF output from the coredump configuration and target process. All calls share the same wait and path state, so do not call this function concurrently. Its internal completion callback ignores the worker's coredump result, so a return of 0 means the request completed but does not mean dump generation succeeded.
- Parameters
-
| [in] | pid | Process identifier. |
| [in] | titleid | Title ID. Must be non-NULL. |
| [in] | titleid_len | Number of bytes to copy from titleid; maximum 10. |
| [in] | app_name | Application name. Must be non-NULL. |
| [in] | app_name_len | Number of bytes to copy from app_name; maximum 0x80. |
| [in] | app_version | Decimal application version; for example, 100 is 01.00. |
| [out] | path | Optional buffer that receives the generated coredump path. |
| [in] | path_size | Size of path. Must be nonzero when path is non-NULL. |
- Returns
- 0 after the request completes, or < 0 on a request, wait, or cleanup error. The worker's dump-generation result is not returned.
◆ ksceCoredumpDeleteCrashReportCaf()
| int ksceCoredumpDeleteCrashReportCaf |
( |
void |
| ) |
|
Deletes the CAF crash-report file at ux0:data/crash_report.caf.
- Returns
- 0 on success, < 0 on error.
◆ ksceCoredumpCafFinal()
| int ksceCoredumpCafFinal |
( |
void |
| ) |
|
Finalizes CAF cryptographic support.
The coredump key stores are securely cleared. Existing context objects are not destroyed; the needed keys are loaded again at the next header or segment initialization.
- Returns
- 0 on success, < 0 on error.
◆ size
| SceSize SceCoredumpTriggerParam::size |
Size supplied from the start of this structure; normally sizeof(SceCoredumpTriggerParam).
◆ data_0x04
| int SceCoredumpTriggerParam::data_0x04 |
◆ data_0x08
| int SceCoredumpTriggerParam::data_0x08 |
◆ data_0x0C
| int SceCoredumpTriggerParam::data_0x0C |
◆ data_0x10
| int SceCoredumpTriggerParam::data_0x10 |
◆ titleid_len
| SceSize SceCoredumpTriggerParam::titleid_len |
Number of bytes to copy from titleid; maximum 10.
◆ titleid
| const char* SceCoredumpTriggerParam::titleid |
Title ID; required when titleid_len is nonzero.
◆ app_name_len
| SceSize SceCoredumpTriggerParam::app_name_len |
Number of bytes to copy from app_name; maximum 0x80.
◆ app_name
| const char* SceCoredumpTriggerParam::app_name |
Application name; required when app_name_len is nonzero.
◆ data_0x24
| int SceCoredumpTriggerParam::data_0x24 |
◆ data_0x28
| int SceCoredumpTriggerParam::data_0x28 |
◆ crash_thid
| SceUID SceCoredumpTriggerParam::crash_thid |
Thread whose stop reason is inspected when crash_cause does not force a stop reason.
◆ data_0x30
| int SceCoredumpTriggerParam::data_0x30 |