All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>,
	akpm@linux-foundation.org, herton@redhat.com,
	penguin-kernel@i-love.sakura.ne.jp, rientjes@google.com,
	dave@stgolabs.net, joe@perches.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Don't set sempid in semctl syscall.
Date: Fri, 26 Feb 2016 21:19:32 +0100	[thread overview]
Message-ID: <56D0B354.50106@colorfullife.com> (raw)
In-Reply-To: <1456489298-20224-1-git-send-email-prasannatsmkumar@gmail.com>

Hi,

On 02/26/2016 01:21 PM, PrasannaKumar Muralidharan wrote:
> From: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
>
> As described in bug #112271 (bugzilla.kernel.org/show_bug.cgi?id=112271)
> don't set sempid in semctl syscall. Set sempid only when semop is called.
I disagree with the bug report:

sempid is (and always was on Linux) the pid of the last task that modified the semaphore:
It is updated for semop, SETVAL and undo adjustment on process exit.
And - that is a bug: sempid is not updated for SETALL :-(

  
With regard to setting sempid on SETVAL,

- Opensolaris sets sempid on SETVAL and SETALL
http://minnie.tuhs.org/cgi-bin/utree.pl?file=OpenSolaris_b135/uts/common/syscall/sem.c
- Darwin sets sempid on SETVAL and SETALL
http://fxr.watson.org/fxr/source//bsd/kern/sysv_sem.c?v=xnu-1456.1.26

Note:
For sem_otime and sem_ctime, there are also subtile differences between 
the sysv implementations.
What should we do there?

Here is my last review (already a few years old - some links may be 
stale, perhaps a few more implementations are now available)
http://calculix-rpm.sourceforge.net/sysvsem.html

--
     Manfred

  reply	other threads:[~2016-02-26 20:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 12:21 [PATCH] Don't set sempid in semctl syscall PrasannaKumar Muralidharan
2016-02-26 20:19 ` Manfred Spraul [this message]
2016-02-26 22:15   ` Davidlohr Bueso
2016-02-26 22:18     ` Davidlohr Bueso
2016-02-27  8:42   ` PrasannaKumar Muralidharan
2016-02-28 19:16     ` Michael Kerrisk
2016-02-29 21:22       ` Davidlohr Bueso
2016-03-01  7:48         ` Michael Kerrisk (man-pages)

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=56D0B354.50106@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave@stgolabs.net \
    --cc=herton@redhat.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=prasannatsmkumar@gmail.com \
    --cc=rientjes@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.