commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 01/01: Fix protected payload, vm_map, setup-translator, add built


From: Samuel Thibault
Subject: [hurd] 01/01: Fix protected payload, vm_map, setup-translator, add built-using
Date: Sun, 09 Nov 2014 23:48:44 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch master
in repository hurd.

commit 41391bd58de49005f9b914e0fbc11fd289880a8b
Author: Samuel Thibault <address@hidden>
Date:   Sun Nov 9 23:47:34 2014 +0000

    Fix protected payload, vm_map, setup-translator, add built-using
    
      * control:
        - Bump gnumach and mig build-depends to get protected payload support.
        - Add Built-Using fields.
        - Add uuid-dev and libblkid-dev Build-Depends.
      * rules: fill built-using field.
      * patches/git-R-protected-payloads.patch: Reapply upstream commit, 
protected
        payload support is fixed.
      * patches/git-vm_map.patch: Fix vm_map call with odd vm_map kernel 
behavior.
      * local/setup-translators: Fix inet6 socket creation.
---
 debian/changelog                              | 14 ++++++
 debian/control                                |  6 ++-
 debian/local/setup-translators                |  4 +-
 debian/patches/git-R-protected-payloads.patch | 68 ---------------------------
 debian/patches/git-vm_map.patch               | 68 +++++++++++++++++++++++++++
 debian/patches/series                         |  2 +-
 debian/rules                                  |  5 ++
 7 files changed, 94 insertions(+), 73 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index d91a7a0..c71eedd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+hurd (1:0.5.git20141108-3) unstable; urgency=medium
+
+  * control:
+    - Bump gnumach and mig build-depends to get protected payload support.
+    - Add Built-Using fields.
+    - Add uuid-dev and libblkid-dev Build-Depends.
+  * rules: fill built-using field.
+  * patches/git-R-protected-payloads.patch: Reapply upstream commit, protected
+    payload support is fixed.
+  * patches/git-vm_map.patch: Fix vm_map call with odd vm_map kernel behavior.
+  * local/setup-translators: Fix inet6 socket creation.
+
+ -- Samuel Thibault <address@hidden>  Sun, 09 Nov 2014 18:25:00 +0000
+
 hurd (1:0.5.git20141108-2) unstable; urgency=medium
 
   * control: Add zlib1g-dev and libbz2-dev build dependencies.
diff --git a/debian/control b/debian/control
index 620ceb9..0de19ba 100644
--- a/debian/control
+++ b/debian/control
@@ -3,12 +3,12 @@ Section: admin
 Priority: required
 Maintainer: GNU Hurd Maintainers <address@hidden>
 Standards-Version: 3.9.6
-Build-Depends: mig (>= 1.4-2), gnumach-dev (>= 1.4-10),
+Build-Depends: mig (>= 1.4-3~), gnumach-dev (>= 1.4+git20141109~),
  libc0.3-dev (>= 2.17-94~), texinfo, libncursesw5-dev,
  debhelper (>= 7.0.50~), autoconf, dh-autoreconf,
  libparted-dev, libpciaccess-dev, libx11-dev, x11proto-core-dev, pkg-config,
  xkb-data, gawk, flex, bison, autotools-dev, libdaemon-dev, libpcap0.8-dev,
- zlib1g-dev, libbz2-dev,
+ zlib1g-dev, libbz2-dev, uuid-dev, libblkid-dev
 Uploaders: Michael Banck <address@hidden>, 
  Samuel Thibault <address@hidden>
 Homepage: http://www.gnu.org/software/hurd/hurd.html
@@ -30,6 +30,7 @@ Essential: yes
 Pre-Depends: hurd-libs0.3
 Depends: ${misc:Depends}, hurd-libs0.3 (= ${binary:Version}), sysv-rc, netdde 
(>= 0.0.20120518~), ${shlibs:Depends}, xkb-data
 Breaks: gnumach (<< 2:1.3.99.dfsg.cvs20070526-1), libc0.3 (<< 
2.18-0experimental1), netdde (<< 0.0.20121127-2)
+Built-Using: ${built-using}
 Suggests: hurd-doc
 Recommends: bf-utf-source
 Provides: makedev, login, console-driver-xkb
@@ -83,6 +84,7 @@ Priority: optional
 Section: debian-installer
 Architecture: hurd-any
 Depends: ${misc:Depends}, ${shlibs:Depends}, hurd-libs0.3-udeb (= 
${binary:Version}), xkb-data-udeb
+Built-Using: ${built-using}
 Provides: hurd, ext2-modules, fat-modules, ipv6-modules, isofs-modules, 
loop-modules, mouse-modules, nfs-modules, socket-modules
 Description: GNU Hurd - udeb
  This is the GNU Hurd udeb package. It contains essential system software and
diff --git a/debian/local/setup-translators b/debian/local/setup-translators
index 7cf625a..9957d30 100755
--- a/debian/local/setup-translators
+++ b/debian/local/setup-translators
@@ -103,9 +103,9 @@ st exec /hurd/exec
 st default-pager /hurd/proxy-defpager
 st socket/1 /hurd/pflocal
 st socket/local '/hurd/symlink 1' '(+link)'
-st socket/2 /hurd/pfinet -6 /servers/socket/26
+st socket/2 '/hurd/pfinet -6 /servers/socket/26' inet
 st socket/inet  '/hurd/symlink 2'  '(+link)'
-st socket/26 /hurd/pfinet -4 /servers/socket/2
+st socket/26 '/hurd/pfinet -4 /servers/socket/2' inet6
 st socket/inet6 '/hurd/symlink 26' '(+link)'
 st /proc '/hurd/procfs -c'
 
diff --git a/debian/patches/git-R-protected-payloads.patch 
b/debian/patches/git-R-protected-payloads.patch
deleted file mode 100644
index 8dc2a03..0000000
--- a/debian/patches/git-R-protected-payloads.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-commit 282e4ae275dc1b9b0b5bba6eb1b145cd1e80fa33
-Author: Justus Winter <address@hidden>
-Date:   Fri Mar 14 00:29:02 2014 +0100
-
-    mach-defpager: use protected payloads for object lookups
-    
-    * mach-defpager/default_pager.c (pager_port_list_insert): Set
-    protected payload.
-    (pager_port_list_delete): Clear protected payload.
-    * mach-defpager/mig-decls.h (begin_using_default_pager_payload): New
-    function.
-    * mach-defpager/mig-mutate.h: Add mutator.
-
-diff --git b/mach-defpager/default_pager.c a/mach-defpager/default_pager.c
-index 831ed96..d40a9c9 100644
---- b/mach-defpager/default_pager.c
-+++ a/mach-defpager/default_pager.c
-@@ -1803,12 +1803,6 @@ void pager_port_list_insert(port, ds)
-                       (hurd_ihash_key_t) port,
-                       (hurd_ihash_value_t) ds);
-       pthread_mutex_unlock(&all_pagers.lock);
--
--      /* Try to set a protected payload.  This is an optimization,
--         if it fails we degrade gracefully.  */
--      mach_port_set_protected_payload (mach_task_self (),
--                                       port,
--                                       (unsigned long) ds);
- }
- 
- void pager_port_list_delete(ds)
-@@ -1818,9 +1812,6 @@ void pager_port_list_delete(ds)
-       hurd_ihash_locp_remove (&all_pagers.htable,
-                               ds->htable_locp);
-       pthread_mutex_unlock(&all_pagers.lock);
--
--      mach_port_clear_protected_payload (mach_task_self (),
--                                         ds->pager);
- }
- 
- /*
-diff --git b/mach-defpager/mig-decls.h a/mach-defpager/mig-decls.h
-index 3357aa2..8118d61 100644
---- b/mach-defpager/mig-decls.h
-+++ a/mach-defpager/mig-decls.h
-@@ -31,10 +31,4 @@ begin_using_default_pager (mach_port_t port)
-                                             (hurd_ihash_key_t) port);
- }
- 
--static inline struct dstruct * __attribute__ ((unused))
--begin_using_default_pager_payload (unsigned long payload)
--{
--  return (default_pager_t) payload;
--}
--
- #endif /* __MACH_DEFPAGER_MIG_DECLS_H__ */
-diff --git b/mach-defpager/mig-mutate.h a/mach-defpager/mig-mutate.h
-index 31acaa6..54aeeba 100644
---- b/mach-defpager/mig-mutate.h
-+++ a/mach-defpager/mig-mutate.h
-@@ -18,8 +18,5 @@
-    along with the GNU Hurd.  If not, see <http://www.gnu.org/licenses/>.  */
- 
- #define MEMORY_OBJECT_INTRAN default_pager_t begin_using_default_pager 
(mach_port_t)
--#define MEMORY_OBJECT_INTRAN_PAYLOAD                  \
--  default_pager_t begin_using_default_pager_payload
--
- #define MEMORY_OBJECT_IMPORTS import "mig-decls.h";
- #define DEFAULT_PAGER_IMPORTS import "mig-decls.h";
diff --git a/debian/patches/git-vm_map.patch b/debian/patches/git-vm_map.patch
new file mode 100644
index 0000000..71928b8
--- /dev/null
+++ b/debian/patches/git-vm_map.patch
@@ -0,0 +1,68 @@
+diff --git a/console/pager.c b/console/pager.c
+index 3568211..5e13ba4 100644
+--- a/console/pager.c
++++ b/console/pager.c
+@@ -169,6 +169,7 @@ user_pager_create (struct user_pager *user_pager, unsigned 
int npages,
+   mach_port_insert_right (mach_task_self (), user_pager->memobj,
+                         user_pager->memobj, MACH_MSG_TYPE_MAKE_SEND);
+ 
++  *user = 0;
+   err = vm_map (mach_task_self (),
+               (vm_address_t *) user,
+               (vm_size_t) npages * vm_page_size,
+diff --git a/libdiskfs/disk-pager.c b/libdiskfs/disk-pager.c
+index 4083ef2..008aa2d 100644
+--- a/libdiskfs/disk-pager.c
++++ b/libdiskfs/disk-pager.c
+@@ -60,6 +60,7 @@ diskfs_start_disk_pager (struct user_pager_info *upi,
+                         MACH_MSG_TYPE_MAKE_SEND);
+ 
+   /* Now map the disk image.  */
++  *image = 0;
+   err = vm_map (mach_task_self (), (vm_address_t *)image, size,
+               0, 1, disk_pager_port, 0, 0,
+               VM_PROT_READ | (diskfs_readonly ? 0 : VM_PROT_WRITE),
+diff --git a/libpager/pager-memcpy.c b/libpager/pager-memcpy.c
+index f2be558..7bdc248 100644
+--- a/libpager/pager-memcpy.c
++++ b/libpager/pager-memcpy.c
+@@ -64,6 +64,7 @@ pager_memcpy (struct pager *pager, memory_object_t memobj,
+         assert (window_size >= VMCOPY_BETTER_THAN_MEMCPY);
+         assert ((window_size & (vm_page_size - 1)) == 0);
+         
++        window = 0;
+         err = vm_map (mach_task_self (), &window, window_size, 0, 1,
+                       memobj, offset, 0, prot, prot, VM_INHERIT_NONE);
+         if (err)
+@@ -110,6 +111,7 @@ pager_memcpy (struct pager *pager, memory_object_t memobj,
+                 window_size = round_page (pageoff + to_copy);
+               }
+ 
++            window = 0;
+             err = vm_map (mach_task_self (), &window, window_size, 0, 1,
+                           memobj, offset - pageoff, 0,
+                           prot, prot, VM_INHERIT_NONE);
+diff --git a/libstore/memobj.c b/libstore/memobj.c
+index 0d5c816..cc6c7ca 100644
+--- a/libstore/memobj.c
++++ b/libstore/memobj.c
+@@ -133,6 +133,7 @@ memobj_read (struct store *store,
+   if (((size_t) addr & (vm_page_size - 1)) == 0)
+     {
+       *len = amount;
++      *buf = 0;
+       return vm_map (mach_task_self (), (vm_address_t *) buf, amount,
+                    0, 1, store->port, addr << store->log2_block_size, 0,
+                    VM_PROT_READ, VM_PROT_ALL, VM_INHERIT_NONE);
+diff --git a/tmpfs/node.c b/tmpfs/node.c
+index acc029a..8835e3f 100644
+--- a/tmpfs/node.c
++++ b/tmpfs/node.c
+@@ -508,6 +508,7 @@ diskfs_get_filemap (struct node *np, vm_prot_t prot)
+       
+       /* XXX we need to keep a reference to the object, or GNU Mach
+        will terminate it when we release the map. */
++      np->dn->u.reg.memref = 0;
+       vm_map (mach_task_self (), &np->dn->u.reg.memref, 4096, 0, 1,
+             np->dn->u.reg.memobj, 0, 0, VM_PROT_NONE, VM_PROT_NONE,
+             VM_INHERIT_NONE);
diff --git a/debian/patches/series b/debian/patches/series
index ab0f1a8..254bc6a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -40,5 +40,5 @@ exec_filename_fix.patch
 mount.patch
 proc_set_init_task.patch
 xkb-compat.patch
-git-R-protected-payloads.patch
+git-vm_map.patch
 newRPC.patch
diff --git a/debian/rules b/debian/rules
index 361604b..f6815aa 100755
--- a/debian/rules
+++ b/debian/rules
@@ -30,6 +30,8 @@ DEB_HOST_MULTIARCH := $(shell dpkg-architecture 
-qDEB_HOST_MULTIARCH)
 INSTALL_in := $(wildcard debian/*.install.in)
 INSTALL_generated := $(patsubst %.in,%,$(INSTALL_in))
 
+BUILT_USING := $(shell dpkg-query -f '$${source:Package} (= 
$${source:Version}), ' -W libc0.3-dev libparted-dev zlib1g-dev libbz2-dev 
uuid-dev libblkid-dev)
+
 %:
        dh $@ -Bbuild-deb --with autotools_dev,autoreconf
 
@@ -108,6 +110,9 @@ override_dh_makeshlibs:
        dh_makeshlibs -phurd-libs0.3 --add-udeb=hurd-libs0.3-udeb
        dh_makeshlibs --remaining-packages -Xusr/lib/hurd/
 
+override_dh_gencontrol:
+       dh_gencontrol -- -V"built-using=$(BUILT_USING)"
+
 override_dh_clean:
        dh_clean
        rm -rf debian/tmp-udeb

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]