Sascha Wildner [Sun, 20 Apr 2014 14:38:10 +0000 (16:38 +0200)]
Remove support for the IPX and NCP protocols, and for NWFS.
This was on the list for a longer time now. FreeBSD removed it
recently, too. Their commit msg has some more info:
"IPX was a network transport protocol in Novell's NetWare network
operating system from late 80s and then 90s. The NetWare itself
switched to TCP/IP as default transport in 1998. Later, in this
century the Novell Open Enterprise Server became successor of
Novell NetWare. The last release that claimed to still support
IPX was OES 2 in 2007. Routing equipment vendors (e.g. Cisco)
discontinued support for IPX in 2011."
The commit removes support for NCP (NetWare Core Protocol) and
NWFS (NetWare File System) along with it (both gone from FreeBSD
too since a while).
Sascha Wildner [Sun, 20 Apr 2014 12:04:41 +0000 (14:04 +0200)]
route.8: Remove NS remains.
Sascha Wildner [Sun, 20 Apr 2014 11:43:15 +0000 (13:43 +0200)]
Remove some XEROX Network Systems (NS) protocol remains.
We removed most of it in 2011 (
62b5ec1d702a90f4c4f06347b3ad258a29ff8929).
Matthew Dillon [Sun, 20 Apr 2014 03:56:14 +0000 (20:56 -0700)]
hammer2 - more dmsg/separation work, add nmasters field to inode
* More separation and stability work
* Remove unused HAMMER2_OPFLAG_SUPROOT (the super-root can be
distinguished by pfs_type).
* Add pfs_nmasters field to the inode structure. This will be
used to record how many hard masters a PFS has so the
cluster code can determine the status of the cluster.
Matthew Dillon [Sun, 20 Apr 2014 03:55:28 +0000 (20:55 -0700)]
dmsg, hammer2 - refactor remove hammer2-specific code
* More cleanups in libdmsg and various hammer2 utilities
* Stability pass, get the hammer2 service demon working again.
Matthew Dillon [Sun, 20 Apr 2014 00:56:57 +0000 (17:56 -0700)]
hammer2 - Revise newfs_hammer2
* Bring newfs_hammer2 up-to-date with the cluster mechanics I intend to use
for the filesytem.
Generally change the default label from "ROOT" to "LOCAL", the intention
being that all formatted volumes will at least mount device@LOCAL in order
to make a HAMMER2 volume available to the cluster protocol. Once the
volume is made available, the intension is to then allow other PFSs can
be created/deleted/managed via the cluster protocol.
newfs_hammer2 will also create a BOOT and ROOT PFS by default, intended for
simple non-clustered configurations, and the -L label option works
differently now.
* Generally speaking, all block devices to be used in the cluster must be
formatted with newfs_hammer2. A formatted HAMMER2 volume can be used to
host any number of PFSs (Pseudo-FileSystems). Each PFS is independent
and can be part of different clusters.
Markus Pfeiffer [Sat, 19 Apr 2014 20:52:42 +0000 (21:52 +0100)]
kernel: fix buildkernel by adding include to subr_diskiocom.c
Include vfs/hammer2/hammer2_disk.h to sys/kern/subr_diskiocom.c
Matthew Dillon [Sat, 19 Apr 2014 19:55:21 +0000 (12:55 -0700)]
hammer2 - refactor libdmsg volume configuration
* Move the libdmsg volume configuration structures and commands, which
are hammer2-specific, over to hammer2.
Matthew Dillon [Sat, 19 Apr 2014 19:52:38 +0000 (12:52 -0700)]
libdmsg - refactor remove hammer2-specific code
* Remove hammer2-specific code.
* Refactor the callback API to allow the hammer service code to handle
the H2-specific LNK_CONN commands... mostly VOLCONF.
Sascha Wildner [Sat, 19 Apr 2014 17:58:44 +0000 (19:58 +0200)]
Exclude libdmsg temporarily from the build until it is fixed.
Requested-by: dillon
Antonio Huete Jimenez [Tue, 15 Apr 2014 14:20:16 +0000 (16:20 +0200)]
netinet/in - Fix yet another NULL pointer panic.
DragonFly-bug: <http://bugs.dragonflybsd.org/issues/2662>
Submitted-by: Vasily Postnicov
This commit closes #2662
François Tigeot [Sat, 19 Apr 2014 08:32:03 +0000 (10:32 +0200)]
passwd(1): Allow password changes for PAM users
* passwd(1) previously only allowed changes for local or NIS users, which
doesn't make sense
* Fixes FreeBSD PR bin/59638
http://www.freebsd.org/cgi/query-pr.cgi?pr=59638
* Tested with a DragonFly (password change) and a Debian system (login)
Matthew Dillon [Sat, 19 Apr 2014 00:37:12 +0000 (17:37 -0700)]
hammer2 - Shift dmsg structures around
* Shift dmsg structures around so sys/dmsg.h does not contain hammer2-specific
structures. Move those structures to hammer2_disk.h
Sascha Wildner [Thu, 17 Apr 2014 13:21:31 +0000 (15:21 +0200)]
urtwn.4: Fix synopsis (usb4bsd -> usb).
John Marino [Thu, 17 Apr 2014 07:06:17 +0000 (09:06 +0200)]
Dynamic root: Add "/lib" to gold and ld linker search paths
This fixes numerous new dports failures seen during linking.
Sascha Wildner [Wed, 16 Apr 2014 17:40:07 +0000 (19:40 +0200)]
mount{,d}(8): Use the pidfile(3) API for handling mountd's PID file.
Taken-from: FreeBSD
Matthew Dillon [Wed, 16 Apr 2014 17:01:14 +0000 (10:01 -0700)]
libthread_xu - Clean up the red zone on library unload
* If the main program is not linked against -pthread but dynamically
loads a shared library that is via dlopen(), then dlclose()'s it,
libthread_xu leaves red-zone and cached thread stacks dangling.
The second attempt to (indirectly) load libthread_xu then fails with a
red-zone panic.
* Add a destructor for libthread_xu to unmap the red-zone and to clean out
any cached thread stacks.
* Note that neither libthread_xu nor most other large libraries are designed
to be unloaded. That is, even if loading/unloading works, numerous libraries
will almost certainly leak memory. This change prevents the fatal error but
doesn't fix the general memory leakage problem.
IMHO Only libraries designed to be unloadable should be unloaded.
Reported-by: Vasily Postnicov <shamaz.mazum@gmail.com>
Sascha Wildner [Wed, 16 Apr 2014 16:34:59 +0000 (18:34 +0200)]
Fix a number of typos in messages and manual pages.
François Tigeot [Wed, 16 Apr 2014 08:47:14 +0000 (10:47 +0200)]
initrd: Fix installation during make release
* mkinitrd needs to know ramdisk images are to be installed in
${DESTDIR}/boot/kernel and not just /boot/kernel
* ${DESTDIR}/boot/kernel also has to exist first. Create it with
mtree(8)
Sascha Wildner [Tue, 15 Apr 2014 20:10:29 +0000 (22:10 +0200)]
loader/acpi: Fix/remove some comments and remove a misleading error msg.
Sascha Wildner [Tue, 15 Apr 2014 20:07:27 +0000 (22:07 +0200)]
acpi: machdep.acpi_root should have the RSDP, so taking that should be fine.
Sascha Wildner [Tue, 15 Apr 2014 19:28:49 +0000 (21:28 +0200)]
kernel/acpi: In the OS dependent layer, sync the debug code w/ FreeBSD.
* Remove an unused function.
* Enter the debugger only when ACPI_DEBUG is set.
* Fix indent and whitespace.
Sascha Wildner [Tue, 15 Apr 2014 19:24:05 +0000 (21:24 +0200)]
initrd: Not everyone keeps their source in /usr/src.
Sascha Wildner [Tue, 15 Apr 2014 16:53:57 +0000 (18:53 +0200)]
units(1): Sync the manual page with FreeBSD too.
While here, add back units.c's SVN ID.
François Tigeot [Tue, 15 Apr 2014 08:06:38 +0000 (10:06 +0200)]
Dynamic root: Remove old libraries from /usr/lib
Sascha Wildner [Tue, 15 Apr 2014 07:33:22 +0000 (09:33 +0200)]
Update the pciconf(8) database.
April 14, 2014 snapshot from http://pciids.sourceforge.net/
Eitan Adler [Mon, 14 Apr 2014 22:40:55 +0000 (15:40 -0700)]
units(1): bring in latest changes from FreeBSD
In the interest of further compatibility with GNU units this brings in:
: -U for units file
: -v for verbose
: -V for version
: libedit support
: -f support for multiple files
And other additional improvements.
Note that this introduces a breaking change from prior: -V and -v have been swapped (and a new -v has been added).
YONETANI Tomokazu [Mon, 14 Apr 2014 21:51:29 +0000 (06:51 +0900)]
Fix typo
Eitan Adler [Mon, 14 Apr 2014 20:58:32 +0000 (13:58 -0700)]
units(1): update to the latest library from FreeBSD
This brings some new units along with enhanced compatibility with GNU units(1).
Sascha Wildner [Mon, 14 Apr 2014 21:06:12 +0000 (23:06 +0200)]
kernel: Sync ACPICA with Intel's version
20140325.
As far as I can see, the most important change is a fix for the auto-
serialization of control methods so that the currently executing AML
SyncLevel is ignored when invoking such a method. This fixes an issue
seen in some systems showing AE_AML_MUTEX exceptions since
20140214
which had to set hw.acpi.auto_serialize_methods to 0 to work around
the issue.
This was actually reported for DragonFly by Andrey Oktyabrskiy (see
http://lists.dragonflybsd.org/pipermail/users/2014-February/109376.html).
See sys/contrib/dev/acpica/changes.txt for a complete list of all
changes.
François Tigeot [Mon, 14 Apr 2014 10:20:43 +0000 (12:20 +0200)]
buildsystem: Fix libfoo.so links for /lib libraries
* When installing to a non-default location by using DESTDIR on the make
installworld command line, /usr/lib/libfoo.so links pointed to wrong
locations
* DESTDIR is used both as an installworld parameter and internally by the
build system and these two cases expect different behaviors
* Symlinks locations in /usr/obj must be relative to the host (builder)
filesystem namespace
libc.so -> /usr/obj/usr/src/world_x86_64/lib/libc.so
* Symlinks locations in the final destination directory must be relative to
the target world filesystem namespace
libc.so -> /lib/libc.so
* The symlinks themselves must be absolute in order to not break
installations where /usr is a symlink
Inspired-by: FreeBSD's historical transition to /lib
François Tigeot [Sun, 13 Apr 2014 07:03:10 +0000 (09:03 +0200)]
Dynamic root: Move required libraries to /lib
* Add /lib to the standard run-time loader library search path
* Ensure libxxx.so symbolic links stay in /usr/lib, the build
tools won't pick them up in /lib
François Tigeot [Sun, 13 Apr 2014 07:01:55 +0000 (09:01 +0200)]
Dynamic root: Build /bin and /sbin dynamically
* Introduce a NO_DYNAMICROOT variable for people wanting to keep
fully static /bin and /sbin directories
* Keep building /sbin/init statically
* Keep a few other binaries static to avoid moving too many libraries
to /lib and/or creating many symlinks.
Those few binaries do not handle user names and thus don't need to be
NSS aware/dynamically linked.
* In particular, keeping udevd static allow us to avoid moving libpthread
and its associated links to libc_r or libthread_xu
François Tigeot [Sat, 12 Apr 2014 06:41:54 +0000 (08:41 +0200)]
Dynamic root: Move ld-elf.so.2 to /libexec
* Install it first to avoid breaking upgrades for systems previously
having it located in /usr/libexec. install(1), beeing a dynamic binary,
needs it at runtime.
* Since ld-elf.so.2's path is embedded in ELF binaries, also create a
symbolic link in the old location to support existing binaries.
* Code to handle chflags attributes obtained from FreeBSD.
François Tigeot [Sat, 12 Apr 2014 06:18:31 +0000 (08:18 +0200)]
Dynamic root: Create /lib and /libexec
Make the installer also install these directories
Matthew Dillon [Fri, 11 Apr 2014 21:37:13 +0000 (14:37 -0700)]
buildworld - Make auto-backup smarter.
* Do not try to auto-backup the world if the backup location is
read-only.
François Tigeot [Fri, 11 Apr 2014 19:33:30 +0000 (21:33 +0200)]
Create and install an initial ramdisk image
* This initrd can be used to mount encrypted filesystems or as a
minimal rescue system
* Existing initrd.img files will be removed by make upgrade; the
new ramdisk images are compressed and named initrd.img.gz
Sascha Wildner [Fri, 11 Apr 2014 10:06:41 +0000 (12:06 +0200)]
kernel/acpi: Add back another needed include. That should be all.
Sascha Wildner [Fri, 11 Apr 2014 07:55:39 +0000 (09:55 +0200)]
kernel/acpi: Add back two includes which are needed.
Sascha Wildner [Thu, 10 Apr 2014 21:39:21 +0000 (23:39 +0200)]
kernel/acpi: Move strstr() to libkern.
While here, clean up unneeded includes from acdragonfly.h too.
Sascha Wildner [Thu, 10 Apr 2014 19:07:10 +0000 (21:07 +0200)]
Add some manual pages for the ACPICA utilities provided by Intel.
For now, just list the options and their descriptions (taken from the
usages).
Sascha Wildner [Thu, 10 Apr 2014 18:23:08 +0000 (20:23 +0200)]
Remove the acpisrc utility which is for ACPICA distribution maintenance.
This is not necessary in base. In the unlikely case that anyone ever
needed it, we can bring it back.
Antonio Huete Jimenez [Thu, 10 Apr 2014 13:17:04 +0000 (15:17 +0200)]
netinet/ip - Avoid a NULL pointer dereference.
- Before checking for packets on broadcast addresses, see if there
is actually a ifnet associated with the mbuf being handled.
FreeBSD-SVN: 130685
DragonFly-bug: <http://bugs.dragonflybsd.org/issues/2660>
Reported-and-Found-by: Vasily Postnicov
This commit closes #2660
Sascha Wildner [Thu, 10 Apr 2014 08:18:13 +0000 (10:18 +0200)]
devd.conf: Comment some entries where we lack support in one way or the other.
We'll gradually uncomment them again once they are known to work.
Imre Vadasz [Wed, 9 Apr 2014 22:48:16 +0000 (00:48 +0200)]
kernel/bwn: Replace callout_drain calls. Replace a tsleep by DELAY.
* Adjusting local #include statements to conform to style(9).
* callout_drain calls are replaced by callout_stop_sync.
* Reverting a DELAY -> tsleep replacement.
François Tigeot [Thu, 10 Apr 2014 06:15:09 +0000 (08:15 +0200)]
mkinitrd(8): gzip newly produced images
The space savings can be considerable with the current 15MB ramdisk images
beeing reduced to 3.9MB once compressed.
Matthew Dillon [Thu, 10 Apr 2014 01:26:04 +0000 (18:26 -0700)]
loader - unset correct kenv for 'r'ecovery ramdisk mode
* We have to unset vfs.root.real_root instead of lunset vfs.real_root.
* This will properly drop the loader into the recovery ramdisk without
trying to do any crypt setup or access the root disk in any way (other
than what it needs to get /boot stuff).
Matthew Dillon [Thu, 10 Apr 2014 01:12:43 +0000 (18:12 -0700)]
mount - Generate correct argv[0] for crunches
* The crunchgen consolidated binary uses argv[0] to determine which program
to actually run. The 'mount' program was putting the vfstype in argv[0]
instead of "mount_<vfstype>".
* This caused crunchgen to run 'hammer' instead of 'mount_hammer'.
* Fixes installer encrypted installs with hammer roots.
Matthew Dillon [Wed, 9 Apr 2014 23:49:12 +0000 (16:49 -0700)]
kernel - Add mandatory config hooks delay
* Add a mandatory 5-second minimum delay for config hooks.
This fixes an issue with U4B's very late port probing. Essentially the
other disk devices (aka AHCI) can completely finish probing and attaching
devices before USB even knows there's a stick in a port. The result is
that the run_interrupt_driven_config_hooks() routine thinks that all
disk devices have attached and does not wait at all.
In addition, usb devices tend to probe near dead last, making the problem
worse. The kernel tries to mount the root device the instant after
the usb pci probe.
* This is a hack, but to really fix it requires a great deal of surgery in
the U4B USB stack.
François Tigeot [Wed, 9 Apr 2014 21:39:31 +0000 (23:39 +0200)]
dloader: Add a rescue ramdisk boot option
François Tigeot [Wed, 9 Apr 2014 21:28:39 +0000 (23:28 +0200)]
initrd: Add password databases
François Tigeot [Wed, 9 Apr 2014 14:48:28 +0000 (16:48 +0200)]
initrd: Create a home directory, initialize $HOME
François Tigeot [Wed, 9 Apr 2014 21:26:28 +0000 (23:26 +0200)]
initrd: Add various /etc files
* /etc/motd submitted by Matthew Dillon <dillon@apollo.backplane.com>
François Tigeot [Wed, 9 Apr 2014 21:13:48 +0000 (23:13 +0200)]
mkinitrd(8): Stop copying regular binaries to the ramdisk
* initrd binaries are specially tailored versions and don't necessarily
work in the same way as regular ones
* In fact, regular binaries from newer DragonFly systems are expected to
use dynamic libraries and won't work at all in the fully static environment
of the ramdisk
François Tigeot [Wed, 9 Apr 2014 15:56:50 +0000 (17:56 +0200)]
initrd: Add wpa_supplicant
Submitted-by: Matthew Dillon <dillon@apollo.backplane.com>
François Tigeot [Wed, 9 Apr 2014 15:30:44 +0000 (17:30 +0200)]
initrd: Add various binaries and scripts
* Crunch bin and sbin commands with some usr.bin and usr.sbin binaries into
/bin and /sbin respectively, we don't want to maintain a /usr directory
* Some of the symbols cryptsetup and tcplay use conflict with others used
by regular /sbin binaries, crunch them separately
* lvm's libraries conflict even more, build it as a separate static binary
François Tigeot [Wed, 9 Apr 2014 15:04:55 +0000 (17:04 +0200)]
initrd: Remount / read-write
François Tigeot [Wed, 9 Apr 2014 14:54:52 +0000 (16:54 +0200)]
initrd: Run a rescue shell if vfs.real_root is not set
François Tigeot [Wed, 9 Apr 2014 10:54:23 +0000 (12:54 +0200)]
mini_init: Don't call exit(3), catch SIGTERM
* During a reboot sequence, all processes are routinely killed.
* Sadly, if init dies, the kernel panics.
* Try to avoid this situation by ignoring SIGTERM and not explicitely
calling exit(3) if the child process dies and the chrooting sequence
fails.
Sascha Wildner [Wed, 9 Apr 2014 19:16:27 +0000 (21:16 +0200)]
Remove NOLINT from a couple of Makefiles (we don't have it).
Sascha Wildner [Wed, 9 Apr 2014 17:08:54 +0000 (19:08 +0200)]
bwn.4: There is no 'firmware' kernel option in DragonFly.
François Tigeot [Wed, 9 Apr 2014 07:36:31 +0000 (09:36 +0200)]
initrd: Move mini_init sources to share/initrd/
François Tigeot [Wed, 9 Apr 2014 07:32:23 +0000 (09:32 +0200)]
initrd: Move existing files to an etc/ subdirectory
François Tigeot [Tue, 8 Apr 2014 20:25:15 +0000 (22:25 +0200)]
mkinitrd(8): Optimize newfs for size
François Tigeot [Tue, 8 Apr 2014 19:16:13 +0000 (21:16 +0200)]
crunchgen(1): Stop adding underscores to symbols
* The configuration file has provisions to manually specify a few symbols
to keep public.
* Unfortunately this feature was rendered useless by crunchgen itself,
which prepended an underscore character before each symbol in the call
to crunchide(1).
François Tigeot [Tue, 8 Apr 2014 19:14:48 +0000 (21:14 +0200)]
bsd.crunchgen.mk: Add a mechanism to keep handpicked symbols
François Tigeot [Tue, 8 Apr 2014 19:10:33 +0000 (21:10 +0200)]
bsd.crunchgen.mk: Change paths
This file is intended to be used from src/share/initrd/
and not src/rescue/ like on FreeBSD.
François Tigeot [Tue, 8 Apr 2014 18:12:00 +0000 (20:12 +0200)]
Remove the RELEASE_CRUNCH build variable
* It was used to specially craft binaries for use with PicoBSD in the
distant past.
* The conditional code paths it enables have not been maintained for
more than a decade and are of dubious value.
* At this point it's best to just remove it.
François Tigeot [Tue, 8 Apr 2014 15:27:21 +0000 (17:27 +0200)]
cryptsetup: Fix a compilation warning
Submitted-by: Matthew Dillon <dillon@apollo.backplane.com>
Imre Vadasz [Tue, 8 Apr 2014 08:42:17 +0000 (10:42 +0200)]
kernel/bwn: Remove an unnecessary call to ieee80211_start_all
* Fixes a bug when the firmware is not found.
Sepherosa Ziehau [Sat, 5 Apr 2014 13:08:13 +0000 (21:08 +0800)]
in6pcb: in6_pcbsetport -> in6_pcbsetlport; no functional changes
Sepherosa Ziehau [Sat, 5 Apr 2014 12:59:06 +0000 (20:59 +0800)]
inpcb: Add comment about saved inpcbport
Sepherosa Ziehau [Sat, 5 Apr 2014 12:51:36 +0000 (20:51 +0800)]
inpcb: Add macros to get/release/assert port token
Sascha Wildner [Tue, 8 Apr 2014 11:19:46 +0000 (13:19 +0200)]
make upgrade: Add more files for cleaner switching between USB stacks.
Sascha Wildner [Tue, 8 Apr 2014 10:14:25 +0000 (12:14 +0200)]
libu4bhid: Add missing MLINKS.
Peter Avalos [Tue, 8 Apr 2014 01:26:13 +0000 (18:26 -0700)]
Update files for OpenSSL-1.0.1g import.
Peter Avalos [Tue, 8 Apr 2014 01:21:14 +0000 (18:21 -0700)]
Merge branch 'vendor/OPENSSL'
Peter Avalos [Tue, 8 Apr 2014 00:59:53 +0000 (17:59 -0700)]
Import OpenSSL-1.0.1g.
o Fix for CVE-2014-0160
o Add TLS padding extension workaround for broken servers.
o Fix for CVE-2014-0076
o Don't include gmt_unix_time in TLS server and client random values
o Fix for TLS record tampering bug CVE-2013-4353
o Fix for TLS version checking bug CVE-2013-6449
o Fix for DTLS retransmission bug CVE-2013-6450
Antonio Huete Jimenez [Mon, 7 Apr 2014 22:26:53 +0000 (00:26 +0200)]
network/pf - Avoid a possible bad pointer access.
- Make sure new pfi_kif structures are zeroed on allocation.
- A panic was hit when pfi_instance_add() tried to access a bad ifp
pointer (i.e. when using non-existing iface names in pf.conf)
Antonio Huete Jimenez [Mon, 7 Apr 2014 07:37:56 +0000 (09:37 +0200)]
network/gif - Correctly clear route cache on destroy.
RTFREE() requires that the route is freed in the CPU it belongs to.
Migrating to the target CPU *before* calling it and returning to the
original CPU afterwards seems to do the trick.
Ok: @sephe
Matthew Dillon [Sun, 6 Apr 2014 22:59:08 +0000 (15:59 -0700)]
hammer - Fix missing reltoken
* Fix a missing token release on hmp->fs_token.
Reported-by: joris
Sascha Wildner [Sun, 6 Apr 2014 12:52:27 +0000 (14:52 +0200)]
bwn.4: Comment out another bwi(4) reference.
Markus Pfeiffer [Sun, 6 Apr 2014 10:09:49 +0000 (11:09 +0100)]
kernel/drm: Add a missing include
Include sys/devfs.h in drm_vm.h and correct the use of
devfs_get_cdevpriv.
Reported-By: Sascha Wildner <saw@online.de>
Sascha Wildner [Sat, 5 Apr 2014 22:58:00 +0000 (00:58 +0200)]
kernel/run: Add missing unlock.
Matthew Dillon [Sat, 5 Apr 2014 19:48:59 +0000 (12:48 -0700)]
bmake - Always pass the jobs pipe descriptor
* bmake currently requires a .MAKE target dependency to induce the passing
of the jobs pipe descriptor to sub-jobs (aka sub-makes). This requirement
was lost due to a bug in bmake where it's F_SETFD fcntl was being run on
the wrong descriptor. This was recently fixed in bmake and exposed this
new problem.
* bmake might be run with the MAKEFLAGS environment intact but not be passed
the jobs descriptor. While bmake creates a new fresh jobs descriptor in
this case, it would remain an issue if some other parent program happened
to use a pipe descriptor with the same fd number.
* bmake or intermediate build programs might not be run with a .MAKE target
dependency, causing sub-bmakes to run an excessive number of concurrent
jobs.
* The question is whether we can really safely require this new behavior
or whether we should revert to the prior behavior.
FreeBSD modified the default to be the prior behavior of always passing
the jobs pipe descriptor and added a new .MAKE* directive to override it,
but I don't see how this helps matters when the default really needs to be
the always-pass behavior anyway.
The only other solution is to use a filesystem-visible pipe (filesystem fifo
in /tmp), which the old make used. But this often results in a lot of cruft
building up in /tmp from ^C's and/or system crashes. This solution is the
most compatible with expectations, frankly.
* For now revert to the prior behavior of always passing the jobs pipe
descriptor. This does a better job of guarenteeing that the descriptor
number remains intact through multiple fork/execs.
Sascha Wildner [Sat, 5 Apr 2014 18:22:32 +0000 (20:22 +0200)]
run.4: D1 is an mdoc macro, so we have to escape it :)
Imre Vadasz [Thu, 3 Apr 2014 12:16:48 +0000 (14:16 +0200)]
bwn: fixing performance problems and an RX buffer overflow problem
* Commenting a bwn_shm_write_2 call that destroys performance especially
when sending. This call is also commented in Linux's b43 driver.
* Handling Overflows of the RX buffer in bwn by just dropping all entries.
With 256 slots in the RX buffer this overflow will almost never happen in
practice.
Imre Vadasz [Thu, 27 Mar 2014 20:24:28 +0000 (21:24 +0100)]
bwn: Porting from FreeBSD
* Adding bwn and siba_bwn to sys/conf/files and to the X86_64_GENERIC kernel
configuration.
* Replacing BWN_LOCK, BWN_UNLOCK, BWN_ASSERT_SERIALIZED with
wlan_global_serializer.
* Increasing some alignments from 4K to 8K and some from 1 byte to 4 bytes.
* Changing slot counts for RX and TX from 64 to 256, which is the same size
as used by b43 in Linux.
* Allow overriding the BWN_TXRING_SLOTS and BWN_RXRING_SLOTS values in the
kernel configuration.
* Some style fixes. Removing unneeded NULL checks.
* Replace a DELAY(50000) with tsleep.
* Can't use kmalloc to allocate memory for dma like in FreeBSD and Linux.
* A few typo and grammar fixes in the bwn.4 manpage.
Imre Vadasz [Thu, 27 Mar 2014 20:12:23 +0000 (21:12 +0100)]
bwn: Import from FreeBSD
* bwn depends on siba_bwn, importing that code as well
* Including the bwn.4 manpage, but not siba.4
* In FreeBSD the siba driver lives in a separate directory. Since we only
need the siba_bwn part we just put it below sys/dev/netif/bwn.
Markus Pfeiffer [Thu, 3 Apr 2014 23:47:32 +0000 (00:47 +0100)]
kernel/drm: use devfs_*_cdevpriv functions
drm relied on a custom hack to implement those functions, this hack
has now been removed, and the devfs based functions are used.
Sepherosa Ziehau [Tue, 25 Mar 2014 12:50:53 +0000 (20:50 +0800)]
inpcb/in6pcb: Split port token
The original single local port space is devided into ncpus2 local port
space groups. We denote local port space group as PG(N), N=[0, ncpus2).
Property of PG(N):
- PG(N) only contains local ports matching following condition:
(host_order(port) & ncpus2_mask) == N
- PG(N) is protected by its own token.
On explicit local port bind(2) path and accept(2) path, PG(N) is selected
by using the local port already available (accept(2)) or supplied
(bind(2)):
N = host_order(port) & ncpus2_mask
On implicit local port selection path (bind(2) and connect(2)), PG(N) is
selected and used in the following way:
N = mycpuid;
N1 = N;
again:
if (find free port in PG(N)) {
DONE;
} else {
N = (N + 1) & ncpus2_mask;
if (N != N1)
goto again;
FAILED;
}
PG(N) is now recorded in inpcb struct, so when inpcb is destroyed, we
know which port space group it should use.
On i7-3770 w/ Intel 82599ES, using tools/kq_connect_client:
Port token contention rate on each hyperthread is reduced from 120K/s to
40K/s. Admittedly the contention rate is still high but it is much
better than before.
Now the major source of port token contention is the contention between
implicit local port select path and inpcb destroy path. There may be a
way to choose local port which could hash the inpcb to the current CPU;
this needs more investigation.
Sascha Wildner [Sat, 5 Apr 2014 07:43:33 +0000 (09:43 +0200)]
<sys/cdefs.h>: Make CTASSERT() kernel only (again).
When I moved it from <sys/systm.h> to <sys/cdefs.h> to have it near
_Static_assert's definition, I overlooked that <sys/systm.h> is a
kernel-only header.
Since there are ports which define their own CTASSERT (such as openjdk),
make ours kernel-only again.
Reported-by: marino
Sascha Wildner [Fri, 4 Apr 2014 21:40:59 +0000 (23:40 +0200)]
kernel/802_11: Fix a panic in RUN -> AUTH -> RUN FSM transition.
When ratectl_node_init() is called and ni_rctls is already allocated,
use that pointer.
This is FreeBSD's r207323.
Pointed-out-by: Imre Vadasz <imre@vdsz.com>
Tested-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
Sascha Wildner [Fri, 4 Apr 2014 18:20:10 +0000 (20:20 +0200)]
kernel/802_11: Release the WLAN serializer around if_detach().
This should fix all crashes we are seeing upon kldunload of WLAN
drivers.
In-discussion-with-and-tested-by: ivadasz, jh32, sephe
Sascha Wildner [Fri, 4 Apr 2014 18:16:01 +0000 (20:16 +0200)]
kernel/ath: Grab the WLAN serializer around ieee80211_ifdetach().
Reported-by: Imre Vadasz <imre@vdsz.com>
Sascha Wildner [Fri, 4 Apr 2014 13:35:20 +0000 (15:35 +0200)]
Fix buildkernel (missing include).
Reported-by: luxh
Sascha Wildner [Fri, 4 Apr 2014 08:07:53 +0000 (10:07 +0200)]
kernel/802_11: More ratectl fixes (fixes an ath(4) panic).
Set the default rate control algorithm to NONE instead of AMRR and
add some missing ieee80211_ratectl_node_init()s which I had overlooked
earlier.
Reported-by: Johannes Hofmann <johannes.hofmann@gmx.de>
Tested-by: Imre Vadasz <imre@vdsz.com>
Markus Pfeiffer [Thu, 3 Apr 2014 22:06:19 +0000 (23:06 +0100)]
kernel - bring acpi_thinkpad in sync with FreeBSD r246128
Submitted-By: Sascha Wildner <saw@online.de>
Markus Pfeiffer [Thu, 3 Apr 2014 21:36:40 +0000 (22:36 +0100)]
Add ident string to acpi_thinkpad module
Sascha Wildner [Thu, 3 Apr 2014 07:21:04 +0000 (09:21 +0200)]
ls(1): Restore the traditional behavior of -f implying -a.
OpenBSD's commit msg:
------
restore the traditional behavior of -f implying -a; apparently Keith Bostic
forgot to restore it when the -f flag was put back on 2nd of September 1989,
after being removed on 16th of August as a consequence of issues getting it
working over NFS, so deviation from traditional UNIX behavior in all BSDs
looks like an historical accident; as a side effect, this change accommodates
behavior of this option to IEEE Std 1003.1-2008 (``POSIX.1'').
joint work with jmc@ (who found the inaccuracy in our implementation),
schwarze@ (who provided a detailed tracking of historical facts) and millert@
ok millert@, schwarze@
------
The same patch has been pushed to NetBSD and FreeBSD too.
Submitted-by: Igor Sobrado
Taken-from: OpenBSD