nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   nvidia-190.53-2.6.33.patch has a bug in it (http://www.nvnews.net/vbulletin/showthread.php?t=148296)

ShiningArcanine 02-25-10 08:45 AM

nvidia-190.53-2.6.33.patch has a bug in it
 
I posted a bug report on Gentoo's bugzilla a while ago regarding getting the 190.53 drivers to work with kernel 2.6.33 and also posted the patch from here that allows the drivers to work with that kernel version.

Apparently, there is a logical error in the patch that a very clever person caught. Here is the bug report:

http://bugs.gentoo.org/show_bug.cgi?id=301318

I attached the updated patch to the bug report. Anyone running with it will probably want to reinstall their nvidia drivers using the fixed patch, otherwise, they will risk strange things happening when the driver interacts with ACPI.

I probably should have done something about this when Yuval Hager pointed out the issue (or caught the issue myself by actually reading the patch), but I am an undergraduate computer science student and this is all new to me, so I thought it was best to leave such things to more experienced people. Despite that, no one has acted upon this and the 2.6.33 kernel was released yesterday, so I am doing something about it now.

nomadewolf 03-12-10 08:59 AM

Re: nvidia-190.53-2.6.33.patch has a bug in it
 
Quote:

Originally Posted by ShiningArcanine (Post 2195619)
I posted a bug report on Gentoo's bugzilla a while ago regarding getting the 190.53 drivers to work with kernel 2.6.33 and also posted the patch from here that allows the drivers to work with that kernel version.

Apparently, there is a logical error in the patch that a very clever person caught. Here is the bug report:

http://bugs.gentoo.org/show_bug.cgi?id=301318

I attached the updated patch to the bug report. Anyone running with it will probably want to reinstall their nvidia drivers using the fixed patch, otherwise, they will risk strange things happening when the driver interacts with ACPI.

I probably should have done something about this when Yuval Hager pointed out the issue (or caught the issue myself by actually reading the patch), but I am an undergraduate computer science student and this is all new to me, so I thought it was best to leave such things to more experienced people. Despite that, no one has acted upon this and the 2.6.33 kernel was released yesterday, so I am doing something about it now.

Hi!
How do you apply/use the patch, exactly?...

dtor 03-12-10 11:42 AM

Re: nvidia-190.53-2.6.33.patch has a bug in it
 
Heh, not only community patch has a bug in it, but it looks like Nvidia made the same error in their official driver:

#if defined(KERNEL_2_4) || \
(NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT == 6)
#define NV_ACPI_WALK_NAMESPACE(type, args...) acpi_walk_namespace(type, args)
#elif (NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT == 7)
#define NV_ACPI_WALK_NAMESPACE(type, args...) \
acpi_walk_namespace(type, args, NULL)
#else
#error "NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT value unrecognized!"
#endif

As you can see, in the case if 7 arguments NULL is added as the last argument to acpi_walk_namespace().

In all fairness, the bug will only manifest when compiling with DEBUG since the other call site uses NULLs for context and return value arguments as well.

martinhex 03-15-10 04:11 PM

Re: nvidia-190.53-2.6.33.patch has a bug in it
 
Quote:

Originally Posted by nomadewolf (Post 2206855)
Hi!
How do you apply/use the patch, exactly?...

The following link is specific to Debian, but the instructions are generic enough to be helpful for any distro.

http://forums.debian.net/viewtopic.php?t=24776

ShiningArcanine 06-15-10 10:09 PM

Re: nvidia-190.53-2.6.33.patch has a bug in it
 
Quote:

Originally Posted by dtor (Post 2206993)
Heh, not only community patch has a bug in it, but it looks like Nvidia made the same error in their official driver:

#if defined(KERNEL_2_4) || \
(NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT == 6)
#define NV_ACPI_WALK_NAMESPACE(type, args...) acpi_walk_namespace(type, args)
#elif (NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT == 7)
#define NV_ACPI_WALK_NAMESPACE(type, args...) \
acpi_walk_namespace(type, args, NULL)
#else
#error "NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT value unrecognized!"
#endif

As you can see, in the case if 7 arguments NULL is added as the last argument to acpi_walk_namespace().

In all fairness, the bug will only manifest when compiling with DEBUG since the other call site uses NULLs for context and return value arguments as well.

I wish I had seen this several months ago. It would have saved me a great deal of grief and frustration trying to isolate the cause of an issue on my system. I had thought that this issue had been fixed in newer drivers, so I did not bother to check to see if it was the cause, even though it was a perfect candidate.

Assuming you are still reading this, are you sure that this bug will only occurs when compiling with DEBUG options? I ask because I have a Gentoo Linux system where all debug options are supposed to be disabled, I seem to be affected by this issue with all versions of unpatched versions of nvidia's drivers that work with the Linux 2.6.33 kernel.


All times are GMT -5. The time now is 03:14 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.