summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/patches/exec-redzone0.patch36
-rw-r--r--debian/patches/procfs-0001-procfs-implement-proc-N-maps.patch2
-rw-r--r--debian/patches/procfs-0002-procfs-implement-proc-filesystems.patch2
-rw-r--r--debian/patches/procfs-0003-procfs-implement-proc-N-mounts.patch2
-rw-r--r--debian/patches/procfs-0004-procfs-do-not-test-whether-hurd-mtab-exists.patch2
-rw-r--r--debian/patches/procfs-0005-procfs-generalize-the-translator-linkage-code.patch2
-rw-r--r--debian/patches/procfs-0006-procfs-reorganize-rootdir.c.patch2
-rw-r--r--debian/patches/procfs-0007-procfs-provide-magic-retry-response-for-proc-self.patch24
-rw-r--r--debian/patches/series5
9 files changed, 57 insertions, 20 deletions
diff --git a/debian/patches/exec-redzone0.patch b/debian/patches/exec-redzone0.patch
new file mode 100644
index 00000000..59398093
--- /dev/null
+++ b/debian/patches/exec-redzone0.patch
@@ -0,0 +1,36 @@
+From 08936efa78337cdd50676fbde2f61ae13c249a01 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Mon, 22 Sep 2014 17:59:57 +0200
+Subject: [PATCH] exec: redzone page zero before loading anything
+
+This prevents load_section from mapping any sections to page zero.
+
+* exec/exec.c (do_exec): Redzone page zero before loading anything.
+---
+ exec/exec.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/exec/exec.c b/exec/exec.c
+index 2fc1e44..0ecf2d3 100644
+--- a/exec/exec.c
++++ b/exec/exec.c
+@@ -1116,6 +1116,16 @@ do_exec (file_t file,
+ mach_port_destroy (oldtask, destroynames[i]);
+ }
+
++ /* Map page zero redzoned. */
++ {
++ vm_address_t addr = 0;
++ e.error = vm_map (newtask,
++ &addr, vm_page_size, 0, 0, MACH_PORT_NULL, 0, 1,
++ VM_PROT_NONE, VM_PROT_NONE, VM_INHERIT_COPY);
++ if (e.error)
++ goto out;
++ }
++
+ /* XXX this should be below
+ it is here to work around a vm_map kernel bug. */
+ if (interp.file != MACH_PORT_NULL)
+--
+2.1.0
+
diff --git a/debian/patches/procfs-0001-procfs-implement-proc-N-maps.patch b/debian/patches/procfs-0001-procfs-implement-proc-N-maps.patch
index ff3dc5bb..5ae7b696 100644
--- a/debian/patches/procfs-0001-procfs-implement-proc-N-maps.patch
+++ b/debian/patches/procfs-0001-procfs-implement-proc-N-maps.patch
@@ -1,4 +1,4 @@
-From 77c514cb7d3dd577576df13353b350052c37003a Mon Sep 17 00:00:00 2001
+From 42c7918ae29df491489b000b44318dcfe232a40a Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Thu, 18 Sep 2014 18:38:04 +0200
Subject: [PATCH 1/7] procfs: implement /proc/N/maps
diff --git a/debian/patches/procfs-0002-procfs-implement-proc-filesystems.patch b/debian/patches/procfs-0002-procfs-implement-proc-filesystems.patch
index b2f0bfe3..a344214e 100644
--- a/debian/patches/procfs-0002-procfs-implement-proc-filesystems.patch
+++ b/debian/patches/procfs-0002-procfs-implement-proc-filesystems.patch
@@ -1,4 +1,4 @@
-From b3fcc07220f528889f00a08e40f9a801afc6f6bb Mon Sep 17 00:00:00 2001
+From 7a3280d44f3ff7550d67fcc0689a2b2a24738aa7 Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Thu, 18 Sep 2014 19:38:04 +0200
Subject: [PATCH 2/7] procfs: implement /proc/filesystems
diff --git a/debian/patches/procfs-0003-procfs-implement-proc-N-mounts.patch b/debian/patches/procfs-0003-procfs-implement-proc-N-mounts.patch
index 45decfeb..431ec01e 100644
--- a/debian/patches/procfs-0003-procfs-implement-proc-N-mounts.patch
+++ b/debian/patches/procfs-0003-procfs-implement-proc-N-mounts.patch
@@ -1,4 +1,4 @@
-From 815204e71cde5b6c6e09edd8e46337f264206908 Mon Sep 17 00:00:00 2001
+From 5deac76856050d42d26f08d11a27d13d8de9ed4d Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Fri, 19 Sep 2014 07:54:04 +0200
Subject: [PATCH 3/7] procfs: implement /proc/N/mounts
diff --git a/debian/patches/procfs-0004-procfs-do-not-test-whether-hurd-mtab-exists.patch b/debian/patches/procfs-0004-procfs-do-not-test-whether-hurd-mtab-exists.patch
index 97577ec6..9fc702b5 100644
--- a/debian/patches/procfs-0004-procfs-do-not-test-whether-hurd-mtab-exists.patch
+++ b/debian/patches/procfs-0004-procfs-do-not-test-whether-hurd-mtab-exists.patch
@@ -1,4 +1,4 @@
-From cf724544bb644bf081d7a83524ca6ac25ed198f1 Mon Sep 17 00:00:00 2001
+From 736f7a36161800e20c30045e4eb898196e4b0027 Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Fri, 19 Sep 2014 08:18:33 +0200
Subject: [PATCH 4/7] procfs: do not test whether /hurd/mtab exists
diff --git a/debian/patches/procfs-0005-procfs-generalize-the-translator-linkage-code.patch b/debian/patches/procfs-0005-procfs-generalize-the-translator-linkage-code.patch
index 7233bf64..ea810348 100644
--- a/debian/patches/procfs-0005-procfs-generalize-the-translator-linkage-code.patch
+++ b/debian/patches/procfs-0005-procfs-generalize-the-translator-linkage-code.patch
@@ -1,4 +1,4 @@
-From 5bc2ea2e6377e0f5f0d341ce0631da70669b9ceb Mon Sep 17 00:00:00 2001
+From ce21071c13ce02ef168674e5ee4be1040322fc46 Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Fri, 19 Sep 2014 10:01:57 +0200
Subject: [PATCH 5/7] procfs: generalize the translator linkage code
diff --git a/debian/patches/procfs-0006-procfs-reorganize-rootdir.c.patch b/debian/patches/procfs-0006-procfs-reorganize-rootdir.c.patch
index 34ffc9bc..97aaf063 100644
--- a/debian/patches/procfs-0006-procfs-reorganize-rootdir.c.patch
+++ b/debian/patches/procfs-0006-procfs-reorganize-rootdir.c.patch
@@ -1,4 +1,4 @@
-From 57cc10fd45bec12e61a783e5ccced10be956483a Mon Sep 17 00:00:00 2001
+From b4eb19fb7f1935b51c0335dcd1f957b38299af69 Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Fri, 19 Sep 2014 10:10:24 +0200
Subject: [PATCH 6/7] procfs: reorganize rootdir.c
diff --git a/debian/patches/procfs-0007-procfs-provide-magic-retry-response-for-proc-self.patch b/debian/patches/procfs-0007-procfs-provide-magic-retry-response-for-proc-self.patch
index 74b0bc97..abfa8136 100644
--- a/debian/patches/procfs-0007-procfs-provide-magic-retry-response-for-proc-self.patch
+++ b/debian/patches/procfs-0007-procfs-provide-magic-retry-response-for-proc-self.patch
@@ -1,4 +1,4 @@
-From bb245976b92068ca5239b5b860aa4dbfd70b44a5 Mon Sep 17 00:00:00 2001
+From b1faf7142f061ae981f45b23d0f9731b881a622b Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Sun, 21 Sep 2014 12:03:47 +0200
Subject: [PATCH 7/7] procfs: provide magic retry response for /proc/self
@@ -32,10 +32,10 @@ index 4341177..f22816d 100644
};
typedef enum retry_type retry_type;
diff --git a/hurd/paths.h b/hurd/paths.h
-index 92875b2..32bc2b4 100644
+index a13ba9b..e1b00e9 100644
--- a/hurd/paths.h
+++ b/hurd/paths.h
-@@ -53,6 +53,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+@@ -54,6 +54,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define _HURD_IFSOCK _HURD "ifsock" /* S_IFSOCK */
/* Symbolic names for all non-essential translators. */
@@ -44,10 +44,10 @@ index 92875b2..32bc2b4 100644
#endif /* hurd/paths.h */
diff --git a/procfs/main.c b/procfs/main.c
-index 54e9682..1afc923 100644
+index 36a2d25..cec2d72 100644
--- a/procfs/main.c
+++ b/procfs/main.c
-@@ -34,14 +34,12 @@
+@@ -35,14 +35,12 @@
/* Command-line options */
int opt_clk_tck;
mode_t opt_stat_mode;
@@ -59,10 +59,10 @@ index 54e9682..1afc923 100644
#define OPT_CLK_TCK sysconf(_SC_CLK_TCK)
#define OPT_STAT_MODE 0400
-#define OPT_FAKE_SELF -1
- #define OPT_KERNEL_PID 2
+ #define OPT_KERNEL_PID HURD_PID_KERNEL
#define OPT_ANON_OWNER 0
-@@ -74,19 +72,6 @@ argp_parser (int key, char *arg, struct argp_state *state)
+@@ -75,19 +73,6 @@ argp_parser (int key, char *arg, struct argp_state *state)
opt_stat_mode = v;
break;
@@ -82,7 +82,7 @@ index 54e9682..1afc923 100644
case 'k':
v = strtol (arg, &endp, 0);
if (*endp || ! *arg || (signed) opt_kernel_pid < 0)
-@@ -98,7 +83,6 @@ argp_parser (int key, char *arg, struct argp_state *state)
+@@ -99,7 +84,6 @@ argp_parser (int key, char *arg, struct argp_state *state)
case 'c':
opt_clk_tck = 100;
opt_stat_mode = 0444;
@@ -90,10 +90,10 @@ index 54e9682..1afc923 100644
break;
case 'a':
-@@ -146,10 +130,6 @@ struct argp_option common_options[] = {
+@@ -149,10 +133,6 @@ struct argp_option common_options[] = {
"You can use this option to override its mode to be more permissive "
"for compatibility purposes. "
- "(default: 0400)" },
+ "(default: " STR (OPT_STAT_MODE) ")" },
- { "fake-self", 'S', "PID", OPTION_ARG_OPTIONAL,
- "Provide a fake \"self\" symlink to the given PID, for compatibility "
- "purposes. If PID is omitted, \"self\" will point to init. "
@@ -101,7 +101,7 @@ index 54e9682..1afc923 100644
{ "kernel-process", 'k', "PID", 0,
"Process identifier for the kernel, used to retreive its command "
"line, as well as the global up and idle times. "
-@@ -243,9 +223,6 @@ netfs_append_args (char **argz, size_t *argz_len)
+@@ -248,9 +228,6 @@ netfs_append_args (char **argz, size_t *argz_len)
FOPT (opt_stat_mode, OPT_STAT_MODE,
"--stat-mode=%o", opt_stat_mode);
@@ -111,7 +111,7 @@ index 54e9682..1afc923 100644
FOPT (opt_anon_owner, OPT_ANON_OWNER,
"--anonymous-owner=%d", opt_anon_owner);
-@@ -287,7 +264,6 @@ int main (int argc, char **argv)
+@@ -292,7 +269,6 @@ int main (int argc, char **argv)
opt_clk_tck = OPT_CLK_TCK;
opt_stat_mode = OPT_STAT_MODE;
diff --git a/debian/patches/series b/debian/patches/series
index e629d085..3b4a3184 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -67,5 +67,6 @@ procfs-0003-procfs-implement-proc-N-mounts.patch
procfs-0004-procfs-do-not-test-whether-hurd-mtab-exists.patch
procfs-0005-procfs-generalize-the-translator-linkage-code.patch
procfs-0006-procfs-reorganize-rootdir.c.patch
-# grr, collides with the startup patch series
-#procfs-0007-procfs-provide-magic-retry-response-for-proc-self.patch
+procfs-0007-procfs-provide-magic-retry-response-for-proc-self.patch
+
+exec-redzone0.patch