Re: [PATCH] pci-arbiter: Prevent mapping IO regions

2023-07-05 Thread Samuel Thibault
Applied, thanks! Joan Lledó, le mer. 05 juil. 2023 21:38:12 +0200, a ecrit: > From: Joan Lledó > > * pci-arbiter/netfs_impl.c: > * get_filemap_region(): Return MACH_PORT_NULL and set errno to EOPNOTSUPP > when the client tries to map a IO region file. > --- > pci-arbiter/netfs_impl.c | 3

pci-arbiter: Prevent mapping IO region files

2023-07-05 Thread Joan Lledó
Hello, Time ago I sent some patches to implement mapping region and ROM files using mmap(). However, a BAR region can represent either memory or I/O space, and only the former should be allowed to be mapped, since I/O BARs don't contain physical memory addresses, but I/O addresses. I attached a

[PATCH] pci-arbiter: Prevent mapping IO regions

2023-07-05 Thread Joan Lledó
From: Joan Lledó * pci-arbiter/netfs_impl.c: * get_filemap_region(): Return MACH_PORT_NULL and set errno to EOPNOTSUPP when the client tries to map a IO region file. --- pci-arbiter/netfs_impl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pci-arbiter/netfs_impl.c

Re: [PATCH v2 1/3] vm: Make vm_object_coalesce return new object and offset

2023-07-05 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le mer. 05 juil. 2023 17:16:37 +0300, a ecrit: > vm_object_coalesce() callers used to rely on the fact that it always > merged the next_object into prev_object, potentially destroying > next_object and leaving prev_object the result of the whole operation. > >

[PATCH v2 2/3] vm: Add vm_map_coalesce_entry

2023-07-05 Thread Sergey Bugaev
This function attempts to coalesce a VM map entry with its preceeding entry. It wraps vm_object_coalesce. --- vm/vm_map.c | 78 +++-- vm/vm_map.h | 2 ++ 2 files changed, 78 insertions(+), 2 deletions(-) diff --git a/vm/vm_map.c b/vm/vm_map.c

[PATCH v2 0/3] gnumach VM entry re-coalescing

2023-07-05 Thread Sergey Bugaev
This is the remaining patches from "Forward merging entries and other VM shenanigans" (specifically the vm_map_coalesce_entry part), with that one issue fixed. And here's a reproducer that fails with v1 and works now: Sergey #define _GNU_SOURCE #include #include #include #include #include

[PATCH v2 3/3] vm: Coalesce map entries

2023-07-05 Thread Sergey Bugaev
When - extending an existing entry, - changing protection or inheritance of a range of entries, we can get several entries that could be coalesced. Attempt to do that. --- vm/vm_map.c | 29 +++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/vm/vm_map.c

[PATCH v2 1/3] vm: Make vm_object_coalesce return new object and offset

2023-07-05 Thread Sergey Bugaev
vm_object_coalesce() callers used to rely on the fact that it always merged the next_object into prev_object, potentially destroying next_object and leaving prev_object the result of the whole operation. After ee65849bec5da261be90f565bee096abb4117bdd "vm: Allow coalescing null object with an

[RFC PATCH v4 1/2 hurd] libirqhelp: Add library

2023-07-05 Thread Damien Zammit
--- Makefile | 1 + libirqhelp/Makefile | 28 libirqhelp/irqhelp.c | 345 +++ libirqhelp/irqhelp.h | 33 + 4 files changed, 407 insertions(+) create mode 100644 libirqhelp/Makefile create mode 100644 libirqhelp/irqhelp.c create

[RFC PATCH v4 2/2 hurd] ddekit: Use libirqhelp for interrupt registration

2023-07-05 Thread Damien Zammit
--- libddekit/Makefile| 2 +- libddekit/interrupt.c | 231 -- 2 files changed, 19 insertions(+), 214 deletions(-) diff --git a/libddekit/Makefile b/libddekit/Makefile index 88a0c8909..c74ec1128 100644 --- a/libddekit/Makefile +++ b/libddekit/Makefile

[RFC PATCH v4 0/2 hurd] irqhelp + ddekit

2023-07-05 Thread Damien Zammit
Hi all, I refactored v3 of this series to be a cleaner API. However when I recompiled netdde.static using these libs, the network device hangs on ifup /dev/eth0 Can anyone see anything obviously wrong with this patchset? Thanks, Damien