Commit Graph

151254 Commits

Author SHA1 Message Date
Xin LI
821df508e8 Revert most part of 200420 as requested, as more review and polish is
needed.
2009-12-13 03:14:06 +00:00
Marcel Moolenaar
066b1a5c7b Add support for memory disk (md). The size of the memory disk
is determined by MD_IMAGE_SIZE. A file system can be embedded
into the loader with /sys/tools/embed_mfs.sh.
Note that md.c is not included when MD_IMAGE_SIZE is not set.
2009-12-13 01:20:32 +00:00
Marius Strobl
0966baf709 Unbreak the ata_atapi() usage. Since r200171 the mode setting functions
get a ata_device type device passed instead of a ata_channel one, thus
ata_atapi() has to be adjusted accordingly.

Reviewed by:	mav
MFC after:	3 days
2009-12-13 00:13:21 +00:00
Konstantin Belousov
ec897c886d Document PBDRY and SLEEPQ_STOP_ON_BDRY.
Requested and reviewed by:	attilio
MFC after:	3 days
2009-12-12 22:08:37 +00:00
Jamie Gritton
4576bbe233 Don't free jail parameter values after printing them - jail_param_get
expects them to be there for the next jail in the list.

PR:		bin/141359
MFC after:	1 week
2009-12-12 21:59:30 +00:00
Doug Barton
f25291f3a1 Since the change to rc.subr in r198162 it's not necessary to specify
command in the rc.d script if we have a corresponding ${name}_program
entry, which we do for named.

Rename named_precmd to named_prestart to make it more clear and match
convention.

Move the command_args definition related to -u up into _prestart().
It (and the associated $named_uid value) are only used there, and
unlike required_* and pidfile don't need to be used until this stage.

Fix a silly bug that would only have affected people who were using
the new named_wait or named_auto_forward features, AND had set up an
rndc.conf file instead of using the automatically generated rndc.key.

For named_conf:
	Add "-c $named_conf" to command_args if it's not set to the
	default. If it is set to the default and we're using the base
	BIND it's not necessary. If we're using BIND from the ports
	the user is likely to have included it in _flags (due to long
	necessity for doing so) so don't duplicate that if it's set.

	Add $named_conf to required_files
2009-12-12 21:51:50 +00:00
Attilio Rao
2028867def In current code, threads performing an interruptible sleep (on both
sxlock, via the sx_{s, x}lock_sig() interface, or plain lockmgr), will
leave the waiters flag on forcing the owner to do a wakeup even when if
the waiter queue is empty.
That operation may lead to a deadlock in the case of doing a fake wakeup
on the "preferred" (based on the wakeup algorithm) queue while the other
queue has real waiters on it, because nobody is going to wakeup the 2nd
queue waiters and they will sleep indefinitively.

A similar bug, is present, for lockmgr in the case the waiters are
sleeping with LK_SLEEPFAIL on.  In this case, even if the waiters queue
is not empty, the waiters won't progress after being awake but they will
just fail, still not taking care of the 2nd queue waiters (as instead the
lock owned doing the wakeup would expect).

In order to fix this bug in a cheap way (without adding too much locking
and complicating too much the semantic) add a sleepqueue interface which
does report the actual number of waiters on a specified queue of a
waitchannel (sleepq_sleepcnt()) and use it in order to determine if the
exclusive waiters (or shared waiters) are actually present on the lockmgr
(or sx) before to give them precedence in the wakeup algorithm.
This fix alone, however doesn't solve the LK_SLEEPFAIL bug. In order to
cope with it, add the tracking of how many exclusive LK_SLEEPFAIL waiters
a lockmgr has and if all the waiters on the exclusive waiters queue are
LK_SLEEPFAIL just wake both queues.

The sleepq_sleepcnt() introduction and ABI breakage require
__FreeBSD_version bumping.

Reported by:	avg, kib, pho
Reviewed by:	kib
Tested by:	pho
2009-12-12 21:31:07 +00:00
Konstantin Belousov
1173b9a2d0 For ia32 syscall(), call cpu_set_syscall_retval(). Update comment inside
cpu_set_syscall_retval() accordingly.

MFC after:	1 week
2009-12-12 20:11:31 +00:00
Jaakko Heinonen
d8eba599f5 Don't read the newline character to line buffer because lines are passed
to wcscoll(3). Newline characters could cause incorrect results when
comparing lines.

Also, if an input line didn't contain a newline character, it was
omitted from the output. According to my interpretation, SUSv3 requires
that the newline is always printed.

Add regression tests for the cases. [1]

PR:		bin/140976
Submitted by:	D'Arcy Cain (original version) [1]
Approved by:	trasz (mentor)
2009-12-12 18:18:46 +00:00
Jaakko Heinonen
28c3507d53 The input line length limit mentioned on the manual page was removed by
r179374.

Approved by:	trasz (mentor)
2009-12-12 18:04:50 +00:00
Antoine Brodin
cb174b37be Install firmware(9) examples.
MFC after:	1 month
2009-12-12 17:04:36 +00:00
Luigi Rizzo
a50f6188de Make the code buildable in userland so it is easier to test it:
this requires a small reordering of headers and a few #defines to
map functions not available in userland.

Remove a useless #ifndef block at the beginning of the file.

Introduce (temporarily) rn_init2(), see the comment in the code
for the proper long term change.

No ABI or functional change.

MFC after:	7 days
2009-12-12 15:49:28 +00:00
Doug Barton
1b2aeedc64 Over time things that used to be files/directories/links can change
to something else. So add code to detect when things don't match and
give the user choices about how to fix it.

If we're using -P and something in the above check needs to be moved
we need to have the directory there for it, so create it at the
beginning and delete empty versions of it at the end.

The case where something used to be a file or link and now is supposed
to be a directory (e.g., /etc/security) is especially dangerous, so
make failure to install a necessary directory in $DESTDIR a fatal error.
2009-12-12 02:19:41 +00:00
Sean Farley
abdbb3fecd Fix libusb_open_device_with_vid_pid() to return a NULL if no device is
found instead of the last device in its search list.

Reviewed by:	thompsa
MFC after:	5 days
2009-12-12 00:24:30 +00:00
Sean Farley
0dd84a53d7 Remove a dead store.
MFC after:	5 days
2009-12-12 00:11:40 +00:00
Pyun YongHyeon
f52384d1cf Remove driver lock assertion in MII register access. This change
was made in r199543 to remove MTX_RECURSE. These routines can be
called in device attach phase(e.g. mii_phy_probe()) so checking
assertion here is not right as caller does not hold a driver lock.
2009-12-12 00:06:43 +00:00
Ed Schouten
c4cd42053e The hostname passed to ulog_login(3) may be optional.
Don't trip on a null pointer being passed to this function when
performing a local login.

Noticed by:	dougb
2009-12-11 23:52:42 +00:00
Xin LI
6f2d322192 Remove unneeded header includes from usr.bin/ except contributed code.
Tested with:	make universe
2009-12-11 23:35:38 +00:00
Xin LI
e87862f53a Remove unnecessary termcap.h includes inherited from extern.h and other
unneeded headers.  While I'm there, make function definations ANSI
prototypes.
2009-12-11 23:30:22 +00:00
Xin LI
3daadfc833 Move unistd.h includes to individual .c files and remove unnecessary
includes.
2009-12-11 23:23:57 +00:00
Xin LI
512be259a7 Remove unnecessary includes.
Reviewed by:	rodrigc
2009-12-11 23:20:02 +00:00
Doug Barton
044823bee6 Simplify handling of MTREEFILE relative to DESTDIR
Make the message about a missing MTREEFILE combined with -U
more informative
2009-12-11 23:03:35 +00:00
Benedict Reuschling
8031b25721 Reference the correct man page for firmware(9).
PR:             docs/140985
Submitted by:   Glen Barber (glen dot j dot barber at gmail dot com)
MFC after:      7 days
Reviewed by:    rpaulo
Approved by:    rpaulo, jkois (mentor)
2009-12-11 19:36:10 +00:00
Alexander Motin
c2023eeaad CFA support doesn't exclude FLUSH support.
Submitted by:	Grzegorz Bernacki
2009-12-11 16:32:59 +00:00
Ed Schouten
17c79ad08c Convert pam_lastlog(8) to libulog.
The information used by the "Last login:"-line is obtained by using
ulog_setutxfile(3) to switch to the lastlog database. Login and logout
are performed using the utility functions ulog_login(3) and
ulog_logout(3).

This also means we must build libulog during bootstrap.

Approved by:	des
2009-12-11 14:15:55 +00:00
Shteryana Shopova
9cd8bb54fa Bump the man page date to the date of the last update.
Noticed by:	bz
2009-12-11 13:05:09 +00:00
Yoshihiro Takahashi
36ff75683a Cleanups the boot2 for pc98. There is no functional change.
- Make setting machine type and getting geom conditional for future.
  - Remove unused RAWBOOT and CDBOOT supports.
  - Remove unneeded include.
  - Fix warnings.

MFC after:	1 week
2009-12-11 12:36:59 +00:00
Luigi Rizzo
37e20d0a37 only export bio_cmd and flags to userland (bio_cmd are
used by ggatectl, flags are potentially useful).
Other parts are internal kernel data structures and should
not be visible to userland.

No API change involved.

MFC after:	3 days
2009-12-11 10:35:58 +00:00
Shteryana Shopova
db3a20a518 Add support for TACACS+ accounting to libtacplus(3).
Submitted by:	Michael Pounov misho@aitbg.com
OKed by:	emaste
2009-12-11 07:53:44 +00:00
Marcel Moolenaar
57467e5933 Fix interrupt handling. It started off broken and grew worse over time.
The rewrite of the interrupt handler includes:
o   loop until all pending interrupts are handled. This closes a
    race condition.
o   count the number of interrupt sources we handled so that we can
    properly return FILTER_HANDLED or FILTER_STRAY when we break out
    of the loop.
o   When matching the interrupt source to the devices that have that
    source pending, check only from the set of devices we found to
    have a pending interrupt.

PR:		kern/140947
MFC after:	3 days
2009-12-11 03:08:07 +00:00
Andrew Thompson
ae6de8d67a Wrap long lines. 2009-12-11 02:52:14 +00:00
Andrew Thompson
4b5437a114 Add a quirk for the Curitel UM175 where setting multiplexing for call
management over the data endpoint causes communication to die.

Take this one step further and model it on the existing NetBSD quirk and import
other device IDs from them.

Obtained from:	NetBSD
2009-12-11 02:44:15 +00:00
Xin LI
566a751354 Apply two vendor fixes for CVE-2009-3720.
Security:	CVE-2009-3720
MFC after:	3 days
2009-12-11 02:09:46 +00:00
Xin LI
9fcd883dcb Apply a vendor fix (rev 1.165): Don't update next pointer since it could
confuse tokenizer.

Obtained from:	expat CVS
Security:	CVE-2009-3720
2009-12-11 02:06:06 +00:00
Doug Barton
1d0185c436 Update to the December 12, 2008 version of this file. The one
substantive change is to add the IPv6 address of L. The other
changes are all CAPS LOCK related.
2009-12-11 01:06:04 +00:00
Andrew Thompson
84d250f195 Revert r199331, the UM175 is in fact a cdc-acm device handled by umodem(4). 2009-12-11 00:57:30 +00:00
Alexander Motin
1969c3f4ea Add one more set of codec IDs. 2009-12-11 00:38:13 +00:00
Ed Schouten
a7e5e29990 Update termcap entries for xterm.
It turns out these entries do make Terminal.app behave a little better.
According to Thomas Dickey, Terminal.app should use TERM=nsterm anyway,
but we don't support this yet. Already having an improved termcap entry
helps, so I am going to MFC this change after all.

Suggested by:	Leonidas Tsampros <ltsampros upnet gr>
MFC after:	1 month
2009-12-10 22:25:53 +00:00
Xin LI
e03f057175 Correct a DoS issue when processing XML document with malformed
UTF-8 sequences.

Obtained from:	expat CVS (revisions 1.14 and 1.15)
Security:	CVE-2009-3560
2009-12-10 21:23:46 +00:00
Brooks Davis
68a5cc39d3 Add a missing else that negated the truncation of ki_ngroups to
NGROUPS.

Submitted by:	Dmitry Pryanishnikov <lynx dot ripe at gmail dot com>
2009-12-10 21:16:16 +00:00
Xin LI
8057c390ca Flattern all tags and dist tree for expat. 2009-12-10 21:15:25 +00:00
Luigi Rizzo
b2089673e5 use div64 when converting back the burst value for userland 2009-12-10 18:37:14 +00:00
Luigi Rizzo
89717f91ef when draining a flowset free the entire chain, not just one packet. 2009-12-10 18:34:07 +00:00
Takanori Watanabe
28336d6080 Add module dependency for cam if configured as ATA_CAM. 2009-12-10 16:55:16 +00:00
Luigi Rizzo
478cae8a97 centralize the code to free a packet (or a chain) while in dummynet.
Remove an old macro and its stale comment.
2009-12-10 15:17:34 +00:00
John Baldwin
e85b664cd2 Don't warn about an RSDP with a corrupt checksum. The kernel does a better
job about warning about these things later and this message can be
confusing.

Submitted by:	infofarmer
MFC after:	1 week
2009-12-10 14:54:29 +00:00
Konstantin Belousov
626aa87777 Record part of history I participated in.
No objections from:	ed, pho
2009-12-10 14:41:47 +00:00
Luigi Rizzo
22efc80fd8 No functional changes (who dares to touch this code!) but:
- cast the result of LEN() to int as this is the main usage.
- use LEN() in one place where it was forgotten.
- Document the use of a static variable in rw mode.

More small changes to follow.

MFC after:	7 days
2009-12-10 10:34:30 +00:00
Alexander Motin
7f719ba784 Limit maximum I/O size, depending on command set supported by device.
It is required to suppot non-LBA48 devices with MAXPHYS above 128K.
Same is done in ada(4).
2009-12-10 09:26:56 +00:00
Kip Macy
126e2c082b for PV XEN translate page table entries from machine (real) to physical (logical) addresses so that kgdb can
translate them to the correct coredump offsets
2009-12-10 07:48:47 +00:00