Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PS3MAPI - Checking availability of a syscall twice #1

@PHTNCx64

Description

@PHTNCx64

I'm not quite sure if this was done on purpose, or by accident, but I've noticed that in ps3mapi_core.c in the function int ps3mapi_check_syscall(int num) that MAMBA (and also Cobra) does check the availability for the specified syscall twice... I don't know what purpose it serves to do the same task twice, so my suggestion is changing it from:

int ps3mapi_check_syscall(int num)
{
	uint64_t sc_null = *(uint64_t *)MKA(syscall_table_symbol);
	if (*(uint64_t *)MKA(syscall_table_symbol + (8 * num)) != sc_null)
	{
		uint64_t syscall_not_impl = *(uint64_t *)sc_null;
		if ((*(uint64_t *)MKA(syscall_table_symbol + (8 * num))) != syscall_not_impl)
			return SUCCEEDED;
	}
	return ENOSYS;
}

to:

int ps3mapi_check_syscall(int num)
{
	uint64_t sc_null = *(uint64_t *)MKA(syscall_table_symbol);
	return *(uint64_t*)MKA(syscall_table_symbol + (8 * num)) != sc_null ? SUCCEEDED : ENOSYS;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions