Skip to content
  • Lioncash's avatar
    kernel/svc: Handle error cases for svcArbitrateLock() and svcArbitrateUnlock() · b6867602
    Lioncash authored
    The kernel does the equivalent of the following check before proceeding:
    
    if (address + 0x8000000000 < 0x7FFFE00000) {
        return ERR_INVALID_MEMORY_STATE;
    }
    
    which is essentially what our IsKernelVirtualAddress() function does. So
    we should also be checking for this.
    
    The kernel also checks if the given input addresses are 4-byte aligned,
    however our Mutex::TryAcquire() and Mutex::Release() functions already
    handle this, so we don't need to add code for this case.
    b6867602
Loading