Skip to contentSkip to conversation

support for offset > 2GB on x86 in losetup needed

DISCUSSION Matthew Wilcox 1 participant 1 message Sep 17, 2002

lore
Share & tools
lore
#0 lore raw

Hi, Vlad

Quoted 7 lines · You

Currently linux-2.4 on x86 doesn't allow to use offsets greater than 2GB for losetup utility. Looking at the code, it turns out that the kernel is guilty - linux kernel doesn't allow offsets greater than 2Gb since it uses 32-bit wide signed (why signed?) integer for storing the offset on x86..

That's a very severe limitation IMHO, it would be very nice to fix this in 2.5 at least (but it would be better to fix it in 2.4 of course :).

That's right, the current ioctl API passes an `int' between userspace and the kernel. I'm currently working on a major rewrite of this code, based on suggestions by Al Viro.

The new API will be:

mount -t loop -o offset=1234567890,rw foo.iso /dev/loop0

However I only started on this code last week, so I'm not quite done yet ;-)

Currently unsolved problem: encryption. I'm certain people are not comfortable supplying their keys on the command line, available to anyone using ps. So one option would be a 'key=file' option, but that doesn't allow people to protect that with a passphrase (people _do_ use that feature, right?). Next option is a `keyfd=N', but then we need a losetup program, which invokes mount(2) rather than an ioctl. Perhaps that's acceptable.

Other bright ideas urgently sought ;-)

Signature · 1 line
Revolutions do not require corporate support.