| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until we make gnumach fully parallel, we need a way to execute
on slave processor set on smp-enabled gnumach.
For example:
$ /sbin/smp /bin/bash
$
will launch a shell that executes commands only within slave pset,
consisting of all processors except processor 0.
We can thus test parallelism on Hurd in a controlled way.
Message-ID: <20241126103747.353948-1-damien@zamaudio.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
block/char devices or directories
The perl test suite has a test where it reads all the block or char devices
under /dev without following the translators. Then it compares it against a
list of devices that read the translated nodes stat info.
The patch changes how the the device files are created initially so that the stat information
is identical and makes the Hurd environment appear more similar to other operating
systems.
Message-ID: <Zef__LrgPLXp9WHG@jupiter.tail36e24.ts.net>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Also fixed the implementation of default_pager_paging_storage_new in proxy
def pager to call into default_pager_paging_storage_new.
We can fast track the simplification of the RPC ABI for x86_64 if we don't have
MACH_MSG_TYPE_STRING used in RPCs which forces msgt_size to use more than 8
bits.
Message-Id: <ZFsk/W+slpAZyTG1@jupiter.tail36e24.ts.net>
|
|
|
|
| |
Message-Id: <20230508213136.608575-23-bugaevc@gmail.com>
|
|
|
|
| |
Message-Id: <20230508213136.608575-22-bugaevc@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
default_pager_paging_storage RPC.
This brings us a bit closer to having all types' msgt_size representable
with a single byte. We will be able to avoid mach_msg_type_long_t
entirely for x86_64 since mach_msg_type_t can represent long types using
a separate field.
Message-Id: <ZEdO0Grm2AUw4Tfe@jupiter.tail36e24.ts.net>
|
|
|
|
|
|
|
|
|
| |
The default_pager_paging_storage RPC has already it more than 20 years
ago. Given that we want to change the type of default_pager_filename_t
to use c_string, we can just remove the unused RPC.
Tested that swapon/swapoff still work with the new binaries.
Message-Id: <ZDoyNOE0XB77d5xj@mars.tail36e24.ts.net>
|
|
|
|
|
| |
Also add -Werror=old-style-definition to enforce new code.
Message-Id: <ZBZ+8xf7GHy2RT/h@jupiter.tail36e24.ts.net>
|
| |
|
| |
|
|
|
|
| |
* sutils/fstab.c (fstab_find_device): Do not realpath "procfs" pseudo-device.
|
|
|
|
| |
No actual behavior change.
|
|
|
|
| |
* sutils/MAKEDEV.sh (cd*): Set MASTER to @/dev/disk:.
|
|
|
|
|
| |
* sutils/clookup.c (file_name_lookup_carefully): Make head a non-const
char *.
|
|
|
|
|
|
|
| |
* sutils/MAKEDEV.sh (rumpdisk): Set up /dev/rumpdisk and /dev/disk that
points to it.
(netdde): Point /dev/net to /dev/netdde.
(eth*): Use /dev/net instead of /dev/netdde.
|
|
|
|
|
| |
* sutils/MAKEDEV.sh: Add -M option to set the master device node. Add
support for wd* devices through rumpdisk.
|
|
|
|
|
|
| |
dash's expandarg always calls expandmeta which calls glob64, which stats the
parameters. This is dangerous for MAKEDEV since it triggers the translator,
which may be strictly unwanted when filling an installed system.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding $(DESTDIR) to paths in config.make.in brings redundant additions
when e.g. datarootdir is "${datadir}". The viable way is to just fix
the installation rules.
* Makeconf (install, install-headers): Prepend $(DESTDIR) to dependencies.
($(DESTDIR)$(installationdir)): New rule.
($(addprefix $(installationdir)/,$(installable))): Prepend $(DESTDIR).
($($(includedir)/$(installhdrsubdir))): Likewise.
($(addprefix $(libdir)/$(libname),_p.a .a _pic.a)): Likewise.
($(libdir)/$(libname).so.$(hurd-version)): Likewise.
($(libdir)/$(libname).so): Likewise.
($(addprefix $(includedir)/$(installhdrsubdir)/,$(installhdrs))):
Likewise.
($(installationdirlist)): Likewise.
* config.make.in (hurddir, libdir, bindir, sbindir, includedir, libexecdir,
bootdir, infodir, sysconfdir, localstatedir, sharedstatedir, datadir,
datarootdir): Remove $(DESTDIR).
* config/Makefile (install): Prepend $(DESTDIR) to dependencies.
($(sysconfdir)/login): Prepend $(DESTDIR).
($(installed_logins)): Likewise.
($(installed_conf)): Likewise.
* console-client/Makefile (install): Prepend $(DESTDIR) to dependencies.
($(module-dir)): Prepend $(DESTDIR).
($(module-dir)/%): Likewise.
($(XKB_BASE)): Likewise.
($(XKB_BASE)/%): Likewise.
* hurd/Makefile (install-headers, install-msgids): Prepend $(DESTDIR) to
dependencies.
($(includedir)/hurd/%): Prepend $(DESTDIR).
($(datadir)/msgids, $(includedir)/hurd): Prepend $(DESTDIR).
* include/Makefile (install): Prepend $(DESTDIR) to dependencies.
($(includedir)/%): Prepend $(DESTDIR).
* libstore/Makefile (install): Prepend $(DESTDIR) to dependencies.
($(store-types:%=$(libdir)/libstore_%.a): Prepend $(DESTDIR).
* sutils/Makefile (install): Prepend $(DESTDIR) to dependencies.
($(prefix)/dev/MAKEDEV): Prepent $(DESTDIR).
($(prefix)/dev): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libdiskfs/boot-start.c (diskfs_start_bootstrap): Fix printf format.
* libfshelp/delegate.c: Include <alloca.h> and <stdlib.h>.
* libfshelp/start-translator-long.c: Include <stdlib.h>.
* libshouldbeinlibc/ugids-verify-auth.c (server_verify_make_auth): Fix
prototypes for password_check_group and password_check_user.
* libstore/argp.c: Include <stdlib.h>.
* libstore/task.c: Include <stdlib.h>.
* exec/exec.c: Include <mach/vm_param.h>.
* libbpf/bpf_impl.c: Include <stdlib.h>.
* proc/info.c (S_proc_getloginpids): Remove local variables leader_task
and leader_sub.
* proc/main.c (main): Remove local variable original_argv.
* boot/boot.c (task_died, S_mach_notify_new_task): Fix printf format.
* exec/elfcore.c: Include <alloca.h> and <mach/vm_param.h>.
* trans/crash.c: Include <hurd/msg.h>.
* trans/random.c: Include <signal.h>.
* utils/login.c: Include <signal.h>.
* utils/id.c: Include <hurd/msg.h>.
* utils/devprobe.c: Include <stdlib.h>.
* utils/addauth.c: Include <hurd/msg.h>.
* utils/frobauth-mod.c: Include <hurd/msg.h>.
* utils/storeread.c: Include <stdlib.h>.
* utils/msgport.c: Include <hurd/msg.h>.
* sutils/clookup.c (file_name_lookup_carefully): Fix lookup function
prototype, make head and tail const.
* utils/rpcscan.c: Include <stdlib.h>.
* sutils/bless.c: Include <stdlib.h>.
* fstests/fstests.c: Include <stdlib.h>.
* startup/startup.c (argz_task_insert_right): Fix printf format.
* init/init.c: Include <stdlib.h>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
free (NULL) is a nop, therefore it is not necessary to check that
first. Simplify the code accordingly. This commit is the result of
the following semantic patch:
@@
identifier X;
@@
-if (X) free (X);
+free (X);
* console-client/console.c: Simplify accordingly.
* console-client/driver.c: Likewise.
* console-client/vga.c: Likewise.
* ftpfs/dir.c: Likewise.
* libftpconn/unix.c: Likewise.
* libps/fmt.c: Likewise.
* libps/proclist.c: Likewise.
* libstore/mvol.c: Likewise.
* nfs/ops.c: Likewise.
* proc/host.c: Likewise.
* sutils/fstab.c: Likewise.
|
|
|
|
|
| |
Our variants print stack traces on failures. This will make locating
errors much easier.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the Hurd included a translator providing /dev/random and
/dev/urandom based on a source copy of the random number generator
found in classic GnuPG.
The new random translator is using the SHAKE128 algorithm from the
SHA-3 family as the underlying cryptographic primitive. Being a
sponge construction, it allows the extraction of arbitrary amounts of
pseudorandom data. It is continuously fed entropy by hashing system
state that is hard to predict.
* Makefile (prog-subdirs): Remove 'random'.
* NEWS: Update.
* random/Makefile: Delete file.
* random/TODO: Likewise.
* random/gnupg-bithelp.h: Likewise.
* random/gnupg-glue.h: Likewise.
* random/gnupg-random.c: Likewise.
* random/gnupg-random.h: Likewise.
* random/gnupg-rmd.h: Likewise.
* random/gnupg-rmd160.c: Likewise.
* random/random.h: Likewise.
* sutils/MAKEDEV.sh (random): Create node.
(urandom): The new translator is both secure and non-blocking. Create
a link from urandom to random for compatibility with Linux.
* trans/Makefile (targets): Add 'random'.
* trans/random.c: Move the skeleton of the old random translator here,
but replace the PRNG with SHAKE128. Remove all dubious attempts of
accounting for entropy. Do not block ever.
|
|
|
|
|
| |
* sutils/Makefile (progs): Add 'bless'.
* sutils/bless.c: New file.
|
|
|
|
| |
* sutils/Makefile ($(prefix)/dev/MAKEDEV): Add -f to ln command.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* console-client/Makefile (parser.tab.h): Redefine the standard yacc rule to
make it build the header too, to avoid concurrency between the standard yacc
rule and the rule that builds the header.
* sutils/Makefile (OBJS): Append .o suffix to $(progs) instead of .c.
|
|
|
|
|
| |
* sutils/Makefile (install): Do not depend on $(prefix)/dev.
($(prefix)/dev/MAKEDEV): Depend on $(prefix)/dev²
|
|
|
|
| |
* sutils/fstab.c (fstab_find_device): Do not realpath "proc" pseudo-device.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For reference, this patch was created using the following semantic
patch, and then manually applying the change in all functions
containing nested functions, as those are not supported by Coccinelle.
@@
expression A, B;
@@
- bzero (A, B)
+ memset (A, 0, B)
* auth/auth.c: Replace `bzero' with `memset'.
* boot/boot.c: Likewise.
* defpager/defpager.c: Likewise.
* exec/exec.c: Likewise. Also, drop `safe_bzero' and just use
`hurd_safe_memset' directly.
* ext2fs/ext2fs.c: Likewise.
* ext2fs/getblk.c: Likewise.
* ext2fs/pager.c: Likewise.
* fatfs/pager.c: Likewise.
* ftpfs/dir.c: Likewise.
* ftpfs/netfs.c: Likewise.
* isofs/inode.c: Likewise.
* isofs/pager.c: Likewise.
* libdiskfs/file-getfh.c: Likewise.
* libdiskfs/file-statfs.c: Likewise.
* libfshelp/fetch-root.c: Likewise.
* libfshelp/start-translator.c: Likewise.
* libftpconn/create.c: Likewise.
* libftpconn/open.c: Likewise.
* libftpconn/unix.c: Likewise.
* libpipe/pipe.c: Likewise.
* libps/procstat.c: Likewise.
* libps/spec.c: Likewise.
* libshouldbeinlibc/cacheq.c: Likewise.
* libshouldbeinlibc/idvec.c: Likewise.
* libshouldbeinlibc/ugids.c: Likewise.
* libstore/argp.c: Likewise.
* libstore/enc.c: Likewise.
* libstore/kids.c: Likewise.
* libthreads/alpha/thread.c: Likewise.
* libtreefs/fsys.c: Likewise.
* libtrivfs/file-statfs.c: Likewise.
* mach-defpager/default_pager.c: Likewise.
* pfinet/glue-include/asm/uaccess.h: Likewise.
* pfinet/io-ops.c: Likewise.
* pfinet/options.c: Likewise.
* pfinet/socket.c: Likewise.
* pfinet/timer-emul.c: Likewise.
* pflocal/io.c: Likewise.
* startup/startup.c: Likewise.
* storeio/storeio.c: Likewise.
* sutils/fstab.c: Likewise.
* usermux/usermux.c: Likewise.
* utils/fakeauth.c: Likewise.
* utils/frobauth.c: Likewise.
* utils/login.c: Likewise.
* utils/x.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
To avoid spurious ./, /, symlinks, etc.
* sutils/fstab.c (fs_set_mntent): Try to call realpath on mnt_fsname and mnt_dir
field of `mntent'.
(fstab_find_mount): Try to call realpath on `name' parameter.
(fstab_find): Do not try to call realpath.
(fstab_read): Reset errno to zero before calling getmntent.
* utils/umount.c (main): Do not warn about missing fstab entries for
active translators.
|
|
|
|
|
| |
* sutils/MAKEDEV.sh (urandom): New target.
(std): Add urandom to the standard devices list.
|
|
|
|
|
|
|
|
| |
This patch makes MAKEDEV.sh use the /bin/nullpriv wrapper so that the
storeio translator serving /dev/zero is started without any unix
privileges.
* sutils/MAKEDEV.sh (mkdev): Use /bin/nullpriv for /dev/zero.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mount utility on both Linux and FreeBSD allows one to either
specify a whitelist or a blacklist of filesystem types to consider for
--all. Prefixing the list with "no" indicates that the list is a
blacklist. Furthermore, Linux' mount utility ignores a "no" prefix on
any entry in the given list.
Previously the Hurd variant first applied whitelist containing all
positive values given and then filtered the resulting list using all
negative values. But this makes little sense because each entry only
has one value for the filesystem type (mnt_type) and all values are
mutually exclusive.
This patch adjusts the fstab handling code so that our mount utility
behaves like the Linux mount utility. This code is used by both mount
and fsck. The same argumentation applies to fsck as well.
Like implemented in Linux mount, any "no" prefix is ignored to retain
compatibility with the old behavior.
* sutils/fstab.c (fstab_argp_create): Fix semantic of --types.
|
|
|
|
|
|
|
|
|
| |
Previously it was not possible to add two mount entries with the same
device information to an fstab structure. This is easily fixed by
breaking the assumption, that there is only one possible mount entry
for the "none" device as used by many purely virtual file systems.
* utils/fstab.c (fstab_find_device): Return NULL if name is "none".
|
|
|
|
|
|
|
|
|
| |
This patch adds a --verbose argument to swapon and swapoff to make it
more compatible with the corresponding Linux' utilities. Note that our
swapon is verbose by default and has a --quiet argument to make it
quiet, so a --verbose argument on it's own does nothing at all.
* sutils/swapon.c (main): Handle -v argument.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add the same command line option as in util-linux' swapon to not
consider an error if the device/file of a swap entry in fstab does not
exist (and not when activating a device specified as argument to
`swapon').
* sutils/swapon.c (ifexists): New variable.
(options): Add the 'e' option.
(parse_opt) <'e'>: Handle case.
(swaponoff): New argument skipnotexisting.
Return 0 if open_store fails with ENOENT and SKIPNOTEXISTING is on.
(main): Adapt swaponoff calls with 0 as parameter for command line
arguments, and IFEXISTS for swap entries from fstab.
|
|/
|
|
|
|
|
|
| |
Fix a compiler warning by dropping the const qualifier. It is not
appropriate to qualify pointers to dynamically allocated memory as
const.
* sutils/fstab.c (real_name): Drop const qualifier.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file_name_lookup_carefully is like file_name_lookup but tries hard to
avoid starting any passive translators while doing the lookup. The
callback contains code to get a new handle to the root if it
encounters a translator, but this code was not being executed if the
node had no record of an passive translator, just an active one.
Fix the callback by dropping the test for a passive translator. AIUI
the current check for a passive translator makes no sense, as the code
is supposed to fail on encountering a passive translator.
This fixes lookups inside translators that have no passive
translator. For example if /run is a tmpfs started only as active
translator, touch /run/lock && mount tmpfs -t tmpfs /run/lock -o
size=5M would fail.
* sutils/clookup.c (lookup): Drop the test for an passive translator.
|
|
|
|
|
|
|
| |
Add option -p to MAKEDEV to use user-space parted stores for partition
devices.
* sutils/MAKEDEV.sh: Add -p option to use "part" store type.
|
|
|
|
|
|
|
| |
to chose not to overwrite existing entries.
* MAKEDEV.sh: Handle -k by passing it to settrans. Handle -K by checking for
existing translator.
|
|
|
|
| |
* sutils/MAKEDEV.sh (netdde, eth*): Add targets.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makeconf (lndist): Remove target.
(dist-hook, dist.tar): New targets.
* Makefile (dist): Rewrite this target's as well as accompanying rules.
(%-lndist, cp-linked-files, $(lf-inst)): Remove targets.
(%.bz2, %.gz, %/dist-hook): New targets.
(DISTFILES): Set.
* doc/Makefile (DISTFILES): Set.
* doc/Makefile (lndist, lndist-info-targets): Remove targets.
* include/Makefile (lndist): Remove target.
* libthreads/Makefile (lndist, lndist-i386-files, lndist-map-file): Remove
targets.
* pfinet/Makefile (lndist, lndist-linux-src-net-core-files)
(lndist-linux-src-net-ethernet-files, lndist-linux-src-net-ipv4-files)
(lndist-linux-src-net-ipv6-files, lndist-linux-src-asm-files)
(lndist-linux-src-include-linux-files, lndist-linux-src-include-net-files)
(lndist-linux-src-include-asm-files, lndist-glue-include-linux-files)
(lndist-glue-include-asm-files): Remove targets.
* auth/Makefile (LCLHDRS): Don't set.
* boot/Makefile (LCLHDRS, DIST_FILES): Likewise.
* bsdfsck/Makefile (LCLHDRS): Likewise.
* config/Makefile (DIST_FILES): Likewise.
* console-client/Makefile (LCLHDRS): Likewise.
* console/Makefile (LCLHDRS, DIST_FILES): Likewise.
* doc/Makefile (DIST_FILES): Likewise.
* exec/Makefile (LCLHDRS, DIST_FILES): Likewise.
* ext2fs/Makefile (LCLHDRS): Likewise.
* fatfs/Makefile (LCLHDRS): Likewise.
* ftpfs/Makefile (LCLHDRS): Likewise.
* hostmux/Makefile (LCLHDRS): Likewise.
* hurd/Makefile (DIST_FILES): Likewise.
* include/Makefile (LCLHDRS): Likewise.
* isofs/Makefile (LCLHDRS, DIST_FILES): Likewise.
* libcons/Makefile (LCLHDRS): Likewise.
* libdirmgt/Makefile (LCLHDRS): Likewise.
* libdiskfs/Makefile (LCLHDRS): Likewise.
* libfshelp/Makefile (LCLHDRS): Likewise.
* libftpconn/Makefile (LCLHDRS): Likewise.
* libihash/Makefile (LCLHDRS): Likewise.
* libiohelp/Makefile (LCLHDRS): Likewise.
* libnetfs/Makefile (LCLHDRS): Likewise.
* libpager/Makefile (LCLHDRS): Likewise.
* libpipe/Makefile (LCLHDRS): Likewise.
* libports/Makefile (LCLHDRS): Likewise.
* libps/Makefile (LCLHDRS): Likewise.
* libshouldbeinlibc/Makefile (LCLHDRS): Likewise.
* libstore/Makefile (LCLHDRS, DIST_FILES): Likewise.
* libthreads/Makefile (LCLHDRS): Likewise.
* libtreefs/Makefile (LCLHDRS): Likewise.
* libtrivfs/Makefile (LCLHDRS): Likewise.
* mach-defpager/Makefile (LCLHDRS): Likewise.
* nfs/Makefile (LCLHDRS): Likewise.
* nfsd/Makefile (LCLHDRS): Likewise.
* pfinet/Makefile (LCLHDRS): Likewise.
* pflocal/Makefile (LCLHDRS): Likewise.
* proc/Makefile (LCLHDRS, DIST_FILES): Likewise.
* release/Makefile (DIST_FILES): Likewise.
* storeio/Makefile (LCLHDRS): Likewise.
* sutils/Makefile (LCLHDRS): Likewise.
* term/Makefile (LCLHDRS, DIST_FILES): Likewise.
* tmpfs/Makefile (LCLHDRS): Likewise.
* ufs-fsck/Makefile (LCLHDRS): Likewise.
* ufs/Makefile (LCLHDRS): Likewise.
* usermux/Makefile (LCLHDRS): Likewise.
* utils/Makefile (LCLHDRS): Likewise.
|
|
|
|
| |
* sutils/e2os.sh (sbget, sbset): Use POSIX syntax for functions.
|
|
|
|
|
|
| |
* Fix spelling with codespell[1] and manually review it.
[1] http://git.profusion.mobi/cgit.cgi/lucas/codespell/
|