»ñÈ¡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;
 
Ïà¹ØÎĵµ£º
LinuxÐźżò½é ¡¡
1) SIGHUP ±¾ÐźÅÔÚÓû§ÖÕ¶ËÁ¬½Ó(Õý³£»ò·ÇÕý³£)½áÊøʱ·¢³ö, ͨ³£ÊÇÔÚÖն˵ĿØÖƽø³Ì½áÊøʱ, ֪ͨͬһsessionÄڵĸ÷¸ö×÷Òµ, ÕâʱËüÃÇÓë¿ØÖÆÖն˲»ÔÙ¹ØÁª. ¡¡¡¡
2) SIGINT ³ÌÐòÖÕÖ¹(interrupt)ÐźÅ, ÔÚÓû§¼üÈëINTR×Ö·û(ͨ³£ÊÇCtrl-C)ʱ·¢³ö ¡¡¡¡
3) SIGQUIT ºÍSIGINTÀàËÆ, µ«ÓÉQUIT×Ö·û(ͨ³£ÊÇCtrl-\ ......
1¡¢MVCµÄ¸÷¸ö²¿·Ö¶¼ÓÐÄÇЩ¼¼ÊõÀ´ÊµÏÖ?ÈçºÎʵÏÖ?
´ð£ºMVCÊÇModel£View£ControllerµÄ¼òд¡£"Model" ´ú±íµÄÊÇÓ¦ÓõÄÒµÎñÂß¼£¨Í¨¹ýJavaBean£¬EJB×é¼þʵÏÖ£©£¬ "View" ÊÇÓ¦ÓõıíʾÃ棨ÓÉJSPÒ³Ãæ²úÉú£©£¬"Controller" ÊÇÌṩӦÓõĴ¦Àí¹ý³Ì¿ØÖÆ£¨Ò»°ãÊÇÒ»¸öServlet£©£¬Í¨¹ýÕâÖÖÉè¼ÆÄ£ÐÍ°ÑÓ¦ÓÃÂß¼£¬´¦Àí¹ý³ÌºÍÏÔʾÂß¼·Ö³É ......
awk ÍêÈ«½âÎö
awk´¦ÀíµÄ¹¤×÷ÓëÊý¾Ý¿âµÄ´¦Àí·½Ê½ÓÐÏà֮ͬ´¦£¬ÆäÏàͬ´¦Ö®Ò»¾ÍÊÇawkÖ§³Ö¶Ô¼Ç¼ºÍ×ֶεĴ¦Àí¡£
ÓòºÍ¼Ç¼
awkÖ´ÐÐʱ£¬Æää¯ÀÀÓòÓÃ$1¡¢$2¡¢…¡¢$n±êʶ£¬¶à¸öÓòÖ®¼äÓöººÅ·Ö¸ô£¬Èç$1,$3¡£
$0±êʶÕû¸ö¼Ç¼(ÕûÐÐ)¡£
1 ÏÔʾÎı¾ÎļþmyfileÖеÚÆßÐе½µÚÊ®ÎåÐÐÖÐÒÔ×Ö·û%·Ö¸ôµÄµÚÒ»×ֶΣ¬µÚÈý×ֶκ͵ÚÆ ......
¡¾ÎÊÌâ¡¿£º
ÀûÓÃSSHÉÏ´«Ñ¹ËõÎļþµ½LinuxϵͳµÄ²âÊÔ»úÆ÷ÉÏ£¬×ÜÊÇÌáʾ“Encounntered 1 errors during the transfer”ÐÅÏ¢¡£
¡¾½â¾ö·½·¨¡¿
°ÑÒªÉÏ´«µÄÎļþ·Åµ½ÆäËüÅÌÏ£¬ÔÙÉÏ´«£¬¾Í¿ÉÒÔÁË¡£
ÊÇʲôÔÒòÄØ£¿Ã»Ã÷°×¡£¡£¡£¡£¡£¡£ ......
µÚÒ»£º
ÏÂÔØ°²×°Îļþ£º
jdk1.6: wget http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u17-linux-x64-rpm.bin?BundledLineItemUUID=MAhIBe.nJasAAAEl91kuXXad&OrderID=MwxIBe.nEvEAAAEl7FkuXXad&ProductID=RPVIBe.onOYAAAEk8edn5G0y ......