LWN.net Logo

Searching for Linux code in SCO kernel (or vice versa)

From:  goga@florin.ru
To:  lwn@lwn.net
Subject:  Searching for Linux code in SCO kernel (or vice versa)
Date:  Tue, 24 Jun 2003 15:39:37 +0400 (MSD)

Hello,
 
SCO claims that some Linux code is taken from Unix kernel. SCO
also claims that no Linux code ever went into its Unix kernel.
Given SCO's kernel source, that would be easy to check; however,
SCO will not give us the source. So how could we search for similar
code _without_ the sources?
 
1. Take SCO Unix.
2. Take Linux kernel source.
3. Guess which compiler flags were used by SCO when compiling
   its source.
4. Compile the suspicious portions from Linux kernel source with
   SCO's compiler, making as few modifications as possible.
5. In the generated code, mark global addresses (subject to
   relocation), magic constants, and probably some other constants
   (struct member displacements?) as irrelevant.
6. Search the SCO Unix binary kernel for chunks matching relevant
   portions of compiled Linux code.
 
Of course, we would be extremely lucky if it worked -- the code
must really be taken as is for such a test to work. But I think
this might be worth a try. (I don't have access to SCO Unix, so
I can't do this myself.)
 
IANAL, of course, so I don't know whether such procedures would
be legal, in US or elsewhere.
 
        Goga


(Log in to post comments)

Searching for Linux code in SCO kernel (or vice versa)

Posted Jun 27, 2003 15:31 UTC (Fri) by rfunk (subscriber, #4054) [Link]

I think it would be pretty much impossible to guess which compiler flags SCO
used.

And Linux uses enough gcc features that it would probably be difficult to
compile it with SCO's compiler.

Copyright © 2003, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds