Re: [BUG] Alpha (EV56), lseek64, and /dev/kmem

From: Måns Rullgård
Date: Fri Oct 03 2003 - 20:10:27 EST


Kelledin <kelledin+LKML@xxxxxxxxxxxxxxxxxxx> writes:

> I just found that on my Alpha box, lseek64() has a bit of
> difficulty seeking through /dev/kmem to extremely high
> values--specifically, any value >=0x8000000000000000 (the 64th
> bit set). Whenever it's supposed to seek to (and return) such a
> value, lseek64() returns -1 instead and sets errno to a
> seemingly random garbage value. Userspace has no real choice
> except to interpret this as an error.
>
> So far it's doing this on both xfs and ext2/3, so I'm betting

/dev/kmem hasn't anything to do with filesystems, right?

> it's fs-independent. I suppose it could be the kmem driver
> itself deciding to be quirky? I have no way of knowing if
> lseek64() will stumble like this on a real file, as I'd probably
> need more drive space than God to test that!

You could create a sparse file, but I don't think any filesystem
support that big files.

--
Måns Rullgård
mru@xxxxxxxxxxxx

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/