The perl test suite has a test where it reads all the block or char devices
under /dev without following the translators. Then it compares it against a
list of devices that read the translated nodes stat info.
The patch changes how the the device files are created initially so that the
stat
The perl test suite has a test where it reads all the block or char devices
under /dev without following the translators. Then it compares it against a
list of devices that read the translated nodes stat info.
The patch changes how the the device files are created initially so that the
stat
Update argument types for sprint_frac_value to reflect how big they
actually are so that GCC doesn't think it needs a larger buffer than
necessary.
---
libps/spec.c | 22 +-
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/libps/spec.c b/libps/spec.c
index
Tested with some simple toy examples where an exception is thrown in the
signal handler.
libgcc/ChangeLog:
* config/i386/gnu-unwind.h: Support unwinding x86_64 signal frames.
Signed-off-by: Flavio Cruz
---
libgcc/config/i386/gnu-unwind.h | 97 -
1 file
Currently, if we do:
$ ls /dev/cd0/
The computer seems to get stuck, caused by the divide by 0 in the
rumpdisk server in device_get_status. I noticed that if we have no disk in the
cdrom device, we can still open it but block and media size will be 0
and the message "cd0 dos partition I/O error"
Otherwise, it is easy to crash the kernel if userland passes arbitrary port
names.
---
kern/task.c | 6 ++
kern/thread.c | 3 +++
2 files changed, 9 insertions(+)
diff --git a/kern/task.c b/kern/task.c
index 60ab4d7..dfba04d 100644
--- a/kern/task.c
+++ b/kern/task.c
@@ -1165,6 +1165,9 @@
This port extends the existing i686 port to support x86_64 by trying to
reuse existing code whenever it makes sense.
* gdb/amd64-gnu-tdep.c: Adds logic for handling signal frames and
position of amd64 registers in the different Hurd structs.
The signal code is very similar to i686, except the
This is a follow up to
https://git.savannah.gnu.org/cgit/hurd/gnumach.git/commit/?id=69620634858b2992e1a362e33c95d9a8ee57bce7
where we made inlined ports 8 bytes long to avoid resizing.
The last thing that copy{in,out}msg were doing was just updating
msgt_size field since that's required for
Tested with the tests provided by glibc plus some other toy examples.
---
sysdeps/mach/hurd/x86_64/Makefile | 4 +
sysdeps/mach/hurd/x86_64/__start_context.S | 49 +
sysdeps/mach/hurd/x86_64/getcontext.S | 68
sysdeps/mach/hurd/x86_64/makecontext.c | 119
---
config.h.in| 3 +
sysdeps/mach/hurd/configure| 174 +
sysdeps/mach/hurd/configure.ac | 19
sysdeps/mach/hurd/getrusage.c | 8 +-
sysdeps/mach/hurd/times.c | 18 +++-
5 files changed, 219 insertions(+), 3 deletions(-)
These patches implement getrusage(RUSAGE_CHILDREN, _) and populate
child related data in times(_). This should fix the problem we have
with building the latest grep which uses times(_) to get the cpu cycles in the
test
suite:
---
config.h.in | 3 +++
sysdeps/mach/configure| 28
sysdeps/mach/configure.ac | 9 +
sysdeps/mach/hurd/getrusage.c | 8 ++--
sysdeps/mach/hurd/times.c | 18 +-
5 files changed, 63 insertions(+), 3
---
hurd/process.defs | 6 ++
proc/info.c | 8
proc/proc.h | 4 +++-
proc/wait.c | 2 ++
4 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/hurd/process.defs b/hurd/process.defs
index 9a8b3a1..007aa2b 100644
--- a/hurd/process.defs
+++
This port extends the existing i686 port to support x86_64 by trying to
reuse existing code whenever it makes sense.
* gdb/amd64-gnu-tdep.c: Adds logic for handling signal frames and
position of amd64 registers in the different Hurd structs, including
i386_thread_state. The signal code is
This port extends the existing i686 port to support x86_64 by trying to
reuse existing code whenever it makes sense.
* gdb/amd64-gnu-tdep.c: Adds logic for handling signal frames and
position of amd64 registers in the different Hurd structs, including
i386_thread_state. The signal code is
Like task_set_name, we use the same size as the task name and will
inherit the task name, whenever it exists. This will be used to
implement pthread_setname_np.
---
ddb/db_print.c| 9 +
include/mach/gnumach.defs | 8
kern/thread.c | 20
I was trying to reuse TASK_NAME_SIZE in kern/thread.h but it was
impossible because files included from kern/task.h end up requiring
kern/thread.h (through percpu.h), creating a recursive dependency.
With this change, mach_types.h only defines forward declarations and
modules have to explicitly
We have recently updated the interface for raising exceptions to use
long [1] and updated mach_port_t to be "unsigned int". This patches fixes
those problems and will help us port GDB to Hurd x86_64.
Tested on Hurd i686 and x86_64.
[1]
This port extends the existing i686 port to support x86_64 by trying to
reuse existing code whenever it makes sense.
* gdb/amd64-gnu-tdep.c: Adds logic for handling signal frames and
position of amd64 registers in the different Hurd structs, including
i386_thread_state. The signal code is
---
utils/rpctrace.c | 83 +++-
1 file changed, 53 insertions(+), 30 deletions(-)
diff --git a/utils/rpctrace.c b/utils/rpctrace.c
index f7046a0..c8635a3 100644
--- a/utils/rpctrace.c
+++ b/utils/rpctrace.c
@@ -801,6 +801,18 @@ rewrite_right
---
ftpfs/ftpfs.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ftpfs/ftpfs.c b/ftpfs/ftpfs.c
index 794439b..9310a56 100644
--- a/ftpfs/ftpfs.c
+++ b/ftpfs/ftpfs.c
@@ -51,8 +51,13 @@ struct ftpfs *ftpfs;
/* Parameters describing the server we're connecting to. */
---
term/hurdio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/term/hurdio.c b/term/hurdio.c
index c6e14a4..a3e2a0a 100644
--- a/term/hurdio.c
+++ b/term/hurdio.c
@@ -613,8 +613,8 @@ hurdio_mdmctl (int how, int bits)
}
-static int
-hurdio_mdmstate (void)
+static
Not needed since b2c97e251bb470e6f967c716081675a96dbde59c
---
procfs/rootdir.c | 8
1 file changed, 8 deletions(-)
diff --git a/procfs/rootdir.c b/procfs/rootdir.c
index 7742edd..206a541 100644
--- a/procfs/rootdir.c
+++ b/procfs/rootdir.c
@@ -706,14 +706,6 @@ rootdir_file_make_node
---
fstests/fstests.c | 1 -
fstests/timertest.c | 10 --
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/fstests/fstests.c b/fstests/fstests.c
index b776503..ca60203 100644
--- a/fstests/fstests.c
+++ b/fstests/fstests.c
@@ -94,7 +94,6 @@ main (void)
#endif
printf
---
proc/cpu-types.c | 2 ++
proc/host.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/proc/cpu-types.c b/proc/cpu-types.c
index 3d89d5a..7a814f6 100644
--- a/proc/cpu-types.c
+++ b/proc/cpu-types.c
@@ -38,6 +38,7 @@ const char *const mach_cpu_types[] =
#endif
};
+#ifndef
We do a few things here:
- Move search_path to the scope where it is used to make dependencies
more clear.
- Have a separate variable to store the file name we eventually need to
free and move the free logic to happen in a single place.
Both of this allows us to still free the name even if a
---
utils/login.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/utils/login.c b/utils/login.c
index 3134c4a..334941c 100644
--- a/utils/login.c
+++ b/utils/login.c
@@ -157,12 +157,17 @@ static void
add_utmp_entry (char *args, unsigned args_len, int inherit_host)
{
This makes GCC happy.
---
libps/spec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libps/spec.c b/libps/spec.c
index dec5704..9f64703 100644
--- a/libps/spec.c
+++ b/libps/spec.c
@@ -492,7 +492,7 @@ error_t
ps_emit_nice_size_t (struct proc_stat *ps, struct ps_fmt_field
---
pfinet/stubs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pfinet/stubs.c b/pfinet/stubs.c
index 9affcff..01ba2fa 100644
--- a/pfinet/stubs.c
+++ b/pfinet/stubs.c
@@ -50,7 +50,7 @@ void dev_activate (struct device *)
__attribute__ ((alias
---
libfshelp-tests/race.c | 9 +
libnetfs/file-get-translator.c | 2 +-
pfinet/ethernet.c | 2 +-
pfinet/io-ops.c| 10 ++
utils/mount.c | 2 +-
utils/msgport.c| 2 +-
6 files changed, 15 insertions(+), 12
---
ext2fs/pager.c | 2 +-
fatfs/pager.c | 2 +-
trans/random.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ext2fs/pager.c b/ext2fs/pager.c
index 2869f4d..61db0df 100644
--- a/ext2fs/pager.c
+++ b/ext2fs/pager.c
@@ -170,7 +170,7 @@ static error_t
file_pager_read_page
---
pci-arbiter/options.c | 2 +-
utils/ftpdir.c| 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pci-arbiter/options.c b/pci-arbiter/options.c
index e0455f4..e578810 100644
--- a/pci-arbiter/options.c
+++ b/pci-arbiter/options.c
@@ -379,7 +379,7 @@ netfs_append_args
---
utils/login.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/utils/login.c b/utils/login.c
index 3134c4a..3ed5121 100644
--- a/utils/login.c
+++ b/utils/login.c
@@ -157,12 +157,17 @@ static void
add_utmp_entry (char *args, unsigned args_len, int inherit_host)
{
---
utils/rpctrace.c | 4 ++--
utils/vmallocate.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/utils/rpctrace.c b/utils/rpctrace.c
index 589ce8f..f7046a0 100644
--- a/utils/rpctrace.c
+++ b/utils/rpctrace.c
@@ -810,10 +810,10 @@ print_contents (mach_msg_header_t *inp,
---
tmpfs/tmpfs.c | 2 +-
utils/vmallocate.c | 7 +--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/tmpfs/tmpfs.c b/tmpfs/tmpfs.c
index 02d4bd8..d28806a 100644
--- a/tmpfs/tmpfs.c
+++ b/tmpfs/tmpfs.c
@@ -39,7 +39,7 @@ char *diskfs_disk_name = "none";
int
---
trans/proxy-defpager.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/trans/proxy-defpager.c b/trans/proxy-defpager.c
index 386f1b6..314ce9f 100644
--- a/trans/proxy-defpager.c
+++ b/trans/proxy-defpager.c
@@ -124,6 +124,8 @@ S_default_pager_paging_storage_new (mach_port_t
---
libftpconn/cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libftpconn/cmd.c b/libftpconn/cmd.c
index 9916d03..4b4c6fa 100644
--- a/libftpconn/cmd.c
+++ b/libftpconn/cmd.c
@@ -99,7 +99,7 @@ ftp_conn_cmd (struct ftp_conn *conn, const char *cmd, const
char *arg,
---
libdiskfs/boot-start.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c
index e8c09bc..8c159f3 100644
--- a/libdiskfs/boot-start.c
+++ b/libdiskfs/boot-start.c
@@ -464,7 +464,7 @@ diskfs_S_fsys_getpriv (struct diskfs_control
---
boot/boot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boot/boot.c b/boot/boot.c
index 0d7ae74..d773bd1 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -775,7 +775,7 @@ main (int argc, char **argv, char **envp)
}
}
-void *
+void * __attribute__ ((noreturn))
---
exec/hashexec.c | 9 +++--
libdiskfs/disk-pager.c | 4 +++-
libpager/pager-memcpy.c | 11 ---
libstore/memobj.c | 11 ---
startup/startup.c | 9 ++---
5 files changed, 32 insertions(+), 12 deletions(-)
diff --git a/exec/hashexec.c
---
pci-arbiter/pci-ops.c | 10 +++
pfinet/iioctl-ops.c | 10 +++
pfinet/io-ops.c | 64 +--
pfinet/main.c | 2 +-
pfinet/pfinet-ops.c | 4 +--
pfinet/socket-ops.c | 32 +++---
pfinet/tunnel.c | 24
This changes how we declare RPC user prototypes for device_read_inband
to use "char *data" rather than "io_buf_ptr_inband_t data". It is more
standard to pass a pointer to represent arrays compared to "char [128]". This
fixes a warning in console-client since GCC won't complain we are not
passing
MiG expects those to return kern_return_t.
---
acpi/acpi-ops.c| 4 ++--
boot/boot.c| 2 +-
console-client/trans.c | 10
console/display.c | 8 +++
ext2fs/storeinfo.c | 2 +-
fatfs/inode.c
For i686, this change is no op but for x86_64 it forces all inlined port
rights to be 8 bytes long.
---
hurd/intr-msg.c| 26 --
mach/msg-destroy.c | 12 +---
2 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/hurd/intr-msg.c b/hurd/intr-msg.c
index
If a port is inlined in a message, the user has to use
mach_port_name_inlined_t to define each port. Out of line memory
continues to use mach_port_name_t since that memory has to be copied to
the kernel anyway.
Both copyinmsg and copyoutmsg can be reduced to nothing (if we ignore
USER32) as a
---
libfshelp/start-translator-long.c | 16
proc/stubs.c | 8 +---
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/libfshelp/start-translator-long.c
b/libfshelp/start-translator-long.c
index 0b16e7d0..f788f0a7 100644
---
For i686, we just change the code to use mach_port_name_inlined_t when
defining the types. This is a no-op.
For x86_64, there's a few things that are different:
- In the server code, the server handler can get inlined ports and the
array will be resized and cast as an array of mach_port_name_t.
Hello
Sending the updated patch series with the warnings fixed. The only
difference is in the glibc patch (added a cast when calling
clean_inlined_ports) and the MiG patch, which required a 3 line change
to add appropriate casts from mach_port_name_inlined_t* to mach_port_t*
in server.c.
Flavio
If a port is inlined in a message, the user has to use
mach_port_name_inlined_t to define each port. Out of line memory
continues to use mach_port_name_t since that memory has to be copied to
the kernel anyway.
Both copyinmsg and copyoutmsg can be reduced to nothing (if we ignore
USER32) as a
Comparing mach_port_name_t that is MACH_PORT_NAME_DEAD against
MACH_PORT_DEAD will always return false.
---
ipc/ipc_space.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ipc/ipc_space.h b/ipc/ipc_space.h
index 9b199de..3f0eaa0 100644
--- a/ipc/ipc_space.h
+++
msgt_unused appears right after msgt_size since msgt_size can be reduced
to only 8 bits in the future, so we leave the door opened to make
msgt_unused 13 bits long.
---
include/mach/message.h | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git
---
libfshelp/start-translator-long.c | 16
proc/stubs.c | 8 +---
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/libfshelp/start-translator-long.c
b/libfshelp/start-translator-long.c
index 0b16e7d0..f788f0a7 100644
---
For i686, this change is no op but for x86_64 it forces all inlined port
rights to be 8 bytes long.
---
hurd/intr-msg.c| 26 --
mach/msg-destroy.c | 12 +---
2 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/hurd/intr-msg.c b/hurd/intr-msg.c
index
For i686, we just change the code to use mach_port_name_inlined_t when
defining the types. This is a no-op.
For x86_64, there's a few things that are different:
- In the server code, the server handler can get inlined ports and the
array will be resized and cast as an array of mach_port_name_t.
If a port is inlined in a message, the user has to use
mach_port_name_inlined_t to define each port. Out of line memory
continues to use mach_port_name_t since that memory has to be copied to
the kernel anyway.
Both copyinmsg and copyoutmsg can be reduced to nothing (if we ignore
USER32) as a
Hello, this patch series updates the RPC ABI so that inlined port rights
are always passed as mach_port_name_inlined_t which is as big as a
kernel port pointer. This avoids message resizing for x86_64 in the
kernel. Out of line port rights are unchanged. A future patch will
simplify
Existing MiG does not support untyped messages and the Hurd will
continue to use typed messages for the foreseeable future.
---
hurd/hurdfault.c | 4 ---
hurd/intr-msg.c| 69 --
mach/msg-destroy.c | 64 --
---
libfshelp/start-translator-long.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libfshelp/start-translator-long.c
b/libfshelp/start-translator-long.c
index 0d6c574..0b16e7d 100644
--- a/libfshelp/start-translator-long.c
+++ b/libfshelp/start-translator-long.c
@@ -110,7
The `ty` pointer is only set at the end of the loop so that
`msgtl_header.msgt_inline` and `msgtl_header.msgt_deallocate` remain
valid. Also, when deallocating memory, we use the length from the
message directly rather than hard coding mach_port_t since we want to
deallocate any kind of OOL data.
---
ipc/ipc_kmsg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c
index 1b98445d..fb8de249 100644
--- a/ipc/ipc_kmsg.c
+++ b/ipc/ipc_kmsg.c
@@ -2385,7 +2385,8 @@ ipc_kmsg_copyout_body(
/* first allocate memory
---
sysdeps/mach/mach_rpc.h | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/sysdeps/mach/mach_rpc.h b/sysdeps/mach/mach_rpc.h
index 152f057ca7..ed81403be6 100644
--- a/sysdeps/mach/mach_rpc.h
+++ b/sysdeps/mach/mach_rpc.h
@@ -20,11 +20,8 @@
/* Macro used by MIG to
This avoids assuming a specific field order in mach_msg_type_t (see
https://git.savannah.gnu.org/cgit/hurd/gnumach.git/commit/device/net_io.c?id=50b744c4c2877dfbec54dc7bdae0d141e34c17c3
for a similar change in gnumach).
---
libmachdevdde/net.c | 26 +-
1 file changed, 13
libtrivfs/nfsd/fakeroot can now make the call to the underlying
translators.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 44aa69d7..452fe1fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,7 +155,7 @@
msgh_kind is deprecated and is an alias to msgh_seqno.
---
eth-multiplexer/vdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eth-multiplexer/vdev.c b/eth-multiplexer/vdev.c
index f441803d..62042ee6 100644
--- a/eth-multiplexer/vdev.c
+++ b/eth-multiplexer/vdev.c
@@ -276,7
* Make full use of the 8 bytes available in mach_msg_type_t by moving
into the unused 4 bytes. This allows us to use 32bits for
mach_msg_type_number_t whether we use the longform or not.
* Make mach_msg_type_long_t exactly the same as mach_msg_type_t.
Updating MiG is strongly encouraged
When copying messages from user space, some messages may have
mach_msg_type_t with msgt_number = 0 and no data after. This is a valid
message and we want to allow that.
I found this bug when testing "[PATCH gnumach] Update the
64bit RPC ABI to be simpler" and attempting to run a basic Hurd x86_64
We need to include hurd.h for libc_hidden_proto (__hurd_thread_self),
introduced in
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b44c1e12524bb5de0f93294a7c24c8e41c06bb75
This the error log:
In file included from :
./../include/libc-symbols.h:472:33: error: '__EI___hurd_thread_self'
Mostly, we don't set the fields that do not exist and avoid type
mismatching (like casting unsigned short to unsigned char for
msgt_name).
We also revamp type checking to compare mach_msg_type_t to uint64_t
instead of just uint32_t as we now use the whole structure.
---
global.h | 2 ++
utils.c
* Make full use of the 8 bytes available in mach_msg_type_t by moving
into the unused 4 bytes. This allows us to use 32bits for
mach_msg_type_number_t whether we use the longform or not.
* Make mach_msg_type_long_t exactly the same as mach_msg_type_t. I'm not
changing any of the code but
We are checking for the existence of time_value64_t but we didn't add
that to the task_thread_times_info structure.
---
include/mach/task_info.h | 6 ++
kern/task.c | 8 +++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/include/mach/task_info.h
This hasn't caused any problems yet but we are passing a pointer to struct
task_thread_times_info which can cause problems if we populate over the
existing size of the struct.
---
sysdeps/mach/clock_gettime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
For the x86_64 ABI we want this to always fit into 1 byte. Even for
regular i686, msgt_name is always smaller than 25 (MACH_MSG_TYPE_LAST)
and we don't have plans to have more names.
Also throw an error if we deemed an RPC to be "TooLong" as that won't
work or work badly.
Tested by
We already did the same change for Hurd
(https://git.savannah.gnu.org/cgit/hurd/hurd.git/commit/?id=ef5924402864ef049f40a39e73967628583bc1a4)
Due to MiG requiring the subsystem to be defined early in order to know the
size of a port, this was causing a division by zero error during ./configure.
Also fixed the implementation of default_pager_paging_storage_new in proxy
def pager to call into default_pager_paging_storage_new.
We can fast track the simplification of the RPC ABI for x86_64 if we don't have
MACH_MSG_TYPE_STRING used in RPCs which forces msgt_size to use more than 8
bits.
---
---
hurd/default_pager.defs | 4
mach-defpager/setup.c | 6 --
proc/host.c | 3 +++
sutils/swapon.c | 3 +++
trans/proxy-defpager.c | 6 --
5 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/hurd/default_pager.defs b/hurd/default_pager.defs
index
We can fast track the simplification of the RPC ABI for x86_64 if we don't have
MACH_MSG_TYPE_STRING used in RPCs which forces msgt_size to use more than 8
bits.
---
include/mach/mach_host.defs | 4
kern/host.c | 10 ++
2 files changed, 10 insertions(+), 4
Due to MiG requiring the subsystem to be defined early in order to know the
size of a port, this was causing a division by zero error during ./configure.
We could have just move subsystem to the top of the snippet, however it is
simpler to just remove the check given that we have no plans to use
---
boot/Makefile | 1 +
boot/boot.c | 13 +
devnode/Makefile | 2 +-
devnode/devnode.c | 10 ++
eth-multiplexer/Makefile | 2 +-
eth-multiplexer/device_impl.c | 10 ++
libmachdev/Makefile |
---
mach/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mach/Makefile b/mach/Makefile
index a5d1252f95..2c09c29406 100644
--- a/mach/Makefile
+++ b/mach/Makefile
@@ -123,7 +123,8 @@ user-interfaces := $(filter-out
$(mach-interface-list:%=mach/%) \
endif
# For
Summary of changes:
- Use BAD_TYPECHECK to perform type checking in a cleaner way.
BAD_TYPECHECK is moved into sysdeps/mach/rpc.h to avoid duplication.
- Remove assertions for mach_msg_type_t since those won't work for
x86_64.
- Update message structs to use mach_msg_type_t directly.
- Use
File is unused.
---
Makefrag.am| 1 -
include/mach/rpc.h | 34 --
ipc/ipc_port.h | 1 -
ipc/ipc_target.h | 1 -
ipc/mach_port.c| 1 -
5 files changed, 38 deletions(-)
delete mode 100644 include/mach/rpc.h
diff --git a/Makefrag.am
* Perform the correct alignment for x86_64.
* Use designated initializers.
---
eth-multiplexer/vdev.c | 39 ++-
1 file changed, 22 insertions(+), 17 deletions(-)
diff --git a/eth-multiplexer/vdev.c b/eth-multiplexer/vdev.c
index 548af9d2..f441803d 100644
---
Summary of changes:
- Use BAD_TYPECHECK to perform type checking in a cleaner way.
BAD_TYPECHECK is moved into sysdeps/mach/rpc.h to avoid duplication.
- Remove assertions for mach_msg_type_t since those won't work for
x86_64.
- Update message structs to use mach_msg_type_t directly and rely
msgt_deallocate was not initialized explicitly, this fixes that too.
---
kern/ipc_kobject.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/kern/ipc_kobject.c b/kern/ipc_kobject.c
index a0feaf40..960ef892 100644
--- a/kern/ipc_kobject.c
+++ b/kern/ipc_kobject.c
---
device/net_io.c | 32 +---
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/device/net_io.c b/device/net_io.c
index bad6d3eb..cabb1be9 100644
--- a/device/net_io.c
+++ b/device/net_io.c
@@ -386,22 +386,23 @@ boolean_t ethernet_priority(const
Summary of the changes:
- Introduce BAD_TYPECHECK from MiG to make it simpler to do type
checking.
- Replace int type with mach_msg_type_t. This assumes that
mach_msg_type_t is always the same size as int which is not true for
x86_64.
- Calculate the size and align using PTR_ALIGN_UP, which
Summary of the changes:
- Update msg_align to use ALIGN_UP like we have done in previous
patches. Use it below whenever necessary to avoid repeating the same
alignment logic.
- Define BAD_TYPECHECK to make it easier to do type checking in a few
places below.
- Update io2mach_type to use
---
kern/exception.c | 56
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/kern/exception.c b/kern/exception.c
index 10435b5c..d3fa50e1 100644
--- a/kern/exception.c
+++ b/kern/exception.c
@@ -291,33 +291,33 @@ struct mach_exception
---
boot/boot.c | 16 +++
console/display.c | 58 -
libfshelp/start-translator-long.c | 56 -
libpager/demuxer.c| 16 +++
libports/manage-multithread.c | 16 +++
A follow up to 92fad38a043b75ed6b435b3efa574ede91dbe9ee in gnumach.
---
auth/mig-decls.h| 2 +-
eth-multiplexer/mig-decls.h | 2 +-
exec/mig-decls.h| 2 +-
libcons/priv.h | 2 +-
libdiskfs/diskfs.h | 12 ++--
libmachdev/mig-decls.h |
In case the kernel interfaces use dynamically sized strings, we will
end up calling mig_deallocate to free the out of line string that was copied
into the kernel. As a matter of contract such type of data is freed
automatically either in kernel code when the RPC fails or in the MiG
stub if it
* include/mach/mig_support.h: Drop the ifndef because this file is only
used internally to compile gnumach. We export mig_support.h from glibc
already.
* kern/ipc_mig.c: len should be vm_size_t.
* kern/ipc_mig.h: Drop duplicate prototypes.
---
include/mach/mig_support.h | 4 +---
We make lib{mach,hurd}user.so only call __mig_strlen which can be
relocated before libc.so is relocated, similar to what is done with
__mig_memcpy.
---
mach/Makefile | 2 +-
mach/Versions | 1 +
mach/mach/mig_support.h | 1 +
Dynamically sized strings can be represented as c_string[*] (*). We inline
up to 64 bytes but can pass arbitrary strings if needed out of line. Currently
implementation is limited to input arguments only (MiG will error out if
used as output).
In the user stub, we first run mig_strlen on the
We need to align on uintptr_t to make this work for x86_64,
otherwise things will go wrong when RPCs return errors.
---
mach/msg-destroy.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/mach/msg-destroy.c b/mach/msg-destroy.c
index 7429ecbc2d..0a8b46c895 100644
---
We make lib{mach,hurd}user.so call __mig_strlen which can be
relocated before libc.so is relocated, similar to what is done with
__mig_memcpy.
---
mach/Makefile | 2 +-
mach/Versions | 4
mach/mach/mig_support.h | 2 ++
Hi Sergey
On Wed, Apr 26, 2023 at 01:43:55PM +0300, Sergey Bugaev wrote:
Hi Flavio,
could you please explain what the difference / the advantage of
new_dev_name_t is over dev_name_t? (Preferably, put it into the commit
message too.)
tl;dr; we can get rid of mach_msg_type_long_t on x86_64.
Dynamically sized strings can be represented as c_string[*] (*). We inline
up to 64 bytes but can pass arbitrary strings if needed out of line. Currently
implementation is limited to input arguments only (MiG will error out if
used as output).
In the user stub, we first run strlen on the
Added device_open_new and device_open_new_request and reused the old MiG
ID for xxx_device_set_status which has not been in used in the past
decade.
Note that device_open_new is gated on defining
DEVICE_ENABLE_DEVICE_OPEN_NEW because otherwise some hurd servers
wouldn't compile anymore unless
Hi Samuel
On Tue, Jan 10, 2023 at 10:20:19PM +0100, Samuel Thibault wrote:
I was expecting it :)
I'll wait a bit for the updated gnumach to get uploaded etc. before
commiting it.
Is it possible to merge this patch given that a new version of gnumach
was released recently?
Thanks
Flavio
1 - 100 of 338 matches
Mail list logo