summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-05Fix space styleSamuel Thibault
2015-02-17libports: avoid acquiring global lock in message dispatchJustus Winter
* libports/interrupt-operation.c (ports_S_interrupt_operation): Update `cancel_threshold' using atomic operations. * libports/manage-multithread.c (internal_demuxer): Avoid taking the lock. * libports/ports.h (struct port_info): Mention that one needs atomic operations to access `cancel_threshold'.
2015-02-14TODO: drop obsolete itemJustus Winter
* TODO (libpager): Drop item trying to prevent thread storms. We dealt with that in a much nicer way. Nowadays we use a fixed number of threads in libpager.
2015-02-08startup: add more error handlingJustus Winter
* startup/startup.c (launch_core_servers): Add more error handling.
2015-02-02Explicit the keymap compatibility flagsSamuel Thibault
Since "default" is not provided any more by xkb * console-client/xkb/xkb-data/keymap/hurd: Replace "default" xkb_compatibility by "basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)" for all keymaps.
2015-02-02Allow dhcp trafic and configurationSamuel Thibault
2007-10-14 Christian Dietrich <stettberger@dokucode.de> * options.c (options): Marked -a, -g -m, -p, -A, -G OPTION_ARG_OPTIONAL. (parse_interface_copy_device): New function. (parse_opt): When selecting another interface with -i set the options from e.g. a prior fsysopts call as default values. For -a, -g, -p, -g, -A, -G set the optional argument as value. When there is no argument, delete the value (e.g. unset default gateway). Delete delete default gateways only if the set gateway is on an interface modified in this call. Add always an route for dhcp packages on all devices. By doing this we can send dhcp renew packages. (trivfs_append_args): Add --gateway only once. 2007-10-14 Marco Gerards <metgerards@student.han.nl> * options.c (parse_opt): Add the route for `0.0.0.0' so broadcasting works. * linux-src/net/ipv4/devinet.c (inet_insert_ifa) [_HURD_]: Don't fail when the address is `0.0.0.0'.
2015-02-02Remove unimplemented -s optionSamuel Thibault
* pfinet/options.c (options): Remove 's' case.
2015-01-20utils/rpctrace: fix notification port handlingJustus Winter
* utils/rpctrace.c (new_receiver_info): Fix handling of old notification port.
2015-01-20console: fix error and notification port handlingJustus Winter
This fixes a deallocation of an invalid port notably seen on system shutdown. * console/display.c (free_modreqs): Handle errors of `mach_port_request_notification' and check whether the old notification port was valid. (do_mach_notify_msg_accepted): Likewise. (display_notice_filechange): Likewise.
2015-01-17proc: call `startup_essential_task' earlierJustus Winter
Previously, the proc server did not call `startup_essential_task' until it got the message port of the startup server using `proc_setmsgport'. Now that we have `/servers/startup', we can do this in main, before we start our message service loop. A complication arises because the traditional startup server is single-threaded. Handle this by tweaking startup not to bind itself to `/servers/startup' before it is ready. * proc/main.c (main): Try to lookup `/servers/startup' and send the message here, or... * proc/msg.c (S_proc_setmsgport): ... fall back to the old way here. * proc/proc.h (startup_fallback): New variable. * startup/startup.c (main): Move code installing ourself on `/servers/startup' (install_as_translator): ... here. (launch_core_servers): And use it here, just before we reply to `/hurd/auth'.
2015-01-17auth: remove implicit assumption about the bootstrap processJustus Winter
The current code assumes that it can speak the startup protocol over its bootstrap port. * auth/auth.c (main): Generalize by trying to use `/servers/startup' before falling back to the bootstrap port.
2015-01-17auth: simplify expressionJustus Winter
* auth/auth.c (S_auth_{user,server}_authenticate): Simplify expression.
2015-01-17startup: give the tasks we create a nameJustus Winter
* startup/startup.c (run): Name the tasks we start.
2015-01-17libports: silence pointless error messageJustus Winter
* libports/manage-multithread.c (adjust_priority): Silence pointless error message.
2015-01-17libdiskfs: fix port leakJustus Winter
* libdiskfs/boot-start.c (get_console): Deallocate `device_master'.
2015-01-17libfshelp: improve error handlingJustus Winter
* libfshelp/start-translator-long.c (fshelp_start_translator_long): Once we have a task, go to `lose_task' so that we do not leave hosed tasks around.
2015-01-04random: fix typoJustus Winter
* random/gnupg-random.c (read_pool): Fix typo in comment.
2015-01-03Backport Linux changes for proper TCP EOF handlingSamuel Thibault
Notably when remote eagerly sends a RST: we want to return EOF to the application, not EPIPE. * pfinet/linux-src/net/ipv4/tcp_output.c (tcp_connect): Set sk->done to 0. * pfinet/linux-src/net/ipv4/tcp_input.c (tcp_fin): Set RCV_SHUTDOWN, and sk->done to 1. * pfinet/linux-src/net/ipv4/tcp.c (tcp_recv_urg): Only return ENOTCONN when we never actually connect. Always return 0 when reception is closed. (tcp_recvmsg): When any data is available, ignore errors and EOF. When no data is available, first check for reception being closed, then for errors.
2015-01-03procfs: Fix typos in comments (found by codespell)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-01-03libshouldbeinlibc: Fix typo in local variable nameStefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-01-03misc: Fix typos in comments (found by codespell)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-01-03console: Fix typos in commentsStefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-01-03console-client: Fix typos in commentsStefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-01-03aclocal.m4, configure.ac: Fix typos and grammar in comment (found by codespell)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-01-03lib*: Fix typos in comments (found by codespell)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2014-12-26Revert "Make sure to free content dir in procfs"Samuel Thibault
This reverts commit 5fe615a4d66f4dea48812ed9e4f250010a8f9298.
2014-12-26Make sure to free content dir in procfsLancelot SIX
In procfs/netfs.c:netfs_get_dirents, make sure to free the memory allocated with the "get_contents" callback of nodes.
2014-12-19Avoid ./ components in mtab outputSamuel Thibault
* libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Match "." path as being the root directory. * libnetfs/dir-lookup.c (netfs_S_dir_lookup): Likewise.
2014-12-12hurd: make the protected payload changes less intrusiveJustus Winter
The changes to `hurd_types.defs' caused the glibc build to fail. Guard the problematic parts with `HURD_SERVER' similar how it is done in GNU Mach. * Makeconf: Define `HURD_SERVER' when preprocessing the RPC definitions for the server side. * hurd/hurd_types.defs: Guard problematic parts with `HURD_SERVER'.
2014-12-11Fix inclusion loop between hurd_types.defs and hurd/signal.h>Samuel Thibault
* boot/Makefile (MIGSFLAGS): Add -DHURD_DEFAULT_PAYLOAD_TO_PORT=1. * mach-defpager/Makefile (MIGSFLAGS): Likewise. * hurd/hurd_types.defs: Do not include <hurd/ports.h>.
2014-12-10Replace `bcopy' with `memcpy' or `memmove' as appropriateJustus Winter
* ext2fs/inode.c: Replace `bcopy' with `memcpy' or `memmove' as appropriate. * ext2fs/pager.c: Likewise. * isofs/lookup.c: Likewise. * isofs/main.c: Likewise. * isofs/rr.c: Likewise. * libdiskfs/file-get-trans.c: Likewise. * libiohelp/return-buffer.c: Likewise. * libpager/pagemap.c: Likewise. * libpipe/pq.c: Likewise. * libpipe/pq.h: Likewise. * libstore/unzipstore.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/ethernet.c: Likewise. * pfinet/tunnel.c: Likewise. * storeio/dev.c: Likewise.
2014-12-10Replace `bzero' with `memset'Justus Winter
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.
2014-12-10ext2fs: tune the size of the inode cacheJustus Winter
The node cache uses a fixed number of buckets giving it a linear access complexity, although with a small constant factor. Paper over this issue by increasing the number of buckets. * ext2fs/inode.c (INOHSZ): Increase from 512 to 8192 entries.
2014-12-10libpager: use libports notification functionsJustus Winter
Now that we do not use sequence numbers anymore, we can simply use libports notification server functions. * libpager/Makefile (SRCS): Drop `no-senders.c', and `notify-stubs.c'. (OBJS): Drop `notifyServer.o'. * libpager/demuxer.c (pager_demuxer): Use libports server functions. * libpager/mig-mutate.h: Drop all notification mutators. * libpager/no-senders.c: Remove file. * libpager/notify-stubs.c: Likewise.
2014-12-10libpager: remove the `seqno' parametersJustus Winter
* libpager/Makefile (MIGSFLAGS): Drop `-DSEQNOS'. * libpager/priv.h (struct pager): Drop fields `seqno' and `waitingforseqno'. * libpager/chg-compl.c: Adopt accordingly. * libpager/data-request.c: Likewise. * libpager/data-return.c: Likewise. * libpager/data-unlock.c: Likewise. * libpager/demuxer.c: Likewise. * libpager/lock-completed.c: Likewise. * libpager/no-senders.c: Likewise. * libpager/notify-stubs.c: Likewise. * libpager/object-init.c: Likewise. * libpager/object-terminate.c: Likewise. * libpager/pager-create.c: Likewise. * libpager/stubs.c: Likewise.
2014-12-10hurd: add `proc_make_task_namespace'Justus Winter
Add a new RPC to the process protocol to create task namespaces. These can be used by an unprivileged process to claims the responsibility to manage all tasks in this namespace. Any task created in this namespace will automatically be declared a child of the root process, and a `mach_notify_new_task' message is sent to a given port. If the root process dies, the proc server will terminate all tasks in the namespace. * hurd/process.defs (proc_make_task_namespace): New RPC.
2014-12-10proc: implement `proc_make_task_namespace'Justus Winter
* proc/proc.h (struct proc): Add field `p_task_namespace'. * proc/mgt.c (S_proc_child): Propagate `p_task_namespace' to child. (allocate_proc): Initialize `p_task_namespace'. (namespace_terminate): New function. (process_has_exited): Reparent children of dead tasks in the namespace to the root process. Terminate all tasks if the root process dies. Reap dead tasks. (S_mach_notify_new_task): For newly created tasks thats parent is in a namespace, call S_proc_child and forward the `mach_notify_new_task' message. (S_proc_make_task_namespace): New function.
2014-12-10proc: register for new task notificationsJustus Winter
* proc/Makefile (MIGSTUBS): Add `gnumachServer.o'. * proc/main.c (message_demuxer): Handle the `task_notify' protocol. (main): Register for new task notificatinos. * proc/mgt.c (S_mach_notify_new_task): Add server function.
2014-12-10Makeconf: handle the task_notify protocolJustus Winter
* Makeconf (mach_defs_names): Add `task_notify'.
2014-12-10fakeroot: Fix initializing default faked field of nodesSamuel Thibault
* trans/fakeroot.c (new_node): Initialize faked field to FAKE_DEFAULT.
2014-12-09include: don't install nonexistent refcount.hDavid Michael
* include/Makefile (installhdrs): Remove refcount.h.
2014-12-09Fix mode of nodes created with mkfileSamuel Thibault
Their faked field was not initialized. Thanks a lot to Svante Signell for the investigation * trans/fakeroot.c (new_node): Initialize faked field of nn to 0. (netfs_attempt_mkfile): Call set_default_attributes on newly-allocated node, and if the real mode is not the same as the requested mode, fake the mode.
2014-12-07hurd: add intranpayload functions to all hurd typesJustus Winter
For each hurd type defined in hurd_types.h, add a intranpayload function. If an X_INTRAN mutation is defined for a type, a corresponding X_INTRAN_PAYLOAD has to be defined. If no X_INTRAN mutation is defined, use ports_payload_get_name as intranpayload function, turning the payload back into an port name. * hurd/hurd_types.defs: Add intranpayload functions. * hurd/term.defs: Likewise. * hurd/default_pager.defs: Include `hurd_types.defs' for `MACH_PAYLOAD_TO_PORT'.
2014-12-07utils/rpctrace: make `trace_and_forward' payload-awareJustus Winter
As the protected payloads were retrofitted into the Mach message format, the local port type is lost. * utils/rpctrace.c (is_notification): New function (trace_and_forward): Recover the original local port type.
2014-12-07trans/symlink: disable default payload to port mappingJustus Winter
`fsysServer' is only used by the symlink translator which does not use libports. Therefor, it is not necessary to use the default payload to port translation function. * trans/Makefile (fsys-MIGSFLAGS): Disable the default payload to port translation function.
2014-12-07trans/streamio: make the translator payload-awareJustus Winter
* trans/Makefile (device_reply-MIGSFLAGS): Define MACH_PAYLOAD_TO_PORT.
2014-12-07trans/password: add a payload-aware intrans functionJustus Winter
* trans/Makefile (password-MIGSFLAGS): Add mutator.
2014-12-07trans/ifsock: add a payload-aware intrans functionJustus Winter
* trans/Makefile (ifsock-MIGSFLAGS): Add mutator.
2014-12-07trans/fakeroot: make the demuxer payload-awareJustus Winter
* trans/fakeroot.c (netfs_demuxer): Make the demuxer payload-aware.
2014-12-07term: add a payload-aware intrans functionJustus Winter
* term/mig-mutate.h: Add mutator.