- Revert patch for CVE-2012-0946 to its original form and apply both CVE
patches when needed, for clarity's sake - Touch some comments in Makefile while here (purely cosmetic)
This commit is contained in:
parent
e3c7f2620a
commit
e6d16fe34c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=304337
@ -64,11 +64,10 @@ EXTRA_PATCHES= ${FILESDIR}/legacy-patch-nvidia.lib.mk
|
||||
|
||||
# Fix recent arbitrary memory access vulnerability in legacy drivers
|
||||
.if ${NVVERSION} <= 1905300
|
||||
. if ${NVVERSION} == 1731435
|
||||
EXTRA_PATCHES+= ${FILESDIR}/security-patch-CVE-2012-4225
|
||||
. else
|
||||
. if ${NVVERSION} != 1731435
|
||||
EXTRA_PATCHES+= ${FILESDIR}/security-patch-CVE-2012-0946
|
||||
. endif
|
||||
EXTRA_PATCHES+= ${FILESDIR}/security-patch-CVE-2012-4225
|
||||
.endif
|
||||
|
||||
OPTIONS= FREEBSD_AGP "Use FreeBSD AGP GART driver" off \
|
||||
@ -111,7 +110,7 @@ post-patch: .SILENT
|
||||
s/int nprot/&, vm_memattr_t *memattr/' \
|
||||
${WRKSRC}/src/nvidia_dev.c
|
||||
.endif
|
||||
# Catch up legacy drivers with FreeBSD SVN r225617
|
||||
# Catch up legacy drivers with FreeBSD src SVN r225617
|
||||
.if ${OSVERSION} > 900043 && ${NVVERSION} < 1952200
|
||||
${REINPLACE_CMD} -e '/return/s/ioctl/sys_&/' \
|
||||
${WRKSRC}/src/nvidia_linux.c
|
||||
@ -135,7 +134,8 @@ post-patch: .SILENT
|
||||
.endif
|
||||
${REINPLACE_CMD} -e '/exists/s/$$/ \&\& !defined(WITHOUT_LINUX)/' \
|
||||
${WRKSRC}/lib/Makefile
|
||||
# Do not install VDPAU libraries, they are provided by `multimedia/libvdpau'
|
||||
# Do not install VDPAU libraries which are provided by `multimedia/libvdpau'
|
||||
# port for a while now
|
||||
.if ${NVVERSION} >= 1802900
|
||||
${REINPLACE_CMD} -e '/libvdpau[[:blank:]_][^n]/d ; \
|
||||
s/name libvdpau/&_nvidia/' ${WRKSRC}/lib/Makefile
|
||||
@ -158,7 +158,8 @@ post-patch: .SILENT
|
||||
${WRKSRC}/x11/extension/Makefile
|
||||
${REINPLACE_CMD} -e '/LIBDIR/s:lib:&/.nvidia:' \
|
||||
${WRKSRC}/lib/libGL/Makefile
|
||||
# Do not execute afterinstall target (prevent automatic module registration)
|
||||
# Do not execute afterinstall target (prevent automatic module registration
|
||||
# and "smart" installation of conflicting files heuristics)
|
||||
${REINPLACE_CMD} -e 's/afterinstall/dontexecute/' ${WRKSRC}/Makefile
|
||||
${REINPLACE_CMD} -e 's/beforeinstall/dontexecute/' \
|
||||
${WRKSRC}/lib/Makefile ${WRKSRC}/src/Makefile
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- src/nv.h.orig 2011-07-14 02:51:53.000000000 +0800
|
||||
+++ src/nv.h 2012-05-10 18:15:51.000000000 +0800
|
||||
@@ -364,6 +364,27 @@
|
||||
@@ -364,6 +364,14 @@
|
||||
((offset) >= (nv)->agp.address) && \
|
||||
(((offset) + ((length)-1)) <= (nv)->agp.address + ((nv)->agp.size-1)))
|
||||
|
||||
@ -10,20 +10,7 @@
|
||||
+
|
||||
+#define IS_BLACKLISTED_REG_OFFSET(nv, offset, length) \
|
||||
+ ((IS_REG_RANGE_WITHIN_MAPPING(nv, 0x1000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x84000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x85000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x86000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x87000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x89000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0xa0000, 0x20000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x104000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x105000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x10a000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x1c2000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x1c3000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x618000, 0x2000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x627000, 0x1000, offset, length)) ||\
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x700000, 0x100000, offset, length)))
|
||||
+ (IS_REG_RANGE_WITHIN_MAPPING(nv, 0x700000, 0x100000, offset, length)))
|
||||
+
|
||||
/* duplicated from nvos.h for external builds */
|
||||
#ifndef NVOS_AGP_CONFIG_DISABLE_AGP
|
||||
|
Loading…
Reference in New Issue
Block a user