system/nvidia-legacy304-kernel: Updated for version 304.135.

(* Security fix *)

Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
Edward W. Koenig 2017-02-17 22:50:41 +00:00 committed by David Spencer
parent 8e6534c6c9
commit c9a5c11828
5 changed files with 13 additions and 40 deletions

View file

@ -6,7 +6,7 @@ start the script setting the KERNEL variable as in
KERNEL=2.6.38.8 ./nvidia-legacy304-kernel.SlackBuild
A default config file is placed at /usr/share/X11/xorg.conf.d/10-nvidia.conf
to make sure that X loads the nvidia module. If you need to make changes,
copy that file to /etc/X11/xorg.conf.d/ and edit the copy.
to make sure that X loads the nvidia module. If you need to make changes,
copy that file to /etc/X11/xorg.conf.d/ and edit the copy.
The xf86-video-nouveau-blacklist package from /extra is required.

View file

@ -14,4 +14,4 @@
3.3 05-SEP-2015 version update
3.4 13-DEC-2015 version update, X.org 1.18
3.5 26-JUL-2016 Patched to not use deprecated kernel mtrr API in >=4.3.x kernels --rworkman
4.0 15-FEB-2017 new version, security updates, remove disable-mtrr patch (fixed)

View file

@ -1,25 +0,0 @@
Author: Luca Boccassi <luca.boccassi@gmail.com>
Description: Disable MTRR on kernel >= 4.3
From kernel 4.3 and newer (commit 2baa891e42d84) mtrr_add and mtrr_del are no
longer exported. The Nvidia kernel shim still uses it as of 304.131, causing
the module to error out when loading. Disable MTRR if running on 4.3 or greater
until upstream fixes it.
--- a/nv-linux.h
+++ b/nv-linux.h
@@ -256,6 +256,15 @@
#include <linux/seq_file.h>
#endif
+/*
+ * As of version 304.131, os-agp.c and os-mtrr.c still use deprecated
+ * kernel APIs for mtrr which are no longer exported since 4.3, causing
+ * the module to error out when loaded.
+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
+#undef CONFIG_MTRR
+#endif
+
#if !defined(NV_VMWARE) && defined(CONFIG_MTRR)
#include <asm/mtrr.h>
#endif

View file

@ -3,7 +3,7 @@
# Slackware build script for nvidia-kernel
# Copyright 2007-2011 Heinz Wiesinger, Amsterdam, The Netherlands
# Copyright 2011-2015 Edward W. Koenig, Vancouver, WA, USA
# Copyright 2011-2017 Edward W. Koenig, Vancouver, WA, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -26,8 +26,8 @@
# See changelog.txt
PRGNAM=nvidia-legacy304-kernel
VERSION=${VERSION:-304.131}
BUILD=${BUILD:-2}
VERSION=${VERSION:-304.135}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
KERNEL=${KERNEL:-$(uname -r)}
@ -37,13 +37,13 @@ PKGVER=${VERSION}_$(echo $KERNEL | tr - _)
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
if [ "$ARCH" = "i486" ]; then
if [ "$ARCH" = "i586" ]; then
TARGET="x86"
SRCSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
@ -77,8 +77,6 @@ find -L . \
cd kernel || exit 1
patch -p1 < $CWD/disable-mtrr.patch || exit 1
make SYSSRC=$KERNELPATH module || exit 1
mkdir -p $PKG/lib/modules/$KERNEL/kernel/drivers/video

View file

@ -1,10 +1,10 @@
PRGNAM="nvidia-legacy304-kernel"
VERSION="304.131"
VERSION="304.135"
HOMEPAGE="http://www.nvidia.com"
DOWNLOAD="ftp://download.nvidia.com/XFree86/Linux-x86/304.131/NVIDIA-Linux-x86-304.131.run"
MD5SUM="9f3222fd7287d9b31f54f1d75760e183"
DOWNLOAD_x86_64="ftp://download.nvidia.com/XFree86/Linux-x86_64/304.131/NVIDIA-Linux-x86_64-304.131.run"
MD5SUM_x86_64="e80db7eaf32294d4066f841f0870a85a"
DOWNLOAD="ftp://download.nvidia.com/XFree86/Linux-x86/304.135/NVIDIA-Linux-x86-304.135.run"
MD5SUM="0e2082ae8490b135eb306befe6db56e1"
DOWNLOAD_x86_64="ftp://download.nvidia.com/XFree86/Linux-x86_64/304.135/NVIDIA-Linux-x86_64-304.135.run"
MD5SUM_x86_64="dfd6d6ec0a36d2177229eee5f7dd57ba"
REQUIRES=""
MAINTAINER="Edward W. Koenig"
EMAIL="kingbeowulf@gmail.com"