Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2013 09:43:14 +0200
From:      "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   r255426: CRASH (core dump) from nvdidia-driver and virtualbox due to vm_map changes (via r255426)
Message-ID:  <20130910094314.66ceda2d@thor.walstatt.dyndns.org>

next in thread | raw e-mail | index | archive | help
--Sig_/2m2im1cI24mrsljLeAW4_qU
Content-Type: multipart/mixed; boundary="MP_//c+gdqEhnUKrzJFA4o3Nrbk"

--MP_//c+gdqEhnUKrzJFA4o3Nrbk
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline


The changes made with r255426 make x11/nvdia-driver and
emuldator/virtualbox-ose-kmod coredumping. Especially the virtualbox
driver is a hard one.

For the x11/nvidia-driver, I have a patch and it should be similar to
the vbox driver, but I have massive problems understanding a sed error,
which is:

sed: 1: "s/\(&virtual_address, s ...": unescaped newline inside
substitute pattern

I use the following addition to the port's x11/nvidia-driver Makefile
(see patch attached), starting at line 262 of the recent Makefile (I
mark the newline break of claws-mail with a [\] sign):

# Change of number of arguments (9 -> 10) in vm_map_find() due to [\]
r255426=20
.if ${OSVERSION} > 1000053=20
 ${REINPLACE_CMD} -e 's/\(&virtual_address, size,\) \(VMFS_ANY_SPACE,\)$/\1=
 0, \2/' \
 ${WRKSRC}/src/nvidia_subr.c
.endif

This should change line 833 in the driver's nvidia_subr.c file.

The (not so) funny part in this is that the patch drops out
with the error mentioned above, but applying the very same substitution
patter for sed on the command line via

(make clean extract in x11/nvidia-driver)

sed -i.bak -e 's/\(&virtual_address, size,\) \(VMFS_ANY_SPACE,\)$/\1 0, \2/=
' \=20
work/NVIDIA-FreeBSD-x86_64-325.15/src/nvidia_subr.c

This works perfectly and makes in nvidia_subr.c, line 833,

from:
&virtual_address, size, VMFS_ANY_SPACE,

to:
&virtual_address, size, 0, VMFS_ANY_SPACE,

which is exactly what I want to have.

But why is this crap ${REINPLACE_CMD} stuff in the Makefile not working?=20
Is the Makefile interpreting something within the substitution?


I files a PR for that specific matter for the x11/nvidia-driver via
ports/181972.

The patch for the vbox mess should be similar, but since I'm to dumb to fig=
ure out why=20
the sed string in the Makefile isn't working, there is no way to put efford=
s in it.

If someone could shed light on this, you're welcome.

Oliver

--MP_//c+gdqEhnUKrzJFA4o3Nrbk
Content-Type: text/x-patch
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename=nvidia_patch_4th.patch

--- Makefile.orig	2013-09-10 00:30:53.000000000 +0200
+++ Makefile	2013-09-10 09:41:23.000000000 +0200
@@ -160,6 +160,11 @@
 		s/CAP_IOCTL/cap_rights_init(\&rights, &)/' \
 			${WRKSRC}/src/nvidia_linux.c
 .endif
+# Change of number of arguments (9 -> 10) in vm_map_find() due to r255426
+.if ${OSVERSION} > 1000053
+	${REINPLACE_CMD} -e 's/\(&virtual_address, size,\) \(VMFS_ANY_SPACE,\)$/\=
1 0, \2/' \
+	${WRKSRC}/src/nvidia_subr.c
+.endif
 # Fix stack buffer overflow in nvidia_sysctl_bus_type()
 .if ${NVVERSION} < 3192300
 	${REINPLACE_CMD} -E '/bus_type\[4\]/d ; \

--MP_//c+gdqEhnUKrzJFA4o3Nrbk--

--Sig_/2m2im1cI24mrsljLeAW4_qU
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (FreeBSD)

iQEcBAEBAgAGBQJSLs2WAAoJEOgBcD7A/5N8NsUIAJKGVeHGHN3PMPgq7LYs1Wmh
haHO8CBykkOu7xo5alT/m7w7ql69/CmqQKLobIELy44sv43E/wFnL7fHT/Wsfzdx
wiro21umnwJnEHULI4mkNrR0UXWj/zVToz5CmOHdsb2FobG0QP8hMfH7BDqoxBgZ
sXHhQxvMWwFuOYklTk1TqYFsscVXcW2E/2NPf9HLPb2ZwLe7XP4FwdEVTpDo5gRJ
HlthZ3/+vxsvX7OrNl3GC2lbZQysZxCP9Cl7q1OsIuJ9OUqFv4+sWo+9aCSJcOLh
zZXGt8xC30LIjaGuORd4sxje0nE17xKEt5I0T81HUrBdFqQWBw8MDuQTCHE81U0=
=JHDN
-----END PGP SIGNATURE-----

--Sig_/2m2im1cI24mrsljLeAW4_qU--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130910094314.66ceda2d>