Commit Graph

4793 Commits

Author SHA1 Message Date
martin
5581630d1f Add <sys/lock.h> include for <sys/callback.h> 2006-08-21 09:06:06 +00:00
martin
b87950a9f6 Use %zu for size_t 2006-08-21 09:05:22 +00:00
christos
cba8e50f44 From Elad:
Attached diff short-circuits kauth_authorize_action() if the request
comes from the kernel (NOCRED or FSCRED).

okay matt@
2006-08-20 15:05:14 +00:00
yamt
f3d146fd88 vmf_to_prf: tweak code to avoid a "may be used uninitialized" warning.
pointed by Kurt Schreiner.
2006-08-20 13:14:03 +00:00
yamt
4e59653466 move kmem_kva_reclaim_callback out of #ifdef DEBUG.
fixes compilation problem in the case of !DEBUG.
pointed by Kurt Schreiner.
2006-08-20 13:08:11 +00:00
blymn
50abf3c730 Add functions to the fileassoc interface to allow a "hint" to be provided
instead of performing an implicit VOP_GETATTR() when adding/looking up
fileassoc entries.
2006-08-20 10:38:23 +00:00
yamt
0406a06106 implement kva reclamation for kmem_alloc quantum cache. 2006-08-20 09:45:59 +00:00
yamt
fc12b34a0a kmem_init: use vmem quantum cache. XXX needs tune. 2006-08-20 09:44:06 +00:00
yamt
c8cdcde4de implement vmem quantum cache. 2006-08-20 09:43:08 +00:00
yamt
3c433fc395 implement PR_NOALIGN. (allow unaligned pages)
to be used by vmem quantum cache.
2006-08-20 09:35:25 +00:00
yamt
8f01bd288f pool_init: in the case of PR_NOTOUCH, don't bump item size to
sizeof(struct pool_item).
2006-08-19 14:01:15 +00:00
christos
35ca6c8b5b Fix all the -D*DEBUG* code that it was rotting away and did not even compile.
Mostly from Arnaud Lacombe, many thanks!
2006-08-17 17:11:27 +00:00
plunky
d9b3621e66 Fix broken comments - there is no SO_ISCONNECTED or SO_ISCONFIRMING
this fixes kern/32058
2006-08-16 18:31:54 +00:00
plunky
b54ec7d631 Remove macro call sonewconn() => sonewconn1() as it is no longer necessary.
There are no such calls and the compiler would catch mistakes like this
in any case.
2006-08-16 18:17:23 +00:00
christos
c07e49883f Pretending to be Elad's keyboard:
Attached diff let's call kauth_register_scope() with a NULL default
listener. from tn2127:

"callback is the address of the listener callback function for this
scope; this becomes the scope's default listener. This parameter may be
NULL, in which case a callback that always returns KAUTH_RESULT_DEFER is
assumed."
2006-08-16 17:57:26 +00:00
yamt
c777d5404f - fix integer overflows.
- bump VMEM_MAXORDER.

should fix "idx < VMEM_MAXORDER" assertion failure reported by
Martijn van Buul on current-users@.
2006-08-16 13:19:03 +00:00
ad
87dd042f7a sys__lwp_create: put newuc back to the pool on failure. 2006-08-14 14:11:21 +00:00
xtraeme
dfa8fac821 Add __KERNEL_RCSID() 2006-08-13 06:21:10 +00:00
christos
0b7fa73e66 fix a stray \n 2006-08-12 21:46:03 +00:00
christos
adddcaa6ee Fix the dump printing too. 2006-08-12 20:27:35 +00:00
christos
f7cf5ff3b4 Only print the partition letter if the device supports partitions. 2006-08-12 19:58:55 +00:00
christos
ce0ef6cfc4 Pretending to be Elad's keyboard:
fileassoc.diff adds a fileassoc_table_run() routine that allows you to
pass a callback to be called with every entry on a given mount.

veriexec.diff adds some raw device access policies: if raw disk is
opened at strict level 1, all fingerprints on this disk will be
invalidated as a safety measure. level 2 will not allow opening disk
for raw writing if we monitor it, and prevent raw writes to memory.
level 3 will not allow opening any disk for raw writing.

both update all relevant documentation.

veriexec concept is okay blymn@.
2006-08-11 19:17:47 +00:00
pavel
fd456db2e7 MCLAIM the correct mbuf. PR kern/34162. 2006-08-08 15:53:40 +00:00
yamt
56d02ae53a vfs_copyinfh_alloc: kludge for nfsv2 file handles. 2006-08-08 13:08:08 +00:00
bjh21
47ef6bac03 Using humanize_number() on clock speeds does more harm than good, and
precious little of either.  Go back to displaying them with all their digits.
2006-08-06 13:29:42 +00:00
bjh21
fc39059504 Clock frequencies tend to be big numbers -- use humanize_number() when
displaying them through printf.
2006-08-05 21:59:40 +00:00
yamt
ac0b9042bb sys___fhstatvfs140: update a comment. 2006-08-04 17:07:32 +00:00
yamt
4977b4bbc0 some filehandle syscall related changes.
- remove the support of variable-sized filehandle from compat version of
  syscalls.  (strictly speaking, it breaks abi.  i don't think it's a problem
  because this feature is short-lived and there are no affected in-tree
  filesystems.)
- unify vfs_copyinfh_alloc and vfs_copyinfh_alloc_size.
- vfs_copyinfh_alloc_size: check fhsize strictly.
- reduce code duplication between compat and current syscalls.
2006-08-04 16:29:51 +00:00
yamt
e99f3cca81 vfs_copyinfh_alloc_size: fix indent. 2006-08-04 13:31:51 +00:00
christos
cf3258890d PR/34129: Andreas Gustafsson: Nonblocking write to pty can return 0
If we cannot write on the slave side, always return EWOULDBLOCK in the
non-blocking case, because we don't know that the buffer we started
writing is actually in a system call boundary.
2006-08-03 22:51:05 +00:00
christos
740d87bac5 adjust resid in one more place. 2006-08-03 22:06:55 +00:00
christos
75300d10c2 don't drop characters that we've copied in when we block. 2006-08-03 22:03:18 +00:00
martin
b4cb63a646 Make filehandles opaque to userland 2006-07-31 16:34:42 +00:00
martin
f956f13e21 Step 1 to make filehandles completely opaque to userland 2006-07-31 16:32:51 +00:00
ad
a0c8510a86 Single-thread updates to the process credential. 2006-07-30 21:58:11 +00:00
elad
5446ee0ef6 ugh.. more stuff that's overdue and should not be in 4.0: remove the
sysctl(9) flags CTLFLAG_READONLY[12]. luckily they're not documented
so it's only half regression.

only two knobs used them; proc.curproc.corename (check added in the
existing handler; its CTLFLAG_ANYWRITE, yay) and net.inet.ip.forwsrcrt,
that got its own handler now too.
2006-07-30 17:38:19 +00:00
christos
3358c957a3 PR/34094: Jorge Acereda: Kernel option KSTACK_CHECK_MAGIC doesn't build 2006-07-27 00:04:08 +00:00
elad
14171f6143 make the sleepable assertion in #if 0 (with commented out LOCKDEBUG for
later) until we sort that stuff out.
2006-07-26 17:13:26 +00:00
elad
ebdd7412b5 sync kpi with docs, remove old comments 2006-07-26 16:34:07 +00:00
elad
22e1a583a2 fix logic in veriexec_report() 2006-07-26 15:14:24 +00:00
dogcow
c959b3c4bd at the request of elad, as veriexec.h has returned, revert the changes
from 2006-07-25.
2006-07-26 09:33:57 +00:00
dogcow
cc44d2fe07 mechanically go through and
s,include "veriexec.h",include <sys/verified_exec.h>,
as the former has apparently gone away.
2006-07-25 00:23:06 +00:00
elad
05eb39fb84 replace magic numbers for strict levels (0-3) with defines. 2006-07-24 21:32:39 +00:00
elad
32e391d158 finally do things properly. veriexec_report() takes flags, not three ints. 2006-07-24 21:15:05 +00:00
elad
5d611badde some fixes:
- adapt to NVERIEXEC in init_sysctl.c.
  - we now need "veriexec.h" for NVERIEXEC.
  - "opt_verified_exec.h" -> "opt_veriexec.h", and include it only where
    it is needed.
2006-07-24 16:37:28 +00:00
elad
93a2eaef51 prevent removal of monitored files as early as ids mode.
okay blymn@
2006-07-24 16:27:15 +00:00
ad
f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
elad
e2706baefd kill a VOP_GETATTR() we don't need for veriexec. 2006-07-22 10:40:49 +00:00
elad
a92c1615a4 deprecate the VERIFIED_EXEC option; now we only need the pseudo-device to
enable it. while here, some config file tweaks.

tons of input from cube@ (thanks!) and okay blymn@.
2006-07-22 10:34:26 +00:00
elad
7e7591e119 if LOCKDEBUG, assert that we can sleep in kauth_authorize_action().
discussed with yamt@ on tech-kern.
2006-07-22 09:24:25 +00:00