mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andries Brouwer <aebr@win.tue.nl>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>,
	Richard Gooch <rgooch@ras.ucalgary.ca>,
	Linus Torvalds <torvalds@transmeta.com>,
	linux-kernel@vger.kernel.org
Subject: Re: MAX_PID changes in 2.5.31
Date: Fri, 23 Aug 2002 00:11:06 +0200	[thread overview]
Message-ID: <20020822221106.GB5471@win.tue.nl> (raw)
In-Reply-To: <1029804092.21242.18.camel@irongate.swansea.linux.org.uk>

> > On Tue, Aug 20, 2002 at 12:29:11AM +0100, Alan Cox wrote:
> > 
> > > libc5 is very much 16bit pid throughout.
> > 
> > Can you clarify?
> 
> It uses the 16bit assuming syscall entry points, and has no knowledge of
> the 32bit pid stuff when its needed

Ha, Alan - I am a bit slow, and you are a bit brief, but let us see.

I interpreted your "throughout" as "also outside IPC", and hence asked
for clarification. For the moment, let me assume that we are just talking
about SYSV IPC. (You were not thinking about uids instead of pids?)

The kernel has these days new structs shmid64_ds, msqid64_ds
and old structs shmid_ds, msqid_ds.
The system calls sys_shmctl(), sys_msgctl() know what struct to use
by checking whether the caller has set the IPC_64 bit.
(No different entry points.) The assignment is done blindly:
	out.shm_cpid    = in->shm_cpid;
hence will truncate pids.

Today glibc has structs shmid_ds and msqid_ds with int ..pid,
and structs old_shmid_ds and old_msqid_ds with
__ipc_pid_t msg_lspid, msg_lrpid, shm_cpid, shm_lpid.
It uses the new structs and sets IPC_64 when that works.
Otherwise it uses old structs, and warns in case something
was truncated.

So, with a modern glibc all is fine.
Here modern includes glibc 2.1.91, but not glibc 2.1.3.

Earlier glibc, and libc5, don't know about IPC_64 and hence use the
old structures.

Remains the question whether that is bad.
With large pid_t, the four variables msg_lspid, msg_lrpid, shm_cpid,
shm_lpid will be truncated.

Who uses these? Nobody, as far as I can see from a recent collection
of RPMs.

So, it would be interesting to see what I overlooked.
Where are the programs that need these variables?

Andries

  reply	other threads:[~2002-08-22 22:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-19 19:55 Ingo Molnar
2002-08-19 20:06 ` Linus Torvalds
2002-08-19 20:33   ` Ingo Molnar
2002-08-19 22:31 ` Richard Gooch
2002-08-19 22:34   ` Ingo Molnar
2002-08-19 22:36     ` Richard Gooch
2002-08-19 22:41       ` Robert Love
2002-08-19 22:44         ` Ingo Molnar
2002-08-19 22:47         ` Richard Gooch
2002-08-19 23:01           ` Ingo Molnar
2002-08-20 13:44           ` Thunder from the hill
2002-08-19 22:41       ` Ingo Molnar
2002-08-19 22:42         ` Richard Gooch
2002-08-19 22:46           ` Ingo Molnar
2002-08-19 22:51           ` H. Peter Anvin
2002-08-19 23:51             ` Alan Cox
2002-08-19 23:29     ` Alan Cox
2002-08-19 23:34       ` Ingo Molnar
2002-08-20  0:33       ` Andries Brouwer
2002-08-20  0:41         ` Alan Cox
2002-08-22 22:11           ` Andries Brouwer [this message]
2002-08-22 22:27             ` Alan Cox
2002-08-22 22:59               ` Jan Harkes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020822221106.GB5471@win.tue.nl \
    --to=aebr@win.tue.nl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rgooch@ras.ucalgary.ca \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®