summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2016-04-26 19:15:41 +0200
committerJustus Winter <justus@gnupg.org>2016-04-26 19:15:41 +0200
commitef35a7912013767b01ac9b9aa75c54774fc73b5a (patch)
tree59737f411f167567f0ccb352b4dcc5d796befb55
parent754232cb582df208508c124aeb24b0f5f1e31b2d (diff)
drop old patch series
-rw-r--r--debian/patches/series3
-rw-r--r--debian/patches/startup0001-startup-implement-bits-of-the-fs-and-io-protocols.patch182
-rw-r--r--debian/patches/startup0002-startup-add-verbose-parameter.patch230
-rw-r--r--debian/patches/startup0003-startup-use-the-generated-default-server-implementat.patch153
4 files changed, 0 insertions, 568 deletions
diff --git a/debian/patches/series b/debian/patches/series
index 053bf896..51f5d2f8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -48,6 +48,3 @@ crash0001-xxx-crash-logging-works.patch
fixes0001-utils-settrans-implement-active-translator-stacking.patch
fixes0002-Avoid-superfluous-locking-of-node.patch
fixes0003-fstests-new-micro-benchmark.patch
-startup0001-startup-implement-bits-of-the-fs-and-io-protocols.patch
-startup0002-startup-add-verbose-parameter.patch
-startup0003-startup-use-the-generated-default-server-implementat.patch
diff --git a/debian/patches/startup0001-startup-implement-bits-of-the-fs-and-io-protocols.patch b/debian/patches/startup0001-startup-implement-bits-of-the-fs-and-io-protocols.patch
deleted file mode 100644
index fd42a8aa..00000000
--- a/debian/patches/startup0001-startup-implement-bits-of-the-fs-and-io-protocols.patch
+++ /dev/null
@@ -1,182 +0,0 @@
-From 3fee5da37d2caa231f75bc89543f2d2278ab873b Mon Sep 17 00:00:00 2001
-From: Justus Winter <justus@gnupg.org>
-Date: Sat, 23 Apr 2016 17:52:33 +0200
-Subject: [PATCH hurd 1/3] startup: implement bits of the fs and io protocols
-
-* startup/Makefile: Build fs and io server with default
-implementations.
-(mung_msg_S.h): Tune regexp only to match the include guard.
-* startup/startup.c (mig_reply_setup): New function.
-(demuxer): Add new protocols. Nicer implementation.
-(S_file_check_access): New function.
-(S_io_restrict_auth): Likewise.
----
- startup/Makefile | 6 ++--
- startup/startup.c | 106 +++++++++++++++++++++++++++++++++++++++++++++++++-----
- 2 files changed, 101 insertions(+), 11 deletions(-)
-
-diff --git a/startup/Makefile b/startup/Makefile
-index ee2ecdd5..db062ad 100644
---- a/startup/Makefile
-+++ b/startup/Makefile
-@@ -21,15 +21,17 @@ makemode := server
- SRCS = startup.c
- OBJS = $(SRCS:.c=.o) \
- startupServer.o notifyServer.o startup_replyUser.o msgServer.o \
-- startup_notifyUser.o fsysServer.o
-+ startup_notifyUser.o fsysServer.o fsServer.o ioServer.o
- target = startup
- HURDLIBS = shouldbeinlibc
-
- # startup does not use libports. Disable the default payload to port
- # conversion.
- MIGSFLAGS="-DHURD_DEFAULT_PAYLOAD_TO_PORT=1"
-+fsServer-CFLAGS="-DMIG_EOPNOTSUPP=EOPNOTSUPP"
-+ioServer-CFLAGS="-DMIG_EOPNOTSUPP=EOPNOTSUPP"
-
- include ../Makeconf
-
- mung_msg_S.h: msg_S.h
-- sed 's/msg_server/mung_msg_server/' < $< > $@
-+ sed 's/_msg_server/_mung_msg_server/' < $< > $@
-diff --git a/startup/startup.c b/startup/startup.c
-index 9c45f4b..97a1bab 100644
---- a/startup/startup.c
-+++ b/startup/startup.c
-@@ -51,12 +51,16 @@
- #include <version.h>
- #include <argp.h>
- #include <pids.h>
-+#include <idvec.h>
-
- #include "startup_notify_U.h"
- #include "startup_reply_U.h"
- #include "startup_S.h"
- #include "notify_S.h"
- #include "mung_msg_S.h"
-+#include "fsys_S.h"
-+#include "fs_S.h"
-+#include "io_S.h"
-
- /* host_reboot flags for when we crash. */
- static int crash_flags = RB_AUTOBOOT;
-@@ -498,19 +502,57 @@ run_for_real (char *filename, char *args, int arglen, mach_port_t ctty,
-
- /** Main program and setup **/
-
-+/* XXX: The libc should provide this function. */
-+static void
-+mig_reply_setup (
-+ const mach_msg_header_t *in,
-+ mach_msg_header_t *out)
-+{
-+ static const mach_msg_type_t RetCodeType = {
-+ /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
-+ /* msgt_size = */ 32,
-+ /* msgt_number = */ 1,
-+ /* msgt_inline = */ TRUE,
-+ /* msgt_longform = */ FALSE,
-+ /* msgt_deallocate = */ FALSE,
-+ /* msgt_unused = */ 0
-+ };
-+
-+#define InP (in)
-+#define OutP ((mig_reply_header_t *) out)
-+ OutP->Head.msgh_bits =
-+ MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(InP->msgh_bits), 0);
-+ OutP->Head.msgh_size = sizeof *OutP;
-+ OutP->Head.msgh_remote_port = InP->msgh_remote_port;
-+ OutP->Head.msgh_local_port = MACH_PORT_NULL;
-+ OutP->Head.msgh_seqno = 0;
-+ OutP->Head.msgh_id = InP->msgh_id + 100;
-+ OutP->RetCodeType = RetCodeType;
-+ OutP->RetCode = MIG_BAD_ID;
-+#undef InP
-+#undef OutP
-+}
-+
- static int
- demuxer (mach_msg_header_t *inp,
- mach_msg_header_t *outp)
- {
-- extern int notify_server (mach_msg_header_t *, mach_msg_header_t *);
-- extern int startup_server (mach_msg_header_t *, mach_msg_header_t *);
-- extern int msg_server (mach_msg_header_t *, mach_msg_header_t *);
-- extern int fsys_server (mach_msg_header_t *, mach_msg_header_t *);
--
-- return (notify_server (inp, outp) ||
-- msg_server (inp, outp) ||
-- fsys_server (inp, outp) ||
-- startup_server (inp, outp));
-+ mig_routine_t routine;
-+
-+ mig_reply_setup (inp, outp);
-+
-+ if ((routine = notify_server_routine (inp)) ||
-+ (routine = msg_server_routine (inp)) ||
-+ (routine = fsys_server_routine (inp)) ||
-+ (routine = fs_server_routine (inp)) ||
-+ (routine = io_server_routine (inp)) ||
-+ (routine = startup_server_routine (inp)))
-+ {
-+ (*routine) (inp, outp);
-+ return TRUE;
-+ }
-+ else
-+ return FALSE;
- }
-
- error_t
-@@ -1703,3 +1745,49 @@ S_fsys_forward (mach_port_t server, mach_port_t requestor,
- {
- return EOPNOTSUPP;
- }
-+
-+error_t
-+S_file_check_access (mach_port_t server,
-+ int *allowed)
-+{
-+ if (server != startup)
-+ return EOPNOTSUPP;
-+ *allowed = 0;
-+ return 0;
-+}
-+
-+error_t
-+S_io_stat (mach_port_t server,
-+ struct stat *st)
-+{
-+ if (server != startup)
-+ return EOPNOTSUPP;
-+
-+ memset (st, 0, sizeof *st);
-+
-+ st->st_fstype = FSTYPE_MISC;
-+ st->st_fsid = getpid ();
-+ st->st_mode = S_IFCHR | S_IROOT;
-+
-+ return 0;
-+}
-+
-+error_t
-+S_io_restrict_auth (mach_port_t server,
-+ mach_port_t *newport,
-+ mach_msg_type_name_t *newporttype,
-+ uid_t *uids, size_t nuids,
-+ uid_t *gids, size_t ngids)
-+{
-+ struct idvec user = { uids, (unsigned) nuids, (unsigned) nuids };
-+
-+ if (server != startup)
-+ return EOPNOTSUPP;
-+
-+ if (! idvec_contains (&user, 0))
-+ return EPERM;
-+
-+ *newport = server;
-+ *newporttype = MACH_MSG_TYPE_COPY_SEND;
-+ return 0;
-+}
---
-2.1.4
-
diff --git a/debian/patches/startup0002-startup-add-verbose-parameter.patch b/debian/patches/startup0002-startup-add-verbose-parameter.patch
deleted file mode 100644
index e89047d5..00000000
--- a/debian/patches/startup0002-startup-add-verbose-parameter.patch
+++ /dev/null
@@ -1,230 +0,0 @@
-From 6331a2fbac212715dc26dd7e7ed5aea476a4f359 Mon Sep 17 00:00:00 2001
-From: Justus Winter <justus@gnupg.org>
-Date: Tue, 26 Apr 2016 18:01:41 +0200
-Subject: [PATCH hurd 2/3] startup: add verbose parameter
-
-* startup/startup.c: Add verbose parameter and inform about progress
-through the bootstrap procedure if it is given.
----
- startup/startup.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++------
- 1 file changed, 65 insertions(+), 8 deletions(-)
-
-diff --git a/startup/startup.c b/startup/startup.c
-index 97a1bab..b64f6de 100644
---- a/startup/startup.c
-+++ b/startup/startup.c
-@@ -65,6 +65,8 @@
- /* host_reboot flags for when we crash. */
- static int crash_flags = RB_AUTOBOOT;
-
-+static int verbose = 0;
-+
- #define BOOT(flags) ((flags & RB_HALT) ? "halt" : "reboot")
-
-
-@@ -79,6 +81,7 @@ options[] =
- {"crash-debug", 'H', 0, 0, "On system crash, go to kernel debugger"},
- {"debug", 'd', 0, 0 },
- {"fake-boot", 'f', 0, 0, "This hurd hasn't been booted on the raw machine"},
-+ {"verbose", 'v', 0, 0, "be verbose"},
- {0, 'x', 0, OPTION_HIDDEN},
- {0}
- };
-@@ -401,10 +404,8 @@ run (const char *server, mach_port_t *ports, task_t *task)
- crash_system ();
- }
-
--#if 0
-- printf ("started %s\n", prog);
-- fflush (stdout);
--#endif
-+ if (verbose)
-+ fprintf (stderr, "started %s\n", prog);
-
- /* Dead-name notification on the task port will tell us when it dies,
- so we can crash if we don't make it to a fully bootstrapped Hurd. */
-@@ -539,6 +540,9 @@ demuxer (mach_msg_header_t *inp,
- {
- mig_routine_t routine;
-
-+ if (verbose > 1)
-+ error (0, 0, "%d", inp->msgh_id);
-+
- mig_reply_setup (inp, outp);
-
- if ((routine = notify_server_routine (inp)) ||
-@@ -549,6 +553,9 @@ demuxer (mach_msg_header_t *inp,
- (routine = startup_server_routine (inp)))
- {
- (*routine) (inp, outp);
-+
-+ if (verbose > 1)
-+ error (0, ((mig_reply_header_t *) outp)->RetCode, "%d", inp->msgh_id);
- return TRUE;
- }
- else
-@@ -592,6 +599,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
- case 'n': bootstrap_args |= RB_INITNAME; break;
- case 'f': fakeboot = 1; break;
- case 'H': crash_flags = RB_DEBUGGER; break;
-+ case 'v': verbose++; break;
- case 'x': /* NOP */ break;
- default: return ARGP_ERR_UNKNOWN;
- }
-@@ -705,6 +713,9 @@ launch_core_servers (void)
- mach_port_t authproc, fsproc, procproc;
- error_t err;
-
-+ if (verbose)
-+ fprintf (stderr, "Launching core servers\n");
-+
- /* Reply to the proc and auth servers. */
- err = startup_procinit_reply (procreply, procreplytype, 0,
- mach_task_self (), authserver,
-@@ -717,6 +728,9 @@ launch_core_servers (void)
- device_master = 0;
- }
-
-+ if (verbose)
-+ fprintf (stderr, "proc launched\n");
-+
- /* Mark us as important. */
- err = proc_mark_important (procserver);
- assert_perror (err);
-@@ -741,12 +755,18 @@ launch_core_servers (void)
- /* Good luck. Who knows, maybe it's an old installation. */
- error (0, err, "Failed to bind to " _SERVERS_STARTUP);
-
-+ if (verbose)
-+ fprintf (stderr, "Installed on /servers/startup\n");
-+
- err = startup_authinit_reply (authreply, authreplytype, 0, authproc,
- MACH_MSG_TYPE_COPY_SEND);
- assert_perror (err);
- err = mach_port_deallocate (mach_task_self (), authproc);
- assert_perror (err);
-
-+ if (verbose)
-+ fprintf (stderr, "auth launched\n");
-+
- /* Give the library our auth and proc server ports. */
- _hurd_port_set (&_hurd_ports[INIT_PORT_AUTH], authserver);
- _hurd_port_set (&_hurd_ports[INIT_PORT_PROC], procserver);
-@@ -785,10 +805,9 @@ launch_core_servers (void)
- err = proc_mark_exec (fsproc);
- assert_perror (err);
-
--#if 0
-- printf ("Init has completed.\n");
-- fflush (stdout);
--#endif
-+ if (verbose)
-+ fprintf (stderr, "Init has completed\n");
-+
- printf (".\n");
- fflush (stdout);
-
-@@ -803,11 +822,17 @@ launch_core_servers (void)
- if (old != MACH_PORT_NULL)
- mach_port_deallocate (mach_task_self (), old);
-
-+ if (verbose)
-+ fprintf (stderr, "Message port registered\n");
-+
- /* Give the bootstrap FS its proc and auth ports. */
- err = fsys_init (bootport, fsproc, MACH_MSG_TYPE_COPY_SEND, authserver);
- mach_port_deallocate (mach_task_self (), fsproc);
- if (err)
- error (0, err, "fsys_init"); /* Not necessarily fatal. */
-+
-+ if (verbose)
-+ fprintf (stderr, "Fixed up bootstrap filesystem\n");
- }
-
- /* Set up the initial value of the standard exec data. */
-@@ -874,6 +899,9 @@ frob_kernel_process (void)
- task_t task;
- process_t proc, kbs;
-
-+ if (verbose)
-+ fprintf (stderr, "Frobbing kernel process\n");
-+
- err = proc_pid2task (procserver, HURD_PID_KERNEL, &task);
- if (err)
- {
-@@ -1094,6 +1122,9 @@ start_child (const char *prog, char **progargs)
- }
- assert_perror (err);
-
-+ if (verbose)
-+ fprintf (stderr, "Going to execute '%s'\n", args);
-+
- file = file_name_lookup (args, O_EXEC, 0);
- if (file == MACH_PORT_NULL)
- {
-@@ -1200,6 +1231,9 @@ S_startup_procinit (startup_t server,
- /* Only one proc server. */
- return EPERM;
-
-+ if (verbose)
-+ fprintf (stderr, "Received startup message from proc\n");
-+
- procserver = proc;
-
- procreply = reply;
-@@ -1226,6 +1260,9 @@ S_startup_authinit (startup_t server,
- /* Only one auth server. */
- return EPERM;
-
-+ if (verbose)
-+ fprintf (stderr, "Received startup message from auth\n");
-+
- authserver = auth;
-
- /* Save the reply port until we get startup_procinit. */
-@@ -1258,6 +1295,10 @@ S_startup_essential_task (mach_port_t server,
- if (credential != host_priv)
- return EPERM;
-
-+ if (verbose)
-+ fprintf (stderr, "Received startup essential message from '%s'\n",
-+ name);
-+
- fail = record_essential_task (name, task);
- if (fail)
- return fail;
-@@ -1276,8 +1317,13 @@ S_startup_essential_task (mach_port_t server,
- else if (!strcmp (name, "proc"))
- procinit = 1;
-
-+ if (verbose)
-+ fprintf (stderr, " still waiting for:");
-+
- if (authinit && execinit && procinit)
- {
-+ if (verbose)
-+ fprintf (stderr, " none!\n");
- /* Reply to this RPC, after that everything
- is ready for real startup to begin. */
- startup_essential_task_reply (reply, replytype, 0);
-@@ -1291,6 +1337,17 @@ S_startup_essential_task (mach_port_t server,
-
- return MIG_NO_REPLY;
- }
-+
-+ if (verbose)
-+ {
-+ if (! authinit)
-+ fprintf (stderr, " auth");
-+ if (! execinit)
-+ fprintf (stderr, " exec");
-+ if (! procinit)
-+ fprintf (stderr, " proc");
-+ fprintf (stderr, "\n");
-+ }
- }
-
- return 0;
---
-2.1.4
-
diff --git a/debian/patches/startup0003-startup-use-the-generated-default-server-implementat.patch b/debian/patches/startup0003-startup-use-the-generated-default-server-implementat.patch
deleted file mode 100644
index 45cfbbee..00000000
--- a/debian/patches/startup0003-startup-use-the-generated-default-server-implementat.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From 5f6d67e9df94930a4ecf37daabb5f3c8d92423b4 Mon Sep 17 00:00:00 2001
-From: Justus Winter <justus@gnupg.org>
-Date: Tue, 26 Apr 2016 19:12:17 +0200
-Subject: [PATCH hurd 3/3] startup: use the generated default server
- implementations
-
-* startup/Makefile: Set appropriate flags.
-* startup/startup.c: Drop most stub functions.
----
- startup/Makefile | 3 ++
- startup/startup.c | 102 +-----------------------------------------------------
- 2 files changed, 4 insertions(+), 101 deletions(-)
-
-diff --git a/startup/Makefile b/startup/Makefile
-index db062ad..bda3ffb 100644
---- a/startup/Makefile
-+++ b/startup/Makefile
-@@ -28,6 +28,9 @@ HURDLIBS = shouldbeinlibc
- # startup does not use libports. Disable the default payload to port
- # conversion.
- MIGSFLAGS="-DHURD_DEFAULT_PAYLOAD_TO_PORT=1"
-+notify-MIGSFLAGS="-DNOTIFY_IMPORTS=import <hurd.h>;"
-+notifyServer-CFLAGS="-DMIG_EOPNOTSUPP=EOPNOTSUPP"
-+fsysServer-CFLAGS="-DMIG_EOPNOTSUPP=EOPNOTSUPP"
- fsServer-CFLAGS="-DMIG_EOPNOTSUPP=EOPNOTSUPP"
- ioServer-CFLAGS="-DMIG_EOPNOTSUPP=EOPNOTSUPP"
-
-diff --git a/startup/startup.c b/startup/startup.c
-index b64f6de..2491e92 100644
---- a/startup/startup.c
-+++ b/startup/startup.c
-@@ -1448,41 +1448,6 @@ S_startup_reboot (mach_port_t server,
- for (;;);
- }
-
--/* Stubs for unused notification RPCs. */
--
--kern_return_t
--do_mach_notify_port_destroyed (mach_port_t notify,
-- mach_port_t rights)
--{
-- return EOPNOTSUPP;
--}
--
--kern_return_t
--do_mach_notify_send_once (mach_port_t notify)
--{
-- return EOPNOTSUPP;
--}
--
--kern_return_t
--do_mach_notify_no_senders (mach_port_t port, mach_port_mscount_t mscount)
--{
-- return EOPNOTSUPP;
--}
--
--kern_return_t
--do_mach_notify_port_deleted (mach_port_t notify,
-- mach_port_t name)
--{
-- return EOPNOTSUPP;
--}
--
--kern_return_t
--do_mach_notify_msg_accepted (mach_port_t notify,
-- mach_port_t name)
--{
-- return EOPNOTSUPP;
--}
--
- /* msg server */
-
- kern_return_t
-@@ -1731,75 +1696,10 @@ S_fsys_getroot (mach_port_t fsys_t,
- }
-
- error_t
--S_fsys_goaway (mach_port_t control, int flags)
--{
-- return EOPNOTSUPP;
--}
--
--error_t
--S_fsys_startup (mach_port_t bootstrap, int flags, mach_port_t control,
-- mach_port_t *real, mach_msg_type_name_t *realtype)
--{
-- return EOPNOTSUPP;
--}
--
--error_t
--S_fsys_syncfs (mach_port_t control,
-- int wait,
-- int recurse)
--{
-- return EOPNOTSUPP;
--}
--
--error_t
--S_fsys_set_options (mach_port_t control,
-- char *data, mach_msg_type_number_t len,
-- int do_children)
--{
-- return EOPNOTSUPP;
--}
--
--error_t
- S_fsys_get_options (mach_port_t control,
- char **data, mach_msg_type_number_t *len)
- {
-- return EOPNOTSUPP;
--}
--
--error_t
--S_fsys_getfile (mach_port_t control,
-- uid_t *uids, size_t nuids,
-- uid_t *gids, size_t ngids,
-- char *handle, size_t handllen,
-- mach_port_t *pt,
-- mach_msg_type_name_t *pttype)
--{
-- return EOPNOTSUPP;
--}
--
--error_t
--S_fsys_getpriv (mach_port_t control,
-- mach_port_t *host_priv, mach_msg_type_name_t *host_priv_type,
-- mach_port_t *dev_master, mach_msg_type_name_t *dev_master_type,
-- task_t *fs_task, mach_msg_type_name_t *fs_task_type)
--{
-- return EOPNOTSUPP;
--}
--
--error_t
--S_fsys_init (mach_port_t control,
-- mach_port_t reply,
-- mach_msg_type_name_t replytype,
-- mach_port_t proc,
-- auth_t auth)
--{
-- return EOPNOTSUPP;
--}
--
--error_t
--S_fsys_forward (mach_port_t server, mach_port_t requestor,
-- char *argz, size_t argz_len)
--{
-+ /* XXX Implement me. */
- return EOPNOTSUPP;
- }
-
---
-2.1.4
-