all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 600f89a711f3eb10fb7e1b3fef02dd0ecb5d633e 2278 bytes (raw)
name: gnu/packages/patches/glibc-hurd64-intr-msg-clobber.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
 
Upstream-status: Taken from <https://salsa.debian.org/glibc-team/glibc/-/blob/c36c87acb1a35d6e06db6cef1e28cf2f405e1a9e/debian/patches/hurd-i386/git-intr-msg-clobber.diff>.

See <https://lists.gnu.org/archive/html/bug-hurd/2024-11/msg00115.html>,
and <https://lists.debian.org/debian-hurd/2024/07/msg00063.html>.

Commited for 2.40

commit c8b4ce0b368115714bd4cce131e1683759471099
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sat Jul 13 17:00:55 2024 +0200

    hurd: Fix restoring message to be retried
    
    save_data stores the start of the original message to be retried,
    overwritten by the EINTR reply. In 64b builds the overwrite is however
    rounded up to the 64b pointer size, so we have to save more than just
    the 32b err.
    
    Thanks a lot to Luca Dariz for the investigation!

diff --git a/hurd/intr-msg.c b/hurd/intr-msg.c
index 2c2e7dc463..424c1fc700 100644
--- a/hurd/intr-msg.c
+++ b/hurd/intr-msg.c
@@ -42,7 +42,10 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
   struct clobber
   {
     mach_msg_type_t type;
-    error_t err;
+    union {
+      error_t err;
+      uintptr_t align;
+    };
   };
   union msg
   {

Taken from: <https://salsa.debian.org/glibc-team/glibc/-/blob/027f94215a633cbf53794d4b48675fde36706e35/debian/patches/hurd-i386/local-intr-msg-clobber.diff>

Force putting save_data on the stack rather than in SSE register

The signal management does not yet properly save SSE state, so that save_data
would get overwritten by signal handlers, notably leading to `` shell
replacement getting empty content because then the io_read RPC retry gets an
MIG_BAD_ARGUMENTS error.

XXX: This is only temporary to fix the common shll replacement issue, and is
waiting for proper SSE state restoration.

Index: glibc-2.38/hurd/intr-msg.c
===================================================================
--- glibc-2.38.orig/hurd/intr-msg.c
+++ glibc-2.38/hurd/intr-msg.c
@@ -79,7 +79,7 @@ _hurd_intr_rpc_mach_msg (mach_msg_header
   mach_msg_bits_t msgh_bits;
   mach_port_t remote_port;
   mach_msg_id_t msgid;
-  struct clobber save_data;
+  volatile struct clobber save_data;
 
   if ((option & (MACH_SEND_MSG|MACH_RCV_MSG)) != (MACH_SEND_MSG|MACH_RCV_MSG)
       || _hurd_msgport_thread == MACH_PORT_NULL)

debug log:

solving 600f89a711 ...
found 600f89a711 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.