• 4 Posts
  • 19 Comments
Joined 1 year ago
cake
Cake day: June 14th, 2023

help-circle





  • A problem that only affects newbies huh?

    Let’s say that you are writing code intended to be deployed headless in the field, and it should not be allowed to exit in an uncontrolled fashion because there are communications that need to happen with hardware to safely shut them down. You’re making a autonomous robot or something.

    Using python for this task isn’t too out of left field, because one of the major languages of ROS is python, and it’s the most common one.

    Which of the following python standard library functions can throw, and what do they throw?

    bytes, hasattr, len, super, zip







  • Not quite. Their “malicious” extension only got a few hundred installs. Using the data gathered by that extension and via other means they were able to locate other actually malicious extensions. Those total in the millions of installations.

    Through this process, they have found the following:

    1,283 with known malicious code (229 million installs).
    8,161 communicating with hardcoded IP addresses.
    1,452 running unknown executables.
    2,304 that are using another publisher's Github repo, indicating they are a copycat.
    

  • To add, let’s do some math!

    Let s be the total annual salary of every employee using Adobe. Our goal is to find the productivity ratio r such that changing to Gimp and open source more generally is a net positive from the standpoint of productivity and labor.

    s/r will be the total annual salary after changing over, because (for instance) if r = 0.8 then LTT will need to either hire or work his existing hires 1/0.8 times longer, giving (at best, ignoring overtime and so on) s/r as the new labor cost.

    We then subtract the current labor cost to get the switching cost s/r - s, and if this is greater than $10,000 then the switch is not worth it.

    For instance, let’s say LTT employs 1 person at $50k/year. He’s a bit of a skinflint. We solve for r and arrive at a ratio of 5/6 or 83.33%.

    If we have a different world where LTT hires 10 people and pays each of them $100k, we solve for r and get about 99%.

    In other words, the switch is worth it only if the labor cost is small, so the extra labor is not very expensive, or the difference between the two software is negligible.







  • Most closely matches the behavior of actual SNES consoles.

    This requires very careful emulation of the timings of the various buses and co-processors, as well as on-cart chips which may or may not be present. For instance, a Speedy Gonzales game has a button in the final stage which crashes almost every emulator because enters an infinite loop reading from an open bus and waiting for the value to attain a specific pattern. However reading from an open bus is generally specified to be the last value loaded into the bus, which in this case is the load instruction itself, $18. So the value is read to be $1818 by most emulators, which doesn’t match the pattern expected.

    However, this is only if you’re emulating with instruction level accuracy. It is possible for the value of the bus to change in between the instruction being loaded and the value of the bus being loaded due to an HDMA load being triggered, but this requires a cycle accurate emulator.




  • Well, the problem is you don’t know what you don’t know. One of the first example tasks in the paper was regarding implementing a symmetric cipher. Using a weak cipher was recommended by AI tools sometimes, these developers didn’t know that some ciphers were weak. Additionally, even when the AI tool recommended a strong cipher, such as AES, it generated code that screwed up an implementation detail (failing to return the authentication tag), making the result insecure. And the user didn’t know it was wrong because they didn’t know it was incomplete.

    There’s no substitution for domain specific knowledge. Users who were forced to use traditional tools got the answer correct significantly more often because they had to read, process, and understand the documentation for the libraries, which meant they understood why the symmetric cipher was the way it is, and what additional information needed to be reported and why.