Alexander Leidinger
28638377ad
- change if (cond) panic() to KASSERT.
...
- Dont forget to free em in a case of error.
Suggested by: ssouhlal
Submitted by: rdivacky
Tested with: LTP
2006-10-08 17:10:34 +00:00
Alexander Leidinger
7660ace19c
- Replace homegrown check for FIFO with S_ISFIFO. [1]
...
- Check the status of the options before messing with it.
Inspired by: NetBSD [1]
Submitted by: rdivacky
Tested with: LTP
2006-10-08 17:08:27 +00:00
Alexander Leidinger
236e97b2b2
Implement /proc/sys/kernel/pid_max.
...
Submitted by: rdivacky
Tested with: LTP
2006-10-08 16:55:27 +00:00
David Xu
295426f4c5
Regenerate.
2006-10-06 08:24:37 +00:00
David Xu
ae7d8a6766
Implement 32bit umtx_lock and umtx_unlock system calls, these two system
...
calls are not used by libthr in RELENG_6 and HEAD, it is only used by
the libthr in RELENG-5, the _umtx_op system call can do more incremental
dirty works than these two system calls without having to introduce new
system calls or throw away old system calls when things are going on.
2006-10-06 08:22:08 +00:00
David Xu
312a0e5f06
Regenerate.
2006-10-05 01:58:57 +00:00
David Xu
e6e7f16cb4
Oops, add the missing file.
2006-10-05 01:58:08 +00:00
David Xu
c6511aea86
Move some declaration of 32-bit signal structures into file
...
freebsd32-signal.h, implement sigtimedwait and sigwaitinfo system calls.
2006-10-05 01:56:11 +00:00
Robert Watson
531147aa3e
Regenerate.
2006-10-03 20:48:11 +00:00
Robert Watson
dfb041ca62
Change getpagesize() system call audit event to more clearly indicate
...
that we don't audit it.
MFC after: 3 days
Obtained from: TrustedBSD Project
2006-10-03 20:48:03 +00:00
Poul-Henning Kamp
f645b0b51c
First part of a little cleanup in the calendar/timezone/RTC handling.
...
Move relevant variables to <sys/clock.h> and fix #includes as necessary.
Use libkern's much more time- & spamce-efficient BCD routines.
2006-10-02 12:59:59 +00:00
Alexander Leidinger
d4b7423fa1
MFp4:
...
- Linux returns ENOPROTOOPT in a case of not supported opt to setsockopt.
- Return EISDIR in pread() when arg is a directory.
- Return EINVAL instead of EFAULT when namelen is not correct in accept().
- Return EINVAL instead of EACCESS if invalid access mode is entered in
access().
- Return EINVAL instead of EADDRNOTAVAIL in a case of bad salen param
to bind().
Submitted by: rdivacky
Tested with: LTP (vfork01 fails now, but it seems to be a race and
not caused by those changes)
MFC after: 1 week
2006-09-23 19:06:54 +00:00
David Xu
4af4fcb71a
Regenerate.
2006-09-23 00:27:53 +00:00
David Xu
5c26f4cea8
Enable sigwait.
2006-09-23 00:27:11 +00:00
David Xu
ac3674aa52
Regenerate.
2006-09-22 15:05:34 +00:00
David Xu
cda9a0d1c2
Add compatible code to let 32bit libthr work on 64bit kernel.
2006-09-22 15:04:28 +00:00
David Xu
27bbb2e71f
Regenerate.
2006-09-22 00:53:43 +00:00
David Xu
1eec02f538
Add umtx support for 32bit process on AMD64 machine.
2006-09-22 00:52:54 +00:00
David Xu
ecc313475b
Regenerate.
2006-09-21 04:50:38 +00:00
David Xu
47bd78d24d
sync with master.
2006-09-21 04:49:36 +00:00
Robert Watson
da7cbdc2b3
Regenerate.
2006-09-17 13:29:36 +00:00
Robert Watson
6c2d307a0e
AUE_SIGALTSTACK instead of AUE_SIGPENDING for sigaltstack().
...
Obtained from: TrustedBSD Project
MFC after: 3 days
2006-09-17 13:28:11 +00:00
Alexander Leidinger
18f81b3dfa
- don't reboot() when feed with wrong parameters (and enough permissions) [1]
...
- add support to power off the system [2]
- check the linux magic values [3]
Submitted by: Marcin Cieslak <saper@SYSTEM.PL> [1,2]
Modelled after: linux man page of the reboot() syscall [3]
Found by: LTP testcase "reboot02" [1]
Tested with: LTP testcase "reboot02" [1,3]
MFC after: 1 week
2006-09-16 14:12:04 +00:00
Alexander Leidinger
db0d964062
The Linux unlink syscall uses a different errno value when trying to unlink
...
a directory.
PR: 102897 [1]
Noticed by: Knut Anders Hatlen <kahatlen@gmail.com>, testrun with LTP [1]
Submitted by: Marcin Cieslak <saper@SYSTEM.PL>
Tested by: netchild (LTP test run)
2006-09-10 13:47:56 +00:00
Alexander Leidinger
8618fd85a3
- Extend the coverage of PROC_LOCK to cover wakeup(&p->p_emuldata);
...
- Lock the emuldata in a case when we just created it.
Sponsored by: Google SoC 2006
Submitted by: rdivacky
Suggested by: jhb
2006-09-09 16:55:55 +00:00
Alexander Leidinger
bb59e63f8f
Change futex lock from mutex to sx. Make futex_get atomic (protected by the
...
futex lock).
Sponsored by: Google SoC 2006
Submitted by: rdivacky
Suggested by: jhb
2006-09-09 16:25:25 +00:00
Alexander Leidinger
c19ddeda07
- don't wake every sleeper just the first one [1]
...
- remove debuging printf [2]
Submitted by: intron <mag@intron.ac> [1], rdivacky [2]
2006-09-09 13:04:28 +00:00
David Xu
c0ba6c1783
The following functions need not to be reimplemented, reuse 64bit
...
syscalls instead:
sigqueue, thr_set_name, thr_setscheduler, thr_getscheduler,
thr_setschedparam.
2006-09-09 01:22:13 +00:00
Robert Watson
e482025ebd
Regenerate.
2006-09-03 16:24:36 +00:00
Robert Watson
e8a6d7e554
Set freebsd32 system call event identifiers for:
...
- old truncate, ftruncate
- old getpeername, gethostid, sethostid, getrlimit, setrlimit, killpg.
- old quota, getsockname, getdirentries.
- lgetfh
- old getdomainname, setdomainname
- sysarch, rtprio, __getcwd, jail, sigtimedwait
- extattrctl, extattr_{get,set,delete,list}_{file,fd,link}
- getresgid, getresuid, kqueue, eaccess, nmount, sendfile
- fhstatfs, kldunloadf
Right identifiers for:
- nfssvc
Remove incorrect identifier for:
- __acl_get_file
Compile tested with help of: sam
Obtained from: TrustedBSD Project
2006-09-03 16:17:49 +00:00
Robert Watson
8075da7e8b
Regenerate. Looks like someone missed doing this previously as more than
...
just the audit event change appears in the diff.
2006-09-03 13:47:52 +00:00
Robert Watson
1b25e5f3c4
Use AUE_NTP_ADJTIME instead of AUE_ADJTIME for ntp_adjtime().
...
Obtained from: TrustedBSD Project
2006-09-03 13:47:24 +00:00
Robert Watson
0ee913128d
Remove two hypothetical calls to suser() in ifdef'd (and uncompilable)
...
svr4 code: this code would call centralized sysctl code that does
these checks also.
MFC after: 1 week
Obtained from: TrustedBSD Project
Sponsored by: nCircle Network Security, Inc.
2006-09-02 08:18:22 +00:00
Suleiman Souhlal
c67e0cc9e7
FREE -> free
...
Submitted by: rdivacky
2006-08-28 13:52:27 +00:00
Alexander Leidinger
835e506190
Add the linux statfs64 call. This allows Tivoli backup to proceed a little
...
but further on -current (still not successful, but a step into the right
direction).
Sponsored by: Google SoC 2006
Submitted by: rdivacky
Tested by: Paul Mather <paul@gromit.dlib.vt.edu>
2006-08-27 08:56:54 +00:00
Alexander Leidinger
84ed9f91d8
Correct the number of retries in a futex_wake() call.
...
Sponsored by: Google SoC 2006
Submitted by: rdivacky
2006-08-26 10:36:16 +00:00
Robert Watson
3e8df637c0
Don't call suser_cred() directly from linux_sethostname(), as it just
...
wraps userland_sysctl(), which performs necessary privilege checks as
part of its normal operation.
MFC after: 1 week
2006-08-25 11:02:42 +00:00
Alexander Leidinger
1a28c0df09
Sync the MI parts for amd64 with i386 and remove the corresponding special
...
handling for amd64 in the common code. The MD parts for amd64 are still
outstanding, but at least this fixes some panics on amd64.
Sponsored by: Google SoC 2006
Submitted by: rdivacky
Tested by: bsam
2006-08-20 13:50:27 +00:00
Alexander Leidinger
29ddc19bbf
Get rid of some nested includes.
...
Sponsored by: Google SoC 2006
Submitted by: rdivacky
Noticed by: jhb
2006-08-19 15:13:01 +00:00
Suleiman Souhlal
5342db0872
MALLOC -> malloc and FREE -> free
...
Submitted by: rdivacky
Pointed out by: jhb
2006-08-19 11:54:19 +00:00
Suleiman Souhlal
b273d5aa72
ifdef DEBUG a printf
...
Submitted by: rdivacky
2006-08-19 11:07:22 +00:00
Warner Losh
1a3c917f9d
while (0); -> while (0) in multi-line macros
2006-08-17 22:50:33 +00:00
Alexander Leidinger
590e3a06e8
- disable some more code when osrelease=2.4.2
...
- protect td->td_proc->p_pid with the proc lock in linux_getpid
in the amd64 (= non i386) case [1]
Sponsored by: Google SoC 2006
Submitted by: rdivacky
Noticed by: netchild [1]
2006-08-17 21:21:30 +00:00
Alexander Leidinger
94cb2ecf79
Move some stuff into headers where they belong.
...
Sponsored by: Google SoC 2006
Submitted by: rdivacky
Noticed by: jhb, ssouhlal
2006-08-17 21:06:48 +00:00
Alexander Leidinger
9b0bcbfbda
Fix the DEBUG build:
...
- linux_emul.c [1]
- linux_futex.c [2]
Sponsored by: Google SoC 2006 [1]
Submitted by: rdivacky [1]
netchild [2]
2006-08-17 09:50:30 +00:00
Peter Wemm
bad9a7a5f9
Grab two syscall numbers. One is used to emulate functionality that linux
...
has in its procfs (do a readlink of /proc/self/fd/<nn> to find the pathname
that corresponds to a given file descriptor). Valgrind-3.x needs this
functionality. This is a placeholder only at this time.
2006-08-16 22:32:50 +00:00
Alexander Leidinger
0eef2f8a4e
Style fixes to comments.
...
Sponsored by: Google SoC 2006
Submitted by: rdivacky
Noticed by: jhb, ssouhlal
2006-08-16 18:54:51 +00:00
Jung-uk Kim
a88d050dfc
Include sys/limits.h for INT_MAX. freebsd32_proto.h 1.58 does not include
...
sys/umtx.h any more and previously it was included from there.
2006-08-16 00:02:36 +00:00
John Baldwin
f8f1f7fb85
Regen to propogate <prefix>_AUE_<mumble> changes as well as the earlier
...
systrace changes.
2006-08-15 17:37:01 +00:00
John Baldwin
df78f6d313
- Remove unused sysvec variables from various syscalls.conf.
...
- Send the systrace_args files for all the compat ABIs to /dev/null for
now. Right now makesyscalls.sh generates a file with a hardcoded
function name, so it wouldn't work for any of the ABIs anyway. Probably
the function name should be configurable via a 'systracename' variable
and the functions should be stored in a function pointer in the sysvec
structure.
2006-08-15 17:25:55 +00:00