Sunday, February 24, 2008

Our first IEEE paper has been published!

Dr. Ajantha came back from the "International Conference on Advanced Communication Technology" after submitting what appears to be our (that is myself and Wathsala's) first paper at an IEEE conference. The subject of the paper which you can download and read here, is about a Next Generation Proxy caching system which fuses the idea of Cached content and Bandwidth utilization with web 2.0/x.0 trends.

These ideas are the result of what we learned by implementing Bassa, an Open Source Next Generation Proxy Server (NGP) at UCSC. We are very excited about continuing our research and development to expand its scope.

Saturday, February 23, 2008

Just another day @ the Sri Lanka Customs Office

Oh boy what a day it was! I spent a good 5 hrs at the Sri Lankan Airport cargo office on Friday trying to clear a 3" tiny piece of memory which I had ordered for my Toshiba L1 laptop.

I didn't really expect this to be held by customs in the first place, considering its size, weight, cost and the fact it was a 256MB chip (quite outdated by todays memory standards). I was also misled by FedEx's tracking comments which gave no indication of the shipment being held at customs but stated that it was on its way for delivery. It was only when the courier guy came and handed a letter I knew what happened. What was more amusing was the next update on FedEx's tracking site - Goods delivered.

I called up FedEx and they said in order for them to clear it I had to get apply for a VAT number which seemed like an unnecessary hassle. They did suggest I go to the customs and try to sort it out myself - thank you FedEx for getting me FedUp!

So I made my way to Katunayake which turned out to be a real Katu (needle) trip :) Granted you have to go through a strip search of the vehicle and get two passes, one for the person and another for the vehicle, considering the current security situation is understandable. What really ticked me off was the series of events that happened after I got in.

To be continued ...

Friday, February 15, 2008

IMPORTANT: Upgrade Linux kernel to fix possible root exploit

Its rare but sometimes it *can* happen. This is an important one to fix! If your running a GNU/Linux server (or desktop), running kernels from 2.6.17 - 2.6.24.1, it is HIGHLY recommended that you update the system using what ever package management system your distro provided, IMMEDIATELY.

If not updated, your system could be at risk allowing a normal shell user to gain root access (i.e root exploit).

A technical overview of the exploit and links to POC code and source code patch can be found here.

Monday, February 04, 2008

OLPC coming to Sri Lanka

olpc_colombo
Last Friday, I had the privilege to attend a workshop on "One Lap Top Per Child" or OLPC as they call it, at HNB Towers. The OLPC is a marvellous piece of technology (note, I fell short of saying hardware). For instance it has a very low power processor that was developed by AMD to only consume 2 Watts of electricity, compared to 30 - 40W on other notebooks!

The battery has a life span of 4,000 hours compared to about 2,000 on others and only costs USD 10 to replace it (costs about USD 60 - 100 on our laptops). The screen works great in both indoors and in bright sunlight where it consumes less energy and has a higher resoultion in a black & white mode. The screen's back light can be replaced easily without having to replace the whole LCD panel and it only costs 25 cents to replace!

It has a WiFi like no other! It supports mesh computing, a standard known as 802.11s (as opposed to 802.11b/g). And still normal wireless devices are welcomed to connect as p2p devices (ad-hoc mode). Wireless distance can range all the way up to even a 1km away (shhh don't tell TRC) by auto negotiating its connection speed to a lower value. All it needs is 1 laptop with an internet connection for others to have internet connection. It even triangulates and shows other OLPCs in a relatively positioned map.

Its water proof, dirt proof and shock/drop proof. Held together by 13 or odd screws, this is probably the only laptop in the world where you are encouraged to take it apart and try to fix problems before taking it for repairs with no warrenty issues.

So in other words, this is device of freedom. Total freedom! And who better to have that but the next generation. I just wish they'd come up with an OLPD too (see below :)

With all that enthusiasm, I started digging around the OLPC's shell to dig up info I could cherish about its specs (hardware & software). So for all you GNU/Linux geeks out there this bit is for you. Other (Mac & Win users) can enjoy the pics, read about the hardware and run to learn GNU/Linux ;)

olpc_colombo olpc_colombo olpc_colombo


/proc/cpuinfo

processor : 0
vendor_id : AuthenticAMD
cpu family : 5
model : 10
model name : Geode(TM) Integrated Processor by AMD PCS
stepping : 2
cpu MHz : 431.222
cache size : 128 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu de pse tsc msr cx8 sep pge cmov clflush mmx mmxext 3dnowext 3dnow
bogomips : 863.54
clflush size : 32

/proc/meminfo

MemTotal: 237852 kB
MemFree: 27792 kB
Buffers: 1008 kB
Cached: 98988 kB
SwapCached: 0 kB
Active: 118936 kB
Inactive: 67584 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 4 kB
Writeback: 0 kB
AnonPages: 86544 kB
Mapped: 26180 kB
Slab: 16588 kB
SReclaimable: 5712 kB
SUnreclaim: 10876 kB
PageTables: 864 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 118924 kB
Committed_AS: 163984 kB
VmallocTotal: 794604 kB
VmallocUsed: 17856 kB
VmallocChunk: 776592 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 4096 kB


lspci -v

00:01.0 Host bridge: Advanced Micro Devices [AMD] Unknown device 0028 (rev 21)
Subsystem: National Semiconductor Corporation Unknown device 0028
Flags: bus master, 66MHz, medium devsel, latency 248

00:01.1 VGA compatible controller: Advanced Micro Devices [AMD] Geode LX Video (prog-if 00 [VGA])
Subsystem: National Semiconductor Corporation Unknown device 0030
Flags: 66MHz, medium devsel, IRQ 14
Memory at fd000000 (32-bit, non-prefetchable) [size=8M]
Memory at fe000000 (32-bit, non-prefetchable) [size=16K]
Memory at fe004000 (32-bit, non-prefetchable) [size=16K]
Memory at fe008000 (32-bit, non-prefetchable) [size=16K]
Memory at (32-bit, non-prefetchable)

00:01.2 Entertainment encryption device: Advanced Micro Devices [AMD] Geode LX AES Security Block
Subsystem: Advanced Micro Devices [AMD] Geode LX AES Security Block
Flags: bus master, 66MHz, medium devsel, latency 0
Memory at fe010000 (32-bit, non-prefetchable) [size=16K]

00:0c.0 FLASH memory: Marvell Technology Group Ltd. Unknown device 4100 (rev 10) (prog-if 01)
Subsystem: Marvell Technology Group Ltd. Unknown device 4100
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 11
Memory at fe020000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [88] Power Management version 2
Capabilities: [9c] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-

00:0c.1 Generic system peripheral [0805]: Marvell Technology Group Ltd. Unknown device 4101 (rev 10) (prog-if 01)
Subsystem: Marvell Technology Group Ltd. Unknown device 4100
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 11
Memory at fe024000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [88] Power Management version 2
Capabilities: [9c] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-

00:0c.2 Multimedia video controller: Marvell Technology Group Ltd. Unknown device 4102 (rev 10) (prog-if 01)
Subsystem: Marvell Technology Group Ltd. Unknown device 4100
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 11
Memory at fe028000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [88] Power Management version 2
Capabilities: [9c] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-

00:0f.0 ISA bridge: Advanced Micro Devices [AMD] CS5536 [Geode companion] ISA (rev 03)
Subsystem: Advanced Micro Devices [AMD] CS5536 [Geode companion] ISA
Flags: 66MHz, medium devsel
I/O ports at 18b0 [size=8]
I/O ports at 1000 [size=256]
I/O ports at 1800 [size=64]
I/O ports at 1880 [size=32]
I/O ports at 1400 [size=128]
I/O ports at 1840 [size=64]

00:0f.3 Multimedia audio controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] Audio (rev 01)
Subsystem: Advanced Micro Devices [AMD] CS5536 [Geode companion] Audio
Flags: 66MHz, medium devsel, IRQ 5
I/O ports at 1480 [size=128]

00:0f.4 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] OHC (rev 02) (prog-if 10 [OHCI])
Subsystem: Advanced Micro Devices [AMD] CS5536 [Geode companion] OHC
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 10
Memory at fe01a000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 2

00:0f.5 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] EHC (rev 02) (prog-if 20 [EHCI])
Subsystem: Advanced Micro Devices [AMD] CS5536 [Geode companion] EHC
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 10
Memory at fe01b000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 2


lsmod

Module Size Used by
nls_utf8 1888 2
vfat 12064 2
fat 48124 1 vfat
sg 33276 0
i2c_dev 7268 0
usb8xxx 18084 0
libertas 183324 1 usb8xxx
ieee80211 32232 1 libertas
ieee80211_crypt 5664 1 ieee80211
cs5535_gpio 4740 0
mousedev 11192 0


xorg.conf

# Xorg configuration file for OLPC

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "fake" "CorePointer" "CoreKeyboard"
EndSection

# Fool 1.4 autoconf into seeing a mouse and keyboard so it won't
# try to synthetize them
Section "InputDevice"
Identifier "fake"
Driver "void"
EndSection

Section "Module"
SubSection "extmod"
Option "omit XFree86-DGA"
#Option "omit XFree86-Misc" # needed by 'xset m'
Option "omit MIT-SUNDRY-NONSTANDARD"
Option "omit TOG-CUP"
Option "omit Extended-Visual-Information"
EndSubSection
Load "freetype"
Load "evdev"
# Load "record" # Mostly a debugging tool
EndSection

Section "Extensions"
Option "XTEST" "Disable" # Mostly a debugging tool
#Option "SECURITY" "Disable" # CRASH!
Option "XC-APPGROUP" "Disable"
Option "XINERAMA" "Disable"
EndSection

Section "Monitor"
Identifier "DCON"
HorizSync 30-67
VertRefresh 48-52
DisplaySize 152 114
Mode "1200x900"
DotClock 57.275
HTimings 1200 1208 1216 1240
VTimings 900 905 908 912
Flags "-HSync" "-VSync"
EndMode
EndSection

Section "Device"
Identifier "Geode"
Driver "amd"
VendorName "Advanced Micro Devices, Inc."
BoardName "AMD Geode GX/LX"

# Disable VGA for the OLPC board
Option "NoVGA" "true"

Option "AccelMethod" "EXA"
Option "NoCompression" "true"
Option "CustomMode" "true"
Option "DconPanel" "true"
Option "PanelGeometry" "1200x900"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Geode"
Monitor "DCON"
DefaultDepth 16

SubSection "Display"
Depth 16
Modes "1200x900"
EndSubSection
EndSection


iwconfig

lo no wireless extensions.

msh0 IEEE 802.11b/g Nickname:"Mesh"
Mode:Repeater Frequency:2.412 GHz Bit Rate:2 Mb/s Tx-Power=18 dBm
Retry limit:8 RTS thr=2347 B Fragment thr=2346 B
Encryption key:off
Power Management:off
Link Quality=90/100 Signal level=-46 dBm Noise level=-86 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:15504
Tx excessive retries:424 Invalid misc:781 Missed beacon:0

eth0 IEEE 802.11b/g ESSID:"olpc-mesh" Nickname:"MRVL-USB8388"
Mode:Ad-Hoc Frequency:2.412 GHz Cell: 02:24:14:95:01:57
Bit Rate:2 Mb/s Tx-Power=18 dBm
Retry limit:8 RTS thr=2347 B Fragment thr=2346 B
Encryption key:off
Power Management:off
Link Quality=54/100 Signal level=-59 dBm Noise level=-78 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:15878
Tx excessive retries:432 Invalid misc:794 Missed beacon:0


ps aux

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 1.7 4968 4152 ? Ss 05:51 0:02 oatc /init
root 2 0.0 0.0 0 0 ? S> 05:51 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? SN 05:51 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S> 05:51 0:00 [watchdog/0]
root 5 0.1 0.0 0 0 ? S> 05:51 0:03 [events/0]
root 6 0.0 0.0 0 0 ? S> 05:51 0:00 [khelper]
root 47 0.0 0.0 0 0 ? S> 05:51 0:00 [kblockd/0]
root 48 0.0 0.0 0 0 ? S> 05:51 0:00 [ksuspend_usbd]
root 51 0.0 0.0 0 0 ? S> 05:51 0:00 [khubd]
root 53 0.0 0.0 0 0 ? S> 05:51 0:00 [kseriod]
root 114 0.0 0.0 0 0 ? S 05:51 0:00 [pdflush]
root 115 0.0 0.0 0 0 ? S 05:51 0:00 [pdflush]
root 116 0.0 0.0 0 0 ? S> 05:51 0:00 [kswapd0]
root 118 0.0 0.0 0 0 ? S> 05:51 0:00 [aio/0]
root 518 0.0 0.0 0 0 ? S> 05:51 0:00 [kpsmoused]
root 560 0.0 0.0 0 0 ? S> 05:51 0:00 [kmmcd]
root 616 0.0 0.0 0 0 ? Z 05:51 0:00 [init]
root 642 1.3 0.0 0 0 ? SN 05:51 0:39 [jffs2_gcd_mtd0]
root 645 0.0 0.2 2136 664 ? Ss 05:51 0:00 init [5]
root 734 0.0 0.2 2260 600 ? S>s 05:51 0:00 /sbin/udevd -d
root 863 0.0 0.0 0 0 ? S> 05:51 0:00 [libertas_main]
root 864 0.0 0.0 0 0 ? S> 05:51 0:00 [libertas_worker]
root 1231 0.0 0.2 1804 600 ? Ss 05:52 0:00 syslogd -m 0
root 1234 0.0 0.1 1740 396 ? Ss 05:52 0:00 klogd -x
dbus 1257 0.0 0.4 2956 1040 ? Ss 05:52 0:01 dbus-daemon --system
root 1279 0.0 2.8 15700 6704 ? Ss 05:52 0:00 /usr/bin/python /usr/sbin/rainbow-daemon --daemon
root 1294 0.0 0.3 5392 936 ? Ss 05:52 0:00 /usr/sbin/sshd
root 1306 0.0 0.9 7564 2188 ? Ssl 05:52 0:00 console-kit-daemon
root 1339 0.0 0.4 5336 1108 ? Ss 05:52 0:00 crond
root 1383 0.0 0.2 1740 624 ? SNs 05:52 0:00 anacron -s
68 1416 0.1 1.1 4696 2828 ? Ss 05:52 0:03 hald
root 1417 0.0 0.4 3080 992 ? S 05:52 0:00 hald-runner
root 1441 0.0 0.9 28740 2152 ? Ssl 05:52 0:00 NetworkManager --pid-file=/var/run/NetworkManager/NetworkManager.pid
root 1451 0.0 0.4 3172 1072 ? S 05:52 0:00 hald-addon-input: Listening on /dev/input/event0 /dev/input/event1 /dev/input/event2 /dev/input/event3
avahi 1480 0.0 0.6 2788 1504 ? Ss 05:52 0:02 avahi-daemon: running [xo-05-26-00.local]
root 1481 0.0 1.4 9140 3372 ? S 05:52 0:00 /usr/bin/python /usr/bin/olpc-hardware-manager
avahi 1482 0.0 0.1 2656 432 ? Ss 05:52 0:00 avahi-daemon: chroot helper
root 1507 0.0 0.1 1728 464 tty1 Ss+ 05:52 0:00 /sbin/mingetty --noclear tty1
root 1511 0.0 0.1 1728 460 tty2 Ss+ 05:52 0:00 /sbin/mingetty tty2
root 1512 0.0 0.2 1740 508 ttyS0 Ss+ 05:52 0:00 /sbin/agetty ttyS0 115200 vt100
root 1513 0.0 0.5 2884 1196 ? Ss 05:52 0:00 /usr/sbin/olpc-dm
olpc 1538 0.0 0.4 2556 1068 tty8 Ss+ 05:52 0:00 /bin/sh /usr/bin/startx /usr/bin/olpc-session -- -fp built-ins -wr
olpc 1555 0.0 0.3 3072 928 tty8 S+ 05:52 0:00 xinit /usr/bin/olpc-session -- /usr/bin/X -fp built-ins -wr -auth /home/olpc/.serverauth.1538
root 1556 2.5 3.0 12540 7284 tty3 Ss+ 05:52 1:11 /usr/bin/X :0 -fp built-ins -wr -auth /home/olpc/.serverauth.1538
olpc 1566 1.9 13.1 53660 31184 ? Ss 05:52 0:56 python /usr/bin/sugar-shell
olpc 1574 0.0 0.2 2836 612 ? S 05:52 0:00 dbus-launch --exit-with-session sugar-shell
olpc 1575 0.0 0.4 3076 1176 ? Ss 05:52 0:02 /bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
olpc 1586 0.0 1.8 8008 4484 ? S 05:52 0:01 matchbox-window-manager -use_titlebar no -theme sugar -kbdconfig /usr/share/sugar/shell/kbdconfig
olpc 1588 0.2 4.6 15368 10948 ? S 05:52 0:06 python /usr/bin/sugar-presence-service
olpc 1590 0.0 1.2 8200 2920 ? S 05:52 0:00 /usr/libexec/telepathy-salut
olpc 1592 0.0 3.7 13272 8820 ? S 05:52 0:01 python /usr/bin/sugar-shell-service
olpc 1594 0.3 5.8 46412 14012 ? Sl 05:52 0:09 python /usr/bin/datastore-service
olpc 1603 0.0 0.1 1728 380 ? S 05:52 0:00 /bin/cat
olpc 1605 0.8 9.7 35768 23244 ? S 05:52 0:24 python /usr/bin/sugar-activity journalactivity.JournalActivity -b org.laptop.JournalActivity -a 5b61a1f8af585a3b41fd3bb974a9289ac4695e81
499 1670 0.0 0.2 1824 708 ? S 05:54 0:00 avahi-autoipd: [msh0] bound 169.254.2.71
root 1671 0.0 0.1 1776 356 ? Ss 05:54 0:00 avahi-autoipd: [msh0] callout dispatcher
root 1749 0.0 0.0 0 0 ? S> 05:58 0:00 [scsi_eh_0]
olpc 1802 0.0 0.1 1732 384 ? S 05:58 0:00 /bin/cat
olpc 1827 0.0 0.6 3440 1636 ? S 06:01 0:00 /usr/libexec/gconfd-2
olpc 1843 0.5 10.3 49576 24560 ? Sl 06:04 0:11 python /usr/bin/sugar-activity terminal.TerminalActivity -s -b org.laptop.Terminal -a a33cc298fb40442a4de34be74e637289c40777e6
olpc 1844 0.0 0.2 2424 628 ? S 06:04 0:00 gnome-pty-helper
olpc 1845 0.0 0.6 4688 1528 pts/0 Ss 06:04 0:00 /bin/bash
root 1966 0.0 0.4 2872 1092 pts/0 S 06:11 0:00 su -
root 1977 0.0 0.6 4684 1536 pts/0 S 06:11 0:00 -bash
root 2144 0.0 0.0 0 0 ? S> 06:39 0:00 [scsi_eh_2]
root 2145 0.0 0.0 0 0 ? S> 06:39 0:00 [usb-storage]
root 2182 0.1 0.4 3176 980 ? S 06:39 0:00 hald-addon-storage: polling /dev/sdb (every 2 sec)
root 2191 6.0 0.3 4516 944 pts/0 R+ 06:39 0:00 ps aux



What is OLPD you ask? "One Laptop Per Dad" of course! Sorry mom, you can borrow mine.