From 4328a3ff580f7842c3341f7ff2bef2cf452b0aa6 Mon Sep 17 00:00:00 2001 From: ThePedroo Date: Wed, 1 Apr 2026 01:54:39 -0300 Subject: [PATCH] add support to 32-bit supercall This commit allows 32-bit processes to take advantage of the supercall by calling the 32-bit truncate, without issues due to integer size difference. --- kernel/patch/common/supercall.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/patch/common/supercall.c b/kernel/patch/common/supercall.c index 21e46509..6acfa758 100644 --- a/kernel/patch/common/supercall.c +++ b/kernel/patch/common/supercall.c @@ -418,7 +418,13 @@ int supercall_install() hook_err_t err = hook_syscalln(__NR_supercall, 6, before, 0, 0); if (err) { - log_boot("install supercall hook error: %d\n", err); + log_boot("install supercall 64-bit hook error: %d\n", err); + rc = err; + goto out; + } + err = hook_compat_syscalln(92, 6, before, 0, 0); // __NR_truncate == __NR_supercall for 32-bit + if (err) { + log_boot("install supercall 32-bit hook error: %d\n", err); rc = err; goto out; }