1) there's no loop.c-2.6.original available -- that's my major complaint -- so I can't see where it came from (with all the kernel changes). There were some api changes I saw, but there seemed to be some "other changes" -- for example: @@ -709,6 +734,9 @@ sector_t IV; struct page *pg; + if(!bio->bi_size) + return 0; + pos = ((loff_t) bio->bi_sector << 9) + lo->lo_offset; buf = page_address(LDE_lo_bio_free0->bi_io_vec[0].bv_page); IV = bio->bi_sector; I'm not sure if that's a reason to upgrade or not... 2) Some stuff had to be cleaned up -- this was just a feeler to see if anyone had a use for this... I'm not sure about the future of loopAES with all the other methods of encryption in the kernel (I started working on this several months ago -- and since we used loopAES in 2.4 machines, I was asked to get it working on 2.6). Note I'm new to this... Another advantage is I had a framework to load multiple loopAES drivers at the same time (which does different things -- for example, to compare the C code and the assembler code on x86). Just replacing should compile it as device loop/major 7 -- but this can be changed at compile and or runtime... Here's the patch with the extraneous stuff -- against 2.3a...feel free to use/comment/flush (I didn't see any patches on sourceforge in the patchmanager, so I wasn't sure if that was a place to put patches...) marty -----Original Message----- From: Jari Ruusu [mailto:jariruusu@xxxxxxxxxxxxxxxxxxxxx] Sent: Wednesday, November 14, 2007 9:46 AM To: Leisner, Martin Subject: Re: linux 2.6 driver "Leisner, Martin" wrote: > There's no loop.c-2.6.original in the 3.2a/3.2b distributions. > > I'm using 3.2a and made some mods to the driver. > > Looking at linus's git tree, there were substantial changes made to > loop.c since May. > > FYI: > diff -u loop-AES-v3.2a/loop.c-2.6.patched > loop-AES-v3.2b/loop.c-2.6.patched | diffstat > loop.c-2.6.patched | 89 > +++++++++++++++++++++++++++++++++++++++++++++-------- > 1 files changed, 77 insertions(+), 12 deletions(-) > > I've modified the loop driver so it can run alongside the standard loop > driver in the kernel (this was when systems had them build in instead of > modulized). > > I had the ability to: > default to another name besides /dev/loop* (I used loopAES) > runtime assignment of major numbers (so there's no conflict with > the > standard loop) > > This was easier than to recompile/modify all the kernels I was using > (and tell everyone I was supporting they "had to run a new kernel". [ This is private email, but feel free to CC a public mailing list on your possible reply. ] I'm not sure how to interpret your message. It could mean: 1) You are unhappy with amount of changes to loop.c-2.6.patched file? - Most of those changes are needed because of block layer interface changes on linux-2.6.24-rc and later kernels. It would be cool if interfaces didn't change, but they did. 2) You wanted me and/or others to look at your changes? - Your email didn't include a patch. 3) You are making public statement that you can hack code? - Fine. Nothing wrong with that. -- Jari Ruusu 1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9 DB 1D EB E3 24 0E A9 DD
Attachment:
loop.c.diff
Description: loop.c.diff