Archive for November, 2006

Why can’t you un-pend an IRP?

Thursday, November 30th, 2006

I was playing around with SDV and the pending bit the other day, and tried setting and clearing it in back-to-back lines in a dispatch routine. Having CSQ mark the IRP pending (which is automatic, if it succeeds at queuing the IRP) caused SDV to blow up with a very confusing error.

According to a PowerPoint slide by Adrian Oney, here’s the reason:

There is no IoUnmarkIrpPending because a driver above you can legally mark your stack location pending and return STATUS_PENDING

He goes on to say that PoCallDriver does this. News to me! I had always wondered why it was illegal (as opposed to simply immoral) to mark and un-mark an IRP as pending; it’s because in so doing, you would destroy the state of the driver above you who was depending on this.

Still CCIE #5444

Monday, November 27th, 2006

After donating a nontrivial amount of my Thanksgiving weekend to studying, I am pleased to report that I passed my re-certification exam and am still CCIE #5444.

I had complained about a few books previously; now I have some empirical data to help me better evaluate them. First, let me say that I was pleasantly surprised with one Cisco Press book, Network Security Principles and Practices by Saadat Malik. Things got a little unclear when he got deep into crypto, but otherwise, this is hands down the best of the books I read this weekend.

The rest of the books were not… good. Having taken the exam, I stand by my estimate from my last post that the official exam guide addresses, at best, 25% of the subject matter. Without discussing specific exam items, I can tell you that I saw very detailed questions from a wide range of topics, including Token Ring, BGP, Ethernet, IP addressing, and lots of other non-security-specific topics, virtually none of which were covered (or at least covered adequately) by any of the books or RFCs I read.

As bad as the books were, I am pleased to report that the exam is great, from a technical perspective. For the most part, the questions were difficult, precise, and intelligently crafted. There were some very difficult crypto questions, and it was obvious that the writers of those items were waaaay more comfortable with the subject matter than any of the book authors. And we’re not just talking protocols, either – there were actual algorithm questions.

Overall, I’m happy with the certification. It’s expensive and is a bit diluted compared to the 90’s, but it still seems to me to be the best one out there. And, best of all, it’s done for another two years. Just in time, too; I’m behind on some (network) driver stuff.

Pop quiz: would I still be happy with the exam content if I had not passed? :-)

Offtopic: podcasts I like

Friday, November 24th, 2006

Totally off topic, I’ve told several people over the last couple of days about some of the podcasts I listen to regularly. Here are three of my favorites.

  • TalkCrunch by Michael Arrington of TechCrunch. He gets A-list guests (well, from my little world, anyway) and asks good questions. Great way to stay plugged in.
  • Swarthmore College Faculty Lectures – a series of faculty lectures going back over the past couple of years. Some great stuff here across liberal arts areas. Generally aimed at non-specialists. Good for horizon broadening.
  • The University of Chicago Law School podcasts are amazing. Aimed somewhat at lawyers, but I don’t have any trouble understanding this stuff and I’m decidedly NOT a lawyer. Really fantastic lectures on topics from Information Asymmetry to the philosophy of law.

In addition, the SCOTUS blog has several interesting episodes up, and looks like a promising addition to my list. The Nina Totenberg interview, in particular, was quite good.

Any recommendations? I must admit that I am, in general, disappointed with the quality of most of the tech-related podcasts I’ve tried (with Arrington as a notable exception). I might try to remedy that myself someday; who knows. :-)

Back in cisco land

Friday, November 24th, 2006

I have finally started studying in earnest for my CCIE re-certification. I’m taking the Security specialization exam (which makes more sense for me, considering what I do for a living). I looked at the exam blueprint, and (surprisingly?) not much has changed since last time.

I decided to try actually ordering a book, since they keep raising the price of the exam. The one I got was marketed as the official exam guide from Cisco Press. I got that book last week, and yesterday I opened it up to see what it was like.

Wow. It is bad. No, it’s terrible. Seriously. I can’t imagine how it got published; the author clearly didn’t remember much of what he apparently once knew, detail-wise, and he didn’t bother to go back and look things up. Furthermore, the book appears to have had no editor, as there are various grammar and spelling bugs and even, in one case, a blatant margin note from the author to the effect of is this right?

I’ve taken a lot of tests in my life, for certifications and otherwise, and cisco’s CCIE exams are among the hardest. I can tell you that this book will prepare you for maybe 25% of the questions. I feel bad for anyone who shells out $300 for a test after preparing by reading this book.

Anyway, the worst stuff by far is the crypto stuff. It really appears to me that nobody knows this stuff, at least at Cisco Press. There are minor problems everywhere – things like MD-5 is difficult to decrypt. Another Cisco Press book posed the following question: What is the only way to defeat a man-in-the-middle attack? – with the absolutely stunningly insightful answer Cryptology.

Maybe I’m just being too picky, but I think I’m not, for two reasons: 1) This particular security exam is supposed to be among the most difficult and detailed of security exams, and the kind of sloppiness in this book will make you fail, and 2) security is Very Hard Stuff, and security pros need to know their subject matter cold. Security mistakes resulting from getting it almost right can be devastating.

At a quick glance, Wikipedia seems to be more accurate than most of these books (but proceed with caution down that path), but if you really want to grok security, from a crypto standpoint anyway, read Applied Cryptography by Bruce Schneier. Twice.

Fifteen ways to turn off a laptop?

Tuesday, November 21st, 2006

Joel Spolsky is a bright guy. His latest blog posting about user interface design, Choices = Headaches (should that be == instead?), makes a case that I’ve been rolling around internally for our Next Big Product. Simplisticly: sometimes too many choices are worse than you’d think.

The really amazing part is that he references some research done by Barry Schwartz, a professor at Swarthmore College. Amazingly enough, I just listened to a podcast of one of his lectures on this topic this week: Too Many Choices: Who Suffers and Why. It’s really in interesting lecture, and worth an hour of anyone’s time who is tasked with product design.

I continue to be amazed at how the Blogosphereâ„¢ cross-links itself in fascinating ways.

More fun than dental work: getting a Subversion client working on Vista

Tuesday, November 21st, 2006

For as long as I’ve been making money programming, I have been using CVS for version control. And, while it’s served me faithfully over the years, it is showing its age, having trouble coping with our multi-million line codebase and our ever-growing dev and test teams. Everyone says Subversion is the way to go, so I decided I’d give it a shot for a personal project this week.

Like Ken, I upgraded most of my dev boxes to Vista this week. Why does that matter? Well, I hear from several friends that Cygwin doesn’t work well on Vista, and I only allow network access to source control over SSH, which for me always meant OpenSSH via Cygwin. So, that means going to get Putty and PLink, and associated utilities.

To cut to the chase: I ran into a bunch of little issues, found lots of misinformation on the web, and generally had to goof with this for hours to get it working. So, here’s what I came up with; hopefully it will be helpful to the next person who walks this path.

One more piece of background: the network Subversion server I set up is running on a Debian Sarge server, using Subversion 1.3 from backports.org. I used the stock OpenSSH server. Now, on to the show.

Step 1. First, you need a Subversion client. I downloaded the latest Win32 release from subversion.tigris.org. I haven’t ever been much of a GUI guy, so I can’t really say much about the various other clients; I just tend to stick with the command-line client. That’s what I tested with.

Step 2. Next, you need an SSH client. I got Putty and its associated tools. I put the programs in a directory under Program Files, because it seemed like the right thing to do.

Step 3. Add both the Putty directory and the Subversion binary directory to your path. You should be able to open a command prompt and type putty and svn and have the programs run.

Step 4. While it’s probably not strictly necessary, I generated a private/public key pair using putty’s key generator tool. You can pick whatever algorithm and key length you want (2048-bit RSA if you’re worried). Save the key pair in your home directory. Note that, at least for OpenSSH, you do NOT have to export the key pair to a separate key – the .ppk file that Puttygen leaves you has an appropriate key already.

Step 5. Do the key exchange – open your .ppk file and grab the public key (the part that starts with the AAAA’s) and add it to your .ssh/authorized_keys file on the server. When you’re done, you should be able to connect to the server without supplying credentials, like so: plink server.name. Setting this up for the first time is confusing to a lot of people for some reason. Keep trying until you get it – it will make your subversion experience (or cvs for that matter) a lot more enjoyable.

Step 6. Configure Subversion. On Vista, the config file is in a subdirectory of your home directory, in the AppData\\Remote directory. Find the SSH line and change it to: ssh = plink -i c:\\path\\to\\id.ppk -batch. Note the double-backslashes; they’re important.

That’s all. Try it out by typing svn ls svn+ssh://server.name/repos and make sure it returns something reasonable.

Feel free to drop questions if you have trouble; I’d be glad to help if you ask while I still remember what I’m doing.

More on Passthru

Monday, November 20th, 2006

Speaking of recent Passthru changes, there’s a not-so-recent set of changes to the Passthru INFs in the XP+ DDKs. If you originally did your IM INFs before that time, it’s time to re-check them. In particular, there were changes around the CopyInf directive.

Speaking of which, I mailed Johan Marien at Microsoft today to let him know that I think the Passthru sample should be made redistributiable, since so many IM drivers are based on it directly. If you agree, you might want to drop him a note in support. Or, leave a comment here and I’ll forward everything on to him.

UPDATE: Thomas Divine points out in the comments that there are known bugs in 3790 Passthru, and also that there is a redistributable version available at wd-3.com. See his comment for details.

Site maintenance: new WDK tag

Sunday, November 19th, 2006

I’m changing over my DDK tag to WDK going forward, with a little bit of a transition period until I get tired of clicking the extra checkbox. I know I have a lot of subscribers to the DDK tag as its own feed, so this is official notice that DDK is now going to be used for downlevel-only posts.

Also, while I’m at it, and since the US holiday of Thanksgiving is approaching, I’d like to send out a thank-you to all of my readers. This blog’s traffic has multiplied again over the past year, and I really enjoy knowing that there are people out there that find this stuff as interesting as I do.

Now back to regularly scheduled programming. :-)

A fantastic podcast series from Xerox PARC

Sunday, November 19th, 2006

I ran across this fantastic podcast series from PARC the other day. There is, in particular, a four-part series on scalability and multi-threaded architecture. They are:

If you have any interest in this field, these guys are the metaphorical horse’s mouth. The Niagra talk was particularly amazingly good; makes me want to get Windows running on it somehow. :-)

There’s also an interesting one on a slightly different programming topic, Migrating Legacy Software to New Technologies by Carlos Araya of ArtinSoft, discussing automated language translation of legacy code to more modern architectures. Not as in-depth as the others, but still an interesting topic.

Alex Ionescu is blogging

Sunday, November 19th, 2006

I’ve been meaning to post this for days but I keep forgetting. Alex Ionescu, who is another one of those guys that just seems to know way more than one person should be allowed to know about Windows internals, has started blogging (again).

He’s got a good user-mode debugging series posted, and if I know Alex, there’s plenty more good stuff still to come.

Welcome to the blogosphere, Alex.