]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoMove CCSR discovery into the platform module, while simultaneously making
Nathan Whitehorn [Sun, 17 Nov 2013 02:03:36 +0000 (02:03 +0000)]
Move CCSR discovery into the platform module, while simultaneously making
it more flexible about how the CCSR range is found. With this change, the
stock MPC85XX will boot on a Routerboard 800.

Hardware donated by: Benjamin Perrault

10 years agoMake sure that TLB1 mappings are aligned correctly.
Nathan Whitehorn [Sun, 17 Nov 2013 01:59:42 +0000 (01:59 +0000)]
Make sure that TLB1 mappings are aligned correctly.

10 years agoIn the data abort handler, don't panic if kdb is available and says it
Ian Lepore [Sat, 16 Nov 2013 23:37:56 +0000 (23:37 +0000)]
In the data abort handler, don't panic if kdb is available and says it
handled the condition.

PR: arm/183668
Submitted by: Howard Su <howard0su@gmail.com>

10 years agoUse SCTP_PR_SCTP_TTL when the user provides a positive
Michael Tuexen [Sat, 16 Nov 2013 19:57:56 +0000 (19:57 +0000)]
Use SCTP_PR_SCTP_TTL when the user provides a positive
timetolive in sctp_sendmsg().

MFC after: 3 days

10 years agoMove all atf directories to the tests mtree.
Julio Merino [Sat, 16 Nov 2013 19:42:40 +0000 (19:42 +0000)]
Move all atf directories to the tests mtree.

This is to ensure that test-related directories don't get needlessly
created (and later deleted) when MK_TESTS=no.

Problem found by jhb@.

Approved by: rpaulo (mentor)

10 years agoInstall BSD.tests.mtree when MK_TESTS is yes.
Julio Merino [Sat, 16 Nov 2013 19:41:04 +0000 (19:41 +0000)]
Install BSD.tests.mtree when MK_TESTS is yes.

Problem found by jhb@.

Approved by: rpaulo (mentor)

10 years agoRemove a stray write operation.
Michael Tuexen [Sat, 16 Nov 2013 16:09:09 +0000 (16:09 +0000)]
Remove a stray write operation.

MFC after: 3 days

10 years agoEnabled should be a boolean, not a string
Baptiste Daroussin [Sat, 16 Nov 2013 15:54:46 +0000 (15:54 +0000)]
Enabled should be a boolean, not a string

MFC after: 2 days

10 years agoargc is now used
Baptiste Daroussin [Sat, 16 Nov 2013 15:48:49 +0000 (15:48 +0000)]
argc is now used

MFC after: 2 days

10 years agoWhen determining if an address belongs to an stcb, take the address family
Michael Tuexen [Sat, 16 Nov 2013 15:34:14 +0000 (15:34 +0000)]
When determining if an address belongs to an stcb, take the address family
into account for wildcard bound endpoints.

MFC after: 3 days

10 years agoCleanups which result in fixes which have been made upstream
Michael Tuexen [Sat, 16 Nov 2013 15:04:49 +0000 (15:04 +0000)]
Cleanups which result in fixes which have been made upstream
and where partially suggested by Andrew Galante.
There is no functional change in FreeBSD.

MFC after: 3 days

10 years agoImplement automatic live resize support for GEOM MULTIPATH class.
Alexander Motin [Sat, 16 Nov 2013 14:31:49 +0000 (14:31 +0000)]
Implement automatic live resize support for GEOM MULTIPATH class.

In "manual" mode just automatically resize provider in any direction.
In "automatic" mode allow only growth (with new metadata write); in case
of shrinking destroy the multipath device same as before since it may be
undesirable to write new metadata within old user area.

MFC after: 1 month

10 years agoEnable the ti_mbox and ti_pruss drivers.
Rui Paulo [Sat, 16 Nov 2013 08:28:14 +0000 (08:28 +0000)]
Enable the ti_mbox and ti_pruss drivers.

10 years agoAdd a driver for the TI Programmable Realtime Unit Subsystem.
Rui Paulo [Sat, 16 Nov 2013 08:23:15 +0000 (08:23 +0000)]
Add a driver for the TI Programmable Realtime Unit Subsystem.

This is only a userland accessibility driver.  It mmaps the hardware region to
userland and posts interrupt notifications via kqueue.

10 years agoAdd a driver for the Texas Instruments Mailbox hardware.
Rui Paulo [Sat, 16 Nov 2013 08:20:50 +0000 (08:20 +0000)]
Add a driver for the Texas Instruments Mailbox hardware.

10 years agoCentrino Wireless-N 2200 does not have bluetooth support.
Eitan Adler [Sat, 16 Nov 2013 04:29:02 +0000 (04:29 +0000)]
Centrino Wireless-N 2200 does not have bluetooth support.

10 years agogcc: Fix postreload-gcse treatment of call-clobbered registers.
Pedro F. Giffuni [Sat, 16 Nov 2013 01:29:27 +0000 (01:29 +0000)]
gcc: Fix postreload-gcse treatment of call-clobbered registers.

Reference:
http://gcc.gnu.org/ml/gcc-patches/2007-05/msg01636.html

Obtained from: gcc 4.3 (rev. 125037; GPLv2)
MFC after: 3 weeks

10 years agogcc: add femit-struct-debug support to reduce Reduce dwarf debug size
Pedro F. Giffuni [Sat, 16 Nov 2013 01:16:24 +0000 (01:16 +0000)]
gcc: add femit-struct-debug support to reduce Reduce dwarf debug size

Obtained from: gcc 4.3 (rev. 123909; GPLv2)
MFC after: 3 weeks

10 years agolibcpp: preprocessor speedup patches from mainline.
Pedro F. Giffuni [Sat, 16 Nov 2013 01:07:02 +0000 (01:07 +0000)]
libcpp: preprocessor speedup patches from mainline.

* lex.c (_cpp_clean_line): Add uses of __builtin_expect.  Don't
look backward at the end of the line unless we saw a backslash.

* internal.h (struct cpp_reader): Add new fields:
nonexistent_file_hash and nonexistent_file_ob.
* files.c: Include "obstack.h".
(find_file_in_dir): Before trying to open the file, look up the
path name in the hash table of nonexistent files.  After failing
to open the file, add the path name to the hash table.
(_cpp_find_file): Cache the results of looking up the file name
starting with the quote and bracket chain heads, if we can.
(nonexistent_file_hash_eq): New static function.
(_cpp_init_files): Initialize pfile->nonexistent_file_hash and
pfile->nonexistent_file_ob.
(_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
pfile->nonexistent_file_ob.

Obtained from: gcc 4.3 (rev. 120263, 124929 ; GPLv2)
MFC after: 3 weeks

10 years agogcc: Add a new option -Wvla to warn variable length array.
Pedro F. Giffuni [Sat, 16 Nov 2013 01:03:56 +0000 (01:03 +0000)]
gcc: Add a new option -Wvla to warn variable length array.

Obtained from: gcc 4.3 (rev. 122851; GPLv2)
MFC after: 3 weeks

10 years agoRework the routine that returns a pointer to the table of software ECC
Ian Lepore [Fri, 15 Nov 2013 23:48:51 +0000 (23:48 +0000)]
Rework the routine that returns a pointer to the table of software ECC
byte positions within the OOB area to support chips with unusual OOB
sizes such as 218 or 224 bytes.

The table for 128 byte OOB works for these but it assumes 3 bytes of ECC
per 256 byte block, and in the case of an ONFI chip the params page may
ask for something different.  In other words, this is better but not
yet perfect.

10 years agoMove the luns field to the end of the struct, for serendipitous packing.
Ian Lepore [Fri, 15 Nov 2013 23:45:13 +0000 (23:45 +0000)]
Move the luns field to the end of the struct, for serendipitous packing.
(I was supposed to do this before committing it initially.)

10 years agoONFI parameters are little-endian, hence we must take care to convert them
Ian Lepore [Fri, 15 Nov 2013 23:41:32 +0000 (23:41 +0000)]
ONFI parameters are little-endian, hence we must take care to convert them
to native endianness.  We must also pay attention to unaligned accesses.

Copy the interesting parameters to a new struct so the rest of the code can
forget about these problems.

Submitted by: Kristof Provost <kristof@sigsegv.be> (cleanup) and me (orig).

10 years agoSearch for and validate the ONFI params as specified in the standard.
Ian Lepore [Fri, 15 Nov 2013 23:37:33 +0000 (23:37 +0000)]
Search for and validate the ONFI params as specified in the standard.

The ONFI spec states that at least two bytes of the signature ("ONFI")
must be present, and the CRC must be correct to have a valid parameter
page.  If the page is not valid there are at least two backup pages where
the data can also be found.

Submitted by: Kristof Provost <kristof@sigsegv.be> (cleanup) and me (orig).

10 years agoUpdate the onfi_params struct to ONFI revision 3.2 (06 12 2013).
Ian Lepore [Fri, 15 Nov 2013 23:35:10 +0000 (23:35 +0000)]
Update the onfi_params struct to ONFI revision 3.2 (06 12 2013).

Submitted by: Kristof Provost <kristof@sigsegv.be> (cleanup) and me (orig).

10 years agoThe vendor specified field is 88 bytes, not 8 bytes.
Ian Lepore [Fri, 15 Nov 2013 23:31:39 +0000 (23:31 +0000)]
The vendor specified field is 88 bytes, not 8 bytes.

Submitted by: Kristof Provost <kristof@sigsegv.be>

10 years agoMFV: netcat from OpenBSD 5.4.
Xin LI [Fri, 15 Nov 2013 22:45:14 +0000 (22:45 +0000)]
MFV: netcat from OpenBSD 5.4.

No functional change.

10 years agoVendor import from OpenBSD 5.4.
Xin LI [Fri, 15 Nov 2013 22:28:48 +0000 (22:28 +0000)]
Vendor import from OpenBSD 5.4.

10 years agoFixed a tx watchdog chip reset that could occur on mostly idle links.
Eric Davis [Fri, 15 Nov 2013 20:26:14 +0000 (20:26 +0000)]
Fixed a tx watchdog chip reset that could occur on mostly idle links.
Fixed various link related issues and 10GBaseT is now linking properly.
Modified the types for the driver tunables to be consistent with the sysctl APIs.

Approved by: davidch (mentor)

10 years agoFix a couple of issues with -F:
John Baldwin [Fri, 15 Nov 2013 20:01:07 +0000 (20:01 +0000)]
Fix a couple of issues with -F:
- Fix ALWAYS_INSTALL to take precedence over the FreeBSD ID checks.
  In particular, always install a file where the only change was
  the FreeBSD ID even if -F is specified.
- Fix the -F option in the case that the only upstream change is a
  change in the FreeBSD ID and the local file is removed.
- Add tests for these two cases.

10 years agoCorrect right names.
Pawel Jakub Dawidek [Fri, 15 Nov 2013 19:56:28 +0000 (19:56 +0000)]
Correct right names.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoReplace CAP_POLL_EVENT and CAP_POST_EVENT capability rights (which I had
Pawel Jakub Dawidek [Fri, 15 Nov 2013 19:55:35 +0000 (19:55 +0000)]
Replace CAP_POLL_EVENT and CAP_POST_EVENT capability rights (which I had
a very hard time to fully understand) with much more intuitive rights:

CAP_EVENT - when set on descriptor, the descriptor can be monitored
with syscalls like select(2), poll(2), kevent(2).

CAP_KQUEUE_EVENT - When set on a kqueue descriptor, the kevent(2)
syscall can be called on this kqueue to with the eventlist
argument set to non-NULL value; in other words the given
kqueue descriptor can be used to monitor other descriptors.
CAP_KQUEUE_CHANGE - When set on a kqueue descriptor, the kevent(2)
syscall can be called on this kqueue to with the changelist
argument set to non-NULL value; in other words it allows to
modify events monitored with the given kqueue descriptor.

Add alias CAP_KQUEUE, which allows for both CAP_KQUEUE_EVENT and
CAP_KQUEUE_CHANGE.

Add backward compatibility define CAP_POLL_EVENT which is equal to CAP_EVENT.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoMerge in gcc svn r120505 to include definition of TREE_OVERFLOW_P:
Sean Bruno [Fri, 15 Nov 2013 18:44:25 +0000 (18:44 +0000)]
Merge in gcc svn r120505 to include definition of TREE_OVERFLOW_P:

http://gcc.gnu.org/viewcvs/gcc/trunk/gcc/tree.h?revision=120505&view=markup

This repairs build breakage for non x86 arch's that use gcc to build
intruduced at svn R258157

10 years agoImprove robustness of the Xen balloon driver.
Justin T. Gibbs [Fri, 15 Nov 2013 16:35:28 +0000 (16:35 +0000)]
Improve robustness of the Xen balloon driver.

sys/dev/xen/balloon/balloon.c:
Remove unused and commented out code.

Fix deadlock caused by performing a sleepable malloc
while holding the balloon mutex.

Perform proper accounting of the memory used by the domain.

Submitted by: Roger Pau MonnĂ©
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs
MFC after: 2 days

10 years agoRemove an incorrectly copied and pasted clause from these license
John Baldwin [Fri, 15 Nov 2013 16:16:55 +0000 (16:16 +0000)]
Remove an incorrectly copied and pasted clause from these license
statements.

Approved by: Yohanes Nugroho <yohanes@gmail.com>
MFC after: 1 week

10 years agoFix accounting for hw.realmem on the i386 and amd64 platforms.
Justin T. Gibbs [Fri, 15 Nov 2013 16:05:55 +0000 (16:05 +0000)]
Fix accounting for hw.realmem on the i386 and amd64 platforms.

sys/i386/i386/machdep.c:
sys/amd64/amd64/machdep.c:
The value reported by FreeBSD as "real memory" when booting
doesn't match what is later reported by sysctl as hw.realmem.
This is due to the fact that the value printed during the
boot process is fetched from smbios data (when possible),
and accounts for holes in physical memory. On the other
hand, the value of hw.realmem is unconditionally set to be
one larger than the highest page of the physical address
space.

Fix this by setting hw.realmem to the same value printed
during boot, this makes hw.realmem honour it's name and
account properly for physical memory present in the system.

Submitted by: Roger Pau MonnĂ©
Reviewed by: gibbs

10 years agoClean up the macros to avoid using casts.
George V. Neville-Neil [Fri, 15 Nov 2013 16:03:32 +0000 (16:03 +0000)]
Clean up the macros to avoid using casts.

Suggested by: bde and jhb

10 years agoDon't allow vfs.lorunningspace or vfs.hirunningspace to be set such
John Baldwin [Fri, 15 Nov 2013 15:29:53 +0000 (15:29 +0000)]
Don't allow vfs.lorunningspace or vfs.hirunningspace to be set such
that lorunningspace is greater than hirunningspace as the system
performs terribly if it is mistuned in this fashion.

MFC after: 1 week

10 years agoAdd few more minor parts of DevSleep support from AHCI 1.3.1 proposal.
Alexander Motin [Fri, 15 Nov 2013 15:14:07 +0000 (15:14 +0000)]
Add few more minor parts of DevSleep support from AHCI 1.3.1 proposal.

10 years agoAdd some more Intel HDA controller IDs and rename HDMI CODEC to Haswell.
Alexander Motin [Fri, 15 Nov 2013 13:55:55 +0000 (13:55 +0000)]
Add some more Intel HDA controller IDs and rename HDMI CODEC to Haswell.

10 years agoAdd ID for Intel Avoton SMBus controller.
Alexander Motin [Fri, 15 Nov 2013 13:19:15 +0000 (13:19 +0000)]
Add ID for Intel Avoton SMBus controller.

10 years agoAdd ID for Intel Lynx Point HDMI CODEC.
Alexander Motin [Fri, 15 Nov 2013 13:12:53 +0000 (13:12 +0000)]
Add ID for Intel Lynx Point HDMI CODEC.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

10 years agoANSIfy function defintions.
Andrey V. Elsukov [Fri, 15 Nov 2013 12:12:50 +0000 (12:12 +0000)]
ANSIfy function defintions.

10 years agoHandle case when ACPI reports HPET device, but does not provide memory
Alexander Motin [Fri, 15 Nov 2013 11:32:19 +0000 (11:32 +0000)]
Handle case when ACPI reports HPET device, but does not provide memory
resource for it.  In such case take the address range from the HPET table.

This fixes hpet(4) driver attach on Asrock C2750D4I board.

10 years agoAdd some more IDs for Intel ATA, AHCI and USB controllers.
Alexander Motin [Fri, 15 Nov 2013 10:28:59 +0000 (10:28 +0000)]
Add some more IDs for Intel ATA, AHCI and USB controllers.

10 years agogcc: warn about integer overflow in constant expressions in the C++ frontend.
Pedro F. Giffuni [Fri, 15 Nov 2013 03:05:33 +0000 (03:05 +0000)]
gcc: warn about integer overflow in constant expressions in the C++ frontend.

This fixes GCC 28986:
 http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00473.html

Obtained from: gcc 4.3 (rev. 120558; GPLv2)
MFC after: 3 weeks

10 years agoValidate the buffer and its length passed to QLA_MPI_DUMP.
David C Somayajulu [Fri, 15 Nov 2013 01:44:58 +0000 (01:44 +0000)]
Validate the buffer and its length passed to QLA_MPI_DUMP.
copyout dump only if qls_mpi_core_dump() is successful.
(like to credit x90c for pointing the issue)
Submitted by:David C Somayajulu

10 years agoql_hw.[c,h]: set minimum thresholds on pkt size for lro path.
David C Somayajulu [Fri, 15 Nov 2013 01:26:24 +0000 (01:26 +0000)]
ql_hw.[c,h]: set minimum thresholds on pkt size for lro path.
ql_ioctl.c: validate the length and address of buffer passed to QL_RD_FW_DUMP

Submitted by:David C Somayajulu

10 years ago- Move CAP_EXTATTR_* and CAP_ACL_* rights to index 1 to have more room
Pawel Jakub Dawidek [Thu, 14 Nov 2013 23:28:28 +0000 (23:28 +0000)]
- Move CAP_EXTATTR_* and CAP_ACL_* rights to index 1 to have more room
  in index 0 for the future.
- Move CAP_BINDAT and CAP_CONNECTAT rights to index 0 so we can include
  CAP_LOOKUP right in them.
- Shuffle the bits around so there are no gaps. This is last chance to do
  that as all moved rights are not used yet.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoThe CAP_LINKAT, CAP_MKDIRAT, CAP_MKFIFOAT, CAP_MKNODAT, CAP_RENAMEAT,
Pawel Jakub Dawidek [Thu, 14 Nov 2013 23:18:32 +0000 (23:18 +0000)]
The CAP_LINKAT, CAP_MKDIRAT, CAP_MKFIFOAT, CAP_MKNODAT, CAP_RENAMEAT,
CAP_SYMLINKAT and CAP_UNLINKAT capability rights make no sense without
the CAP_LOOKUP right, so include this rights.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoPrecisely document capability rights here too (they are already documented
Pawel Jakub Dawidek [Thu, 14 Nov 2013 23:14:25 +0000 (23:14 +0000)]
Precisely document capability rights here too (they are already documented
in rights(4)).

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoStyle.
Pawel Jakub Dawidek [Thu, 14 Nov 2013 23:05:13 +0000 (23:05 +0000)]
Style.

MFC after: 3 days

10 years agoSync return value with actual implementation.
Pawel Jakub Dawidek [Thu, 14 Nov 2013 23:02:49 +0000 (23:02 +0000)]
Sync return value with actual implementation.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

10 years agoChange cap_rights_merge(3) and cap_rights_remove(3) to return pointer
Pawel Jakub Dawidek [Thu, 14 Nov 2013 22:59:20 +0000 (22:59 +0000)]
Change cap_rights_merge(3) and cap_rights_remove(3) to return pointer
to the destination cap_rights_t structure.

This already matches manual page.

MFC after: 3 days

10 years agoAdd a note that this file is compiled as part of the kernel and libc.
Pawel Jakub Dawidek [Thu, 14 Nov 2013 22:57:07 +0000 (22:57 +0000)]
Add a note that this file is compiled as part of the kernel and libc.

Requested by: kib
MFC after: 3 days

10 years agoPut in the correct bit shifting and add a type to prevent clang from complaining.
George V. Neville-Neil [Thu, 14 Nov 2013 21:57:37 +0000 (21:57 +0000)]
Put in the correct bit shifting and add a type to prevent clang from complaining.
While here fix up a grammar nit.

Pointed out by: Sergey Kandaurov and bz@ respectively.

10 years agoMerge vrp-tree fix from gcc-4.3
Pedro F. Giffuni [Thu, 14 Nov 2013 20:21:05 +0000 (20:21 +0000)]
Merge vrp-tree fix from gcc-4.3

Fix missed conversion from / to >> (GCC PR32521)

Note that vrp-tree is currently disabled by default in
FreeBSD's gcc due many bugs.

While here fix a revision number in the 4.3 Changelog.

Obtained from: gcc 4.3 (rev. 122831 - partial; GPLv2)
MFC after: 3 weeks

10 years agoShift our OUI correctly.
George V. Neville-Neil [Thu, 14 Nov 2013 20:07:17 +0000 (20:07 +0000)]
Shift our OUI correctly.

Pointed out by: emaste

10 years agoThe FreeBSD Project now has its own, Ogranizationally Unique Identifier,
George V. Neville-Neil [Thu, 14 Nov 2013 19:53:35 +0000 (19:53 +0000)]
The FreeBSD Project now has its own, Ogranizationally Unique Identifier,
assigned by the IEEE.  This file includes documentation on how developers
must carve up the space as well as an initial allocation for bhyve.

Sponsored by: The FreeBSD Foundation

10 years agoThe previous code makes a memory allocation in size of
Xin LI [Thu, 14 Nov 2013 18:53:17 +0000 (18:53 +0000)]
The previous code makes a memory allocation in size of
struct mbx_common_read_write_flashrom plus 32KB and caps the actual
transfer size at 32KB.  This is harmless as it is but may confuse
static code analyzer, so allocate a full 32KB instead.

Reported by: Coverity via mjacob
Submitted by: Venkata Duvvuru <VenkatKumar.Duvvuru Emulex Com>
Coverity CID: 1125820

10 years agoRepair build after svn r258115
Sean Bruno [Thu, 14 Nov 2013 18:41:58 +0000 (18:41 +0000)]
Repair build after svn r258115

options.get_size_type() appears to return a const char *, so assume that
its a string as oppose to *nothing*.  I have no idea what apple's code is
trying to do here:

http://opensource.apple.com/source/gperf/gperf-9/patches/size_type.patch

10 years agogcc: merge rs6000 change from FSF pre-gcc43
Pedro F. Giffuni [Thu, 14 Nov 2013 16:10:21 +0000 (16:10 +0000)]
gcc: merge rs6000 change from FSF pre-gcc43

config/rs6000/rs6000.c
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01551.html
Don't set MASK_PPC_GFXOPT for 8540 or 8548.

Obtained from: gcc 4.3 (rev. 124381; GPLv2)
MFC after: 3 weeks
Reviewed by: nathan

10 years agoIntroduce allocation cache to store LZ4 compression contexts without kicking
Alexander Motin [Thu, 14 Nov 2013 15:54:54 +0000 (15:54 +0000)]
Introduce allocation cache to store LZ4 compression contexts without kicking
VM subsystem twice for every written record.

Tests on 24-core system show double reduction of CPU time spent on copying
single large well-compressed file.

This patch is not really needed on illumos (while not harm either) since
their memory allocator by default uses caching for all requests up to 128K.

Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com>

10 years agox86: Allow users to change PSL_RF via ptrace(PT_SETREGS...)
Ed Maste [Thu, 14 Nov 2013 15:37:20 +0000 (15:37 +0000)]
x86: Allow users to change PSL_RF via ptrace(PT_SETREGS...)

Debuggers may need to change PSL_RF.  Note that tf_eflags is already stored
in the signal context during signal handling and PSL_RF previously could be
modified via sigreturn, so this change should not provide any new ability
to userspace.

For background see the thread at:
http://lists.freebsd.org/pipermail/freebsd-i386/2007-September/005910.html

Reviewed by: jhb, kib
Sponsored by: DARPA, AFRL

10 years agoSome fixups to pf_get_sport after r257223:
Gleb Smirnoff [Thu, 14 Nov 2013 14:20:35 +0000 (14:20 +0000)]
Some fixups to pf_get_sport after r257223:

- Do not return blindly if proto isn't ICMP.
- The dport is in network order, so fix comparisons.
- Remove ridiculous htonl(arc4random()).
- Push local variable to a narrower block.

10 years agoSome minor tuning to rpc/svc.c:
Alexander Motin [Thu, 14 Nov 2013 13:51:53 +0000 (13:51 +0000)]
Some minor tuning to rpc/svc.c:
 - close cosmetic race in svc_exit();
 - do not set wait timeout for idle threads if we have no use for wakeups;
 - create new requested thread sooner, not only after some another thread
wakeup, that may happen later under constant load.

10 years agoFix a very bad typo from r248887.
Gleb Smirnoff [Thu, 14 Nov 2013 09:45:33 +0000 (09:45 +0000)]
Fix a very bad typo from r248887.

Submitted by: art

10 years agoWhen verifying that files we need are present, also check that they don't
Colin Percival [Thu, 14 Nov 2013 09:22:32 +0000 (09:22 +0000)]
When verifying that files we need are present, also check that they don't
have zero length.  Filesystem corruption will tend to truncate files, and
since these are short that's likely to result in them becoming empty.

Suggested by: Richard Clayton
Convinced by: rwatson
MFC after: 3 weeks

10 years agoEmphasize that pf(4) in FreeBSD doesn't match pf(4) in
Gleb Smirnoff [Thu, 14 Nov 2013 09:17:27 +0000 (09:17 +0000)]
Emphasize that pf(4) in FreeBSD doesn't match pf(4) in
OpenBSD 4.5, but is derived from it, and got some
important local changes.

Wording by: cperciva

10 years agoFix copy+paste-o, OEA64 uses LPTE, not PTE.
Justin Hibbits [Thu, 14 Nov 2013 07:41:52 +0000 (07:41 +0000)]
Fix copy+paste-o, OEA64 uses LPTE, not PTE.

X-MFC with: r257941

10 years agoFix (I think!) the scan timeouts on the intel NICs.
Adrian Chadd [Thu, 14 Nov 2013 07:27:00 +0000 (07:27 +0000)]
Fix (I think!) the scan timeouts on the intel NICs.

This field needs to be (a) set, and (b) greater than the other timeouts
(passive, active, maxquiet, etc.)  It also is in microseconds, not
milliseconds.

I hope this will fix the scan hangs that people are seeing.

Obtained from: Linux iwlwifi

10 years agoThis is "scan_flags" from Linux.
Adrian Chadd [Thu, 14 Nov 2013 07:21:09 +0000 (07:21 +0000)]
This is "scan_flags" from Linux.

10 years agogperf: bring small update from Apple Developers tools 4.4
Pedro F. Giffuni [Thu, 14 Nov 2013 00:57:20 +0000 (00:57 +0000)]
gperf: bring small update from Apple Developers tools 4.4

From [1]

offset.patch
Makes use the C offsetof() macro.

size_type.patch
Lets you specify the type for length parameters.

[1] http://opensource.apple.com/source/gperf/gperf-9/patches/

MFC after: 3 weeks

10 years agoDon't SEGV when Hash_Table is uninitialized
Simon J. Gerraty [Thu, 14 Nov 2013 00:29:48 +0000 (00:29 +0000)]
Don't SEGV when Hash_Table is uninitialized

10 years agoAvoid SEGV when passed NULL for list
Simon J. Gerraty [Thu, 14 Nov 2013 00:06:44 +0000 (00:06 +0000)]
Avoid SEGV when passed NULL for list

10 years agoFix whitespace.
Ed Schouten [Wed, 13 Nov 2013 20:35:10 +0000 (20:35 +0000)]
Fix whitespace.

10 years agoSince the doc/ toolchain conversion to docbook 5.0, JADETEX
Glen Barber [Wed, 13 Nov 2013 17:49:07 +0000 (17:49 +0000)]
Since the doc/ toolchain conversion to docbook 5.0, JADETEX
is no longer a valid option, so remove 'WITHOUT_JADETEX=yes'
from PBUILD_FLAGS.

While here, also remove 'WITHOUT_X11=yes', since it will
cause a dependency conflict by requiring both print/ghostscript9
and print/ghostscript9-nox11.

Switch to OPTIONSNG format (WITHOUT_* -> OPTIONS_UNSET='FOO'),
and unset the FOP option, which requires Java (although it is
disabled by default).  Also unset the 'IGOR' option, since
textproc/igor is a validation tool, not necessarily a dependency
of the doc/ build itself.

While here, reduce the line length of PBUILD_FLAGS.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoMerge upstream LLDB r194487:
Ed Maste [Wed, 13 Nov 2013 17:06:26 +0000 (17:06 +0000)]
Merge upstream LLDB r194487:

  Log failure to restore thread state in ThreadPlanCallFunction::DoTakedown

  In order to help track down llvm.org/pr17226.

Sponsored by: DARPA, AFRL

10 years agoEscape a newline added in the previous commit when verifying the flags
John Baldwin [Wed, 13 Nov 2013 16:50:19 +0000 (16:50 +0000)]
Escape a newline added in the previous commit when verifying the flags
passed to the build, diff, or status commands.

10 years agoo Use common ARMv6/v7 bus_space tag.
Ruslan Bukin [Wed, 13 Nov 2013 16:17:05 +0000 (16:17 +0000)]
o Use common ARMv6/v7 bus_space tag.
o Use new helper routines for arm static device mapping.
o style(9) tweaks.

10 years agoAllow this to work with fmake
Simon J. Gerraty [Wed, 13 Nov 2013 15:10:32 +0000 (15:10 +0000)]
Allow this to work with fmake
Based on patch from Garret Cooper.

10 years agolldb: Correct a standalone debug file path
Ed Maste [Wed, 13 Nov 2013 14:46:41 +0000 (14:46 +0000)]
lldb: Correct a standalone debug file path

For a file /bin/ls with a .gnu_debuglink entry of "ls.debug" the path
should be /usr/lib/debug/bin/ls.debug, not /usr/lib/debug/bin/ls.

ref: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html

Upstream defect pr17903 (http://llvm.org/pr17903)

Sponsored by: DARPA, AFRL

10 years agoLeave a note that the 5300 is a 3x3 NIC.
Adrian Chadd [Wed, 13 Nov 2013 09:32:11 +0000 (09:32 +0000)]
Leave a note that the 5300 is a 3x3 NIC.

10 years agoRemove useless comparisions of assigned offset and resid with the
Konstantin Belousov [Wed, 13 Nov 2013 08:55:09 +0000 (08:55 +0000)]
Remove useless comparisions of assigned offset and resid with the
sources from uio.  Both uio_offset and offset, and uio_resid and resid
have the same types for some time.

Add check for buflen overflow by comparing the buflen with both offset
and resid (vs. comparing with offset only, as it is currently done).

Reported and tested by: pho
Approved by: des (pseudofs maintainer)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoStrip the -pN patch level from the VERSION string which gets encoded into
Colin Percival [Wed, 13 Nov 2013 08:08:56 +0000 (08:08 +0000)]
Strip the -pN patch level from the VERSION string which gets encoded into
CTF data.  Otherwise FreeBSD Update builds think every kernel file has
changed every time there's a security advisory, since the FreeBSD Update
build code isn't smart enough to look inside CTF data to ignore those
changes.

Pointy hat to: cperciva
MFC after: 1 day, or before the next BETA

10 years agoCorrectly initialise the 2-chain antenna mask in the link quality table.
Adrian Chadd [Wed, 13 Nov 2013 07:09:00 +0000 (07:09 +0000)]
Correctly initialise the 2-chain antenna mask in the link quality table.

The previous code simply hard-coded IWN_ANT_AB which is only correct for
some of the NICs.

Now, if the NIC is a 1-stream TX, you need to set IWN_ANT_AB and _not_
just a single antenna.  The Intel 5100 firmware panics the moment the
link quality table is updated.

So!

* no secondary antenna? Set it to IWN_ANT_AB;
* two-stream device? Transmit on the full transmit antenna configuration.

Tested:

* Intel 5100, STA
* Intel 2200 (eadler)

Obtained from: Linux iwlwifi

10 years agoSomewhat mimic how the devel/subversion port prepopulates
Glen Barber [Wed, 13 Nov 2013 05:25:49 +0000 (05:25 +0000)]
Somewhat mimic how the devel/subversion port prepopulates
'Sponsored by:' in the FreeBSD commit template.

Support for this has already existed ^/head/contrib/subversion
but it was not enabled in usr.bin/svn/svn/Makefile.

To use the pre-populated 'Sponsored by:' entry, set ORGANIZATION
in make.conf(5), for example:

    ORGANIZATION=   "The FreeBSD Foundation"

Reviewed by: peter
Sponsored by: The FreeBSD Foundation

10 years agoRemove a couple of unused macros.
Kevin Lo [Wed, 13 Nov 2013 05:22:39 +0000 (05:22 +0000)]
Remove a couple of unused macros.

10 years ago- Use bit twiddling macro to set IEEE80211_MODE_11A
Kevin Lo [Wed, 13 Nov 2013 05:21:41 +0000 (05:21 +0000)]
- Use bit twiddling macro to set IEEE80211_MODE_11A
- On the RT3572 chipset, there's no need to configure BBP register 86

10 years agogcc: Backport fixes for -W parentheses in C++
Pedro F. Giffuni [Wed, 13 Nov 2013 04:31:27 +0000 (04:31 +0000)]
gcc: Backport fixes for -W parentheses in C++

This fixes GCC 19564:
  http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00868.html
  http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01772.html
  http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00545.html

The patch and its fixes are used by Google in their enhanced gcc-4.2.1
port and predates the license switch in GCC so they are still under
GPLv2.

MFC after: 3 weeks

10 years agoAdd support for multiple instances of ftp-proxy
Josh Paetzel [Wed, 13 Nov 2013 03:50:31 +0000 (03:50 +0000)]
Add support for multiple instances of ftp-proxy
and pflog devices.

PR: conf/158171
Submitted by: Thomas Johnson <tom@claimlynx.com>

10 years agoFix typo.
Justin Hibbits [Wed, 13 Nov 2013 01:51:40 +0000 (01:51 +0000)]
Fix typo.

Submitted by: loos

10 years agoIncrease the stack size for ppc64 from 4 pages to 8.
Justin Hibbits [Wed, 13 Nov 2013 01:37:52 +0000 (01:37 +0000)]
Increase the stack size for ppc64 from 4 pages to 8.

I found a stack overflow when a coredump was taken onto a ZFS volume with
heavy network activity.  2 DSI traps, plus one DECR trap, along with several
function calls in the stack, overflowed the 4 pages.  8 page stack fixes this.

Discussed with: nwhitehorn
MFC after: 1 week

10 years agoAdd ENETUNREACH and EADDRNOTAVAIL to the list of errors that are potentially
Ian Lepore [Wed, 13 Nov 2013 01:04:02 +0000 (01:04 +0000)]
Add ENETUNREACH and EADDRNOTAVAIL to the list of errors that are potentially
transient and shouldn't result in closing the socket and giving up forever.

10 years agoThis fixes 3 problems in syslogd related to sizing receive buffers...
Ian Lepore [Wed, 13 Nov 2013 01:01:15 +0000 (01:01 +0000)]
This fixes 3 problems in syslogd related to sizing receive buffers...

- A call was misplaced at the wrong level of nested if blocks, so that
  the buffers for unix domain sockets (/dev/log, /dev/klog) were never
  increased at all; they remained at a way-too-small default size of 4096.

- The function that was supposed to double the size of the buffer
  sometimes did nothing, and sometimes installed a wildly-wrong buffer
  size (either too large or too small) due to an unitialized 'slen'
  variable passed to getsockopt().  Most often it doubled the UDP buffers
  from 40k to 80k because accidentally there would be harmless stack
  garbage in the unitialized variables.

- The whole concept of blindly doubling a socket's buffer size without
  knowing what size it started at is a design flaw that has to be called a
  bug.  If the double_rbuf() function had worked at all (I.E., if the
  other two bugs didn't exist) this would lead to UDP sockets having an
  80k buffer while unix dgram sockets get an 8k buffer.  There's nothing
  about the problem being solved that requires larger buffers for UDP than
  for unix dgram sockets -- the buffering requirements are the same
  regardless of socket type.

This change renames the double_rbuf() function to increase_rbuf() and
increases the buffer size on all types of sockets to 80k.  80k was
chosen only because it appears to be the size the original change was
shooting for, and it certainly seems to be reasonably large (I might
have picked 64k in the absence of any historical guidance).

PR: 160433
Submitted by: me, in 2011.

10 years agoMove the ioapic device model from userspace into vmm.ko. This is needed for
Neel Natu [Tue, 12 Nov 2013 22:51:03 +0000 (22:51 +0000)]
Move the ioapic device model from userspace into vmm.ko. This is needed for
upcoming in-kernel device emulations like the HPET.

The ioctls VM_IOAPIC_ASSERT_IRQ and VM_IOAPIC_DEASSERT_IRQ are used to
manipulate the ioapic pin state.

Discussed with: grehan@
Submitted by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)

10 years agoCheck for special status code from FIRMWARE_ACTIVATE command
Jim Harris [Tue, 12 Nov 2013 21:14:19 +0000 (21:14 +0000)]
Check for special status code from FIRMWARE_ACTIVATE command
signifying that a reboot is required to complete activation
of the requested firmware image.

Reported by: Joe Golio <joseph.golio@emc.com>
Sponsored by: Intel
MFC after: 3 days

10 years agoRegression tests for the libnv library.
Pawel Jakub Dawidek [Tue, 12 Nov 2013 20:31:16 +0000 (20:31 +0000)]
Regression tests for the libnv library.

Sponsored by: The FreeBSD Foundation

10 years agoAdd VM_LAST, a special last element in enum VM_GUEST and use it in CTASSERT
Sergey Kandaurov [Tue, 12 Nov 2013 20:13:10 +0000 (20:13 +0000)]
Add VM_LAST, a special last element in enum VM_GUEST and use it in CTASSERT
to ensure that vm_guest range is covered by vm_guest_sysctl_names.

Suggested by: mjg

10 years agoAdd a pre-world mode of updating similar to the -p option that can be
John Baldwin [Tue, 12 Nov 2013 19:44:18 +0000 (19:44 +0000)]
Add a pre-world mode of updating similar to the -p option that can be
passed to mergemaster.  In this mode, only changes to /etc/master.passwd
and /etc/group are merged to /etc.  In addition, it uses a temporary
tree to stage these changes rather than overwriting the existing
'current' and 'previous' trees so that a full update can be run after
a normal installworld has completed.

MFC after: 2 weeks