KernelTrap, OS/kernel, Linux, FreeBSD, Life, NetBSD, GNU/Hurd, OpenBSD, Applications/tools, Other, Nothing, Me, Personal, Linux, FreeBSD

What is the purpose of having a networking stack?

Submitted by Eus
on January 12, 2009 - 7:14pm

When studying computer networking, the term logical networking stack is often heard.
The most famous example will be ISO OSI's logical networking stack that consists of seven layers, which are:
- Application,
- Presentation,
- Session,
- Transport,
- Network,
- Datalink, and
- Physical.

For those facts, I have the following questions:
1. What is the purpose of having a logical networking stack at the first place?
2. Why does ISO OSI's consist of seven layers instead of three or ten?

Download Billu Barber (2008) 320 Kbps Full Album

Submitted by 4season
on January 11, 2009 - 3:09am

Music: Pritam
Lyrics: Gulzar, Sayeed Quadri, Asish Pandit & Mayur Puri
Label: T-Series
MP3 Bitrate: 320Kbps VBR
Covers Included : Yes
Size : 150 MB

Tracklist :

01. (00:05:26) Sukhwinder Singh, Sunidhi Chauhan - 01. Marjaani
02. (00:04:48) Neeraj Shridhar, Tulsi Kumar - 02. Love Mera Hit hit
03. (00:04:48) Neeraj Shridhar - 03. You Get Me Rockin & Reeling

कुंभारासारखा गुरू नाही रे जगात

Submitted by Kedar Sovani
on December 17, 2008 - 3:08am

कुंभारासारखा गुरू नाही रे जगात
वरि घालितो धपाटा, आत आधाराला हात

आधी तुडवी तुडवी मग हाते कुरवाळी
ओल्या मातीच्या गोळ्याला येई आकृती वेगळी
घट जाती थोराघरी, घट जाती राऊळात

कुणी चढून बसतो गावगौरीच्या मस्तकी
कुणी मद्यपात्र होतो रावराजांच्या हस्तकी
आव्यातली आग नाही पुन्हा आठवत

कुणी पुजेचा कलश, कुणी गोरसाचा माठ
देता आकार गुरूने ज्याची त्याला लाभे वाट
घट पावती प्रतिष्ठा गुरू राहतो अज्ञात

- ग. दि. माडगूळकर

Why XHTML?

Submitted by Eus
on December 16, 2008 - 4:23am

Previously, I wondered why the need of XHTML specification by W3C. Now after I was cluttering my hands with ECMA Script (i.e., JavaScript) for a while, I found the definite reason.

3x3 Sudoku Puzzle Solver

Submitted by Eus
on December 15, 2008 - 8:37pm

Back when I was in the last half part of my third semester of my undergraduate study, there was a fever among my classmates to solve Sudoku puzzles. I just tried to scratch some of those puzzles but find them not exciting because I only need to employ a trial-and-error method. Later, in the beginning of my fourth semester, I tried to find an algorithm to solve those puzzles and ended up with a method that I will describe here.

linux usb wireless adapter

Submitted by mator
on November 23, 2008 - 3:14pm


Brought Belkin Wireless G USB Adapter this week. My home ubuntu 8.10 recognised it and networked without any additional settings besides wireless security. Just to let you know.

Voter Registration

Submitted by Kedar Sovani
on November 19, 2008 - 10:11pm

For all the crowds from India:
If you aren't a registered voter, please register yourself, and make sure you vote! It is time that the IT-class starts exercising this right and create a difference.

Also, do spread the word, blog about it and let more people know:

Online registration can be done at:
http://ceo.maharashtra.gov.in
http://www.jaagore.com

On Downsizing

Submitted by Kedar Sovani
on November 18, 2008 - 3:21am

A CEO from my previous organisation mentioned something to me that he had experienced in the dot com bubble burst. He was a CEO then too. "Running a company, is a lot of responsiblity. As the company grows, so does the dependency of a lot of families and their economies on the company. A mistake you make does not only affect you but the families of all your employees. And that is 'responsibility'."

As the global economies are spiralling down, companies are being conservative.

If you can't live without amputing your arm, left without an option, you'll opt to do so.

I remember when we had to hire a couple of freshers in one of the really small startups I was working for. While I did that, the first thing in my mind was to hope that the company stays around for at
least 1 year, since that is a sizable experience for the freshers to start their career with. And I made them fully aware of the fact too, since like all freshers, they had multiple options to consider.

I understand that running a business means you have to take hard decisions. And hard decisions are bitter. If worst comes to worst, of course, you have no option but to trim down. But "hard decisions" or
"business decisions" are certainly not the way to shrug away from the responsibility. A workforce cut is a particularly bitter experience. But there are ways in which you can alleviate that.

The relationship between employer and employee is mutual. If you treat them as family, they treat you as a family and the whole thing is good for you, your employees, your product and your customers. (I am not
exaggerating, there are companies that go out of their way to ensure that their strongest asset, the employees, are comfortable.) And the way you trim down tells a lot about your character and that of your
company. It shows whether you treat your employees as family, or as cattle. And if it is the latter that gets revealed, well, all those employees who have fortunately saved their asses this time around, take a warning cue from the event and do the neeful.

How to find Syscall table...

Submitted by jmaladrie
on November 10, 2008 - 2:39am

I needed to recompile my code to test it against UML but it always complained about the unlock_kernel() function. The original code comes from subversity.net

So I decided to slightly modify the code to make it works for UML and x86. I did not have the chance to test it for other architectures.

Non-ugly average in Haskell

Submitted by Greg Buchholz
on November 7, 2008 - 9:01pm

data E a b = L (E a b) | R b deriving (Show)

fold f acc [] = R acc                      
fold f acc (x:xs) = let x' = f acc x 
                    in x' `seq` (L $ fold f x' xs)

lift2 f = \x y -> par_eval x y
    where par_eval   (L x)   (L y) = par_eval x y
          par_eval x@(R _)   (L y) = par_eval x y
          par_eval   (L x) y@(R _) = par_eval x y
          par_eval   (R x)   (R y) = R $ f x y

lift1 f (L x) = lift1 f x
lift1 f (R x) = R (f x)

sum' xs = fold (+) 0 xs
len' xs = fold (\x y->succ x) 0 xs
avg  xs =  (sum' xs) / (len' xs)

main = print $ avg [1..1e7]

instance Eq b => Eq (E a b) where
    a == b = case (lift2 (==) a b) of (R x) -> x

instance Num b => Num (E a b) where
   (+) = lift2 (+)
   (*) = lift2 (*)
   fromInteger = R . fromInteger
   abs = lift1 abs 
   signum = lift1 signum

instance Fractional b => Fractional (E a b) where
   (/) = lift2 (/)
   fromRational = R . fromRational

kernel BUG at kernel/exit.c:904!

Submitted by dasyogesh
on October 27, 2008 - 3:01am

Hi,

I have upgraded the kernel 2.6.9-55.0.12.ELsmp to 2.6.9-78.ELsmp.
After upgrading i got the following Error in message logs.Then i rebooted the server.now it is working. But i want to know why was the kernel panic and can it happen again;

kernel: kernel BUG at kernel/exit.c:904!
kernel: invalid operand: 0000 [#1]
kernel: SMP

LSE - Linux Security Engine

Submitted by jmaladrie
on October 24, 2008 - 6:16am

LSE - Linux Security Engine

LSE is an open source security project for GNU/Linux (Kernel 2.6 series).

It employs a "white list" approach to allow/disallow program execution on your computer.
It's an easy way to prevent user running applications which can be malicious [virus, backdoor, rootkit, ...] or simply unwanted.

Booting linux-2.6.25-rc7 on IMX27ADS target using U-boot-v2 bootloader

Submitted by pavithra2117
on October 18, 2008 - 5:52am

Hi All,

I am using linux-2.6.25-rc7 distribution,U-boot-v2 bootloader and IMX27ADS target.I built uboot.bin from U-boot-v2 and it is working fine on IMX27ADS.
I want to boot linux kernel image on IMX27ADS.

Fiddling with sys_call_table in Linux Kernel 2.6.21.5

Submitted by Eus
on October 14, 2008 - 3:52am

A friend of mine would like to try to implement a new system call based on the example in Chapter 8 of Linux Kernel Module Programming Guide 2.6 Series (http://www.dirac.org/linux/writing/lkmpg/2.6/lkmpg-2.6.0.html) in Linux kernel 2.6.21.5. The example requires that the kernel exports `sys_call_table' symbol. Although Linux kernel 2.4.x, on which the guide is based, still exposes that symbol, Linux kernel 2.6.x does not do that anymore for it is harmful (e.g., it is unimaginable if a module replace the system call of `link' with `unlink' via the table). The guide comes with a patch to expose the table in Linux kernel 2.6.x. However, the patch does not work in particular for Linux kernel 2.6.21.5. So, I helped him to do so.

Phishing continues and so does protection

Submitted by Kedar Sovani
on October 12, 2008 - 2:45am

I have already covered phishing in few of my earlier posts here:

I just received an email from 'security@axisbank.com' indicating me that

--------------------------------------------------------------
Security Alert:

Attention! Your AXIS Online Banking Account has been violated!

Someone with IP Address 81.102.72.19 tried to access your personal account!

In accordance with Axis Online Banking User Agreement and to ensure that
your account has not been compromised, access to your account was limited.

Your account access will remain limited until this issue has been resolved.

Please follow the link below to resolve this problem:
http://somelinkepresenthere

Thank You.
----------------------------------------------------------------

With logo and all completely there... Sounds pretty official. The problem is, I don't have an Axis Bank account :-)

So I thought ofcourse this is phishing. This can immediately be found out by hovering your mouse over the link specified. Usually, the href tag points to the real phishers website, whereas the contents of the "a" tag is the string of your bank's website. It was confirmed this is certainly a phishing site.

Then I thought lets go where they are really pointing me to and see what is happening. As I clicked it, FireFox Phishing Protection kicked-in and informed me that this site is reported for phishing attacks. Now that was good! Protection from some real danger! I wonder what happens when you open the link in IE....

Anyway, this kind of phishing detection is black-listing based phishing detection. It works, as we just saw, but it doesn't work on zero-day attacks. For it to work, people have to report this site to be a phishing site. And there is a window, between the site coming up and people reporting that site. And the window is sufficient for the phishers to gain access to vital account information of many many innocent people.

That reminds me of a project guided by the Dreamz Group by Amey. The project had a browser plugin. They had come up with a bunch of rules or suspicions that you can detect on typical phished websites. If the rules/suspicions match, a warning is displayed. For example, what we did above by hovering the mouse pointer is one such rule. And solutions like these raise the bar quite a lot. I am not sure if there are any commercially available solutions for these. But there certainly should be some around.