Monday, November 28, 2011

git server on non standard ssh port

Some time ago I think about how to connect to a git server if it's on non standard ssh port. This case can occurs when you make port forwarding with ssh inside your network (look at -L key in man ssh), or if you want to avoid scanning your hosts by dumb bots.

At first I think about .git/config file and how can I force git to ask server on another port. But next I realized that's not question about git it's the question about ssh. And solution was really simple - put a host description into ~/.ssh/config


Host myhost.xxxx
    user imauser
    Port 31337

Tuesday, November 8, 2011

I looked through book about writing kernel modules in Linux (actually it's in russian lang). It's oriented on x86 architecture. I fount some not so real but interesting sample with syscall from inline assmebler code and port it to arm architecture. I used codesourcery toolchain.

Some information about arm syscalls in linux. According ARM EABI one use r7 register for syscall number and swi 0 (or svc 0, codesourcery gcc generate the same code) for syscall. One can use also r0-r5 registers for 32 bit parameters (or r0...r6 for 64 bit parameters, but them must be aligned to even number of registers)