4 ms·
When someone sues over their rights of source-code-as-text (complaining about e.g. a GPL violation; or in such famous cases as https://en.wikipedia.org/wiki/Goo
by derefr 4y ago
When someone sues over their rights of source-code-as-text (complaining about e.g. a GPL violation; or in such famous cases as https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_Inc https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_....), they're suing about copyright infringement. This is analogous to suing over copyright infringement about the prose text of a book or article. I think it's enlightening to consider the places where people do and don't sue for copyright infringement of prose text works, as a model for the places where you can and cannot do that for source code.
Copyright is about protecting the rights-holder's ability to determine where the exact copyrighted source material can be used. Copyright does not offer the rights-holder protection for all works with equivalent semantics (that'd be a patent.) For copyright to pertain, the work has to be "textually identical", or — if we want to apply considerations about "sampling" — has to have "textually identical" sections borrowed into the derivative work.
This means that, in both the "prose text" and "source code" cases, all you have to do to avoid copyright, is to retain all the same semantics, but replace all the individual words. Note that this falls under what academia would call "plagiarism" — but there's no law that protects an IP rights-holder from having their work plagiarized.
In prose, this process of plagiarizing a work by replacing all the words, is often euphemistically called "paraphrasing." As far as the law is concerned, it is no different than actual paraphrasing — of digesting the original into your mental model and then attempting to describe the same idea in your own words. Even though, very likely, the structure of the original has been retained in your plagiarized derivative.
90% of the news articles you read are this sort of plagiarized paraphrase of some other news article — the article that "breaks the story." There is nothing the original journalist who breaks the story can do about that, under the law, because the paraphrases aren't literal word-for-word renditions of their copyrighted text.
In code, this is called "renaming all the identifiers." Which is something that happens inherently in decompilation, because all the original names for the identifiers got thrown away when the original code was compiled.
---
Also, to be clear on two issues, because surprisingly nobody in the thread has clarified this yet:
1. In these decompiled game projects, the original game's copyrighted binary-asset representations — which you'd need to byte-for-byte reproduce the game, and which you can't really "rephrase" as above — are not stored in any encoded form in the decompilation's source-code repo. Nor are any representations of assets — characters, logos, etc — to which trademark applies. Rather, for both of these cases, the build framework for the decompiled project contains logic to extract these assets from an external ROM image of the original game that must be supplied at build time. Or you could just as well supply a different ROM image — your own "asset pack", per se — to get a compiled game that is free of such assets.
This means that the decompilation project forms the basis of a tool that can be used to create a work that is byte-for-byte identical to the original — provided you have... a ROM image of the original to feed into it. You know what else matches that description? A file copy utility. (The project can also produce binaries that are not identical to the original — and that's usually the goal of the project, making e.g. PC ports of the original game, which are for entirely different target ISAs and so entirely are different object code from the copyrighted released object code.)
2. The decompilation project never publishes anywhere, the thing that it builds when you run it. Doing so would violate copyright. Just like if Rifftrax actually combined their audio dub track with an original movie and distributed that, that'd be a copyright violation. But, in both cases, it's not a copyright violation to give the end-user a tool to create a derivative work from an original, and tell the user to apply the tool to the original themselves, to derive this combined work for their own private consumption.
- chc4 4y agoYou are wrong. Changing names from a decompilation is a derivative work, and falls under copyright; clean room reimplementations such as IBM's bootloader from the 80s or ReactOS very specifically do not look at the disassembly for this exact reason. In your analogy, renaming a disassembly is copying an entire article and then changing words with synonyms, which is not legal either.
- derefr 4y ago> clean room reimplementations such as IBM's bootloader from the 80s or ReactOS very specifically do not look at the disassembly for this exact reason That reason being "paranoid lawyers who were operating on a lack of case law to interpret." We since have had many real code-IP court cases, and now have the actual established case law to refer to — and that case-law points to code copyright working akin to prose copyright (where obvious plagiarism is still not copyright infringement), not akin to e.g. musical-arrangement copyright (which is almost patent-like in its "plays the same? same arrangement" semantics, the chilling effects of which are the reason there's no such thing as an open database of classical-music scores.) The key thing you've got to realize is that publishing a decompilation to an HLL of a work, is not the same as publishing a disassembly of that work. Assembly languages are bijective mappings to object code for the ISA the assembler targets; so of course a disassembly of object code is a derivative work of that code. But decompilation, to a sufficiently abstract HLL (which even C qualifies as), is doing literally all the work needed to create a legal paraphrase. It's replacing the structure of the code with structures available in the HLL; it's replacing the bald memory addresses of globals and stack slots with named and typed identifiers; etc. The result is "a" decompilation, not "the" decompilation. It's not a bijective mapping. In fact, by default, it's not even a surjective mapping — we do not so far have any entirely-automated decompiler (for large projects containing binary assets, like games) where the result of the first-step automated decompilation is a project that can immediately be compiled to produce the original object code. A lot more manual work is needed to reach that step. Maybe it would be clearer if I describe it this way: you can take a program that was written in C and compiled to x86-64 object code, and then decompile it into Rust or into Haskell or any other language. You don't have to decompile it into C. And, perhaps surprisingly, this alternate decompilation will still be just as likely as the C decompilation, to produce the original object code when compiled! (Which is to say: not very likely by default, but possibly after a good few weeks of tweaking.) Or, I can put it this way: you can take a program that was originally written in raw assembly, and decompile it into C. Decompilers apply heuristics; those heuristics don't depend on the original object code having been generated by an HLL compiler. If you employed structured-programming techniques in your assembly, then you'll get if statements and functions out in the decompilation. If you can tell me with a straight face that you believe that a Rust decompilation of a program originally written in C infringes that C program's copyright; or that a C decompilation of a program originally written in assembly, violates the assembly program's copyright — in a world where a news article that is a plagiarizing paraphrase of another has no copyright issues whatsoever — then I'd really like to hear your reasoning. --- A bonus analogy, just for laughs: take a modern copyrighted prose fiction work, let's say Lord of the Rings. Rename all the characters and places and such (to avoid trademarks.) Now feed the text into ChatGPT and ask it, for each paragraph, to spit out a paragraph that communicates the same information in different words. Publish the result on Kindle Unlimited. Do you think https://en.wikipedia.org/wiki/Middle-earth_Enterprises https://en.wikipedia.org/wiki/Middle-earth_Enterprises has any standing to sue you? What would their legal argument be? What would their evidence be? (And be careful here of providing an "argument that proves too much" — any argument that would also apply to "every work of Tolkienesque fantasy published since LotR" isn't going to work. You can't sue just because there is clearly a race with equivalent properties to those of Tolkien's elves, or a sword with powers equivalent to those of one of the swords in the books — there are thousands of published books that cribbed both, not to mention the entire base setting of Dungeons & Dragons. Assuming that those cases "don't cross the line", what do you use to legally prove that this work does "cross the line"?) And while yes, you might point out that a translation of a work of fiction into another language, is explicitly noted as constituting a derivative work. But, again, how would the copyright-holder here prove that this published work is legally equivalent to a translation? Usually such a legal argument would cite something that must remain the same between translations, e.g. uses of words that are foreign loan-words to begin with. But we can tell ChatGPT to avoid those. My point being: when you look at the very fine boundaries of a law, they're not about what the text of the law says, so much as in what situations it can be proven that the law applies. The obvious example is an "unenforceable law" where there is no possible mechanism to detect people breaking that law. Here, we have a law that can be enforced for central cases — but becomes unenforceable "at the edges." In practice, evaluated as case-law in a Bayesian "absense of evidence is evidence of absence" sense, this means that those edges can be said to fall outside the scope of the law. If you very clearly ask a lawyer, not the question "is this in violation of copyright", but rather the question "would anyone ever bother to sue me for this, knowing they'll win?" the lawyer will answer "no."