Graph of Linux Vs. Windows System Calls 302
cgrayson recommends Richard Stiennon's blog on ZDNet — a post titled Why Windows is less secure than Linux shows a compelling graphical comparison between system calls on the two operating systems. The blogger tips Sana Security for the images. Quoting: "In its long evolution, Windows has grown so complicated that it is harder to secure... [T]hese images... are a complete map of the system calls that occur when a web server serves up [the same] single page of [HTML] with a single picture."
Poster? (Score:2, Funny)
that's the path of chairs at a MS board meeting (Score:5, Funny)
Re:Poster? (Score:5, Insightful)
Not defending Windows security, but it's entirely possible that the graphical depiction is not "optimized" so that it intentionally looks like spaghetti. It's hard to see what's going on with the resolution given, but some of the call "bubbles" seem to be unnecessarily placed far away from whatever called them with a long strand of spaghetti between them. This isn't necessarily an indication of spaghetti or bad design, but a bad graphical depiction. Also, just because lots of places make a call to the same API (which causes the graph to look like spaghetti) does not mean bad design--to the contrary, it can be very good design.
I hate Windows as much as the next guy, but I'm not sure this is really a good case for why.
Re:Poster? (Score:4, Informative)
It looks as is if it was made by graphViz, which draws diagrams based on a textfile containing the dependencies. So it's probably fair enough in that sense, but the posting the number of edges and the number of nodes would probably be nice as well. Though I'd prefer the source for those 2 images :D
Re: (Score:3, Informative)
Re:Poster? (Score:4, Funny)
Next thing you'll be talking about is global warming, then pirates, and the love of Him that is noodly.
Re: (Score:3, Insightful)
Re: (Score:3, Insightful)
it's called money, as in, people make money from what they know about it, and lets face it, ms was just lucky, followed by having smart (for them) marketing practices, and finally, having good strong-arm tactics.
Re:Linux is less secure than Windows (Score:4, Insightful)
2) Whether or not you like MS (and i don't really, though i grudgingly call them useful at times) they weren't really lucky. They seized opportunities others didn't see, capitalized on other's mistakes, relentlessly focussed on how to usurp their competitors and steal their customers, saw the value of network effects and also leverage their dominance in one area to another. None of it was real luck. Though he likes to think of himself as a technical genius (which i don't really) Bill Gates really is a business genius, a true shark amongst techs without business acumen, and used it to amass a huge fortune.
MS strongarm tactics require them to have a market dominance in some field. At one time, MS was just another company, smaller than Lotus and others. Yet they grew to where they now can use strongarm tactics. They bought code from others, polished it, made it work together very well (to the exclusion of others) and make a lot of money from that.
As far as marketing, their consumer marketing really sucks. Seeing an ad saying "WOW" really isn't making me want to buy Vista. The dinosaur ads really don't make me want to buy Office.
If the Linux desktop is to succeed, they will need to take an honest look at how MS succeeded, and how to counter that. When MS saw a market dominated by a competitor (Lotus) they looked at every reason why someone would stay with Lotus and came up witha counter, when most Linux geeks look at MS market dominance, they say "luck" or "marketing" and just sit and wait for people to somehow realize Linux is technically better and then sit and wait until everybody switches.
Looks good. (Score:5, Funny)
Suddenly I am hungry for spaghetti.
mmmMmm Food.
Damn. Windows *is* evil. It is making me fat!
Re:Looks good. (Score:5, Insightful)
To be perfectly fair: How do we know that the researcher who created the graphs optimized both for clean and concise 2-D layout?
In response to my own question: No matter how you want to change the visualization the Linux graph looks to have far fewer multiple source intersection points and a larger prevalence of straight line heirarchical structure.
Re: (Score:2)
I was about to say that myself about the Linux picture having less entry points. It looks like the Windows picture relies on some system calls that are called by just about everything. It seems that you could do a lot for security by first focusing on these central points.
Unavoidable. (Score:5, Interesting)
Really, the graphs are just a way of artfully showing a simple fact, which is that Windows requires more system calls than Linux, to complete a particular task. If you assume that each system call is a potential vulnerability, and that less calls are inherently better and more secure, than the result is a foregone conclusion. But those are pretty big "ifs," and it seems like someone who was pro-Windows would do better to attack those premises, rather than trying to dispute the graph, if it's indeed representative of the true number of system calls.
Re:Unavoidable. (Score:4, Insightful)
I think that's severely oversimplifying, because rewriting the system to take only one system call would certainly result in more bugs, no?
Re:Unavoidable. (Score:5, Insightful)
But no rewriting the system to more specifically do the task in a more focused way would almost certainly result in a lot less bugs, of course the system would be less "generally useful".
Clearly it is a simple argument, less is more.
Backwards compatibility has huge costs, one of them is security. Supporting those apps with 8.3 filename limits, and 3 or 4 different ways of accessing the file system, all mean there is a lot more around to go wrong.
If you are actively using large chunks of "more" you probably don't care, as your system is more flexible, or more featured.
But I'm really not interested in the performance hits the more bizarre features of SMB gives to my webservers, but I daren't switch it off, as I know I'd be running an IIS configuration that is practically unique in the world, and it is flaky enough as it is. Similarly I don't care about that 8.3 compatibility, I know I could switch it off, but I'd worry something obscure might break. So I'm stuck with the "more" even when I want "less". Where as my Linux webservers don't have a GUI, most don't have SMB (or NFS), I lost all that network filesystem junk with the last update on most of them (scp (or http) will do fine for most things).
Guess it comes down to design - the secret of elegance is about what you take out, not what you put in.
And if you want (or are unsure if you need) binary backward compatibility to DOS 1 (or whatever level is provided), you can take out very little.
Re: (Score:3, Insightful)
Re:Looks good. (Score:4, Informative)
I agree with your question. I was thinking of a few ways to analyze the graphs:
The first gives us an idea of the total number of calls involved. The second gives us some idea of how many interactions each call is involved with - more branches would indicate more complexity.
Re:Looks good. (Score:5, Funny)
Re: (Score:3, Insightful)
Re:Looks good. (Score:5, Insightful)
This blogger should be shunned out of the internet world as a worthless hack.
IIS is more secure than is Apache (Score:3, Interesting)
So, not only does the article fail at attempting to say why Linux is more secure than windows, the example t
Re:IIS is more secure than is Apache (Score:5, Insightful)
OLD news (Score:2, Informative)
nice pics (Score:5, Funny)
FUD? (Score:3, Insightful)
Re:FUD? (Score:5, Informative)
Another quality article from Slashdot.
Re:FUD? (Score:4, Informative)
Taken completely out of its original context, the graphs are a useful way to compare real-world examples of C and C++ calling models, though. You'll notice that IIS (C++) has these "clusters" of activity where one routine acts as a nexus for calls into many others. This is fairly standard practice in C++ where you might have an accessor that triggers lots of behavior. In the C version, there's a much more visually procedural pattern where a function calls a few others, and then returns to a function that calls its tree of functions, but might overlap with a few calls to the previous function's utility functions, etc.
Re: (Score:2, Insightful)
--dv
Re: (Score:2)
If your basic claim about C/C++ is right then the consequence is that code written per "standard practice" in C++ is inherently harder to secure than code written in C.
Re: (Score:3, Insightful)
Re:FUD? (Score:5, Insightful)
Is that a surprise? Those of you who doubt the general claims made using these graphs, why don't you find a more compelling statistic to the contrary? Show us how the XP (or better yet, Vista) kernel API is NOT a sprawling mess. Good luck, since even Microsoft has admitted Vista is nearly unmaintainable, and years of schedule slippage proves it no matter what they say.
I don't even blame them. Feature-richness and backwards compatibility are key aspects of what Microsoft provides, and it inevitably results in a mess. These are practically requirements if you have a big expensive software infrastructure built over a long period of time, as many businesses do. But don't kid yourself that the costs avoided by not refactoring all that old code come free. Complexity does impact security.
Re:FUD? (Score:4, Interesting)
OK, but shouldn't that make a Unix syscall interface even more messy? After all, it was created thirty-five years ago.
On the other hand, you might want to count each ioctl and each read(2) or write(2) of different character devices as separate system calls ...
Re: (Score:3, Insightful)
How much backwards compatibility does it really retain though? I realize some basic concepts and even the names of some basic functions (e.g. "read") have actually been around that long, but how many binaries from back then would run on Linux? I doubt you could find one. And that's what I mean by maintaining backwards compatibility on a feature-rich platform.
Re: (Score:3, Insightful)
You've got the power to make a difference in the story selection process, why don't you use it instead of complaining meaninglessly? Especially since it'd already been pointed out by several posters?
Re: (Score:3, Informative)
I checked the link, it goes to firehose. Maybe you don't have access to firehose (it's in Beta, maybe it's karma-dependent for access)? Or maybe you just need to look a little closer, since FireHose does look a little like the main page.
FYI, FireHose lets users affect submission acceptance by rating the submissions before (and after) they get approved -- this allows for pre-emptive action, and also feedback.
Re: (Score:2)
Accurate or not, it's a graph of Apache vs. IIS calls, NOT Linux vs. Windows. Also old as hell.
More to the point it conveys no useful info on how complex the calls are. Are they single function calls that pass off the core of the work to others or are they complicated calls that try to do too many things in one place?
I'm actually surprised the Apache graph was less cluttered than the IIS graph given that Microsoft tends to prefer functions that do as many things as possible so code can be better reus
Re: (Score:2)
Re: (Score:2)
If you read the article then you would understand that the intersection points are memory locations, not words. The author explains that each memory location is a point of possible failure.
Re: (Score:2)
Re: (Score:2)
Which is entirely wrong
> except to the gullible
Unless you're prone to extremist knee-jerk overreaction.
The graphs are not entirely meaningless. They demonstrate trends which have real world interpretable value.
Re: (Score:2)
worlds best general purpose graph drawer. it also turns out to be very subjective
depending on the planarization approximation to generate something that looks
clean or messy.
so if you just build a dynamic call graph and run it through dot (having done this
before many times myself), you cant really say that the overall visual impression
leaves you any more informed than you were before.
put it this way, do you really know anything more a
Interesting (Score:2, Insightful)
Re:Interesting (Score:5, Informative)
Vista (Score:3, Insightful)
Re: (Score:2)
Re:Vista (Score:5, Funny)
Old and Pointless News (Score:5, Insightful)
The photos are completely unreadable and mean absolutely nothing. Let's see the entire graph with labels so that we can know exactly what's going on during the calls. From that graph, for all we know, we could be looking at more than what they claim.
Re: (Score:3, Insightful)
Why mix up the comparison of Linux/Windows with Apache/IIS with C/C++ if you don't have to?
An actual apples-to-apples comparison would be interesting.
A single page with a single picture? (Score:3, Funny)
Linux developers should take note.... (Score:2, Interesting)
KDE and Gnome developers also....lest XFCE surprise them both over time.
Re:Linux developers should take note.... (Score:5, Funny)
A "grand unified coding function"... (Score:2)
Re: (Score:3, Insightful)
It is tempting to add more and more features and functionality over time. Ultimatly, you risk getting consumed by "entropy".
KDE and Gnome developers also....lest XFCE surprise them both over time.
More functionality is better, as long as the software is integrated in a sane way. The problem is functionality in the wrong places, not functionality itself. I think everyone here knows what harm the will to reduce functionality did to GNOME... (awaiting flames already :)
Complete FUD (Score:2, Insightful)
Re: (Score:2)
Also as I pointed out, IIS has loads of redundant system calls making for a bloated system.
This is what the graphs show. Not security, bloat, poor performance and bad development.
Re:Complete FUD (Score:4, Funny)
Re: (Score:2)
I call FUD (Score:5, Insightful)
I'm not saying Windows isn't worse than Linux in this respect, just that this article proves nothing.
Very suspicious of what "syscall" means here. (Score:5, Insightful)
The normal usage of syscall is something that has to transfer control to the system, from your program. Things like accept(), write() and sbrk() but not strcpy() or malloc(). While I haven't done an strace on Apache-httpd I have done it on my own webserver and I find it hard to believe that Apache-httpd is as bad as the graph in the article implies. And given there's no text in the graph it's hard to check.
At it's simplest a HTTP response is: accept(); read(); open(); fstat(); write(); sendfile(); close(); close();. A lot of servers will set options like: FD_CLOEXEC, O_NONBLOCK, TCP_CORK and call shutdown() at the end. You can also easily blow a few more syscalls on config. options which don't do anything for the simplest case, but the graph implies 50-100.
The confusing thing, to me, is that if by "syscall" they meant something like "library calls" then I'd expect much more for Apache-httpd (as large bits of code are in libapr etc.) ... but the comparison is worthless then anyway.
Good question! (Score:3, Insightful)
This article is unbelievable, apparently presenting a conclusion that the writer doesn't understand, using meaningless data.
I'm so confused (Score:4, Funny)
Well, kind of right (Score:3, Insightful)
Good point.. (Score:2)
One of the principles of secure programming is to keep it simple (stupid). Simpler interfaces have fewer potential areas for exploitation. That said, the picture doesn't tell the whole story. For one, the blog title saying Windows is less secure, is possibly inaccurate (at least, it cannot be derived from that picture)
more calls could just as easily mean more security (Score:4, Insightful)
In other words, number of system calls tells us nothing useful about security.
Or is it the other way? (Score:2)
Not that I necessarily disagree with the point of the article, but couldn't you argue that if a hacker has to "investigate each memory access to see if it is vulnerable", then by having more
Re: (Score:2)
BadAnalogy(TM) time. If I want to invade a foreign country, one which has 10 bridges leading to it, and one which has 1000, I'm going to assume (rightly so) that the defending nation is going to have a harder time securing those 1000 bridges than the one securing 10 bridges. Yes, it is easier for me to determine which are undefended in the 10 bridge scenario...it is
Quick Summary (Score:2)
http://blogs.zdnet.com/images/SysCallApache.jpg [zdnet.com]
http://blogs.zdnet.com/images/SysCallIIS.jpg [zdnet.com]
1. These are old
2. They have nothing to do with Linux vs Windows; they are Apache vs IIS
3. They are unlabeled, so they are only good for showing the difference between C (Apache) and C++ (IIS)
So this tells you that Apache is simpler than IIS, and C is simpler than C++.
What are they actually measuring? (Score:2)
Why is Windows less secure? (Score:2)
People who use Linux are tech savvy enough to realize you cant just plug a machine into a wall socket and expect it to be secure.
Windows owners who are wise to this fact have secure machines.
its a dumb argument.
If Joe Sixpack ever got ahold of Linux he would be logged in as ROOT!
In the boardroom: (Score:2, Funny)
Board: "Oooohhh. Ahhhhh. Tubes..." *nod nod*
Corporate Linux Fanboy: "Now as we look at the Microsoft version of the same exact thing, you can see that the tubes snake every which way with no sense of order. Chaos ensues, and the tubes are tangled every which way. Obviously, less tubes means better."
Corporate Microsoft
His Noodly Goodness Does Not Approve (Score:2, Funny)
Doesn't prove much (Score:2)
Imagine if the call graph was much much simpler, like just one central node with branches to each system call. Anyone responsible for such a monolithic blob of spaghetti code would have trouble finding a new job.
I've seen these graphs several times already. With a
Plethora of issues (Score:5, Insightful)
#2. Apples and Oranges (IIS on Windows versus Apache on Linux? Which are we comparing?)
#3. Lack of detail: You can't see what system calls are really involved. No indication of configuration. No version numbers.
So that puts it in the realm of FUD, although the blogger does explain that its just a blog.
From my experience with Linux and Windows, the philosophical difference has to do with what is doing most of the work. In Windows a great deal of functionality is granted by the Windows API. As most programmers throughout the 90's know, Microsoft created their API around the functionality they needed for their own development, and then the rest of us had to buy the 'Secret' API manual with all the treats.
In Linux the Kernel where all those system calls go, is pretty limited compared to Windows. Where most functionality is added for developers is in shared libraries. Windows of course has the too, but its more a matter of where the real action is running. Is it in the kernel or in userspace. With Linux mostly its userspace, so there is less issues with software errors being capable of interfering with the machine itself. Still there are ways developers, especially of servers requiring some superuser priveleges (listening to ports under 1024) have provided security holes in basic interfaces (Sendmail and Bind for example). Still thats not reserved to Linux. Beyond that, we talk about the fact that Linux users don't run as root, but I have seen alot of irc session where the username of root is in the GID. So SOME folks do run as root. Whether the distributions now make that less necessary, that is also how Vista is going.
Apache is a bad project to compare other software too. It has been remarkably well developed both for stability and resisting sneaky security issues. Obviously one can muck up their configuration to reduce their security, but Apache itself (despite its initial moniker of being A patchy webserver) is a terrific example of well run coding projects.
IIS on the other hand is one of the posterchildren of security problems, with early versions not checking for navigation of parent directories, along with other trivial insecurites, based in some ways on permitting the developer to easily integrate IIS with other Microsoft tools.
So yes, IIS on Windows is more insecure than Apache on Linux. And Apache on Linux has always kicked IIS's ass in market share. I wonder if we compared Apache on Linux to Apache on Windows what we would find.
Re: (Score:3)
Not to jump to Microsoft's defense... (Score:3, Funny)
I think the rest has been covered ad nauseum, as far as C versus C++ procedure calls.
Is this in response to Netcraft's February survey? (Score:2)
It's kind of an old article, and the assertion made is pretty stupid. I don't see any other purpose.
Just what we always heard ... now visualised (Score:4, Insightful)
These pictures seem to show that IIS is much more tied in with the Windows OS than Apache is with the Linux OS.
I think that's credible, and that it illustrates that in case of Windows, the wider (and much more complicated) interface between applications and OS is real. I have no difficulty believing that this offers many more opportunities to compromise the OS, and hence is less secure.
say what you want (Score:3)
Bad protocol w/ Good encryption (Score:5, Insightful)
The Sana Security diagrams show us just how bad the windows internal protocols really are. There is no securing this system with Digital Rights management or any other encryption scheme. Any security method placed on top of a such bad messaging protocols will fail miserably because even if the encryption or other security suite is perfect... windows isn't. And the system will be compromised by drilling down through windows... not through the security system.
What good is a bullet-proof pad lock if you put the combination on a yellow sticky note next to the lock itself?
More importantly these graphs show how Linux (Score:4, Interesting)
This explains why Linux server editions tested in the past tend to outperform Windows Server versions by a factor of two in number of users they can handle linearly.
They obviously are calling a hell of a lot less than Windows is.
And it's not clear that those Windows calls are really necessary. I suspect they are mostly redundant calls to multiple versions of the same code from multiple calling modules. This is a result of the size of the Microsoft development teams re-inventing each others code regularly with every new release of the OS. This is pretty clearly what is going on based on Jim Allchin's remarks two years ago about how Vista would "never" be done if they didn't change their development practices.
And it's the only thing that explains the millions of new lines of code in each new release of the OS, without a concomitant increase in OS capability. Vista has what, twenty million new lines of code? For what capability over XP - DRM? I doubt it.
More proof that Windows is the Chosen OS (Score:3, Funny)
Re: (Score:2, Insightful)
IIS is written in C++.
Apache is written in C.
These graphs show the different calling models of C++ and C.
That is *all* they show.
Re: (Score:2)
According to the blog author the graphs are maps of calls to memory locations which would also include calls made from the web server to the underlying OS (eg. calls from apache to glibc).
Re:Pudding graph (Score:5, Insightful)
Re: (Score:2)
Re:Pudding graph (Score:4, Insightful)
It is a map of OS calls required to accomplish a task.
Your point is good, though, a better test would be apache on windows
versus apache on linux.
Re: (Score:3, Informative)
More likely, the article shows the difference between Apache and IIS, on one side, and the glibc and however-it's-called windows' base library, on the other side.
Re: (Score:2)
Re: (Score:2)
Nobody is claiming that this is a quantitative, tit-for-tat, comparison. What is being suggested is that this is qualitative evidence in the security debate.
Apparently this article touched off some pretty severe nerves, though, because both the posters and the mods are going hog-wild with the flamebait.
Re:Pudding graph (Score:5, Insightful)
He said 'syscall' right?
[ pasted from http://en.wikipedia.org/wiki/Syscall [wikipedia.org] ]
System calls often use a special CPU instruction which causes the processor to transfer control to more privileged code, as previously specified by the more privileged code. This allows the more privileged code to specify where it will be entered as well as important processor state at the time of entry.
When the system call is invoked, the program which invoked it is interrupted, and information needed to continue its execution later is saved. The processor then begins executing the higher privileged code, which, by examining processor state set by the less privileged code and/or its stack, determines what is being requested. When it is finished, it returns to the program, restoring the saved state, and the program continues executing.
[ end paste ]
So, forgive me.. I could just be naive; but what does C or C++ calling semantics / methods have anything to do with calls into the OS? Seems like you'd have to make the same calls regardless of the language that you use, or more to the point, that the calls represent the facilities that the OS has made available to you. Seems pretty language independent from my readings.
Re:Pudding graph (Score:5, Insightful)
No, you're right, it has nothing to do with C/C++. The GP was just another example on
Re:Pudding graph (Score:5, Insightful)
No they don't. They show *system calls*, into the kernel, not method or function calls within the user-space program. The language shouldn't make much difference at that level.
Re:Pudding graph (Score:5, Funny)
You are wrong.
Re: (Score:2, Funny)
No, it was IIS on Win vs Apache on Linux. (Score:3, Insightful)
If you accept that more system
Re:Pudding graph (Score:5, Insightful)
What would be interesting is an analysis of the types of system calls. What about a comparison of the functionality of IIS vs. Apache? Perhaps Windows provides some calls that Apache has had to implement in it's own application code. How many of those so called system calls trap in to the kernel?
This is just insubstantial FUD as far as I can see, backed up by indecipherable pictures.
Re: (Score:3, Insightful)
So your assertion is that an overhead road map of cities, such as New York, NY vs. Kalamazoo, MI, would be entirely useless in generalizing points of traffic congestion and points of traffic collisions?
Maybe you don't design operating systems (computer or civil), or, if you do, maybe you shouldn't.
Re: (Score:2)
Re:This is more a comparison of efficiency to me. (Score:4, Informative)
RTFS: Read The Fucking Summary.
0 Unpatched = 100% Patched (Score:2)