yamt
9595f19850
wrap long lines.
2006-06-26 10:21:59 +00:00
yamt
a3b2d62857
sa_stackused, sa_setstackfree: share some common code.
2006-06-26 10:21:34 +00:00
yamt
f374633f81
remove some unnecessary casts.
2006-06-25 08:13:28 +00:00
yamt
0fca5c447b
move SA related pools to where they are used. make them static.
2006-06-25 08:12:54 +00:00
yamt
44c017beb2
sa_makeupcalls: don't leak kernel stack garbage to userland.
2006-06-25 08:12:10 +00:00
yamt
8308eb1f7a
implement kmem_zalloc.
2006-06-25 08:10:04 +00:00
yamt
23fcb7c3d3
sa_makeupcalls: cleanup usage of sae_sacopyout.
2006-06-25 08:09:10 +00:00
yamt
d038c11b60
sa_makeupcalls: simplify code and fix an sau leak on error.
2006-06-25 08:08:13 +00:00
yamt
5df39bb5be
sa_makeupcalls: don't allocate big structures on stack.
2006-06-25 08:05:36 +00:00
yamt
bc4977819f
1. implement solaris-like vmem. (still primitive, though)
...
2. implement solaris-like kmem_alloc/free api, using #1 .
(note: this implementation is backed by kernel_map, thus can't be
used from interrupt context.)
2006-06-25 08:00:01 +00:00
yamt
6108244889
remove unused M_SA.
2006-06-25 07:46:39 +00:00
mrg
8075fe8705
don't put the bpendtsleep handy breakpoint in sun2 kernels as the
...
output asm includes it twice causing multiply-defined symbols.
2006-06-24 05:23:06 +00:00
drochner
99f30cd9d2
add a comment telling which structure members are zero-initialized,
...
as requested by YAMAMOTO Takashi
2006-06-23 16:17:23 +00:00
yamt
e408053d1b
fix a simonb-timecounters regression.
...
the precision of getnanotime() is not suitable for file timestamps.
esp. when it's nfs-exported.
- introduce vfs_timestamp().
(the name is from freebsd. currently merely a wrapper of nanotime())
- for ufs-like filesystems, use it rather than getnanotime().
XXX check other filesystems.
2006-06-23 14:13:02 +00:00
drochner
9b00231778
zero-init callback_head by memset(). code is 12 bytes shorter
2006-06-21 17:16:00 +00:00
christos
ece76dd170
Don't leak memory on success. Allocate only the type of struct that we'll
...
need for efficiency.
2006-06-21 13:46:17 +00:00
yamt
300d4b1ed6
bump default so_snd.sb_lowat to increase chance to use loaning.
...
the idea to tweak the watermark from Jonathan Stone.
reviewed by Bill Studenmund.
2006-06-21 12:55:12 +00:00
christos
709b2e6f55
don't allocate too much stuff on the stack.
2006-06-20 03:20:44 +00:00
yamt
7d3142aa6a
- introduce vfs_composefh() and use it where appropriate.
...
- fix lock/unlock mismatch in sys_getfh.
2006-06-17 07:06:50 +00:00
yamt
7b37f4549b
sysctl_security_setidcorename: don't allocate MAXPATHLEN bytes on stack.
2006-06-17 06:54:58 +00:00
dyoung
5174aa84b6
The UID_MAX limit is not enforced by syscalls such as setreuid(2),
...
so I remove the assertion uid >= 0 && uid <= UID_MAX. This squashes
a bug where Quagga would panic my machine by passing a UID outside
the range [0, UID_MAX].
AFAICT, this restores the historical (pre-kauth) behavior.
It is likely that GIDs do not satisfy the assertion gid >= 0 &&
gid <= GID_MAX, so remove that, too.
Patch from elad.
2006-06-13 22:56:46 +00:00
ginsbach
d05e0bc3e8
Add EAFNOSUPPORT as a possible error if the address family is not
...
supported. This adds further differentiation between which argument to
socket(2) caused the error. No longer are invalid domain (address family)
errors classified as ENOPROTOSUPPORT errors. This should make socket(2)
conform to current POSIX and X/Open standards. Fixes PR/33676.
2006-06-13 21:19:56 +00:00
yamt
f755e9e9b8
remove unnecessary arguments from kauth_authorize_process.
...
ie. make it similar to the one found in apple TN.
2006-06-13 13:56:50 +00:00
yamt
4602c1be73
sysctl_unpcblist: don't abuse kauth_authorize_process for non-process object.
2006-06-13 13:52:39 +00:00
yamt
c1e6396657
sysctl_kern_file, sysctl_kern_file2: don't abuse kauth_authorize_process
...
for non-process objects.
2006-06-13 13:52:06 +00:00
yamt
52e88e8188
sysctl_kern_file2: fix an indent.
2006-06-13 13:23:03 +00:00
christos
67894004ec
Don't allocate > 2K on the stack.
2006-06-12 01:25:05 +00:00
christos
c0160ad4aa
don't allocate statvfs on the stack.
2006-06-12 00:22:47 +00:00
christos
1214d130c2
Always make partitions contiguous even if the mbr has gaps. From someone
...
who wants to remain anonymous.
2006-06-11 23:25:23 +00:00
rjs
4ba88d2489
Add includes of opt_multiprocessor.h and opt_lockdebug.h where missing.
2006-06-11 07:32:18 +00:00
kardel
54cd6fafa8
re-order initialization sequence to have real counters available during autoconfig
2006-06-09 22:47:56 +00:00
drochner
698fb4fb6c
make the public declaration of "hardclock_ticks" signed again; other
...
code (kernel timeout/callout) does comparisions with it
2006-06-08 17:23:11 +00:00
kardel
de4337ab21
merge FreeBSD timecounters from branch simonb-timecounters
...
- struct timeval time is gone
time.tv_sec -> time_second
- struct timeval mono_time is gone
mono_time.tv_sec -> time_uptime
- access to time via
{get,}{micro,nano,bin}time()
get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-06-07 22:33:33 +00:00
christos
65a5eb3712
Grr, change the code so that it compiles with gcc-3. It was ok with gcc-4.
2006-06-04 16:44:08 +00:00
christos
95e13e63bd
Introduce SA_NOKERNINFO, a flag for SIGINFO not to print kernel messages.
2006-06-03 18:18:26 +00:00
drochner
ad909cf73e
export ntp_gettime() and ntp_timestatus(), for use by compat code
2006-05-29 16:43:05 +00:00
drochner
4f2e2f7d77
regen
2006-05-29 09:58:51 +00:00
drochner
42a3bd3098
Extend "struct ntptimeval" for the needs of "timecounters".
...
Allocate a new syscall for ntp_gettime() and set up COMPAT_30 for
the old one.
2006-05-29 09:57:54 +00:00
yamt
07ddfaead3
systrace_seteuid, systrace_setegid:
...
fix bugs in kauth change. don't forget to update p_cred.
2006-05-28 07:08:41 +00:00
yamt
04c3beb7b1
make some internal variables static.
2006-05-28 06:52:17 +00:00
yamt
b7da9130d1
remove kauth_cred_destroy, which isn't used anymore. ok'ed by Elad Efrat.
2006-05-28 06:49:27 +00:00
simonb
e78022e1d6
Limit the size of any kernel buffers allocated by the VOP_READDIR
...
routines to MAXBSIZE.
2006-05-27 23:46:49 +00:00
yamt
4e9ca7aa01
callback_head_init: don't forget to initialize ch_running and ch_flags.
...
fix a problem reported by Jeff Rizzo on tech-kern@.
2006-05-27 07:42:42 +00:00
yamt
c24f70bcad
move wait points for kva from upper layers to vm_map. PR/33185 #1 .
...
XXX there is a concern about interaction with kva fragmentation.
see: http://mail-index.NetBSD.org/tech-kern/2006/05/11/0000.html
2006-05-25 14:27:28 +00:00
yamt
67c564ace6
sa_upcall_userret: yield cpu on stack starvation so that it's
...
killable at least. PR/28612 from ITOH Yasufumi.
2006-05-25 14:13:29 +00:00
blymn
3018e35533
Add kauth header for function prototypes
...
Whitespace clean up.
2006-05-25 11:23:11 +00:00
yamt
a53726f2a7
kauth_cred_uucmp: fix inversed return code. PR/33546 from Juan RP.
2006-05-24 23:00:49 +00:00
yamt
be46b8e46c
KNF. wrap a long line.
2006-05-23 00:43:30 +00:00
yamt
1075c99d89
introduce macros, UAREA_TO_USER and USER_TO_UAREA,
...
to convert uarea VA into a pointer to struct user and vice versa,
so that MD code can change the layout in uarea.
2006-05-22 13:43:54 +00:00
yamt
b43dc97b09
use consistent order of function specifiers and type specifiers.
...
(int inline -> inline int)
2006-05-22 12:42:01 +00:00