login
Header Space

 
 

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

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

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

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

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

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

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

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

Why XHTML?

December 16, 2008 - 7:23am
Submitted by Eus on December 16, 2008 - 7: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

December 15, 2008 - 11:37pm
Submitted by Eus on December 15, 2008 - 11: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

November 23, 2008 - 6:14pm
Submitted by mator on November 23, 2008 - 6:14pm.
Linux


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

November 20, 2008 - 1:11am
Submitted by Kedar Sovani on November 20, 2008 - 1:11am.

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

November 18, 2008 - 6:21am
Submitted by Kedar Sovani on November 18, 2008 - 6: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...

November 10, 2008 - 5:39am
Submitted by jmaladrie on November 10, 2008 - 5:39am.
Linux

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

November 8, 2008 - 12:01am
Submitted by Greg Buchholz on November 8, 2008 - 12:01am.

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!

October 27, 2008 - 6:01am
Submitted by dasyogesh on October 27, 2008 - 6: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

October 24, 2008 - 9:16am
Submitted by jmaladrie on October 24, 2008 - 9: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

October 18, 2008 - 8:52am
Submitted by pavithra2117 on October 18, 2008 - 8: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

October 14, 2008 - 6:52am
Submitted by Eus on October 14, 2008 - 6:52am.
Linux

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

October 12, 2008 - 5:45am
Submitted by Kedar Sovani on October 12, 2008 - 5: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.

Ergonomics: Staying in good health

October 10, 2008 - 12:24pm
Submitted by Kedar Sovani on October 10, 2008 - 12:24pm.

This is old news by now. But recently I came across quite a few people who are suffering from various problems because of repetitive stress. Goggling for ergonomics is going to give you tons of results. So here's a quick summary of what I do to avoid these problems (hopefully !).

  1. It is a problem. If you aren't suffering from it now, you'll later. Unless of course you are taking measures. Obviously your muscles and bones give way after sitting, typing, using the mouse for 8 hours a day, 6-7 days a week (Everyone is browsing on the weekends). And not just your muscles and bones, but your eyes too.
  2. Adjust my seat such that my feet touch the ground. And try to make sure there are right angles (90 degrees) at my ankles, knees, waist, elbows. The shoulders are not crumpled forward.
  3. My monitor brightness is as low as is possible and the contrast is not too high. But such that I don't have to strain my eyes to read. While I am programming or using the shell, I keep the monitor settings on dark background, white/grey foreground, thus reducing intensity that my eyes have to deal with all day long. I read a lot of studies commenting on what the best combination should be. But there doesn't seem to be any consensus yet. I am currently experimenting with green-on-black
  4. Take my eyes off the monitor and look at some distant object. Thus eyes are exercised.
  5. Wash my eyes at least once in a day. With the ACs on, eyes tend to become dry. To avoid dark circles, Baba Ramdev suggests, filling your mouth with water, and then splashing water on your eyes.
  6. Drink a lot of water. I try to drink at least 2-3 ltrs. of water while in the office. This doesn't include water from other sources like fruits etc.
  7. I use an ergonomic split keyboard
  8. Do yogasana. Running and gym is good, but you need something that exercises all the muscles of your body. Yogasana help me do that. Your neck, back, spine, fingers and thighs get a lot of strain. Not to mention your mind and your brain.
  9. I take frequent breaks. I am very rarely sitting at my desk for long periods of time ;-)
  10. Include hand and leg exercies, stretches, shrugs etc. in my daily routine

Computer Languages

October 4, 2008 - 10:59am
Submitted by Eus on October 4, 2008 - 10:59am.

In a book titled C How to Program by Deitel and Deitel, computer languages are classified into three types as follows:
1. machine language
2. assembly language
3. high-level language

speck-geostationary