Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LinuxÍø¹Üѧϰ±Ê¼Ç£¨12£©¹ØÓÚLinuxµÄÄں˰²È«

LinuxÄÚºËÊÇ×÷ΪMonolithic architecture (µ¥ÄÚºËÌåϵ½á¹¹) ¶øʵÏֵģ¬ÎªÁË»ñµÃ Microkernel architecture (΢ÄÚºËÌåϵ½á¹¹) ´øÀ´µÄ¿ÉÀ©Õ¹ÐԺͿÉά»¤ÐÔ£¬Linux ÒýÈëÁËÄ£¿é (module) »úÖÆ£¬(±È½Ï׼ȷµÄ˵·¨ÊÇ Loadable Kernel Module, ¿É×°ÔØÄÚºËÄ£¿é)£¬½å´ËÀ´±£Ö¤Äں˵Ľô´ÕÐÔºÍLinux±¾Éí¹ÌÓеĵ¥Ò»Ìåϵ½á¹¹µÄÓŵ㗗ÉÏÏÂÎÄÇл»Ëٶȿ졣 ÔÚLinuxÖУ¬Óû§(ͨ³£ÐèÒªrootȨÏÞ)ͨ¹ýmodutilsÈí¼þ°üÖÐÌṩµÄ¹¤¾ß£¬¶¯Ì¬µØ½«Ä£¿é(ÈçÍøÂçÇý¶¯µÈ)²åÈë¡¢ÒƳöÄںˡ£ÕâÑù£¬Äں˵ŦÄÜ¿ÉÒÔ¶¯Ì¬µØÌí¼ÓºÍɾ³ý£¬È´²»ÐèҪÿ´Î¶¼¾­¹ýÈß³¤µÄ¹Ø»ú/ÖØÆô¹ý³Ì¡£ÒòΪģ¿éÔËÐеĻ·¾³ÊÇÄںˣ¬Òò¶øËü¾ßÓÐÄÚºËÌØȨ£¬Ä£¿é±à³ÌÒ²¾ÍÊÇÄں˱à³Ì£¬ËüÊÇLinux Kernel Hacking µÄÖ÷Òª¹¤¾ß¡£ÏÂÃ棬½²ÊöÔÚLinuxÏÂÈçºÎͨ¹ýmodule À´À¹½Øϵͳµ÷Óã¬ÒÔ¼°Kernel Hacking µÄһЩ·À·¶ÊֶΡ£ Linuxͨ¹ýint 0x80 ÈíÖжÏʵÏÖϵͳµ÷Óá£ÏµÍ³µ÷ÓÃÁбíÔÚLinux×Ô¾Ùʱͨ¹ýinit_IRQ( ) µ÷Óúê set_intr_gate ³õʼ»¯¡£µ±ÏµÍ³µ÷Ó÷¢Éúʱ£¬Äں˼ì²éϵͳµ÷ÓõÄÓÐЧÐÔ£¬È»ºó½«¿ØÖÆȨת¸øʵ¼ÊµÄϵͳµ÷ÓôúÂ롣ϵͳµ÷Óñí sys_call_table[] ¿ÉÒÔÔÚÎļþ entry.S ÖÐÕÒµ½¡£Ëü¿´ÆðÀ´Ó¦¸ÃÈçÏÂËùʾ£º ¡­ ¡­ ENTRY (sys_call_table) .long SYMBOL_NAME (sys_ni_syscall) /* ¡­¡­ */ .long SYMBOL_NAME (sys_exit) .long SYMBOL_NAME (sys_fork) .long SYMBOL_NAME (sys_read) ¡­ ¡­ Îļþunistd.h Ϊÿ¸öϵͳµ÷Óù涨ÁËΨһµÄ±àºÅ£¬Ëü¿´ÆðÀ´Ó¦¸ÃÈçÏÂËùʾ£º ¡­ ¡­ #define __NR_exit 1 #define __NR_fork 2 #define __NR_read 3 ¡­ ¡­ ²»ÄÑ¿´³ö£¬Ã¿¸öϵͳµ÷ÓÃËù¶ÔÓ¦µÄ±àºÅÕýÊǸÃϵͳµ÷ÓÃÔÚÖ¸Ïòº¯ÊýµÄÖ¸ÕëÊý×ésys_call_table[]ÖеÄϱꡣÄں˼ì²é%eaxµÄÓÐЧÐÔ£¬sys_call_table[%eax]±ãÊÇÓû§ÒªÇóµÄϵͳµ÷ÓõÄÈë¿ÚÖ¸Õë¡£ÄÇô£¬ÔõÑù²ÅÄÜÀ¹½Øϵͳµ÷ÓÃÄØ£¿ºÜ¼òµ¥£¬Ö»Òª½«sys_call_table[]ÖжÔÓ¦µÄÈë¿ÚÖ¸ÕëÌæ»»³ÉÎÒÃÇ×Ô¼ºµÄº¯ÊýÖ¸Õë¼´¿É¡£ ºÃÁË£¬ÓÐÁËÉÏÊö֪ʶ£¬ÏÖÔÚ¿ÉÒÔ½øÐбà³ÌÁË¡£×÷Ϊ×î¼òµ¥µÄÀý×Ó£¬ÎÒÃÇ¿ÉÒÔÊÔ×ÅÀ¹½Ømkdir()ϵͳµ÷Óᣠ/* *hack_mkdir.c David 2003-4-19 *It shows how to intercept a system call. */ #include /*±àÒëÄ£¿é±ØÐèµÄÍ·Îļþ*/ #include #include extern void *sys_call_table []; int (*origin_mkdir) (const char *); /*ÓÃÓÚ±£´æ¾ÉµÄϵͳµ÷ÓÃ*/ int hacked_mkdir(const char *pathname) /*еÄϵͳµ÷ÓÃ*/ { return 0; } int init_module() /*Ä£¿éÈë¿Úµ


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨Èý£© HCI²ã±à³Ì

1. HCI²ãЭÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI)  ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈЭÒé ......

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

Linux / Unix ÏÂÎļþɾ³ý¡¢¾ä±ú Óë¿Õ¼äÊÍ·ÅÎÊÌâ

×òÌìÔÚÒ»¸ö¿Í»§»·¾³£¬ÓÉÓÚ¿Õ¼ä½ôÕÅ£¬É¾³ýÁËÒ»¸öÎļþ£¬Óöµ½ÁËÎļþ¾ä±úÓë¿Õ¼äÊͷŵÄÎÊÌ⣬¼Ç¼һÏ¡£
ÔÚϵͳÉÏ£¬ÁÙʱ±í¿Õ¼äÀ©Õ¹µ½ÁË32G£¬ÎÒн¨ÁËÒ»¸öÁÙʱ±í¿Õ¼ä
£¬²¢Çл»ÁËÊý¾Ý¿âÉèÖãº[oracle@corde tdb]$ ls -sort
total 35101212
   51264 -rw-r-----  1 oracle    52429312 Oct 20 08 ......

ǶÈëʽlinuxÉÕд(¶þ)—LinuxÄں˵IJüôºÍ±àÒë

Ò»¡¢Äں˵ĻñµÃ
¿ÉÒÔ´ÓÍøÉÏÏÂÔØÄÚºËÎļþ£¬http://www.kernel.org¡£Èç¹ûÊÇΪÁËÁ·Ï°£¬¾¡Á¿ÏÂÔØ£².4.xµÄÄںˡ£ÒòΪ2.6.xµÄÄں˱Ƚϴ󣬵±È»±àÒëÒ²ÐèÒª¸ü¶¼µÄʱ¼ä¡£
 
¶þ¡¢Äں˵ıàÒë
LinuxÄں˵ıàÒë²Ëµ¥Ö÷ÒªÓÐÈý¸ö°æ±¾£º
£±£©make config£º½øÈëÃüÁîÐУ¬¿ÉÒÔÒ»ÐÐÒ»ÐеÄÅäÖá£
£²£©make menuconfig£º¿ª·¢ÈËÔ±±È½ÏÊìÏ ......

ǶÈëʽlinuxÉÕд(Ò»)—BootLoaderµÄ²Ã¼ôºÍ±àÒë


Ò»¡¢BootLoaderµÄ¸ÅÄî
   BootLoaderÊÇϵͳ¼ÓµçÆôÔËÐеĵÚÒ»¶ÎÈí¼þ´úÂ룮»ØÒäÒ»ÏÂPCµÄÌåϵ½á¹¹ÎÒÃÇ¿ÉÒÔÖªµÀ£¬PC»úÖеÄÒýµ¼¼ÓÔسÌÐòÓÉBIOS£¨Æä±¾ÖʾÍÊÇÒ»¶Î¹Ì¼þ³ÌÐò£©ºÍλÓÚÓ²ÅÌMBRÖеÄÒýµ¼³ÌÐòÒ»Æð×é³É¡£BIOSÔÚÍê³ÉÓ²¼þ¼ì²âºÍ×ÊÔ´·ÖÅäºó£¬½«Ó²ÅÌMBRÖеÄÒýµ¼³ÌÐò¶Áµ½ÏµÍ³µÄRAMÖУ¬È»ºó½«¿ØÖÆȨ½»¸øÒýµ¼³ÌÐò¡£Òý ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ