Re: Re: which function writes to the disk

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

 



hi
can i use do_generic_file_read_IO

here i have constints that only one user is using the file..

can any body tell me how to enforce these constraints ..

i've copied the ext2 file system and i am modifing it to obtaint a cryptographic file system,

can i just encrypt in function genric_file_write and generic_file write will it work

(i will change the names of this functions as many other file system uses the same read write functions)

rajaram



On Wed, 05 Mar 2003 Jan Harkes wrote :
On Wed, Mar 05, 2003 at 07:25:13AM -0000, Rajaram Suresh Gaunker wrote:
> which functions writes to the disk in file system?
>
> how can i know which user wants to write to disk, or which user
> has called the system call?


That is a little difficult, last time I looked, writes were just marking
the memory page dirty. At some point there is this kernel flush daemon
that wanders by, notices that the page is dirty and kicks off the actual
IO.


In the mean time several users might have written to the same page
before IO has even started which makes it unclear which user has
permission to write. Will all valid writes fail if one user's
permissions have expired? Or will we allow an user's writes to
succeed just because he is piggybacking on the valid writers.


> user registers his key by using a system call which i'm
> providing he can also unregister itself using a system call
>
> the key for each user is stored in kernel when we are writing the
> data to file of user we will encrypt using owners key


You might want to google for 'cryptfs', 'cfs', and 'tcfs'.

Jan




R@j@r@m -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: 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