Commit Graph

127066 Commits

Author SHA1 Message Date
Ruslan Ermilov
9fddcc6661 Fix our ioctl(2) implementation when the argument is "int". New
ioctls passing integer arguments should use the _IOWINT() macro.
This fixes a lot of ioctl's not working on sparc64, most notable
being keyboard/syscons ioctls.

Full ABI compatibility is provided, with the bonus of fixing the
handling of old ioctls on sparc64.

Reviewed by:	bde (with contributions)
Tested by:	emax, marius
MFC after:	1 week
2006-09-27 19:57:02 +00:00
John Baldwin
3ea944faa0 Emulate moving cr0, cr2, cr3, or cr4 into any i386 general register
rather than just emulating mov cr0, eax.  This fixes some Compaq/HP BIOS
with DMA (as the BIOS tried to read cr3 so it could translate addresses
if paging was enabled).

MFC after:	1 week
2006-09-27 19:32:26 +00:00
Jens Schweikhardt
1a0ba4525f Correct typo. 2006-09-27 19:20:43 +00:00
Maxim Sobolev
6e93c19e3d Since ULE doesn't honor hlt_cpus_mask don't compile code that prevents
timer interrupt servicing for disabled HTT cores in ULE case. Should be
probably fixed in ULE code instead, but we have no real maintainer for
ULE to do it.

PR:		103697
2006-09-27 18:51:19 +00:00
Martin Blapp
8be563721a Move Giant up even further since P_CONTROLT isn't really fully locked
yet (p_flag is, but P_CONTROLT isn't really).

Submitted by:	jhb
2006-09-27 16:42:10 +00:00
Martin Blapp
1bf5e4b866 Use ctty instead of just returning. ctty just has a simple open that
returns ENXIO.

Submitted by:	jhb
2006-09-27 16:41:15 +00:00
Matt Jacob
cd6dedfc61 Bump MAX_INITIATORS to 1024- the LSI-Logic can go even higher than
this for 'initiator id'- this is a stopgap until a sparse map is
added.

Make compat defines for offset format (FreeBSD 5 or less).

Add no-asyncio flag. There's some breakage with ASYNC I/O that every
now and then drops us into an infinite loop. This also then does
a fallback to no-asyncio if the AIO option isn't loaded/compiled into
the kernel.

A number of other chanes to try and track some breakage.
2006-09-27 15:38:13 +00:00
Ruslan Ermilov
e640c42275 - Removed a copyright from makefile.
- Added ${.CURDIR} to .include "...".
- Whitespace fixes.

OK'ed by:	piso
2006-09-27 12:30:27 +00:00
Ruslan Ermilov
d6e26499b7 Put back NO_WERROR= to fix sparc64 build. 2006-09-27 10:30:17 +00:00
Pawel Jakub Dawidek
e5cccaf001 - Use existing functions mtx_lock() and mtx_unlock().
- Change variable name to 'error', as this is what is mostly used for
  functions that return an error.
- Add mutex(9) to the SEE ALSO section.
- Bump the date.

I don't really like the example code. I'd prefer symmetry where possible, eg.

	mtx_lock(&example_lock);
	error = example(NULL, EXAMPLE_ONE);
	mtx_unlock(&example_lock);
	if (error != 0)
		return (error);

But I'll leave it as it is for now.

Reviewed by:	simon
2006-09-27 08:39:00 +00:00
Stanislav Sedov
af159726bc - Add my birthday entry to the chronicle.
Approved by:	sem (mentor)
2006-09-27 08:25:53 +00:00
Eric Anholt
30e14d656c Add support for 945G/GM AGP chipsets.
The key problem was that the aperture size detection using the MSAC bit
doesn't work -- the bit appears to be set even when it shouldn't be.  Linux
takes a different approach, testing for a bit of the GMADR (PCIR_BAR(2)) being
set.  However, as I don't think that's a safe way to test aperture size, we
just allocate the resource and check its size.  This also pointed out that
agp_generic_attach hadn't been allocating our aperture resource, which may
have caused problems in some cases.

Also corrected is a minor copy-and-pasteo in an error case.

PR:		kern/103079
Submitted by:	mnag
Tested on:	i945GM, i915GM
MFC after:	2 weeks
2006-09-27 06:38:54 +00:00
Xin LI
3a6ab3de8d Explicitly say which gid do we use as a fallback, when operator
is not found.

Suggested by:	kensmith
2006-09-27 05:49:21 +00:00
Scott Long
37fe50c382 Skip the AEN event command that is always hanging out on the card.
Submitted by: Doug Ambrisko
2006-09-27 05:00:10 +00:00
Scott Long
420a5a0e25 Fix a bad #include statment 2006-09-27 04:54:23 +00:00
Paolo Pisati
7c00cc76f0 Compilation. 2006-09-27 02:08:44 +00:00
Paolo Pisati
be4f3cd0d9 Summer of Code 2005: improve libalias - part 1 of 2
With the first part of my previous Summer of Code work, we get:

-made libalias modular:

 -support for 'particular' protocols (like ftp/irc/etcetc) is no more
  hardcoded inside libalias, but it's available through external
  modules loadable at runtime

 -modules are available both in kernel (/boot/kernel/alias_*.ko) and
  user land (/lib/libalias_*)

 -protocols/applications modularized are: cuseeme, ftp, irc, nbt, pptp,
  skinny and smedia

-added logging support for kernel side

-cleanup

After a buildworld, do a 'mergemaster -i' to install the file libalias.conf
in /etc or manually copy it.

During startup (and after every HUP signal) user land applications running
the new libalias will try to read a file in /etc called libalias.conf:
that file contains the list of modules to load.

User land applications affected by this commit are ppp and natd:
if libalias.conf is present in /etc you won't notice any difference.

The only kernel land bit affected by this commit is ng_nat:
if you are using ng_nat, and it doesn't correctly handle
ftp/irc/etcetc sessions anymore, remember to kldload
the correspondent module (i.e. kldload alias_ftp).

General information and details about the inner working are available
in the libalias man page under the section 'MODULAR ARCHITECTURE
(AND ipfw(4) SUPPORT)'.

NOTA BENE: this commit affects _ONLY_ libalias, ipfw in-kernel nat
support will be part of the next libalias-related commit.

Approved by: glebius
Reviewed by: glebius, ru
2006-09-26 23:26:53 +00:00
Scott Long
31e2a87d4d The need to run a filter also implies that bouncing could be possible, so
just use the COULD_BOUNCE flag for both and retire the USE_FILTER flag.
This fixes the problem that rev 1.81 introduced with the if_bfe driver
(and possibly others).
2006-09-26 23:14:42 +00:00
Ceri Davies
de5e5e6ead Add a -a option as a no-op for Solaris compatibility, as briefly
discussed on src-committers.  This is intentionally not included in the
usage() function as it would confuse the output too much.

Approved by:	jhb
MFC after:	1 week
2006-09-26 22:28:12 +00:00
Ruslan Ermilov
eb0fa6f5d7 Remove bogus casts of valid integer ioctl() arguments. 2006-09-26 21:46:12 +00:00
Daniel Gerzo
19ee36f1e5 Remove second person from the sentece and rephrase a bit.
Approved by: trhodes (mentor), keramida (mentor)
2006-09-26 19:59:52 +00:00
Brian Somers
cf2603700e Behave as documented when reading fields saying "X/Y" where X != *
rather than mis-parsing them as "X".

MFC after: 1 day
2006-09-26 18:06:09 +00:00
John Baldwin
bec0c98eae Fix a memory leak in ipmi_unload().
CID:		1542
Found by:	Coverity Prevent
2006-09-26 15:48:13 +00:00
Ken Smith
3aaadbcce2 Oops. Catch up on the last couple of releases and prepare for the next
one.
2006-09-26 14:51:33 +00:00
John Baldwin
d93b6afb2b Only support the SMB_OLD_BREAD ioctl if one of COMPAT_FREEBSD[456] is
defined.
2006-09-26 14:38:56 +00:00
Robert Watson
d39de3122d PC98 would also like a trademark.
Who would have thought that getting a kernel printf right would be so
tricky?

MFC after:	3 days
Submitted by:	Gavin Atkinson <gavin dot atkinson at ury dot york dot ac dot uk>
2006-09-26 12:45:47 +00:00
Ruslan Ermilov
f0e795737b Add a value to the define I forgot, for the purity's sake. 2006-09-26 12:44:20 +00:00
Ruslan Ermilov
f88b3f22ac Now that we have COMPAT_FREEBSD6 officially, use it from opt_compat.h. 2006-09-26 12:41:13 +00:00
Ruslan Ermilov
6c9fdda750 Added COMPAT_FREEBSD6 option. 2006-09-26 12:36:34 +00:00
Vasil Dimov
23883885a3 Fix typo
PR:		docs/103666
Submitted by:	vd
Approved by:	maxim
2006-09-26 09:47:46 +00:00
Ruslan Ermilov
acc17cb5a5 Fix both arguments to err(). 2006-09-26 05:46:55 +00:00
Matt Jacob
9311717d79 Begin the process of moving info to sysctl stuff for FreeBSD
by providing OIDs for WWNN/WWPN and Initiator ID.
2006-09-26 04:59:52 +00:00
Tor Egge
8d0547c68b Protect change to bo_flag by holding the bufobj mutex. 2006-09-26 04:21:20 +00:00
Tor Egge
e60c361218 Reduce fluctuations of mnt_flag to allow unlocked readers to get a
slightly more consistent view.
2006-09-26 04:20:09 +00:00
Tor Egge
9b65c22cf4 Don't restore MNT_QUOTA bit in mnt_flag after snapshot creation,
closing a race between nmount() and quotactl().
2006-09-26 04:19:11 +00:00
Tor Egge
fba924ce9b Don't restore MNT_QUOTA bit in mnt_flag after a failed mount with
MNT_UPDATE flag, closing a race between nmount() and quotactl().
2006-09-26 04:18:36 +00:00
Tor Egge
55b4ff0d9f Increase mnt_noasync once in softdep_mount() to disallow async io,
closing a window where a file system using softupdates could be async
for a short while if both MNT_UPDATE and MNT_ASYNC were passed as flags
to nmount().  Add MNTK_SOFTDEP flag to ensure that softdep_mount()
doesn't increase mnt_noasync multiple times.
2006-09-26 04:17:17 +00:00
Tor Egge
a1e363f256 Add mnt_noasync counter to better handle interleaved calls to nmount(),
sync() and sync_fsync() without losing MNT_ASYNC.  Add MNTK_ASYNC flag
which is set only when MNT_ASYNC is set and mnt_noasync is zero, and
check that flag instead of MNT_ASYNC before initiating async io.
2006-09-26 04:15:59 +00:00
Tor Egge
cea9d840d8 Don't restore mnt_kern_flag on failed MNT_UPDATE mount, it can race
with dounmount(), causing loss of MNTK_UNMOUNT flag.
2006-09-26 04:15:04 +00:00
Tor Egge
5da56ddb21 Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag.
This eliminates a race where MNT_UPDATE flag could be lost when nmount()
raced against sync(), sync_fsync() or quotactl().
2006-09-26 04:12:49 +00:00
David E. O'Brien
b14f05094a Catch up with share/mk/bsd.sys.mk rev. 1.38. 2006-09-26 02:18:35 +00:00
John-Mark Gurney
e16fa5ca55 fix calculating to_tsecr... This prevents the rtt calculations from
going all wonky...
2006-09-26 01:21:46 +00:00
Brooks Davis
ebe609b4a2 It is possible for bpf to return a length such that:
length != BPF_WORDALIGN(length)

This meeans that it is possible for this to be true:

	interface->rbuf_offset > interface->rbuf_len

Handle this case in the test for running out of packets.  While
OpenBSD's solution of setting interface->rbuf_len to
BPF_WORDALIGN(length) is safe due to the size of the buffer, I think
this solution results in less hidden assumptions.

This should fix the problem of dhclient running away and consuming 100%
CPU.

PR:		bin/102226
Submitted by:	Joost Bekkers <joost at jodocus.org>
MFC after:	3 days
2006-09-26 01:02:02 +00:00
Robert Watson
88b85279a9 SI_ORDER_THIRD + 2, not SI_ORDER_FOURTH + 2.
MFC after:	3 days
Submitted by:	mlaier
2006-09-26 00:15:56 +00:00
Robert Watson
5add74b4a7 Add "FreeBSD" trademark statement to copyright section of boot messages.
MFC after:	3 days
Approved by:	core, board at FreeBSDFoundation dot org
2006-09-25 23:19:01 +00:00
Warner Losh
fa81ece897 Document config_intrhook.
MFC After: 250 millifortnights
2006-09-25 20:12:13 +00:00
Bruce M Simpson
7d9079197c Fix a typo in af_inet6.c such that IPv6 addresses may be deleted
from interfaces.

PR:		bin/102701
Submitted by:	George Mitchell
MFC after:	3 days
2006-09-25 18:20:56 +00:00
Dmitry Morozovsky
50789a2f3a Fix bug introduced in rev 1.23:
pw_equal does not check crypted password field, so one cannot change
crypted password keeping other fields intact.

Approved by:	des
MCF after:	3 days
2006-09-25 15:06:24 +00:00
Robert Watson
d038d0bd66 Merge OpenBSM 1.0 alpha 12 import changes into src/sys/bsm. New events
for the Linuxulator.

MFC after:	3 days
Obtained from:	TrustedBSD Project
2006-09-25 12:22:07 +00:00
Robert Watson
be3ca90685 auditreduce now requires OpenBSM's config/config.h, so add that to the
build include path.

MFC after:	3 days
Obtained from:	TrustedBSD Project
2006-09-25 11:56:20 +00:00