1123 Commits

Author SHA1 Message Date
netchild
cba8561b2d Really commit the TIOCGPTN part (missing in the previous commit...). 2007-09-03 13:55:05 +00:00
netchild
68fcd79292 MFC:
- sync linuxulator:
   * de-COMPAT_43-ify:
     + socket related ioctl's
     This differs from -current, as the kernel ABI is different
     (kern_bind() and kern_connect() free the struct sockaddr on -stable
     themself, so two calls to free() are not included in this MFC).
   * bug-/compatibility-fixes
   * ioctl TIOCGPTN
   * 1 style(9)-fix

Tested by:	"Arno J. Klaassen" <arno@heho.snv.jussieu.fr>
2007-09-03 13:18:42 +00:00
netchild
5a60814e56 MFC:
- sync linuxulator:
   * add syscalls:
     + stat            (i386, amd64)
     + iopl            (i386, amd64)
     + mprotect        (i386)
     + rt_sigpending   (i386)
     + rt_sigtimedwait (i386)
     + statfs64        (i386, amd64)
     + utimes          (i386, amd64)
     + settimeofday    (amd64)
     + clock_*         (i386, amd64)
   * de-COMPAT_43-ify:
     + sethostname
     + lstat
     + ftruncate
     + nanosleep (i386)
   * add more dummy syscalls so that we know what is needed

Tested by:	bsam (on i386/amd64 with LTP 20070630)
2007-08-29 15:04:26 +00:00
netchild
ae2249d960 MFC (5 of X):
- linuxulator mmap handling
 - memleak fixes
 - extend linux errno mapping
 - handle address space limits for linux processes
 - sync linprocfs (/proc/sys/... part)

Compile tested by:	scf (i386, as part of a mega-MFC-patch)
Tested by:		Arno J. Klaassen <arno@heho.snv.jussieu.fr> (amd64)
2007-07-08 12:20:36 +00:00
netchild
962e1e6836 MFC (4 of X):
- don't limit number of syscalls to 255
 - handle more socket options
 - bug-/compatibility-fixes to linux
   * file related (includes fixes which prevent creation of strange files
     which can only be removed with a fsck)
   * make ping work
   * ...
 - add devfs to the file system type handling/translation

Compile tested by:	scf (i386, as part of a mega-MFC-patch)
Tested by:		Arno J. Klaassen <arno@heho.snv.jussieu.fr> (amd64)
2007-07-08 09:04:44 +00:00
netchild
b6ba7285b9 MFC (2 of X):
- some linuxulator style(9) fixes
 - add datatypes and definitions in preparation of further commits
 - use one (l_sigval) of the new datatypes on amd64 and get rid of a now unused
   include (this may or may not fix some signal handling issues on amd64) [1]
 - convert some unconditional debug handling into the common linuxulator way
 - use some more appropriate format string types in some debug printf's
 - convert signal validation into a macro

Except for [1] on amd64 there is no visible change to a normal user.

Tested by:	scf (i386), Arno J. Klaassen <arno@heho.snv.jussieu.fr> (amd64)
2007-07-08 08:41:09 +00:00
netchild
34d21d2a2c MFC (1 of X):
- easy linuxulator style(9) fixes (easy = hand removal of non-style code
   change sections in a full diff)

Tested by:	scf (i386), Arno J. Klaassen <arno@heho.snv.jussieu.fr> (amd64)
2007-07-08 08:26:10 +00:00
jhb
2567006b2f Regen. 2007-06-18 22:45:41 +00:00
jhb
9d52499b7d MFC: Support for running 32-bit multithreaded binaries using libthr on
amd64 including:
- Add 32-bit wrappers for thr_new(), thr_suspend(), and the umtx system
  calls.
- Add support to amd64 for constructing thread upcalls for 32-bit
  processes.
- Leave %fs and %gs alone in the signal trampoline for 32-bit processes on
  amd64.
- Add 'casuword32()' to amd64 and ia64.

Tested by:	emaste
2007-06-18 22:44:59 +00:00
jhb
3464b119cd MFC: Rework the support used by ABIs to override resource limits so that
a 64-bit process exec'd by a 32-bit process doesn't end up with 32-bit
limits.

This doesn't break the ABI as neither of the 32-bit ABIs (COMPAT_LINUX32
and COMPAT_IA32) are buildable as modules on 6.x/amd64 and none of the
other ABIs use this hook.
2007-05-23 18:24:43 +00:00
sobomax
c13177e47b Regen after addition of 32bit versons of getcontext, setcontext and
swapcontext.
2007-05-03 11:18:44 +00:00
sobomax
9c8e38c33f MFC: Implement 32 bit getcontext/setcontext/swapcontext on amd64. Still
stubs for ia64 to keep it compiling.  These are used by 32 bit apps such
as gdb.
2007-05-03 11:13:58 +00:00
scottl
7964da46d3 MFC the scsi_sg driver. 2007-04-10 21:44:17 +00:00
sam
b6c9f6e18e MFC 1.88: add entry points required by newer broadcom wireless driver 2007-01-26 06:45:33 +00:00
cvs2svn
472436dd42 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2006-12-20 22:02:46 +00:00
rwatson
0f36beeeca Regenerate.
Approved by:	re (kensmith, hrs) (implicit)
2006-10-28 19:50:00 +00:00
rwatson
23d41d37d7 Remove accidental change to comment.
Spotted by:	ru
Approved by:	re (kensmith, hrs) (implicit)
2006-10-28 19:49:05 +00:00
rwatson
431e9d9dca Regenerate.
Approved by:	re (hrs, kensmith)
2006-10-28 19:43:01 +00:00
rwatson
ab8b427684 Merge syscalls.master:1.84,1.85 from HEAD to RELENG_6:
Hook up audit functions in the freebsd32 compatibility code.  It is
  believed these likely don't require wrappers.

Include's sobomax's compile fix.

Requested by:	sobomax
Approved by:	re (kensmith, hrs)
2006-10-28 17:38:54 +00:00
rwatson
294b74c263 Regenerate with new FreeBSD ID numbers (previous commit of regenerated
versions was in error).

Approved by:	re (kensmith)
2006-10-10 13:22:05 +00:00
rwatson
7d19304f8d Merge syscalls.masteR:1.80 from HEAD to RELENG_6:
Change getpagesize() system call audit event to more clearly indicate
  that we don't audit it.

  Obtained from:  TrustedBSD Project

Approved by:	re (kensmith)
2006-10-10 13:20:49 +00:00
netchild
519d8f6986 MFC rev. 1.187:
- 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]

Approved by:	re (hrs)
2006-09-23 10:36:57 +00:00
rwatson
1066621c1b Regenerate.
Approved by:	re (mux)
2006-09-21 14:06:49 +00:00
rwatson
febee44a8d Merge audit event assignments for 32-bit FreeBSD binary compatibility
from HEAD to RELENG_6: syscalls.master:1.63, 1.72, 1.73, 1.75.  With
this change, 6.x 32-bit binary compatibility will also generate system
call audit events.

Approved by:	re (mux)
2006-09-21 14:06:19 +00:00
netchild
64e48c48e3 MFC rev 1.97:
The Linux unlink syscall uses a different errno value when trying to unlink
a directory.

PR:		102897 [1]  http://www.FreeBSD.org/cgi/query-pr.cgi?pr=102897
Noticed by:	Knut Anders Hatlen <kahatlen@gmail.com> [1], testrun with LTP
Submitted by:	Marcin Cieslak <saper@SYSTEM.PL>
Tested by:	netchild (LTP test run)
Approved by:	re
2006-09-17 10:56:15 +00:00
kib
9661839ddf MFC rev. 1.97:
Lock the vnode around the call to VOP_GETATTR. Move the locked code
and vn_fullpath (that call malloc(..., M_WAITOK)) from under the
vm object lock, since sleep is not allowed while holding the mutex.

Being there, wrap VOP_GETATTR call with conditional Giant aquire.
Currently this is (almost) noop because pseudofs is Giant-locked.

Approved by:	pjd (mentor)
2006-08-22 11:04:01 +00:00
markm
d1187d8c29 MFC: MAINTAINER status quo 2006-07-09 15:38:31 +00:00
netchild
59692ae939 MFC:
- linux_misc.c 1.179
  Don't copyout/do unneccesary work if the buffer is a NULL pointer.

  Noticed by:     Dmitry Ganenko <dima@apk-inform.com>
  Reviewed by:    rdivacky (the original version as in emulation@)

- linprocfs.c 1.96:
  Improve linprovfs to provide/fix the
   - process state (idle, sleeping, running, ...) [1]
   - the process group ID of the process which owns the connected tty
   - some page fault stats
   - time spend in kernel/userland
   - priority/nice value
   - starttime [1]
   - memory/swap stats
   - scheduling policy

  Additionally add some new fields and correct some not filled out ones.

  This brings us down to 15 dummy fields.

  The fields marked with [1] are needed to get Oracle 10 running. The starttime
  field is not completely right, since it displays the _same_ starttime for
  _every_ process, but at least it is not 0 and Oracle accepts this.

  Noticed by:     Dmitry Ganenko <dima@apk-inform.com> [1]
  Reviewed by:    des, rdivacky

- pseudofs_vnops.c 1.60:
  Correctly calculate a buffer length. It was off by one so a read() returned
  one byte less than needed.

  Noticed by:     Dmitry Ganenko <dima@apk-inform.com>
  Testcase by:    Dmitry Ganenko <dima@apk-inform.com>
  Reviewed by:    des
  Submitted by:   rdivacky
  Sponsored by:   Google SoC 2006

All of those are needed for Oracle 10. Since previous Oracle versions work
just fine without those fixes, these patches can be seen as regression fixes
too. Because of this I think they are a RELENG_6_x candidate (MFC reminder
set).

MFC after:	1 month
2006-07-08 14:06:56 +00:00
des
3a5046ed40 MFC: (1.95) add the model name. 2006-07-03 06:38:53 +00:00
ps
41639f5e01 MFC: rev 1.55
Do not copy out the iovec in the 32bit recvmsg call since soreceive
calls uiomove directly.
2006-06-21 16:18:48 +00:00
ambrisko
a2a15d9794 Forgot to bring this fix into my commit tree to include opt_compat.h.
This should unbreak the amd64 build.
2006-06-15 19:08:03 +00:00
ambrisko
6ebd888016 MFC the enhancements to the Linux emulation layer so the MegaRAID SAS
management tools can work.  This is not totally connected to the build
yet.  The mfi(4) change have not been MFC'ed yet.  This will be done
shortly.  I'm trying to do this in chunks so I don't totally break
the build on a missed commit.  This has passed make universe a while
ago:
  Enhance the Linux emulation layer to make MegaRAID SAS managements tool happy.
  Add back in a scheme to emulate old type major/minor numbers via hooks into
  stat, linprocfs to return major/minors that Linux app's expect.  Currently
  only /dev/null is always registered.  Drivers can register via the Linux
  type shim similar to the ioctl shim but by using
  linux_device_register_handler/linux_device_unregister_handler functions.
  The structure is:

    struct linux_device_handler {
        char    *bsd_driver_name;
        char    *linux_driver_name;
        char    *bsd_device_name;
        char    *linux_device_name;
        int     linux_major;
        int     linux_minor;
        int     linux_char_device;
    };

  Linprocfs uses this to display the major number of the driver.  The
  soon to be available linsysfs will use it to fill in the driver name.
  Linux_stat uses it to translate the major/minor into Linux type values.

  Note major numbers are dynamically assigned via passing in a -1 for
  the major number so we don't need to keep track of them.

  This is somewhat needed due to us switching to our devfs.
2006-06-15 15:52:05 +00:00
cvs2svn
47d76a2b91 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2006-05-25 04:01:05 +00:00
ps
d07a8646ca MFC: regen for 32bit FreeBSD 4 System V shared memory 2006-05-15 18:48:23 +00:00
ps
2f5ab57b80 MFC: Properly support for FreeBSD 4 32bit System V shared memory.
Submitted by:	peter
2006-05-15 18:47:52 +00:00
ps
d2c63614a9 MFC: regen for 32bit sendfile 2006-05-15 18:34:40 +00:00
ps
c3bbc5629b MFC: 32bit sendfile support 2006-05-15 18:34:06 +00:00
jeff
1a868ce8ec MFC Rev 1.75
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:04:07 +00:00
jeff
9e2412596d MFC Rev 1.21
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:04:04 +00:00
ps
9863378685 MFC:
Don't truncate f_mntfromname & f_mntonname to 16 characters when
translating statfs into ostatfs.  Also use strlcpy instead of bcopy
to make sure the copied strings are properly terminated.

Approved by:	re (scottl)
2006-03-06 10:56:43 +00:00
ambrisko
6e40038792 Regen 2006-01-27 17:17:23 +00:00
ambrisko
926a2f80b7 MFC: 32bit lutimes 2006-01-27 17:17:05 +00:00
delphij
19aa2b762e MFC revision 1.131
date: 2005/12/13 15:32:52;  author: delphij;  state: Exp;  lines: +5 -5
In Linux, kernel parameters passed to ioctl are by value, while in FreeBSD
they are passed by reference.  Handle the difference within the
linux_ioctl_termio on the LINUX_TCFLSH path.

Submitted by:   Jaroslav Drzik <jaro_AT_coop-voz_dot_sk>
Reminded by:	glebius
2006-01-11 15:40:00 +00:00
glebius
df3c4d7b56 MFC 1.62:
Add \n to log() message.
2006-01-10 10:13:43 +00:00
ps
1c9ee96a41 regen for 32bit futimes 2005-12-28 19:50:22 +00:00
ps
9edf05e360 MFC: 32bit futimes 2005-12-28 19:50:09 +00:00
ps
f4c5d0277e Correct white space issues that were introduce in 1.38.2.2. 2005-12-28 19:41:48 +00:00
ps
80915ea2fa MFC: rev 1.40
Use the constants for the syscall names from syscall.h rather than
hardcoding the numbers for the SYSVIPC syscalls.
2005-12-28 19:39:55 +00:00
ps
381bb9c125 regen 2005-12-28 19:31:57 +00:00
ps
a2a837b8b0 MFC: 32bit compat for recvmsg, sendmsg, osigaction, osigprocmask,
osigpending, osigvec, osigblock, osigsetmask, osigsuspend, osigstack,
clock_gettime, clock_settime, and clock_getres.

Also correct the prototype for freebsd32_nanosleep in syscalls.master.
2005-12-28 19:30:41 +00:00