mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-27 21:36:54 +01:00
kernel: stop sign-extending batch-map protection and type (#405)
This commit is contained in:
@@ -3804,8 +3804,8 @@ int KYTY_SYSV_ABI KernelBatchMap2(KernelBatchMapEntry* entries, int num_entries,
|
|||||||
LOGF("\t [%d] start = %p, offset = 0x%016" PRIx64 ", length = 0x%016" PRIx64
|
LOGF("\t [%d] start = %p, offset = 0x%016" PRIx64 ", length = 0x%016" PRIx64
|
||||||
", prot = 0x%02" PRIx32 ", type = 0x%02" PRIx32 ", op = %d\n",
|
", prot = 0x%02" PRIx32 ", type = 0x%02" PRIx32 ", op = %d\n",
|
||||||
i, entry->start, entry->offset, entry->length,
|
i, entry->start, entry->offset, entry->length,
|
||||||
static_cast<uint32_t>(static_cast<unsigned char>(entry->protection)),
|
static_cast<uint32_t>(entry->protection), static_cast<uint32_t>(entry->type),
|
||||||
static_cast<uint32_t>(static_cast<unsigned char>(entry->type)), entry->operation);
|
entry->operation);
|
||||||
|
|
||||||
if (entry->length == 0 || entry->operation < MAP_OP_MAP_DIRECT ||
|
if (entry->length == 0 || entry->operation < MAP_OP_MAP_DIRECT ||
|
||||||
entry->operation > MAP_OP_TYPE_PROTECT) {
|
entry->operation > MAP_OP_TYPE_PROTECT) {
|
||||||
|
|||||||
+7
-7
@@ -47,13 +47,13 @@ struct VirtualQueryInfo {
|
|||||||
static_assert(sizeof(VirtualQueryInfo) == 72, "VirtualQueryInfo struct size is incorrect");
|
static_assert(sizeof(VirtualQueryInfo) == 72, "VirtualQueryInfo struct size is incorrect");
|
||||||
|
|
||||||
struct KernelBatchMapEntry {
|
struct KernelBatchMapEntry {
|
||||||
void* start;
|
void* start;
|
||||||
uint64_t offset;
|
uint64_t offset;
|
||||||
uint64_t length;
|
uint64_t length;
|
||||||
char protection;
|
unsigned char protection;
|
||||||
char type;
|
unsigned char type;
|
||||||
int16_t reserved;
|
int16_t reserved;
|
||||||
int32_t operation;
|
int32_t operation;
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(KernelBatchMapEntry) == 32, "KernelBatchMapEntry struct size is incorrect");
|
static_assert(sizeof(KernelBatchMapEntry) == 32, "KernelBatchMapEntry struct size is incorrect");
|
||||||
|
|||||||
Reference in New Issue
Block a user