From fbd4689865cc72b70d4936254c08e0a8b4fbafcc Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Fri, 9 Jan 2015 13:42:12 +0100 Subject: add patch series --- ...-libports-silence-pointless-error-message.patch | 30 +++++++++++ ...2-startup-give-the-tasks-we-create-a-name.patch | 33 ++++++++++++ debian/patches/0003-auth-simplify-expression.patch | 35 +++++++++++++ ...-implicit-assumption-about-the-bootstrap-.patch | 61 ++++++++++++++++++++++ debian/patches/series | 4 ++ 5 files changed, 163 insertions(+) create mode 100644 debian/patches/0001-libports-silence-pointless-error-message.patch create mode 100644 debian/patches/0002-startup-give-the-tasks-we-create-a-name.patch create mode 100644 debian/patches/0003-auth-simplify-expression.patch create mode 100644 debian/patches/0004-auth-remove-implicit-assumption-about-the-bootstrap-.patch diff --git a/debian/patches/0001-libports-silence-pointless-error-message.patch b/debian/patches/0001-libports-silence-pointless-error-message.patch new file mode 100644 index 00000000..9cc66761 --- /dev/null +++ b/debian/patches/0001-libports-silence-pointless-error-message.patch @@ -0,0 +1,30 @@ +From ba9d293d8fe40f6e634cf800c42ece97727ccd0f Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Sat, 3 Jan 2015 16:21:24 +0100 +Subject: [PATCH hurd 1/4] libports: silence pointless error message + +* libports/manage-multithread.c (adjust_priority): Silence pointless +error message. +--- + libports/manage-multithread.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c +index 2067cba..ad22991 100644 +--- a/libports/manage-multithread.c ++++ b/libports/manage-multithread.c +@@ -50,6 +50,11 @@ adjust_priority (unsigned int totalthreads) + thread_switch (MACH_PORT_NULL, SWITCH_OPTION_DEPRESS, t); + + err = get_privileged_ports (&host_priv, NULL); ++ if (err == MACH_SEND_INVALID_DEST) ++ /* This is returned if we neither have the privileged host control ++ port cached nor have a proc server to talk to. Give up. */ ++ return; ++ + if (err) + goto error_host_priv; + +-- +2.1.4 + diff --git a/debian/patches/0002-startup-give-the-tasks-we-create-a-name.patch b/debian/patches/0002-startup-give-the-tasks-we-create-a-name.patch new file mode 100644 index 00000000..1dbca7c9 --- /dev/null +++ b/debian/patches/0002-startup-give-the-tasks-we-create-a-name.patch @@ -0,0 +1,33 @@ +From 6b135febdb8fad613aa8856fb9f48ae8c229e7a1 Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Fri, 9 Jan 2015 11:06:52 +0100 +Subject: [PATCH hurd 2/4] startup: give the tasks we create a name + +* startup/startup.c (run): Name the tasks we start. +--- + startup/startup.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/startup/startup.c b/startup/startup.c +index 601c894..a9373f1 100644 +--- a/startup/startup.c ++++ b/startup/startup.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -376,6 +377,7 @@ run (const char *server, mach_port_t *ports, task_t *task) + printf ("Pausing for %s\n", prog); + getchar (); + } ++ task_set_name (task, (char *) prog); + err = file_exec (file, *task, 0, + (char *)prog, strlen (prog) + 1, /* Args. */ + startup_envz, startup_envz_len, +-- +2.1.4 + diff --git a/debian/patches/0003-auth-simplify-expression.patch b/debian/patches/0003-auth-simplify-expression.patch new file mode 100644 index 00000000..97cf5e77 --- /dev/null +++ b/debian/patches/0003-auth-simplify-expression.patch @@ -0,0 +1,35 @@ +From f91191f2643d3c0c1d737e9338bf4224bdc0bdcb Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Fri, 2 Jan 2015 21:53:08 +0100 +Subject: [PATCH hurd 3/4] auth: simplify expression + +* auth/auth.c (S_auth_{user,server}_authenticate): Simplify expression. +--- + auth/auth.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/auth/auth.c b/auth/auth.c +index c36bcb2..a7a188a 100644 +--- a/auth/auth.c ++++ b/auth/auth.c +@@ -299,7 +299,7 @@ S_auth_user_authenticate (struct authhandle *userauth, + if (! userauth) + return EOPNOTSUPP; + +- if (rendezvous == MACH_PORT_NULL || rendezvous == MACH_PORT_DEAD) ++ if (! MACH_PORT_VALID (rendezvous)) + return EINVAL; + + u.user = userauth; +@@ -380,7 +380,7 @@ S_auth_server_authenticate (struct authhandle *serverauth, + if (! serverauth) + return EOPNOTSUPP; + +- if (rendezvous == MACH_PORT_NULL || rendezvous == MACH_PORT_DEAD) ++ if (! MACH_PORT_VALID (rendezvous)) + return EINVAL; + + pthread_mutex_lock (&pending_lock); +-- +2.1.4 + diff --git a/debian/patches/0004-auth-remove-implicit-assumption-about-the-bootstrap-.patch b/debian/patches/0004-auth-remove-implicit-assumption-about-the-bootstrap-.patch new file mode 100644 index 00000000..580de501 --- /dev/null +++ b/debian/patches/0004-auth-remove-implicit-assumption-about-the-bootstrap-.patch @@ -0,0 +1,61 @@ +From 05d6695b41a801de1ee024e5d6cc3a8170ab0ea6 Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Wed, 7 Jan 2015 16:00:06 +0100 +Subject: [PATCH hurd 4/4] auth: remove implicit assumption about the bootstrap + process + +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. +--- + auth/auth.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/auth/auth.c b/auth/auth.c +index a7a188a..d5ef587 100644 +--- a/auth/auth.c ++++ b/auth/auth.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -482,6 +483,7 @@ main (int argc, char **argv) + { + error_t err; + mach_port_t boot; ++ mach_port_t startup; + process_t proc; + mach_port_t hostpriv, masterdev; + struct authhandle *firstauth; +@@ -518,10 +520,21 @@ main (int argc, char **argv) + _hurd_port_set (&_hurd_ports[INIT_PORT_PROC], proc); + _hurd_proc_init (argv, NULL, 0); + ++ startup = file_name_lookup (_SERVERS_STARTUP, 0, 0); ++ if (! MACH_PORT_VALID (startup)) ++ { ++ error (0, errno, "%s", _SERVERS_STARTUP); ++ /* Fall back to using the bootstrap port as before. */ ++ startup = boot; ++ } ++ + /* Init knows intimately that we will be ready for messages + as soon as this returns. */ +- startup_essential_task (boot, mach_task_self (), MACH_PORT_NULL, "auth", ++ startup_essential_task (startup, mach_task_self (), MACH_PORT_NULL, "auth", + hostpriv); ++ ++ if (startup != boot) ++ mach_port_deallocate (mach_task_self (), startup); + mach_port_deallocate (mach_task_self (), boot); + mach_port_deallocate (mach_task_self (), hostpriv); + +-- +2.1.4 + diff --git a/debian/patches/series b/debian/patches/series index bde0ea07..f05c031f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -47,3 +47,7 @@ libports-payloads.patch proc-task-notify-0005-proc-fix-build.patch merge-me-0001-libports-avoid-acquiring-global-lock-in-message-disp.patch merge-me-0002-startup-faster-reboots.patch +0001-libports-silence-pointless-error-message.patch +0002-startup-give-the-tasks-we-create-a-name.patch +0003-auth-simplify-expression.patch +0004-auth-remove-implicit-assumption-about-the-bootstrap-.patch -- cgit v1.2.3