Slashdot Mirror


Reverse Engineering an MPEG Driver

An anonymous reader writes "Following on from the recent spate of reverse engineering articles, there is an interesting summary of the reverse engineering of a binary only Linux driver. The driver is for the integrated MPEG decoder on VIA's popular EPIA-M boards. At the moment VIA has not publicly released the source code for the MPEG chipset on these boards and will only make the code available under NDA saying that "Typically, only requests from companies developing product for sale will be approved." As a result this is holding back development of open source tools (e.g. xine, mplayer, vdr) that would be able to make use of the interesting hardware on these boards."

7 of 275 comments (clear)

  1. Free, but not Free by Dancin_Santa · · Score: 5, Insightful

    Driver code is the biggest liability that a device maker has. It earns no money, it costs quite a bit to make, and it must be written multiple times for multiple platforms and operating systems.

    Via's reluctance to free the driver software is pure evil. They sit like slavemasters on the code and hold it hostage as if it were a servant or slave.

    Even if the reverse engineering works out and the code runs equally well as the enslaved code, what will become of the original unfree code? Will that unfortunate code be relegated to living out the rest of its days in slavery? Sadly, I think the answer is affirmative.

    Who will fight for the rights of software? I only wish the FSF was more vocal about the Freedom of Software that they purportedly base their ideology upon.

    1. Re:Free, but not Free by dasmegabyte · · Score: 4, Insightful

      How are they doing themselves a favor?

      Most hardware companies use off the shelf parts. They aren't designing the technology so much as lciensing it and marketting it. The ONLY reason they are able to make money off of their products is that they have something that Generic Q. Solderinggun doesn't -- they have the ability to interface these hardware chips with a computer. And all of that magic happens in the driver.

      I've seen lies here that drivers don't make money, and this is simply ludicrous. Let's take a real world example: back in 1997, both Iomega and Miro (later Pinnacle) marketted an MJPEG video input box based off of a Zoran chip. Zoran made a very very nice chip capable of massive resolutions, dozens of colour modes and bus mastering and all kinds of kick ass stuff. However, Iomega skimped on their drivers. The result was a product that was totally unable to operate at spec, because the driver had a fundamental flaw that prevented it from capturing at 29.976. Savvy video users quickly learned to cap at 30.10, drop a frame, and save $100+ over the cost of the similar Miro card. However, no matter how much the Slashdot community would like to think otherwise, you can't make money selling to ONLY savvy users. Iomega promptly dropped support, even though late model drivers were FIXING the issues. Miro, on the other hand, made money off of their superior drivers for years to come. Those drivers made that money.

      If Miro opened the source of their drivers, GPL or otherwise, nothing would have stopped Iomega from getting them, modding them slightly to include their hardware, and releasing them back to the community. After all, they're not selling them. Good for everybody, right?

      No good for Miro, whose dilligence in driver manufacture has just cost them countless sales. Their hardware is now just the sale as the other guy's but sells for much more.

      Why the hell do you want hardware companies to lose money for your hobby? Are you so vain that you really think your 3% of the marketshare is worth that much to the VIAs of the world?

      --
      Hey freaks: now you're ju
  2. irony by mo · · Score: 4, Insightful

    The silly thing with all of this is that the drivers and support for this card that result from the reverse engineering will ultimately result in more sales. It seems so counter-intuitive for VIA to resist this.

  3. why do it by hand? by MikeFM · · Score: 5, Insightful

    Why not use a program that automaticlly takes the binary and builds a C program from it? You still have to pick through the logic to give things helpful function/variable names and refactor but it'd save the step discribed here. In the past when I've reverse engineered binaries that is the type of tool I used. Any good reason for doing this by hand?

    This still begs the question.. why not just release the damn source? If we can reverse engineer the drivers what would keep the competition from doing so? Why harm your customers for a false sense of security?

    --
    At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
  4. Not quite done yet by wowbagger · · Score: 5, Insightful

    Well, he has done the first part of a reverse engineering process - he has worked out, by inspection of the target, what is being done.

    However, he now needs to write the specifications for the hardware, and publish THAT, so that somebody else, somebody who has not seen the binary driver, can write a program based upon the specifications.

    Should this not be done, then this code, while interesting to individuals, would be pure poison to anybody who has any intention of distributing this code in a commercial way (e.g. a distro).

    And writing a specification for the chip, by inspecting the code, is far more difficult than simply reverse compiling the binary.

  5. Why do you say VIA resisted? by Fefe · · Score: 4, Insightful

    First of all, it's just a small wrapper library that is comparatively easy to reverse engineer.

    Second of all, there is a library we can reverse engineer.

    Third of all, the guy is using the VIA forums to spread the word, so VIA obviously knows about this, and they haven't sued.

    To me this rather looks like they were waiting for someone to reverse engineer this, because they couldn't release the sources themselves for contractual reasons. Don't just assume people are evil, maybe they didn't have a choice and did what was in their power to give you the means to help yourself.

  6. Re:What about DMCA? by Wumpus · · Score: 4, Insightful

    I believe that distribution of this code would be illegal, since it is a derivative work based on VIA's library. I haven't seen VIA's license, by typically those licenses prohibit redistribution, reverse engineering, and disclosure of any trade secrets.

    The reverse engineering itself is probably still legal, arguably, if it is done to enable someone to write software that interoperates with the decoder. To be safe, I would assume that it's probably better to write such software for an operating system that VIA doesn't support - QNX, for example. (One could argue that the BSDs' ability to run Linux binaries voids the interoperability argument if one were to write a BSD driver, but what do I know?).

    You should also make sure that the person writing the final open source code hasn't seen VIA's decompiled source. Typically this is done by having one person or team reverse engineer the code, document the hardware, and toss the hardware documentation over the wall to the driver team.