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

Cryptograpic Filesystem based on ext2 fs



Hi,

I'm trying to implement a cryptographic FS based on EXT2 FS.
First I changed two of the file_operations structure, generic_file_read 
and generic_file_write.
The encryption / decryption is being done using XOR (i.e. key XOR 
value), where the key is stored in the superblock (I also defined 
unsigned long s_key as part of the cryptographic sb).

My problem happen when I'm trying to access a cryptographic mounted 
device for reading purpose such as 'cat file_name' - I'm getting 
Segmentation fault.
I checked /var/log/messages and the error mesasges are:

    kernel: Unable to handle kernel paging request at virtual address 
62bcc404
    .
    .
    .
    Call Trace:   [<c0135eed>] read_cache_page [kernel] 0x7d 
(0xc4f13e78))   
    kernel: [<d091474f>] ext2_get_page [crypto] 0x8f (0xc4f13e9c))
    kernel: [<d09168e0>] ext2_readpage [crypto] 0x0 (0xc4f13ea8))
    kernel: [<d0914a2c>] ext2_find_entry [crypto] 0x6c (0xc4f13eb4))
    kernel: [<d0914bb5>] ext2_inode_by_name [crypto] 0x25 (0xc4f13eec))
    kernel: [<d0917c4c>] ext2_lookup [crypto] 0x3c (0xc4f13f04))
    kernel: [<c0152caf>] lookup_hash [kernel] 0x9f (0xc4f13f20))
    kernel: [<c01531f7>] open_namei [kernel] 0x307 (0xc4f13f40))
    kernel: [<c0145eb9>] filp_open [kernel] 0x49 (0xc4f13f70))
    kernel: [<c0146273>] sys_open [kernel] 0x53 (0xc4f13fa8))
    kernel: [<c0109537>] system_call [kernel] 0x33 (0xc4f13fc0))
    .
    .
    .


Can someone please help me to solve this, since, as far as I understand 
the ext2 functions in the call trace above are called by the directory 
operations (dir.c).

Thanks,
David  

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/