[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 00/15] Add preliminary support for 32-bit userspace on a x86_64 k
From: |
Luca Dariz |
Subject: |
[PATCH 00/15] Add preliminary support for 32-bit userspace on a x86_64 kernel |
Date: |
Tue, 28 Jun 2022 12:10:39 +0200 |
This patch set contains three kind of changes:
* changes for IPC on x86_64 (e.g. msg alignment, copyin/copyout)
* 32-bit userland support on 64-bit kernel (e.g. exception stack
alignment)
* minor fixes and cleanup
This is just a preliminary version, not everything is working yet.
I've tested this with a very minimal ramdisk I created, and I can see
that /hurd/startup is launched, together with the auth and proc
servers. Rumpdisk is not yet working, as the
ds_device_intr_register() implementation is still missing for x86_64.
I also tried using the ramdisk of a netinstall image, and the init
scripts seem to hang at some point with messages like:
task /bin/sh(1) deallocating a bogus port 4294967295, most probably a bug.
task mkdir(10) deallocating a bogus port 4294967295, most probably a bug.
I think most IPC issues should be addressed, although maybe it's not
very optimized yet (especially the new copyinmsg/copyoutmsg).
These patches are based on the previous work:
https://mail.gnu.org/archive/html/bug-hurd/2022-04/msg00007.html
https://mail.gnu.org/archive/html/bug-hurd/2022-02/msg00006.html
Luca Dariz (15):
fix rpc types for KERNEL_USER stubs
simplify ipc_kmsg_copyout_body() usage
fix argument passing to bootstrap modules
compute mach port size from the corresponding type
sign-extend mask in vm_map() with 32-bit userspace
kmsg: fix msg body alignment
fix host_info structure definition
use port name type in mach_port_names()
x86_64: fix exception stack alignment
x86_64: expand and shrink messages in copy{in,out}msg routines
update syscall signature with rpc_vm_* and mach_port_name_t
fix warnings for 32 bit builds
cleanup headers in printf.c
hack vm memory object proxy creation for vm arrays
enable syscalls on x86_64
device/cirbuf.c | 4 +-
i386/i386/copy_user.h | 86 +++++++++++
i386/i386/debug_i386.c | 1 +
i386/i386/pcb.c | 10 +-
i386/i386/thread.h | 3 +
i386/i386/trap.c | 4 +
i386/i386at/biosmem.c | 2 -
i386/i386at/com.c | 2 +-
i386/i386at/mem.c | 1 +
include/mach/host_info.h | 2 +-
include/mach/mach_traps.h | 18 +--
include/mach/mach_types.defs | 16 +-
include/mach/message.h | 11 ++
ipc/ipc_kmsg.c | 103 +++++++------
ipc/ipc_kmsg.h | 2 +-
ipc/ipc_machdep.h | 12 +-
ipc/ipc_mqueue.c | 5 +-
ipc/mach_msg.c | 23 ++-
ipc/mach_port.c | 12 +-
kern/boot_script.c | 1 +
kern/bootstrap.c | 22 ++-
kern/bootstrap.h | 5 +-
kern/exception.c | 1 +
kern/ipc_host.c | 2 +-
kern/ipc_mig.c | 78 +++++-----
kern/ipc_mig.h | 58 ++++----
kern/ipc_tt.c | 6 +-
kern/ipc_tt.h | 2 +-
kern/printf.c | 4 +-
kern/syscall_subr.c | 2 +-
kern/syscall_subr.h | 2 +-
kern/syscall_sw.c | 2 +-
vm/memory_object_proxy.c | 5 +
vm/vm_debug.c | 1 +
vm/vm_map.c | 2 +-
vm/vm_page.c | 2 -
vm/vm_pageout.c | 2 -
vm/vm_user.c | 5 +
x86_64/Makefrag.am | 1 +
x86_64/copy_user.c | 280 +++++++++++++++++++++++++++++++++++
x86_64/locore.S | 82 ----------
41 files changed, 599 insertions(+), 283 deletions(-)
create mode 100644 i386/i386/copy_user.h
create mode 100644 x86_64/copy_user.c
--
2.30.2
- [PATCH 00/15] Add preliminary support for 32-bit userspace on a x86_64 kernel,
Luca Dariz <=
- [PATCH 01/15] fix rpc types for KERNEL_USER stubs, Luca Dariz, 2022/06/28
- [PATCH 03/15] fix argument passing to bootstrap modules, Luca Dariz, 2022/06/28
- [PATCH 06/15] kmsg: fix msg body alignment, Luca Dariz, 2022/06/28
- [PATCH 09/15] x86_64: fix exception stack alignment, Luca Dariz, 2022/06/28
- [PATCH 04/15] compute mach port size from the corresponding type, Luca Dariz, 2022/06/28
- [PATCH 05/15] sign-extend mask in vm_map() with 32-bit userspace, Luca Dariz, 2022/06/28
- [PATCH 08/15] use port name type in mach_port_names(), Luca Dariz, 2022/06/28
- [PATCH 10/15] x86_64: expand and shrink messages in copy{in, out}msg routines, Luca Dariz, 2022/06/28
- [PATCH 02/15] simplify ipc_kmsg_copyout_body() usage, Luca Dariz, 2022/06/28
- [PATCH 07/15] fix host_info structure definition, Luca Dariz, 2022/06/28