mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 03:16:54 +02: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
|
||||
", prot = 0x%02" PRIx32 ", type = 0x%02" PRIx32 ", op = %d\n",
|
||||
i, entry->start, entry->offset, entry->length,
|
||||
static_cast<uint32_t>(static_cast<unsigned char>(entry->protection)),
|
||||
static_cast<uint32_t>(static_cast<unsigned char>(entry->type)), entry->operation);
|
||||
static_cast<uint32_t>(entry->protection), static_cast<uint32_t>(entry->type),
|
||||
entry->operation);
|
||||
|
||||
if (entry->length == 0 || entry->operation < MAP_OP_MAP_DIRECT ||
|
||||
entry->operation > MAP_OP_TYPE_PROTECT) {
|
||||
|
||||
+7
-7
@@ -47,13 +47,13 @@ struct VirtualQueryInfo {
|
||||
static_assert(sizeof(VirtualQueryInfo) == 72, "VirtualQueryInfo struct size is incorrect");
|
||||
|
||||
struct KernelBatchMapEntry {
|
||||
void* start;
|
||||
uint64_t offset;
|
||||
uint64_t length;
|
||||
char protection;
|
||||
char type;
|
||||
int16_t reserved;
|
||||
int32_t operation;
|
||||
void* start;
|
||||
uint64_t offset;
|
||||
uint64_t length;
|
||||
unsigned char protection;
|
||||
unsigned char type;
|
||||
int16_t reserved;
|
||||
int32_t operation;
|
||||
};
|
||||
|
||||
static_assert(sizeof(KernelBatchMapEntry) == 32, "KernelBatchMapEntry struct size is incorrect");
|
||||
|
||||
Reference in New Issue
Block a user