Bart's Blog

Now viewing: /tag/kernel

Links

pictures
vimblog source

Search

Bookmarks

Tags

abiword adam apt asm ata audio bash bios board-game boot bug c code debian debug desktop devel disk dpkg email firefox font fs fun gdb geode git git-find git-graft go google gpg hardware html inkscape ion3 ipsec irc irssi joke kdb kernel klips kqemu kvm laptop lastfm ldap linux lua lvm mail make mercurial meta mouse-free mpd mutt net nfs oclug ogre ols oom openswan opteron osx ottawa perl power pxe qemu raid redhat ruby sbc scm screen scsi security shell ssh svn tags talk thinkpad ubuntu uml unix urxvt usb vi video vim vimgit vpn vserver web weechat wmii wmiirc-lua x x86 x86emu xen xen-box-setup xterm zsh

Posts

[ 20080719211329 ]
printable OLS/2008 schedule

[ 20080715214447 ]
wmiirc-lua updates

[ 20080713194704 ]
Git Screencast

[ 20080713143429 ]
four steps to reproducible Debian installs

[ 20080705150651 ]
USB2.0 enclosure benchmark

[ 20080703230924 ]
Linux Kernel Walkthroughs posted

[ 20080702113602 ]
Introducing the Ottawa Ruby folks to Git

[ 20080628160732 ]
Authenticating Linux against OSX LDAP directory

[ 20080627142123 ]
Canada Day Events 2008

[ 20080613162541 ]
Linux Kernel Walkthroughs

[ 20080510083828 ]
is my usb device connected to a fast port?

[ 20080509111534 ]
show more git info on zsh prompt

[ 20080430104202 ]
git-vim

[ 20080412100337 ]
color your word

[ 20080404105620 ]
show current git branch on zsh prompt (2)

[ 20080303200359 ]
how to track multiple svn branches in git

[ 20080301134220 ]
fixing X for GeodeLX

[ 20080108002540 ]
kvm nfs hang

[ 20080107160836 ]
screen -c relative path bug

[ 20080105132854 ]
WeeChat spell suggestions

[ 20071219221358 ]
show current git branch in zsh

[ 20071217141037 ]
wmiirc-lua kitchen sink repository

[ 20071212100316 ]
protecting sshd from OOM killer

[ 20071204234232 ]
wmiirc-lua v0.2.1 remembers a bit more

[ 20071013205336 ]
wmiirc-lua v0.2 has suspend and raw modes

[ 20070929112345 ]
wmiirc-lua debianization

[ 20070924104140 ]
zsh tip of the day - global aliases

[ 20070915094213 ]
wmiirc-lua v0.1.1

[ 20070913130838 ]
comparing two directories

[ 20070909204125 ]
git-rebase --interactive

[ 20070908115905 ]
zsh tab completion awesomeness

[ 20070902000736 ]
wmiirc in lua

[ 20070831150306 ]
debugging with -dbg libraries

[ 20070831142646 ]
svn status like output in git

[ 20070829141847 ]
Git Cheat Sheet

[ 20070821142038 ]
switching to abiword

[ 20070811105746 ]
forwarding ssh and X through screen

[ 20070807112531 ]
git-svnup

[ 20070724082355 ]
reducing power consumption

[ 20070722123734 ]
Makefile template

[ 20070722002649 ]
less, colourful

[ 20070719162359 ]
irssi docs

[ 20070716114553 ]
qemu eats up /dev/shm

[ 20070710214512 ]
git-clean in svn land

[ 20070705113139 ]
ipw2200 not working

[ 20070627191916 ]
git slides updated

[ 20070618220649 ]
unpopular debian packages on my system

[ 20070611125852 ]
git-svn with multiple branches

[ 20070517085321 ]
Linus on Git at Google

[ 20070510134551 ]
vim modelines insecure

[ 20070504205042 ]
bios disassembler

[ 20070504124124 ]
dd hex arguments

[ 20070503013555 ]
urxvt mouseless url yanking

[ 20070502211941 ]
gitdiff.vba v2

[ 20070419234350 ]
india

[ 20070418155857 ]
zsh fun

[ 20070418143632 ]
pipe to pastey.net

[ 20070418094151 ]
vimgrep alias

[ 20070416202545 ]
mouse-free

[ 20070406141850 ]
ATA messages via SCSI layer

[ 20070330221019 ]
GITDiff vim plugin

[ 20070329011735 ]
git presentation for OCLUG

[ 20070328123631 ]
fixing vim's [[ and ]] for bad code

[ 20070316092236 ]
pxeboot and nfsroot with debian

[ 20070312134706 ]
etc snapshots with git

[ 20070307004041 ]
remote power switch

[ 20070222215355 ]
klips-less openswan git tree

[ 20070221041316 ]
git caching for v1.5.x

[ 20070218002214 ]
klips loses zlib

[ 20070209172606 ]
vim and linux CodingStyle

[ 20070207205427 ]
my kqemu install

[ 20070204100100 ]
leaner meaner openswan

[ 20070115111917 ]
wmii+ruby xlock action

[ 20070112131252 ]
cloning xterms in wmii+ruby

[ 20070102010551 ]
wmii+ruby talk for OCLUG

[ 20061228220641 ]
dump and restore

[ 20061218100219 ]
C style

[ 20061101002027 ]
fetching all git branches from remote

[ 20061028111607 ]
local caching for git repos

[ 20061020145437 ]
automatic version creation with git

[ 20061018213306 ]
wmii w/ ruby wmiirc

[ 20061018201907 ]
small fonts

[ 20061007151802 ]
google-codesearch from vim

[ 20060928020813 ]
shell commands

[ 20060920093957 ]
letting screen apps use the ssh-agent

[ 20060908223613 ]
mpdscribble stream support

[ 20060907125149 ]
glGo on ubuntu/dapper amd64

[ 20060906163240 ]
lbdb and mutt

[ 20060902145643 ]
vim tutorial

[ 20060902135722 ]
fixing your terminal

[ 20060828124713 ]
apt-get pdiffs

[ 20060824224842 ]
256 colour xterms

[ 20060824152658 ]
dynamic IPcomp

[ 20060824145428 ]
inkscape++

[ 20060818150516 ]
tags/cscope for system headers

[ 20060805131557 ]
opteron 170, part 4

[ 20060805101941 ]
opteron 170, part 3

[ 20060803233234 ]
opteron 170, part 2

[ 20060802210126 ]
opteron 170

[ 20060729144129 ]
OLS keysigning / 2006

[ 20060728105500 ]
git-find findings

[ 20060727162941 ]
starting on git-find

[ 20060727113632 ]
git-graft and git-find brainstorm

[ 20060726224531 ]
pretty function tracing

[ 20060713174723 ]
uml and multiple network segments

[ 20060707182236 ]
lastfm artist and title to clipboard

[ 20060706162256 ]
reverting a git changeset

[ 20060629212003 ]
user #3

[ 20060628083456 ]
firefox crashes with form input

[ 20060621151402 ]
git vs hg

[ 20060612222204 ]
ldap account management

[ 20060612194523 ]
stupid ldap

[ 20060608092157 ]
rpm hell is right

[ 20060605095726 ]
OpenSSH VPNs

[ 20060604114317 ]
Lenovo lost a customer

[ 20060601234010 ]
generating html colourized sourcecode

[ 20060601211716 ]
ion3 greatness and acting on X selections

[ 20060526085644 ]
software RAID10 performance

[ 20060525234148 ]
learning to love git

[ 20060524121638 ]
recent vim7 articles

[ 20060516095748 ]
bootstrapping debian on my sbc

[ 20060428145140 ]
entropy injection

[ 20060423140628 ]
Adam

[ 20060414202507 ]
converting mp3s to CD

[ 20060413232836 ]
secure apt-get

[ 20060412194423 ]
xen domain0 on debian

[ 20060410220525 ]
LVM2 on RAID1 mirror

[ 20060410102824 ]
building a RHEL4 kernel w/ kdb support

[ 20060407230939 ]
xen on debian

[ 20060407230818 ]
Upgraded look

[ 20060330131334 ]
Flattered by a copy

[ 20060328165153 ]
vim7 from source

[ 20060308123539 ]
Perl, Catalyst, CPAN, and Debian

[ 20060308123302 ]
last.fm

[ 20060128124841 ]
carcassonne and zombies

[ 20060120135931 ]
Election Humour

[ 20050925130002 ]
ldap on debian

[ 20050528190034 ]
Error while mapping shared library sections

[ 20050124130158 ]
IRC over email gateway

[ 20050110225522 ]
brute force attacks sshd?

[ 20050108095026 ]
LDAP authentication (part 1)

[ 20041124130146 ]
sawfish workspace themes

[ 20041113082651 ]
Mini-DV to divx using mencoder

[ 20041004084525 ]
notes on vserver

[ 20040922104334 ]
fast kernel logging

[ 20040326082602 ]
bash vi editing mode

[ 20040305163216 ]
cool debian tools

...



RSS Feed - Full Content

Valid XHTML 1.0 Transitional

Created with Vim

Created with Perl


Linux Kernel Walkthroughs posted

[ link: 20080703230924 | tags: linux kernel oclug talk video | updated: Fri, 04 Jul 2008 17:00:13 ]

Ian just posted the screen casts of the Linux Kernel Walkthroughs that I ran last week.

Here is the same video on google/video... it's a lot lower rez :(

Linux Kernel Walkthroughs

[ link: linux-kernel-walkthroughs | tags: linux kernel oclug talk | updated: Wed, 02 Jul 2008 11:35:56 ]

I will be kicking off a new series of talks at OCLUG later this month. The idea is not mine, but a copy of a similar series ran by Silicon Valley Linux Users Group. Kudos to them!

Here is the info on the first Kernel Walkthrough: Source Tree Layout. I will start off by covering the tree structure and talk a bit about the components, before handing control of the talk over to the audience and let them drive the types of things they would like to explore.

We are being hosted by the TheCodeFactory, which is a very cool concept. From the website:

"TheCodeFactory is a collaborative work space located in downtown Ottawa at 246 Queen Street, between Bank and Kent, above the Green Papaya Restaurant. TheCodeFactory is a clubhouse or water cooler for the Start-up community in Ottawa."

In short they are a place where startups can meet and collaborate way before they have any office space of their own. Ottawa being such a hotspot for startups, this is clearly a good idea.

protecting sshd from OOM killer

[ link: deoom-sshd | tags: linux kernel oom | updated: Wed, 12 Dec 2007 10:08:11 ]

When Linux runs low on memory it tries to kill off applications that may be responsible for the high memory usage. It sometimes gets is all wrong, so the kernel has a way to tell it which processes are to be treated differently by the OOM killer.

I am using ssh to run some stress tests. Occasionally they cause memory to run out, and when I am not paying attention sshd is killed off... which means I cannot turn off the tests.

Here is a script that makes sshd immune to OOM killer.

    for pid in $(pidof sshd) ; do
            echo "disabling oom on pid $pid"
            echo -17 | sudo tee /proc/$pid/oom_adj > /dev/null
    done

NOTE: the sudo tee is a useful trick when you want to write to a file as root w/o spawning a subshell.

ATA messages via SCSI layer

[ link: ata-via-scsi | tags: ata scsi linux kernel | updated: Fri, 06 Apr 2007 17:12:35 ]

I've been working on a contract for Symbio Technologies for the last month. They are makers of a few thin client terminals.

My work for Symbio involves talking to a SATA hard disk using ATA command set. What makes this a bit more interesting is that /dev/hda is the way of the past. New devices are covered by libata drives which fit into the SCSI subsystem.

So, the challenge for me was how to send raw ATA messages using the SCSI layer to the SATA drive. Besides the fact that the interface is sparsely documented, it was pretty easy.

[Read More]

klips loses zlib

[ link: klips-loses-zlib | tags: openswan ipsec linux kernel | updated: Thu, 22 Feb 2007 22:00:20 ]

Last time I wrote about openswan I commented how Martin and I chopped off 18 thousand lines from KLIPS.

Most recently I finished rewriting IPCOMP handling to use CryptoAPI's api to zlib, and Martin was able to remove the zlib that was duplicated in KLIPS. Here are the updated stats:

    $ git diff origin/public HEAD -- include/openswan net/ipsec/ | diffstat | tail -n1
     135 files changed, 14549 insertions(+), 39839 deletions(-)

That, along with other cleanup, bumped us up to 25k lines less then the #public branch of openswan.

It may also be interesting to note that so far we have removed about half the KLIPS code:

    $ git diff v2.6.18 HEAD -- include/openswan net/ipsec/ | diffstat | tail -n1
     77 files changed, 28290 insertions(+)

We're not quite there, but working hard :)

If you wish to play with the code, please seed from kernel.org before fetching from me:

    $ git clone git://git2.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/ linux-2.6.git
    $ git clone --reference linux-2.6.git git://tachyon.jukie.net/klips-fsm.git/ klips-fsm.git

vim and linux CodingStyle

[ link: vim-and-linux-coding-style | tags: vim linux kernel c code | updated: Sat, 16 Jun 2007 21:03:49 ]

It would seem that either no one that codes for the Linux kernel does so under vim, or if they do they don't have the time to share their vim configuration that doesn't conflict with the kernel's CodingStyle.

Below I will discuss some changes I had to make to my .vimrc and .vim/c.vim to work with C efficiently.

[Read More]

leaner meaner openswan

[ link: leaner-meaner-openswan | tags: openswan ipsec linux kernel | updated: Thu, 22 Feb 2007 22:00:28 ]

I started working for Xelerance in April of 2006, and the contract ended in December. Since then I've been working on a KLIPS-ng, of sorts. The idea was to remove all the crypto code from KLIPS and convert it to use CryptoAPI already in the Linux kernel.

Last objective of my work was to add OCF support to KLIPS, so that we could take advantage of the asynchronous crypto facilities provided there, as well as several OCF hardware drivers. The BSD kernels have been using OCF, Open Cryptographic Framework, for some time and more recently it was ported to Linux.

[Read More]

entropy injection

[ link: entropy-injection-driver | tags: linux kernel code | updated: Fri, 05 May 2006 19:09:18 ]

I was installing openswan on my sbc router box. The sbc doesn't have much hardware on it, and what it does have did not contribute to the entropy pool.

I have a few boxes around with relatively good entropy (keyboard/mouse input), but there was no way to pass that entropy to the router for RSA key generation. I had to write some code to fix it. Be warned, it's pretty EVIL...

UPDATE: see below about rng-tools.

[Read More]

building a RHEL4 kernel w/ kdb support

[ link: 20060410102824 | tags: linux kernel kdb | updated: Wed, 22 Aug 2007 11:42:52 ]

Sometimes I have a need to reproduce bugs on other platforms. When that platform uses a heavily patched kernel, it makes it hard to debug. Below are some notes I took while building a RHEL4 kernel with kdb support.

[Read More]

fast kernel logging

[ link: 20040922104334 | tags: linux kernel | updated: Wed, 22 Sep 2004 10:43:34 ]

As part of some driver work for a client I looked at some fast logging methods since logging via printk() to syslog sucks.

Here are the hits I got:

  • ULOG - it's what netfilter uses for logging packets. It relies on netlink for transport and a ulogd in user space to treat the logs. Apparently ULOG2 is in the works.
  • DBUS - patch from Robert Love that adds a fast event notification mechanism to the kernel. It too relies on netlink for transport. It's mostly meant for events like "Your CPU is overheating", not packet logging.
  • relayfs - a patch that adds a flexible buffering scheme for logging. Seems like the most flexible of the bunch.

Looks like none of the above are flexible and supported by deployed kernels (our target is RHEL3)... so syslog it is in the interim.





Bart Trojanowski
http://www.jukie.net/~bart
bart@jukie.net