From: Benjamin Berg <benjamin@sipsolutions.net>
To: linux-um@lists.infradead.org
Cc: Benjamin Berg <benjamin.berg@intel.com>
Subject: [PATCH v9 01/10] um: Add generic stub_syscall1 function
Date: Thu, 19 Sep 2024 14:45:02 +0200 [thread overview]
Message-ID: <20240919124511.282088-2-benjamin@sipsolutions.net> (raw)
In-Reply-To: <20240919124511.282088-1-benjamin@sipsolutions.net>
From: Benjamin Berg <benjamin.berg@intel.com>
The 64bit version did not have a stub_syscall1 function yet. Add it as
it will be useful to implement a static binary for stub loading.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
---
arch/x86/um/shared/sysdep/stub_64.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/x86/um/shared/sysdep/stub_64.h b/arch/x86/um/shared/sysdep/stub_64.h
index 67f44284f1aa..8e4ff39dcade 100644
--- a/arch/x86/um/shared/sysdep/stub_64.h
+++ b/arch/x86/um/shared/sysdep/stub_64.h
@@ -28,6 +28,17 @@ static __always_inline long stub_syscall0(long syscall)
return ret;
}
+static __always_inline long stub_syscall1(long syscall, long arg1)
+{
+ long ret;
+
+ __asm__ volatile (__syscall
+ : "=a" (ret)
+ : "0" (syscall), "D" (arg1) : __syscall_clobber );
+
+ return ret;
+}
+
static __always_inline long stub_syscall2(long syscall, long arg1, long arg2)
{
long ret;
--
2.46.0
next prev parent reply other threads:[~2024-09-19 12:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-19 12:45 [PATCH v9 00/10] Increased address space for 64 bit Benjamin Berg
2024-09-19 12:45 ` Benjamin Berg [this message]
2024-09-19 12:45 ` [PATCH v9 02/10] um: use execveat to create userspace MMs Benjamin Berg
2024-10-16 2:34 ` Nathan Chancellor
2024-10-16 8:19 ` Berg, Benjamin
2024-10-17 7:17 ` David Gow
2024-10-17 8:18 ` Johannes Berg
2024-10-17 12:05 ` Benjamin Berg
2024-10-17 23:17 ` David Gow
2024-10-17 9:01 ` Benjamin Berg
2024-09-19 12:45 ` [PATCH v9 03/10] um: Set parent death signal for userspace process Benjamin Berg
2024-09-19 12:45 ` [PATCH v9 04/10] um: Set parent death signal for winch thread/process Benjamin Berg
2024-09-19 12:45 ` [PATCH v9 05/10] um: Add compile time assert that stub fits on a page Benjamin Berg
2024-09-19 12:45 ` [PATCH v9 06/10] um: Calculate stub data address relative to stub code Benjamin Berg
2024-09-19 12:45 ` [PATCH v9 07/10] um: Limit TASK_SIZE to the addressable range Benjamin Berg
2024-09-19 12:45 ` [PATCH v9 08/10] um: Discover host_task_size from envp Benjamin Berg
2024-09-19 12:45 ` [PATCH v9 09/10] um: clear all memory in new userspace processes Benjamin Berg
2024-09-19 12:45 ` [PATCH v9 10/10] um: Switch to 4 level page tables on 64 bit Benjamin Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240919124511.282088-2-benjamin@sipsolutions.net \
--to=benjamin@sipsolutions.net \
--cc=benjamin.berg@intel.com \
--cc=linux-um@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox