mirror of
https://github.com/archlinux-jerry/nvidia-340xx
synced 2024-12-23 06:29:24 +08:00
Update to 340.108-6
This commit is contained in:
parent
2f3739c817
commit
9ae3a28fa1
6 changed files with 65 additions and 10 deletions
12
.SRCINFO
12
.SRCINFO
|
@ -1,7 +1,7 @@
|
||||||
pkgbase = nvidia-340xx
|
pkgbase = nvidia-340xx
|
||||||
pkgdesc = NVIDIA drivers for linux, 340xx legacy branch
|
pkgdesc = NVIDIA drivers for linux, 340xx legacy branch
|
||||||
pkgver = 340.108
|
pkgver = 340.108
|
||||||
pkgrel = 5
|
pkgrel = 6
|
||||||
url = https://www.nvidia.com/
|
url = https://www.nvidia.com/
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
license = custom
|
license = custom
|
||||||
|
@ -11,13 +11,15 @@ pkgbase = nvidia-340xx
|
||||||
conflicts = nvidia
|
conflicts = nvidia
|
||||||
options = !strip
|
options = !strip
|
||||||
source = https://us.download.nvidia.com/XFree86/Linux-x86_64/340.108/NVIDIA-Linux-x86_64-340.108-no-compat32.run
|
source = https://us.download.nvidia.com/XFree86/Linux-x86_64/340.108/NVIDIA-Linux-x86_64-340.108-no-compat32.run
|
||||||
source = 01-unfuck-for-340.108-build-fix.patch
|
source = 01-fix_multi_core_build.patch
|
||||||
source = 02-unfuck-for-5.5.x.patch
|
source = 02-unfuck-for-340.108-build-fix.patch
|
||||||
source = fix_multi_core_build.patch
|
source = 03-unfuck-for-5.5.x.patch
|
||||||
|
source = 04-fix_message_in_dmesg.patch
|
||||||
sha256sums = 995d44fef587ff5284497a47a95d71adbee0c13020d615e940ac928f180f5b77
|
sha256sums = 995d44fef587ff5284497a47a95d71adbee0c13020d615e940ac928f180f5b77
|
||||||
|
sha256sums = 82d14e9e6ec47c345d225d9f398238b7254cd5ae581c70e8521b9157ec747890
|
||||||
sha256sums = 2b7e3ef24846a40f4492e749be946e4f7f70ebed054bc2c9079f6cbdcbfabe57
|
sha256sums = 2b7e3ef24846a40f4492e749be946e4f7f70ebed054bc2c9079f6cbdcbfabe57
|
||||||
sha256sums = c28d65854dd03e6a9e00d79fa0ca3521c11b2c198882bbd50870c8e71d18d765
|
sha256sums = c28d65854dd03e6a9e00d79fa0ca3521c11b2c198882bbd50870c8e71d18d765
|
||||||
sha256sums = 82d14e9e6ec47c345d225d9f398238b7254cd5ae581c70e8521b9157ec747890
|
sha256sums = 7f90e80be6338f6fc902d257d8ceb09e89b40d008f7a3ad9fe82833cd5b89316
|
||||||
|
|
||||||
pkgname = nvidia-340xx
|
pkgname = nvidia-340xx
|
||||||
pkgdesc = NVIDIA drivers for linux, 340xx legacy branch
|
pkgdesc = NVIDIA drivers for linux, 340xx legacy branch
|
||||||
|
|
51
04-fix_message_in_dmesg.patch
Normal file
51
04-fix_message_in_dmesg.patch
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
Patch by vova7890
|
||||||
|
> vova7890 commented on 2020-03-19 01:01
|
||||||
|
> I'm facing this message in dmesg: Bad or missing usercopy whitelist?
|
||||||
|
> Kernel memory exposure attempt detected from SLUB object 'nvidia_stack_t'
|
||||||
|
> A little search and I had portback this patch to 340xx.
|
||||||
|
> Can you please add this? https://zvova7890.com.ua/s/ed9JJG8KyQKQQBx
|
||||||
|
--
|
||||||
|
vova7890 commented on 2020-03-19 01:01
|
||||||
|
diff -Naur a/nv.c b/nv.c
|
||||||
|
--- a/nv.c 2019-12-12 00:04:24.000000000 +0200
|
||||||
|
+++ b/nv.c 2020-03-19 04:21:13.923750900 +0200
|
||||||
|
@@ -752,7 +752,7 @@
|
||||||
|
NV_SPIN_LOCK_INIT(&km_lock);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
- NV_KMEM_CACHE_CREATE(nv_stack_t_cache, NV_STACK_CACHE_STR, nv_stack_t);
|
||||||
|
+ NV_KMEM_CACHE_CREATE_USERCOPY(nv_stack_t_cache, NV_STACK_CACHE_STR, nv_stack_t);
|
||||||
|
if (nv_stack_t_cache == NULL)
|
||||||
|
{
|
||||||
|
nv_printf(NV_DBG_ERRORS, "NVRM: stack cache allocation failed!\n");
|
||||||
|
diff -Naur a/nv-linux.h b/nv-linux.h
|
||||||
|
--- a/nv-linux.h 2019-12-12 00:04:24.000000000 +0200
|
||||||
|
+++ b/nv-linux.h 2020-03-19 04:21:13.927084233 +0200
|
||||||
|
@@ -762,9 +762,27 @@
|
||||||
|
kmem_cache = kmem_cache_create(name, sizeof(type), \
|
||||||
|
0, 0, NULL); \
|
||||||
|
}
|
||||||
|
+#define NV_KMEM_CACHE_CREATE_FULL(name, size, align, flags, ctor) \
|
||||||
|
+ kmem_cache_create(name, size, align, flags, ctor)
|
||||||
|
#else
|
||||||
|
#error "NV_KMEM_CACHE_CREATE_ARGUMENT_COUNT value unrecognized!"
|
||||||
|
#endif
|
||||||
|
+
|
||||||
|
+#define NV_KMEM_CACHE_CREATE_FULL_USERCOPY(name, size, align, flags, useroffset, usersize, ctor) \
|
||||||
|
+ kmem_cache_create_usercopy(name, size, align, flags, useroffset, usersize, ctor);
|
||||||
|
+
|
||||||
|
+#ifdef SLAB_USERCOPY
|
||||||
|
+#define NV_KMEM_CACHE_CREATE_USERCOPY(kmem_cache, name, type) \
|
||||||
|
+ { \
|
||||||
|
+ kmem_cache = NV_KMEM_CACHE_CREATE_FULL(name, sizeof(type), 0, SLAB_USERCOPY, NULL); \
|
||||||
|
+ }
|
||||||
|
+#else
|
||||||
|
+#define NV_KMEM_CACHE_CREATE_USERCOPY(kmem_cache, name, type) \
|
||||||
|
+ { \
|
||||||
|
+ kmem_cache = NV_KMEM_CACHE_CREATE_FULL_USERCOPY(name, sizeof(type), 0, 0, 0, sizeof(type), NULL); \
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#define NV_KMEM_CACHE_DESTROY(kmem_cache) \
|
||||||
|
{ \
|
||||||
|
kmem_cache_destroy(kmem_cache); \
|
12
PKGBUILD
12
PKGBUILD
|
@ -6,7 +6,7 @@
|
||||||
pkgbase=nvidia-340xx
|
pkgbase=nvidia-340xx
|
||||||
pkgname=(nvidia-340xx nvidia-340xx-dkms)
|
pkgname=(nvidia-340xx nvidia-340xx-dkms)
|
||||||
pkgver=340.108
|
pkgver=340.108
|
||||||
pkgrel=5
|
pkgrel=6
|
||||||
pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
|
pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="https://www.nvidia.com/"
|
url="https://www.nvidia.com/"
|
||||||
|
@ -17,14 +17,16 @@ options=(!strip)
|
||||||
# seems manjaro is keeping this current
|
# seems manjaro is keeping this current
|
||||||
# https://gitlab.manjaro.org/packages?utf8=%E2%9C%93&filter=nvidia-340xx
|
# https://gitlab.manjaro.org/packages?utf8=%E2%9C%93&filter=nvidia-340xx
|
||||||
source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
|
source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
|
||||||
01-unfuck-for-340.108-build-fix.patch
|
01-fix_multi_core_build.patch
|
||||||
02-unfuck-for-5.5.x.patch
|
02-unfuck-for-340.108-build-fix.patch
|
||||||
fix_multi_core_build.patch
|
03-unfuck-for-5.5.x.patch
|
||||||
|
04-fix_message_in_dmesg.patch
|
||||||
)
|
)
|
||||||
sha256sums=('995d44fef587ff5284497a47a95d71adbee0c13020d615e940ac928f180f5b77'
|
sha256sums=('995d44fef587ff5284497a47a95d71adbee0c13020d615e940ac928f180f5b77'
|
||||||
|
'82d14e9e6ec47c345d225d9f398238b7254cd5ae581c70e8521b9157ec747890'
|
||||||
'2b7e3ef24846a40f4492e749be946e4f7f70ebed054bc2c9079f6cbdcbfabe57'
|
'2b7e3ef24846a40f4492e749be946e4f7f70ebed054bc2c9079f6cbdcbfabe57'
|
||||||
'c28d65854dd03e6a9e00d79fa0ca3521c11b2c198882bbd50870c8e71d18d765'
|
'c28d65854dd03e6a9e00d79fa0ca3521c11b2c198882bbd50870c8e71d18d765'
|
||||||
'82d14e9e6ec47c345d225d9f398238b7254cd5ae581c70e8521b9157ec747890')
|
'7f90e80be6338f6fc902d257d8ceb09e89b40d008f7a3ad9fe82833cd5b89316')
|
||||||
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
|
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
|
||||||
|
|
||||||
# default is 'linux' substitute custom name here
|
# default is 'linux' substitute custom name here
|
||||||
|
|
Loading…
Reference in a new issue