[pkg-remote-commits] [xrdp] 03/04: Disable nasm code on any-i386 for now (needs PIC support).

Thorsten Glaser tg at moszumanska.debian.org
Wed Jan 25 16:13:37 UTC 2017


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

tg pushed a commit to branch master
in repository xrdp.

commit bef15e3645ef73459b8bf397defc28d466930589
Author: mirabilos <t.glaser at tarent.de>
Date:   Wed Jan 25 16:45:26 2017 +0100

    Disable nasm code on any-i386 for now (needs PIC support).
---
 debian/changelog |  4 +++-
 debian/control   |  3 ++-
 debian/rules     | 22 ++++++++++++++++++++++
 3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index c39939d..22ffa5a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,11 +8,13 @@ xrdp (0.9.1-4) unstable; urgency=high
   * Remove patch to make stack not executable in *.asm files; upstrem
     fixed this already.
   * Enable Large File Support, as pointed out by lintian.
+  * Disable assembly code on any-i386 for now, it must be ported
+    (partially rewritten) for PIC support.
 
   [ Dominik George ]
   * Update/minimise systemd service file patch.
 
- -- Dominik George <nik at naturalnet.de>  Wed, 25 Jan 2017 15:39:19 +0100
+ -- Thorsten Glaser <tg at mirbsd.de>  Wed, 25 Jan 2017 16:44:44 +0100
 
 xrdp (0.9.1-3) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index bb0fab5..136f947 100644
--- a/debian/control
+++ b/debian/control
@@ -21,7 +21,8 @@ Build-Depends:
  libx11-dev,
  libxfixes-dev,
  libxrandr-dev,
- nasm [amd64 hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386],
+# for now; see debian/rules for details
+ nasm [amd64 kfreebsd-amd64],
  openssl,
  pkg-config,
  systemd [linux-any],
diff --git a/debian/rules b/debian/rules
index 1d9d0ea..3102540 100755
--- a/debian/rules
+++ b/debian/rules
@@ -26,6 +26,28 @@ ifneq (${DEB_BUILD_GNU_TYPE},${DEB_HOST_GNU_TYPE})
 CONFIGURE_ARGS+=	--host=${DEB_HOST_GNU_TYPE}
 endif
 
+ifeq (i386,${DEB_HOST_ARCH_CPU})
+# The following files must be rewritten to use PIC if -DPIC is passed:
+# - librfxcodec/src/x86/rfxcodec_encode_dwt_shift_x86_sse2.asm
+# - librfxcodec/src/x86/rfxcodec_encode_dwt_shift_x86_sse41.asm
+# - xorgxrdp/module/x86/a8r8g8b8_to_a8b8g8r8_box_x86_sse2.asm
+# - xorgxrdp/module/x86/a8r8g8b8_to_nv12_box_x86_sse2.asm
+# - xorgxrdp/module/x86/i420_to_rgb32_x86_sse2.asm
+# - xorgxrdp/module/x86/uyvy_to_rgb32_x86_sse2.asm
+# - xorgxrdp/module/x86/yuy2_to_rgb32_x86_sse2.asm
+# - xorgxrdp/module/x86/yv12_to_rgb32_x86_sse2.asm
+# Documentation: http://www.nasm.us/doc/nasmdoc9.html#section-9.2
+# Unfortunately, this requires reserving the EBX register, which
+# is used extensively by this code; to avoid crashes or security
+# issues in xrdp, we disable the code on any-i386 for stretch and
+# will revisit this later and with upstream; amd64 isn’t affected
+# (as it uses RIP-relative addressing), x32 and other architectures
+# don’t use the assembly code at all.
+# When fixed, change Build-Depends’ nasm component to:
+# nasm [amd64 hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386],
+CONFIGURE_ARGS+=	--without-simd
+endif
+
 ifeq (x32,${DEB_HOST_ARCH})
 # autodetection fails on x32 (wrongly recognised as amd64)
 CONFIGURE_ARGS+=	--without-simd

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



More information about the pkg-remote-commits mailing list