فهرست منبع

process_capability: Handle extended SVC range

12.x extended the range of SVC IDs, so we need to expand the range of
bits that need to be tested.

The upside of this is that we can eliminate a range check, given the
whole range is used.
Lioncash 5 سال پیش
والد
کامیت
03dda80e2b
2فایلهای تغییر یافته به همراه1 افزوده شده و 6 حذف شده
  1. 0 5
      src/core/hle/kernel/process_capability.cpp
  2. 1 1
      src/core/hle/kernel/process_capability.h

+ 0 - 5
src/core/hle/kernel/process_capability.cpp

@@ -281,11 +281,6 @@ ResultCode ProcessCapabilities::HandleSyscallFlags(u32& set_svc_bits, u32 flags)
             continue;
         }
 
-        if (svc_number >= svc_capabilities.size()) {
-            LOG_ERROR(Kernel, "Process svc capability is out of range! svc_number={}", svc_number);
-            return ResultOutOfRange;
-        }
-
         svc_capabilities[svc_number] = true;
     }
 

+ 1 - 1
src/core/hle/kernel/process_capability.h

@@ -68,7 +68,7 @@ enum class ProgramType {
 class ProcessCapabilities {
 public:
     using InterruptCapabilities = std::bitset<1024>;
-    using SyscallCapabilities = std::bitset<128>;
+    using SyscallCapabilities = std::bitset<192>;
 
     ProcessCapabilities() = default;
     ProcessCapabilities(const ProcessCapabilities&) = delete;