summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-09-14Protect exec from memory faultsSamuel Thibault
* exec/exec.c (load_section): Call i`hurd_safe_copyin' instead of `memcpy'. Handle error case. (check_gzip): Likewise. (check_bzip2): Likewise.
2010-09-14Fix compressed binaries executionSamuel Thibault
* exec/exec.c (check_gzip.zipread): Add `n' to `zipread_pos' to fix infinite loop. (check_bzip2.zipread): Likewise. (check_gzip): Set `file_data' and `file_size' fields after calling `finish' instead of before. (check_bzip2): Likewise.
2010-09-14Fix in-memory mappingSamuel Thibault
* exec/exec.c (map): When e->file_data is not NULL, return it plus `posn'. (prepare_in_memory): Call prepare_stream to clear stream positions.
2010-09-03Enable debugging in mutex_try_lock tooSamuel Thibault
* libthreads/cthreads.h (mutex_try_lock): Call WAIT_SET_DEBUG when spin_try_lock succeeds.
2010-09-03WAIT_DEBUG: permit to get function names instead of threadsSamuel Thibault
From the idea of Sergio Lopez. * libthreads/cthreads.h [WAIT_FUNC_DEBUG] (mutex): Replace struct cthread *holder field with const char *fname. (WAIT_CLEAR_DEBUG, WAIT_SET_DEBUG): New macros which clear and set fname or holder according to WAIT_FUNC_DEBUG and WAIT_DEBUG being defined. (mutex_init, mutex_unlock): Call WAIT_CLEAR_DEBUG in all cases instead of setting the `holder' field according to WAIT_DEBUG being defined (mutex_lock): Call WAIT_SET_DEBUG in all cases instead of setting the `holder' field according to WAIT_DEBUG being defined.
2010-08-31Document incoherency for storage of task_events_infoSamuel Thibault
It doesn't produce any bug ATM just because GNU Mach does not support it. * libps/ps.h (struct proc_stat): Document that task_events_info is currently actually fetched into proc_info.
2010-08-31Make proc not claim it was able to fetch PI_FETCH_TASKEVENTSSamuel Thibault
* proc/info.c (S_proc_getprocinfo): Clear PI_FETCH_TASKEVENTS from `flags' when task_info.
2010-08-27RegenerateSamuel Thibault
2010-08-27Revert "Fix tmpfs assertion"Samuel Thibault
As discussed up to http://lists.gnu.org/archive/html/bug-hurd/2010-06/msg00021.html this reverts commit 97c5690abeaa88767acf2ffbb55552e8278052c8 and removes the corresponding assertion. This is related to commit 2f7f90ce15cce79ef83a8d273e3a27b5b527c7d7 which changes how much st_size is increased. * tmpfs/tmpfs.h (tmpfs_dirent): Remove `padding' field. * tmpfs/dir.c (diskfs_get_directs): Remove assertion on the position of the `name' field of struct tmpfs_dirent compared to the position of the `d_name' field of struct dirent.
2010-08-27Fix malloc size in tmpfsCarl Fredrik Hammar
* tmpfs/dir.c (diskfs_direnter_hard): Fix malloc size.
2010-08-27Fix a gcc warning.Da Zheng
* utils/rpctrace.c (print_contents): Put the if statement in braces.
2010-08-27Fix comment on when Mach would try to clear tmpfs dataSamuel Thibault
* tmpfs/node.c (diskfs_get_filemap): Fix comment according to second patch from Sergio Lopez.
2010-08-27Keep a reference on objects to preserve their content.Samuel Thibault
Modify tmpfs to keep a reference (by mapping it into its own space) to each memory object created by the user, so they don't get inmediately terminated at the end of the current operation. * tmpfs/tmpfs.h (struct disknode): Add `memref' field. * tmpfs/node.c (diskfs_get_filemap): vm_map() the first page of the newly-allocated object, store in `memref' field. (diskfs_free_node) vm_deallocate the page pointed by `memref' field.
2010-08-27Fix default_pager default_pager_object_set_size parametersSamuel Thibault
As suggested by Sergio Lopez. * serverboot/default_pager.c (S_default_pager_object_set_size): Exchange `seqno' and `reply_to' parameters.
2010-08-27make unblocked reads from external objects return a zeroed page.Sergio Lopez
* serverboot/default_pager.c (struct dstruct): Add boolean_t external field. (default_pager_add): Set ds->external to TRUE or FALSE depending whether the object is external. (default_read): Add external parameter. If no_block(block) returns 1, if external is TRUE, zero fill the page and return PAGER_SUCCESS instead of PAGER_ABSENT. (seqnos_memory_object_data_request): Pass ds->external as additional parameter to default_read.
2010-08-27Fix missing mutex unlock.Sergio Lopez
* serverboot/default_pager.c (pager_read_offset): Properly unlock the mutex before returning NO_BLOCK.
2010-08-26libps (proc_stat_set_flags): Fix pointer signedness warningJeremie Koenig
* libps/procstat.c (proc_stat_set_flags): Cast &ps->umask into (int*) before calling ps_msg_get_init_int.
2010-08-26Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2010-08-26libps (fetch_procinfo): Fix non-set flag PSTAT_TASK_EVENTSJeremie Koenig
The fetch_procinfo function failed to set the PSTAT_TASK_EVENTS when those has been retreived. It should be noted that GNU Mach does not support the TASK_EVENTS_INFO flavor, so this is of minor importance. The new code also checks that all the requested proc server flags related to a given proc_stat flags have been returned before setting the proc_stat flag in question. * libps/procstat.c (fetch_procinfo): Add map array containing `ps_flags_t' and `procinfo' flags. Use it in a loop to check for flags in `need' and `have' and set them in `pi_flags'. Likewise to check for flags in `pi_flags' and set them in `have'.
2010-08-26libps (_proc_stat_free): Fix memory leakJeremie Koenig
The thread_waits field was never freed; this change adds the code to do so if the corresponding flag is set. Users are also warned of the consequences, namely, that they should not free process proc_stats before all their associated thread ones are gone, since the latter may reference the former's thread_waits field. However, with the normal interface (ie. ps_context_free), all proc_stats are freed at once, so this is not an issue. * libps/procstat.c (_proc_stat_free): Free ps->thread_waits if PSTAT_THREAD_WAITS flag is set. * libps/ps.h (_proc_stat_free): Document that thread proc_stats must be freed before process proc_stat can be.
2010-08-26libps: Fix deadly typoJeremie Koenig
PSTAT_PROCINFO is a set of flags, some of which can be obtained in alternative ways. In this case, _proc_stat_free will try to deallocate an uninitialised field. PSTAT_PROC_INFO is the flag we want. * libps/procstat.c (_proc_stat_free): Use PSTAT_PROC_INFO instead of PSTAT_PROCINFO.
2010-08-18Fix the build system to handle part storesJeremie Koenig
Part stores are used for debian-installer, and they're considered more elegant than kernel partition devices. This patch makes sure they're included in the build unless the user disables them explicitely. * Makeconf: add $(PARTED_LIBS) to static binaries which use libstore_part.a. * configure.in: look for libparted again (see also 7c7a04eb). * libstore/Makefile (store-types): include the 'part' store type when appropriate, remove the previous attempt. Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
2010-08-02Partially revert 8451b436 to fix halt/rebootSamuel Thibault
init/init.c (S_msg_sig_post_untraced): Ignore result of msg_sig_post_untraced_reply. (S_msg_sig_post): Likewise.
2010-08-01pfinet: check return value of mmap() in S_io_read() and S_socket_recv()Olaf Buddenhagen
* pfinet/io-ops.c (S_io_read): Check return value. * pfinet/socket-ops.c (S_socket_recv): Likewise.
2010-08-01Fix "make dist" in `sutils'.Ludovic Courtès
* sutils/Makefile (SRCS): Add `clookup.c', `fstab.c', and `update.c'.
2010-08-01Fix "make dist" in `libthreads'.Ludovic Courtès
* libthreads/Makefile (lndist, lndist-map-file): New targets. Link `libthreads.map' to the distribution directory.
2010-08-01Fix "make dist" in `libcons'.Ludovic Courtès
* libcons/Makefile (LCLHDRS): Add `$(installhdrs)'.
2010-08-01Fix "make dist" in `include'.Ludovic Courtès
* include/Makefile (lndist): New target. Copy `Makefile' and `$(installhdrs)' to the distribution directory.
2010-08-01Fix "make dist" in `exec'.Ludovic Courtès
* exec/Makefile (SRCS): Refer to `$(gzip-sources)' and `$(bzip2-sources)' instead of listing files individually. (gzip-sources, bzip2-sources): New variable. (gzip-objects, bzip2-objects): Derive from the above variables.
2010-08-01Fix "make dist" in `daemons'.Ludovic Courtès
* daemons/Makefile (SRCS): Add `runsystem.sh'.
2010-08-01Fix "make dist" in `console-client'.Ludovic Courtès
This patch updates the list of headers to be included in the distribution, and makes it so that `kdioctlServer.c' isn't built and distributed by "make dist". * console-client/Makefile (PC_KBD_SO_SRCS): Remove `kdioctlServer.c'. (LCLHDRS): Remove `vga.h', add `vga-support.h' and `trans.h'. (OBJS): Add `kdioctlServer.o'. (pc_kbd.so.$(hurd-version)): Add dependency on `kdioctlServer_pic.o'.
2010-08-01Fix copyrightsSamuel Thibault
2010-08-01Add wide character support to the Hurd consoleJeremie Koenig
* hurd/console.h (CONS_WCHAR_MASK, CONS_WCHAR_CONTINUED): New macros. * console/console.c: Include <locale.h> (main): Call setlocale. * console/display.c (display_output_one): Call wcwidth() to know the width of the character to be displayed. Iterate over this with to insert characters with the additional CONS_WCHAR_CONTINUED flag. Update screen_shift_right and display_record_filechange calls accordingly. * console-client/vga-dynafont.c (WCHAR_BOLD, WCHAR_ITALIC, WCHAR_MASK): Change macro values. (dynafont_new): Use glyph->bbox.{width,height} instead of df->font->bbox.{width,height}. (dynafont_change_font): Likewise. (dynafont_lookup_internal): Likewise. Mask out CONS_WCHAR_CONTINUED before calling bdf_find_glyph, but test it for the second position of a double-width glyph. (dynafont_activate): Enable 9-bit width only when font width is not dividable by 8.
2010-08-01Simplify error exit pathSamuel Thibault
* libpager/data-request.c (_pager_seqnos_memory_object_data_request): Use allow_release_out label instead of re-doing unlocks by hand.
2010-08-01Fix swap on large devicesJeremie Koenig
DEV_GET_SIZE values overflow with large devices, rather use DEV_GET_RECORDS. * mach-defpager/setup.c (S_default_pager_paging_storage): Use DEV_GET_RECORDS instead of DEV_GET_SIZE.
2010-08-01Implement file_replarent in libtrivfsJeremie Koenig
* libtrivfs/file-reparent.c (trivfs_S_file_reparent): Call trivfs_S_io_duplicate.
2010-08-01Fix libdiskfs bootstrap race conditionJeremie Koenig
exec_exec() probably triggers a call to file_exec(), so the exec server port needs to be cached earlier. * libdiskfs/boot-start.c: Move caching the exec server port to just after initializing it.
2010-07-27Fix -g/-m console vga driver optionsSamuel Thibault
* console-client/vga.c (parse_opt): Reverse -g and -m option effect to match documentation.
2010-07-17Implement getsockopt (fd, SOL_SOCKET, SO_TYPE)Emilio Pozuelo Monfort
* pflocal/socket.c (S_socket_getopt): Add SO_TYPE support. (S_socket_setopt): Fix return value.
2010-06-30Revert "Call device_close on store closure"Samuel Thibault
This reverts commit 1bb5a381a2e2f345beb1ca8d019b6174b13bb125. storeio can actually pass the device port to other processes, through file_get_storage_info for instance, these may then want to use it, even after storeio has closed its port.
2010-06-28Fix memory leak on receive errorSamuel Thibault
* pfinet/io-ops.c (S_io_read): On error, free data array if it was allocated.
2010-06-28Fix memory leak on schedule_timeoutSamuel Thibault
* pfinet/glue-include/linux/sched.h (schedule_timeout): Make the automatically-allocated wait_queue pointer static instead of dynamic (and lost).
2010-06-25Call device_close on store closureSamuel Thibault
* libstore/device.c (dclose): Call device_close before deallocating the device port.
2010-06-23Ignore the "defaults" mount optionJeremie Koenig
* utils/mount.c (do_mount): Ignore the "defaults" option.
2010-06-18Build part only when parted support is enabledSamuel Thibault
* libstore/Makefile (store-types): Remove part. [HAVE_PARTED] (store-types): Add part. [HAVE_PARTED] (libstore.so-LDLIBS): Add -lparted.
2010-06-18Fix parted supportSamuel Thibault
* libstore/Makefile (store-types): Add part. * libstore/part.c: Do not include <parted/device_gnu.h> (PED_SECTOR_SIZE): Define to PED_SECTOR_SIZE_DEFAULT if undefined. (store_part_create): Do not check value returned by ped_disk_destroy.
2010-05-26Fix --version in scriptsCarl Fredrik Hammar
* Makeconf (%): Don't depend on removed files. Remove excess backslashes.
2010-03-21Fix allowing termination on some error pathSamuel Thibault
* libpager/data-request.c (_pager_seqnos_memory_object_data_request): when _pager_pagemap_resize returns an error, instead of goto release_out, goto new label allow_release_out thats calls _pager_allow_termination before proceeding with release_out.
2010-02-07Fix ext2fs mount with sparse storeSamuel Thibault
2010-02-06 Carl Fredrik Hammar <hammy.lite@gmail.com> * ext2fs/storeinfo.c (diskfs_S_file_get_storage_info): Return EOPNOTSUPP instead of store if file contains holes.
2010-02-07Fix ps segfault when given empty format stringSamuel Thibault
2010-02-02 Carl Fredrik Hammar <hammy.lite@gmail.com> * utils/ps.c (main): Move format parsing to parse_opt() and pass state to parse_enum().