| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
libdiskfs' dosync goes through the cache to flush nodes to the disk.
We thus have to flush a node to the disk before removing it from the
cache in diskfs_try_dropping_softrefs.
|
|
|
|
|
| |
When truncating a node with inline data, it's safer to really frob the inline
data, to make sure ext2fs does not wrongly interprete it as block numbers.
|
|
|
|
|
|
|
|
| |
We may end up with an arbitrary series of bootstrap translators, which
can know about each other through devices, and thus do not need any
particular order except dependencies. The actual bootstrap order can
thus be arbitrary (provided it respects dependencies), so better not
hardcode it.
|
|
|
|
|
|
|
| |
We do not actually want to shut everything down. For instance, we still have
to be able to start the acpi translator to perform the actual shutdown.
What we however have to do is syncing the disks.
|
|
|
|
|
|
| |
machdev installs the trivfs translator, not the netfs translator,
and thus pci-arbiter would only show up as the pci device, not the pci
filesystem.
|
| |
|
|
|
|
|
| |
libdiskfs was passing its own proc port, thus confusing the fsys_init
call in rumpdisk.
|
| |
|
|
|
|
|
| |
In diskfs_set_translator we need to truncate the existing node before
allocating the block for the translator.
|
|
|
|
|
|
|
| |
e2fsck does not like seeing both blocks for the symlink and for the
translation entry.
This fixes the disappearance of /dev/urandom.
|
|
|
|
|
|
| |
Returning an error will deallocate the RPC references.
Reported-by: Sergey Bugaev <bugaevc@gmail.com>
|
|
|
|
| |
The delayed copy actually needs write access.
|
|
|
|
|
|
|
| |
This makes libmachdev follow the exec case, and make sure to be waiting
for all bootstrap processes by waiting for the FS process.
Message-Id: <20210711012042.77920-1-damien@zamaudio.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix several issues with reference counting in
rootdir_make_translated_node ():
* Grab an additional reference while still holding the lock.
* Give the node an additional reference for being pointed to
by the ops.
* Reference the existing node if we find it on the second try,
not only if we find it on the first try.
* Dereference, not just clean, the created node if it turns out
to be unneeded.
Fixes a crash with the following backtrace:
#2 0x010855c8 in __assert_fail_backtrace (
assertion=0x1051148 "! (r.hard == 1 && r.weak == 0) || !\"refcount detected use-after-free!\"",
file=0x1050cec "../../libshouldbeinlibc/refcount.h", line=170, function=0x1051220 <__PRETTY_FUNCTION__.3> "refcounts_ref")
at ../../libshouldbeinlibc/assert-backtrace.c:64
#3 0x01050358 in refcounts_ref (result=0x0, ref=0x15009a0) at ../../libshouldbeinlibc/refcount.h:170
#4 netfs_nref (np=0x15008f0) at ../../libnetfs/nref.c:26
#5 0x0804c9f4 in rootdir_make_translated_node (dir_hook=0x10001990, entry_hook=0x8055180 <__compound_literal.8>)
at ../../procfs/rootdir.c:674
#6 0x0804ace3 in procfs_dir_lookup (hook=0x10001c10, name=0x2857efc "mounts", np=0x2855d68) at ../../procfs/procfs_dir.c:88
#7 0x0804a410 in procfs_lookup (np=0x10001c40, name=0x2857efc "mounts", npp=0x2855d68) at ../../procfs/procfs.c:185
#8 0x0804cae5 in dircat_lookup (hook=0x10001d50, name=0x2857efc "mounts", np=0x2855d68) at ../../procfs/dircat.c:76
#9 0x0804a410 in procfs_lookup (np=0x10001d80, name=0x2857efc "mounts", npp=0x2855d68) at ../../procfs/procfs.c:185
#10 0x0804a96f in netfs_attempt_lookup (user=0x1401c60, dir=0x10001d80, name=0x2857efc "mounts", np=0x2855d68)
at ../../procfs/netfs.c:212
#11 0x0103fd5b in netfs_S_dir_lookup (dircred=<optimized out>, filename=<optimized out>, flags=<optimized out>,
mode=<optimized out>, do_retry=<optimized out>, retry_name=<optimized out>, retry_port=<optimized out>,
retry_port_type=<optimized out>) at ../../libnetfs/dir-lookup.c:175
Message-Id: <20210524154340.264885-2-bugaevc@gmail.com>
|
|
|
|
|
|
|
|
| |
If no output width limit has been set explicitly, and we're not printing
to a tty, do not limit output width.
In particular, this fixes grepping ps output.
Message-Id: <20210518122150.1490468-1-bugaevc@gmail.com>
|
|
|
|
|
| |
* utils/settrans.c (main): When file_set_translator fails, make the
just-started translator go away.
|
|
|
|
|
| |
Clarify this in the documentation, and fix the storeio implementation.
Message-Id: <20210508153144.332832-2-bugaevc@gmail.com>
|
|
|
|
|
|
|
|
|
| |
This reverts commit 7b9011628ec0dea3e01b19b75013ce5cf5b9c841.
We do want to release dead names, and not report the KERN_INVALID_RIGHT
error, just return that there is no translator any more.
As suggested by Sergey Bugaev
|
|
|
|
|
|
| |
Unlike mmap () and calloc (), reallocarray () does not automatically
zero-fill the newly allocated memory. Do so explicitly.
Message-Id: <CAN9u=Hd21Es7Kc4tVBAUeLaKo9CWKO1e577TqnXMzmmvwLi22Q@mail.gmail.com>
|
|
|
|
|
|
|
|
|
| |
libc already implements the functionality for allocating and managing
memory blocks like the pagemap. Using libc functions gives us some
additional niceties like overflow checking in reallocarray (). it also
means that we will not allocate a whole page of memory if we need to
store just a few integers.
Message-Id: <20210506125631.79117-7-bugaevc@gmail.com>
|
|
|
|
|
|
|
|
| |
The code tried to round up the allocation size to a multiple of page size.
But we actually allocate newsize * sizeof (*p->pagemap) bytes, not newsize
bytes, which meant allocations were sizeof (*p->pagemap) times larger than
they needed to be.
Message-Id: <20210506125631.79117-6-bugaevc@gmail.com>
|
|
|
|
|
|
| |
On a 64-bit system, there can be a lot more pages
than a 32-bit int can fit.
Message-Id: <20210506125631.79117-5-bugaevc@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
pager_offer_page () is documented to may ignore the offered page if
the kernel already has a copy in core (indeed, that's what Mach does).
However the current behavior is the inverse of that: it asks the kernel
to flush (i.e. drop) its in-core copy, and replace it with the offered
one. Fix this by not doing that, and calling memory_object_data_supply ()
directly.
Message-Id: <20210506125631.79117-3-bugaevc@gmail.com>
|
|
|
|
|
|
| |
_pager_pagemap_resize () returns an error or 0 on success,
not a boolean.
Message-Id: <20210506125631.79117-2-bugaevc@gmail.com>
|
|
|
|
| |
* hurd/fs.defs: make it clear that dir_readdir returns a series, not an array.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
netdde actually needs to control which thread runs the trivfs server,
for managing per-thread state etc.
Only pci-arbiter needs to run machdev_trivfs_server non-blockingly, it
can create a thread by itself.
* libmachdev/trivfs_server.c (machdev_trivfs_loop): Move back muxer loop
to...
(machdev_trivfs_server): ... here.
* pci-arbiter/main.c (main): Run machdev_trivfs_server in its own
thread.
* rumpdisk/main.c (main): Do not call pthread_exit().
|
|
|
|
|
| |
* libmachdev/trivfs_server.c (trivfs_S_fsys_init): Pass machdev_argv to
_hurd_libc_proc_init, not diskfs_argv.
|
|
|
|
|
|
|
|
|
|
|
| |
glibc 2.33 separated out _hurd_libc_proc_init from _hurd_init, so we
have to additionally call it.
* configure.ac (_hurd_libc_proc_init): Detect function.
* libdiskfs/boot-start.c (diskfs_S_fsys_init): Call
_hurd_libc_proc_init.
* libmachdev/trivfs_server.c (trivfs_S_fsys_init): Call
_hurd_libc_proc_init.
|
|
|
|
|
|
|
| |
for coherency with ext2fs and rumpdisk
* pci-arbiter/options.h (options): Rename --dev-master-port option to
--device-master-port option.
|
|
|
|
|
| |
* libmachdev/trivfs_server.c (machdev_trivfs_init): Call fsys_getpriv
only when bootstrapping.
|
|
|
|
|
|
|
|
|
|
| |
* pci-arbiter/pcifs.h (init_root_node): Restore underlying_node
parameter.
* pci-arbiter/pcifs.c (underlying_stat): Drop global variable.
(init_root_node): Restore getting the stat from the underlying node.
* pci-arbiter/main.c (main): Restore calling netfs_startup in
non-bootstrap case, and pass underlying node to init_root_node. Only
call pcifs_startup in bootstrap case.
|
|
|
|
| |
Message-Id: <20210404033750.143411-1-damien@zamaudio.com>
|
|
|
|
|
|
|
| |
We may not have io_identity called before io_stat, and programs like
diff rely on inode numbers being different for different files.
* pflocal/io.c (S_io_stat): Allocate socket id if not already allocated.
|
|
|
|
|
|
|
|
|
|
| |
* libmachdev/trivfs_server.c (parent_task): New global variable.
(machdev_trivfs_init): Remove parent_task local variable.
(trivfs_S_fsys_init): Pass parent's proc port to fsys_init call.
Accept EPERM error from proc_mark_important for bootstrap case. Check
errors from proc_set_exe call.
Message-Id: <20210319021512.823541-1-damien@zamaudio.com>
|
| |
|
|
|
|
|
| |
* Makeconf (vpath): Add $(libdir)/ for libpthread.%, libbz2.%, and
libz.%.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So that distributions can use the --libexecdir configure parameter.
* configure.ac (AC_CONFIG_FILES): Add daemons/runsystem.hurd.sh.
* config/ttys: Rename to ttys.in, replace /libexec with @libexecdir@.
* config/Makefile (ttys): Generate from ttys.in
* daemons/runsystem.hurd.sh.in (prefix): Define to @prefix@.
(exec_prefix): Define to @exec_prefix@.
(RUNCOM, RUNTTYS): Replace /libexec with @libexecdir@.
* init/Makefile (init-CPPFLAGS): Define LIBEXECDIR.
* init/init.c (main): Use LIBEXECDIR instead of hardcoding /libexec.
* startup/Makefile (startup-CPPFLAGS): Define LIBEXECDIR.
* startup/startup.c (start_child, launch_something): Use LIBEXECDIR instead of
hardcoding /libexec.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libmachdev/trivfs_server.c (bootstrapped): Rename to bootstrapping.
(trivfs_S_fsys_startup): Call fsys_startup on the bootstrap port.
(essential_task): New function.
(trivfs_S_fsys_init): Call fsys_init on the bootstrap port. Configure
proc. Mark us as essential when bootstrapping even without a devnode.
(arrange_shutdown_notification): Do not configure proc.
(machdev_trivfs_init): Always get the bootstrap port from the kernel,
leave it MACH_PORT_NULL if unavailable. Call fsys_getpriv on it if it
is.
* pci-arbiter/Makefile (SRCS): Remove startup.c.
* pci-arbiter/startup.c: Delete file.
* pci-arbiter/startup.h: Delete file.
* pci-arbiter/main.c: Do not include "startup.h"
(pci_device_shutdown): Do not try to lokup the dosync_handle.
(pcifs_startup): Always create the pci_control_port right on the
control port.
(main): Call machdev_device_init after machdev_trivfs_init. Do not call
arrange_shutdown_notification.
* rumpdisk/main.c (netfs_server_name): Don't pretend to be the arbiter anymore
(main): Call machdev_device_init after machdev_trivfs_init.
Message-Id: <20210316054715.788725-1-damien@zamaudio.com>
|