Encrypting Linux’s home directory is usually the first thing people worried about their personal data do. However, this approach comes at the cost of: (i) slower booting, (ii) problems when rebooting remotely and ssh-ing the machine straightway (more about this in the post), and (iii) the necessity to place all sensitive information in the home directory. In this post I will show another way to keep sensitive information encrypted, which – in my view -, is simpler and more secure.
Category Archives: Linux
Using reverse ssh tunnels for efficient remote working
Having in place a setup that allows remote access to your development machine – which most probably is located at your work place -, has many advantages. Not only does it prevent duplicating equipment (e.g., having a decent set-top box at home), but it enables the possibility to get work done when travelling. However, some times it is desirable that such development machine is only available from a local network. It is in these cases that reverse ssh tunnels come handy.
Automating fio tests with Python
Lately, I am spending quite some time verifying Open-Cannel SSD hardware prototypes in the context of LightNVM. A great deal of these tests is about benchmarking performance (iops) and latency, for which I use fio. Fio is a great tool to test specific I/O patterns. However, when wanting to benchmark a range of I/O configurations in different setups, it is very convenient to automatize the process. In this post, I present a simple python script that allows to automatize fio tests as a function of block size, number of jobs, I/O depth, etc. and stores the test results in csv format. Also, in order to account for variances, the script supports replicating each fio test a configurable number of times, being the average of these the one being stored.
Setup for transparent SSH with iTerm and AppleScript
I use my MacBook as my main machine from which I access daily a number of servers that I use for development, experimentation, and maintenance. Since I do all my job from the terminal, I end up using SSH extensively. One major issue I have encountered is that SSHing different servers entails (i) having a mental map of which terminals correspond to which machines, and (ii) the overhead of introducing a SSH line immediately after opening a new terminal window. Although this can be mitigated by merely using zsh’s substring history search, aliases, etc., I found it easier to offload the responsibility to my muscle memory. In this post, I will describe my setup which, after over a month of being in production, has proved to make my life easier.
Configuring kmemleak on the Zynq
The other day I came across a memory leak in a char device driver I am implementing for the Linux Kernel. While in user space one can make use of Valgrind (see post), kernel space is not that simple to monitor. Instead, one can use kmemleak, a memory leak detector embedded in the kernel which, among other architectures, supports ARM. In this post I will cover one minor configuration obstacle that one must overcome to get kmemleak to work on the Zynq ZC702.
Running Ubuntu on Zynq-7000
I have lately needed to get Ubuntu running on my Zynq, and as usual, it required a bit more a following a recipe. My final goal was to run a macro benchmark where the task was to compile the Linux Kernel for ARM in the Zynq itself. In this post, I will go through what are the necessary steps to get Ubuntu running on the Zynq, what is needed to get a working apt-get, and finally how to fix some compilation errors when compiling the kernel. Note that the last point is not specific for the kernel, but it can happen even when compiling a simple Hello World.
Open Virtualization for Xilinx’s ZC-702
Open Virtualization (OV) is the first open software implementation of a Trusted Security Environment (TEE) for ARM TrustZone hardware security extensions as specified in Global Platform’s TEE Specification.. Sierraware is the company behind it. Since I first knew of OV I have had a great interest in using it for my research, and therefore I have spent some time understanding it and improving it to work with the boards we work with – the Xilinx’s ZC702. This efforts are now materialized in a git repository, under a GNU v2.0 License.
Parallels 9 for Mac improving guest – host communication
As most of my post containing tips, this one is also about how to integrate MacOS with a proper Linux developing environment without introducing a big overhead. The obvious question here would be: Why don’t you fully move to Linux and forget about having to integrate your everyday OS with your developing environment? Well, we all have our preferences and motives, which are not the goal of this post. For those who use a similar setup as mine here comes good news: Parallels 9 successfully approaches one of the biggest issues I have found when dealing with Virtual Machines (VMs) under MacOs: Sharing the file system between the host and the guest machines.
Non case-sensitive Mac OS Extended formatting colliding with git clone
If you use Mac OS for development and have ever experienced that cloning a GIT repository produces instant non staged changes for commit then this is your post. Here I will explain the underlying problem for this GIT weird behaviour and propose 2 solutions: (i) lazy i-don’t-want-to-format-my-mac, and (ii) I want to do things right. So, let’s get started.
Getting efficient with vim and YADR
A couple weeks ago I posted my new working environment: YADR + iTerm2 . I am still loving it, and in fact it gets better and better as one gets used to the shortcuts and the new functionality that was simply not there before! The problem is that due to all that many new shortcuts + the chances of you messing up when typing something wrong in vim, I keep finding myself in google or egreping my YADR tree very often. This post is therefore as much for myself as for anybody in the same situation as me: A compilation of shortcuts and useful commands that make my/your life easier. Continue reading