Tag Info

Hot answers tagged

74

This hack has to be understood in context. It was published at a time and in a culture where Unix running on all kinds of different hardware was the dominant system. What made the attack so scary was that the C compiler was the central piece of software for these systems. Almost everything in the system went through the compiler when it was first installed ...


38

No The attack, as originally described, was never a threat. While a compiler could theoretically do this, actually pulling off the attack would require programming the compiler to Recognize when the source code being compiled is of a compiler, and Figure out how to modify arbitrary source code to insert the hack into it. This entails figuring out how ...


32

The purpose of that speech wasn't to highlight a vulnerability that needs to be addressed, or even to propose a theoretical vulnerability that we need to be aware of. The purpose was that, when it comes to security, we'd like to not have to trust anyone, but unfortunately that's impossible. You always have to trust someone (hence the title: "Reflections On ...


27

A "Unix like" system may be fully compliant with the Single UNIX Specification, the collective name of standards for what qualifies as a Unix system, but at the same time Unix is a registered trademark of The Open Group and vendors of Unix like systems need to get their systems registered to officially qualify as Unix. Currently the registered UNIX 03 ...


22

This is Unix. kill is able not to kill a process. mv is able to rename and not only move files from one place to another. touch is able to create a file and not only change its last modification time. od means Octal Dump, but is able to perform many more kinds of dumps. yes is able to output no. More exotic: grep is named after the ed command that ...


21

Originally, the kill command could only kill a process, only later was kill enhanced to allow you to send any signal. Since version 7 of Unix (1979) the default has been to signal the process in a way which can be caught and either handled gracefully or ignored (by sending a SIGTERM signal), but it can also be used to pull the rug out from under a process ...


17

I think you've got a point there, but cp, rm, cd and a lot of others change state, so they aren't really functions. The UNIX philosophy is more about doing only one thing but doing it well; often doing it well means allowing functional usage, but not always.


15

In general, I would not use a crude measure like if they Unix to judge the skill of a developer. I personally use Linux for development and would not like to trade this for Windows. This has primarily to do with the workspaces, package management system, and that Linux is more transparent about its guts. However, a sizeable portion of the dev community uses ...


15

First, my favorite writeup of this hack is called Strange Loops. This particular hack could certainly (*) be done today in any of the major open source OS projects, particularly Linux, *BSD, and the like. I would expect it would work almost identically. For example, you download a copy of FreeBSD that has an exploited compiler to modify openssh. From then ...


13

Programmers abhor the use of the shift key (and caps lock is something many try to do away with). Continuing on from the spot that says "always use lower case"... It's best to always use lowercase in Linux unless you can think of a good reason to use uppercase or mixed case. Most Unix people use lowercase almost exclusively, but aside from this ...


12

You can find the POSIX argument conventions in the Utility Conventions chapter. The POSIX style consists of options with a single dash followed by a single letter indicating the option, with the argument value separated from the option by a space. There are exceptions to the rules - find, for example - but these are because of the historical Unix ...


12

From my personal experience developer working on an *nix system needs to know: shell variables (how to set/get + knowledge about special ones like PATH) shell redirection (capturing output of an program) pipes (extracting some information from log file is an excelent example) process control (ps, nice/renice, kill) file access rights ...


12

Windows is not a good example for teaching operating systems. Windows is not open source and there are a lot of proprietary technology, how can you teach something that is trade secret. Windows is not really POSIX standard compliant, learning OSes it is better to learn one that is at least relatively standard. Windows is further from the actual low level ...


11

From my experience with my numerous colleagues since I started to work, nobody wants to fake Unix knowledge: either they "know their way around the command line" or they simply say "no way!". Just ask if the candidate is willing to work on a Unix workstation and let him tell you how far he can go through bash. He will eventually name some commands; the most ...


11

Unix sockets are a bidirectional socket - just like an IP based socket, which you are probably familiar with, and kind of similar to a pipe, which you are probably familiar with. They have a small set of interesting properties: They are in the domain of "the local host" only - you can't access them over the network, only on the local machine. You can ...


11

According to http://slashdot.org/story/01/02/06/2030205/David-Korn-Tells-All (question 11), UWIN was not originally open source (though that appears to have changed in the 11 years since that interview was published). Not being open source would have been a significant barrier to widespread adoption, especially considering a functionally equivalent open ...


10

EDIT: It's been pointed out that this style is a GNU-ism, and that non-GNU based Unixes tend to use a single-dash syntax (in particular, OS X and BSD variants). Despite it's GNU-ism status, many newly written Unix-style programs use this style: --long-option for long option names, -s for short (one-character) options, -abc for multiple short options ...


10

Why do this? The *nix shells (and other OS shells, fwiw) are very deep and broad working environments. It's possible for somebody to spend years working there and use only a very small % of the shells' capacity. If you don't expect the person to a) shell program, or b) administer the system from the shell, then why does it matter? Anything that gets done ...


9

Linux in VM is the easiest option to learn UNIX. If you're running Ubuntu, you can open up terminal and type: sudo apt-get install gcc And you'll have your compiler. Debian-based distros in general will make development very easy because if you're missing library X, chances are it's already in the repositories and you can apt-get it with minimum fuss. ...


9

Does this affect all languages? This attack primarily affects languages that are self-hosting. That is languages where the compiler is written in the language itself. C, Squeak Smalltalk, and the PyPy Python interpreter would be affected by this. Perl, JavaScript, and the CPython Python interpreter would not. How does this relate to just-in-time ...


8

Besides the basics like how to use the command line and so on I think that the fundamental is to understand how the system is structured. I think the biggest difference when one comes from Windows to Unix is understanding how the system fits together. Windows fits together by the means of it's API and underlying OS components like COM. Although this is ...


8

Raymond Chen's blog, The Old New Thing, and his book with the same name is a great insight into the philosophy, history, and best practices of native Windows programming.


8

One of the fundamental differences between UNIX and Windows, is that Windows tends to have complex monolithic applications, whereas UNIX achieves complexity by combining small, self-contained applications each of which is good at performing one specific task. In Windows, a particular application, no matter how rich and complex it can be, is all you have. In ...


8

I had an excellent course of Windows architecture including deep explanations of processes, threads, semaphores, priorities, critical sections, deadlocks, pipes, etc. Still, Windows is closed. That means that our professor could not say "Okay guys, this thing works exactly in that way from inside". He could only say "Hmm, probably it works like this, and i'm ...


7

The answer is in the "Monadic i/o and UNIX shell programming" by Oleg Kiselyov. This is an essay inspired by Philip Wadler's paper "How to Declare an Imperative" [Wadler97]. We will show uncanny similarities between monadic i/o in Haskell, and UNIX filter compositions based on pipes and redirections. UNIX pipes (treated semantically as writing to ...


7

I think the differences you alude to in your question are more about the users of these systems than the programming styles of their developers. For a long time, *nix has been the field of either the programmer or the computing enthusiast. There was very little in the way of "casual" use. Where as Windows has [home] user numbers orders of magnitude greater. ...


7

Let me give you an example: Say you want to communicate/chat with your friend, who lives not at your address. For that to happen, you have to establish a "communication channel". Say, you want to do this communication using telephones. You know that there is a network of telephone lines in the city that is extended to every house. Now, there is a telephone ...


7

For all of its advantages, C is an unsafe language; it lacks many of the safety guarantees that other languages have, such as: Array bounds checking Type safety Garbage collection (to avoid memory leaks) Despite these disadvantages, C is "closer to the metal," making it a very high-performing language, and offering real-time performance guarantees. This ...


6

Argument with dash-dash (--long-arg) is a GNU convention (see their getopt implementation). POSIX commands never uses double dash arguments. This applies to most variants of Unix (Mac OS X, BSD) except Linux which uses GNU by default. For your Java project, you might want to check out GNU getopt for Java or Apache CLI. They support both conventions. A ...



Only top voted, non community-wiki answers of a minimum length are eligible