Implement a system call in kernel 3.10.56 (x86_64)

Source: Internet
Author: User

Implementing a system call in kernel 2.6.32 is somehow different from

The method in kernel 3.10.56.

In kernel 2.6.32, We shoshould register the system call number in the file

/ARCH/x86/include/ASM/unistd_64.h and then add the corresponding function

Prototype of system call in the file/include/Linux/syscils. h.

But in kernel 3.10.56, we just need modify one file/ARCH/x86/syscils/syscall_64.tbl,

For example, we want to add a system call print_info in kernel 3.10.56, adding the entry

314 common print_info sys_print_info 

At here,314Represents the system call number,CommonMeans we can use this system

Call under 32 bit architecture and 64 bit architecture. The last two items have the same

Meaning as in kernel 2.6.32.

Under the system call entry 313 is OK. Also you shoshould implement this system call in

Appropriate Souce file.

Implement a system call in kernel 3.10.56 (x86_64)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.