[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Let's stop feeding the NVidia cuckoo



Justin Pryzby wrote:

On Fri, Feb 25, 2005 at 03:47:32PM -0500, David Nusinow wrote:
On Fri, Feb 25, 2005 at 03:25:48PM -0500, Glenn Maynard wrote:
Obfuscated code does not satisfy DFSG#2.  I hope nobody seriously
disagrees with this.
Let's not be so fast with this. I haven't taken a look at the driver
source ......

(I just gave a brief look; I put them in
http://tonelli.sns.it/mirror/X/xc/programs/Xserver/hw/xfree86/drivers/nv/
)

Just because the code doesn't use #defines or enums doesn't
necessarily make it obfuscated; it may just be that Vojkovich sees
that as too indirect, and prefers to write outb(0x3241, 0x51) because
he happens to know the port ID numbers and values off the top of his
head.
I agree; or he simply fishes them out of documentation, and
he does not see the need to use #defines,
since he has the documentation in its hand.

Is it *actively* obfuscated, or just not as clean as you would like?
Please compare :

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
   /*
    * Initialize DAC palette.
    */
   if(pLayout->bitsPerPixel != 8 )
   {
       for (i = 0; i < 256; i++)
       {
           pVga->DAC[i*3]     = i;
           pVga->DAC[(i*3)+1] = i;
           pVga->DAC[(i*3)+2] = i;
       }
   }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

that comes from  nv_dac.c  ,  or

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
                               case 'h':       /* SETHI */
                                       /* Has to be sethi i, xx */
if ((insn & 0xc1c00000) != 0x01000000) { prom_printf(insn_h, p, addr, insn);
                                               prom_halt();
                                       }
set_addr(addr, q[1], fmangled, (insn & 0xffc00000) | (p[1] >> 10));
                                       break;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
that comes from  kernel-source..../arch/sparc/mm/btfixup.c

I dont see any of the two to be quite more comprehensible than the other.

On the other hand, neither the GPL nor the DFSG state that any laymen
(such as me) should be able to understand
the deep meaning of the above code.

If it is actively obfuscated (has been run through a sed script to
remove whitespace, or similar), then someone needs to ask nv for the
real source
how will we ever be able to know this? How do we go and prove that
they are keeping a secret version of the code that is better than what
they are relasing?

Anyhow, there are comments in the NV code ... this is more
than can be said of  a lot of  open source code around  :-)

Is there someplace we can download the code (call it what you like)
without also downloading the rest of X11?

http://tonelli.sns.it/mirror/X/xc/programs/Xserver/hw/xfree86/drivers/nv/


-------------

Actually , the whole linux kernel may be subject to the same complaints that Ben Johnson reports against nv drivers !

- there are many occurrences of hexadecimals with no explanation or comments.
  Just try      find -name '*.c' | xargs egrep -5 '0x[1-9]' | less -S

  Look at how much code in kernel uses magic hexadecimals with almost no comments:
  do we go and delete the whole kernel for this reason?  :-)
- defines are no help either: I have no clue at what this line

     arch/ppc/kernel/align.c:#define       RA(inst)        (((inst) & 0x001F0000) >> 16)
is supposed to be defining.

-----------------------------------------

a.




Reply to: