linuxÆô¶¯¹ý³ÌdzÎö(1)
ûÓÐÔĶÁ¹ýÔ´Âë֮ǰ,¶Ô²Ù×÷ϵͳ×ÜÊDZ§ÓÐÉñÃظÐ,×ÜÊÇÈÏΪ²Ù×÷ϵͳÊǺܰÂÃîµÄ¶«Î÷. Æäʵ,¶ÔÓÚÒ»¸öÓÐÒ»¶¨±à³Ì»ù´¡ºÍϵͳ֪ʶµÄ³ÌÐòÔ±,²Ù×÷ϵͳ²¢²»ÊÇ¿ÉÍû¶ø²»¿É¼°µÄ¶«Î÷. ²Ù×÷ϵͳµÄ×îÖÕÄ¿±êÖ»ÊÇÔÚÓ¦ÓóÌÐò²ãÃæÓëÓ²¼þ²ãÃæÖ®¼ä×öµÄÒ»²ãе÷,¿ÉÄÜÕâ¸ö¶¨ÒåÓÐЩƬÃæ,µ«±¾×ÅÕâÑùµÄ˼Ïë¶Á´úÂëÓ¦¸Ã»áÇáËÉÒ»µã.
ÓÉÓÚ·¢Õ¹µ½ÏÖÔÚ,LINUXÒѾ¿ÉÒÔÖ§³Ö¸÷ÖÖƽ̨,±¾ÎĽ²Ö÷ÒªÕë¶ÔÒ»¸ö"¹ÅÀÏ"µÄ°æ±¾--0.11--½øÐÐÌÖÂÛ,ÕâÒ²ÊÇÕÔ¾¼²©Ê¿ÔÚ"linuxÄÚºËÍêȫעÊÍ"Ò»ÊéÖÐ×öʹÓõİ汾,ÓÉÓÚ±¾ÈËÒ²ÊdzõѧÕß,²»¸ÒÍý×Ô¶Ô2.6ÄÚºË×÷³ö¶¨ÂÛ. ÎÒ½«ÔÚÒÔÏ·ÖÎöµÄ¹ý³ÌÖÐż¶û¼ÓÈëһЩ×Ô¼º¶Ô2.6µÄÀí½â.
linuxµÄÆô¶¯¹ý³ÌÖ÷ÒªÉæ¼°µ½Èý¸öÔ´Îļþ: bootsect.s head.s setup.s
ÔÚ0.11°æ±¾ÖÐ,ÕâÈý¸öÎļþ¾ùλÓÚlinux/boot/Ŀ¼ÏÂ,¶øÔÚ×îа汾ÖÐ,ÒòΪ֧³ÖµÄƽ̨µÄ¶àÑùÐÔ,ÎÒÃÇ¿ÉÒÔÔÚlinux/arch/i386/ÏÂÕÒµ½ËüÃÇ.
i386Ìåϵ½á¹¹µÄÆô¶¯¹ý³Ì´óÖÂÊÇÕâÑùµÄ:»úÆ÷Ê×ÏȽøÈëʵģʽ,È»ºó´ÓµØÖ·0xFFFF0´¦¿ªÊ¼Ö´ÐÐ,Ò»°ãÕâ¸öµØÖ·ÊÇÔÚBIOSÖÐ,ÓÚÊÇBIOS³ÌÐò»á¶Ô»úÆ÷×öһЩ×Լ칤×÷. ÔÚ´ËÖ®ºó,Ò»°ã´Ó´ÅÅÌÆô¶¯µÄ»úÆ÷»á´Ó¿ÉÆô¶¯É豸µÄµÚÒ»ÉÈÇøÖаÑÆô¶¯³ÌÐò¶ÁÈëÄÚ´æ0x07C00λÖÃ,²¢ÇÒÌøתµ½¸Ã´¦¼ÌÐøÖ´ÐÐ.ÕâÀïËù˵µ½µÄ´Ó´ÅÅ̶ÁÈëµÄµÚÒ»ÉÈÇøÄÚÈÝ,Æäʵ¾ÍÊÇbootsect.s¾¹ý»ã±àÒÔºóµÄ¶þ½øÖÆÂë,Ò²¾ÍÊÇ˵,ÔÚ²Ù×÷ϵͳÒâÒåÉÏϵͳÊÇ´Óbootsect.s¿ªÊ¼µÄ. ÔÚ¹Û¿´bootsect.sÔ´Âë֮ǰ,ÈÃÎÒÃÇÏÈ¿´¿´²Ù×÷ϵͳµÃµ½ÔËÐлú»áÒÔºóÊÇÈçºÎ°²ÅÅÒ»ÇеÄ:
Linus¶Ôbootsect.s±»ÔØÈëµÄλÖò»Ì«ÂúÒâ,ÊÂʵÉÏÕâµÄÈ·²»ÊǸöÁ¼ºÃµÄλÖÃ.0x07C00ÊÇÒ»¸öÏ൱µÍµÄλÖÃ,LinusÆÚÍû²Ù×÷ϵͳµÄÕæÕýÄں˲¿·Ö¿ÉÒÔ´Ó0x00000Æðʼ,²¢ÇÒÕ¼¾ÝÕû¸öÄÚ´æÇøÓòµÄ×îµÍλÖÃ. bootµÄ³ÌÐòÄÚÈÝÖ»»áÔÚ»úÆ÷Æô¶¯µÄʱºò±»ÔËÐÐÒ»´Î,ÒÔºó»ù±¾¾ÍûÓÐÓÃÁË. ¶øÏÖÔÚ,bootsect.sλÓÚ0x07C00µÄλÖÃÉÏ,ÏÔÈ»ÒѾ"µ²×¡"Á˲Ù×÷ϵͳµÄ"·". ÒªÖªµÀ,¼´Ê¹ÊÇ0.11°æ±¾µÄlinux,Äں˵ij¤¶È(ÕâÀïÓ¦¸Ã¸ü׼ȷµÄ³Æ֮ΪsystemÄ£¿é,¶ø²»ÊǹãÒåÉϵÄlinuxÄÚºË. Õâ¸ö¸ÅÄîÔÚÏÂÇÒÌøתµ½ÄÇÀïÖ´ÐÐ.ÎÄÖн²Êö.)Ò²´ïµ½ÁË0x3000, ¶øÔÚ2.6ÖÐ,¸üÊÇ´ïµ½ÁË0x7F00Ö®¶à. ÓÚÊÇ,ºÜ×ÔÈ»µÄ,ÎÒÃÇÊ×ÏÈÒª×öµÄ¹¤×÷¾ÍÊÇ°Ñbootsect.sµÄλÖÃŲ¿ª,Ųµ½¸ü¸ßµÄµØÖ·ÉÏÈ¥,²¢Ìøתµ½ÄÇÀïÖ´ÐÐ.
×öÍêǨÒÆÖ®ºó,bootsect.sÐèÒª×öµÄµÚ¶þ¼þÊÂÇé¾ÍÊÇÒª°ÑºóÐø´úÂëload½øÀ´. Õⲿ·Ö´úÂë¾ÍÊÇsetup.s,ËüµÄ¶þ½øÖƱàÂëÓ¦¸Ã´æ·ÅÔÚÆô¶¯É豸µÄµÚ¶þ¸öÉÈÇø,³¤¶ÈΪ4¸öÉÈÇø. loadÕâ¶Î³ÌÐò²¢Ã»ÓÐÏëÏóÖеÄÄÇôÀ§ÄÑ,³ÌÐòͨ¹ýint 0x13À´Íê³ÉµÄ. setup.s½«±»·ÅÔÚ½ô½ÓÔÚbootsect.sµÄ
Ïà¹ØÎĵµ£º
×ÜÀÀ
ÓÃiptables -ADC À´Ö¸¶¨Á´µÄ¹æ
Ôò
£¬-AÌí¼Ó -Dɾ³ý -C ÐÞ¸Ä
iptables - [RI] chain rule num rule-specification[option]
ÓÃiptables - RI ͨ¹ý¹æÔòµÄ˳ÐòÖ¸¶¨
iptables -D chain rule num[option]
ɾ³ýÖ¸¶¨¹æÔò
iptables -[LFZ] [chain][option]
ÓÃiptables -LFZ Á´Ãû [Ñ¡Ïî]
iptables -[NX] chain
ÓÃ -NX ......
¶ÔÓÚ²»Í¬µÄLinuxÄں˰汾£¬´ËÁбí¿ÉÄܲ»Í¬£¬»ùÓÚºóÏò¼æÈÝÐÔ£¬Ëæ×ÅLinuxÄں˰汾ºÅµÄÔö¼Ó£¬´ËÁбí¿ÉÄÜ»á±ä³¤¡£´ËÁбíΪ2.6.24-16Äں˰汾ÓÚ/usr/include/asm/unistd_32.hÖÐÁгöµÄ324¸öϵͳµ÷Óúš£
#define __NR_restart_syscall 0
#define __NR_exit 1
#define __NR_fork 2
#define __NR_read 3
#define ......
0, ¸´Ï°ÒѾѧ¹ýµÄ Linux ֪ʶ£¬ÕûÀíÁËЩÈÝÒ×ÍüµôÁ˵ķÅÕâ
1, ÃüÁîÐÐÖÐÒ»´Î¿ÉÒÔÊäÈë¶à¸öÃüÁÖмäÒԷֺźŸô¿ª
2, ÃüÁî¹ý³¤¿ÉÒÔÓÃ'\' £¨backslash £©¶Ï¿ªÐ´µ½¶à¸öÎïÀíÐÐÉÏ
3, I/O Öض¨ÏòµÄÊéд˳ÐòÊÇÖØÒªµÄ£¬ÏµÍ³´Ó×óÏòÓÒɨÃèÃüÁîÐÐ
4, ¹ÜµÀÊÇÒ»ÖÖÌØÊâµÄI/O Öض¨Ïò
5, tee Èýͨ¹ ......
´´½¨Ð½ø³Ì£ºforkº¯Êý
1.1.1. forkº¯Êý¸Éʲô£¿
#include <sys/types.h>
#include <unistd.h>
pid_t fork(void);
‘fork()’º¯ÊýÓÃÓÚ´ÓÒÑ´æÔÚ½ø³ÌÖд´½¨Ò»¸öнø³Ì¡£Ð½ø³Ì³ÆΪ×Ó½ ......
·find path -option [ -print ] [ -exec -ok command ] {} \;
#-print ½«²éÕÒµ½µÄÎļþÊä³öµ½±ê×¼Êä³ö
#-exec command {} \; -----½«²éµ½µ ......