[lkml]   [2002]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: support for offset > 2GB on x86 in losetup needed

Hi, Vlad

You wrote:
> 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 ;-)

Revolutions do not require corporate support.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:4.288 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site