System-call in Kernel Space

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

 



  We all know that system-calls are for user-space.
I have a file-system driver where I have to use system calls in kernel-space.

 Normally, we DON'T do any high level IOs from Kernel space (file creation/reading, and so on). But here in my driver I am  stacking FS drivers, I can't avoid this. This is partly because Linux kernel can't handle FS stacking (this wouldn't be an issue for Windows, for instance, which supports stacking),

The simple (and legal) way to create a dir/file whatever is to call system calls, like, for instance sys_mkdir. The problem is that I am not in a context where I can call these. Because they expect a call from user mode, while I am in kernel mode. This is even why I implemented macros such as: https://github.com/HeisSpiter/hepunion/blob/master/fs/hepunion/hepunion.h#L399. This one disables all checks from user mode calls, since I am in kernel. And this allows calling system calls.

 This is not a good way so is there any alternative.

Regards,
Saket Sinha
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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