linuxÄں˵ÄһЩԤ¶¨Òå
ÔÎÄ:http://article.phpfans.net/?do=Show&id=Mjc3NTkx
×÷Õß: crazytyt ʱ¼ä: 2009-08-27 13:29:00
ËùÓеÄÄں˴úÂ룬»ù±¾¶¼°üº¬ÁËlinux\compile.hÕâ¸öÎļþ£¬ËùÒÔËüÊÇ»ù´¡£¬´òËãÏÈ·ÖÎöÕâ¸öÎļþÀïµÄ´úÂë¿´¿´£¬ÓпÕÔÙ·ÖÎö·ÖÎöÆäËüµÄ´úÂë¡£
Ê×ÏÈÓ¡ÈëÑÛÁ±µÄÊǶÔ__ASSEMBLY__Õâ¸öºêµÄÅжϣ¬Õâ¸ö±äÁ¿Êµ¼ÊÊÇÔÚ±àÒë»ã±à´úÂëµÄʱºò£¬ÓɱàÒëÆ÷ʹÓÃ-DÕâÑùµÄ²ÎÊý¼Ó½øÈ¥ µÄ£¬AFLAGSÕâ¸ö±äÁ¿Ò²¶¨ÒåÁËÕâ¸ö±äÁ¿£¬gcc»á°ÑÕâ¸öºê¶¨ÒåΪ1¡£ÓÃÔÚÕâÀÊÇÒòΪ»ã±à´úÂëÀ²»»áÓõ½ÀàËÆÓÚ__userÕâÑùµÄÊôÐÔ£¨¹ØÓÚ __userÕâÑùµÄÊôÐÔÊÇÔõô»Ø×ÓÊ£¬±¾ÎĺóÃæ»áÌáµ½£©£¬ÒòΪÕâÑùµÄÊôÐÔÊÇÔÚ¶¨Ò庯ÊýµÄʱºò¼ÓµÄ£¬ÕâÑù±ÜÃâ²»±ØÒªµÄÔÚ±àÒë»ã±à´úÂëʱºòµÄÒýÓá£
½ÓÏÂÀ´ÊÇÒ»¸ö¶Ô__CHECKER__Õâ¸öºêµÄÅжϣ¬ÕâÀïÐèÒª½²µÄ¶«Î÷±È½Ï¶à¡£
µ± ±àÒëÄں˴úÂëµÄʱºò£¬Ê¹ÓÃmake C=1»òC=2µÄʱºò£¬»áµ÷ÓÃÒ»¸ö½ÐSparseµÄ¹¤¾ß£¬Õâ¸ö¹¤¾ß¶ÔÄں˴úÂë½øÐмì²é£¬Ôõô¼ì²éÄØ£¬¾ÍÊÇ¿¿¶ÔÄÇЩÉùÃ÷¹ýSparseÕâ¸ö¹¤¾ßËùÄÜʶ±ðµÄÌØ ÐÔµÄÄں˺¯Êý»òÊDZäÁ¿½øÐмì²é¡£ÔÚµ÷ÓÃSparseÕâ¸ö¹¤¾ßµÄͬʱ£¬ÔÚSparse´úÂëÀ»á¼ÓÉÏ#define __CHECKER__ 1µÄ×ÖÑù¡£»»¾ä»°Ëµ£¬¾ÍÊÇ£¬Èç¹ûʹÓÃSparse¶Ô´úÂë½øÐмì²é£¬ÄÇôÄں˴úÂë¾Í»á¶¨Òå__CHECKER__ºê£¬·ñÔò¾Í²»¶¨Òå¡£
ËùÒÔÕâÀï¾ÍÄÜ¿´³öÀ´£¬ÀàËÆÓÚ__attribute__((noderef, address_space(1)))ÕâÑùµÄÊôÐÔ¾ÍÊÇSparseÕâ¸ö¹¤¾ßËùÄÜʶ±ðµÄÁË¡£
ÄÇôÕâЩ¸öÊôÐÔÊǸÉʲôÓõÄÄØ£¬ÎÒÒ»¸ö¸ö×ö½éÉÜ¡£
Õâ ÑùµÄÊôÐÔ˵Ã÷£¬ÓÐÒ»²¿·ÖÔÚgccµÄÎĵµÀﻹûÓмӽøÈ¥£¬ÖÁÉÙÎÒÔÚgcc 4.3.2µÄÌØÐÔÀïûÓп´µ½£¬ÍøÉÏÓиçÃÇÎÊÀàËƵÄÎÊÌ⣬Greg¶ÔËû½øÐÐÁ˽â´ð£¬È»ºóËû¶ÔGreg±§Ô¹ÎĵµµÄÊ£¬Greg¶ÔËû˵£¬ËûÓÐʱ¼ä±§Ô¹µÄ»°£¬»¹²» Èç×Ô¼ºÀ´¸üÐÂÎĵµ¡£Ëû²»ÄܶÔÒ»¸öÃâ·Ñ¹¤¾ßµÄÎĵµÓÐÈç´ËÖ®¸ßµÄÒªÇ󣬳ý·ÇËû¸¶·Ñ¡£
# define __user __attribute__((noderef, address_space(1)))
__userÕâ¸öÌØÐÔ£¬¼´__attribute__((noderef, address_space(1)))£¬ÊÇÓÃÀ´ÐÞÊÎÒ»¸ö±äÁ¿µÄ£¬Õâ¸ö±äÁ¿±ØÐëÊǷǽâ³ý²Î¿¼£¨no dereference£©µÄ£¬¼´Õâ¸ö±äÁ¿µØÖ·±ØÐëÊÇÓÐЧµÄ£¬¶øÇÒ±äÁ¿ËùÔڵĵØÖ·¿Õ¼ä±ØÐëÊÇ1£¬¼´Óû§³ÌÐò¿Õ¼äµÄ¡£
ÕâÀï°Ñ³ÌÐò¿Õ¼ä·Ö³ÉÁË3¸ö²¿·Ö£¬0±íʾnormal space£¬¼´ÆÕͨµØÖ·¿Õ¼ä£¬¶ÔÄں˴úÂëÀ´Ëµ£¬µ±È»¾ÍÊÇÄں˿ռäµØÖ·ÁË¡£1±íʾÓû§µØÖ·¿Õ¼ä£¬Õâ¸ö²»Óöི£¬»¹ÓÐÒ»¸ö2£¬±íʾÊÇÉ豸µØÖ·Ó³Éä¿Õ¼ä£¬ÀýÈçÓ²¼þÉ豸µÄ¼Ä´æÆ÷ÔÚÄÚºËÀïËùÓ³ÉäµÄµØÖ·¿Õ¼ä¡£
ËùÒÔÔÚÄں˺¯ÊýÀÓÐÒ»¸öcopy_to_u
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
¹Ø¼ü´Ê£º Linux ϵͳ¹ÜÀí
1¡¢²é¿´Ä³Îļþ ......
¡¡¡¡1¡¢½éÉÜ£º
¡¡¡¡ ´ó²¿·ÖµÄ Linux ϵͳÖж¼ÒªÊ¹Óà syslog ¹¤¾ß£¬ËüÊÇÏ൱Áé»îµÄ£¬ÄÜʹϵͳ¸ù¾Ý²»Í¬ÈÕÖ¾ÊäÈëÏî²ÉÈ¡²»Í¬µÄ»î¶¯¡£syslog ¹¤¾ßÓÉÒ»¸öÊØ»¤³ÌÐò×é³É¡£ËüÄܽÓÊÜ·ÃÎÊϵͳµÄÈÕÖ¾ÐÅÏ¢²¢ÇÒ¸ù¾Ý /etc/syslog.conf ÅäÖÃÎļþÖеÄÖ¸Áî´¦ÀíÕâЩÐÅÏ¢¡£³ÌÐò£¬ÊØ»¤½ø³ÌºÍÄÚºËÌṩÁË·ÃÎÊϵͳµÄÈÕÖ¾ÐÅÏ¢¡£Òò´Ë£¬ÈκÎÏ£ÍûÉú³ÉÈÕ ......
Linux
Ô×Ó²Ù×÷µÄ·ÖÎö
±¾ÎÄÕë¶ÔLinuxÌṩµÄÔ×Ó²Ù×÷º¯Êý
atomic_dec_and_test
×öÁËÏêϸµÄʵÀý·ÖÎö£¬½âÊÍÁËÆäÔ×ÓÐԵı¾ÖÊÒâÒå¡£
²¢¶Ô
volatile
²úÉúµÄÎó½â×öÁ˽âÊÍ¡£
1.
atomic_dec_and_test
·ÖÎö
£¨
1
£©ÏÈÀ´¿´
atomic_dec_and_test
µÄ¶¨Ò壺
11 #ifdef CONFIG_SMP
12 #def ......
½ñÌì×°Á˸öÐéÄâ»ú£¬ÔÚÉÏÃæÅÜlinuxÏë×÷ΪSOLRµÄ·þÎñÆ÷£¬Ë³±ãѧϰһÏÂlinux
1.°²×°vsftpd·þÎñÆ÷
¡¡¡¡vsftpdÊÇÄ¿Ç°Linux×îºÃµÄFTP·þÎñÆ÷¹¤¾ßÖ®Ò»£¬ÆäÖеÄvs¾ÍÊÇ“Very Secure”£¨ºÜ°²È«£©µÄËõд£¬¿É¼ûËüµÄ×î´óÓŵã¾ÍÊÇ°²È«£¬³ý´ËÖ®Í⣬Ëü»¹¾ßÓÐÌå»ýС£¬¿É¶¨ÖÆÇ¿£¬Ð§ÂʸߵÄÓŵ㡣
¡¡¡¡Èç¹ûÑ¡ÔñÍêÈ«°²×°Red ......