technology notes… mobile and embedded.

Posts Tagged ‘tech

Kernel.org has been hacked.

leave a comment »

On Aug31 kernel.org broke the news that many of its servers have been compromised by unknown attackers. They broke in using a compromised user account and installed a rootkit that was silently monitoring user activity among other things. The gory details are best described here

Youve_Been_HackedIt should be pretty embarrassing when when this happens around the 20th anniversary  of Linux.

But the hack has made us all know some very important details about the integrity of kernel source
and the resilience of git itself against such attack.

Resilient Git For each file in the git repository a cryptographically secure hash is generated and the hash uniquely identified the content of that file along with its history.  So any modification into an old commit WITHOUT changing the hash is very difficult.
So from a source code perspective we could be fairly sure that no change could be injected onto it. This blog post at the Linux foundation explains it well.

However Aside from Git, kernel.org also hosts the signatures and some key components used to sign the kernel drops.
See the post here to know how the signing works. If the intruder got the private key ,then he could modify source (outside of git) and make tar archives and sign it.

This may be the reason ALL archives and patches hosted in kernel.org has been pulled down .Even the AOSP project  has pulled down its link ((link: http://android.git.kernel.org/) to the source code .So for now it is advisable not to take any of the archives hosted in the server until we hear an update on this.

I expect that the private key is updated and a new public key is put up here .Only then it would be safe to download the new kernels.

Damage control:
  Swift action has been taken on this .The passwords of all the users of the kernel.org (448 of them) have been reset . The attacker accessed the kernel.org using the credentials of one of the user. While all of this is happening the kernel source has temporarily moved to GitHub.

In the end,this entire episode has let many lay users(like me ) to learn more about git’s integrity and some insight on how the entire kernel.org release happens. Also there is no need for us to  worry about the kernel source being compromised now or even in the foreseeable future.


Written by sujai

September 6, 2011 at 12:17 am

Posted in technology, Uncategorized

Tagged with , , , , ,

Tech this week:14-Jan

leave a comment »

So 2011 has begun  ..and one of the thought I had was to resuscitate my ‘Tech updates’ thread that had become very infrequent.

January 2011 began with CES 2011, arguably the biggest tech event in the planet.  I don’t know how many of the ‘announcements’ will eventually be successful…but this post is about some of the eye catchers from the event .

Tablets everywhere : Yeah tablets are everywhere this CES and the hype is  so much that is Android-Honeycombovershadows everything else.  The biggest announcement of course is the Honeycomb from Google and Motorola Xoom device.

The Xoom device is powered by NVIDIA Tegra 2 a Dual core ARM Cortex-A9  chip with some impressive Graphics horsepower. Some of the applications like the new Google maps seem good. But we got to wait and see if this can match iPad.

Moto Atrix – Best from the show? : Apart from the XOOM , MOTO’s Atrix is making rounds as the ‘most powerful smartphone in the planet’. Its again Tegra –2 with both running at 1GHz  and a 1G RAM!

Especially the dock feature is a cool idea. It is a demonstration of what some would call  as ‘modular computing ‘. Have a look.There was a similar concept sometime back as well…but in that case the laptop was not having some processing and not truly a dumb extension as with the Atrix. So the technology behind Webtop is intriguing. Some say its another VM that the native android on the Atrix phone starts and hosts its apps .

Google search – some updates: I felt the change for sometime now.. and after reading this google-knolpost, I know its not just me but many others complaining that relevancy of Google search is getting down. One could argue on this that its not Google’s problem ,but the overwhelming spam content that is causing the issues,  but didn’t we all set Google as our home page thinking it should just give me the best results no matter what?

Written by sujai

January 14, 2011 at 10:17 pm

Posted in technology

Tagged with , , , , ,

May – Tech updates

with 2 comments

A lot has been happening in the tech space . The mobile computing domain is becoming ever more competitive especially among the 2 big companies Google & Apple. A lot has been discussed about Apple snubbing Flash and adopting HTML5 and Adobe fighting back back with advertisements etc.   Aside all the din about iPad and Froyo here are some links that caught my attention over the past month.


If you are some who who gets distracted by all the clutter around a website and want to  read just the stuff, then Readability is  for you. I don’t know how this tool works  the results are truly amazing and pretty fast .

As sample, I am attaching 2 snaps of  DrDobbs journal  here.  The left side is the actual website and the right is the clutter free version with just the article and nothing else !  You could find more on this tool here.

original after_plugin

WebM ..Why do we need this :

It is the season of new formats, and suddenly there is so much talk of open standards for video. I remember Vorbis and Theora getting launched without so much fanfare.  However, this time it is Google, so you could expect all the PR!


The WebM project , is about developing a high quality,open video format for the web. It includes VP8 a high quality video codec (replacing the proprietary H264 standard) , Vorbis – another open audio encoding format (the alternate to mp3) and a container format called Matroska (alternate to some popular containers like 3gp,flv ,m4a etc).

Google and several other companies are partners to this. Here is a good overview on these new developments and what it means for video over the Internet.

Robotics is one step closer:

While there are several things that many don’t like about Microsoft,they do  have some products that I admire.  The images most recent one is their Robotics Development Studio. Microsoft RDS is an easy to use tool for anyone interested in robotics .  Recently this tool was made free! RDS comes with several goodies all integrated into a single package, and works with some popular kits like the  LEGO  Mindstorm.

French open in 3D:


Thanks to James Cameron 3D has taken a great leap forward and the latest trend seems to be  3D TVs. Samsung  has already launched 3D TVs in India. Now Panasonic is making the first live 3D telecast .  But this is not a broadcast you could watch at your home, there are select outlets that will stream the content in HD3D. With HD  already a reality in  India, the next IPL could be 3D !

Written by sujai

May 30, 2010 at 3:59 pm

Tech this week (Sep 8- Sep 12 ,2008)

with 4 comments

I was very happy for all the response I got for this thread.So ,here is the next edition of this digest 🙂 Let me know your thoughts .

JS wars – V8 vs Trace Monkey : One of the initial feedback on the new browser Chrome was the very fast JavaScript performance,as compared to other browsers. An article on Dobbs explains a somewhat ‘esoteric technique’ thats used by the V8. The V8 could generate assembly code on the fly!!

Dynamic code generation is not a new technology .But whats new is adopting this for a language like Javascript.

The Mozilla camp is also getting ready with another JS interpretor called the TraceMonkey. Initial reports have shown this to be much faster to the current SpiderMonkey engine in Firefox 3.Like V8, tracemonkey also uses some new ideas (Tracetrees) as described here.

What would be the effect of such fast interpreters for JavaScript? :  With such fast engines possible, we will have more and more (time intensive) code done by Javascripts rather than relying on some plug in support.  One more effect on the programing fraternity would be the importance of languages like JavaScripts.

I’m just waiting for a day when JS becomes  the lingua-franca and browser becomes  the new OS of computers.

Ubuntu Jaunty: While the Ubuntu community is eagerly waiting for the Ubuntu 8.10 (Intrepid Ibex ) release , the code name for the April 2009 (Ubuntu 9.04)  release of Ubuntu was announced by Mark Shuttleworth this week.

Ubuntu 9.04 will be called Ubuntu Jaunty Jackalope and the focus of this distribution  would be  improvement in boot time and general performance as such (hence the name Jackalope) .It would also bring in ‘tighter integration with web‘.I dont know  what this line means. It could become clear with the blueprint discussion happens later this year where people decide on what components should be integrated onto this release.

On a lighter note, the Jackalope is a mythical cross between a Jack Rabbit and an Antelope.It can run very fast and can imitate human sounds. You find more about this peculiar creature here.

OpenBTS : There was an announcement last week on the launch of OpenBTS . An open source GSM base station project . The project uses a USRP (a $700 device that can be attached to a Unix/Windows box to convert it to a Transmitter/Software Radio ) to provide the air interface (Layer 1 of the GSM standard) and Asterisk PBX to connect calls.

The OpenBTS is a new take at this otherwise proprietary industry. The vision is to provide low cost GSM connectivity in the developing countries in Africa.  The company has managed to get a temporary FCC license and have conducted their field tests at the BurningMan 2008 event.

TechCrunch50: TechCrunch50 is the startup equivalent of AmericanIdol .This event is hosted by the popular blog Techcrunch . Budding software companies showcase their products to a motley of entrepreneurs,A-list bloggers VC’s etc. This is the second year in running and it has created lot of buzz ($2000- $3000 for a ticket !!).

This year’s winner was Yammer. A tool that takes twitter into the corporates. I too believe the tool will be interesting to corporates like the scuttle framework that is  used by corporates to setup their own social book marking system(like del.ic.ious) in their intranet. You can find other entries that won prizes here.

The Microsoft show circus commercial: Towards the end of the week, there was this new ad from Microsoft with Bill Gates and Seinfield. I think this is the first of a series of ads from them.Lets wait to see what want to say 🙂

Sony’s Capuchin: On the embedded front,this week saw the announcement of one more application environment.This time from the Sony Ericsson camp. Capuchin is a J2ME + Adobe FlashLite runtime. A detailed analysis is published here.

Written by sujai

September 14, 2008 at 6:12 pm

Posted in technology

Tagged with , ,

C++ Recommended Books.

leave a comment »

C++ is a language with lots of concepts and there is no one book that details all its features nicely. Here is a list of books you could read on to master this language. Read in the order listed.

  1. “Accelerated C++” Andrew Koenig and Barbara Moo.
  2. “The C++ Standard Library” Nicolai Josuttis.
  3. “Effective C++” Scott Meyers
  4. “More Effective C++” Scott Meyers
  5. “Effective STL” Scott Meyers
  6. “Exceptional C++” Herb Sutter
  7. “”More Exceptional C++”” Herb Sutter
  8. “The C++ Programming Language” 3rd edition or later Bjarne Stroustrup
  9. “Modern C++ Design” Andrei Alexandrescu
  10. “C++ Templates: The Complete Guide” Vandevoorde and Josuttis
  11. “Standard C++ IOStreams and Locales” Langer and Kreft

this list is from here. Books in BOLD font are the ones that I have already read in part and would recommend to others..

Written by sujai

May 4, 2008 at 4:33 pm

Posted in Uncategorized

Tagged with ,

What happens when we call a function in C++

leave a comment »

Here is an excerpt from Herb Sutter‘s blog about the process in which a function call invocation is handled in C++.

As soon as a function of an object is invoked like obj->function_within_obj() ,
the c++ does the following:

  • First comes name lookup: The compiler looks around to find a function having the requested name. It starts in the current scope (in these cases, the scope of the class we’re calling the member function on) and makes a “candidate list” of all functions having that name; if the list is empty, it goes outward to the next enclosing scope (e.g., namespace or base class) and repeats. If it makes it all the way out to the global scope and still finds no candidates, sorry Charlie, you get “name not found.”As soon as a scope is encountered that has at least one function with the requested name, the compiler goes to step two.
  • Second comes overload resolution: If the candidate list has more than one function in it, the compiler attempts to find a unique best match based on the argument and parameter types. If two or more functions are equally good (or bad) matches, sorry Charlie, you get “ambiguous call.”
  • Third comes accessibility checking: Finally, the compiler looks to see whether you may actually call the function (e.g., that it’s not private). If you don’t have clearance to call the function, sorry Charlie, you’re not calling from within a derived class, a member function, or friend function and you should have thought of that before trying to access an inaccessible protected or private function. For shame.

Written by sujai

May 2, 2008 at 2:34 pm

Posted in Uncategorized

Tagged with ,

Creating Shared Objects in Linux- A primer

with 2 comments

Here is some information on the various nuances involved in compiling and using DSO’s in linux.

Lets assume the name of the source file is libhello.c. If we wanted to create a dynamic shared object we compile the file with the following flags.

gcc -fPIC -O2 -Wall -shared libhello.c -Wl,-soname,libhello.so.1 -o libhello.so.1.0

Meaning of the compiler switches:
-fPIC => This is a compiler option that instructs GCC to create Position Independant Code.PIC is a mandatory requirement for DSO’s.
-O2 => This specifies the level of optimisation to be used by the compiler.
-Wall => Generate all warnings.
-shared => This option instructs GCC to generate a shared object library.

-Wl => This is a compiler switch that is used to pass options to the linker .
-Wl,-soname,libhello.so.1 => this string sends the soname option to linker. The soname option sets the ‘soname’ for the shared object. The soname attribute is used by the dynamic linker at runtime to make sure the application loads the correct library.
The ‘1’ in so.1 is used as a versioning for the API’s exposed by the DSO. If we upgrade the API such that its not backward compatible anymore,we should change the number in the soname.

-o libhello.so.1.0 => generate the shared object with name as libhello.so.1.0

Symbolic links to the DSO:
After generating the so, we need to create some symbolic links.

ln -s libhello.so.1.0 libhello.so.1 ==> This link is used by the dynamic linker during runtime .
ln -s libhello.so.1.0 libhello.so ==> This link is used by the compiler when we link this shared object
as -l hello

Why should we have the so.1 and so.1.0 => The 1 in so.1 is used to version the API level changes. The extra versioning in so.1.0 is used to track any change in the DSO (this may not may not break the API compatibility).
Hence we have 2 versions.

LD_LIBRARY_PATH : Includes the directory of libhello to the LD_LIBRARY_PATH,so that the dynamic linker searches for libraries in this path.

ldconfig: The ldconfig command is used if we want to move our libraries to one of the standard system locations. This command also sets the symbolic links that we did manualy. This is a system administrator command .So ,to run this command you should login as root.

The rpath linker option:
Another important linker option used during development is the -Wl,-rpath. During development, there’s the potential problem of modifying a library that’s also used by many other programs — and you don’t want the other programs to use the `development’ library.
To resolve this, we used ld’s ‘rpath’ option, which specifies the runtime library search path of that particular program being compiled.

From gcc, you can invoke the rpath option by specifying it this way:

If you use this option when building the library client program, you don’t need to bother with LD_LIBRARY_PATH other than to ensure it’s not conflicting, or using other techniques to hide the library.

Written by sujai

April 24, 2008 at 11:33 am

Posted in linux

Tagged with ,

%d bloggers like this: