Bug 235871 - Implement pdwait4(2)
Summary: Implement pdwait4(2)
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Robert Watson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-20 01:56 UTC by Enji Cooper
Modified: 2019-04-09 16:36 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer 2019-02-20 01:56:20 UTC
When capsicum was originally integrated into FreeBSD, a placeholder syscall (pdwait4(2)) was added, but not completed. This is an enhancement bug/reminder for interested parties to implement the syscall.

More information about this can be found in https://reviews.freebsd.org/D18950 .
Comment 1 Enji Cooper freebsd_committer 2019-02-21 05:00:29 UTC
linimon: a patch to implement the syscall hasn't been provided yet, so I'm going to remove the keyword (to avoid misleading end-users).
Comment 2 commit-hook freebsd_committer 2019-02-28 18:12:57 UTC
A commit references this bug:

Author: ngie
Date: Thu Feb 28 18:12:15 UTC 2019
New revision: 344662
URL: https://svnweb.freebsd.org/changeset/base/344662

Log:
  Remove references to pdwait4(2) and `CAP_PDWAIT` from rights(4)

  @cem removed references to pdwait4(2) (a nonexistent syscall) in
  r320058.

  This change removes references to pdwait4(2) and `CAP_PDWAIT` in
  rights(4) to not mislead the user into thinking that pdwait4(2)/`CAP_PDWAIT` is
  actually implemented in the stock FreeBSD kernel.

  The goal of this functionality was to simplify monitoring/manipulating
  processes started with `pdfork`, et al, and avoid races with waiting on pids.
  The syscall was never completed though--just discussed on the capsicum mailing
  list back in 2015:
  https://lists.cam.ac.uk/pipermail/cl-capsicum-discuss/2015-May/msg00012.html
  . That being said, there are members of the project (@rwatson, etc) who
  have longterm goals to implement this syscall to better secure pdfork(2)
  calls.

  PR:		235871
  Reviewed by:	emaste
  Discussed with:	rwatson
  Approved by:	emaste (mentor)
  MFC after:	1 week
  Differential Revision: https://reviews.freebsd.org/D18950

Changes:
  head/share/man/man4/rights.4
  head/sys/sys/capsicum.h
Comment 3 commit-hook freebsd_committer 2019-04-09 16:36:16 UTC
A commit references this bug:

Author: ngie
Date: Tue Apr  9 16:35:24 UTC 2019
New revision: 346059
URL: https://svnweb.freebsd.org/changeset/base/346059

Log:
  MFC r344662:

  Remove references to pdwait4(2) and `CAP_PDWAIT` from rights(4)

  @cem removed references to pdwait4(2) (a nonexistent syscall) in
  r320058.

  This change removes references to pdwait4(2) and `CAP_PDWAIT` in
  rights(4) to not mislead the user into thinking that pdwait4(2)/`CAP_PDWAIT` is
  actually implemented in the stock FreeBSD kernel.

  The goal of this functionality was to simplify monitoring/manipulating
  processes started with `pdfork`, et al, and avoid races with waiting on pids.
  The syscall was never completed though--just discussed on the capsicum mailing
  list back in 2015:
  https://lists.cam.ac.uk/pipermail/cl-capsicum-discuss/2015-May/msg00012.html
  . That being said, there are members of the project (@rwatson, etc) who
  have longterm goals to implement this syscall to better secure pdfork(2)
  calls.

  PR:		235871
  Approved by:	emaste (mentor)
  Differential Revision: https://reviews.freebsd.org/D19805

Changes:
  stable/12/share/man/man4/rights.4
  stable/12/sys/sys/capsicum.h