Age | Commit message (Collapse) | Author |
|
* libdiskfs/peropen-make.c (diskfs_make_peropen): Move `strdup` before port
reference modifications, to fix abortion.
* libnetfs/make-peropen.c (netfs_make_peropen): Check for `malloc` failure.
Move `strdup` before port reference modifications, to fix abortion.
|
|
* libps/write.c (noise_write): Make `t` parameter a char * instead of
unsigned char *.
|
|
* libtrivfs/io-restrict-auth.c (listmember): Use uid_t type instead of int.
(trivfs_S_io_restrict_auth): Make `i` variable an unsigned int, like the `num`
field it is compared with
|
|
* hurd/fsys_reply.defs: Add _reply suffix.
|
|
* hurd/process_reply.defs: Add _reply suffix.
|
|
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.
|
|
runsystem.sh checks whether /servers/socket/1 exists and creates it
using settrans -c if it does not. But at this point in the boot the
root filesystem is normally not writable. This patch fixes this.
* daemons/runsystem.sh: Make sure / is writable before attempting to
set up pflocal.
|
|
The VGA card might have a bogus cursor end value, so better always write a
value in there.
* console-client/vga-dynafont.c (dynafont_set_cursor): Always pass height -
1 as end parameter for vga_set_cursor_size.
|
|
It has been unused/untested/unmaintained for a decade now, and its
4-clause BSD licence poses problem.
* configure.ac (default_static): Remove ufs.
* Makefile (prog-subdirs): Remove ufs, ufs-fsck and ufs-utils.
* NEWS, TODO: doc/hurd.texi, doc/navigating: Remove UFS notes.
* ufs: Remove directory
* ufs-fsck: Remove directory
* ufs-utils: Remove directory
* bsdfsck: Remove directory
|
|
* utils/Makefile (SRCS): Add match-options.c
|
|
* trans/Makefile (OBJS): Remove fsysUser.o.
|
|
* libfshelp/translator-list.c: Include <libgen.h> to get `dirname' prototype.
|
|
This is a revised version of the large store patch for ext2fs, written
by Ognyan Kulev. It provides support for stores larger than 2 GiB.
* ext2fs/balloc.c: Use the new disk_cache_block_ref and disk_cache_block_deref
functions to access blocks from the disk cache.
* ext2fs/ext2fs.c (main): Update initialization call to pokel_init, and
call map_hypermetadata instead of get_hypermetadata.
* ext2fs/ext2fs.h: Include <hurd/store.h> and <hurd/ihash.h>.
(DISK_CACHE_BLOCKS): New macro.
(DC_INCORE): Likewise.
(DC_UNTOUCHED): Likewise.
(DC_FIXED): Likewise.
(DC_DONT_REUSE): Likewise.
(DC_NO_BLOCK): Likewise.
(DISK_CACHE_LAST_READ_XOR) [!NDEBUG]: Likewise.
(struct disk_cache_info): New structure.
(disk_cache): New external variable.
(disk_cache_size): Likewise.
(disk_cache_blocks): Likewise.
(disk_cache_bptr): Likewise.
(disk_cache_info): Likewise.
(disk_cache_lock): Likewise.
(disk_cache_reassociation): Likewise.
(disk_cache_block_ref): New declaration.
(disk_cache_block_ref_ptr): Likewise.
(disk_cache_block_deref): Likewise.
(disk_cache_block_is_ref): Likewise.
(map_hypermetadata): Likewise.
(trunc_block): Cast to off_t.
(round_block): Likewise.
(boffs): Likewise.
(bptr_index): New macro.
(boffs_ptr): Rewrite as an inline function to make it look up a block from
the disk cache.
(bptr_offs): Likewise.
(dino): Remove function, replaced with ...
(dino_ref): ... this one, which adds a reference to the inode block.
(dino_deref): New inline function.
(record_global_poke): Make sure block is referenced.
(record_indir_poke): Likewise.
(sync_global_ptr): Remove block reference, and adjust call to
pager_sync_some.
(sync_global): Add debug call to print wait parameter.
* ext2fs/getblk.c: Use the new disk_cache_block_ref and disk_cache_block_deref
functions to access blocks from the disk cache.
* ext2fs/hyper.c (get_hypermetadata): Read the superblock from the store
now that it's not directly mapped in memory. Move the initialization of
zeroblock here from ...
(map_hypermetadata): ... here. Also, set the superblock pointer.
(diskfs_set_hypermetadata): Add a reference to the superblock.
(diskfs_readonly_changed): Update call to mprotect.
* ext2fs/ialloc.c: Use the new disk_cache_block_ref, disk_cache_block_ref_ptr
and disk_cache_block_deref functions to access blocks from the disk cache.
* ext2fs/inode.c: Update calls that used the disk image to use the disk cache,
and use the new reference handling functions where appropriate.
* ext2fs/pager.c: Include <unistd.h> and "../libpager/priv.h".
(disk_image): Remove global variable.
(disk_pager_read_page): Update cache information.
(disk_pager_write_page): Likewise.
(disk_pager_notify_evict): New function.
(pager_notify_evict): Call disk_pager_notify_evict appropriately.
(disk_cache): New global variable.
(disk_cache_size): Likewise.
(disk_cache_blocks): Likewise.
(disk_cache_bptr): Likewise.
(disk_cache_info): Likewise.
(disk_cache_hint): Likewise.
(disk_cache_lock): Likewise.
(disk_cache_reassociation): Likewise.
(disk_cache_init): New function.
(disk_cache_return_unused): Likewise.
(disk_cache_block_ref): Likewise.
(disk_cache_block_ref_ptr): Likewise.
(disk_cache_block_deref): Likewise.
(disk_cache_block_is_ref): Likewise.
(create_disk_pager): Update initialization of the disk pager.
* ext2fs/pokel.c (pokel_add): Drop block references with disk_cache_block_deref.
(_pokel_exec): Likewise.
* ext2fs/truncate.c (trunc_indirect): Use the new disk_cache_block_ref and
disk_cache_block_deref functions to access blocks from the disk cache.
|
|
If requested by the user, make libpager call pager_notify_evict when a page
is flushed out by the kernel. Based on work by Ognyan Kulev.
* console/pager.c (pager_notify_evict): New function.
(user_pager_create): Update call to pager_create.
* ext2fs/pager.c: (pager_notify_evict): New function.
(create_disk_pager): Update call to diskfs_start_disk_pager.
(diskfs_get_filemap): Update call to pager_create.
* fatfs/pager.c: (pager_notify_evict): New function.
(create_fat_pager): Update call to diskfs_start_disk_pager.
(diskfs_get_filemap): Update call to pager_create.
* isofs/pager.c: (pager_notify_evict): New function.
(create_disk_pager): Update call to diskfs_start_disk_pager.
(diskfs_get_filemap): Update call to pager_create.
* libdiskfs/disk-pager.c (diskfs_start_disk_pager): Update definition and call
to pager_create.
* libdiskfs/diskfs-pager.h (diskfs_start_disk_pager): Update declaration.
* libpager/data-request.c (_pager_seqnos_memory_object_data_request): Take
pager's `notify_on_evict' member into account when calling
memory_object_data_supply.
* libpager/data-return.c (_pager_do_write_request): Handle user notification
on page flush.
* libpager/pager-create.c (pager_create): Update definition and set pager's
`notify_on_evict' member.
* libpager/pager.h (pager_create): Update declaration.
(pager_notify_evict): New declaration.
* libpager/priv.h (struct pager): New `notify_on_evict' member.
* storeio/pager.c: (pager_notify_evict): New function.
(dev_get_memory_object): Update call to pager_create.
* tmpfs/pager-stubs.c (pager_notify_evict): New function.
* ufs/pager.c (pager_notify_evict): New function.
(create_disk_pager): Update call to diskfs_start_disk_pager.
(diskfs_get_filemap): Update call to pager_create.
|
|
Remove support for transparently ungziping executables from the exec
server. The code in question makes the exec server unnecessarily
complex and since the exec server is an essential process, crashing it
makes /hurd/init crash the whole system.
Since the gzip code is not thread-safe, all access to it is
serialized, so there is a trivial way for one user to delay another
users gzipped executables for some unspecified time.
This can be accomplished by padding any program with easily compressed
data, zipping it and executing it. Using such a program as an passive
translator and then triggering its execution by the filesystem
translator also stalls any requests to that filesystem (observed using
the libdiskfs-based ext2fs).
Since compressed executables cannot be mapped into the memory, they
have to be uncompressed into allocated memory first. This is slower
and any user with access to the exec server can make it allocate
arbitrary amounts of memory. If the Hurd had proper memory accounting,
this would probably be a way around it.
So the compression support in exec seemingly creates various issues
for little value, at least with the abundance of nonvolatile memory
available today.
* exec/Makefile: Remove gzip related files.
* exec/exec.c: Remove anything #ifdef GZIPped.
* exec/unzip.c: Move to libstore.
* exec/crypt.h: Likewise.
* exec/gzip.h: Likewise.
* exec/inflate.c: Likewise.
* exec/tailor.h: Likewise.
* exec/util.c: Likewise.
* libstore/Makefile: Remove the vpath magic for looking up the zip
stuff.
|
|
Remove support for transparently unbzip2ing executables from the exec
server. The code in question makes the exec server unnecessarily
complex and since the exec server is an essential process, crashing it
makes /hurd/init crash the whole system.
Since the bzip2 code is not thread-safe, all access to it is
serialized, so there is a trivial way for one user to delay another
users bzip2ed executables for some unspecified time.
This can be accomplished by padding any program with easily compressed
data, zipping it and executing it. Using such a program as an passive
translator and then triggering its execution by the filesystem
translator also stalls any requests to that filesystem (observed using
the libdiskfs-based ext2fs).
Since compressed executables cannot be mapped into the memory, they
have to be uncompressed into allocated memory first. This is slower
and any user with access to the exec server can make it allocate
arbitrary amounts of memory. If the Hurd had proper memory accounting,
this would probably be a way around it.
So the compression support in exec seemingly creates various issues
for little value, at least with the abundance of nonvolatile memory
available today.
* exec/Makefile: Remove bzip2 related files.
* exec/exec.c: Remove anything #ifdef BZIP2ed.
* exec/do-bunzip2.c: Move to libstore.
|
|
The mtab translator provides an mtab file that is dynamically created
on demand. It is populated with information about active translators
bound below the given path that is accumulated by traversing the
translator tree. It can also be invoked as normal program that prints
the requested information to stdout.
* trans/mtab.c: New file.
* trans/Makefile: Build mtab.
|
|
Return information about the source of the receiving filesystem.
If the concept of a source is applicable, SOURCE should refer to
the source of the receiving translator and should be a description
considered appropriate in the context of the translator. For
example for the case of block device based filesystems, SOURCE
should be the file name of the underlying block device.
* hurd/fsys.defs: Add fsys_get_source.
* hurd/fsys_reply.defs: Add fsys_get_source.
|
|
Create a server function returning EOPNOTSUPP.
* trans/symlink.c (S_fsys_get_source): New function.
|
|
* libtrivfs/Makefile: Add fsys-get-source.c and get-source.c
* libtrivfs/trivfs.h: Add trivfs_get_source.
* libtrivfs/fsys-get-source.c: New file.
* libtrivfs/get-source.c: Likewise.
|
|
Add a user overridable function netfs_get_source with a default
implementation returning EOPNOTSUPP. Add a server function for
fsys-get-source.
* libnetfs/Makefile: Add fsys-get-source.c and get-source.c
* libnetfs/netfs.h: Add netfs_get_source.
* libnetfs/fsys-get-source.c: New file.
* libnetfs/get-source.c: Likewise.
|
|
Add a user overridable function diskfs_get_source with a default
implementation returning EOPNOTSUPP. Add a server function for
fsys-get-source.
* libdiskfs/Makefile: Add fsys-get-source.c and get-source.c
* libdiskfs/diskfs.h: Add diskfs_get_source.
* libdiskfs/fsys-get-source.c: New file.
* libdiskfs/get-source.c: Likewise.
|
|
fsys_get_children returns any active translators bound to nodes of the
receiving filesystem as an argz vector containing file names relative
to the root of the receiving translator.
* hurd/fsys.defs: Add fsys_get_children.
* hurd/fsys_reply.defs: Add fsys_get_children.
|
|
Create a server function returning EOPNOTSUPP.
* trans/symlink.c (S_fsys_get_children): New function.
|
|
Create a server function returning EOPNOTSUPP.
* libtrivfs/fsys-get-children.c: New file.
|
|
Keep track of active translators and handle fsys_get_children
requests.
* libnetfs/Makefile (FSYSSRCS): Add fsys-get-children.c.
* libnetfs/dead-name.c (ports_dead_name): Remove dead translators.
* libnetfs/file-set-translator.c (netfs_S_file_set_translator): Register
active translators.
* libnetfs/fsys-get-children.c: New file.
|
|
Keep track of active translators and handle fsys_get_children
requests.
* libdiskfs/Makefile (FSYSSRCS): Add fsys-get-children.c.
* libdiskfs/dead-name.c (ports_dead_name): Remove dead translators.
* libdiskfs/file-set-trans.c (diskfs_S_file_set_translator): Register
active translators.
* libdiskfs/fsys-get-children.c: New file.
|
|
Add functions that maintain a list of active translators.
* libfshelp/translator-list.c: New file.
* libfshelp/fshelp.h: Add function declarations.
* libfshelp/Makefile: Add translator-list.c, link against libihash.
|
|
Track the relative path used to obtain a file handle in the
struct peropen.
* libnetfs/netfs.h (struct peropen): New field path.
* libnetfs/make-peropen.c (netfs_make_peropen): Initialize path.
* libnetfs/release-peropen.c (netfs_release_peropen): Free path.
* libnetfs/fsys-getroot.c (netfs_S_fsys_getroot): Initialize path.
* libnetfs/dir-lookup.c (netfs_S_dir_lookup): Preserve the path.
|
|
Track the relative path used to obtain a file handle in the
struct peropen.
* libdiskfs/diskfs.h (struct peropen): New field path.
* libdiskfs/peropen-make.c (diskfs_make_peropen): Initialize path.
* libdiskfs/peropen-rele.c (diskfs_release_peropen): Free path.
* libdiskfs/fsys-getroot.c (diskfs_S_fsys_getroot): Initialize path.
* libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Preserve the path.
|
|
Add a macro HURD_IHASH_ITERATE_ITEMS that iterates over all elements
in the hash table making both the key and the value available.
* libihash/ihash.h (HURD_IHASH_ITERATE_ITEMS): New macro.
|
|
* proc/proc.h (zombie_list): Remove declaration.
|
|
* proc/exc-reply.defs: Delete file.
|
|
Keep track of the range where executable segments are mapped into
memory and hand that information over to the proc server.
* exec/priv.h (struct execdata): Add {start,end}_code.
* exec/exec.c (prepare): Initialize {start,end}_code.
(load_section): Update {start,end}_code.
(do_exec): Use proc_set_code to hand {start,end}_code to the proc server.
|
|
Add routines to set and query the processes start_code and end_code
locations. Any executable segments loaded from the ELF binary are in
this range.
* hurd/process.defs: Add proc_{get,set}_code.
* hurd/process_reply.defs: Add proc_{get,set}_code.
* hurd/process_request.defs: Add proc_{get,set}_code_request.
|
|
Any executable segments loaded from the ELF binary are in this range.
* proc/proc.h (struct proc): Add {start,end}_code.
* proc/mgt.h (S_proc_set_code): New function.
* proc/mgt.h (S_proc_get_code): New function.
|
|
* utils/Makefile (mount-LDLIBS): Define to libblkid_LIBS instead of
libblkid-LIBS
(mount-CPPFLAGS): Likewise.
|
|
Use libblkid to detect the filesystem type if "auto" is given as
type. Remove the translator localization from main, this is also done
in do_mount and any errors are propagated properly. This way "auto" is
handled correctly if given on the command line or used as filesystem
type in the fstab.
* configure.ac: Add check for libblkid.
* config.make.in: Make libblkid specific values available.
* utils/Makefile: Use libblkid specific values.
* utils/mount.c (DEFAULT_FSTYPE): Use "auto" as default type.
(do_mount): Detect type using libblkid.
(main): Drop translator localization.
|
|
* utils/umount.c: Do not include useless <blkid/blkid.h>.
|
|
Register any symlink translators running as root as important
processes at the proc server.
* trans/symlink.c (main): Mark us as important.
|
|
Register any mach-defpager translators running as root as
important processes at the proc server.
* mach-defpager/main.c (main): Mark us as important.
|
|
Register libtrivfs-based translators running as root as important
processes at the proc server.
* libtrivfs/startup.c (trivfs_startup): Mark us as important.
|
|
Register libnetfs-based translators running as root as important
processes at the proc server.
* libnetfs/init-startup.c (netfs_startup): Mark us as important.
|
|
Register libdiskfs-based translators running as root as important
processes at the proc server.
* libdiskfs/init-startup.c (_diskfs_init_completed): Mark us as important.
|
|
This is based on a fragment of Guillem Jovers patch presented here:
http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html
It has been refreshed, updated and the copyright year is adjusted
properly. It has been complemented with the necessary features to
address the issues the original patch set out to address, namely
that killall5 freezes the proc translator before it tries to walk
over /proc/*/stat to decide which process to kill. Prior to this
patch (and the one marking the procfs server as important
process), killall5 would deadlock trying to walk over the proc
file system.
Ironically it would not have killed any process later on even if
it had the chance, since two values obtained from /proc/*/stat
are currently hardcoded to zero in our procfs. Patches addressing
the problem as a whole are prepared and will be sent as a follow
up.
* init/init.c (launch_core_servers): Mark init, auth, proc and fs
servers as important.
(start_child): Mark the real init as important.
(S_startup_important_task): Mark exec server as important.
|
|
This is based on a fragment of Guillem Jovers patch presented here:
http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html
It has been refreshed, updated and the copyright year is adjusted
properly. It has been complemented with the necessary features to
address the issues the original patch set out to address, namely
that killall5 freezes the proc translator before it tries to walk
over /proc/*/stat to decide which process to kill. Prior to this
patch (and the one marking the procfs server as important
process), killall5 would deadlock trying to walk over the proc
file system.
Ironically it would not have killed any process later on even if
it had the chance, since two values obtained from /proc/*/stat
are currently hardcoded to zero in our procfs. Patches addressing
the problem as a whole are prepared and will be sent as a follow
up.
* hurd/process.defs (proc_mark_important): New routine definitions.
* hurd/process_reply.defs (proc_mark_important_request): Likewise.
* hurd/process_request.defs (proc_mark_important_request): Likewise.
|
|
This is based on a fragment of Guillem Jovers patch presented here:
http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html
It has been refreshed, updated and the copyright year is adjusted
properly. It has been complemented with the necessary features to
address the issues the original patch set out to address, namely
that killall5 freezes the proc translator before it tries to walk
over /proc/*/stat to decide which process to kill. Prior to this
patch (and the one marking the procfs server as important
process), killall5 would deadlock trying to walk over the proc
file system.
Ironically it would not have killed any process later on even if
it had the chance, since two values obtained from /proc/*/stat
are currently hardcoded to zero in our procfs. Patches addressing
the problem as a whole are prepared and will be sent as a follow
up.
* proc/proc.h (struct proc): Add p_important field.
* proc/pgrp.c (S_proc_getpgrppids): Exclude important system processes.
(S_proc_mark_important): New function.
* proc/mgt.c (create_startup_proc): Mark init as important.
|
|
Make the function check_owner available for use in other files.
* proc/info.c (check_owner): Drop attributes static and inline.
* proc/proc.h (check_owner): Add prototype.
|
|
* hurd/process.defs: Reserve RPC ID for proc_set_init_task.
* hurd/process_reply.defs: Likewise.
* hurd/process_request.defs: Likewise.
|
|
|