diff options
| author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-09-02 23:11:54 +0200 |
|---|---|---|
| committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-09-02 23:11:54 +0200 |
| commit | b64368cc55bf3c44a80ac8f83ef7feab7aca3cab (patch) | |
| tree | b0b6b16ca2889112f183d75feeed8dcb0e416b89 | |
| parent | cfcd520ff021b0561e662bb01f770c5b11f54385 (diff) | |
prepare for splitinit patch series
| -rw-r--r-- | debian/patches/libexec-splitinit.patch | 103 | ||||
| -rw-r--r-- | debian/patches/refcount-use-after-free.patch | 57 | ||||
| -rw-r--r-- | debian/patches/series | 14 |
3 files changed, 113 insertions, 61 deletions
diff --git a/debian/patches/libexec-splitinit.patch b/debian/patches/libexec-splitinit.patch new file mode 100644 index 00000000..03a2594a --- /dev/null +++ b/debian/patches/libexec-splitinit.patch @@ -0,0 +1,103 @@ +diff --git a/config/ttys b/config/ttys +index 6a548d5..d10bfcc 100644 +--- a/config/ttys ++++ b/config/ttys +@@ -4,11 +4,11 @@ + + # name program type status comments + +-console "/libexec/getty 9600" mach-gnu-color on secure trusted console +-tty1 "/libexec/getty 38400" hurd on secure trusted console +-tty2 "/libexec/getty 38400" hurd on secure trusted console +-tty3 "/libexec/getty 38400" hurd on secure trusted console +-tty4 "/libexec/getty 38400" hurd on secure trusted console +-tty5 "/libexec/getty 38400" hurd on secure trusted console +-tty6 "/libexec/getty 38400" hurd on secure trusted console +-#com0 "/libexec/getty 9600" dialup on secure ++console "/sbin/getty 9600" mach-gnu-color on secure trusted console ++tty1 "/sbin/getty 38400" hurd on secure trusted console ++tty2 "/sbin/getty 38400" hurd on secure trusted console ++tty3 "/sbin/getty 38400" hurd on secure trusted console ++tty4 "/sbin/getty 38400" hurd on secure trusted console ++tty5 "/sbin/getty 38400" hurd on secure trusted console ++tty6 "/sbin/getty 38400" hurd on secure trusted console ++#com0 "/sbin/getty 9600" dialup on secure +diff --git a/daemons/runsystem.sh b/daemons/runsystem.sh +index c3cb2d6..0ce4f59 100644 +--- a/daemons/runsystem.hurd ++++ b/daemons/runsystem.hurd +@@ -23,8 +23,8 @@ fallback_shells='/bin/sh /bin/bash /bin/csh /bin/ash /bin/shd' + SHELL=/bin/sh + + # Programs that do multi-user startup. +-RUNCOM=/libexec/rc +-RUNTTYS=/libexec/runttys ++RUNCOM=/etc/hurd/rc ++RUNTTYS=/sbin/runttys + # Signals that we should pass down to runttys. + runttys_sigs='TERM INT HUP TSTP' + +diff --git a/doc/hurd.texi b/doc/hurd.texi +index ea73a4c..7d7af39 100644 +--- a/doc/hurd.texi ++++ b/doc/hurd.texi +@@ -570,7 +570,7 @@ The @option{--multiboot-command-line} option tells the file system server that + it is a root filesystem, which triggers it to run @command{/hurd/init} as PID + 1. @command{/hurd/init} starts the @command{/hurd/proc} and + @command{/hurd/auth} servers. After the servers are launched +-@command{/hurd/init} starts the @command{/libexec/runsystem.sh} script to ++@command{/hurd/init} starts the @command{/etc/hurd/runsystem.sh} script to + finish booting. + + After the Hurd has been booted, other sets of core Hurd servers can be +diff --git a/init/init.c b/init/init.c +index d66bee0..14d822e 100644 +--- a/startup/startup.c ++++ b/startup/startup.c +@@ -888,7 +888,7 @@ frob_kernel_process (void) + /** Running userland. **/ + + /* In the "split-init" setup, we just run a single program (usually +- /libexec/runsystem) that is not expected to ever exit (or stop). ++ /etc/hurd/runsystem) that is not expected to ever exit (or stop). + If it does exit (or can't be started), we go to an emergency single-user + shell as a fallback. */ + +@@ -1004,7 +1004,7 @@ process_signal (int signo) + } + } + +-/* Start the child program PROG. It is run via /libexec/console-run ++/* Start the child program PROG. It is run via /sbin/console-run + with the given additional arguments. */ + static int + start_child (const char *prog, char **progargs) +@@ -1016,7 +1016,7 @@ start_child (const char *prog, char **progargs) + + if (progargs == 0) + { +- const char *argv[] = { "/libexec/console-run", prog, 0 }; ++ const char *argv[] = { "/sbin/console-run", prog, 0 }; + err = argz_create ((char **) argv, &args, &arglen); + } + else +@@ -1026,7 +1026,7 @@ start_child (const char *prog, char **progargs) + ++argc; + { + const char *argv[2 + argc + 1]; +- argv[0] = "/libexec/console-run"; ++ argv[0] = "/sbin/console-run"; + argv[1] = prog; + argv[2 + argc] = 0; + while (argc-- > 0) +@@ -1086,8 +1086,8 @@ launch_something (const char *why) + static unsigned int try; + static const char *const tries[] = + { +- "/libexec/runsystem", +- "/libexec/runsystem.gnu", ++ "/etc/hurd/runsystem", ++ "/etc/hurd/runsystem.gnu", + _PATH_BSHELL, + "/bin/shd", /* XXX */ + }; diff --git a/debian/patches/refcount-use-after-free.patch b/debian/patches/refcount-use-after-free.patch deleted file mode 100644 index b753f459..00000000 --- a/debian/patches/refcount-use-after-free.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/include/refcount.h b/include/refcount.h -index 785b052..533fdfe 100644 ---- a/include/refcount.h -+++ b/include/refcount.h -@@ -31,10 +31,11 @@ - /* An opaque type. You must not access these values directly. */ - typedef unsigned int refcount_t; - --/* Initialize REF with REFERENCES. */ -+/* Initialize REF with REFERENCES. REFERENCES must not be zero. */ - static inline void - refcount_init (refcount_t *ref, unsigned int references) - { -+ assert (references > 0 || !"references must not be zero!"); - *ref = references; - } - -@@ -47,6 +48,7 @@ refcount_ref (refcount_t *ref) - unsigned int r; - r = __atomic_add_fetch (ref, 1, __ATOMIC_RELAXED); - assert (r != UINT_MAX || !"refcount overflowed!"); -+ assert (r != 1 || !"refcount detected use after free!"); - return r; - } - -@@ -101,10 +103,12 @@ union _references { - uint64_t value; - }; - --/* Initialize REF with HARD and WEAK references. */ -+/* Initialize REF with HARD and WEAK references. HARD and WEAK must -+ not both be zero. */ - static inline void - refcounts_init (refcounts_t *ref, uint32_t hard, uint32_t weak) - { -+ assert ((hard != 0 || weak != 0) || !"references must not both be zero!"); - ref->references = (struct references) { .hard = hard, .weak = weak }; - } - -@@ -119,6 +123,8 @@ refcounts_ref (refcounts_t *ref, struct references *result) - union _references r; - r.value = __atomic_add_fetch (&ref->value, op.value, __ATOMIC_RELAXED); - assert (r.references.hard != UINT32_MAX || !"refcount overflowed!"); -+ assert (! (r.references.hard == 1 && r.references.weak == 0) -+ || !"refcount detected use after free!"); - if (result) - *result = r.references; - } -@@ -208,6 +214,8 @@ refcounts_ref_weak (refcounts_t *ref, struct references *result) - union _references r; - r.value = __atomic_add_fetch (&ref->value, op.value, __ATOMIC_RELAXED); - assert (r.references.weak != UINT32_MAX || !"refcount overflowed!"); -+ assert (! (r.references.hard == 0 && r.references.weak == 1) -+ || !"refcount detected use after free!"); - if (result) - *result = r.references; - } diff --git a/debian/patches/series b/debian/patches/series index d1bfb7bd..6c66c127 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,7 +2,9 @@ #david-add-random.patch #half merged diskfs_no_inherit_dir_group.patch -init_try_runsystem.gnu.patch + +#init_try_runsystem.gnu.patch + makedev.diff pfinet_dhcp.patch rc.patch @@ -15,7 +17,10 @@ external.patch console_ignore_bdf_err.patch posix-sigcodes.patch random-default-fast.patch -libexec.patch + +#libexec.patch +libexec-splitinit.patch + run.patch libdde_netdev_tx_t.patch libdde_pci-needs_freset.patch @@ -41,7 +46,9 @@ mount.patch # Gabriele Giacone's patches mount-bind.patch -proc_set_init_task.patch +### disabled for splitinit +# proc_set_init_task.patch + newRPC.patch xkb-compat.patch @@ -54,5 +61,4 @@ fix-net_rcv_msg.patch #pp-dde.patch #pp-random.patch -#refcount-use-after-free.patch 0001-XXX.patch |
