The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [BUG] Alpha (EV56), lseek64, and /dev/kmem
@ 2003-10-04  0:42 Kelledin
  2003-10-04  1:08 ` Måns Rullgård
  0 siblings, 1 reply; 4+ messages in thread
From: Kelledin @ 2003-10-04  0:42 UTC (permalink / raw)
  To: linux-kernel

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 
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!

This wouldn't be a problem, except for stuff like klogd that 
seeks through /dev/kmem to discover module symbols.  This little 
quirk tends to make klogd segfault, it seems. :(

In case it matters:

Kernel:		2.4.21+SGI XFS 1.3.0
gcc:		3.2.3
glibc:		2.3.2
binutils:	2.14
modutils:	2.4.25
sysklogd:	1.4.1
distro:		generic from-scratch build

-- 
Kelledin
"If a server crashes in a server farm and no one pings it, does 
it still cost four figures to fix?"


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-10-04 17:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-04  0:42 [BUG] Alpha (EV56), lseek64, and /dev/kmem Kelledin
2003-10-04  1:08 ` Måns Rullgård
2003-10-04  1:36   ` Kelledin
2003-10-04 17:13     ` [PATCH] sysklogd: use up-to-date query_module() routine Kelledin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox