]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoRegenerate system call files following r197636.
rwatson [Wed, 30 Sep 2009 08:48:59 +0000 (08:48 +0000)]
Regenerate system call files following r197636.

14 years agoReserve system call numbers for Capsicum security framework capabilities,
rwatson [Wed, 30 Sep 2009 08:46:01 +0000 (08:46 +0000)]
Reserve system call numbers for Capsicum security framework capabilities,
capability mode, and process descriptors: cap_new, cap_getrights, cap_enter,
cap_getmode, pdfork, pdkill, pdgetpid, and pdwait.

Obtained from: TrustedBSD Project
Sponsored by: Google
MFC after: 3 weeks

14 years agoFix multicast handling. All Atheros controllers use big-endian form
yongari [Tue, 29 Sep 2009 23:03:16 +0000 (23:03 +0000)]
Fix multicast handling. All Atheros controllers use big-endian form
in computing multicast hash.

PR: kern/139137

14 years agoFix using lp(1) without the new -t option after r194171.
jilles [Tue, 29 Sep 2009 21:28:32 +0000 (21:28 +0000)]
Fix using lp(1) without the new -t option after r194171.

PR: standards/129554
Tested by: Steve Kargl
MFC after: 1 week

14 years agoAdd audit events for process descriptor system calls, which will appear in
rwatson [Tue, 29 Sep 2009 21:25:59 +0000 (21:25 +0000)]
Add audit events for process descriptor system calls, which will appear in
a future OpenBSM release.

Sponsored by: Google
Obtained from: TrustedBSD Project
MFC after: 3 weeks

14 years agoFix bug, when RADIUS client gave up after single sendto() error, do not
mav [Tue, 29 Sep 2009 19:09:17 +0000 (19:09 +0000)]
Fix bug, when RADIUS client gave up after single sendto() error, do not
trying backup servers.

PR: kern/103764, misc/139214

14 years agoBy popular acclaim, enable "Starting foo:" messages by default
dougb [Tue, 29 Sep 2009 16:49:10 +0000 (16:49 +0000)]
By popular acclaim, enable "Starting foo:" messages by default

14 years agoSpecial-case "-r X" where X is [0-9.]+ to mean "-r X-RELEASE".
cperciva [Tue, 29 Sep 2009 16:26:09 +0000 (16:26 +0000)]
Special-case "-r X" where X is [0-9.]+ to mean "-r X-RELEASE".

Tripped over by: too many people to count
MFC after: 1 month

14 years agoFixed markup bugs.
ru [Tue, 29 Sep 2009 10:50:02 +0000 (10:50 +0000)]
Fixed markup bugs.

14 years agoAdd some bits of HDMI/DisplayPort support from later specification updates.
mav [Tue, 29 Sep 2009 09:36:38 +0000 (09:36 +0000)]
Add some bits of HDMI/DisplayPort support from later specification updates.
It may be not enough to make them work, but at least should give some
information about these beasts.

14 years agoThe first 96 bytes may not be zeroes. It can contain trivial boot
marcel [Mon, 28 Sep 2009 23:52:47 +0000 (23:52 +0000)]
The first 96 bytes may not be zeroes. It can contain trivial boot
code that merely emits an error and waits for a key press before
rebooting. The error being that extended partitions are not
bootable. The origin is presumed to be Windows 2000; Windows XP
does not do this...

For now, ignore the first 96 bytes when checking that the EBR is
(for the most part) all zeroes.

Tested by: Mario Lobo <mlobo@digiart.art.br>
MFC after: 1 week

14 years agoFix offset handling
rnoland [Mon, 28 Sep 2009 22:41:28 +0000 (22:41 +0000)]
Fix offset handling

MFC after: 1 week

14 years agoradeon_family is an enum, so ordering can be important.
rnoland [Mon, 28 Sep 2009 22:40:29 +0000 (22:40 +0000)]
radeon_family is an enum, so ordering can be important.

sync up with what amd is shipping.

MFC after: 1 week

14 years agoFix blit pitch for 4 byte transfers on r600.
rnoland [Mon, 28 Sep 2009 22:38:44 +0000 (22:38 +0000)]
Fix blit pitch for 4 byte transfers on r600.

MFC after: 1 week

14 years agoR600 doesn't support IRQs yet, so don't try to use them.
rnoland [Mon, 28 Sep 2009 22:37:07 +0000 (22:37 +0000)]
R600 doesn't support IRQs yet, so don't try to use them.

MFC after: 1 week

14 years agoFor AR8132 fast ethernet controller, do not report 1000baseT
yongari [Mon, 28 Sep 2009 22:18:38 +0000 (22:18 +0000)]
For AR8132 fast ethernet controller, do not report 1000baseT
capability to mii(4). Even though AR8132 uses the same model/
revision number of F1 gigabit PHY, the PHY has no ability to
establish 1000baseT link. I have no idea why Atheros use the same
device/model id for this PHY.
With this change atphy(4) does not report 1000baseT media
capability and manual 1000baseT configuration is also disabled
which is more desirable behavior for 10/100Mbps PHY.

14 years agoMFV of tzdata2009n
edwin [Mon, 28 Sep 2009 21:53:28 +0000 (21:53 +0000)]
MFV of tzdata2009n

Pakistan will go out DST on 1 October.
Headsup for changes in Argentina.

14 years agoDGE-560SX is now supported.
yongari [Mon, 28 Sep 2009 21:15:57 +0000 (21:15 +0000)]
DGE-560SX is now supported.

14 years agoAdd DGE-560SX(Yukon XL) to the supported device list. Many thanks
yongari [Mon, 28 Sep 2009 21:11:31 +0000 (21:11 +0000)]
Add DGE-560SX(Yukon XL) to the supported device list. Many thanks
to "Eugene Perevyazko <john <> dnepro dot net>" who kindly gave
remote access to system with DGE-560SX.

14 years agoAdd workaround for Yukon XL which has hardware bug that can't flush
yongari [Mon, 28 Sep 2009 21:07:19 +0000 (21:07 +0000)]
Add workaround for Yukon XL which has hardware bug that can't flush
FIFO.

14 years agoAdd hack to pass controller specific information to phy driver.
yongari [Mon, 28 Sep 2009 21:03:28 +0000 (21:03 +0000)]
Add hack to pass controller specific information to phy driver.
Unlike most other PHYs there is no easy way to know which media
type the PHY supports on Marvell PHYs. MIIF_HAVEFIBER flags is now
passed via bus-specific instance variable of a device. While I'm
here add 88E1112 specific work around to set SIGDET polarity low.
Many thanks "Eugene Perevyazko <john <> dnepro dot net>" who kindly
gave remote access to system with DGE-560SX.

14 years agoFix MIB statistics clear routine. This should fix alignment errors on sparc64.
yongari [Mon, 28 Sep 2009 20:03:37 +0000 (20:03 +0000)]
Fix MIB statistics clear routine. This should fix alignment errors on sparc64.

Reported by: Garrett Damore < gdamore <> opensolaris dot org >

14 years agoSome fiber PHY(88E1112) does not seem to set resolved speed so
yongari [Mon, 28 Sep 2009 19:53:53 +0000 (19:53 +0000)]
Some fiber PHY(88E1112) does not seem to set resolved speed so
always assume we've got IFM_1000_SX.

14 years agoDon't encode model id twice.
yongari [Mon, 28 Sep 2009 19:48:17 +0000 (19:48 +0000)]
Don't encode model id twice.

Reported by: Kristof Provost <kristof <> sigsegv dot be>

14 years agoIt seems some 82559ER controllers do not support Rx checksum
yongari [Mon, 28 Sep 2009 19:40:16 +0000 (19:40 +0000)]
It seems some 82559ER controllers do not support Rx checksum
offloading. Datasheet said nothing about the limitation of 82559ER
except WOL. Explicitly disable Rx checksum offloading for
controllers that is known to lack the capability.

PR: kern/138135
Tested by: Gooderum, Mark < mgooderum <> websense dot com >

14 years agoRemove unnecessary device reinitialization.
yongari [Mon, 28 Sep 2009 19:33:52 +0000 (19:33 +0000)]
Remove unnecessary device reinitialization.

14 years agoSet the prison in NFS anon and GSS SVC creds (as I indended to in r197581).
jamie [Mon, 28 Sep 2009 18:55:29 +0000 (18:55 +0000)]
Set the prison in NFS anon and GSS SVC creds (as I indended to in r197581).

Reviewed by: marcel

14 years agoBack out r197581, which replaced this file witk sys/kern/vfs_export.c.
jamie [Mon, 28 Sep 2009 18:54:26 +0000 (18:54 +0000)]
Back out r197581, which replaced this file witk sys/kern/vfs_export.c.

Who knew that "svn export" was an actual command, or that I would have
vfs_export.c stuck in my mind deep enough to type "export" instead of
"commit"?

Pointy Hat to:  jamie

14 years agoSet the prison in NFS anon and GSS SVC creds.
jamie [Mon, 28 Sep 2009 18:07:16 +0000 (18:07 +0000)]
Set the prison in NFS anon and GSS SVC creds.

Reviewed by: marcel
MFC after: 3 days

14 years agoTemporarily disable the use of 1GB page mappings by the direct map. There
alc [Mon, 28 Sep 2009 17:10:27 +0000 (17:10 +0000)]
Temporarily disable the use of 1GB page mappings by the direct map.  There
are currently two problems with the use of 1GB page mappings by the direct
map.  First, at least one device driver uses pmap_extract() rather than
DMAP_TO_PHYS() to translate a direct map address to a physical address.
Unfortunately, neither pmap_extract() nor pmap_kextract() yet support 1GB
page mappings.  Second, pmap_bootstrap() needs to interrogate the MTRRs to
ensure that a 1GB page mapping doesn't span two MTRRs of different types.

Reported and tested by: Daniel O'Connor
MFC after: 3 days

14 years agoAdd two new fcntls to enable/disable read-ahead:
delphij [Mon, 28 Sep 2009 16:59:47 +0000 (16:59 +0000)]
Add two new fcntls to enable/disable read-ahead:

 - F_READAHEAD: specify the amount for sequential access.  The amount is
   specified in bytes and is rounded up to nearest block size.
 - F_RDAHEAD: Darwin compatible version that use 128KB as the sequential
   access size.

A third argument of zero disables the read-ahead behavior.

Please note that the read-ahead amount is also constrainted by sysctl
variable, vfs.read_max, which may need to be raised in order to better
utilize this feature.

Thanks Igor Sysoev for proposing the feature and submitting the original
version, and kib@ for his valuable comments.

Submitted by: Igor Sysoev <is rambler-co ru>
Reviewed by: kib@
MFC after: 1 month

14 years agoUse correct sizeof() object for klist 'list'. Currently, struct klist
delphij [Mon, 28 Sep 2009 10:22:46 +0000 (10:22 +0000)]
Use correct sizeof() object for klist 'list'.  Currently, struct klist
contained only SLIST_HEAD as its member, thus sizeof(struct klist) would
equal to sizeof(struct klist *), so this change makes the code more
correct in terms of semantics, but should be a no-op to compiler at this
time.

Reported by: MQ <antinvidia at gmail com>

14 years agoFixed a markup bug.
ru [Mon, 28 Sep 2009 09:49:48 +0000 (09:49 +0000)]
Fixed a markup bug.

14 years agoAdd back endpoint swap detection that was disabled in an earlier driver
thompsa [Mon, 28 Sep 2009 08:18:14 +0000 (08:18 +0000)]
Add back endpoint swap detection that was disabled in an earlier driver
conversion.

Submitted by: Hans Petter Selasky

14 years agoAdd new FTDI IDs.
thompsa [Mon, 28 Sep 2009 08:15:26 +0000 (08:15 +0000)]
Add new FTDI IDs.

Submitted by: Maks Verver, Arrigo Marchiori

14 years agoUse a 2 clause BSD-style license instead of stating the code as public
delphij [Mon, 28 Sep 2009 08:14:15 +0000 (08:14 +0000)]
Use a 2 clause BSD-style license instead of stating the code as public
domain, as requested by core@ and reviewed by the author.

14 years agoAdd experimental support for usb serial console and polled mode during DDB.
thompsa [Mon, 28 Sep 2009 08:13:50 +0000 (08:13 +0000)]
Add experimental support for usb serial console and polled mode during DDB.

Submitted by: Hans Petter Selasky

14 years agoAdd a config number quirk for the ELSA_MODEM1
thompsa [Mon, 28 Sep 2009 08:09:11 +0000 (08:09 +0000)]
Add a config number quirk for the ELSA_MODEM1

Submitted by: Stefan Bethke

14 years agoadd more device IDs
thompsa [Mon, 28 Sep 2009 08:07:20 +0000 (08:07 +0000)]
add more device IDs

Reported by: Mike Tancsa
Submitted by: Hans Petter Selasky

14 years agoAllow setting of MAC address for AXE based ethernet adapters.
thompsa [Mon, 28 Sep 2009 08:05:14 +0000 (08:05 +0000)]
Allow setting of MAC address for AXE based ethernet adapters.

Submitted by: yongari

14 years agoIncrease the rx buffer size to 16384 bytes, this increases RX performance from
thompsa [Mon, 28 Sep 2009 08:03:52 +0000 (08:03 +0000)]
Increase the rx buffer size to 16384 bytes, this increases RX performance from
50Mbps to 220Mbps on PLANEX GU-1000T.

Submitted by: yongari

14 years ago- Remove SAMSUNG_YP_U2 now that it is in the cam layer
thompsa [Mon, 28 Sep 2009 08:00:17 +0000 (08:00 +0000)]
- Remove SAMSUNG_YP_U2 now that it is in the cam layer
- Add quirk from Tobias Grosser for Western Mypassword

Submitted by: Hans Petter Selasky

14 years agoMFp4
thompsa [Mon, 28 Sep 2009 07:57:23 +0000 (07:57 +0000)]
MFp4

Add new usbdev entries for Marvell, FTDI, Option and Western.

14 years agoAdd basic support for USB Network Control Model (NCM) v1.0 to if_cdce.c.
thompsa [Mon, 28 Sep 2009 07:53:55 +0000 (07:53 +0000)]
Add basic support for USB Network Control Model (NCM) v1.0 to if_cdce.c.

http://www.usb.org/developers/devclass_docs/NCM10.zip

Submitted by: Hans Petter Selasky

14 years agoAdd extra safety locking when clobbering xfer->flags_int.started in start and
thompsa [Mon, 28 Sep 2009 07:46:22 +0000 (07:46 +0000)]
Add extra safety locking when clobbering xfer->flags_int.started in start and
stop functions, because xfer->flags_int is also updated by the USB controller,
under the controller lock.

Submitted by: Hans Petter Selasky

14 years agoCorrect buffer sizes used so that they match. The old code could give the
thompsa [Mon, 28 Sep 2009 07:42:59 +0000 (07:42 +0000)]
Correct buffer sizes used so that they match. The old code could give the
impression that a overflow situation existed but was not possible.

Reported by: kib
Submitted by: Hans Petter Selasky

14 years agoStatic'ify internal methods and use prototype.
delphij [Mon, 28 Sep 2009 07:42:52 +0000 (07:42 +0000)]
Static'ify internal methods and use prototype.

14 years agoAdd support for USB language selection.
thompsa [Mon, 28 Sep 2009 07:41:17 +0000 (07:41 +0000)]
Add support for USB language selection.

PR: usb/138563
Reported by: Bruce Cran
Submitted by: Hans Petter Selasky

14 years agoFix NULL-pointer dereference in usb_endpoint_foreach().
thompsa [Mon, 28 Sep 2009 07:39:51 +0000 (07:39 +0000)]
Fix NULL-pointer dereference in usb_endpoint_foreach().

PR: usb/138389
Submitted by: Patroklos Argyroudis at census, inc

14 years agoAdd support for ChipHead 341 serial port adapter.
thompsa [Mon, 28 Sep 2009 07:32:11 +0000 (07:32 +0000)]
Add support for ChipHead 341 serial port adapter.

Submitted by: Hans Petter Selasky

14 years agoClear all interrupts rather than just SETUP packet.
thompsa [Mon, 28 Sep 2009 07:10:32 +0000 (07:10 +0000)]
Clear all interrupts rather than just SETUP packet.

Submitted by: Hans Petter Selasky

14 years agoSimplify logic around setting EHCI_QH_DTC and expand some htohc32(temp.sc, 0)
thompsa [Mon, 28 Sep 2009 07:09:17 +0000 (07:09 +0000)]
Simplify logic around setting EHCI_QH_DTC and expand some htohc32(temp.sc, 0)
statements to zero.

Submitted by: Hans Petter Selasky

14 years agoImport two PCI quirks from Linux
thompsa [Mon, 28 Sep 2009 07:06:47 +0000 (07:06 +0000)]
Import two PCI quirks from Linux

 - Add quirk for ATI SB600 and SB700 to free SMB controller
 - Correct schedule sleep time to 10us on the VIA ehci controller

Reported by: Dorian B<FC>ttner, Andriy Gapon
Submitted by: Hans Petter Selasky

14 years agoMFp4 @ 168387
thompsa [Mon, 28 Sep 2009 07:01:54 +0000 (07:01 +0000)]
MFp4 @ 168387

- clean up USB detach logic. There seems to be some problems detaching multiple
  USB HUBs connected in series from the root.

- after this patch the rule is:
  1) Always use device_detach() on the USB HUB first.
  2) Never just device_delete_child() on the USB HUB, because that function
  will traverse to all the device leaves and free them first, and then the USB
  stack will free the devices twice which doesn't work very well.

- make sure the did DMA delay gets set after the timeout has elapsed to make
  logic more clear. There is no functional difference.

Submitted by: Hans Petter Selasky

14 years agoSilence warning printed by getfsspec(3) when /etc/fstab does not exist
cperciva [Mon, 28 Sep 2009 03:32:35 +0000 (03:32 +0000)]
Silence warning printed by getfsspec(3) when /etc/fstab does not exist
  fstab: /etc/fstab:0: No such file or directory
and from dump(8) when setfsent(3) fails due to /etc/fstab not existing:
  DUMP: Can't open /etc/fstab for dump table information: No such...

This makes daily and security periodic runs somewhat cleaner in jails
which lack /etc/fstab files.

MFC after: 1 month

14 years agoFethch more information from IDENTIFY result.
mav [Sun, 27 Sep 2009 22:00:26 +0000 (22:00 +0000)]
Fethch more information from IDENTIFY result.

14 years ago- Add share/nls/gl_ES.ISO8859-1, which I forgot in my last commit
gabor [Sun, 27 Sep 2009 21:27:11 +0000 (21:27 +0000)]
- Add share/nls/gl_ES.ISO8859-1, which I forgot in my last commit

Submitted by: Andrzej Tobola <ato@iem.pw.edu.pl> (via private mail)

14 years agoAdd a simple C program to check mmap calls to various different addresses.
bz [Sun, 27 Sep 2009 21:03:33 +0000 (21:03 +0000)]
Add a simple C program to check mmap calls to various different addresses.
The most important test is the mapping fixed at address 0 depending on the
new sysctl.

Things will be updated and possibly converted to m4/.t style once the
details about the kernel patch will be shaken out.

Submitted by: simon (initial version)

14 years ago- When we run our trap cleanup handler, echo that we are running this
simon [Sun, 27 Sep 2009 21:01:07 +0000 (21:01 +0000)]
- When we run our trap cleanup handler, echo that we are running this
  handler to make it more clear why we are 'suddenly' running df,
  umount, and mdconfig.
- Remove trap handler again after we have unconfigured the memory
  device etc.  Before we could end up running the trap handler if a
  later stage failed, which was a bit confusing and not really useful.

MFC after: 2 weeks

14 years agoReport SATA 3.x devices.
mav [Sun, 27 Sep 2009 20:50:54 +0000 (20:50 +0000)]
Report SATA 3.x devices.

14 years agoAdd more defines from recent and not only specs.
mav [Sun, 27 Sep 2009 20:48:10 +0000 (20:48 +0000)]
Add more defines from recent and not only specs.

14 years agoAdd support for VT200-style mouse input.
ed [Sun, 27 Sep 2009 18:19:41 +0000 (18:19 +0000)]
Add support for VT200-style mouse input.

Right now if applications want to use the mouse on the command line,
they use sysmouse(4) and install a signal handler in the kernel to
deliver signals when mouse events arrive. This conflicts with my plan to
change to TERM=xterm, so implement proper VT200-style mouse input.

Because mouse input is now streamed through the TTY, it means you can
now SSH to another system on the console and use the mouse there as
well. The disadvantage of the VT200 mouse protocol, is that it doesn't
seem to generate events when moving the cursor. Only when pressing and
releasing mouse buttons.

There are different protocols as well, but this one seems to be most
commonly supported.

Reported by: Paul B. Mahol <onemda gmail com>
Tested with: vim(1)

14 years agoDo not allow mmap with the MAP_FIXED argument to map at address zero.
simon [Sun, 27 Sep 2009 14:49:51 +0000 (14:49 +0000)]
Do not allow mmap with the MAP_FIXED argument to map at address zero.
This is done to make it harder to exploit kernel NULL pointer security
vulnerabilities.  While this of course does not fix vulnerabilities,
it does mitigate their impact.

Note that this may break some applications, most likely emulators or
similar, which for one reason or another require mapping memory at
zero.

This restriction can be disabled with the security.bsd.mmap_zero
sysctl variable.

Discussed with: rwatson, bz
Tested by: bz (Wine), simon (VirtualBox)
Submitted by: jhb

14 years agoCopy apm(4) emulation from sys/i386/acpica/acpi_machdep.c and
jkim [Sun, 27 Sep 2009 14:00:16 +0000 (14:00 +0000)]
Copy apm(4) emulation from sys/i386/acpica/acpi_machdep.c and
install apm(8) and apm_bios.h on amd64.

14 years agoAdd '#define NFSCLIENT' into opt_nfs.h if the NFSCLIENT variable is 1
nyan [Sun, 27 Sep 2009 13:24:34 +0000 (13:24 +0000)]
Add '#define NFSCLIENT' into opt_nfs.h if the NFSCLIENT variable is 1
(the default is 1).

This makes the nfslockd module works for NFS client.

Reviewed by: dfr
MFC after: 3 days

14 years ago- Add Galician NLS catalog
gabor [Sun, 27 Sep 2009 13:16:38 +0000 (13:16 +0000)]
- Add Galician NLS catalog

14 years agoprinterr_reply() has never been used for as long as we've had this code in
des [Sat, 26 Sep 2009 23:05:01 +0000 (23:05 +0000)]
printerr_reply() has never been used for as long as we've had this code in
our tree (13+ years).  This is an excellent argument for aggressive use
of "static".

14 years agoUse ipv6if() when $rtadvd_interfaces="AUTO".
hrs [Sat, 26 Sep 2009 19:00:47 +0000 (19:00 +0000)]
Use ipv6if() when $rtadvd_interfaces="AUTO".

14 years agoMove rc.d/{stf,faith} to just before rc.d/routing.
hrs [Sat, 26 Sep 2009 19:00:20 +0000 (19:00 +0000)]
Move rc.d/{stf,faith} to just before rc.d/routing.

Pointed out by: tegge

14 years agoFix several logic bugs in the previous IPv6 variable change and
hrs [Sat, 26 Sep 2009 18:59:00 +0000 (18:59 +0000)]
Fix several logic bugs in the previous IPv6 variable change and
re-add $ipv6_enable support for backward compatibility.  From
UPDATING:

 1. To use IPv6, simply define $ifconfig_IF_ipv6 like $ifconfig_IF
    for IPv4.  For aliases, $ifconfig_IF_aliasN should be used.
    Note that both variables need the "inet6" keyword at the head.

    Do not set $ipv6_network_interfaces manually if you do not
    understand what you are doing.  It is not needed in most cases.

    $ipv6_ifconfig_IF and $ipv6_ifconfig_IF_aliasN still work, but
    they are obsolete.

 2. $ipv6_enable is obsolete.  Use $ipv6_prefer and/or
    "inet6 accept_rtadv" keyword in ifconfig(8) instead.

    If you define $ipv6_enable=YES, it means $ipv6_prefer=YES and
    all configured interfaces have "inet6 accept_rtadv" in the
    $ifconfig_IF_ipv6.  These are for backward compatibility.

 3. A new variable $ipv6_prefer has been added.  If NO, IPv6
    functionality of interfaces with no corresponding
    $ifconfig_IF_ipv6 is disabled by using "inet6 ifdisabled" flag,
    and the default address selection policy of ip6addrctl(8)
    is the IPv4-preferred one (see rc.d/ip6addrctl for more details).
    Note that if you want to configure IPv6 functionality on the
    disabled interfaces after boot, first you need to clear the flag by
    using ifconfig(8) like:

         ifconfig em0 inet6 -ifdisabled

    If YES, the default address selection policy is set as
    IPv6-preferred.

    The default value of $ipv6_prefer is NO.

 4. If your system need to receive Router Advertisement messages,
    define "inet6 accept_rtadv" in $ifconfig_IF_ipv6.  The rc(8)
    scripts automatically invoke rtsol(8) when the interface becomes
    UP.  The Router Advertisement messages are used for SLAAC
    (State-Less Address AutoConfiguration).

14 years agoEnsure that tv_sec is between INT32_MIN and INT32_MAX, so ZFS won't object.
pjd [Sat, 26 Sep 2009 18:23:16 +0000 (18:23 +0000)]
Ensure that tv_sec is between INT32_MIN and INT32_MAX, so ZFS won't object.
This completes the fix from r185586.

PR: kern/139059
Reported by: Daniel Braniss <danny@cs.huji.ac.il>
Submitted by: Jaakko Heinonen <jh@saunalahti.fi>
Tested by: Daniel Braniss <danny@cs.huji.ac.il>
MFC after: 3 days

14 years agoMake malloc(3) superpage aware. Specifically, if getpagesizes(3) returns
alc [Sat, 26 Sep 2009 18:20:40 +0000 (18:20 +0000)]
Make malloc(3) superpage aware.  Specifically, if getpagesizes(3) returns
a large page size that is greater than malloc(3)'s default chunk size but
less than or equal to 4 MB, then increase the chunk size to match the large
page size.

Most often, using a chunk size that is less than the large page size is not
a problem.  However, consider a long-running application that allocates and
frees significant amounts of memory.  In particular, it frees enough memory
at times that some of that memory is munmap()ed.  Up until the first
munmap(), a 1MB chunk size is just fine; it's not a problem for the virtual
memory system.  Two adjacent 1MB chunks that are aligned on a 2MB boundary
will be promoted automatically to a superpage even though they were
allocated at different times.  The trouble begins with the munmap(),
releasing a 1MB chunk will trigger the demotion of the containing superpage,
leaving behind a half-used 2MB reservation.  Now comes the real problem.
Unfortunately, when the application needs to allocate more memory, and it
recycles the previously munmap()ed address range, the implementation of
mmap() won't be able to reuse the reservation.  Basically, the coalescing
rules in the virtual memory system don't allow this new range to combine
with its neighbor.  The effect being that superpage promotion will not
reoccur for this range of addresses until both 1MB chunks are freed at some
point in the future.

Reviewed by: jasone
MFC after: 3 weeks

14 years agoPromote the cpu_class local variable to global and expose it in md_var.h
rpaulo [Sat, 26 Sep 2009 16:37:23 +0000 (16:37 +0000)]
Promote the cpu_class local variable to global and expose it in md_var.h

Reviewed by: freebsd-arm

14 years agoAdd 256 color support.
ed [Sat, 26 Sep 2009 15:26:32 +0000 (15:26 +0000)]
Add 256 color support.

It is quite inconvenient that if an application for xterm uses 256 color
mode, text suddenly starts to blink (because of ;5; in the middle).
We'd better just implement 256 color mode and add a conversion routine
from 256 to 8 color mode, which doesn't seem to be too bad in practice.

Remapping colors is done quite simple. If one of the channels is most
actively represented, primary colors are used. If two channels are most
actively represented, secondary colors are used. If all three channels
are equal (gray), it picks between black and white.

Reported by: Paul B. Mahol <onemda gmail com>

14 years agoProperly get out of origin mode if the cursor has to move outside of it.
ed [Sat, 26 Sep 2009 15:07:11 +0000 (15:07 +0000)]
Properly get out of origin mode if the cursor has to move outside of it.

In some cases events may occur that move the cursor outside the
scrolling region while in origin mode, which is normally not possible.
Events like these include:

- Alignment test.
- Restore cursor.

Properly switch off origin mode in these cases.

MFC after: 1 month

14 years agoGet rid of now deprecated SCS wrappers.
ed [Sat, 26 Sep 2009 15:03:42 +0000 (15:03 +0000)]
Get rid of now deprecated SCS wrappers.

We always build SCS, even when processing 8-bit data. There is no reason
why we should be able to disable it now.

14 years agoMake the fuzzer a bit more useful by forcing 7-bit data into it.
ed [Sat, 26 Sep 2009 15:00:42 +0000 (15:00 +0000)]
Make the fuzzer a bit more useful by forcing 7-bit data into it.

Getting valid UTF-8 sequences is quite unlikely, so we'd better just
convert data to 7 bits and make it extra likely for escape sequences to
occur.

14 years agolindev(4) [1] is supposed to be a collection of linux-specific pseudo
bz [Sat, 26 Sep 2009 12:45:28 +0000 (12:45 +0000)]
lindev(4) [1] is supposed to be a collection of linux-specific pseudo
devices that we also support, just not by default (thus only LINT or
module builds by default).

While currently there is only "/dev/full" [2], we are planning to see more
in the future.  We may decide to change the module/dependency logic in the
future should the list grow too long.

This is not part of linux.ko as also non-linux binaries like kFreeBSD
userland or ports can make use of this as well.

Suggested by: rwatson [1] (name)
Submitted by: ed [2]
Discussed with: markm, ed, rwatson, kib (weeks ago)
Reviewed by: rwatson, brueffer (prev. version)
PR: kern/68961
MFC after: 6 weeks

14 years agoHandle cases where virtual (GFS) vnodes are referenced when doing forced
pjd [Sat, 26 Sep 2009 00:10:45 +0000 (00:10 +0000)]
Handle cases where virtual (GFS) vnodes are referenced when doing forced
unmount. In that case we cannot depend on the proper order of invalidating
vnodes, so we have to free resources when we have a chance.

PR: kern/139062
Reported by: trasz
MFC after: 3 days

14 years agoOn lookup error VFS expects *vpp to be set to NULL, be sure to do that.
pjd [Sat, 26 Sep 2009 00:08:44 +0000 (00:08 +0000)]
On lookup error VFS expects *vpp to be set to NULL, be sure to do that.

MFC after: 3 days

14 years agoUse traverse() function to find and return mount point's vnode instead of
pjd [Sat, 26 Sep 2009 00:07:14 +0000 (00:07 +0000)]
Use traverse() function to find and return mount point's vnode instead of
covered vnode when snapshot is already mounted.

MFC after: 3 days

14 years ago- Don't depend on value returned by gfs_*_inactive(), it doesn't work
pjd [Sat, 26 Sep 2009 00:04:30 +0000 (00:04 +0000)]
- Don't depend on value returned by gfs_*_inactive(), it doesn't work
  well with forced unmounts when GFS vnodes are referenced.
- Make other preparations to GFS for forced unmounts.

PR: kern/139062
Reported by: trasz
MFC after: 3 days

14 years agoWipe out mergeinfo.
des [Fri, 25 Sep 2009 23:14:43 +0000 (23:14 +0000)]
Wipe out mergeinfo.

14 years agoOther minor style issues.
des [Fri, 25 Sep 2009 23:03:24 +0000 (23:03 +0000)]
Other minor style issues.

14 years agoSlight style cleanup.
des [Fri, 25 Sep 2009 22:20:30 +0000 (22:20 +0000)]
Slight style cleanup.

14 years agoFix couple of style nits missed in the previous commit.
jkim [Fri, 25 Sep 2009 20:06:31 +0000 (20:06 +0000)]
Fix couple of style nits missed in the previous commit.

14 years ago- Use x86bios_offset() instead of BIOS_PADDRTOVADDR() macro.[1]
jkim [Fri, 25 Sep 2009 19:49:07 +0000 (19:49 +0000)]
- Use x86bios_offset() instead of BIOS_PADDRTOVADDR() macro.[1]
- Clear all registers before calling real mode interrupt handlers as we did
for dpms and vesa and re-enable the function as it should be fixed by this.
- Tidy up register access.  For example, when we call INT 0x15, AH=0xc0,
we used to initialize AX=0xc000 to clear AL at the same time but it is
very confusing.  We don't have to do this any more because we are explicitly
clearing all registers now.
- Check size of system configuration table although it is almost always 8.
This is to make sure we are not reading some random low physical memory.
Hopefully it is just zero in that case. :-)
- Fix some style nits and add more comments.

Submitted by: paradox (ddkprog yahoo com)[1]

14 years agoFletcher4 is not the default checksum algorithm.
pjd [Fri, 25 Sep 2009 18:24:21 +0000 (18:24 +0000)]
Fletcher4 is not the default checksum algorithm.

MFC after: 3 days

14 years agoSwitch to fletcher4 as the default checksum algorithm. Fletcher2 was proven to
pjd [Fri, 25 Sep 2009 18:19:50 +0000 (18:19 +0000)]
Switch to fletcher4 as the default checksum algorithm. Fletcher2 was proven to
be a bit weak and OpenSolaris also switched to fletcher4.

PR: kern/139072
Reported by: Daniel Grund <bugs@dgrund.de>
MFC after: 3 days

14 years agoReject some VESA graphics modes if the controller does not have enough
jkim [Fri, 25 Sep 2009 18:08:38 +0000 (18:08 +0000)]
Reject some VESA graphics modes if the controller does not have enough
memory to support them.  Some adapters have expansible memory slots but
video mode table is static.  In this case, unusable modes may be reported.

Submitted by: paradox (ddkprog yahoo com) (initial patch)

14 years ago- Reduce BIOS memory mapping. We want 1MB of physical memory, not 12MB[1].
jkim [Fri, 25 Sep 2009 17:56:32 +0000 (17:56 +0000)]
- Reduce BIOS memory mapping.  We want 1MB of physical memory, not 12MB[1].
- Remove CS and IP registers from x86bios.h.  They have no use for us.
- Adjust register dump to make it little bit more useful for debugging.

Submitted by: paradox (ddkprog yahoo com)[1] (initial version)

14 years agoMerge r194204 from amd64/i386:
marius [Fri, 25 Sep 2009 17:08:51 +0000 (17:08 +0000)]
Merge r194204 from amd64/i386:

Enable PRINTF_BUFR_SIZE by default.

PR: 139134
MFC after: 3 days

14 years agoAdd a new escape sequence to switch between cons25 and xterm.
ed [Fri, 25 Sep 2009 13:51:01 +0000 (13:51 +0000)]
Add a new escape sequence to switch between cons25 and xterm.

Just run this to switch to xterm:

printf '\e[=T'

If you get bored and want to switch back to cons25, run this:

printf '\e[=1T'

I can now send an email to the lists, asking whether people are
interested in trying the xterm emulator.

14 years agoConformance: ignore {delete,insert} line while outside the scrolling region.
ed [Fri, 25 Sep 2009 11:58:51 +0000 (11:58 +0000)]
Conformance: ignore {delete,insert} line while outside the scrolling region.

I noticed a small inconsistency in delete and insert line between xterm
and libteken. libteken allows these actions to happen while the cursor
is placed outside the scrolling region, while xterm does not.

This behaviour seems to be VT100-like. Confirmation:

http://www.vt100.net/docs/vt102-ug/chapter5.html
"This sequence is ignored when cursor is outside scrolling region."

MFC after: 1 month

14 years agoFix LINT build.
delphij [Fri, 25 Sep 2009 02:19:57 +0000 (02:19 +0000)]
Fix LINT build.

14 years agodon't report error if key was deleted.
davidxu [Fri, 25 Sep 2009 00:15:30 +0000 (00:15 +0000)]
don't report error if key was deleted.

PR: threads/135462

14 years agoIn function do_rw_wrlock, when a writer got an error and before returning,
davidxu [Fri, 25 Sep 2009 00:03:13 +0000 (00:03 +0000)]
In function do_rw_wrlock, when a writer got an error and before returning,
check if there are readers blocked by us via URWLOCK_WRITE_WAITERS flag,
and resume the readers. The error must be EAGAIN, otherwise there must
have memory problem, and nobody can rescue the buggy application.

The revision 197445 might be reverted.

14 years agoDump real mode registers under bootverbose to help debugging BIOS emulator.
jkim [Thu, 24 Sep 2009 22:42:35 +0000 (22:42 +0000)]
Dump real mode registers under bootverbose to help debugging BIOS emulator.

14 years agoAdd __unused.
ed [Thu, 24 Sep 2009 20:34:44 +0000 (20:34 +0000)]
Add __unused.

It turns out my previous commit does survive a buildkernel, but not
compilation of the individual test tools that use WARNS=6.

14 years agoMake SCS work in 8-bit mode.
ed [Thu, 24 Sep 2009 20:33:14 +0000 (20:33 +0000)]
Make SCS work in 8-bit mode.

This means we can finally do things like VT100 box drawing when using
Syscons (8-bit characters). As far as I know, the only remaining issue
is the absense of proper escape sequences for special keyboard
characters (cursor, F1 to F12, etc) and xterm emulation should be ready
for general use.

Enabling xterm would have the following advantages:

- Easier possible migration to Unicode. cons25 termcap entries are very
  8-bit centric. They use things like CP437 characters for box drawing,
  etc.

- Better support for SSH'ing to other operating systems/devices. Most
  switches use VT100-style admin interfaces.

- Reduced bandwidth, because applications can now use things like
  scrolling regions.

- You can finally use applications like dtach(1) on both the console and
  inside an xterm.