Friday, January 5, 2018

Meltdown CPU security vulnerability


Meltdown vulnerability explained in 5 simple steps:
  1. Try to read a byte from protected memory. It will fail, but the CPU will still get that value, just will not return it to us.
  2. Try to use that byte value as an index in our own array of 256 elements. This operation will fail as well, but as the CPU "knows" the inaccessible value, it will actually use it, will read the corresponding array element and put it into the internal cache.
  3. Go through all 256 elements of our array in a loop trying to read them, and measure how long each reading operation takes.
  4. The element, which was already accessed based on the "mystery" value, is already in the CPU cache, so it will be read dozens times faster, than the others.
  5. The index of that "fast" element is the value, which we tried, but were not allowed to read from protected memory. Now we know it!

Monday, September 15, 2014

Monday, November 11, 2013

Why Apple will eventually die...

It all started from my simple need to install a test application on an iPod. I usually work with Android, but from time to time use my daughter's iPod Touch for testing purposes.

The test application I needed to use required iOS 6, while our iPod had 5.1. Fine - we've been planning to upgrade the iOS on this device for a while. But it's a 8GB version, with a bunch of apps installed and some music. The upgrade required 2.7GB of space available, and this small iPod had less than 1GB free.

OK, let's clean up some space by copying that stuff to a PC. Wait! The old laptop, where we connected this iPod previously, already died, and the new one doesn't even have iTunes installed.

OK, let's install iTunes - it's "just" 100MB download... Some time later I could finally see the iPod in iTunes. But how could I copy all the music to this computer? Hmm... No obvious way. Maybe Sync? No! iTunes says if I want to sync to this machine it will delete all the music from iPod first. Why?!? Why cannot it just import all the music from my iPod to the library on my PC?!? Well, at least I can do a backup. But what if something will go wrong? I want my daughter's MP3's to be safe, and not in a form of a pile of unknown files with unreadable names (and probably modified from their normal format) in the backup folder.

Well, Google is our friend. Hmm... Sounds like there is no standard way, but there are some 3rd-party applications, which could help. I used one of them before, found it again - it's named SharePod. It used to be free, but the new version now seems to cost $20. Apparently the old version 3.99 is still freeware, and it still works with our iPod.

OK, the music is finally copied to the PC. Now, how do I add it to iTunes in case I want to install it back to iPod? I looked and clicked everywhere, but the only thing that I found was to import just one file. I remember for sure I could import a whole folder to the library - I did this a while ago on the old laptop.

Well, back to Google... Aha! There should be a menu item "Add folder to library". But where is that menu? The one opened with a tiny button on the left did not have this command. Google again... Aha!! You have to press Ctrl+B to show a normal menu bar. And the "Add folder" command is there! But why?!? Why is it only in that hidden menu, and not in the regular menu, which is at least possible to find?!?

Now, when the device backup was running, iTunes requested to authorize this computer to work with this iPod. OK, if it's required, I did that. But I didn't like that it said there are already 3 authorized computers out of allowed 5. Yes, there was that old laptop, and probably even older PC, which I don't even remember. How could I deauthorize those old machines? Google... Aha, there is an article on What?!? It says "Remember to deauthorize your computer before you sell it, give it away, or get your computer serviced". You gotta be kidding! What if my computer unexpectedly died? I could not simply delete it from the list?!? Apparently not. Well, there is a way to fix this in case I used all the authorization quota. I can deauthorize all computers associated with my Apple ID. Isn't that nice? What if I had a couple of normal computers, which I want to keep authorized, and deauthorize only one old and dead machine? Forget it! Only none or all! But wait, there is one more interesting detail. You may use this deauthorization feature only once per year! That's right! I hope I won't need it soon, but again - why?!? Why don't I have any control neither on my music, nor my device, and even computer?!?

Apple-users, how are you still able to survive and even enjoy your life in such a hostile environment with ridiculous limits and procedures everywhere, and absolutely unusable iTunes?!? I cannot understand, why Apple is still alive!

PS. I do not even start talking about the development process with Apple products. I don't want to hear the words "provisioning" and "Xcode" again!

Sunday, August 19, 2012

Looks familiar...

Where have I seen this?!?


Of course!

Monday, July 30, 2012

LED daytime running lights

My Mitsubishi Eclipse was imported by the previous owner from the US, and was modified to have daytime running lights, but that job was done very badly - a modification was on the high beam circuit and something caused a fuse to melt. I just removed the fuse, as the high beam lamps were still working without it, but I lost DRL.

So to comply with the law and add some cool feature to the car I decided to put LED lights into the fog lamp placeholders - there were no fog lights anyway.

I bought a couple of LED strips on eBay (just $1 a piece):

Cut-off some extra LEDs to make proper sized rings, put them into the sockets, and used zip-ties to keep them in place:

Connected a power wire to the accessories electrical circuit, which turns on with ignition, and here we go:

 Cool, isn't it? :)

Tuesday, July 17, 2012

Ubuntu 12.04 tweaking

I wrote about experiencing a lot of issues with upgrade to Ubuntu 12.04. I survived that, but had to do a bunch of tweaking to make the system usable, and it's still not ideal yet. :(

Below is a brief list of my tweaks and some useful links.

First, a very helpful article about configuring Unity:

My Launcher changes:
- Run CompizConfig Settings Manager
- Reduce the Launcher icon size
- Backlight Mode -> Backlight Toggles

Customize workspace layout:
- Run CompizConfig Settings Manager
- Open General -> General Options -> Desktop Size
- Modify Horizontal & Vertical Virtual Size
- Run gconf-editor
- Open apps/compiz-1/general/screen0/options
- Change hsize/vsize

Disable workspace switcher animation:
- Run CompizConfig Settings Manager.
- Desktop -> Desktop Wall -> Viewport Switching: set Wall Sliding Duration to 0

Add task bar:
Solution 1: Use tint2
- The problem with tint2 is it does not work properly with workspaces - it shows all running applications on the task bar

Solution 2: Use GNOME panel
- Run gnome-panel - it will display normal GNOME top and bottom panels
- Use Super+Alt+Right-Click on the top panel, select "Delete This Panel"
- The bottom panel seem to work fine as a task bar
- Customization:
- cp /usr/share/themes/Ambiance/gtk-3.0/apps/gnome-panel.css ~/.config/gtk-3.0/gtk.css

Pidgin icon is hidden:
It is under the Envelope icon

Configure time:

Grub: Save the last selected system for the next boot:
- Open /etc/default/grub:
- Change "GRUB_DEFAULT=0" to "GRUB_DEFAULT=saved"

More links:

Sunday, July 1, 2012

Quick and easy notepad/memopad for Android: New apMemo

New version of apMemo notepad for Android is released!

apMemo 2.0 New Features:
  • New! Graphic and text notes together on one page;
  • New! Background can be changed without clearing the note;
  • New! Textured backgrounds;
  • New! Resizable widgets;
  • New! Support for Honeycomb and Ice Cream Sandwich (Android versions 3 and 4);
  • New! Long-press actions for the toolbar buttons;
  • New! Other improvements and stability fixes;

Existing features have been improved as well:
  • Easy visual selection of pen size, color, and background;
  • Quick and simple reminder time selection;
  • Note thumbnails view;
  • Share notes via Facebook, Twitter, GMail, Dropbox and other supporting applications;
  • Export note to a file.

apMemo is the simplest and fastest way to create quick handwritten or text notes with reminders!