Re: query regarding linux kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi....

On Fri, Jan 2, 2009 at 1:54 PM, battipatisainagendra Bhavaniprasad
<sainagendrabhavaniprasad@xxxxxxxxx> wrote:
> Hi,
>            I am prasad new to linux.I have following questions.
>
> 1.Can we create linux static kernel functions?if yes please let me know that
> procedure?

do you mean just adding new function in kernel space? well, it's
exactly the same like you usually do to add new function in normal
user space program.

> 2.Can we call system call in kernel space?

If your question means "call" as "executes int x80h or  sysenter" then
IMO the answer is no. it will  assumes you're currently in user space,
that means i.e CPL=3, address space checking checks whether you don't
exceed 3GB limit (in 32 bit environment) etc.

But, you could probably call the function that eventually being called
by the syscall. For example, instead of executing sys_fork(), you can
call do_fork().

> 3.can we call system calls or kernel function in user space?

for system calls, yes. After all, that's why system call is made.

but for non syscall kernel function, you can not directly execute
them. The reason is simple: you're forbidden by segmentation.

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux