Hi Samuel,
On 26/6/23 02:41, Samuel Thibault wrote:
>> This simple change allows hurd to be bootable off usb!
>
> Well, yes and no :)
>
> We also need /dev entries. It happens that this re-uses /dev/sd*
> names, so we need to care about compatibility. We probably want
> rumpdisk_device_open to f
MAP_FIXED is defined to silently replace any existing mappings at the
address range being mapped over. This, however, is a dangerous, and only
rarely desired behavior.
Various Unix systems provide replacements or additions to MAP_FIXED:
* SerenityOS and Linux provide MAP_FIXED_NOREPLACE. If the a
The rest of the heap (backed by individual pages) is already mapped RW.
Mapping these pages RWX presents a security hazard.
Also, in another branch memory gets allocated using vm_allocate, which
sets memory protection to VM_PROT_DEFAULT (which is RW). The mismatch
between protections prevents Mach
Only call vm_deallocate when we do have the old buffer, and check for
unexpected errors.
Spotted while debugging a msgids/readdir issue on x86_64-gnu.
Signed-off-by: Sergey Bugaev
---
sysdeps/mach/hurd/readdir64.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/sy
Zero address passed to mmap () typically means the caller doesn't have
any specific preferred address. Not so if MAP_FIXED is passed: in this
case 0 means literal 0. Fix this case to pass anywhere = 0 into vm_map.
Also add some documentation.
Signed-off-by: Sergey Bugaev
---
sysdeps/mach/hurd/m
Instead of trying to allocate a thread stack at a specific address,
looping over the address space, just set the ANYWHERE flag in
vm_allocate (). The previous behavior:
- defeats ASLR (for Mach versions that support ASLR),
- is particularly slow if the lower 4 GB of the address space are mapped
The user already has full access to our task, and the same kind of
access to the file system image (if any) as our task does, we're not
buying any additional security by disallowing them access.
In practice, this allows creating and arbitrarily modifying ext2
filesystem images owned by an otherwis
We want to map the whole lower 4 GB of address space inaccessible to
catch accidental pointer truncation. We can only do this when the
executable (as well as the interpreter, if any) is compiled as PIC/PIE,
since otherwise we would violate the ABI requirement. Fortunately most
distributions have al
The existing code mapped the first PT_LOAD segment using anywhere=1,
letting Mach pick an arbitrary location, and then uses anywhere=0 for
all the remaining segments to place them next to the first one, as
expected by the program.
This, however, runs into many issues, primarily because of conflict
The code already ignores proc_mark_important failing with EPERM; do the
same for opening /servers/startup and startup_request_notification. All
of these calls will fail for unprivileged mounts.
Also plug a port leak: we want to deallocate the "init" port whether the
RPC succeeds or not.
---
libdi
Damien Zammit, le dim. 25 juin 2023 12:35:51 +, a ecrit:
> This simple change allows hurd to be bootable off usb!
Well, yes and no :)
We also need /dev entries. It happens that this re-uses /dev/sd*
names, so we need to care about compatibility. We probably want
rumpdisk_device_open to forwar
Damien Zammit, le dim. 25 juin 2023 01:36:34 +, a ecrit:
> @@ -405,16 +408,16 @@ Add acgnu.h and acgnuex.h
> +acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
> + u64 *value, u32 width)
> +{
> -+ acpi_os_printf("ACPI: Tried to read pci config\n");
> -+ retur
On June 25, 2023 2:35:51 PM GMT+02:00, Damien Zammit
wrote:
>This simple change allows hurd to be bootable off usb!
A running hurd can then recognize a usb storage
>
>It is not ideal to have entire usb stack with the mass storage driver
>and combined with SATA, but there is no easy way to separa
This simple change allows hurd to be bootable off usb!
It is not ideal to have entire usb stack with the mass storage driver
and combined with SATA, but there is no easy way to separate
the usb stack into host/device yet. This centralises all the disk
support, (and unfortunately also all the usb
14 matches
Mail list logo