<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/sys/miscfs/procfs/procfs_status.c, branch stable/10</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=stable%2F10</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=stable%2F10'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2001-05-23T09:42:29Z</updated>
<entry>
<title>- FDESC, FIFO, NULL, PORTAL, PROC, UMAP and UNION file</title>
<updated>2001-05-23T09:42:29Z</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2001-05-23T09:42:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=99d300a1ecab368a3f1aab2273c07e5040c27d35'/>
<id>urn:sha1:99d300a1ecab368a3f1aab2273c07e5040c27d35</id>
<content type='text'>
  systems were repo-copied from sys/miscfs to sys/fs.

- Renamed the following file systems and their modules:
  fdesc -&gt; fdescfs, portal -&gt; portalfs, union -&gt; unionfs.

- Renamed corresponding kernel options:
  FDESC -&gt; FDESCFS, PORTAL -&gt; PORTALFS, UNION -&gt; UNIONFS.

- Install header files for the above file systems.

- Removed bogus -I${.CURDIR}/../../sys CFLAGS from userland
  Makefiles.
</content>
</entry>
<entry>
<title>Undo part of the tangle of having sys/lock.h and sys/mutex.h included in</title>
<updated>2001-05-01T08:13:21Z</updated>
<author>
<name>Mark Murray</name>
<email>markm@FreeBSD.org</email>
</author>
<published>2001-05-01T08:13:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=fb919e4d5a2c1baca52ac70d1064f140fffdda71'/>
<id>urn:sha1:fb919e4d5a2c1baca52ac70d1064f140fffdda71</id>
<content type='text'>
other "system" header files.

Also help the deprecation of lockmgr.h by making it a sub-include of
sys/lock.h and removing sys/lockmgr.h form kernel .c files.

Sort sys/*.h includes where possible in affected files.

OK'ed by:	bde (with reservations)
</content>
</entry>
<entry>
<title>Protect read to p_pptr with proc lock rather than proctree lock.</title>
<updated>2001-03-07T03:10:20Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2001-03-07T03:10:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=30ac5d0f9e9cc13ea9f03cb32ae3d03ba31a5430'/>
<id>urn:sha1:30ac5d0f9e9cc13ea9f03cb32ae3d03ba31a5430</id>
<content type='text'>
</content>
</entry>
<entry>
<title>o Move per-process jail pointer (p-&gt;pr_prison) to inside of the subject</title>
<updated>2001-02-21T06:39:57Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2001-02-21T06:39:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=91421ba234a918c8b8d1ed71c25a69c0009a8a12'/>
<id>urn:sha1:91421ba234a918c8b8d1ed71c25a69c0009a8a12</id>
<content type='text'>
  credential structure, ucred (cr-&gt;cr_prison).
o Allow jail inheritence to be a function of credential inheritence.
o Abstract prison structure reference counting behind pr_hold() and
  pr_free(), invoked by the similarly named credential reference
  management functions, removing this code from per-ABI fork/exit code.
o Modify various jail() functions to use struct ucred arguments instead
  of struct proc arguments.
o Introduce jailed() function to determine if a credential is jailed,
  rather than directly checking pointers all over the place.
o Convert PRISON_CHECK() macro to prison_check() function.
o Move jail() function prototypes to jail.h.
o Emulate the P_JAILED flag in fill_kinfo_proc() and no longer set the
  flag in the process flags field itself.
o Eliminate that "const" qualifier from suser/p_can/etc to reflect
  mutex use.

Notes:

o Some further cleanup of the linux/jail code is still required.
o It's now possible to consider resolving some of the process vs
  credential based permission checking confusion in the socket code.
o Mutex protection of struct prison is still not present, and is
  required to protect the reference count plus some fields in the
  structure.

Reviewed by:	freebsd-arch
Obtained from:	TrustedBSD Project
</content>
</entry>
<entry>
<title>Change and clean the mutex lock interface.</title>
<updated>2001-02-09T06:11:45Z</updated>
<author>
<name>Bosko Milekic</name>
<email>bmilekic@FreeBSD.org</email>
</author>
<published>2001-02-09T06:11:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=9ed346bab02c967ac656a58bc024f9505d8e3d7a'/>
<id>urn:sha1:9ed346bab02c967ac656a58bc024f9505d8e3d7a</id>
<content type='text'>
mtx_enter(lock, type) becomes:

mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks)
mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)

similarily, for releasing a lock, we now have:

mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN.
We change the caller interface for the two different types of locks
because the semantics are entirely different for each case, and this
makes it explicitly clear and, at the same time, it rids us of the
extra `type' argument.

The enter-&gt;lock and exit-&gt;unlock change has been made with the idea
that we're "locking data" and not "entering locked code" in mind.

Further, remove all additional "flags" previously passed to the
lock acquire/release routines with the exception of two:

MTX_QUIET and MTX_NOSWITCH

The functionality of these flags is preserved and they can be passed
to the lock/unlock routines by calling the corresponding wrappers:

mtx_{lock, unlock}_flags(lock, flag(s)) and
mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN
locks, respectively.

Re-inline some lock acq/rel code; in the sleep lock case, we only
inline the _obtain_lock()s in order to ensure that the inlined code
fits into a cache line. In the spin lock case, we inline recursion and
actually only perform a function call if we need to spin. This change
has been made with the idea that we generally tend to avoid spin locks
and that also the spin locks that we do have and are heavily used
(i.e. sched_lock) do recurse, and therefore in an effort to reduce
function call overhead for some architectures (such as alpha), we
inline recursion for this case.

Create a new malloc type for the witness code and retire from using
the M_DEV type. The new type is called M_WITNESS and is only declared
if WITNESS is enabled.

Begin cleaning up some machdep/mutex.h code - specifically updated the
"optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN
and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently
need those.

Finally, caught up to the interface changes in all sys code.

Contributors: jake, jhb, jasone (in no particular order)
</content>
</entry>
<entry>
<title>- Catch up to proc flag changes.</title>
<updated>2001-01-24T11:20:05Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2001-01-24T11:20:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=b939335607b60b588976285a1823bc51ec7ce82e'/>
<id>urn:sha1:b939335607b60b588976285a1823bc51ec7ce82e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Protect proc.p_pptr and proc.p_children/p_sibling with the</title>
<updated>2000-12-23T19:43:10Z</updated>
<author>
<name>Jake Burkholder</name>
<email>jake@FreeBSD.org</email>
</author>
<published>2000-12-23T19:43:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=98f03f90302d1d2f1878c8451c5ddf1789eeafce'/>
<id>urn:sha1:98f03f90302d1d2f1878c8451c5ddf1789eeafce</id>
<content type='text'>
proctree_lock.

linprocfs not locked pending response from informal maintainer.

Reviewed by:	jhb, -smp@
</content>
</entry>
<entry>
<title>More paranoia against overflows</title>
<updated>2000-11-08T21:53:05Z</updated>
<author>
<name>Eivind Eklund</name>
<email>eivind@FreeBSD.org</email>
</author>
<published>2000-11-08T21:53:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=b8c8516a7f3390279d899a0ae5f3d8d584c07531'/>
<id>urn:sha1:b8c8516a7f3390279d899a0ae5f3d8d584c07531</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix overflow from jail hostname.</title>
<updated>2000-11-01T19:38:08Z</updated>
<author>
<name>Eivind Eklund</name>
<email>eivind@FreeBSD.org</email>
</author>
<published>2000-11-01T19:38:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=ab3240e1987eced9159e253ab997d8afe4e54995'/>
<id>urn:sha1:ab3240e1987eced9159e253ab997d8afe4e54995</id>
<content type='text'>
Bug found by:	Esa Etelavuori &lt;eetelavu@cc.hut.fi&gt;
</content>
</entry>
<entry>
<title>o Centralize inter-process access control, introducing:</title>
<updated>2000-08-30T04:49:09Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2000-08-30T04:49:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=387d2c036bf02cf3a23705cc496577acdb829517'/>
<id>urn:sha1:387d2c036bf02cf3a23705cc496577acdb829517</id>
<content type='text'>
    int p_can(p1, p2, operation, privused)

  which allows specification of subject process, object process,
  inter-process operation, and an optional call-by-reference privused
  flag, allowing the caller to determine if privilege was required
  for the call to succeed.  This allows jail, kern.ps_showallprocs and
  regular credential-based interaction checks to occur in one block of
  code.  Possible operations are P_CAN_SEE, P_CAN_SCHED, P_CAN_KILL,
  and P_CAN_DEBUG.  p_can currently breaks out as a wrapper to a
  series of static function checks in kern_prot, which should not
  be invoked directly.

o Commented out capabilities entries are included for some checks.

o Update most inter-process authorization to make use of p_can() instead
  of manual checks, PRISON_CHECK(), P_TRESPASS(), and
  kern.ps_showallprocs.

o Modify suser{,_xxx} to use const arguments, as it no longer modifies
  process flags due to the disabling of ASU.

o Modify some checks/errors in procfs so that ENOENT is returned instead
  of ESRCH, further improving concealment of processes that should not
  be visible to other processes.  Also introduce new access checks to
  improve hiding of processes for procfs_lookup(), procfs_getattr(),
  procfs_readdir().  Correct a bug reported by bp concerning not
  handling the CREATE case in procfs_lookup().  Remove volatile flag in
  procfs that caused apparently spurious qualifier warnigns (approved by
  bde).

o Add comment noting that ktrace() has not been updated, as its access
  control checks are different from ptrace(), whereas they should
  probably be the same.  Further discussion should happen on this topic.

Reviewed by:	bde, green, phk, freebsd-security, others
Approved by:	bde
Obtained from:	TrustedBSD Project
</content>
</entry>
</feed>
