about summary refs log tree commit diff
path: root/hurd
Commit message (Collapse)AuthorAgeFilesLines
* hurd: Stop mapping AT_NO_AUTOMOUNT to O_NOTRANSSergey Bugaev2024-04-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While AT_NO_AUTOMOUNT is similar in function to the Hurd's O_NOTRANS, there are significant enough differences in semantics: 1. AT_NO_AUTOMOUNT has no effect on already established mounts, whereas O_NOTRANS causes the lookup to ignore both passive and active translators. A better approximation of the AT_NO_AUTOMOUNT behavior would be to honor active translators, but avoid starting passive ones; like what the file_name_lookup_carefully () routine from sutils/clookup.c in the Hurd source tree does. 2. On GNU/Hurd, translators are used much more pervasively than mounts on "traditional" Unix systems: among other things, translators underlie features like symlinks, device nodes, and sockets. And while on a "traditional" Unix system, the mountpoint and the root of the mounted tree may look similar enough for many purposes (they're both directories, for one thing), the Hurd allows for any combination of the two node types, and indeed it is common to have e.g. a device node "mounted" on top of a regular file node on the underlying filesystem. Ignoring the translator and stat'ing the underlying node is therefore likely to return very different results from what you'd get if you stat the translator's root node. In practice, mapping AT_NO_AUTOMOUNT to O_NOTRANS was breaking GNU Coreutils, including stat(1) and ls(1): $ stat /dev/hd0s1 File: /dev/hd0s1 Size: 0 Blocks: 8 IO Block: 8192 regular empty file Device: 0,8 Inode: 32866 Links: 1 This was also breaking GNOME's glib, where a g_local_file_stat () call that is supposed to stat () a file through a symlink uses AT_NO_AUTOMOUNT, which gets mapped to O_NOTRANS, which then causes the stat () call to stat symlink itself like lstat () would, rather then the file it points to, which is what the logic expects to happen. This reverts most of 13710e7e6af6c8965cc9a63a0660cb4ce1966557 "hurd: Add support for AT_NO_AUTOMOUNT". Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
* hurd: Stop relying on VM_MAX_ADDRESSSergey Bugaev2024-03-231-4/+4
| | | | | | | | | | | | | | | | | | We'd like to avoid committing to a specific size of virtual address space (i.e. the value of VM_AARCH64_T0SZ) on AArch64. While the current version of GNU Mach still exports VM_MAX_ADDRESS for compatibility, we should try to avoid relying on it when we can. This piece of logic in _hurdsig_getenv () doesn't actually care about the size of user- accessible virtual address space, it just wants to preempt faults on any addresses starting from the value of the P pointer and above. So, use (unsigned long int) -1 instead of VM_MAX_ADDRESS. While at it, change the casts to (unsigned long int) and not just (long int), since the type of struct hurd_signal_preemptor.{first,last} is unsigned long int. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-ID: <20240323173301.151066-3-bugaevc@gmail.com>
* hurd: Move internal functions to internal headerSergey Bugaev2024-03-231-87/+0
| | | | | | | | | | | Move _hurd_self_sigstate (), _hurd_critical_section_lock (), and _hurd_critical_section_unlock () inline implementations (that were already guarded by #if defined _LIBC) to the internal version of the header. While at it, add <tls.h> to the includes, and use __LIBC_NO_TLS () unconditionally. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-ID: <20240323173301.151066-2-bugaevc@gmail.com>
* hurd: Reformat Makefile.Carlos O'Donell2024-02-251-42/+129
| | | | | | | | | | Reflow and sort Makefile. Code generation changes present due to link order changes. No regressions on x86_64 and i686. Tested with build-many-glibcs.py for x86_64-gnu.
* hurd: Declare _hurd_intr_rpc_msg* with protected visibilitySergey Bugaev2024-01-031-3/+3
| | | | | | | | These symbols are internal and never exported; make sure the compiler realizes that when compiling hurdsig.c and does not try to emit GOT reads. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
* hurd: Add some missing includesSergey Bugaev2024-01-031-1/+1
| | | | Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
* Update copyright dates with scripts/update-copyrightsPaul Eggert2024-01-0189-89/+89
|
* Update code to handle the new ABI for sending inlined port rights.Flavio Cruz2023-12-171-2/+24
| | | | | For i686, this change is no op but for x86_64 it forces all inlined port rights to be 8 bytes long.
* Revert "Update code to handle the new ABI for sending inlined port rights."Samuel Thibault2023-12-031-24/+2
| | | | This reverts commit 7e23b3c2c008e0b9b5da055e675d40cc27bb10ef.
* Revert "hurd: Fix build"Samuel Thibault2023-12-031-1/+1
| | | | This reverts commit 7096914dd8ff2dfd1d8cba3577b72838f5e4c2bd.
* hurd: Fix buildSamuel Thibault2023-12-031-1/+1
| | | | | | | 7e23b3c2c008 ("Update code to handle the new ABI for sending inlined port rights.") was missing a cast. Fixes 7e23b3c2c008e0b9b5da055e675d40cc27bb10ef
* Update code to handle the new ABI for sending inlined port rights.Flavio Cruz2023-12-031-2/+24
| | | | | | For i686, this change is no op but for x86_64 it forces all inlined port rights to be 8 bytes long. Message-ID: <20231124213041.952886-2-flaviocruz@gmail.com>
* hurd: fix restarting reauth_dtable on signalSamuel Thibault2023-11-211-12/+23
| | | | | While inside the critical section, RPCs would not be restarted, so we have to handle EINTR errors.
* hurd: Prevent the final file_exec_paths call from signalsSamuel Thibault2023-11-201-0/+12
| | | | | | | Otherwise if the exec server started thrashing the old task, we won't be able to restart the exec. This notably fixes building ghc.
* Remove untyped mach RPC code.Flavio Cruz2023-11-192-73/+0
| | | | | | Existing MiG does not support untyped messages and the Hurd will continue to use typed messages for the foreseeable future. Message-ID: <ZVmYX6j4pYNUfqn4@jupiter.tail36e24.ts.net>
* _hurd_intr_rpc_mach_msg: handle message iteration correctly.Flavio Cruz2023-11-191-12/+12
| | | | | | | | | The `ty` pointer is only set at the end of the loop so that `msgtl_header.msgt_inline` and `msgtl_header.msgt_deallocate` remain valid. Also, when deallocating memory, we use the length from the message directly rather than hard coding mach_port_t since we want to deallocate any kind of OOL data. Message-ID: <ZVlGVD6eEN-dXsOr@jupiter.tail36e24.ts.net>
* hurd: Make _hurd_intr_rpc_mach_msg avoid returning MACH_SEND_INTERRUPTEDSamuel Thibault2023-11-141-0/+6
| | | | | | | | | | When the given options do not include MACH_SEND_INTERRUPT, _hurd_intr_rpc_mach_msg (aka mach_msg) is not supposed to return MACH_SEND_INTERRUPTED. In such a case we thus have to retry sending the message. This was observed to fix various occurrences of spurious "(ipc/send) interrupted" errors when running haskell programs.
* hurd: Avoid including thread_state.h in installed headerSamuel Thibault2023-09-051-2/+1
| | | | | thread_state.h is not actually installed. It was only needed for struct machine_thread_all_state, which we can just declare, actually.
* hurd: Add prototype for and thus fix _hurdsig_abort_rpcs callSamuel Thibault2023-08-152-10/+7
| | | | This was actually not a problem since NULL was getting passed.
* hurd: Do not include full <stdarg.h> in <hurd.h>Florian Weimer2023-08-031-2/+2
| | | | | | | | | | | | | | | | | | This fixes a hurd/check-installed-headers-c failure with -std=c89 #define _FORTIFY_SOURCE 1: In file included from ../hurd/hurd.h:354, from ../sysdeps/hurd/include/hurd.h:2, from /tmp/cih_test_9IaUwa.c:10: /home/bmg/install/compilers/i686-gnu/lib/gcc/i686-glibc-gnu/13.2.1/include/stdarg.h:54:34: error: "__STDC_VERSION__" is not defined, evaluates to 0 [-Werror=undef] 54 | #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L \ | ^~~~~~~~~~~~~~~~ /home/bmg/install/compilers/i686-gnu/lib/gcc/i686-glibc-gnu/13.2.1/include/stdarg.h:55:8: error: "__cplusplus" is not defined, evaluates to 0 [-Werror=undef] 55 | || __cplusplus + 0 >= 201103L | ^~~~~~~~~~~ cc1: all warnings being treated as errors Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* Fix all the remaining misspellings -- BZ 25337Paul Pluzhnikov2023-06-025-5/+5
|
* Fix build for hurd/thread-self.c for i386.Flavio Cruz2023-05-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | We need to include hurd.h for libc_hidden_proto (__hurd_thread_self), introduced in b44c1e12524b ("hurd: Fix using interposable hurd_thread_self") This the error log: In file included from <command-line>: ./../include/libc-symbols.h:472:33: error: '__EI___hurd_thread_self' aliased to undefined symbol '__GI___hurd_thread_self' 472 | extern thread __typeof (name) __EI_##name \ | ^~~~~ ./../include/libc-symbols.h:468:3: note: in expansion of macro '__hidden_ver2' 468 | __hidden_ver2 (, local, internal, name) | ^~~~~~~~~~~~~ ./../include/libc-symbols.h:476:41: note: in expansion of macro '__hidden_ver1' 476 | # define hidden_def(name) __hidden_ver1(__GI_##name, name, name); | ^~~~~~~~~~~~~ ./../include/libc-symbols.h:557:32: note: in expansion of macro 'hidden_def' 557 | # define libc_hidden_def(name) hidden_def (name) | ^~~~~~~~~~ thread-self.c:27:1: note: in expansion of macro 'libc_hidden_def' 27 | libc_hidden_def (__hurd_thread_self) | ^~~~~~~~~~~~~~~ Message-Id: <ZGr6wj2UOxg3F0qH@jupiter.tail36e24.ts.net>
* hurd: Use __hurd_fail () instead of assigning errnoSergey Bugaev2023-05-205-36/+14
| | | | | | | | | | | | | | The __hurd_fail () inline function is the dedicated, idiomatic way of reporting errors in the Hurd part of glibc. Not only is it more concise than '{ errno = err; return -1; }', it is since commit 6639cc10029e24e06b34e169712b21c31b8cf213 "hurd: Mark error functions as __COLD" marked with the cold attribute, telling the compiler that this codepath is unlikely to be executed. In one case, use __hurd_dfail () over the plain __hurd_fail (). Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230520115531.3911877-1-bugaevc@gmail.com>
* hurd: Fix using interposable hurd_thread_selfSergey Bugaev2023-05-192-1/+5
| | | | | | | | | | | | Create a private hidden __hurd_thread_self alias, and use that one. Fixes 2f8ecb58a59eb82c43214d000842d99644a662d1 "hurd: Fix x86_64 _hurd_tls_fork" and c7fcce38c83a2bb665ef5dc4981bf20c7e586123 "hurd: Make sure to not use tcb->self" Reported-by: Joseph Myers <joseph@codesourcery.com> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
* hurd: Use __mach_setup_thread_call ()Sergey Bugaev2023-05-171-4/+6
| | | | | | | | | | | ...instead of mach_setup_thread (), which is unsuitable for setting up function calls. Checked on x86_64-gnu: the signal thread no longer crashes upon trying to process a message. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230517191436.73636-6-bugaevc@gmail.com>
* hurd: Use MACHINE_THREAD_STATE_SETUP_CALLSergey Bugaev2023-05-171-2/+2
| | | | | Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230517191436.73636-4-bugaevc@gmail.com>
* Update hurd/hurdselect.c to be more portable.Flavio Cruz2023-05-062-21/+15
| | | | | | | | | | | Summary of changes: - Use BAD_TYPECHECK to perform type checking in a cleaner way. BAD_TYPECHECK is moved into sysdeps/mach/rpc.h to avoid duplication. - Remove assertions for mach_msg_type_t since those won't work for x86_64. - Update message structs to use mach_msg_type_t directly. - Use designated initializers. Message-Id: <ZFa+roan3ioo0ONM@jupiter.tail36e24.ts.net>
* Update hurd/intr-msg.c to be more portableFlavio Cruz2023-05-051-13/+21
| | | | | | | | | | | | | Summary of the changes: - Introduce BAD_TYPECHECK from MiG to make it simpler to do type checking. - Replace int type with mach_msg_type_t. This assumes that mach_msg_type_t is always the same size as int which is not true for x86_64. - Calculate the size and align using PTR_ALIGN_UP, which is a bit cleaner and similar to what we do elsewhere. - Define mach_msg_type_t to check using designated initializers. Message-Id: <ZFMvrIkvoCSxqB/C@jupiter.tail36e24.ts.net>
* hurd: Replace reply port with a dead name on failed interruptionSergey Bugaev2023-05-012-3/+13
| | | | | | | | | | | | | If we're trying to interrupt an interruptible RPC, but the server fails to respond to our __interrupt_operation () call, we instead destroy the reply port we were expecting the reply to the RPC on. Instead of deallocating the name completely, replace it with a dead name, so the name won't get reused for some other right, and deallocate it in _hurd_intr_rpc_mach_msg once we return from the signal handler. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230429201822.2605207-4-bugaevc@gmail.com>
* hurd: Mark error functions as __COLDSergey Bugaev2023-04-292-5/+5
| | | | | | | | This should hopefully hint the compiler that they are unlikely to be called. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230429131223.2507236-2-bugaevc@gmail.com>
* hurd: Fix FS_RETRY_MAGICAL "machtype" handlingSergey Bugaev2023-04-291-7/+4
| | | | | | | | | | | | | | | | | We need to set file_name, not update retryname. This is what the other branches do. Before this change, any attempt to access such a file would segfault due to file_name being unset: $ settrans -ac /tmp/my-machtype /hurd/magic machtype $ cat /tmp/my-machtype Segmentation fault Checked on i686-gnu. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230429131354.2507443-7-bugaevc@gmail.com>
* hurd: Respect existing FD_CLOEXEC in S_msg_set_fdSergey Bugaev2023-04-291-1/+7
| | | | | | | | | If the process has set the close-on-exec flag for the file descriptor, it expects the file descriptor to get closed on exec, even if we replace what the file descriptor refers to. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230429131354.2507443-6-bugaevc@gmail.com>
* hurd: Don't leak the auth port in msg* RPCsSergey Bugaev2023-04-291-9/+58
| | | | | | | | | | | | | | | | | | | | | The leak can be easily reproduced (and observed) using the portinfo tool: $ portinfo -v $$ | grep task 36: send task(1577)(self) (refs: 127) $ portinfo -v $$ | grep task 36: send task(1577)(self) (refs: 253) $ portinfo -v $$ | grep task 36: send task(1577)(self) (refs: 379) $ portinfo -v $$ | grep task 36: send task(1577)(self) (refs: 505) $ portinfo -v $$ | grep task 36: send task(1577)(self) (refs: 631) Checked on i686-gnu. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230429131354.2507443-5-bugaevc@gmail.com>
* hurd: Mark various conditions as unlikelySergey Bugaev2023-04-292-7/+7
| | | | | Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230429131354.2507443-3-bugaevc@gmail.com>
* hurd: Move libc_hidden_def's aroundSergey Bugaev2023-04-291-4/+5
| | | | | | | | | | | | | Each libc_hidden_def should be placed immediately next to its function, not in some random unrelated place. No functional change. Fixes: 653d74f12abea144219af00400ed1f1ac5dfa79f "hurd: Global signal disposition" Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230429131354.2507443-2-bugaevc@gmail.com>
* hurd: Simplify _hurd_critical_section_lock a bitSergey Bugaev2023-04-291-13/+6
| | | | | | | | This block of code was doing exactly what _hurd_self_sigstate does; so just call that and let it do its job. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230429131354.2507443-1-bugaevc@gmail.com>
* hurd: Avoid leaking task & thread portsSergey Bugaev2023-04-181-0/+6
| | | | Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
* hurd: Simplify _S_catch_exception_raiseSergey Bugaev2023-04-181-7/+1
| | | | | | | | _hurd_thread_sigstate () already handles finding an existing sigstate before allocating a new one, so just use that. Bonus: this will only lock the _hurd_siglock once. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
* hurd: Run init_pids () before init_dtable ()Sergey Bugaev2023-04-171-9/+9
| | | | | | | | | | | | | | | | | | | | | | Much as the comment says, things on _hurd_subinit assume that _hurd_pid is already initialized by the time _hurd_subinit is run, so _hurd_proc_subinit has to run before it. Specifically, init_dtable () calls _hurd_port2fd (), which uses _hurd_pid and _hurd_pgrp to set up ctty handling. With _hurd_subinit running before _hurd_proc_subinit, ctty setup was broken: 13<--33(pid1255)->term_getctty () = 0 4<--39(pid1255) task16(pid1255)->mach_port_deallocate (pn{ 10}) = 0 13<--33(pid1255)->term_open_ctty (0 0) = 0x40000016 (Invalid argument) Fix this by running the _hurd_proc_subinit hook in the correct place -- just after _hurd_portarray is set up (so the proc server port is available in its usual place) and just before running _hurd_subinit. Fixes 1ccbb9258eed0f667edf459a28ba23a805549b36 ("hurd: Notify the proc server later during initialization"). Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
* hurd: Avoid extra ctty RPCs in init_dtable ()Sergey Bugaev2023-04-171-7/+39
| | | | | | | | | | | | | | | | | It is common to have (some of) stdin, stdout and stderr point to the very same port. We were making the ctty RPCs that _hurd_port2fd () does for each one of them separately: 1. term_getctty () 2. mach_port_deallocate () 3. term_open_ctty () Instead, let's detect this case and duplicate the ctty port we already have. This means we do 1 RPC instead of 3 (and create a single protid on the server side) if the file is our ctty, and no RPCs instead of 1 if it's not. A clear win! Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
* hurd: Remove __hurd_local_reply_portSergey Bugaev2023-04-141-7/+0
| | | | | | | | | | | | | | | | | | Now that the signal code no longer accesses it, the only real user of it was mig-reply.c, so move the logic for managing the port there. If we're in SHARED and outside of rtld, we know that __LIBC_NO_TLS () always evaluates to 0, and a TLS reply port will always be used, not __hurd_reply_port0. Still, the compiler does not see that __hurd_reply_port0 is never used due to its address being taken. To deal with this, explicitly compile out __hurd_reply_port0 when we know we won't use it. Also, instead of accessing the port via THREAD_SELF->reply_port, this uses THREAD_GETMEM and THREAD_SETMEM directly, avoiding possible miscompilations. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
* hurd: Improve reply port handling when exiting signal handlersSergey Bugaev2023-04-101-13/+11
| | | | | | | | | | | | | | | | | If we're doing signals, that means we've already got the signal thread running, and that implies TLS having been set up. So we know that __hurd_local_reply_port will resolve to THREAD_SELF->reply_port, and can access that directly using the THREAD_GETMEM and THREAD_SETMEM macros. This avoids potential miscompilations, and should also be a tiny bit faster. Also, use mach_port_mod_refs () and not mach_port_destroy () to destroy the receive right. mach_port_destroy () should *never* be used on mach_task_self (); this can easily lead to port use-after-free vulnerabilities if the task has any other references to the same port. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230319151017.531737-26-bugaevc@gmail.com>
* hurd: Do not declare local variables volatileSergey Bugaev2023-04-101-1/+1
| | | | | | | | | | | | | | These are just regular local variables that are not accessed in any funny ways, not even though a pointer. There's absolutely no reason to declare them volatile. It only ends up hurting the quality of the generated machine code. If anything, it would make sense to decalre sigsp as *pointing* to volatile memory (volatile void *sigsp), but evidently that's not needed either. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230403115621.258636-2-bugaevc@gmail.com>
* hurd: Microoptimize _hurd_self_sigstate ()Sergey Bugaev2023-04-031-3/+5
| | | | | | | | | When THREAD_GETMEM is defined with inline assembly, the compiler may not optimize away the two reads of _hurd_sigstate. Help it out a little bit by only reading it once. This also makes for a slightly cleaner code. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230319151017.531737-32-bugaevc@gmail.com>
* hurd: Fix _hurd_setup_sighandler () signatureSergey Bugaev2023-04-031-5/+5
| | | | | Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230319151017.531737-10-bugaevc@gmail.com>
* hurd: Disable O_TRUNC and FS_RETRY_MAGICAL in rtldSergey Bugaev2023-04-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | hurd/lookup-retry.c is compiled into rtld, the dynamic linker/loader. To avoid pulling in file_set_size, file_utimens, tty/ctty stuff, more string/memory code (memmove, strncpy, strcpy), and more strtoul/itoa code, compile out support for O_TRUNC and FS_RETRY_MAGICAL when building hurd/lookup-retry.c for rtld. None of that functionality is useful to rtld during startup anyway. Keep support for FS_RETRY_MAGICAL("/"), since that does not pull in much, and is required for following absolute symlinks. The large number of extra code being pulled into rtld was noticed by reviewing librtld.map & elf/librtld.os.map in the build tree. It is worth noting that once libc.so is loaded, the real __open, __stat, etc. replace the minimal versions used initially by rtld -- this is especially important in the Hurd port, where the minimal rtld versions do not use the dtable and just pass real Mach port names as fds. Thus, once libc.so is loaded, rtld will gain access to the full __hurd_file_name_lookup_retry () version, complete with FS_RETRY_MAGICAL support, which is important in case the program decides to dlopen ("/proc/self/fd/...") or some such. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230319151017.531737-9-bugaevc@gmail.com>
* hurd: Fix file name in #errorSergey Bugaev2023-04-031-1/+1
| | | | | Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230319151017.531737-8-bugaevc@gmail.com>
* hurd: Swap around two function callsSergey Bugaev2023-04-031-4/+4
| | | | | | | | | | ...to keep `sigexc' port initialization in one place, and match what the comments say. No functional change. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230319151017.531737-7-bugaevc@gmail.com>
* hurd: Remove __hurd_threadvar_stack_{offset,mask}Sergey Bugaev2023-04-032-20/+0
| | | | | | | | | | | Noone is or should be using __hurd_threadvar_stack_{offset,mask}, we have proper TLS now. These two remaining variables are never set to anything other than zero, so any code that would try to use them as described would just dereference a zero pointer and crash. So remove them entirely. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230319151017.531737-6-bugaevc@gmail.com>
* hurd: Make exception subcode a longSergey Bugaev2023-04-033-4/+5
| | | | | | | On EXC_BAD_ACCESS, exception subcode is used to pass the faulting memory address, so it needs to be (at least) pointer-sized. Thus, make it into a long. This matches the corresponding change in GNU Mach. Message-Id: <20230319151017.531737-5-bugaevc@gmail.com>