]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoMove intr_describe() out of #ifdef SMP; the function is always required.
kib [Fri, 16 Oct 2009 12:00:59 +0000 (12:00 +0000)]
Move intr_describe() out of #ifdef SMP; the function is always required.

Reviewed by: jhb

14 years agoAllow $name_program to override $command in a more robust way that
dougb [Thu, 15 Oct 2009 23:20:23 +0000 (23:20 +0000)]
Allow $name_program to override $command in a more robust way that
will not cause the value to be null if $command is not set.

14 years agoCorrect offset calcluation for the NCM implementation.
thompsa [Thu, 15 Oct 2009 20:15:29 +0000 (20:15 +0000)]
Correct offset calcluation for the NCM implementation.

Submitted by: HPS

14 years agoOnly poll ukbd if KDB is active.
thompsa [Thu, 15 Oct 2009 20:09:27 +0000 (20:09 +0000)]
Only poll ukbd if KDB is active.

Submitted by: HPS

14 years agoWorkaround buggy BIOS code in USB regard. By doing the BIOS to OS handover for
thompsa [Thu, 15 Oct 2009 20:07:08 +0000 (20:07 +0000)]
Workaround buggy BIOS code in USB regard. By doing the BIOS to OS handover for
all host controllers at the same time, we avoid problems where the BIOS will
actually write to the USB registers of all the USB host controllers every time
we handover one of them, and consequently reset the OS programmed values.

Submitted by: avg
Reviewed by: jhb

14 years agoUse language more closely resembling English in a panic message.
jhb [Thu, 15 Oct 2009 18:51:19 +0000 (18:51 +0000)]
Use language more closely resembling English in a panic message.

Pointy hat to: jhb
Submitted by: pluknet

14 years agoRemoved redundant WARNS setting.
ru [Thu, 15 Oct 2009 18:17:29 +0000 (18:17 +0000)]
Removed redundant WARNS setting.

Submitted by: Ulrich Spörlein

14 years agoSupport the specification of a range of destination ports e.g.
luigi [Thu, 15 Oct 2009 15:30:41 +0000 (15:30 +0000)]
Support the specification of a range of destination ports e.g.

netsend 127.0.0.1 6666-7777 [payloadsize] [packet_rate] [duration]

This is useful to test the behaviour of systems that do some kind
of flow classifications and so exhibit different behaviour depending
on the number of flows that hit them.
I plan to add a similar extension to sweep on a range of IP addresses,
so we can issue a single command to flood (obviously, for testing
purposes!) a number of different destinations.

When there is only one destination, we do a preliminary connect()
of the socket so we can use send() instead of sendto().
When we have multiple ports, the socket is not connect()'ed and we
do a sendto() instead. There is a performance hit in this case,
as the throughput on the loopback interface (with a firewall rule
that blocks the transmission) goes down from 900kpps to 490kpps on
my test machine.

If the number of different destinations is limited, one option to
explore is to have multiple connect()ed sockets.

MFC after: 1 month

14 years agoStyle fixes to the function prototypes for bus_alloc_resources() and
jhb [Thu, 15 Oct 2009 14:55:11 +0000 (14:55 +0000)]
Style fixes to the function prototypes for bus_alloc_resources() and
bus_release_resources().

14 years agoAdd a facility for associating optional descriptions with active interrupt
jhb [Thu, 15 Oct 2009 14:54:35 +0000 (14:54 +0000)]
Add a facility for associating optional descriptions with active interrupt
handlers.  This is primarily intended as a way to allow devices that use
multiple interrupts (e.g. MSI) to meaningfully distinguish the various
interrupt handlers.
- Add a new BUS_DESCRIBE_INTR() method to the bus interface to associate
  a description with an active interrupt handler setup by BUS_SETUP_INTR.
  It has a default method (bus_generic_describe_intr()) which simply passes
  the request up to the parent device.
- Add a bus_describe_intr() wrapper around BUS_DESCRIBE_INTR() that supports
  printf(9) style formatting using var args.
- Reserve MAXCOMLEN bytes in the intr_handler structure to hold the name of
  an interrupt handler and copy the name passed to intr_event_add_handler()
  into that buffer instead of just saving the pointer to the name.
- Add a new intr_event_describe_handler() which appends a description string
  to an interrupt handler's name.
- Implement support for interrupt descriptions on amd64 and i386 by having
  the nexus(4) driver supply a custom bus_describe_intr method that invokes
  a new intr_describe() MD routine which in turn looks up the associated
  interrupt event and invokes intr_event_describe_handler().

Requested by: many
Reviewed by: scottl
MFC after: 2 weeks

14 years agoA small change to avoid calling gettimeofday() too often
luigi [Thu, 15 Oct 2009 14:18:35 +0000 (14:18 +0000)]
A small change to avoid calling gettimeofday() too often
(hardwired to once every 20us at most).

I found out that on many machines round here, i could only get
300-400kpps with netsend even on loopback and a 'deny' rule in
the firewall, while reducing the number of calls to gettimeofday()
brings the value to 900kpps and more.

This code is just a quick fix for the problem. Of course it could be
done better, with proper getopt() parsing and the like, but since
this applies to the entire program i'll postpone that to when i have
more time.

Reviewed by: rwatson
MFC after: 1 month

14 years agoFix a sign bug in the handling of nice priorities when computing the
jhb [Thu, 15 Oct 2009 11:41:12 +0000 (11:41 +0000)]
Fix a sign bug in the handling of nice priorities when computing the
interactive score for a thread.

Submitted by: Taku YAMAMOTO  taku of tackymt.homeip.net
Reviewed by: jeff
MFC after: 3 days

14 years agoUse our standard section 4 SYNOPSIS.
brueffer [Thu, 15 Oct 2009 11:32:05 +0000 (11:32 +0000)]
Use our standard section 4 SYNOPSIS.

MFC after: 3 days

14 years agoPrint routing statistics as unsigned short rather than unsigned int,
rwatson [Thu, 15 Oct 2009 10:31:24 +0000 (10:31 +0000)]
Print routing statistics as unsigned short rather than unsigned int,
otherwise sign extension leads to unlikely values when in the negative
range of the signed short structure fields that hold the statistics.
The type used to hold routing statistics is arguably also incorrect.

MFC after: 3 days

14 years agoBump version numbers and update descriptions for the 9-CURRENT
hrs [Thu, 15 Oct 2009 07:58:01 +0000 (07:58 +0000)]
Bump version numbers and update descriptions for the 9-CURRENT
world. The %[no]include.historic knobs are removed because they
are not used for a long time.

14 years agoThis patch fixes the following issues in the ARP operation:
qingli [Thu, 15 Oct 2009 06:12:04 +0000 (06:12 +0000)]
This patch fixes the following issues in the ARP operation:

1. There is a regression issue in the ARP code. The incomplete
   ARP entry was timing out too quickly (1 second timeout), as
   such, a new entry is created each time arpresolve() is called.
   Therefore the maximum attempts made is always 1. Consequently
   the error code returned to the application is always 0.
2. Set the expiration of each incomplete entry to a 20-second
   lifetime.
3. Return "incomplete" entries to the application.

Reviewed by: kmacy
MFC after: 3 days

14 years agofixes a TX hang that could be possible to happen when the trasfers are
weongyo [Wed, 14 Oct 2009 20:30:27 +0000 (20:30 +0000)]
fixes a TX hang that could be possible to happen when the trasfers are
in the high speed that some drivers don't call if_start callback after
marking ~IFF_DRV_OACTIVE.

MFC after: 3 days

14 years agofixes a TX hang bug that it could happen when if_start callback didn't
weongyo [Wed, 14 Oct 2009 20:09:09 +0000 (20:09 +0000)]
fixes a TX hang bug that it could happen when if_start callback didn't
be restarted by full of the output queue.

MFC after: 3 days
Tested by: bsduser <bsd at acd.homelinux.org>

14 years agoSet the active flag in the PMBR when we install bootcode on a GPT
rnoland [Wed, 14 Oct 2009 19:24:01 +0000 (19:24 +0000)]
Set the active flag in the PMBR when we install bootcode on a GPT
partitioned disk.  Some BIOS require this to be set before they will
boot the device.

Approved by: marcel
MFC after: 2 weeks

14 years agoOops, add a return values section to note that these routines return an error
jhb [Wed, 14 Oct 2009 16:00:20 +0000 (16:00 +0000)]
Oops, add a return values section to note that these routines return an error
on failure or zero on success.

14 years agoAdd a manual page for BUS_BIND_INTR() and bus_bind_intr().
jhb [Wed, 14 Oct 2009 15:58:59 +0000 (15:58 +0000)]
Add a manual page for BUS_BIND_INTR() and bus_bind_intr().

MFC after: 1 week

14 years agoUse zfs_read() instead of xfsread() to read /boot.config. xfsread() fails
jhb [Wed, 14 Oct 2009 14:13:42 +0000 (14:13 +0000)]
Use zfs_read() instead of xfsread() to read /boot.config.  xfsread() fails
short read requests, so the result was that a /boot.config smaller than 512
bytes was ignored.  boot2 uses fsread() instead of xfsread() to read
/boot.config already, so this makes zfsboot more like boot2.

Submitted by: Johny Mattsson  johny-freebsd of earthmagic org
Reviewed by: dfr
MFC after: 3 days

14 years agoExplicitly compare to a return code.
bz [Wed, 14 Oct 2009 12:01:11 +0000 (12:01 +0000)]
Explicitly compare to a return code.

Discussed with: philip (after we both misread the logic there the 1st time)
MFC after: 6 weeks

14 years agoUnbreak the VIMAGE build with IPSEC, broken with r197952 by
bz [Wed, 14 Oct 2009 11:55:55 +0000 (11:55 +0000)]
Unbreak the VIMAGE build with IPSEC, broken with r197952 by
virtualizing the pfil hooks.
For consistency add the V_ to virtualize the pfil hooks in here as well.

MFC after: 55 days
X-MFC after: julian MFCed r197952.

14 years agols: Make -p not inhibit following symlinks.
jilles [Tue, 13 Oct 2009 21:51:50 +0000 (21:51 +0000)]
ls: Make -p not inhibit following symlinks.

According to the man page, when neither -H/-L nor -F/-d/-l are given, -H is
implied. This agrees with POSIX, GNU ls and Solaris ls. This means that -p,
although it is very similar to -F, does not prevent the implicit following
of symlinks.

PR: standards/128546

14 years agoMake getcwd(3) faster, simpler and more compliant using *at syscalls.
jilles [Tue, 13 Oct 2009 20:58:22 +0000 (20:58 +0000)]
Make getcwd(3) faster, simpler and more compliant using *at syscalls.

It is no longer necessary to construct long paths consisting of repeated
"../" which may be slow to process and may exceed PATH_MAX.

14 years agoCompare pointer to NULL rather than 0.
bz [Tue, 13 Oct 2009 20:29:14 +0000 (20:29 +0000)]
Compare pointer to NULL rather than 0.

MFC after: 1 month

14 years agoImmediately after clearing a pending callout that didn't make it due
bz [Tue, 13 Oct 2009 20:22:12 +0000 (20:22 +0000)]
Immediately after clearing a pending callout that didn't make it due
to the lock we hold, disable interrupts, and announce to the firmware
that we are shutting down. Especially do this before disabling blocks.

This makes some types of machines with asf enabled no longer hang upon
boot, when we start configuring the interface.

PR: i386/96382, kern/100410, kern/122252, kern/116328
Reported by: erwin
Hardware provided by: TDC A/S
Reviewed by: stas
Tested by: stas

14 years agoSync with other GENERIC kernel configs:
jhb [Tue, 13 Oct 2009 19:04:01 +0000 (19:04 +0000)]
Sync with other GENERIC kernel configs:
- Move USB serial drivers earlier to match their placement in other kernel
  configs.
- Add descriptions to various USB drivers.
- Move the USB wireless drivers into a new section.
- Add ulscom to the list of USB serial drivers.

14 years agoMove the USB wireless drivers down into their own section next to the USB
jhb [Tue, 13 Oct 2009 19:02:03 +0000 (19:02 +0000)]
Move the USB wireless drivers down into their own section next to the USB
ethernet drivers.

Submitted by: Glen Barber  glen.j.barber @ gmail
MFC after: 1 month

14 years agoFix this module so it at least builds. Note that it isn't hooked up to
jhb [Tue, 13 Oct 2009 18:07:56 +0000 (18:07 +0000)]
Fix this module so it at least builds.  Note that it isn't hooked up to
the build however, and ubser(4) is also not present in any kernel configs
(including NOTES).

14 years agoAdd C message catalogue entries for newer errnos: EBADMSG, EMULTIHOP,
rwatson [Tue, 13 Oct 2009 17:57:06 +0000 (17:57 +0000)]
Add C message catalogue entries for newer errnos: EBADMSG, EMULTIHOP,
ENOLINK, EPROTO, ENOTCAPABLE.

Submitted by: Alan R. S. Bueno <alan.bsd at gmail.com>
MFC after: 3 days (most)

14 years agoCorrect typo: thetime -> the time
emaste [Tue, 13 Oct 2009 12:56:23 +0000 (12:56 +0000)]
Correct typo: thetime -> the time

PR: docs/139447
Submitted by: Guido Falsi  mad at madpilot dot net

14 years agoCorrect a copy/paste bug in a comment. lptclose() checks once a second to
jhb [Tue, 13 Oct 2009 12:23:28 +0000 (12:23 +0000)]
Correct a copy/paste bug in a comment.  lptclose() checks once a second to
see if the ppc hardware has gone idle rather than four times a second.

14 years agoProperly initialize the mesh conf capabilities byte.
rpaulo [Tue, 13 Oct 2009 10:43:17 +0000 (10:43 +0000)]
Properly initialize the mesh conf capabilities byte.

MFC after: 2 days

14 years agoEXPORT_SYMS is not, in fact, required, for a dependent module to access
rwatson [Tue, 13 Oct 2009 09:21:20 +0000 (09:21 +0000)]
EXPORT_SYMS is not, in fact, required, for a dependent module to access
non-static symbols in a module they depend on, so remove dtrace symbols
from nfsclient's EXPORT_SYMS again.

Suggested by: jhb

14 years agoMake number(6) build with WARNS=6.
ed [Tue, 13 Oct 2009 06:25:53 +0000 (06:25 +0000)]
Make number(6) build with WARNS=6.

14 years agoChase dependency changes in libgssapi_krb5 module introruced by
bland [Tue, 13 Oct 2009 05:38:08 +0000 (05:38 +0000)]
Chase dependency changes in libgssapi_krb5 module introruced by
revision r197995.

14 years agoUse printb() to display the "nd6 options=" line.
hrs [Mon, 12 Oct 2009 21:11:50 +0000 (21:11 +0000)]
Use printb() to display the "nd6 options=" line.

14 years agoWe haven't installed usbdevs for many moons now, and it doesn't work any
markm [Mon, 12 Oct 2009 21:10:28 +0000 (21:10 +0000)]
We haven't installed usbdevs for many moons now, and it doesn't work any
more anyway. Add it to the "obsolete" list.

14 years agoFix the 106/109 USB Japanese keyboard "underscore" issue.
hrs [Mon, 12 Oct 2009 19:19:08 +0000 (19:19 +0000)]
Fix the 106/109 USB Japanese keyboard "underscore" issue.
Sun Type 6 USB keyboard support added in rev 1.46 conflicted with
some scan codes used in Japanese keyboards because the scan code
conversion routine was ambiguous for the overlapped codes.

PR: ports/134005
Submitted by: YAMASHIRO Jun

14 years agoExport DTrace symbols from nfsclient so that dtnfsclient can get to them.
rwatson [Mon, 12 Oct 2009 18:59:31 +0000 (18:59 +0000)]
Export DTrace symbols from nfsclient so that dtnfsclient can get to them.
This fixes DTrace with nfsclient built as a module.

MFC after: 3 days
Reported by: markm

14 years agoAdd a MODULE_DEPEND() on the NFS client from dtnfsclient so that dtnfsclient
rwatson [Mon, 12 Oct 2009 18:58:42 +0000 (18:58 +0000)]
Add a MODULE_DEPEND() on the NFS client from dtnfsclient so that dtnfsclient
can access NFS client symbols.

MFC after: 3 days
Discussed with: kib
Reported by: markm

14 years ago- Do not assign a link-local address when ND6_IFF_IFDISABLED.
hrs [Mon, 12 Oct 2009 18:54:02 +0000 (18:54 +0000)]
- Do not assign a link-local address when ND6_IFF_IFDISABLED.
  Adding a tentative address is useless.

- Comment out a confused warning message when
  in6_ifattach_linklocal() fails.  This can occur when the
  interface does not support ioctl(SIOCAIFADDR) (interfaces
  associated with 802.11 wireless network device drivers, for
  example).

14 years agoLink GSS mechanics modules against libgssapi so they will not fail due
bland [Mon, 12 Oct 2009 17:10:51 +0000 (17:10 +0000)]
Link GSS mechanics modules against libgssapi so they will not fail due
unresolved symbol errors when in turn libgssapi was loaded with RTLD_LOCAL
flag set (which is the default).

Reviewed by: dfr, jhb
MFC after: 3 days

14 years agoImprove the description of sysctl "kern.sugid_coredump".
jkoshy [Mon, 12 Oct 2009 15:49:48 +0000 (15:49 +0000)]
Improve the description of sysctl "kern.sugid_coredump".

Submitted by: Mel Flynn <mel.flynn+fbsd.hackers at mailing.thruhere.net>
on -hackers

14 years agoUpdate for latest 802.11s changes in meshconf format.
rpaulo [Mon, 12 Oct 2009 14:51:19 +0000 (14:51 +0000)]
Update for latest 802.11s changes in meshconf format.

MFC after: 3 days

14 years agoFix a wrong initialization that snuck in the latest commit.
rpaulo [Mon, 12 Oct 2009 10:30:15 +0000 (10:30 +0000)]
Fix a wrong initialization that snuck in the latest commit.

MFC after: 3 days

14 years agoFix typo.
kib [Mon, 12 Oct 2009 10:09:48 +0000 (10:09 +0000)]
Fix typo.

Submitted by: rdivacky
MFC after: 1 month

14 years agoAnother 3.03 draft bit that I missed in the previous 802.11s stack
rpaulo [Mon, 12 Oct 2009 10:08:58 +0000 (10:08 +0000)]
Another 3.03 draft bit that I missed in the previous 802.11s stack
update. The Mesh Configuration IE has changed quite a bit. Refactor the
code to handle this change.

MFC after: 3 days

14 years agoScan for option ROMs on i386 and amd64 only.
marcel [Sun, 11 Oct 2009 20:42:26 +0000 (20:42 +0000)]
Scan for option ROMs on i386 and amd64 only.

14 years agoMake openat(2) a cancellation point.
jilles [Sun, 11 Oct 2009 20:19:45 +0000 (20:19 +0000)]
Make openat(2) a cancellation point.

This is required by POSIX and matches open(2).

Reviewed by: kib, jhb
MFC after: 1 month

14 years agoTweaks for sigqueue tests:
kib [Sun, 11 Oct 2009 17:04:13 +0000 (17:04 +0000)]
Tweaks for sigqueue tests:
- slightly adjust code for style, sort headers.
- in sigqtest2, print received signals, to make it easy to see why test
  failed.
- in sigqtest2, job_control_test(), cover a race by adding sleep after
  child stopped itself to allow for SIGCHLD due to stop and exit to not
  be coalesced.

MFC after: 2 weeks

14 years agoCurrently, when signal is delivered to the process and there is a thread
kib [Sun, 11 Oct 2009 16:49:30 +0000 (16:49 +0000)]
Currently, when signal is delivered to the process and there is a thread
not blocking the signal, signal is placed on the thread sigqueue. If
the selected thread is in kernel executing thr_exit() or sigprocmask()
syscalls, then signal might be not delivered to usermode for arbitrary
amount of time, and for exiting thread it is lost.

Put process-directed signals to the process queue unconditionally,
selecting the thread to deliver the signal only by the thread returning
to usermode, since only then the thread can handle delivery of signal
reliably. For exiting thread or thread that has blocked some signals,
check whether the newly blocked signal is queued for the process, and
try to find a thread to wakeup for delivery, in reschedule_signal(). For
exiting thread, assume that all signals are blocked.

Change cursig() and postsig() to look both into the thread and process
signal queues. When there is a signal that thread returning to usermode
could consume, TDF_NEEDSIGCHK flag is not neccessary set now. Do
unlocked read of p_siglist and p_pendingcnt to check for queued signals.

Note that thread that has a signal unblocked might get spurious wakeup
and EINTR from the interruptible system call now, due to the possibility
of being selected by reschedule_signals(), while other thread returned
to usermode earlier and removed the signal from process queue. This
should not cause compliance issues, since the thread has not blocked a
signal and thus should be ready to receive it anyway.

Reported by: Justin Teller <justin.teller gmail com>
Reviewed by: davidxu, jilles
MFC after: 1 month

14 years agoCorrect another typo. Actually save the condition register instead
nwhitehorn [Sun, 11 Oct 2009 16:44:58 +0000 (16:44 +0000)]
Correct another typo. Actually save the condition register instead
of overwriting r12 by mistake.

14 years agoCorrect a typo here and actually save DSISR instead of overwriting it.
nwhitehorn [Sun, 11 Oct 2009 16:41:39 +0000 (16:41 +0000)]
Correct a typo here and actually save DSISR instead of overwriting it.

14 years agoIn nanosleep(2), note that the calling thread is put to sleep, not the
kib [Sun, 11 Oct 2009 16:23:11 +0000 (16:23 +0000)]
In nanosleep(2), note that the calling thread is put to sleep, not the
whole process. Also explicitely name the parameter that specifies
sleep interval.

14 years agoRemove dupe.
des [Sun, 11 Oct 2009 14:27:33 +0000 (14:27 +0000)]
Remove dupe.

14 years ago- Catch SIGHUP to perform cleanup before exiting.
jh [Sun, 11 Oct 2009 12:32:25 +0000 (12:32 +0000)]
- Catch SIGHUP to perform cleanup before exiting.
- Exit if getch() returns with an error other than EINTR. Otherwise
  systat(1) may get stuck in an infinite loop if it doesn't receive
  SIGHUP when terminal closes. [1]
- Remove attempt to clear stdio error indicators. getch() doesn't use
  stdio, making it useless. [2]
- Remove unneeded masking of getch() return value. [2]

PR: bin/107171
Reviewed by: bde
Approved by: trasz (mentor)
Obtained from: OpenBSD [1]
Suggested by: bde [2]
MFC after: 1 month

14 years agoFix a race condition where a mutex was destroyed while sleeping on it.
tuexen [Sun, 11 Oct 2009 12:23:56 +0000 (12:23 +0000)]
Fix a race condition where a mutex was destroyed while sleeping on it.
Found while analyzing a report from julian. It might fix his bug.
Approved by: rrs (mentor)
MFC after: 3 days

14 years agoAdd locking around access to parent node, and bail out when the parent
delphij [Sun, 11 Oct 2009 07:03:56 +0000 (07:03 +0000)]
Add locking around access to parent node, and bail out when the parent
node is already freed rather than panicking the system.

PR: kern/122038
Submitted by: gk
Tested by: pho
MFC after: 1 week

14 years agoVirtualize the pfil hooks so that different jails may chose different
julian [Sun, 11 Oct 2009 05:59:43 +0000 (05:59 +0000)]
Virtualize the pfil hooks so that different jails may chose different
packet filters. ALso allows ipfw to be enabled on on ejail and disabled
on another. In 8.0 it's a global setting.

Sitting aroung in tree waiting to commit for: 2 months
MFC after: 2 months

14 years agoAdd support for Intel G41 chipset
rnoland [Sun, 11 Oct 2009 01:54:00 +0000 (01:54 +0000)]
Add support for Intel G41 chipset

Submitted by: Artyom Mirgorodsky <man@email.com.ua>
MFC after: 3 days

14 years agoAdd pci id's for Intel G41 chipset
rnoland [Sun, 11 Oct 2009 01:51:35 +0000 (01:51 +0000)]
Add pci id's for Intel G41 chipset

Submitted by: Artyom Mirgorodsky <man@email.com.ua>
MFC after: 3 days

14 years agoDocument errno codes added in r144530.
das [Sun, 11 Oct 2009 00:08:55 +0000 (00:08 +0000)]
Document errno codes added in r144530.

14 years agoAtheros EEPROM version 4K. This version is mostly based on version 1.4.
rpaulo [Sat, 10 Oct 2009 22:29:34 +0000 (22:29 +0000)]
Atheros EEPROM version 4K. This version is mostly based on version 1.4.
This is needed by the upcoming AR9285 support.
Information on the layout gathered from Linux ath9k.

Not yet connected to the build.

Tested by: Eugeny Dzhurinsky

14 years agoIn regards to the "Starting foo:" type messages at boot time, create and
dougb [Sat, 10 Oct 2009 22:17:03 +0000 (22:17 +0000)]
In regards to the "Starting foo:" type messages at boot time, create and
employ a more generic solution, and use it in the individual rc.d scripts
that also have an $rc_quiet test:

1. Add check_startmsgs() to rc.subr.
2. In the rc.d scripts that use rc_quiet (and rc.subr) substitute
variations of [ -z "$rc_quiet" ] with check_startmsgs
3. In savecore add a trailing '.' to the end of the message to make it
more consistent with other scripts.
4. In newsyslog remove a : before the terminal '.' since we do not expect
there to be anything printed out in between to make it more consistent.
5. In the following scripts change "quotes" to 'quotes' where no variables
exist in the message: savecore pf newsyslog
6. In the following scripts substitute if/then/fi for the simpler (and
more consistent) check_startmsgs &&: faith stf
7. In the following scripts separate the "Starting foo:" from the terminal
'.' to make them more consistent: moused hostname pf
8. In nfsclient move the message to its own line to avoid a style bug
9. In pf rc_quiet does not apply to the _stop method, so remove the
test there.
10. In motd add 'quotes' around the terminal '.' for consistency

14 years agoOrphaning provider with EXDEV seems weird; perhaps the author meant
trasz [Sat, 10 Oct 2009 21:49:04 +0000 (21:49 +0000)]
Orphaning provider with EXDEV seems weird; perhaps the author meant
ENXIO here?

14 years agoRefine r195509, instead of checking that vnode type is VBAD, that is
kib [Sat, 10 Oct 2009 21:17:30 +0000 (21:17 +0000)]
Refine r195509, instead of checking that vnode type is VBAD, that is
set quite late in the revocation path, properly verify that vnode is
not doomed before calling VOP.

Reported and tested by: Harald Schmalzbauer <h.schmalzbauer omnilan de>
MFC after: 3 days

14 years agoMap PIE binaries at non-zero base address.
kib [Sat, 10 Oct 2009 15:33:01 +0000 (15:33 +0000)]
Map PIE binaries at non-zero base address.

Discussed with: bz
Reviewed by: kan
Tested by: bz (i386, amd64), bsam (linux)
MFC after: some time

14 years agoDefine architectural load bases for PIE binaries. Addresses were selected
kib [Sat, 10 Oct 2009 15:31:24 +0000 (15:31 +0000)]
Define architectural load bases for PIE binaries. Addresses were selected
by looking at the bases used for non-relocatable executables by gnu ld(1),
and adjusting it slightly.

Discussed with: bz
Reviewed by: kan
Tested by: bz (i386, amd64), bsam (linux)
MFC after: some time

14 years agoDo not map segments of zero length.
kib [Sat, 10 Oct 2009 15:28:52 +0000 (15:28 +0000)]
Do not map segments of zero length.

Discussed with: bz
Reviewed by: kan
Tested by: bz (i386, amd64), bsam (linux)
MFC after: some time

14 years agoCalculate relocation base for the main object, and apply the relocation
kib [Sat, 10 Oct 2009 15:27:10 +0000 (15:27 +0000)]
Calculate relocation base for the main object, and apply the relocation
adjustment for all virtual addresses encoded into the ELF structures of
it. PIE binary could and should be loaded at non-zero mapbase.

For sym_zero pseudosymbol used as a return value from find_symdef()
for undefined weak symbols, st_value also should be adjusted, since
_rtld_bind corrects symbol values by relocbase.

Discussed with: bz
Reviewed by: kan
Tested by: bz (i386, amd64), bsam (linux)
MFC after: some time

14 years agoPostpone dropping fp till both kq_global and kqueue mutexes are
kib [Sat, 10 Oct 2009 14:56:34 +0000 (14:56 +0000)]
Postpone dropping fp till both kq_global and kqueue mutexes are
unlocked. fdrop() closes file descriptor when reference count goes to
zero. Close method for vnodes locks the vnode, resulting in "sleepable
after non-sleepable". For pipes, pipe mutex is before kqueue lock,
causing LOR.

Reported and tested by: pho
MFC after: 2 weeks

14 years agoCorrect include order as indicated by bz.
tuexen [Sat, 10 Oct 2009 13:59:18 +0000 (13:59 +0000)]
Correct include order as indicated by bz.

Approved by: re (mentor)
MFC after: 3 days

14 years agoFix typo which has survived amazingly long!
eri [Sat, 10 Oct 2009 03:32:46 +0000 (03:32 +0000)]
Fix typo which has survived amazingly long!

Approved by: mlaier(mentor)
MFC after: 3 days

14 years agoDo not include vnet.h twice.
tuexen [Fri, 9 Oct 2009 19:30:23 +0000 (19:30 +0000)]
Do not include vnet.h twice.

Approved by: rrs (mentor)
MFC after: 3 days

14 years agoatomic_cmpset_barr_* was added in order to cope with compilers willing to
attilio [Fri, 9 Oct 2009 15:51:40 +0000 (15:51 +0000)]
atomic_cmpset_barr_* was added in order to cope with compilers willing to
specify their own version of atomic_cmpset_* which could have been
different than the membar version.

Right now, however, FreeBSD is bound mostly to GCC-like compilers and
it is desired to add new support and compat shim mostly when there is
a real necessity, in order to avoid too much compatibility bloats.

In this optic, bring back atomic_cmpset_{acq, rel}_* to be the same as
atomic_cmpset_* and unwind the atomic_cmpset_barr_* introduction.

Requested by: jhb
Reviewed by: jhb
Tested by: Giovanni Trematerra <giovanni dot trematerra at
gmail dot com>

14 years agoImproved one-line description of this module (taken from NOTES).
brueffer [Fri, 9 Oct 2009 10:03:41 +0000 (10:03 +0000)]
Improved one-line description of this module (taken from NOTES).

14 years agoMerge upstream r421: grammar nit in pam.conf(5).
des [Fri, 9 Oct 2009 09:42:58 +0000 (09:42 +0000)]
Merge upstream r421: grammar nit in pam.conf(5).

14 years agoIf provider is open for writing when we taste it, skip it for classes that
pjd [Fri, 9 Oct 2009 09:42:22 +0000 (09:42 +0000)]
If provider is open for writing when we taste it, skip it for classes that
depend on on-disk metadata. This was we won't attach to providers that are used
by other classes. For example we don't want to configure partitions on da0 if
it is part of gmirror, what we really want is partitions on mirror/foo.

During regular work it works like this: if provider is open for writing a class
receives the spoiled event from GEOM and detaches, once provider is closed the
taste event is send again and class can rediscover its metadata if it is still
there.  This doesn't work that way when new class arrives, because GEOM gives
all existing providers for it to taste, also those open for writing. Classes
have to decided on their own if they want to deal with such providers (eg.
geom_dev) or not (classes modified by this commit).

Reported by: des, Oliver Lehmann <lehmann@ans-netz.de>
Tested by: des, Oliver Lehmann <lehmann@ans-netz.de>
Discussed with: phk, marcel
Reviewed by: marcel
MFC after: 3 days

14 years agoExport disk serial numbers for adaX disks.
pjd [Fri, 9 Oct 2009 09:29:59 +0000 (09:29 +0000)]
Export disk serial numbers for adaX disks.

Reviewed by: mav
MFC after: 3 days

14 years agoUse correct arguments when calling SCTP_RTALLOC().
tuexen [Thu, 8 Oct 2009 20:33:12 +0000 (20:33 +0000)]
Use correct arguments when calling SCTP_RTALLOC().

Approved by: rrs (mentor)
MFC after: 0 days

14 years agoProperly mark ZFS properties which are not changeable under FreeBSD.
trasz [Thu, 8 Oct 2009 19:45:37 +0000 (19:45 +0000)]
Properly mark ZFS properties which are not changeable under FreeBSD.

Reviewed by: pjd

14 years agoClean up amd64 suspend/resume code.
jkim [Thu, 8 Oct 2009 17:41:53 +0000 (17:41 +0000)]
Clean up amd64 suspend/resume code.

- Allocate memory for wakeup code after ACPI bus is attached.  The early
memory allocation hack was inherited from i386 but amd64 does not need it.
- Exclude real mode IVT and BDA explicitly.  Improve comments about memory
allocation and reason for the exclusions.  It is a no-op in reality, though.
- Remove an unnecessary CLD from wakeup code and re-align.

14 years agoAllow file system owner to modify system flags if securelevel permits.
pjd [Thu, 8 Oct 2009 16:05:17 +0000 (16:05 +0000)]
Allow file system owner to modify system flags if securelevel permits.

MFC after: 3 days

14 years agoFile system owner is when uid matches and jail matches.
pjd [Thu, 8 Oct 2009 16:03:19 +0000 (16:03 +0000)]
File system owner is when uid matches and jail matches.

MFC after: 3 days

14 years ago'aclmode' and 'aclinherit' properties should work as advertised; don't
trasz [Thu, 8 Oct 2009 15:34:01 +0000 (15:34 +0000)]
'aclmode' and 'aclinherit' properties should work as advertised; don't
refuse to set them.

14 years agoFix so that round robing stream scheduling works as advertised
rrs [Thu, 8 Oct 2009 11:36:06 +0000 (11:36 +0000)]
Fix so that round robing stream scheduling works as advertised

MFC after: 0 days

14 years agoDiscard Device Control Strings and Operating System Commands.
ed [Thu, 8 Oct 2009 10:26:49 +0000 (10:26 +0000)]
Discard Device Control Strings and Operating System Commands.

These strings often contain things like:

- Window titles.
- Extended key map functionality.
- Color palette switching.

We could look at these features in the future (if people consider them
to be important enough), but we'd better discard them now. This fixes
some artifacts people reported when using TERM=xterm.

Reported by: des@, Paul B. Mahol

14 years agoAdd a special workaround to handle UIO_NOCOPY case. This fixes data
delphij [Wed, 7 Oct 2009 23:17:15 +0000 (23:17 +0000)]
Add a special workaround to handle UIO_NOCOPY case.  This fixes data
corruption observed when sendfile() is being used.

PR: kern/127213
Submitted by: gk
MFC after: 2 weeks

14 years agoFix build on amd64.
delphij [Wed, 7 Oct 2009 23:01:31 +0000 (23:01 +0000)]
Fix build on amd64.

PR: misc/139409
Submitted by: gk

14 years agoClarify quoting of word in ${v=word} in sh(1).
jilles [Wed, 7 Oct 2009 22:21:53 +0000 (22:21 +0000)]
Clarify quoting of word in ${v=word} in sh(1).

14 years agoAdd the comment "(FreeBSD only)" to the altmonth_x keywords
edwin [Wed, 7 Oct 2009 21:14:45 +0000 (21:14 +0000)]
Add the comment "(FreeBSD only)" to the altmonth_x keywords

MFC after: 1 week

14 years agoOn FreeBSD it is enough to report provider removal when orphan event is
pjd [Wed, 7 Oct 2009 20:56:15 +0000 (20:56 +0000)]
On FreeBSD it is enough to report provider removal when orphan event is
received, we don't have to do it on every ENXIO error in I/O path.
Solaris has no GEOM so they have to handle it in a less clean way.

MFC after: 3 days

14 years agoFix white-spaces.
pjd [Wed, 7 Oct 2009 20:54:07 +0000 (20:54 +0000)]
Fix white-spaces.

MFC after: 3 days

14 years agoAdd a new errno, ENOTCAPABLE, to be returned when a process requests an
rwatson [Wed, 7 Oct 2009 20:20:51 +0000 (20:20 +0000)]
Add a new errno, ENOTCAPABLE, to be returned when a process requests an
operation on a file descriptor that is not authorized by the descriptor's
capability flags.

MFC after: 1 month
Sponsored by: Google

14 years agoHandle GRANTED_RES messages more gracefully: Send along a grant cookie
zml [Wed, 7 Oct 2009 19:50:14 +0000 (19:50 +0000)]
Handle GRANTED_RES messages more gracefully: Send along a grant cookie
to reference the lock, look up the grant cookie when the GRANTED_RES
comes back. Properly handle the case of an error on the grant. Add a
short expiration window so that granted locks are not freed immediately.

Approved by:        dfr (mentor)
MFC after:          2 weeks

14 years agoOn command timeout handle frozen command first, to not run it inside
mav [Wed, 7 Oct 2009 15:40:04 +0000 (15:40 +0000)]
On command timeout handle frozen command first, to not run it inside
XXX_end_transaction().

Submitted by: avg

14 years ago- Give a name to the host coalescing bug fix WDMA mode register bit instead
stas [Wed, 7 Oct 2009 14:29:48 +0000 (14:29 +0000)]
- Give a name to the host coalescing bug fix WDMA mode register bit instead
  of using hardcoded value in the code.
Obtained from: OpenBSD