summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-03acpi: Add new RPCsacpica-integrateDamien Zammit
2021-04-03acpi: Add acpi_init to server to initialize ACPIDamien Zammit
2021-04-03libacpica: Add acpi_initDamien Zammit
2021-04-03libacpica: Add config for GNUDamien Zammit
2021-04-03libacpica: Add makefileDamien Zammit
2021-03-30acpica: Import codebase from upstream ACPICADamien Zammit
Imported from https://github.com/acpica/acpica on commit 63db9761a6fac0c501eb1767c16b20cf74278e77 filtered using ./generate/linux/gen-repo.sh
2021-03-19machdev: Fix parent proc passthrough in fsys_initDamien Zammit
* 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>
2021-03-19fsys_init: Document that the proc port is for the task itselfSamuel Thibault
2021-03-16Makeconf: Add missing vpathSamuel Thibault
* Makeconf (vpath): Add $(libdir)/ for libpthread.%, libbz2.%, and libz.%.
2021-03-16Do not hardcode /libexec libexecdirSamuel Thibault
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.
2021-03-16machdev,rump,pci: Rework bootstrapDamien Zammit
* 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>
2021-03-13Document fsys_getpriv and fsys_init RPCsSamuel Thibault
2021-03-08pci-arbiter: Introduce machdev into this serverDamien Zammit
* pci-arbiter/Makefile Add machdev lib and simplify * pci-arbiter/main.c (pci_device_{open,close,shutdown}): New methods (netfs_server_func): Thread the demuxer loop (pcifs_startup): Custom startup method (main): Use machdev for server and detach worker threads * pci-arbiter/options.{c,h} Add disk-server-task and priv ports * pci-arbiter/startup-ops.c Delete file Message-Id: <20210308130457.693821-4-damien@zamaudio.com>
2021-03-08acpi, pci-arbiter: Fix get_direntsDamien Zammit
* acpi/netfs_impl.c (get_dirents): Fix computing number of elements to be returned. Simplify computing the data size. * pci-arbiter/netfs_impl.c (get_dirents): Likewise. (netfs_get_dirents): Fix passing max_data_len rather than max_entries a second time.
2021-03-07libmachdev: pass shutdown handle to shutdown methodDamien Zammit
* libmachdev/machdev-device_emul.h (struct machdev_device_emulation_ops): Add shutdown method. * libmachdev/ds_routines.c (machdev_device_shutdown): Take dosync_handle handle and pass it to shutdown method. * libmachdev/machdev.h (machdev_device_shutdown): Update prototype. * libmachdev/trivfs_server.c (S_startup_dosync): Pass shutdown handle to machdev_device_shutdown call. * rumpdisk/block-rump.c (rumpdisk_device_shutdown): Take dosync_handle parameter.
2021-03-07pci-arbiter: Accept not having an underlying node.Damien Zammit
* pci-arbiter/pcifs.c (underlying_stat): New variable. (init_file_system): When underlying_node is nul, use the underlying_stat content.
2021-03-07TypoDamien Zammit
* pci-arbiter/pci-ops.c: Fix typo in comment.
2021-03-02rumpdisk: Let server threads runDamien Zammit
* rumpdisk/main.c (main): Call pthread_exit(NULL) to let server threads continue.
2021-03-02libmachdev: Spawn a thread for server loop so main pathway can continueDamien Zammit
Message-Id: <20210302114137.592230-3-damien@zamaudio.com>
2021-02-02libnetfs: Fix mapping of time fallback to mach device 'time'Damien Zammit
* libnetfs/init-init.c (netfs_init): Also call maptime_map with use_mach_dev set to 1 so libnetfs can be used before the root filesystem. Message-Id: <20210202072945.53483-2-damien@zamaudio.com>
2021-01-23pfinet: fix a missed 'return' keyword.Guy-Fleury Iteriteka
* pfinet/ethernet.c(ethernet_close): Add 'return 0;' at the end of function. Message-Id: <20210123221255.11791-2-gfleury@disroot.org>
2021-01-23pfinet: fix missed include files.Guy-Fleury Iteriteka
* pfinet/glue-include/linux/socket.h: include '<string.h>' for 'memcpy' and '<stdlib.h>' for 'abort'. Message-Id: <20210123221255.11791-1-gfleury@disroot.org>
2020-12-29proc: Fix building with old glibcSamuel Thibault
* proc/wait.c (WNOWAIT): Define if not already defined.
2020-12-28proc: Fix WIFCONTINUEDSamuel Thibault
* proc/wait.c (S_proc_mark_cont): Set p_status to __W_CONTINUED.
2020-12-28proc: support waitid(WNOWAIT)Samuel Thibault
* proc/wait.c (S_proc_waitid): When options contains WNOWAIT, do not set p_waited or complete child death.
2020-12-28Bump interface versionSamuel Thibault
* hurd/version.h (HURD_INTERFACE_VERSION): Bump to 20201227.
2020-12-27Add proc_waitidSamuel Thibault
proc_wait assumes that the caller always wants WEXITED, but waitid() does not. The new proc_waitid RPC requires the caller to specify at least one of WEXITED, WSTOPPED, or WCONTINUED. * hurd/process.defs (proc_waitid): New RPC. * hurd/process_reply.defs (proc_waitid): New RPC. * hurd/process_request.defs (proc_waitid): New RPC. * proc/proc.h (struct proc): Add p_continued field. * proc/wait.c (WCONTINUED, WEXITED): Define if not already defined. (S_proc_wait): Rename implementation to S_proc_waitid, and modify to stop assuming WEXITED. Add support for WCONTINUED. (S_proc_wait): Reimplement by just calling S_proc_waitid with an additional WEXITED. (proc_mark_stop): Clear p_continued. (proc_mark_cont): Set p_continued, clear p_waited, wake any waiting parent.
2020-12-27proc: Also send SIGCHLD on child restartSamuel Thibault
* proc/wait.c (S_proc_mark_cont): When parent has not set nostopcld, send a SIGCHLD with CLD_CONTINUED.
2020-12-27proc: send signals with POSIX sigcodesJeremie Koenig
* proc/stubs.c (send_signal): Add a sigcode argument. * proc/proc.h (send_signal): Declare the sigcode argument. * proc/pgrp.c (leave_pgrp): Specify a null sigcode. * proc/wait.c (alert_parent): Use CLD_EXITED for SIGCHLD on exit. (S_proc_mark_stop): Use CLD_STOPPED for SIGCHLD on stop.
2020-12-01Drop spurious changeSamuel Thibault
2020-11-30hurd_types: Add const_string_t typeSamuel Thibault
This will allow to relieve constraints in callers, e.g. dir_lookup("") would otherwise produce a warning with gcc-11 since char[1024] would mean that dir_lookup would read all 1024 characters while it is not. * hurd/hurd_types.h (const_string_t): New type.
2020-11-27MAKEDEV: make /dev/cd* go through rumpdiskSamuel Thibault
* sutils/MAKEDEV.sh (cd*): Set MASTER to @/dev/disk:.
2020-11-27libdiskfs: do not reuse pathbufSamuel Thibault
When deadling with multiple levels of symlinks, we really need double buffering between the current path and the symlink target, and thus cannot reuse pathbuf. * libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Always use alloca for pathbuf.
2020-11-26rumpdisk: implement BLKRRPARTSamuel Thibault
This is used by parted to reload the partition table. Since we do not actually implement partition tables, we can just ignore it. * rumpdisk/block-rump.c (BLKRRPART): New macro. (rumpdisk_device_set_status): New function. (rump_block_emulation_ops): Set device_set_status field to rumpdisk_device_set_status.
2020-11-26storeio: Translate short reads to EIOSamuel Thibault
* storeio/dev.c (dev_buf_fill): When store returns less bytes than the block size, assume an EIO.
2020-11-23libps: support getting RPC names for WAIT outputSamuel Thibault
* libps/Makefile (SRCS): Add ../utils/msgids.c. (../utils/msgids-CPPFLAGS): Add DATADIR macro. * libps/spec.c: Include "../utils/msgids.h". (get_rpc_name): Implement with msgid_info. * utils/msgids.c (parse_opt): Move end code to ... (msgids_scan_std): ... new function. * utils/msgids.h (msgids_scan_std): New prototype. * utils/ps.c (main): Call msgids_scan_std.
2020-11-22libshouldbeinlibc: Fix printing truncated backtraceSamuel Thibault
* libshouldbeinlibc/assert-backtrace.c (__assert_fail_base_backtrace): If returned backtrace is smaller than skip we cannot print anything.
2020-11-22acpi: Fix table name truncationSamuel Thibault
* acpi/acpifs.c (create_dir_entry): Fix terminating entry->name string. diff --git a/eth-multiplexer/vdev.c b/eth-multiplexer/vdev.c index 367623d9..c76cfbfd 100644 --- a/eth-multiplexer/vdev.c +++ b/eth-multiplexer/vdev.c @@ -139,7 +139,8 @@ add_vdev (char *name, size_t size) vdev->dev_port = ports_get_right (vdev); ports_port_deref (vdev); - strncpy (vdev->name, name, IFNAMSIZ); + strncpy (vdev->name, name, IFNAMSIZ-1); + vdev->name[IFNAMSIZ-1] = '\0'; vdev->if_header_size = ETH_HLEN; vdev->if_mtu = ETH_MTU; vdev->if_header_format = HDR_ETHERNET;
2020-11-22eth-multiplexer: Fix interface name truncationSamuel Thibault
* eth-multiplexer/vdev.c (add_vdev): Fix terminating vdev->name string.
2020-11-22libfshelp-tests: Fix warningSamuel Thibault
* libfshelp-tests/test-fcntl.c (parse_args): Do not call error() with a NULL pointer.
2020-11-22libfshelp-tests: Fix warningSamuel Thibault
* libfshelp-tests/test-lockf.c (parse_args): Do not call error() with a NULL pointer.
2020-11-22test-lockf: Fix warningSamuel Thibault
* libfshelp-tests/test-lockf.c (main): Fix format for off_t.
2020-11-22libfshelp-tests: Fix warningSamuel Thibault
* libfshelp-tests/test-flock.c (parse_args): Do not call error() with a NULL pointer.
2020-11-22libfshelp-tests: Fix warningSamuel Thibault
* libfshelp-tests/race.c: Include <stdlib.h>
2020-11-22clookup: Fix warningSamuel Thibault
* sutils/clookup.c (file_name_lookup_carefully): Make head a non-const char *.
2020-11-22crash: Fix warningSamuel Thibault
* trans/crash.c (template_make_file_name): Fix format for time_t.
2020-11-22mach-defpager: Fix warningSamuel Thibault
* mach-defpager/default_pager.h (panic): Add noreturn function attribute.
2020-11-22pflocal: Fix warningSamuel Thibault
* pflocal/sock.c: Include <unistd.h>.
2020-11-22proc: Fix warningSamuel Thibault
* proc/stubs.c (send_signal): Add missing warning in union inside mach_msg_header_t.
2020-11-22libtrivfs: Remove unused empty functionSamuel Thibault
* libtrivfs/make-node.c (init_node): Remove unused empty function.