| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Our variants print stack traces on failures. This will make locating
errors much easier.
|
|
|
|
|
| |
* procfs/rootdir.c (rootdir_gc_hostinfo): New function.
(rootdir_entries): New entry 'hostinfo'.
|
|
|
|
|
| |
* procfs/rootdir.c (rootdir_gc_vmstat): Remove superfluous 'host_info'
calls.
|
|
|
|
|
|
|
|
|
| |
* hurd/hurd_types.h: Document the magic retry string `pid'.
* hurd/paths.h (_HURD_MAGIC): New macro.
* procfs/main.c: Remove all code related to faking /proc/self.
* procfs/main.h: Likewise.
* procfs/rootdir.c: Likewise. Instead, return the magic retry
response `pid' for the `self' node.
|
|
|
|
|
| |
* procfs/rootdir.c (rootdir_gc_meminfo): Just omit the swap
information if the default pager is unreachable.
|
|
|
|
|
|
|
|
|
|
|
| |
When /dev/hd* entries are parted-partition storeio, the store name is only
the disk name, thus not unique. We should just use the path being used
instead.
* sutils/swapon.c (swaponoff): Use `file' instead of `store->name' to
default_pager_paging_file.
(main): Drop hardcoded "/dev/".
* procfs/rootdir.c (rootdir_gc_swaps): Drop hardcoded "/dev/".
|
|
|
|
|
|
| |
* procfs/rootdir.c (rootdir_gc_swaps): Fix default_pager_storage_info call
parameter order.
* sutils/swapon.c (main): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* hurd/default_pager.defs (default_pager_storage_info): New RPC.
* hurd/default_pager_reply.defs: Skip default_pager_storage_info RPC.
* hurd/default_pager_types.h: Include <mach/machine/vm_types.h>.
(vm_size_array_t): New type.
* mach-defpager/priv.h (part): Add `name' field.
* mach-defpager/default_pager.c (new_partition): Allocate and fill
`part->name' field. Free it on error.
(destroy_paging_partition): Free `part->name' field.
(S_default_pager_storage_info): New function.
* procfs/Makefile (SRCS): Add default_pagerUser.c.
* procfs/rootdir.c: Include "default_pager_U.h".
(rootdir_gc_swaps): New function.
(rootdir_entries): Add "swaps" entry.
* sutils/swapon.c: Include <argz.h>
(show): New variable.
(options): Add --show/-S option.
(def_pager, dev_master): New variables
(swaponoff): Move getting `def_pager' to...
(get_def_pager): ... new function.
(main): Support 'S' option.
* trans/proxy-defpager.c (S_default_pager_storage_info): New function.
|
|
|
|
|
|
|
| |
procfs makes use of the debug interface which is subject to change.
* procfs/rootdir.c (rootdir_gc_slabinfo): The flag
CACHE_FLAGS_NO_RECLAIM is no longer used.
|
|
|
|
|
|
|
|
| |
procfs: Fix compiler warnings.
* include/sys/procfs.h: Change uintptr_t to vm_address_t.
* procfs/process.c: Fix format strings.
* procfs/rootdir.c: Add missing casts.
|
|
|
|
|
| |
* procfs/rootdir.c: Move the translator linkage code to the
appropriate location.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Generalize the translator linkage code previously introduced for the
`mounts' node.
* procfs/rootdir.c (struct procfs_translated_node_ops): New
specialized node operations structure for translated nodes.
(rootdir_mounts_make_node): Generalize and rename to
rootdir_make_translated_node. Also, pass the entry_hook to
procfs_make_node so that...
(rootdir_mounts_get_translator): ... can be generalized to
rootdir_translated_node_get_translator and read the argz vector from
the hooked structure.
(ROOTDIR_DEFINE_TRANSLATED_NODE): New convenience macro to define
translated nodes.
(rootdir_entries): Use the new code for the `mounts' node.
|
|
|
|
|
|
|
|
| |
Now that procfs is merged into the Hurd repository we can just assume
that the mtab translator exists.
* procfs/rootdir.c (rootdir_mounts_exists): Drop function.
(rootdir_entries): Adjust accordingly.
|
|
|
|
|
| |
* procfs/rootdir.c (rootdir_gc_filesystems): New function.
(rootdir_entries): Use the new function to implement /proc/filesystems.
|
|
|
|
|
|
| |
* hurd/paths.h (_HURD_MTAB): New macro.
* procfs/rootdir.c (rootdir_mounts_get_translator): Use the new macro.
(rootdir_mounts_exists): Likewise.
|
|
Move the procfs translator to its own subdirectory 'procfs'.
This is the last commit to this repository. Development of the procfs
translator will continue in the main Hurd repository.
* procfs/Makefile: Replace the standalone Makefile with the one from
the Debian packaging repository.
|