Notice the first sentence? It is written "Presidential candidate Wiranto" and so on. Hehehe, so he swaps position with Jusuf Kalla? :) The complete post is here for clarification.
A place where I share my daily experience in both technical and non technical issues. Expect to read Linux kernel related posts too.
24 May 2009
09 March 2009
kernel panic when calling printk() inside scheduler code...
An interesting question arose in kernelnewbies mailing list. Basically, somebody somebody asked why calling printk() when intercepting scheduler code (using jprobe) results in kernel panic. Full thread can be read here.
My analysis, somehow during module initialization, printk() must not be executed to avoid recursively waking up klogd. The original poster said it didn't help. Finally, he found a workaround, that is by incrementing a variable named oops_in_progress. I bet works like a flag. When it's greater than zero, it prevents klogd to wake up. Problem solved!
Note: klogd is a kernel thread that reads kernel ring buffer and send it to user space daemon syslogd if there's any entries there. Those are the messages that we see ending up in /var/log/messages (for non critical kernel messages).
regards,
Mulyadi.
My analysis, somehow during module initialization, printk() must not be executed to avoid recursively waking up klogd. The original poster said it didn't help. Finally, he found a workaround, that is by incrementing a variable named oops_in_progress. I bet works like a flag. When it's greater than zero, it prevents klogd to wake up. Problem solved!
Note: klogd is a kernel thread that reads kernel ring buffer and send it to user space daemon syslogd if there's any entries there. Those are the messages that we see ending up in /var/log/messages (for non critical kernel messages).
regards,
Mulyadi.
08 March 2009
the way we respond to a question
Probably, you think that's easy. Listen to the question, think for a moment (or longer...if time allows) and explain your answer.
But when I looked at this blog post, I am a bit intrigued. For those who don't know who that guy is, he's Kir Kolyshkin. One of the main developer of OpenVZ, a container solution for Linux. Container is a kind of virtualization which is done in OS level. System calls are intercepted so every guest thinks he owns the whole system. But unlike User Mode Linux, OpenVZ is not using ptrace, but guest kernel is patched so system call is now routed to a "stub" in host kernel. So certainly, Kir is not average developer and far from mediocre level....
This paragraph is interesting:
"I think the talk was well received and I had about 10 different interesting questions, one is puzzling enough so I was not able to provide a good answer. This is definitely a sign of a good audience."
Most of the time, especially when some (doubtly) educated people receive tough question, he will turn into defending mode or attack the questioner back. But Kir thinks differently. He admitted he can not answer all questions, a normal thing for normal human being. And he appreciated that.
I wish this kind of attitute is something we can learn and practice in our everyday life.....
regards,
Mulyadi.
But when I looked at this blog post, I am a bit intrigued. For those who don't know who that guy is, he's Kir Kolyshkin. One of the main developer of OpenVZ, a container solution for Linux. Container is a kind of virtualization which is done in OS level. System calls are intercepted so every guest thinks he owns the whole system. But unlike User Mode Linux, OpenVZ is not using ptrace, but guest kernel is patched so system call is now routed to a "stub" in host kernel. So certainly, Kir is not average developer and far from mediocre level....
This paragraph is interesting:
"I think the talk was well received and I had about 10 different interesting questions, one is puzzling enough so I was not able to provide a good answer. This is definitely a sign of a good audience."
Most of the time, especially when some (doubtly) educated people receive tough question, he will turn into defending mode or attack the questioner back. But Kir thinks differently. He admitted he can not answer all questions, a normal thing for normal human being. And he appreciated that.
I wish this kind of attitute is something we can learn and practice in our everyday life.....
regards,
Mulyadi.
21 February 2009
simple function intercept in Linux
Few days ago, during my spare times, I wrote an article for an ezine named Echo zine. The article describe about how one could intercept a library call toward the usual libc library. For example, instead of calling normal rand() function of glibc, it will end up executing your own defined rand(). The trick is to utilize LD_PRELOAD environment variable so your library has higher priority to be linked into the ELF executable.
Without further ado, here's the link:
regards,
Mulyadi.
Without further ado, here's the link:
http://ezine.echo.or.id/ezine20/e20_0x05.txt
I welcome your feedback and comments...regards,
Mulyadi.
18 January 2009
First time I boot my UML guest, I got eth0, then eth1..and so on, why?
It has been itching my head for a while, "why my Slackware UML guest OS gets different eth device name everytime it boots?". It's always incremented e.g first boot I got eth0, later I got eth1 and so on. For note: I didn't build the Slackware by myself, I downloaded from somewhere. Maybe it's uml.harlowill.com or something, sorry I couldn't recall. One thing for sure, it's Slackware 12.0
Previously, I absolutely had no idea why it happened. But lately I was thinking it could be something with udev (after all, it is the one which deals with device file, right?).
Let's boot the UML guest one more time and find out what we could dig. Note that I use the following parameter when I invoke the guest:
eth0=tuntap,tap0
Guest boots up and login prompt shows up. udev should put its configuration under /etc/udev or something alike, so let's dive. Found it, it's in /etc/udev/rules.d/75-network-devices.rules. Here is the snippet that explains my headache:
KERNEL=="eth?", ATTR{address}=="4e:82:25:ae:b1:bb", NAME="eth0"
I see the correlation now. If I don't specificly declare the MAC address of the ethernet device my UML guest will use, UML will pick one randomly. And udev inside the guest will think it's a different ethernet device.
Finally, simple solution. Put that MAC address as part of "eth" parameter:
eth0=tuntap,tap0,4e:82:25:ae:b1:bb
Now I get consistent naming!
PS: Looks like my "research" insting is back. Hopefully, it will stay inside me for long time....
regards,
Mulyadi.
Previously, I absolutely had no idea why it happened. But lately I was thinking it could be something with udev (after all, it is the one which deals with device file, right?).
Let's boot the UML guest one more time and find out what we could dig. Note that I use the following parameter when I invoke the guest:
eth0=tuntap,tap0
Guest boots up and login prompt shows up. udev should put its configuration under /etc/udev or something alike, so let's dive. Found it, it's in /etc/udev/rules.d/75-network-devices.rules. Here is the snippet that explains my headache:
KERNEL=="eth?", ATTR{address}=="4e:82:25:ae:b1:bb", NAME="eth0"
I see the correlation now. If I don't specificly declare the MAC address of the ethernet device my UML guest will use, UML will pick one randomly. And udev inside the guest will think it's a different ethernet device.
Finally, simple solution. Put that MAC address as part of "eth" parameter:
eth0=tuntap,tap0,4e:82:25:ae:b1:bb
Now I get consistent naming!
PS: Looks like my "research" insting is back. Hopefully, it will stay inside me for long time....
regards,
Mulyadi.
20 July 2008
Between "The Dark Knight" and me...
It's me, sat inside the cinema with my girlfriend, Natalia. The movie was The Dark Knight. This time, Batman a.k.a Bruce Wayne face his arch nemesis...The Joker. But this time, I'd like to talk about the complex psychological problems faced by each characters and compared to what already happened to me....the things I have done ...and the future that lies ahead ...
First, let's see Joker. This man....kills ....torch.... blast.....for fun! Now, for a moment, please...just sit down and think, have you ever come into the same mental situation? Maybe you're mad at somebody, maybe it's because your day is filled with nothing than silly boring jobs...maybe you're in serious relationship troubles...bla bla bla. And when you find no way out, suddenly your mind gets crazy and all you wanna do is "the hell with rules, I want to do it my way....my way only...just get out from my way...". You're tired with your live, so you want to break through. And usually you end up with secret mistress, alcohol, brutal sex. And if it's so damn depressing, probably you want to blow your own head?
To tell you the truth, in some part of my life, I have been living with "Joker alike" style. This is not a lie. Well, I didn't slice somebody else' face with razor or knive, but I mad at people like crazy from time to time. Maybe because I stood too hard defending my principles...but in the end.... it makes me as uncontrollable man, ready to unleash raging fury. Even 'til this very moment, that dark side of me is still there. Hiding, sneaking behind the shadow...looking for a chance to once again come up. It makes me nuts...
Now, let's check Harvey Dent...or later we find him as Two face. He's the man who once stand against crime so hard. So hard that he risks everything to put every bad guys in jail. How about you? You think the same way as he is? Then what happened, when you find out that what you have done...in almost your entire life...smashed away because somebody don't really believe in you...or worse, they betrayed you? I can tell you how it's feel. It's like a bullet shot right into your brain. Not only it introduce great amount of pain, but it also makes you hate yourself.
I say, screw with money. I am not saying money isn't important, but is that all you expect as a return for all your work? How about respect? How about trust? How about friendship? How about love? Once I worked on something, solely because I want to share something with other people. But day after day, I saw I didn't really change anything. Things still go bad and community didn't really appreciate me. That's strike two pal.
The last...and the best part, is Batman itself. He thinks it's the time to quit, because harvey in his opinion already do Batman's job nicely. Without acting like vigilante, he puts the criminals behind the bars, so Batman practically and eventually won't be needed again. So, he thinks he can put "Batman" at rest and become normal again. But it doesn't happen. Batman is still needed as Gotham ultimate protector.
Lately I thought the same way. Is it the time to stop everything I have done for years...start living normal...build happy family...and let "the other me" banished? For once....I almost did that. But I can't...at least for now. I still didn't find somebody else with the same level of seriousness, focus and dedication. I believe Bruce is a little bit more lucky in this case, Harvey shows a good prospect...well up until Rachel is dead and he began to uphold justice with his own way.
So, here I am... in front of a PC at 00:00... My head is filled with tons of questions like "is it right?", "why am I doing this?", "I am tired, should I quit?", "I think that was true, but not anymore". I guess the answer could be provided simply by faith to God. Or maybe, like Harvey did, is a matter of believing in chance. 50-50... 50% ... 1:1. It might go wrong or right. It could screw your life or magically make it better. You end up in jail or arise as hero. You meet with a slut or woman of your dream. List can continue but the bottom line is, I think we can not entirely control our life. I learned that the hard way, but then I asked myself "so it's just a matter of luck? Sounds bad..."
Or...maybe... it's because we're just afraid of ourselves. And we create symbols, like Batman... to conquer our fear. Fear of live..fear of being rejected...fear of failure...
PS: Before you leave this site, think of what Harvey said
"You either die a hero or you live long enough to see yourself become the villain"
regards,
Mulyadi.
First, let's see Joker. This man....kills ....torch.... blast.....for fun! Now, for a moment, please...just sit down and think, have you ever come into the same mental situation? Maybe you're mad at somebody, maybe it's because your day is filled with nothing than silly boring jobs...maybe you're in serious relationship troubles...bla bla bla. And when you find no way out, suddenly your mind gets crazy and all you wanna do is "the hell with rules, I want to do it my way....my way only...just get out from my way...". You're tired with your live, so you want to break through. And usually you end up with secret mistress, alcohol, brutal sex. And if it's so damn depressing, probably you want to blow your own head?
To tell you the truth, in some part of my life, I have been living with "Joker alike" style. This is not a lie. Well, I didn't slice somebody else' face with razor or knive, but I mad at people like crazy from time to time. Maybe because I stood too hard defending my principles...but in the end.... it makes me as uncontrollable man, ready to unleash raging fury. Even 'til this very moment, that dark side of me is still there. Hiding, sneaking behind the shadow...looking for a chance to once again come up. It makes me nuts...
Now, let's check Harvey Dent...or later we find him as Two face. He's the man who once stand against crime so hard. So hard that he risks everything to put every bad guys in jail. How about you? You think the same way as he is? Then what happened, when you find out that what you have done...in almost your entire life...smashed away because somebody don't really believe in you...or worse, they betrayed you? I can tell you how it's feel. It's like a bullet shot right into your brain. Not only it introduce great amount of pain, but it also makes you hate yourself.
I say, screw with money. I am not saying money isn't important, but is that all you expect as a return for all your work? How about respect? How about trust? How about friendship? How about love? Once I worked on something, solely because I want to share something with other people. But day after day, I saw I didn't really change anything. Things still go bad and community didn't really appreciate me. That's strike two pal.
The last...and the best part, is Batman itself. He thinks it's the time to quit, because harvey in his opinion already do Batman's job nicely. Without acting like vigilante, he puts the criminals behind the bars, so Batman practically and eventually won't be needed again. So, he thinks he can put "Batman" at rest and become normal again. But it doesn't happen. Batman is still needed as Gotham ultimate protector.
Lately I thought the same way. Is it the time to stop everything I have done for years...start living normal...build happy family...and let "the other me" banished? For once....I almost did that. But I can't...at least for now. I still didn't find somebody else with the same level of seriousness, focus and dedication. I believe Bruce is a little bit more lucky in this case, Harvey shows a good prospect...well up until Rachel is dead and he began to uphold justice with his own way.
So, here I am... in front of a PC at 00:00... My head is filled with tons of questions like "is it right?", "why am I doing this?", "I am tired, should I quit?", "I think that was true, but not anymore". I guess the answer could be provided simply by faith to God. Or maybe, like Harvey did, is a matter of believing in chance. 50-50... 50% ... 1:1. It might go wrong or right. It could screw your life or magically make it better. You end up in jail or arise as hero. You meet with a slut or woman of your dream. List can continue but the bottom line is, I think we can not entirely control our life. I learned that the hard way, but then I asked myself "so it's just a matter of luck? Sounds bad..."
Or...maybe... it's because we're just afraid of ourselves. And we create symbols, like Batman... to conquer our fear. Fear of live..fear of being rejected...fear of failure...
PS: Before you leave this site, think of what Harvey said
"You either die a hero or you live long enough to see yourself become the villain"
regards,
Mulyadi.
19 May 2008
Subscribe to:
Posts (Atom)
How to execute multiple commands directly as ssh argument?
Perhaps sometimes you need to do this: ssh user@10.1.2.3 ls It is easy understand the above: run ls after getting into 10.1.2.3 via ssh. Pi...
-
Update: June 14th, 2016 6:01 PM UTC+7: using direct I/O or raw access also bypass filesystem caching. This also has effect to avoid double...
-
Quick summary first: use gcc -save-temps ! Ever dig into Qemu (qemu.org) source code? OK, I assume you ever did that at least once... may ...
-
Credits to Ubuntu Forums: You experienced same issue like me? OK here's what you should do: First, open your GTalk account preference. H...

