| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
* procfs/rootdir.c: (rootdir_gc_cpuinfo) new function
(rootdir_entries) add entry for cpuinfo file
(cpuinfo_x86, cpuinfo_aarch64) implementations for x86 and
aarch64 respectively.
|
|
|
|
|
| |
Not needed since b2c97e251bb470e6f967c716081675a96dbde59c
Message-ID: <20240121210757.1900938-2-flaviocruz@gmail.com>
|
|
|
|
| |
Using vmstats allows to get up to 16T.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes netfs_[gs]et_translator use mach_msg_type_number_t like
the RPC and diskfs. This also makes the fshelp_fetch_root_callback1_t
for fshelp_fetch_root use mach_msg_type_number_t.
This also makes procfs_get_translator and the get_translator proc method
use mach_msg_type_number_t.
This makes diskfs_get_directs use mach_msg_type_number_t like the
dir_readdir RPC
Also get rid of u_int.
This notably fixes _diskfs_translator_callback1_fn's bogus cast of
size_t *argz_len into (u_int *).
|
|
|
|
| |
Message-Id: <20230508213136.608575-42-bugaevc@gmail.com>
|
|
|
|
| |
Message-Id: <20230508213136.608575-36-bugaevc@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hurd code relies on gnumach default_pager.defs headers when making calls
using the default pager RPC. Those stubs were checked in back in the 90s
and are essentially unused because gnumach does not implement or use
that interface. Instead use the Hurd interface directly.
This is safe since the Hurd stubs are a super set of the gnumach stubs.
Later, we won't need to install the gnumach stubs anymore through glibc.
Message-Id: <ZC5WqPKfCCiE8D29@jupiter.tail36e24.ts.net>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|