No description
Find a file
David van Moolenbroek c51cd5fe91 Server/driver protocols: no longer allow third-party copies.
Before safecopies, the IO_ENDPT and DL_ENDPT message fields were needed
to know which actual process to copy data from/to, as that process may
not always be the caller. Now that we have full safecopy support, these
fields have become useless for that purpose: the owner of the grant is
*always* the caller. Allowing the caller to supply another endpoint is
in fact dangerous, because the callee may then end up using a grant
from a third party. One could call this a variant of the confused
deputy problem.

From now on, safecopy calls should always use the caller's endpoint as
grant owner. This fully obsoletes the DL_ENDPT field in the
inet/ethernet protocol. IO_ENDPT has other uses besides identifying the
grant owner though. This patch renames IO_ENDPT to USER_ENDPT, not only
because that is a more fitting name (it should never be used for I/O
after all), but also in order to intentionally break any old system
source code outside the base system. If this patch breaks your code,
fixing it is fairly simple:

- DL_ENDPT should be replaced with m_source;
- IO_ENDPT should be replaced with m_source when used for safecopies;
- IO_ENDPT should be replaced with USER_ENDPT for any other use, e.g.
  when setting REP_ENDPT, matching requests in CANCEL calls, getting
  DEV_SELECT flags, and retrieving of the real user process's endpoint
  in DEV_OPEN.

The changes in this patch are binary backward compatible.
2011-04-11 17:35:05 +00:00
benchmarks Fixed unixbench Run script 2010-10-25 08:32:14 +00:00
boot csu/build support for ELF 2010-12-10 22:20:12 +00:00
commands LWIP - dhcpd --lwip 2011-04-07 07:44:17 +00:00
common Server/driver protocols: no longer allow third-party copies. 2011-04-11 17:35:05 +00:00
docs Update docs/UPDATING 2011-02-26 23:01:27 +00:00
drivers Server/driver protocols: no longer allow third-party copies. 2011-04-11 17:35:05 +00:00
etc LWIP - scripts 2011-04-07 07:44:23 +00:00
include Move back resolv.h, nameser.h and netdb.h as they conflict with NetBSD headers and libc. 2011-04-08 18:50:58 +00:00
kernel Server/driver protocols: no longer allow third-party copies. 2011-04-11 17:35:05 +00:00
lib Server/driver protocols: no longer allow third-party copies. 2011-04-11 17:35:05 +00:00
man remove fsck1 altogether 2010-12-21 11:00:13 +00:00
nbsd_include [NBSD libc] Various fixes. 2011-04-06 15:59:10 +00:00
servers Server/driver protocols: no longer allow third-party copies. 2011-04-11 17:35:05 +00:00
share mk scripts: add flag for compiling with nbsd libc. 2011-03-03 16:41:19 +00:00
test - Refactor mthread structure fields to prevent name clashes 2011-03-18 10:29:54 +00:00
tools release.sh: explicitly use the pkgin pkg_install pkg_add 2011-03-10 12:54:58 +00:00
.gitignore revert r8783, as those entries are auto-generated now 2010-11-17 14:29:32 +00:00
LICENSE Fix parameter parsing in cut 2010-01-21 10:16:05 +00:00
Makefile add clean clang libraries target 2011-02-21 16:07:22 +00:00