public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* shm_open doesn't work (fix maybe).
@ 2001-04-24 16:46 Tom Brusehaver (N-Sysdyne Corporation)
  2001-04-24 17:01 ` Jakub Jelinek
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Brusehaver (N-Sysdyne Corporation) @ 2001-04-24 16:46 UTC (permalink / raw)
  To: linux-kernel


I have been chasing all around trying to find out why
shm_open always returns ENOSYS. It is implemented
in glibc-2.2.2, and seems the 2.4.3 kernel knows about
shmfs.

It seems the file linux/mm/shmem.c has:
    #define SHMEM_MAGIC 0x01021994

And the glibc-2.2.2/sysdeps/unix/sysv/linux/linux_fsinfo.h has:
    #define SHMFS_SUPER_MAGIC 0x02011994

Well, which is correct?

Looking for (trouble?) the reason, I found a patch
 http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg16996.html

where there seems to be a typo, the remove line is correct:
   -#define SHM_FS_MAGIC 0x02011994

but the insert line has the 0201 reversed:
   +#define SHMEM_MAGIC    0x01021994

Has anyone else run into this? (It seems the documentation on shmfs
is sparse, so I don't think too many folks are even messing with it).

Initially I thought, hey simple, just fix the kernel source, and
everyone will be happy. But, then I thought, ooof! code I build
for someone without a patched kernel will surely break. So then
I thought simple I'll fix glibc and statically link. Of course, then
someone will fix this, and all my binaries will be broken.

Help! what is the "right" fix.




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

* Re: shm_open doesn't work (fix maybe).
  2001-04-24 16:46 shm_open doesn't work (fix maybe) Tom Brusehaver (N-Sysdyne Corporation)
@ 2001-04-24 17:01 ` Jakub Jelinek
  2001-04-25  7:08   ` Christoph Rohland
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Jelinek @ 2001-04-24 17:01 UTC (permalink / raw)
  To: Tom Brusehaver (N-Sysdyne Corporation); +Cc: linux-kernel

On Tue, Apr 24, 2001 at 11:46:20AM -0500, Tom Brusehaver (N-Sysdyne Corporation) wrote:
> 
> I have been chasing all around trying to find out why
> shm_open always returns ENOSYS. It is implemented
> in glibc-2.2.2, and seems the 2.4.3 kernel knows about
> shmfs.
> 
> It seems the file linux/mm/shmem.c has:
>     #define SHMEM_MAGIC 0x01021994
> 
> And the glibc-2.2.2/sysdeps/unix/sysv/linux/linux_fsinfo.h has:
>     #define SHMFS_SUPER_MAGIC 0x02011994
> 
> Well, which is correct?

Update your glibc, 2.2.3pre* matches 2.4.x kernel:

2001-03-03  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/linux_fsinfo.h (SHMFS_SUPER_MAGIC):
	Update for real 2.4 kernels.

	Jakub

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

* Re: shm_open doesn't work (fix maybe).
  2001-04-24 17:01 ` Jakub Jelinek
@ 2001-04-25  7:08   ` Christoph Rohland
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Rohland @ 2001-04-25  7:08 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Tom Brusehaver (N-Sysdyne Corporation), linux-kernel

Hi,

On Tue, 24 Apr 2001, Jakub Jelinek wrote:
> On Tue, Apr 24, 2001 at 11:46:20AM -0500, Tom Brusehaver (N-Sysdyne
> Corporation) wrote:
>> 
>> I have been chasing all around trying to find out why
>> shm_open always returns ENOSYS. It is implemented
>> in glibc-2.2.2, and seems the 2.4.3 kernel knows about
>> shmfs.
>> 
>> It seems the file linux/mm/shmem.c has:
>>     #define SHMEM_MAGIC 0x01021994
>> 
>> And the glibc-2.2.2/sysdeps/unix/sysv/linux/linux_fsinfo.h has:
>>     #define SHMFS_SUPER_MAGIC 0x02011994
>> 
>> Well, which is correct?
> 
> Update your glibc, 2.2.3pre* matches 2.4.x kernel:
> 
> 2001-03-03  Ulrich Drepper  <drepper@redhat.com>
> 
> 	* sysdeps/unix/sysv/linux/linux_fsinfo.h (SHMFS_SUPER_MAGIC):
> 	Update for real 2.4 kernels.

Yes, and I apologize to Ulrich that the changed number slipped through
to the official kernel. My fault.

Greetings
		Christoph



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

end of thread, other threads:[~2001-04-25  7:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-24 16:46 shm_open doesn't work (fix maybe) Tom Brusehaver (N-Sysdyne Corporation)
2001-04-24 17:01 ` Jakub Jelinek
2001-04-25  7:08   ` Christoph Rohland

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