[00:01:55] --- kaj has become available [00:14:29] --- abo has become available [02:43:40] --- Simon Wilkinson has become available [03:11:24] --- kaj has left [03:43:35] --- kaj has become available [04:05:55] --- haba has become available [04:28:45] --- Simon Wilkinson has left [05:05:12] --- Simon Wilkinson has become available [05:32:05] --- reuteras has left [06:06:04] --- Simon Wilkinson has left [06:38:28] --- sanket has become available [07:09:22] --- sanket has left [07:09:33] --- snktagarwal has become available [07:11:49] --- snktagarwal is now known as sanket [07:11:49] --- sanket is now known as snktagarwal [07:11:49] --- snktagarwal is now known as sanket [07:12:13] Okay, I need some help with the afs module in afs/VNOPS/afs_vnop_read/write.c [07:12:53] What I wish to do is to intercept all data which goes from afs cache to kernel space( and vice versa ) and do modifications( encryption decryption ) on it. [07:13:37] I have looked at the afs_UFSRead/Write.c functions and have a strategy. Though I have not been able to discuss it thoroughly. [07:13:50] is someone in for a brainstorm. ? [07:14:34] Besides I mailed my project proposal[ gsoc ] on the mailing list. [07:14:52] --- sanket is now known as snktagarwal [07:14:52] --- snktagarwal is now known as sanket [07:18:47] hi. you should read your email [07:19:30] --- Derrick Brashear has become available [07:19:48] and then my other client hung [07:19:52] --- sanket is now known as snktagarwal [07:19:52] --- snktagarwal is now known as sanket [07:23:39] anyway, simon told me where you were stuck. you have an explanation of what you should be looking at, in email [07:24:53] --- sanket is now known as snktagarwal [07:29:53] --- snktagarwal is now known as sanket [07:29:53] --- sanket is now known as snktagarwal [07:33:36] Derrick Brashear: hi [07:34:03] Dunno my client keeps changing names. this is apparently my jabber id on gmail [07:34:15] --- snktagarwal is now known as sanket [07:34:15] --- sanket is now known as snktagarwal [07:34:20] --- snktagarwal is now known as sanket [07:34:21] --- sanket is now known as snktagarwal [07:34:21] --- snktagarwal is now known as sanket [07:34:26] --- haba has left [07:34:53] --- sanket is now known as snktagarwal [07:34:53] --- snktagarwal is now known as sanket [07:36:30] you have what you need for now? [07:36:42] One more doubt. [07:36:57] --- kaj has left [07:37:24] While reading code, I see a structure uio auio being passed to both the afs_UFSRead/Write.c But cannot see why we need it. How is it being helpful if you could explain. [07:38:18] you understand how afs_UFSRead is called? [07:38:30] (via the pointer in struct afs_cacheOps) [07:39:08] No. I just understand when it is called. And what it fulfils [07:39:29] well that structure has vwrite and vread members which are those functions. [07:39:53] so, look at the afs_read and afs_write macroes in src/afs/afs.h [07:39:53] --- sanket is now known as snktagarwal [07:39:53] --- snktagarwal is now known as sanket [07:40:15] and the afs_rdwr macro just below them. [07:40:28] so.... what calls afs_rdwr? and you have your answer there [07:42:38] er, what calls afs_rdwr, afs_read, and afs_write. but basially the things that call those provide a struct uio. and the calls get down to AFS_UFSRead/AFS_UFSWrite, via those macroes [07:43:46] What does vread and vwrite do ? [07:44:54] --- sanket is now known as snktagarwal [07:46:03] calls UFSRead and UFSWrite. they're just pointers in the cacheOps structure which point to those functions [07:46:20] Allright. [07:47:16] in short, afs_read and afs_write are the top level functions. UFSRead UFSWrite are called from within. [07:47:21] it [07:48:30] well, they're macroes, not functions. but yes, the code calls you see will be afs_rdwr, afs_read and afs_write. and they call down to afs_UFSRead/afs_UFSWrite [07:49:55] --- snktagarwal is now known as sanket [07:49:55] --- sanket is now known as snktagarwal [07:51:13] --- pod has become available [07:51:19] I see in afs_UFSRead/Write.c functions like: totalLength = AFS_UIO_RESID(auio); filePos = AFS_UIO_OFFSET(auio); I guess these are information about the file to be read ? [07:51:33] And that's how we use auio ? [07:54:48] Okay, I will start to play with it anyways. [07:54:55] --- snktagarwal is now known as sanket [07:54:55] --- sanket is now known as snktagarwal [07:55:01] --- snktagarwal has left [08:06:09] --- sanket has become available [08:40:53] shadow@gmail.com/owl7F90CC8C: in the struct iovec. how do I know how many bytes have been stored in each iov_base ? the iov_len is helpless because it is always zero. [08:48:33] uh. it's not supposed to be. [08:54:31] it's not supposed to be "zero" ? well it is :) [08:55:25] the documentation from linux( lxr ) says nothing specific. but somewhere else it says, size_t iov_len; /* Number of bytes to transfer */ [09:06:47] are you in the read half or the write half? [09:07:04] read half [09:07:10] e.g. the half where openafs provides the data (hence iov_len comes from us) or consumes it? [09:07:42] read half provides the data in UFSRead I assume. [09:08:36] consumes. UFSRead reads the data and fills the uio. [09:09:06] What I meant was, when a user issues a read for a file. [09:09:19] we fill the uio with afsio_copy, in UFSRead. [09:10:08] --- JSund has become available [09:10:57] ok [09:11:20] so what are you looking at that's zero, and where are you looking? [09:11:37] Didn't get you. [09:11:52] you said iov_len is zero. which iov_len, and where did you check it [09:12:14] Okay, I just pastebin it. [09:13:40] pastebin.com/Cjrt0X8X [09:13:56] I have let lines besides for reference [09:14:53] There is an ugly hack which I was trying to see if I can get data off uio. But here is where I tried to check iov_len [09:16:46] This is just after the VOP_READ is issued. [09:17:09] and what do your printks print? [09:17:56] Right now I am printing whatever is inside the iov_base [09:18:01] right now, your "read all data" should break for any case where iovcnt != 1, you're trying to print all the data out of just a single iovec [09:18:15] yes, you're printing something. that's fine. copy and paste when it printed when you ran it [09:18:29] It prints garbage apparently [09:18:44] instead of interpreting it, pastebin it [09:18:50] Okay. [09:19:01] like, there better be a line The amount of data stored in present tuio is: (some number) [09:19:16] so, fine. what? likewise, UIO: uio_iovcnt: [09:19:49] the rest, yes, will look like crap. you're printing raw binary data, if it's a binary file or a directory you're reading, it will look like nothing. or be unprintable [09:20:18] I am catenating simple text files [09:20:39] and you're sure that's the first thing it needs to read from the disk? i'd not bet it [09:22:04] --- Russ has become available [09:22:16] pastebin.com/u3PYDHvT [09:22:47] looks like .history [09:22:55] or .bash_history [09:23:25] and what abt the unreadable characters in b/w. How do we explain that ? [09:24:08] besides i see no trace of the file I tried to catenate. [09:24:45] well, how do you know this particular UFSRead call is (already) the file you know you are looking for) [09:26:07] 4096 seems suspiciously like a directory. [09:26:17] okay I have something better to show [09:26:23] i am pastebinning it [09:26:38] print the fid. avc->f.fid.Fid.Vnode and avc->f.fid.Fid.Volume [09:27:16] if the fid's vnode is an odd number, it's a directory [09:27:28] okay. [09:27:36] and you can use fs getfid (some afs path) to confirm you're really looking at the file you think you are [09:27:51] --- abo has left [09:28:18] --- abo has become available [09:28:20] What do you think is the trouble ? [09:28:53] my module just hung out, will have to restart the VM [09:29:10] i think the trouble is you're trying to print data (fine) and getting alarmed when other things it ends up reading are not the data you're looking for. [09:29:28] well, it will need to read other files, so not every UFSRead is going to be something you recognize [09:29:47] anyway, i have to run away for a while. [09:30:20] Even when I try a cat * over a source code, it shows nothing uselful, save something useful. [10:41:10] --- JSund has left [11:47:47] --- Russ has left: Disconnected [11:48:20] --- kaj has become available [11:53:00] --- Russ has become available [11:58:28] --- sanket has left [12:07:03] --- kaj has left [12:40:22] --- Simon Wilkinson has become available [13:01:43] --- jonas.sundberg has become available [13:07:31] --- Simon Wilkinson has left [13:07:48] --- Simon Wilkinson has become available [13:08:12] --- kaj has become available [13:09:30] --- Simon Wilkinson has left [13:13:35] --- Derrick Brashear has left [14:20:34] --- kaj has left [14:20:40] --- kaj has become available [15:01:40] --- Russ has left: Disconnected [16:17:26] --- kaj has left [17:43:51] --- jonas.sundberg has left [18:55:49] --- kaj has become available [19:32:19] --- kaj has left [19:58:46] --- jaltman has become available [20:24:16] --- jaltman has left: Disconnected [20:25:17] --- jaltman has become available [21:13:31] --- kaj has become available [21:50:30] --- Born Fool has become available [22:12:19] --- reuteras has become available [22:21:37] --- Born Fool has left [22:53:41] --- kaj has left [23:47:37] --- kaj has become available [23:53:39] --- kaj has left