<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>The QoH&#039;in</title> <atom:link href="http://the.qoh.in/feed/" rel="self" type="application/rss+xml" /><link>http://the.qoh.in</link> <description>Quality of Hackin linux/unix kernels and modules with source code</description> <lastBuildDate>Fri, 04 Jun 2010 10:04:40 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Введение в Yii Framework</title><link>http://the.qoh.in/uncategorized/introduction-yii-framework/</link> <comments>http://the.qoh.in/uncategorized/introduction-yii-framework/#comments</comments> <pubDate>Fri, 04 Jun 2010 10:04:40 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[yii]]></category><guid
isPermaLink="false">http://the.qoh.in/?p=363</guid> <description><![CDATA[У меня есть три достойных размеров веб-сайты делать в 2009 году, поэтому я думал, я мог бы попытаться использовать рамках PHP в первый раз, вместо кодирования все с нуля. Я использовал Ruby On Rails для разработки веб-приложений раньше, поэтому мне комфортно с рамок и архитектуры MVC, но я хотел бы воспитывать себя на фреймворков. После [...]No related posts.]]></description> <content:encoded><![CDATA[<p><span><span>У меня есть три достойных размеров веб-сайты делать в 2009 году, поэтому я думал, я мог бы попытаться использовать рамках PHP в первый раз, вместо кодирования все с нуля.</span> <span>Я использовал </span></span><a
rel="nofollow" href="http://www.rubyonrails.org"><span><span>Ruby On Rails</span></span></a><span><span> для разработки веб-приложений раньше, поэтому мне комфортно с рамок и архитектуры MVC, но я хотел бы воспитывать себя на фреймворков.</span> <span>После исследования нескольких рамок, а после неудовлетворительной попытка использовать </span></span><a
rel="nofollow" href="http://framework.zend.com"><span><span>Zend Framework</span></span></a><span><span>, я остановился на, и действительно оценил </span></span><a
rel="nofollow" href="http://www.yiiframework.com"><span><span>Yii Рамочной</span></span></a><span><span>.</span> <span>Yii Рамочной еще довольно новые, а документация не широкие, но он работает настолько хорошо, что она по-прежнему очень проста в использовании.</span> <span>В первые несколько постов на Yii Framework, я просто обсудить создание и тестирование Yii.</span></span><span><span>Первое, что вам нужно использовать Yii Рамочная есть </span></span><a
rel="nofollow" href="http://www.php.net"><span><span>PHP</span></span></a><span><span> и веб-сервер установлен, конечно.</span> <span>(Ну, это использовать, чтобы быть правдой. По состоянию на 9 июня, теперь вы можете попробовать Yii помощью виртуального устройства. С сайта Yii, вы можете скачать готовые сервера: Linux OS, PHP, веб-сервер и </span></span><a
href="http://www.postgresql.org/"><span><span>PostgreSQL</span></span></a><span><span>базу данных. Прибор работает, используя </span></span><a
href="http://www.vmware.com/products/server/"><span><span>в VMware Server</span></span></a><span><span> утилита, которая является бесплатной.) Но если вы читаете это, то я буду считать вас есть доступ к PHP-сервер включен.</span> <span>Обратите внимание, что Yii Рамочной требует PHP 5.1 или выше.</span> <span>К счастью, рамки Вы можете проверить свои настройки для Вас!</span> <span>Начните с </span></span><a
rel="nofollow" href="http://www.yiiframework.com/download/"><span><span>загрузки</span></span></a><span><span> последней стабильной версией Yii Framework.</span> <span>На момент написания данной статьи это 1.0.6.</span><span>Скачать файл будет называться что-то вроде </span></span><span><span>юй-</span></span><em><span><span>версия</span></span></em><span><span>.</span></span><em><span><span>релиз</span></span></em><span><span>.</span></span><em><span><span>доб</span></span></em><span><span> и составляет всего около 2 Мб.</span> <span>Развернуть этот создать папку прочее:</span></span></p><ul><li><strong><span><span>CHANGELOG</span></span></strong><span><span>, </span></span><strong><span><span>ЛИЦЕНЗИИ</span></span></strong><span><span>, </span></span><strong><span><span>README</span></span></strong><span><span>и </span></span><strong><span><span>АПГРЕЙДА</span></span></strong><span><span> текстовых документов</span></span></li><li><strong><span><span>демо</span></span></strong><span><span> папку</span></span></li><li><strong><span><span>рамках</span></span></strong><span><span> папку</span></span></li><li><strong><span><span>Требования</span></span></strong><span><span> папку</span></span></li></ul><p><span><span>Вы должны прочитать </span></span><strong><span><span>README</span></span></strong><span><span> и </span></span><strong><span><span>ЛИЦЕНЗИИ</span></span></strong><span><span> документы, конечно, но папки являются наиболее важными здесь. </span></span><strong><span><span>Демо</span></span></strong><span><span> папка содержит четыре веб-приложения, написанные с использованием Yii.</span> <span>Они большое за то, рабочий код, как вы пытаетесь написать свой. </span></span><strong><span><span>Рамках</span></span></strong><span><span> папку это то, что требуется какой-либо веб-сайт использованием Yii. </span></span><strong><span><span>Требования</span></span></strong><span><span> папка-то простое и блестящий …</span></span></p><p><span><span>Я также предполагаю, что вы уже знаете, что в корневом каталоге веб на вашем компьютере или сервере: это папка, где ваш URL указывает.</span><span>Иными словами, когда вы идете в </span></span><span><span>http://localhost</span></span><span><span> или </span></span><span><span>http://www.example.com</span></span><span><span> в веб-браузере, она хватает документов из корневой папки сайта.</span><span>Идущий с конвенциями в Yii, я называю это </span></span><em><span><span>WebRoot</span></span></em><span><span>.</span> <span>Создать новую папку в </span></span><strong><span><span>WebRoot</span></span></strong><span><span> называется </span></span><em><span><span>юй</span></span></em><span><span>и скопируйте </span></span><strong><span><span>рамки</span></span></strong><span><span> и </span></span><strong><span><span>требования</span></span></strong><span><span> папки существуют.</span> <span>Затем перейдите к </span></span><em><span><span>yourURL</span></span></em><span><span>/ юй / требования</span></span><span><span> в веб-браузере (например, </span></span><span><span>http://localhost/yii/requirements</span></span><span><span>).</span> <span>Вы должны увидеть отчет в том, является ли вашей установки соответствует минимальным требованиям.</span></span></p><p><a
rel="nofollow" href="http://blog.dmcinsights.com/wp-content/uploads/2009/06/yii1.png"><img
title="Yii Requirements Check" src="http://blog.dmcinsights.com/wp-content/uploads/2009/06/yii1-300x252.png" alt="Yii Requirements Check" width="300" height="252" /></a></p><p><span><span>Если предположить, что установка прошла все требования, вы хорошо идти дальше.</span> <span>Заметим, что вам не обязательно каждое расширение: вы просто действительно нужно Yii Рамочной требованиям, PDO, а также расширение PDO для базы данных вы будете использовать.</span> <span>(Если вы не знакомы с ним, ПДО уровня абстракции базы данных, что делает веб-сайты базы данных агностиком.)</span></span></p><p><span><span>В моем следующем посте я покажу вам, как использовать командную строку Yii инструменты для создания первого веб-приложения.</span> <span>Это очень сладкие вещи, и ближе всего к Ruby On Rails, что я видел (который я считаю очень хорошо).</span> <span>Последующие сообщения будут объяснить MVC, и выделить конкретные советы и рекомендации я обнаружил, при разработке мой Yii-сайтов.</span> </span></p><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://the.qoh.in/uncategorized/introduction-yii-framework/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>USB sniffing on linux</title><link>http://the.qoh.in/usb/usb-sniffing-linux/</link> <comments>http://the.qoh.in/usb/usb-sniffing-linux/#comments</comments> <pubDate>Sat, 05 Dec 2009 17:14:11 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[USB]]></category> <category><![CDATA[ftdi usb]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[sniffing]]></category> <category><![CDATA[tcpdump tool]]></category> <category><![CDATA[usbmon]]></category><guid
isPermaLink="false">http://the.qoh.in/?p=9</guid> <description><![CDATA[
The linux kernel has a facility called “usbmon” which can be used to sniff the USB bus. It’s been in there for ages, and the output is really easy to collect, even from the command line shell. Simply mount debugfs and insmod the usbmon module:
mount -t debugfs none_debugs /sys/kernel/debug
modprobe usbmonThen you can just cat USB [...]No related posts.]]></description> <content:encoded><![CDATA[<div><p>The linux kernel has a facility called “usbmon” which can be used to sniff the USB bus. It’s been in there for ages, and the output is really easy to collect, even from the command line shell. Simply mount debugfs and insmod the usbmon module:</p><pre>mount -t debugfs none_debugs /sys/kernel/debug
modprobe usbmon
</pre><p>Then you can just cat USB traffic like this:</p><pre>cat /sys/kernel/debug/usbmon/1u
<span id="more-9"></span>
</pre><p>It all comes out in an ASCII dump format which is easily parsed. Every USB bus also has a device file where you can sniff the raw packets straight off the wire. More info in the <a
href="http://lxr.linux.no/linux+v2.6.28.8/Documentation/usb/usbmon.txt">usbmon documentation</a>.</p><p>But while it’s all easily parsed if you need it, there aren’t really any tools around that do it for you. That is… except for libpcap. Libpcap is the power behind the throne of the venerable <a
href="http://www.tcpdump.org/">tcpdump</a> tool. Tcpdump is not much more than a command line parser and pretty-printer of various network protocols. The heavy duty lifting is done by libpcap, not least by providing a cross-platform API for sniffing devices, something that is otherwise non-standard and different on every platform. It’s great, I’ve used it before (in <a
href="http://biot.com/capstats/">capstats</a>) and it’s very easy to use.</p><p>Libpcap on linux supports usbmon sniffing, which means you can use tcpdump to sniff a USB port and write this to a capture file. But best of all: <a
href="http://www.wireshark.org/">wireshark</a>, the all-singing all-dancing network analyzer that uses tcpdump capture files, has USB support as well.<br
/> So this is the result:</p><p><a
href="http://biot.com/p/wireshark-usb.png"><img
src="http://biot.com/p/.cache/wireshark-usb.png" alt="Wireshark screenshot" title="USB sniffing on linux" /></a></p><p>The screenshot shows a filter applied to only see device 18 on the sniffed USB bus. That’s an <a
href="http://arduino.cc/">arduino</a>, i.e. an FTDI USB-serial chip. The FTDI chips send status updates to the USB host system every 16ms (!). The status update consists of a two-byte message (described <a
href="http://lxr.linux.no/linux+v2.6.28.7/drivers/usb/serial/ftdi_sio.h#L1334">here</a>). This is actually present in every packet coming in from the FTDI chip; status updates just don’t have any other data. So for a clean sniffing session from the arduino, we want to filter out any packets that are &lt; 3 bytes in length.</p><p>The end result is serial data which the arduino sent to the host system. The screenshot shows a session on my arduino shell, <a
href="http://biot.com/arsh/">arsh</a>. This is great stuff — wireshark includes a massive amount of analysis tools and lots of options for filtering and otherwise massaging your captured data.</p><p>You need relatively recent versions of libpcap, tcpdump and wireshark for this. I compiled all three of these out of their respective repositories (easy compile all). On my ubuntu system, the libpcap version was particularly old. Tcpdump doesn’t have a pretty-printer for USB data yet, so you can only dump to a capture file for processing by wireshark.</p></div><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://the.qoh.in/usb/usb-sniffing-linux/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Mini How-To</title><link>http://the.qoh.in/kernel/mini-howto/</link> <comments>http://the.qoh.in/kernel/mini-howto/#comments</comments> <pubDate>Sat, 05 Dec 2009 16:17:05 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[kernel]]></category> <category><![CDATA[Alan Cox]]></category> <category><![CDATA[Andrew Morton]]></category> <category><![CDATA[beginner]]></category> <category><![CDATA[Fedora]]></category> <category><![CDATA[howto]]></category> <category><![CDATA[Jonathan]]></category> <category><![CDATA[Jonathan Corbet]]></category> <category><![CDATA[kernel hackers]]></category> <category><![CDATA[Linus]]></category> <category><![CDATA[lot]]></category> <category><![CDATA[pointer arithmetic]]></category> <category><![CDATA[Robert Love]]></category> <category><![CDATA[tutorial]]></category><guid
isPermaLink="false">http://the.qoh.in/?p=6</guid> <description><![CDATA[Where to begin?
I frequently get asked how I managed to end up working on the Fedora kernel for living by people hoping to one day get into kernel hacking themselves.  One of the most common things I hear is that the kernel is so big, how could anyone possibly understand it all? Truth is, [...]No related posts.]]></description> <content:encoded><![CDATA[<p>Where to begin?</p><p>I frequently get asked how I managed to end up working on the Fedora kernel for living by people hoping to one day get into kernel hacking themselves.  One of the most common things I hear is that the kernel is so big, how could anyone possibly understand it all? Truth is, there are very few people that really understand the whole kernel. The majority of the ‘big name’ kernel hackers got where they are today by specialising in one thing, and branching out.  There are exceptions to this of course, with a number of people like Andrew Morton, Alan Cox, and Linus who are ‘all rounders’, who have hacked on close to everything in the tree at some point.  Whilst the kernel could always use more people like these superheros, there is nothing wrong with becoming a specialist in one area.<span
id="more-6"></span></p><p>One thing that both the all-rounders, and specialists have in common however, is an understanding of the common kernel APIs.  Things like ‘how to allocate/free memory’ ‘how to create proc/sysfs files’ Most ‘how do ..’ questions can be answered by taking a look at how other parts of the kernel are already doing something similar.  With enough experience of use of the common APIs, higher level concepts are learned such as ‘how to create userspace interfaces that don’t suck’.</p><p>There is no fast path to learning kernel hacking.  It comes down to a big time investment on your part to read (and understand) code, learn from mistakes you make (and you will make them!), and above all, realising that in the end, it’s just code.  There may some additional restrictions for kernel hacking that you could get away with in userspace, but once you’ve grasped the basics, a lot of it just follows.</p><p>The basics:</p><ul><li>Make sure you understand how to compile and install a kernel before going any further.</li><li>A sound knowledge of C is essential.  If you’re still struggling with pointer arithmetic and such concepts, stick with hacking stuff in userspace until you understand more. A crash in userspace caused by your misunderstanding is a lot easier to debug, understand and learn from than one in the kernel which just causes your machine to lock up or reboot itself.</li></ul><p>Must-read material:</p><ul><li><a
href="http://kernelnewbies.org/">kernelnewbies</a> is a great resource for those starting out. It contains a lot of examples, and pointers.</li><li>Some good books on kernel hacking include <a
type="amzn">Linux Kernel Development (2nd ed.) by Robert Love</a>, <a
type="amzn">Linux Kernel in a nutshell by GregKH</a> and <a
type="amzn">the 3rd edition of Linux Device Drivers by Jonathan Corbet</a>.</li><li>Jonathan also writes a really good concise summary of the past week of kernel development each week at <a
href="http://www.lwn.net/">lwn.net</a>. It’s well worth reading, even if you follow linux-kernel, as the rephrasing and explanations are sometimes a lot better in summaries than reading through a 200 email thread.</li><li>The Linux kernel comes with a Documentation/ directory which contains a number of really useful documents worth spending some time reading.</li><li>Finally the code itself. Find something that interests you, find out where in the kernel that is handled, and just start reading.</li></ul><p>Useful tools:</p><ul><li>grep –r is invaluable.</li><li>You’re going to be building and rebuilding a lot. So install ‘ccache’. Most distros have it packaged so that it automatically sets itself up after installing. You may also want to look at ‘distcc’ if you’ve a lot of potential build-cluster candidate machines local to you.</li><li>Regardless of whether you’re an emacs or vi person, ‘ctags’ are invaluable for navigating your way around the source tree. ‘make tags’ in the toplevel of the kernel tree will generate an index. You can learn how to navigate with them in the man pages of your favorite editor. (In vi, ctrl-] over a symbol jumps to that function, ctrl-t takes you back. :ts will bring up a list of alternatives if there are &gt;1 hit for that function name. You can alsovim –t functionnamefrom the command line)</li><li>Some other folks find cscope really useful for the same purpose. ‘make cscope’ generates the index, running ‘cscope’ gets you an interface to jump to where functions are used/defined etc.</li></ul><p>“I don’t know what to hack on!“<br
/> A great way of putting your newly learned skills to good use is to take a look at <a
href="http://bugzilla.kernel.org/buglist.cgi?short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;kernel_version_type=allwordssubstr&amp;kernel_version=&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;emailassigned_to1=1&amp;emailtype1=substring&amp;email1=&amp;emailassigned_to2=1&amp;emailreporter2=1&amp;emailcc2=1&amp;emailtype2=substring&amp;email2=&amp;bugidtype=include&amp;bug_id=&amp;changedin=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;newqueryname=&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=">the open bugs</a>in the kernel bug tracker, find something, and try to help fix it. Whilst many driver bugs need the hardware to really debug/test a solution, a lot of problems can still be found purely by code inspection. There are no shortage of new bugs being filed all the time, and bug-fixing is a great way to learn about many different areas of the kernel and how they interact. The days of driver authors getting all the chicks and fast cars ended some years ago. Fixing bugs, that’s where the fun is at.</p><p>“I really just don’t get it“<br
/> Not everyone gets to be a spaceman, rockstar, or kernel hacker when they grow up. It’s fine. Really. There are still a lot of things you can do to help out Linux.</p><ul><li>Testing. Even if hacking code isn’t your thing, building and testing the latest snapshots of Linus’ tree, or Andrew’s –mm tree if you’re feeling really adventurous is always useful. If it breaks, great! You get to contribute something. A bug report to the linux-kernel list.</li><li>related to testing — write test tools. A new syscall got added? Great, write an application to use it in every way imaginable. Complain loudly when it breaks. Some of the simplest test tools have been the most useful to us. Filesystem stress tools like <a
href="http://www.codemonkey.org.uk/projects/fsx">fsx</a> have been so useful they become a ‘must-use’ tool for filesystem developers.</li><li>Hacking userspace isn’t ‘uncool’. There are a *lot* of things still in need of a lot of love in userspace. Find something that bugs you, and fix it. Can’t fix it? Get involved with the people who wrote it, maybe they’ll give you pointers. Some of the larger projects like <a
href="http://xorg.freedesktop.org/wiki/">xorg</a> are really in need of hackers (FWIW, if you have an inclination to work on hardware related code like drivers, X may be a better starting place than the kernel for reasons such as ease of debugging).</li><li>Triage work. The kernel bugzilla is swamped with bugs. A lot of them really old ones that may even be fixed by now. No-one has the time to regularly go through them all, looking for patches that never got applied upstream, closing duplicates, pinging reporters etc. Get involved!</li><li>Documentation. If along your journey you find something particularly hard to understand, and you found no documentation on it, here’s your chance to be a documentation-writing-superhero! Kernel hackers hate writing documentation for some strange reason.</li></ul><p>“What about janitor tasks?“<br
/> Whilst <a
href="http://janitor.kernelnewbies.org/">the janitor project</a> has some useful information, patches that do nothing but clean up code to comply with style guidelines and other such trivial patches aren’t really a great way to learn. No-one ever learned any skills by changing indentation of a function. Learn some of the ‘rules’ proposed there, but instead of focusing on them as ‘something to do’, use those rules whilst doing something more useful.</p><p>I add to this page periodically when I get new questions from people, or new ideas that I think people could learn from. If you have questions about beginning Linux kernel hacking, feel free to drop me an email, and I’ll try to point you in the right direction. I don’t really have the time to help you debug why your code is crashing, but for higher level questions, even if I can’t help you out, I probably know someone who can.</p><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://the.qoh.in/kernel/mini-howto/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Welcome to The QoH‘in!</title><link>http://the.qoh.in/qohin/welcome-to-hackin/</link> <comments>http://the.qoh.in/qohin/welcome-to-hackin/#comments</comments> <pubDate>Sat, 05 Dec 2009 14:33:44 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[qohin]]></category> <category><![CDATA[qoh]]></category><guid
isPermaLink="false">http://the.qoh.in/?p=1</guid> <description><![CDATA[Hi, and Welcome to The Quality Of Hacking Blog.
Here we will post different interesting things about linux/unix kernel hacking and etc.No related posts.No related posts.]]></description> <content:encoded><![CDATA[<p>Hi, and Welcome to The Quality Of Hacking Blog.</p><p>Here we will post different interesting things about linux/unix kernel hacking and etc.</p><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://the.qoh.in/qohin/welcome-to-hackin/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss><!--
This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc (user agent is rejected)
Database Caching 25/83 queries in 0.450 seconds using apc

Served from: netplant.ru @ 2010-09-07 07:44:55 -->