| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Add \n to log() message.
Notes:
svn path=/stable/6/; revision=154173
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Conditionally grab Giant around the EISCONN hack at the end based on
debug.mpsafenet.
- Protect access to so_emuldata via SOCK_LOCK.
Reviewed by: rwatson
Approved by: re (scottl)
Notes:
svn path=/head/; revision=147853
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
with the IP_HDRINCL option set. Without this change, a Linux process
with access to a raw socket could cause a kernel panic. Raw sockets
must be created by root, and are generally not consigned to untrusted
applications; hence, the security implications of this bug are
minimal. I believe this only affects 6-CURRENT on or after 2005-01-30.
Found by: Coverity Prevent analysis tool
Security: Local DOS
Notes:
svn path=/head/; revision=144012
|
| |
|
|
|
|
|
|
|
|
|
| |
SIGPIPE signal for the duration of the sento-family syscalls. Use it to
replace previously added hack in Linux layer based on temporarily setting
SO_NOSIGPIPE flag.
Suggested by: alfred
Notes:
svn path=/head/; revision=143295
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for the duration of the send() call. Such approach may be less than ideal
in threading environment, when several threads share the same socket and it
might happen that several of them are calling linux_send() at the same time
with and without SO_NOSIGPIPE set.
However, such race condition is very unlikely in practice, therefore this
change provides practical improvement compared to the previous behaviour.
PR: kern/76426
Submitted by: Steven Hartland <killing@multiplay.co.uk>
MFC after: 3 days
Notes:
svn path=/head/; revision=143233
|
| |
|
|
|
|
|
|
|
|
| |
where the buffer to send lies and use it to eliminate yet another stackgap
in linuxlator.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=141029
|
| |
|
|
|
|
|
|
|
| |
Submitted by: Jung-uk Kim <jkim@niksun.com>
Use positive, not negative logic.
Notes:
svn path=/head/; revision=140214
|
| |
|
|
|
|
|
|
|
|
|
| |
directly. This removes a few more users of the stackgap and also marks
the syscalls using these wrappers MP safe where appropriate.
Tested on: i386 with linux acroread5
Compiled on: i386, alpha LINT
Notes:
svn path=/head/; revision=134266
|
| |
|
|
|
|
|
|
|
|
|
| |
valid; otherwise a caller could trick us into changing any 32-bit word
in kernel memory to LINUX_SOL_SOCKET (0x00000001) if its previous value
is SOL_SOCKET (0x0000ffff).
MFC after: 3 days
Notes:
svn path=/head/; revision=134209
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
on AMD64, and the general case where the emulated platform has different
size pointers than we use natively:
- declare certain structure members as l_uintptr_t and use the new PTRIN
and PTROUT macros to convert to and from native pointers.
- declare some structures __packed on amd64 when the layout would differ
from that used on i386.
- include <machine/../linux32/linux.h> instead of <machine/../linux/linux.h>
if compiling with COMPAT_LINUX32. This will need to be revisited before
32-bit and 64-bit Linux emulation support can coexist in the same kernel.
- other small scattered changes.
This should be a no-op on i386 and Alpha.
Notes:
svn path=/head/; revision=133816
|
| |
|
|
|
|
|
| |
added one, this adds the other.
Notes:
svn path=/head/; revision=132347
|
| |
|
|
|
|
|
| |
intended. This fixes the build, but might require revision.
Notes:
svn path=/head/; revision=132331
|
| |
|
|
|
|
|
|
|
| |
values from either user land or from the kernel. Use them for
[gs]etsockopt and to clean up some calls to [gs]etsockopt in the
Linux emulation code that uses the stackgap.
Notes:
svn path=/head/; revision=132313
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add copyiniov() which copies a struct iovec array in from userland into
a malloc'ed struct iovec. Caller frees.
Change uiofromiov() to malloc the uio (caller frees) and name it
copyinuio() which is more appropriate.
Add cloneuio() which returns a malloc'ed copy. Caller frees.
Use them throughout.
Notes:
svn path=/head/; revision=131897
|
| |
|
|
|
|
|
| |
entry points.
Notes:
svn path=/head/; revision=131796
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The log message for rev.1.160 of kern/uipc_syscalls.c and associated
changes only claimed to add restrict qualifiers (which have no effect in
the kernel so they probably shouldn't be added), but the following
interface changes were also made:
- caddr_t to `void *' and `struct sockaddr_t *'
- `int *' to `socklen_t *'.
These interface changes are not quite null, and this fix is quick (like
the changes in uipc_syscalls 1.160) because it uses bogus casts instead
of complete bounds-checked conversions.
Things should be fixed better when the conversions can be done without
using the stack gap. linux_check_hdrincl() already uses the stack gap
and is fixed completely though the type mismatches in it were not fatal
(there were only fatal type mismatches from unopaquing pointers to
[o]sockaddr't's -- the difference between accept()'s args and oaccept()'s
args is now non-opaque, but this is not reflected in their args structs).
Notes:
svn path=/head/; revision=123828
|
| |
|
|
|
|
|
|
| |
This means we can avoid using the stack gap for most send* syscalls
now (it is still used in the IP_HDRINCL case).
Notes:
svn path=/head/; revision=122358
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Allocate storage for uap->msg always because it is copyin()'ed in
native sendmsg().
- Convert sockopt level from Linux to FreeBSD after native recvmsg() calling.
- Some cleanups.
Tested with: Oracle 9i shared server connection mode.
MFC after: 1 week
Notes:
svn path=/head/; revision=121008
|
| |
|
|
| |
Notes:
svn path=/head/; revision=116173
|
| |
|
|
|
|
|
|
|
|
| |
Change all in-tree consumers to include <sys/limits.h>
Discussed on: standards@
Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
Notes:
svn path=/head/; revision=114216
|
| |
|
|
| |
Notes:
svn path=/head/; revision=111798
|
| |
|
|
|
|
|
| |
Also clean up some egregious casts and incorrect use of sizeof.
Notes:
svn path=/head/; revision=111797
|
| |
|
|
| |
Notes:
svn path=/head/; revision=111173
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
so be more careful about calling stackgap_init.
Tested by: Fred Souza <fred@storming.org>
2) Linux_sendmsg was forgetting to fill out the bsd_args struct.
Reviewed by: ume
3) The args to linux_connect have differently named types on alpha and
i386, so add a cast to stop gcc complaining.
Spotted by: peter
Notes:
svn path=/head/; revision=110538
|
| |
|
|
|
|
|
| |
Reported by: "Sergey A. Osokin" <osa@freebsd.org.ru>
Notes:
svn path=/head/; revision=110376
|
| |
|
|
|
|
|
|
| |
Reviewed by: dwmalone
MFC after: 10 days
Notes:
svn path=/head/; revision=110295
|
| |
|
|
| |
Notes:
svn path=/head/; revision=103886
|
| |
|
|
|
|
|
|
|
| |
This is needed for the COMPAT_FREEBSD3 option split.
Reviewed by: alfred, jake
Notes:
svn path=/head/; revision=103839
|
| |
|
|
|
|
|
|
| |
Spotted and suggested by: des
MFC after: 3 weeks
Notes:
svn path=/head/; revision=97748
|
| |
|
|
|
|
|
| |
Submitted by: Hisashi Hiramoto <hiramoto@phys.chs.nihon-u.ac.jp>
Notes:
svn path=/head/; revision=86504
|
| |
|
|
|
|
|
|
|
| |
in bind() and connect(). Linux doesn't care if the length of the
sockaddr matches its address family; FreeBSD does. This fixes the
known issues with the resolver in linux_base-7.
Notes:
svn path=/head/; revision=85569
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
Notes:
svn path=/head/; revision=83366
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Introduce private types for use in linux syscalls for two reasons:
1. establish type independence for ease in porting and,
2. provide a visual queue as to which syscalls have proper
prototypes to further cleanup the i386/alpha split.
Linuxulator types are prefixed by 'l_'. void and char have not
been "virtualized".
o Provide dummy functions for all syscalls and remove dummy functions
or implementations of truely obsolete syscalls.
o Sanitize the shm*, sem* and msg* syscalls.
o Make a first attempt to implement the linux_sysctl syscall. At this
time it only returns one MIB (KERN_VERSION), but most importantly,
it tells us when we need to add additional sysctls :-)
o Bump the kenel version up to 2.4.2 (this is not the same as the
KERN_VERSION MIB, BTW).
o Implement new syscalls, of which most are specific to i386. Our
syscall table is now up to date with Linux 2.4.2. Some highlights:
- Implement the 32-bit uid_t and gid_t bases syscalls.
- Implement a couple of 64-bit file size/offset bases syscalls.
o Fix or improve numerous syscalls and prototypes.
o Reduce style(9) violations while I'm here. Especially indentation
inconsistencies within the same file are addressed. Re-indenting
did not obfuscate actual changes to the extend that it could not
be combined.
NOTE: I spend some time testing these changes and found that if there
were regressions, they were not caused by these changes AFAICT.
It was observed that installing a RH 7.1 runtime environment
did make matters worse. Hangs and/or reboots have been observed
with and without these changes, so when it failed to make life
better in cases it doesn't look like it made it worse.
Notes:
svn path=/head/; revision=83221
|
| |
|
|
|
|
|
|
|
| |
The sense of the test was reversed, so we were returning EISCONN, then 0.
Pointed out and tested by: Martin Blapp <mb@imp.ch>
Notes:
svn path=/head/; revision=73353
|
| |
|
|
|
|
|
|
|
|
|
| |
is to return EINPROGRESS, EALREADY, (so_error ONCE), EISCONN. Certain
linux applications rely on the so_error (normally 0) being returned in
order to operate properly.
Tested by: Thomas Moestl <tmoestl@gmx.net>
Notes:
svn path=/head/; revision=73288
|
| |
|
|
|
|
|
| |
Approved by: marcel
Notes:
svn path=/head/; revision=70178
|
| |
|
|
| |
Notes:
svn path=/head/; revision=69539
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
to our native connect(). This is required to deal with the differences
in the way linux handles connects on non-blocking sockets.
This gets the private beta of the Compaq Linux/alpha JDK working
on FreeBSD/alpha
Approved by: marcel
Notes:
svn path=/head/; revision=68803
|
| |
|
|
|
|
|
| |
Syncing with it is wrong.
Notes:
svn path=/head/; revision=68583
|
| |
|
|
|
|
|
|
| |
Do not use sysent.c, proto.h and syscall.h in source tree;
use auto-generated versions.
Notes:
svn path=/head/; revision=68519
|
| |
|
|
|
|
|
|
|
| |
AlphaLinux compat bits. This will be better cleaned up soon.
Agreed to what ever was necessary by: marcel
Notes:
svn path=/head/; revision=68201
|
| |
|
|
| |
Notes:
svn path=/head/; revision=65108
|
| |
|
|
| |
Notes:
svn path=/head/; revision=64913
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parents flags.
Note on the PR:
The PR contains another patch that's not being committed without
further background information. The PR stays open for now.
PR: 16946 (Victor A. Salaman <salaman@teknos.com>)
Prompted by: msmith
Indirect/implicit approval: jkh (shoot me if I'm wrong :-)
Notes:
svn path=/head/; revision=57564
|
| |
|
|
| |
Notes:
svn path=/head/; revision=50477
|
| |
|
|
|
|
|
| |
Submitted by: Brian Feldman <green@unixhelp.org>
Notes:
svn path=/head/; revision=42509
|
| |
|
|
|
|
|
|
| |
PR: 9232
Submitted by: marcel@scc.nl <Marcel Moolenaar>
Notes:
svn path=/head/; revision=42186
|
| |
|
|
|
|
|
| |
used.
Notes:
svn path=/head/; revision=34924
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
----
I've worked to enhance the connect() patches.
I've just tested this with the Linux JDK appletviewer on an applet
that does a lot of connects, and it works as well as during my
previous tests.
The connect() patch is now a merge between my older patch and the
OpenBSD stuff. It ensures that any async error is returned by
connect() instead of getsockopt(SOL_SOCKET, SO_ERROR) as reasonnable
systems do.
There are also minor patches to implement IPPROTO_TCP for
get/setsocktopt(). These are also tested (with Linux Apache).
----
I would appreciate any feedback regarding these changes, as they'd
be very useful in 2.2.6.
Submitted by: pb@fasterix.freenix.org (Pierre Beyssac)
Notes:
svn path=/head/; revision=33148
|
| |
|
|
| |
Notes:
svn path=/head/; revision=31778
|