Lab 5 SSH & Update

Lab 5 is the first lab where we are required to program on an x86_64 or AArch64 processor. Naturally, this will present a moderate challenge as we will be working with a more complicated instruction set. Before we begin writing any code, we will have to access an x86_64 or AArch64 machine. Since the machines provided by the college are mostly AArch (with only one of the machines being x86_64), AArch seemed like a good place to start. Before I write about the actual lab content, I would like to detail some entertaining details of the prior class where we actually accessed the machine.

At the beginning of the semester, one of the firsts tasks that the class was given was to generate a pair of SSH keys and send the public key to our professor. This would be used in the future to enable our access to the college machines, where we would write code for this lab. However, when we were instructed to access the machines in class, pretty much everyone with a machine had either misplaced or forgotten the location of their keys, and were therefore unable to access the machines. James (jdsemilla) proved to be a lifesaver in this situation, since he was successfully able to SSH into the AArchie machine and use his superuser permissions to view other user's temporary passwords. In this way, we were able to provide access to the entire group. I found this challenge to be incredibly fun.

In regards to the actual lab, the main challenge was to merge two portions of code into the solution. Code to output a string to the screen was provided, and code to loop an arbitrary block of code was also provided. In order to achieve a solution, the string output code must be looped. In writing, this seems simple, but in execution it has a few catches. First, we must create a pointer to the space in the string (looking at the string's location in memory, offset by the length of the word) where we wish to place our counter. Before writing the counter to memory, we must parse it as an ASCII value to have it output properly. Finally, we must perform some division to determine if the high byte should be output.

The following Monday, I collaborated with my peers to create a solution for lab 5. Take a look at the code here.

Comments

Popular posts from this blog

Project Part 3

Lab 5 x86_64 Update