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

»ñÈ¡Linux 2.6.x sys_call_table


ÔÚlinuxÖÐËùÓеÄsyscall¶¼Êǵ÷ÓÃint 0x80, int 0x80µÄÖжϷþÎñ³ÌÐòΪsystem_call(arch/x86/kernel/traps_32.c:set_system_gate(SYSCALL_VECTOR,&system_call).  system_call (arch/x86/entry_32.S)×îÖÕcall *sys_call_table(,%eax,4)À´Íê³ÉÒ»¸ösyscallµ÷ÓÃ. 
¼´ int 0x80 -> system_call -> sys_call_table, ÕâÑùÎÒÃÇÖ»ÒªÊ×ÏÈ»ñÈ¡int 0x80µÄÖжϷþÎñµØÖ·system_callµØÖ·, È»ºóÔÚsystem_call´úÂëÖÐÖ±½ÓËÑË÷callÖ¸Áî¼´¿ÉÕÒµ½sys_call_tableµØÖ·ÁË!
ÁíÒ»ÖÖ·½·¨¾ÍÊÇÖ±½ÓÐÞ¸Ä
ͨ¹ýcat /boot/System.map-`uname -r` |grep sys_call_table  ²é¿´µ±Ç°sys_call_tableµØÖ·,²¢Óëͨ¹ýÒÔÉÏ·½·¨È¡µÃµÄµØÖ·×ö±È½Ï!
Äں˰汾: ubuntu 2.6.24-19-server
/*
 * Standard in kernel modules
 */
#include <linux/kernel.h>   /* We're doing kernel work */
#include <linux/module.h>   /* Specifically, a module, */
#include <linux/moduleparam.h>  /* which will have params */
#include <linux/unistd.h>   /* The list of system calls */
/*
 * For the current (process) structure, we need
 * this to know who the current user is.
 */
#include <linux/sched.h>
#include <asm/uaccess.h>
unsigned long *sys_call_table = 0;
//EXPORT_SYMBOL ( sys_call_table );
struct {
    unsigned short  limit;
    unsigned int    base;
} __attribute__ ( ( packed ) ) idtr;
struct {
    unsigned short  offset_low;
    unsigned short  segment_select;
    unsigned char   reserved,   flags;
    unsigned short  offset_high;
} __attribute__ ( ( packed ) ) * idt;
unsigned long* find_sys_call_table(void)
{
    unsigned long system_call = 0;          // x80Öжϴ¦Àí³ÌÐòsystem_call µØÖ·
    char *call_hex = "\xff\x14\x85";    // call Ö¸Áî
    char *code_ptr = NULL;
   


Ïà¹ØÎĵµ£º

ÓÃSSHÉÏ´«Îļþµ½LinuxÓöµ½µÄÎÊÌâ

¡¾ÎÊÌâ¡¿£º
ÀûÓÃSSHÉÏ´«Ñ¹ËõÎļþµ½LinuxϵͳµÄ²âÊÔ»úÆ÷ÉÏ£¬×ÜÊÇÌáʾ“Encounntered 1 errors during the transfer”ÐÅÏ¢¡£
¡¾½â¾ö·½·¨¡¿
°ÑÒªÉÏ´«µÄÎļþ·Åµ½ÆäËüÅÌÏ£¬ÔÙÉÏ´«£¬¾Í¿ÉÒÔÁË¡£
ÊÇʲôԭÒòÄØ£¿Ã»Ã÷°×¡£¡£¡£¡£¡£¡£ ......

LINUXÆÚÄ©¸´Ï° ³ÌÐòÉè¼ÆÈëÃÅ

Ò»¡¢GCC (×î×î³£¼û:gcc    hello.c   –o    hello) ¢Ù³£ÓÃÑ¡Ïî -c:½ö¶ÔÔ´Îļþ½øÐбàÒë
-o:¶ÔÉú³ÉµÄ´úÂë½øÐÐÓÅ»¯£¬ÓÐ0£¬1£¬2£¬3ËĸöµÈ¼¶£¬Ä¬ÈÏΪ2
-g:¼ÓÈëµ÷ÊÔÐÅÏ¢
-I dir:±àÒëÔ´ÎļþÊÇÔö¼ÓÒ»¸öËÑË÷¿âÎļþµÄĿ¼
-w:½ûÖ¹ËùÓо¯¸æ
-W warning:ÔÊÐí ......

Linux bootloader ±àд·½·¨

¼¶±ð£º ³õ¼¶
·¶Ïþ¾æ (xiaoju_f@263.net), ÁªÏë(±±¾©)ÓÐÏÞ¹«Ë¾Èí¼þÉè¼ÆÖÐÐÄǶÈëʽÑз¢´¦¿ª·¢¹¤³Ìʦ, ÁªÏë(±±¾©)ÓÐÏÞ¹«Ë¾Èí¼þÉè¼ÆÖÐÐÄ
2003 Äê 8 ÔÂ 11 ÈÕ
¶ÔÓÚÒÆÖ² linux µ½ÆäËü¿ª·¢°åµÄÈËÀ´Ëµ£¬±àд boot loader ÊÇÒ»¸ö²»¿É±ÜÃâµÄ¹ý³Ì¡£¶ÔÓÚѧϰlinuxµÄÈËÀ´½²£¬±àд bootloader Ò²ÊÇÒ»¸öºÜÓÐÌôÕ½ÐԵŤ×÷¡£±¾ÎÄͨ¹ý¶Ô li ......

linux catÃüÁî


ÒªÔÚ¹¤×÷Õ¾ÏÔʾÎļþ£¬ÇëÊäÈ룺
 cat notes
´ËÃüÁî»áÏÔʾ notes ÎļþÖеÄÊý¾Ý¡£Èç¹û¸ÃÎļþµÄÐÐÊý´óÓÚ¿ÉÓÃÆÁÄ»ÐÐÊý¼õÒ»µÄÖµ£¬ÔòÎļþµÄ²¿·ÖÄÚÈÝ»á¹ö³öÆÁÄ»¡£ÒªÃ¿´Î½«ÎļþÁÐÔÚÒ»Ò³ÉÏ£¬Ê¹Óà pg ÃüÁî¡£
Òª²¢Öü¸¸öÎļþ£¬ÇëÊäÈ룺
cat section1.1 section1.2 section1.3 >section1
´ËÃüÁ ......

LINUXÏ¿´ÔÚÏßÊÓƵ£ºrtsp ¸ÄΪ mms

±ÈÈç˵Ҫ¿´ 
http://broadcast.hzcnc.com/player.asp?code=345&pname=%u65e0%u95f4%u9053
$ curl 'http://broadcast.hzcnc.com/Play.aspx?code=345'
<ASX VERSION = "3.0">
  <ENTRY>
    <REF HREF = &quo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ