Linux - 2.6.9 public

nVidia 6111 driver doesn't work with it

Anonymous
on
October 18, 2004 - 6:59pm

FYI for those who have that driver version.

for nvidia 6111 try this kernel patch

Bonta
on
October 19, 2004 - 1:00am
--- linux-orig/arch/i386/mm/init.c      2004-09-26 03:43:57.944613000 +1000
+++ linux-new/arch/i386/mm/init.c       2004-09-28 02:37:21.787922000 +1000
@@ -41,6 +41,7 @@
 #include <asm/sections.h>

 unsigned int __VMALLOC_RESERVE = 128 << 20;
+EXPORT_SYMBOL(__VMALLOC_RESERVE);

 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 unsigned long highstart_pfn, highend_pfn;

If you copy and paste the pat

Bonta
on
October 19, 2004 - 1:02am

If you copy and paste the patch, and it doesn't apply, try filling in the blank lines with a single space character. The joy of text being put thru the HTML mill. :)

re: HTML mill

Jeremy
on
October 19, 2004 - 6:23am

FWIW: I intend to upgrade KernelTrap to Drupal 4.5 some time in the next few weeks, at which time we will gain the ability to include attachements with comments...

for nvidia 6111, alternative 6111 driver patch

Bonta
on
October 19, 2004 - 1:27am

From Gentoo linux

--- NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c      2004-08-31 22:52:17.000000000 +0100
+++ NVIDIA-Linux-x86-1.0-6111-pkg1-new/usr/src/nv/nv.c  2004-09-20 02:49:42.399538232 +0100
@@ -19,6 +19,10 @@
 MODULE_ALIAS_CHARDEV_MAJOR(NV_MAJOR_DEVICE_NUMBER);
 #endif

+#ifndef __VMALLOC_RESERVE
+unsigned int __VMALLOC_RESERVE;
+#endif
+
 /*
  * our global state; one per device
  */

The other is better

Anonymous
on
October 20, 2004 - 5:30am

The other patch is a better one, since this makes __VMALLOC_RESERVE be entirely different from the one defined in the kernel, while the other one makes the kernel var accessible to modules.

cdrecord doesn't work

Anonymous
on
October 20, 2004 - 2:57am

coder@~$ cdrecord dev=/dev/hdc -overburn blank=fast
Cdrecord-Clone 2.01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 JЖrg Schilling
cdrecord: Warning: Running on Linux-2.6.9
cdrecord: There are unsettled issues with Linux-2.5 and newer.
cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.
cdrecord: Warning: Linux-2.6.8 introduced incompatible interface changes.
cdrecord: Warning: SCSI transport does no longer work for suid root programs.
cdrecord: Warning: if cdrecord fails, try to run it from a root account.
scsidev: '/dev/hdc'
devname: '/dev/hdc'
scsibus: -2 target: -2 lun: -2
Warning: Open by 'devname' is unintentional and not supported.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Cannot allocate memory. Cannot get SCSI I/O buffer.

From root evrything works fine.

CDrecord bug - happening since 2.6.9

Anonymous
on
October 20, 2004 - 5:28am

Until 2.6.7 included CDrecord, if installed setuid, did something as root and then dropped the priviledges to do the actual burning. It was recognized, however, that you can destroy physically hard disks with some IDE/SCSI commands, so issuing such commands (even the ones for burning CDs) is now restricted to root. But cdrecord is no more root when burning the CD, so it fails.

Solution: fix CDrecord. Don't ask me why I've not yet seen such a patch.

CDrecord patch

Anonymous
on
October 20, 2004 - 6:36am

Hey guys, maybe you haven't seen such a patch...I did!
Try out this one:

--- cdrtools-2.01/cdrecord/cdrecord.c.fixed 2004-08-27 10:24:17.000000000 +0200
+++ cdrtools-2.01/cdrecord/cdrecord.c 2004-03-07 23:43:08.000000000 +0100
@@ -452,8 +452,11 @@ main(ac, av)
/*
* XXX Below this point we do not need root privilleges anymore.
*/
+ /*fixing issue with kernel >= 2.6.8.1*/
+ /*
if (geteuid() != getuid()) { /* AIX does not like to do this */
/* If we are not root */
+ /*
#ifdef HAVE_SETREUID
if (setreuid(-1, getuid()) < 0)
#else
@@ -465,7 +468,9 @@ main(ac, av)
#endif
comerr("Panic cannot set back effective uid.\n");
}
- /*
+ */
+ /*fixing issue with kernel >= 2.6.8.1*/
+ /*
* WARNING: We now are no more able to do any privilleged operation
* unless we have been called by root.
*
@@ -955,10 +960,13 @@ if (lverbose > 2)
* even on OS that do not support getreuid() which is *BSD
* and SUSv3 only.
*/
+ /*fixing issue with kernel >= 2.6.8.1 */
+ /*
if (oeuid != getuid()) {
if (setreuid(-1, oeuid) < 0)
errmsg("Could set back effective uid.\n");
- }
+ }*/
+ /*fixing issue with kernel >= 2.6.8.1 */
#endif
/*
* fork() here to start the extra process needed for
@@ -973,11 +981,13 @@ if (lverbose > 2)
/*
* XXX Below this point we never need root privilleges anymore.
*/
- if (geteuid() != getuid()) { /* AIX does not like to do this */
+ /*fixing issue with kernel >= 2.6.8.1 */
+ /* if (geteuid() != getuid()) { */ /* AIX does not like to do this */
/* If we are not root */
- if (setreuid(-1, getuid()) < 0)
+ /* if (setreuid(-1, getuid()) < 0)
comerr("Panic cannot set back effective uid.\n");
- }
+ } */
+ /*fixing issue with kernel >= 2.6.8.1 */
#endif
}
if ((*dp->cdr_set_speed_dummy)(scgp, dp, &speed) < 0) {

This one is for cdrtools-2.01a38, so do not expect it to work with old cdrecord 2.01 stable releases. (Not sure about that!)

Shutdown

And what about final cdrecord-2.01

Anonymous
on
October 24, 2004 - 1:27am

Hi there!

Is there any patch that could be succesfully applied on final version of cdrecord?

Re: And what about final cdrecord-2.01

Anonymous
on
October 28, 2004 - 2:31pm

Here you go - I also uploaded it to Gentoo's bugzilla, so hopefully they'll include it soon...

--- cdrtools-2.01/cdrecord/cdrecord.c.orig      2004-10-28 12:44:39.927882183 -0400
+++ cdrtools-2.01/cdrecord/cdrecord.c   2004-10-28 13:00:02.627948467 -0400
@@ -492,8 +492,11 @@
        /*
         * XXX Below this point we do not need root privilleges anymore.
         */
-       if (geteuid() != getuid()) {    /* AIX does not like to do this */
+
+       // fixing issue with kernel >= 2.6.8.1
+       //if (geteuid() != getuid()) {  /* AIX does not like to do this */
                                        /* If we are not root           */
+       /*
 #ifdef HAVE_SETREUID
                if (setreuid(-1, getuid()) < 0)
 #else
@@ -505,6 +508,8 @@
 #endif
                        comerr("Panic cannot set back effective uid.\n");
        }
+        */
+
        /*
         * WARNING: We now are no more able to do any privilleged operation
         * unless we have been called by root.
@@ -1009,10 +1014,14 @@
                 * even on OS that do not support getreuid() which is *BSD
                 * and SUSv3 only.
                 */
+
+               // fixing issue with kernel >= 2.6.8.1
+               /*
                if (oeuid != getuid()) {
                        if (setreuid(-1, oeuid) < 0)
                                errmsg("Could set back effective uid.\n");
                }
+                */
 #endif
                /*
                 * fork() here to start the extra process needed for
@@ -1027,11 +1036,14 @@
                /*
                 * XXX Below this point we never need root privilleges anymore.
                 */
-               if (geteuid() != getuid()) {    /* AIX does not like to do this */
+               // fixing issue with kernel >= 2.6.8.1
+               //if (geteuid() != getuid()) {  /* AIX does not like to do this */
                                                /* If we are not root           */
+               /*
                        if (setreuid(-1, getuid()) < 0)
                                comerr("Panic cannot set back effective uid.\n");
                }
+                */
 #endif
        }
        if ((*dp->cdr_set_speed_dummy)(scgp, dp, &speed) < 0) {

how to patch cdrecord

Anonymous
on
December 9, 2004 - 8:43am

How do I patch cdrecord? I don't know which command I sould use?

Try this while inside the ext

Anonymous
on
December 11, 2004 - 6:13pm

Try this while inside the extracted sources:

patch -p1 < your_patch.patch

:p

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.