pm: add api for ams.mitm to steal application memory
This commit is contained in:
@@ -90,3 +90,9 @@ Result pmdmntAtmosphereGetCurrentLimitInfo(u64 *out_cur, u64 *out_lim, u32 group
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result pmshellAtmosphereBoostSystemMemoryResourceLimitForMitm(u64 size) {
|
||||
return serviceDispatchIn(pmshellGetServiceSession(), 65000, size);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ Result pminfoAtmosphereGetProcessInfo(NcmProgramLocation *loc_out, CfgOverrideSt
|
||||
Result pmdmntAtmosphereGetProcessInfo(Handle *out, NcmProgramLocation *loc_out, CfgOverrideStatus *status_out, u64 pid);
|
||||
Result pmdmntAtmosphereGetCurrentLimitInfo(u64 *out_cur, u64 *out_lim, u32 group, u32 resource);
|
||||
|
||||
Result pmshellAtmosphereBoostSystemMemoryResourceLimitForMitm(u64 size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <stratosphere.hpp>
|
||||
#include "pm_ams.os.horizon.h"
|
||||
|
||||
namespace ams::pm::shell {
|
||||
|
||||
@@ -57,6 +58,10 @@ namespace ams::pm::shell {
|
||||
Result BoostSystemThreadResourceLimit() {
|
||||
R_RETURN(::pmshellBoostSystemThreadResourceLimit());
|
||||
}
|
||||
|
||||
Result AtmosphereBoostSystemMemoryResourceLimitForMitm(u64 size) {
|
||||
R_RETURN(pmshellAtmosphereBoostSystemMemoryResourceLimitForMitm(size));
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user