summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-11-24Add to startup relevant shutdown rpc callacpi-backupDamien Zammit
2018-11-24Add ability to acpi translator to r/w directly to registers for shutdownDamien Zammit
2018-11-24Modify acpi translator to allow write to existing tablesDamien Zammit
2018-11-24Add shutdown RPC && ACPI specific disappear routineDamien Zammit
2018-11-10ACPI tables translatorDamien Zammit
Exposes x86 ACPI tables as a netfs on a mount point
2018-11-06build: Distribute tarball compressed with xz instead of bzip2Guillem Jover
* Makefile (dist): Change bz2 to xz. (%.xz): Add target. (%.bz2): Remove target.
2018-11-05tmpfs: Document issue with removed shm filesSamuel Thibault
2018-10-30pci-arbiter: Add TODO fileSamuel Thibault
* pci-arbiter/TODO: New file.
2018-10-30PCI ArbiterJoan Lledó
2018-10-08libports: Fix typoSamuel Thibault
2018-08-15lwip: Fix build against glibc 2.28Samuel Thibault
lwip/startup.c: Include <signal.h>.
2018-08-14lwip: Fix a buffer overflow and clear compiler warningsJoan Lledó
GCC 8 new warning -Wstringop-truncation detected some buffer overflows. * lwip/options.c (parse_opt): Fix the buffer overflow. * lwip/pfinet-ops.c (dev_ifconf): Likewise.
2018-08-14lwip: return EINTR when a select() IPC thread is cancelledJoan Lledó
Needed to properly support poll in glibc (_hurd_select). * lwip/io-ops.c (lwip_io_select_common): Detect when the current RPC is cancelled by checking the reply port.
2018-08-14lwip: refactor main demuxer to avoid code duplicationJoan Lledó
* lwip/main.c (lwip_demuxer): Refactored.
2018-08-14lwip: poll(): return EIO when POLLERR is setJoan Lledó
Needed to properly support poll in glibc (_hurd_select). * lwip/io-ops.c (lwip_io_select_common): If POLLERR is set, return EIO.
2018-06-13Hurd patches (fix compilation)Luca Weiss
* isofs/rr.c (rrip_work): Use gnu_dev_makedev instead of makedev. * libdiskfs/file-set-trans.c (diskfs_S_file_set_translator): Likewise. * libnetfs/file-set-translator.c (netfs_S_file_set_translator): Likeiwse. * nfs/nfs.c (xdr_decode_fattr): Likewise. * storeio/storeio.c (parse_opt): Likewise. * libfshelp/fetch-root.c (fshelp_short_circuited_callback1): Use gnu_dev_major and gnu_dev_minor instead of major and minor. * libnetfs/file-get-translator.c (netfs_S_file_get_translator): Likewise. * nfs/ops.c (netfs_attempt_link): Likewise. * storeio/storeio.c (trivfs_append_args): Likewise. * trans/fakeroot.c (netfs_attempt_mkdev): Likewise. * pfinet/glue-include/linux/mm.h: Include <mach/vm_param.h>. * term/users.c: Include <signal.h>
2018-06-03console-run: do not complain when running with empty /devSamuel Thibault
* daemons/console-run.c (open_console): Do not complain if errno is ENOENT on opening /dev/console.
2018-05-02lwip translator: Remove unused reference to config.hJoan Lledó
2018-05-02Revert "MAX_SOCKETS: New patch implementing unlimited number of sockets"Samuel Thibault
This reverts commit 05403a6e3a72c085e25b46c3173efde4cf64c21f.
2018-05-01Include required sockets headersJoan Lledó
* lwip/iioctl-ops.c: Include <lwip/inet.h>. * lwip/lwip-util.c: Likewise. * lwip/pfinet-ops.c: Include <lwip/sockets.h> and <lwip/inet.h>. * lwip/port/netif/hurdethif.c: Likewise.
2018-05-01MAX_SOCKETS: New patch implementing unlimited number of socketsJoan Lledó
2018-04-22Fix DESTDIR supportSamuel Thibault
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.
2018-04-22exec: Leave room for mmaps etc. before PIE binariesSamuel Thibault
otherwise there might not even be enough room to run RPCs during rtld bootstrap. * exec/exec.c (do_exec): Add 128MiB to anywhere_start before loading program.
2018-04-22exec: Fix else branchSamuel Thibault
which happened to have no nefarious consequences by luck. * exec/exec.c (load_section): Add braces around commented code to fix else branch.
2018-04-22exec: document why mask code is currently commentedSamuel Thibault
2018-04-02Support $(DESTDIR)Samuel Thibault
as reported by Sergei Trofimovich * config.make.in (hurddir, libdir, bindir, sbindir, includedir, libexecdir, bootdir, infodir, sysconfdir, localstatedir, sharedstatedir, datadir, datarootdir): Prepend $(DESTDIR).
2018-03-05Add file_utimens RPC to use a struct timespecFlávio Cruz
and update the servers to use UTIME_NOW and UTIME_OMIT. * console-client/trans.c (netfs_attempt_utimes): Do not set current time ourself. * console/console.c (netfs_attempt_utimes): Likewise. * ftpfs/netfs.c (netfs_attempt_utimes): Likewise. * hostmux/node.c (netfs_attempt_utimes): Likewise. * usermux/node.c (netfs_attempt_utimes): Likewise. * nfs/ops.c (netfs_attempt_utimes): Likewise. * doc/hurd.texi (file_utimens): Add documentation. * hurd/fs.defs (file_utimens): Add RPC. * libdiskfs/file-utimes.c (diskfs_S_file_utimes): Move implementation and replace with translation layer with... (diskfs_S_file_utimens): ... new function. * libnetfs/file-utimes.c (netfs_S_file_utimes): Likewise with... (netfs_S_file_utimens): ... new function. * libnetfs/init-init.c: Include <error.h>. (netfs_mtime): New variable. (netfs_init): New function. * libnetfs/netfs.h (netfs_attempt_utimes): Update documentation. * libnetfs/priv.h (netfs_mtime): Declare variable. * libtreefs/s-file.c (treefs_S_file_utimes): Convert time values and call treefs_s_file_utimens instead of treefs_s_file_utimes. * libtreefs/treefs-hooks.h: Replace TREEFS_HOOK_S_FILE_UTIMES with TREEFS_HOOK_S_FILE_UTIMENS. * libtreefs/treefs-s-hooks.h: Replace s_file_utimes with s_file_utimens. * libtrivfs/file-utimes.c (trivfs_S_file_utimens): New function. * libtrivfs/times.c (trivfs_set_atime): Try to use file_utimens before using file_utimes. (trivfs_set_mtime): Likewise. * nfsd/ops.c (complete_setattr): Likewise. * trans/fakeroot.c (netfs_attempt_utimes): Likewise. * nfs/nfs.c (xdr_encode_sattr_times): Do not set atime or mtime when they are NULL. * configure.ac: Look for file_futimens, and define UTIME_NOW/OMIT, for compatibility with old glibcs.
2018-03-05Fix warningsSamuel Thibault
* 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>.
2018-03-05Add missing includeSamuel Thibault
* libshouldbeinlibc/wire.c: Include <mach/vm_param.h>.
2018-03-04Avoid using loff_tSamuel Thibault
It may not be available depending on standard selection. * hurd/hurd_types.h (off_array_t, const_off_array_t): Use __loff_t instead of loff_t.
2018-02-11Add missing lib in linkSamuel Thibault
* Makefile (rpcscan): Depend on ../libshouldbeinlibc/libshouldbeinlibc.a.
2018-01-29Add compatibility with previous value of _POSIX_VDISABLESamuel Thibault
Setting _POSIX_VDISABLE to -1 was actually not POSIX compliant, so it was changed to '\0'. Keep the compatibility for now. * term/munge.c (term/munge.c): Consider (unsigned char) -1 as _POSIX_VDISABLE.
2018-01-28Add const MIG typesSamuel Thibault
* hurd/default_pager_types.h (const_recnum_array_t, const_vm_size_array_t): New types. * hurd/hurd_types.h (const_data_t, const_intarray_t, const_fd_mask_t, const_portarray_t, const_pidarray_t, const_idarray_t, const_off_array_t, *const_procinfo_t): New types.
2018-01-28Fix warningsSamuel Thibault
* utils/nullauth.c (argp_program_version, options, doc[], args_doc): Drop duplicate const qualifier.
2018-01-28Fix warningSamuel Thibault
* trans/streamio.c (io_select_common): Do not needlessly check that buffer_writable is not NULL, it is a static inline.
2018-01-28Fix warningSamuel Thibault
* libiohelp/iouser-create.c: Include <stdlib.h>.
2018-01-16Fix firmlinks showing up in /proc/mountsSamuel Thibault
mtab checks for fsys_get_options. * trans/firmlink.c: Include <argz.h>. (trivfs_append_args): New function.
2018-01-15Revert "libdiskfs: Shutdown pagers on startup_dosync."Samuel Thibault
This reverts commit 89a49ec8b3a847f3b770cff6a4a80b98b94ad7bf. There was a typo in diskfs_shutdown (FSYS_GOAWAY_FORCE || FSYS_GOAWAY_RECURSE) which was making it FSYS_GOAWAY_NOWAIT, and thus not actually syncing if there happens to be clients (it was then returning EBUSY). Fixing this into FSYS_GOAWAY_FORCE | FSYS_GOAWAY_RECURSE then makes it wait for clients (and NOWAIT is not supported), and there are very often some left, thus not syncing either.
2018-01-08Implement /proc/<pid>/exeSamuel Thibault
by adding proc_set/get_exe to the proc server, making exec call proc_set_exe, and libps call proc_get_exe. procfs can then just retrieve the information to make the "exe" symlink. * hurd/process.defs (proc_set_exe, proc_get_exe): New RPCs. * hurd/process_request.defs: Likewise. * hurd/process_reply.defs: Add skips for proc_set_exe and proc_get_exe RPCs. * proc/proc.h (struct proc): Add `exe' field. * proc/info.c (S_proc_set_exe, S_proc_get_exe): New functions. * proc/mgt.c (process_has_exited): Free p->exe. (S_proc_child): Duplicate parent `exe' into child's `exe'. * exec/exec.c (do_exec): Call proc_set_exe when a filename is available. * libps/ps.h (struct proc_stat): Add `exe_vm_alloced', `exe', and `exe_len' field. (PSTAT_EXE): New macro. (PSTAT_USER_BASE): Change value to make room. (proc_stat_exe, proc_stat_exe_len): New macros. * libps/procstat.c (proc_stat_set_flags): Handle PSTAT_EXE case by calling proc_get_exe. * libps/spec.c (ps_get_exe): New function. (ps_exe_getter): New structure. (ps_fmt_spec): Add "Exe" specification. * procfs/process.c (process_file_symlink_make_node, process_file_gc_exe): New functions. (procfs_dir_entry): Add "exe" entry. * startup/startup.c (launch_core_servers): Set exe paths for startup, auth, proc, and fs servers. (frob_kernel_process): Set exe path for kernel task. (S_startup_essential_task): Set exe path for exec server.
2018-01-08Add support for $ORIGIN rpath expansionSamuel Thibault
* exec/exec.c (do_exec): When abspath is absolute, record its dirname into the LD_ORIGIN_PATH environment variable.
2018-01-08Fix exec_paths through fakeroot or chrootJustus Winter
If file_name_exec is not given, check_hashbang will try to locate the file. If argv[0] contains a '/', the file path is assumed to be absolute and it will try to open the file. Otherwise, the file is searched in the PATH. In either case, the resulting file identity port is compared to the identity port of the original file handle passed to check_hashbang. exec_paths_exec.patch explicitly provides the script files path in file_name_exec. According to the comment, if this path is provided, it is assumed to be the path to the script file and no attempt at locating the script file is done. However, the identity ports are still compared. This cannot succeed if fakeroot or chroot is used, because the process doing the exec and thus the initial file lookup is running in the chrooted environment, while the exec server is not. Fix this by skipping the identity test if file_name_exec is provided. * exec/hashexec.c (check_hashbang): Skip the file identity test if the file_name_exec is provided.
2018-01-08rpctrace: Pass prefixed_name to _hurd_exec_paths.Kalle Olavi Niemitalo
This fixes the following test case: mkdir testy echo '#! /bin/bash' > testy/prog echo 'printf "%s\n" "$0"' >> testy/prog chmod +x testy/prog PATH=$(pwd)/testy /bin/rpctrace -E PATH=/usr/bin:/bin -o /dev/null prog Before this patch, the output is: /bin/bash: prog: No such file or directory After this patch, the output is similar to: /home/kalle/testy/prog * utils/rpctrace.c (traced_spawn): Get prefixed_name from file_name_path_lookup and pass it to _hurd_exec_paths.
2018-01-08Use the new _hurd_exec_file_name functionEmilio Pozuelo Monfort
* configure.in: Check for _hurd_exec_paths. * utils/fakeauth.c: Call _hurd_exec_paths instead of _hurd_exec if it's available. * utils/shd.c: Likewise. * utils/rpctrace.c: Get prefixed_name from file_name_path_lookup and pass it to _hurd_exec_paths instead of calling _hurd_exec.
2018-01-08Add a file_exec_file_name RPCEmilio Pozuelo Monfort
* hurd/fs.defs (file_exec): Deprecate in favor of... (file_exec_paths): ...this new RPC. * TODO: Update. * doc/hurd.texi: Update RPC name. * hurd/hurd_types.h: Update RPC name. * libdiskfs/boot-start.c: Update RPC name. * configure.ac: Check for presence of RPC stubs file_exec_paths exec_exec_paths. * exec/hashexec.c (check_hashbang): When file_exec_paths is available, use it instead of file_exec. * startup/startup.c (run, run_for_real, start_child): Likewise. * utils/login.c (main): Likewise. * libfshelp/start-translator-long.c (fshelp_start_translator_long): Likewise. * libdiskfs/file-exec.c (diskfs_S_file_exec): Move code to new function diskfs_S_file_exec_paths and call it. (diskfs_S_file_exec_paths): New function, use exec_exec_paths when available instead of exec_exec * libnetfs/file-exec.c (netfs_S_file_exec, netfs_S_file_exec_paths): Likewise. * trans/fakeroot.c (netfs_S_file_exec, netfs_S_file_exec_paths): Likewise. * libtrivfs/file-exec.c (trivfs_S_file_exec_paths): New function.
2018-01-08Add a new exec_exec_paths RPCEmilio Pozuelo Monfort
* hurd/exec.defs (exec_exec): Label as deprecated. (exec_exec_paths): New RPC. * doc/hurd.texi: Update accordingly. * exec/hashexec.c (check_hashbang): Add file_name_exec argument. Don't guess the file name if file_name_exec is set. * exec/priv.h (check_hashbang): Add path argument. * exec/exec.c (S_exec_exec): Label as deprecated. (S_exec_exec_paths): New function. (do_exec): Add path and abspath arguments, pass path to check_hashbang.
2018-01-06libfshelp/get-identity.c: Simplify checking weak referencesSamuel Thibault
* libfshelp/get-identity.c (id_clean): Test whether i is still in the hash table instead of counting weak references.
2018-01-06libihash: Make sure we do not remove a locp several timesSamuel Thibault
Suggested by Brent W. Baccala. * libihash/ihash.c: Include <assert-backtrace.h>. (locp_remove): Assert that item->value is valid. * libihash/Makefile (HURDLIBS): Add shouldbeinlibc.
2018-01-06libfshelp/get-identity.c: Avoid spurious ihash removalSamuel Thibault
Reported by Brent W. Baccala. While some thread has converted a hardref to a weakref and tries to release the hash weakref, another thread might reacquire a hardref, and then convert it to a weakref and try to release it. We thus have to make sure that we really have the last weakref before removing from the hash. * libfshelp/get-identity.c (id_clean): Also check that there are only two weak refs left.
2018-01-06libfshelp/get-identity: Use 64bit hashing for inodesSamuel Thibault
Reported by Brent W. Baccala. hurd_ihash_key_t is 32bit only on 32bit platforms, so we need the same hashing functions as in libdiskfs/node-cache.c. * libfshelp/get-identity.c (mix_fasthash): New macro. (hash, compare): New functions. (idhash): Use HURD_IHASH_INITIALIZER_GKI instead of HURD_IHASH_INITIALIZER to pass hash and compare. (fshelp_get_identity): Pass address of fileno to hurd_ihash_find and hurd_ihash_add instead of fileno itself.
2018-01-05libfshelp/get-identity.c: add FIXMESamuel Thibault
* libfshelp/get-identity.c (fshelp_get_identity): Add FIXME for FS with inode numbers bigger than 4 billion.