Archive

Archive for May, 2009

Fuck in Linux Kernel

May 31, 2009 1 comment

Is Sunday, is raining, my wife is reading some psychological shit and I’m bored. I knew from the morning I need to do something very very important today, so I start to count the “fuck” word in Linux Kernel.

This command is faster

find . -name *.[hcS] -not -regex ‘\./\.git.*’ | xargs cat | grep ” fuck” | wc -l

than this command:

egrep -ir “( fuck)” * | wc -l

Read more…

Categories: Funny, Linux, Programming, Random

Microsoft programmers start banning memcpy on their products

May 30, 2009 1 comment

Memcpy is the fastest way to copy one chunk of memory to another. But right now Microsoft is banning memcpy function from their products. memcpy over the years was responsable for a lot of security problems in Microsoft products, but the main problem of this function was the programmer. The approach of this function was to provide us a very fast way to copy a chunk of memory to another and it succeed over the years, but passing bad variables to it is the programmer fault not the function itself.

I was just curious how many times memcpy appears in linux kernel source (2.6.29.4) code and I just run following command to find out

find . -name *.[hcS] -not -regex ‘\./\.git.*’ | xargs cat | grep memcpy | wc -l

And the result was
12092

A lot of possible bugs … then why Linus doesn’t ban this function from the Linux kernel?

Beside that Microsoft also ban : RtlCopyMemory, CopyMemory.

From msdn site: http://blogs.msdn.com/sdl/archive/2009/05/14/please-join-me-in-welcoming-memcpy-to-the-sdl-rogues-gallery.aspx

Now developers who want to be SDL compliant will should replace memcpy() functions with memcpy_s, that takes an additional parameter defining the size of the destination buffer. But my Question is: what if happens if all parametres are wrong ? You can only check the consistency of 2 arguments … and memcpy_s it seems is 3 times slower.

In the article from msdn site posted by sdl we have some hints how to write our code SDL compliant.
Add

#pragma deprecated (memcpy, RtlCopyMemory, CopyMemory)

in your header files and at compile time you should see something like

warning C4995: ‘memcpy’: name was marked as #pragma deprecated

Also you can ban this on GCC compilers in this way:

#pragma GCC poison memcpy RtlCopyMemory CopyMemory

Happy Coding !

Mac OS X 10.5.7 Update released

May 13, 2009 Leave a comment

Latest updated is recommended for Mac OS X 10.5 Leopard and includes general operating system fixes that enhance the stability, compatibility and security of your Mac and also is coming with new features.

The most notable features and fixes are:
* Latest security fixes.
* Additional RAW image support for several third-party cameras.
* Improves the reliability and accuracy of Unit Converter, Stocks, Weather and Movies Dashboard widgets.
* Addresses a situation that may cause issues when logging into Gmail.
* Improves performance of video playback and cursor movements for recent Macs with NVIDIA graphics.
* Fix an issue with Dvorak keyboard layout in Mac OS X 10.5.6.
* Improves reliability when syncing contacts with Yahoo!.
* Improves stability for network home directories hosted by Mac OS X Server v10.4.
* Improves Finder search results for network volumes that may not support Spotlight searching, such as Mac OS X Server v10.4, Time Capsule, and third-party AFP servers.
* Several improvements to Directory Service and Client Management.
* Expansion Slot Utility for Mac Pro now reports the correct PCIe slot configuration.
* Improves network performance when connected to certain Ethernet switches that have Flow Control enabled.
* Fix an issue in which time limits may not work properly with full-screen games and Fast User Switching.
* Improves consistency with Parental Controls and application restrictions.
* Includes other printing reliability and stability improvements.

Categories: Apple, Security Tags: , ,

Is for sure … Al Gore invented the Internet

May 12, 2009 Leave a comment
Al Gore invented Internet

Al Gore invented Internet

This is the truth !

Categories: Funny, Internet Tags: , ,

New Adobe Reader exploit targeting all operating systems

May 5, 2009 1 comment

Adobe products are starting to look like Microsoft products, full of bugs. A new exploit of Adobe Reader hits the internet. The exploit is a remote one and it is working through JavaScript feature of Adobe Reader. Adobe indicates that fixes will be available by May 12, 2009. Acrobat Reader from 8.1.4 to 9.1 for Linux are vulnerable to this remote exploit. To avoid any problem, disable Acrobat JavaScript from Adobe Reader preferences. More informations you can find on Securityfocus site.

Categories: Adobe, Linux, Security Tags: , ,

MacOS X, Windows 7 and Linux next features

May 4, 2009 Leave a comment

MacOS X, Windows 7 and Linux next features

Nice comic!

Follow

Get every new post delivered to your Inbox.