http://www.freerepublic.com/focus/f-news/966610/posts?page=70#70
The origin of the code in question goes back even further than was known when Bruce wrote this.
The mainstream media will probably pick this up tomorrow. Apparently, the financial markets haven't figured it out yet, because SCO's stock price is down less than 1%. If I were a gambler, I'd be shorting them right now.
SCO has been very publicly discredited. They will have to respond with something that supports their claim -- the question is how diligent their research will be. They won't be able to survive another bogus claim: another slip like this will ruin their credibility.
So SCO is trying to lay claim to the malloc() function? From Lion's no less... why don't I just go patent the fork.
/* * Copyright (c) 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * * @(#)subr_rmap.c 1.2 (2.11BSD GTE) 12/24/92 */ #include "param.h" #include "systm.h" #include "map.h" #include "vm.h" /* * Resource map handling routines. * * A resource map is an array of structures each of which describes a * segment of the address space of an available resource. The segments * are described by their base address and length, and sorted in address * order. Each resource map has a fixed maximum number of segments * allowed. Resources are allocated by taking part or all of one of the * segments of the map. * * Returning of resources will require another segment if the returned * resources are not adjacent in the address space to an existing segment. * If the return of a segment would require a slot which is not available, * then one of the resource map segments is discarded after a warning is * printed. * * Returning of resources may also cause the map to collapse by coalescing * two existing segments and the returned space into a single segment. In * this case the resource map is made smaller by copying together to fill * the resultant gap. * * N.B.: the current implementation uses a dense array and does not admit * the value ``0'' as a legal address or size, since that is used as a * delimiter. */ /* * Allocate 'size' units from the given map. Return the base of the * allocated space. In a map, the addresses are increasing and the * list is terminated by a 0 size. * * Algorithm is first-fit. */ memaddr malloc(mp, size) struct map *mp; register size_t size; { register struct mapent *bp, *ep; memaddr addr; int retry; if (!size) panic("malloc: size = 0"); /* * Search for a piece of the resource map which has enough * free space to accomodate the request. */ retry = 0; again: for (bp = mp->m_map; bp->m_size; ++bp) if (bp->m_size >= size) { /* * Allocate from the map. If we allocated the entire * piece, move the rest of the map to the left. */ addr = bp->m_addr; bp->m_size -= size; if (bp->m_size) bp->m_addr += size; else for (ep = bp;; ++ep) { *ep = *++bp; if (!bp->m_size) break; } #ifdef UCB_METER if (mp == coremap) freemem -= size; #endif return(addr); } /* no entries big enough */ if (!retry++) { if (mp == swapmap) { printf("short of swap\n"); xumount(NODEV); goto again; } else if (mp == coremap) { xuncore(size); goto again; } } return((memaddr)NULL); }
...snip...
/* * Copyright (c) 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * * @(#)subr_rmap.c 1.2 (2.11BSD GTE) 12/24/92 */ #include "param.h" #include "systm.h" #include "map.h" #include "vm.h" /* * Resource map handling routines. * * A resource map is an array of structures each of which describes a * segment of the address space of an available resource. The segments * are described by their base address and length, and sorted in address * order. Each resource map has a fixed maximum number of segments * allowed. Resources are allocated by taking part or all of one of the * segments of the map. * * Returning of resources will require another segment if the returned * resources are not adjacent in the address space to an existing segment. * If the return of a segment would require a slot which is not available, * then one of the resource map segments is discarded after a warning is * printed. * * Returning of resources may also cause the map to collapse by coalescing * two existing segments and the returned space into a single segment. In * this case the resource map is made smaller by copying together to fill * the resultant gap. * * N.B.: the current implementation uses a dense array and does not admit * the value ``0'' as a legal address or size, since that is used as a * delimiter. */ /* * Allocate 'size' units from the given map. Return the base of the * allocated space. In a map, the addresses are increasing and the * list is terminated by a 0 size. * * Algorithm is first-fit. */ memaddr malloc(mp, size) struct map *mp; register size_t size; { register struct mapent *bp, *ep; memaddr addr; int retry; if (!size) panic("malloc: size = 0"); /* * Search for a piece of the resource map which has enough * free space to accomodate the request. */ retry = 0; again: for (bp = mp->m_map; bp->m_size; ++bp) if (bp->m_size >= size) { /* * Allocate from the map. If we allocated the entire * piece, move the rest of the map to the left. */ addr = bp->m_addr; bp->m_size -= size; if (bp->m_size) bp->m_addr += size; else for (ep = bp;; ++ep) { *ep = *++bp; if (!bp->m_size) break; } #ifdef UCB_METER if (mp == coremap) freemem -= size; #endif return(addr); } /* no entries big enough */ if (!retry++) { if (mp == swapmap) { printf("short of swap\n"); xumount(NODEV); goto again; } else if (mp == coremap) { xuncore(size); goto again; } } return((memaddr)NULL); }
...snip...
SCO: So, it is down to you, and it is down to me...if you wish Linux dead, by all means keep moving forward.
IBM: Let me explain...
SCO: There's nothing to explain. You're trying to kidnap what I have rightfully stolen.
IBM: Perhaps an arrangement can be reached?
SCO: There will be no arrangements...and you're killing Linux.
IBM: But if there can be no arrangement, then we are at an impasse.
SCO: I'm afraid so. I can't compete with you physically, and you're no match for my brains.
IBM: You're that smart?
SCO: Let me put it this way: Have you ever heard or Kernighan, Ritchie, Torvalds?
IBM: Yes.
SCO: Morons!
IBM: Really! In that case, I challenge you to a battle of wits.
SCO: For the kernel? To the death? I accept!
IBM: Good, then untar the source code. [SCO# tar -xvfz code] Inhale this but do not touch.
SCO: [taking a vial from IBM] I smell nothing.
IBM: What you do not smell is our patent portfolio. It is odorless, tasteless, and dissolves instantly in source code and is among the more deadly portfolios known to man.
SCO: [shrugs with laughter] Hmmm.
IBM: [turning his back, and adding the patents to one of the code trees] Alright, where are the patents? The battle of wits has begun. It ends when you decide and we both compile - and find out who is right, and who is dead.
SCO: But it's so simple. All I have to do is divine it from what I know of you. Are you the sort of company who would put the patents into his own source code or his enemies? Now, a clever man would put the patents into his own goblet because he would know that only a great fool would reach for what he was given. I am not a great fool so I can clearly not choose the code in front of you...But you must have known I was not a great fool; you would have counted on it, so I can clearly not choose the code in front of me.
IBM: You've made your decision then?
SCO: [happily] Not remotely! Because Linux's SMP code originally came from England(1). As everyone knows, England is entirely peopled with criminals. And criminals are used to having people not trust them, as you are not trusted by me. So, I can clearly not choose the code in front of you.
IBM: Truly, you have a dizzying intellect.
SCO: Wait 'till I get going!!
IBM: England.
SCO: Yes! AH! And you must have suspected I would have known the source code's origin,so I can clearly not choose the code in front of me.
IBM: You're just stalling now.
SCO: You'd like to think that, wouldn't you! You've beaten my giant, which means you're exceptionally strong...so you could have put the patents in your own code trusting on your strength to save you, so I can clearly not choose the code in front of you. But, you've also bested my Spaniard, which means you must have studied...and in studying you must have learned that Man is mortal so you would have put the patents as far from yourself as possible, so I can clearly not choose the code in front of me!
IBM: You're trying to trick me into giving away something. It won't work.
SCO: It has worked! You've given everything away! I know where the patents are!
IBM: Then make your choice.
SCO: I will, and I choose...[pointing behind IBM] What in the world can that be?
IBM: [turning around, while SCO switches goblets] What?! Where?! I don't see anything.
SCO: Oh, well, I...I could have sworn I saw something. No matter. [SCO laughs]
IBM: What's so funny?
SCO: I...I'll tell you in a minute. First, lets compile, me from my code and you from yours. [They both compile]
IBM: You guessed wrong.
SCO: You only think I guessed wrong! That's what's so funny! I switched branches when your back was turned! Ha ha, you fool!! You fell victim to one of the classic blunders. The most famous is never get involved in a land war in Asia; and only slightly less well known is this: Never go in against SCO, when intellectual property is on the line!
SCO: HA-HAHA-HAHA AH-HAHA-HAHA (!!) (THUD!)
[IBM removes the blindfold from Linux]
Linux: Who are you?
IBM: I'm no one to be trifled with. That is all you'll ever need know.
Linux: And to think, all that time it was your code that was patented.
IBM: They were both patented. I spent the last few years building up an impressive patent portfolio.