| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
log2_dev_block_per_fs_block is unsigned so it won’t never be less than 0
and the check is then always false. Instead check the two values directly
before doing the substraction.
Message-Id: <20220118211140.8837-1-etienne.brateau@gmail.com>
|
|
|
|
| |
Message-Id: <YeXBjT8t777b8+AF@viriathus>
|
|
|
|
|
| |
Now that the RPCs have const, this forces us cleaning our const-meant
functions.
|
|
|
|
|
| |
This follows mig's cf4bcc3f1435 ("Also add const qualifiers on server
side")
|
|
|
|
| |
/servers/bus/pci
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a internal array of pointers instead
* pci-arbiter/device_map.h:
* Update device_map_region() prototype
* Now it receives an output address as parameter
* pci-arbiter/device_map.c:
* Update device_map_region() definition to match the new prototype
* Support for legacy mappings
* When the base address is lower than 1 mb
* pci-arbiter/func_files.c:
* pci-arbiter/netfs_impl.c:
* Update calls to device_map_region to match the new prototype
* Use the internal array of pointers instead of region->memory
* pci-arbiter/pcifs.h:
* struct pcifs_dirent: Declare the internal array of pointers
Message-Id: <20220108121537.6277-2-jlledom@mailfence.com>
|
|
|
|
|
|
| |
For <sys/ttydefaults.h> to catch the proper value of _POSIX_VDISABLE,
<unistd.h> has to be included before it. <termios.h> happens to be
including it so we have to include <unistd.h> before that.
|
|
|
|
|
| |
Otherwise it would successfully compare to any port that happens to be
MACH_PORT_DEAD, e.g. the bootstrap port.
|
|
|
|
|
|
|
|
| |
Most servers have at least one RPC which is benign enough to be used to
identify whether a port supports the server and provides some useful
information to identify what the port is about. This adds support for
most of these, allowing to identify auth ports, file descriptors,
sockets, etc.
|
|
|
|
|
|
| |
ports[INIT_PORT_CRDIR] and [INIT_PORT_CWDIR] were obtained from getcrdir()
and getcwdir(), so a referenced needs to be released when replacing
them.
|
|
|
|
|
|
|
|
|
|
|
| |
We need to be extremely careful with auth ports since leaking them into
subprocesses may expose a root-auth port to non-root processes.
Notably, get_nonsugid_ids was caching it, thus preventing glibc's exec
implementation from dropping it. Login is also reimplementing hurdexec
but without all the cloexec logic.
This commit fixes various auth leaks.
|
|
|
|
| |
No actual behavior change.
|
|
|
|
|
| |
pfinet is providing the RFC2292 IPv6 options interface, not the RFC3542
interface, so we have to use the old option numbers here.
|
|
|
|
|
| |
Making glibc access trivfs_server_name would violate namespace
constraints, so we need to use a out-of-standard name.
|
|
|
|
|
|
|
| |
The system-wide random translator can access time from gnumach, while
/dev/time comes from storeio, and its libc initialization (starting from
glibc 2.34) uses /dev/random, which was thus bringing an initialization
loop.
|
|
|
|
|
|
|
| |
glibc uses /dev/urandom for getrandom(), and from version 2.34 malloc
initialization uses it. We need to be able to know whether we are
running the random translator itself, in which case we can't read
ourself.
|
|
|
|
|
| |
PIE programs do not need bitmask constraints, only the ELF interpreter
needs to leave room for a non-PIE program.
|
|
|
|
| |
It needs to override trivfs_S_io_select.
|
|
|
|
|
|
| |
wire_task_self() was duplicating mach-defpager's wire_all_memory(), we
can just make mach-defpager now use the former (and not mlockall
either). Also pci-arbiter and rumpdisk can use it.
|
|
|
|
|
|
|
|
| |
In the dynamic case, loaded() doesn't actually manage to get maps, and
in the static case the _start, _etext, __data_start, _edata symbols
are not actually precise, and miss some pages. So let's just call
wire_segment_internal on the whole addressing space, vm_region tells us
which parts are actually mapped to make it efficient enough.
|
|
|
|
| |
as convenience for printing a backtrace without erroring out.
|
|
|
|
| |
Message-Id: <20211228055114.173039-1-damien@zamaudio.com>
|
|
|
|
|
|
|
|
|
| |
This disables the rump buffer cache and avoids any magic translation that
rump would do.
* rumpdisk/block-rump.c (translate_name): Use `/dev/r%sd' format instead of
`/dev/%sd'.
Message-Id: <20211226113857.150525-4-damien@zamaudio.com>
|
|
|
|
|
|
| |
This ensures memory pages are allocated before written to.
Message-Id: <20211226113857.150525-6-damien@zamaudio.com>
|
|
|
|
|
|
|
| |
This locks all memory in bootstrap processes so that
disk driver dependencies don't get swapped out.
Message-Id: <20211226113857.150525-5-damien@zamaudio.com>
|
|
|
|
|
|
|
| |
This works around a faulty HAVE_REGISTER_T in rump so the rump.h
header can be included without errors.
Message-Id: <20211226113857.150525-2-damien@zamaudio.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* pci-arbiter/Makefile:
* Add device_map.c to sources
* pci-arbiter/device_map.c:
* pci-arbiter/device_map.h:
* New module for device mapping
* Relies on libpciaccess mapping methods
* pci-arbiter/func_files.c:
* io_region_file(): Use the new device mapping module
* pci-arbiter/netfs_impl.c:
* Implements netfs_get_filemap():
* Uses the device mapping module to map the region to the
arbiter space
* Calls the kernel RPC vm_region_create_proxy() to obtain the
memory object proxy
* Only region files are mapped for now
Message-Id: <20211219112647.11512-4-jlledom@mailfence.com>
|
|
|
|
|
| |
* libnetfs/iostubs.c: implement io_map
Message-Id: <20211219112647.11512-3-jlledom@mailfence.com>
|
|
|
|
|
|
|
|
|
|
| |
Provide the user with a new callback so they can implement file
mapping over file system nodes.
* libnetfs/netfs.h: Add prototype for netfs_get_filemap
* libnetfs/file-map.c: netfs_get_filemap definition
* libnetfs/Makefile: add file-map.c to sources
Message-Id: <20211224172132.15058-2-jlledom@mailfence.com>
|
|
|
|
|
| |
comm was not recognized by Hurd's ps as a format spec, but is required by
POSIX to display the command name (like "exe", but without the full path).
|
|
|
|
| |
* acpi/acpi.c (acpi_get_tables): Factorize code.
|
|
|
|
| |
* acpi/acpi.c (acpi_get_num_tables): Do not ignore mmap failure.
|
|
|
|
|
| |
* acpi/acpi.c (acpi_get_num_tables, acpi_get_tables): Munmap is not needed,
because when mmap_phys_acpi_header returns non-zero, no mmap is performed.
|
|
|
|
|
|
|
| |
These were writing to an array and then never using it. Maybe they were
useful for debugging.
Message-Id: <87sfvtmn6r.fsf@autistici.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Listing /dev/vcs which is translated by /hurd/console gives the following:
$ ls /dev/vcs
ls: reading directory '/dev/vcs': Invalid argument
1 2 3 4 5 6
That error is probably harmless but annoying.
It is caused by netfs_get_dirents the last time it is called during
listing, because it calls mmap with size = 0.
* console/console.c (netfs_get_dirents): Do not call mmap when size is 0.
|
|
|
|
| |
* libnetfs/netfs.h: Ditto.
|
|
|
|
| |
* libdirmgt: Remove directory.
|
|
|
|
| |
* libtreefs: Remove directory.
|
|
|
|
|
|
|
| |
The dependency on libtirpc is already optional in the Makefiles, we do
not need to fail configure when it is missing.
* configure.ac: Do not fail when libtirpc is not available.
|
|
|
|
|
|
| |
This reverts commit 517edb7fe7c614a683e18671afc52de8cabe8fdf.
It seems to be actually breaking access to the disk.
|
|
|
|
|
| |
* rumpdisk/block-rump.c (rumpdisk_device_read): Memset the buffer
after allocating it.
|
|
|
|
|
|
|
|
| |
This disables the rump buffer cache and avoids any magic translation that
rump would do.
* rumpdisk/block-rump.c (translate_name): Use `/dev/r%sd' format instead of
`/dev/%sd'.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sun RPC is being phased out from glibc.
* configure.ac: Detect libtirpc.pc, subst libtirpc_CFLAGS and libtirpc_LIBS.
* config.make.in: Subst libtirpc_CFLAGS and libtirpc_LIBS.
* nfs/Makefile, nfsd/Makefile: Include libtirpc_CFLAGS and libtirpc_LIBS
* nfs/mount.c: Include <rpc/xdr.h>
* nfsd/main.c: Likewise.
* nfsd/ops.c: Likewise.
* nfsd/cache.c: Undef TRUE/FALSE after including rpc/ headers.
* nfsd/loop.c: Likewise.
|
|
|
|
|
| |
* rumpdisk/block-rump.c (rumpdisk_device_read): Use
vm_allocate/vm_deallocate instead of mmap/munmap.
|
|
|
|
|
| |
* rumpdisk/block-rump.c (rumpdisk_device_write): Call vm_deallocate
after writing the data.
|
|
|
|
| |
* mach-defpager/main.c (main): After mlockall, report error from errno, not the value returned by mlockall.
|
|
|
|
|
|
|
|
|
| |
recnum_t is 32bit while offsets are 64bit. We need to detect the
otherwise-silent truncation of the address. This happens here at 2TiB
for 512-byte sectors.
* libstore/device.c (dev_read, dev_write): Return EOVERFLOW on addresses
that are larger than what the device interface can handle.
|
|
|
|
|
|
|
|
|
|
|
|
| |
glibc is removing its malloc hooks, but gnumach now has support for
mlockall, which we can just use instead of kalloc/kfree.
* mach-defpager/main.c (main): Call mlockall.
* mach-defpager/kalloc.c: Remove.
* mach-defpager/kalloc.h: Remove.
* mach-defpager/default_pager.c: Use malloc/free instead of
kalloc/kfree.
* mach-defpager/setup.c: Likewise.
|
|
|
|
|
|
|
| |
Gnumach's 0650a4ee30e3 implements support for high bits being set in the
mask parameter of vm_map. This allowed to remove the rmh kludge in the
dynamic linker. Exec now can and should use the mask for excluding parts of
the memory layout.
|
|
|
|
|
|
| |
disk_cache_block_is_ref calls hurd_ihash_find which is very expensive, so
better disable the checks from record_global_poke and record_indir_poke
unless building a debugging version.
|