kib [Sun, 13 May 2012 13:57:53 +0000 (13:57 +0000)]
MFC r234782:
Add src.conf option WITH_SHARED_TOOLCHAIN to enable building the
toolchain binaries as dynamically linked. Option is disabled by
default.
MFC r235152 (by imp):
Make is part of the bootstrap path, so we need to guard against this
not being defined. Otherwise we don't make a new make when the old
make is incompatible.
rmacklem [Sun, 13 May 2012 13:35:50 +0000 (13:35 +0000)]
MFC: r234742
It was reported via email that some non-FreeBSD NFS servers
do not include file attributes in the reply to an NFS create RPC
under certain circumstances.
This resulted in a vnode of type VNON that was not usable.
This patch adds an NFS getattr RPC to nfs_create() for this case,
to fix the problem. It was tested by the person that reported
the problem and confirmed to fix this case for their server.
kib [Sun, 13 May 2012 12:50:42 +0000 (12:50 +0000)]
MFC r234840:
Split the symlook_obj1 into a loop iterating over the ELF object symbol
hash elements, and a helper matched_symbol() which match the given hash
entry and request, performing needed type and version checks.
MFC r234841:
Add GNU hash support for rtld.
MFC r235054:
Work around a situation where symlook_obj() could be called for the
object for which digest_dynamic1() was not done yet. Just return
EINVAL and do not try to dereference NULL buckets hash array.
sbruno [Sun, 13 May 2012 10:31:08 +0000 (10:31 +0000)]
MFC 235210
Modify the binding of queues to attach to as many CPUs
as possible when using more than one igb(4) adapter. This
means that queues will not be bound to the same CPUs if
there are more CPUs availble.
This is only applicable to a system that has multiple interfaces.
bschmidt [Sat, 12 May 2012 08:22:41 +0000 (08:22 +0000)]
MFC r234711, r234756-234759, r234786:
r234711:
fix EAP server support after the 0.7.3 import:
- eap_xxx.c files have been renamed to eap_server_xxx.c
- additional crypto files are required for some options
- EAP_MD5 and EAP_GTC is now enabled by default to match vendor config
- move each file on its own line to hopefully make further diffs easier
to read
EAP_SERVER is now enabled by default. Fiddling with HOSTAPD_CFLAGS in
src.conf is no longer required to get a basic WPA-EAP/radius setup
running. [1]
r234756-234758:
- Follow up r234711 and do same for the supplicant, one file/option per
line. While here merge the options which are always enabled.
- enable EAP_GTC and EAP_OTP to match upstream's default configuration
- not only the file names have changed from eap_xxx.c to eap_server_xxx.c,
the defines too
r234759:
Move crypto stuff into a common Makefile. While here fix the
WITHOUT_OPENSSL build by using the wpa's internal crypto support if
openssl is not available, this allows us to unconditionally enable
EAP support.
r234786:
Fix WITHOUT_EXAMPLES build:
While removing unnecessary entries from .PATH.c I missed that for the
examples WPA_SUPPLICANT_DISTDIR/HOSTAPD_DISTDIR is explicitly added to
.PATH.
attilio [Fri, 11 May 2012 04:10:23 +0000 (04:10 +0000)]
MFC r233961,234074,234105,234564,234723,234989,235231-235232:
- Fix a bug in x86 and sparc64 where the intr cpu mask does only
enables the BSP.
- Remove the SMP constraints for intr_add_cpu
emaste [Fri, 11 May 2012 01:24:16 +0000 (01:24 +0000)]
MFC r234138:
Support percent-encoded user and password
RFC 1738 specifies that any ":", "@", or "/" within a user name or
password in a URL is percent-encoded, to avoid ambiguity with the use
of those characters as URL component separators.
daichi [Thu, 10 May 2012 20:35:50 +0000 (20:35 +0000)]
MFC: 234867 and 234944
- fixed a vnode lock hang-up issue.
- fixed an incorrect lock status issue.
- fixed an incorrect lock issue of unionfs root vnode removed.
(pointed out by keith)
- fixed an infinity loop issue.
(pointed out by dumbbell)
- changed to do LK_RELEASE expressly when unlocked.
- fixed a unionfs_readdir math issue
Submitted by: ozawa@ongs.co.jp, Matthew Fleming <mfleming@isilon.com>
kib [Thu, 10 May 2012 10:16:21 +0000 (10:16 +0000)]
MFC r234981:
Move the code to call the callout callback into the helper function
softclock_call_cc(). While there, move some common code to callout_cc_del().
kib [Thu, 10 May 2012 10:02:56 +0000 (10:02 +0000)]
MFC r234952:
Mark the migrating callouts with CALLOUT_DFRMIGRATION flag. The flag is
cleared by callout_stop_safe() when the function detects a migration,
besides returning the success. The softclock() rechecks the flag for
migrating callout and cancels its execution if the flag was cleared
meantime.
tuexen [Wed, 9 May 2012 14:07:12 +0000 (14:07 +0000)]
MFC r235064:
Honor SCTP_ENABLE_STREAM_RESET socket option when processing incoming
requests. Fix also the provided result in the response and use names
as specified in RFC 6525.
pho [Wed, 9 May 2012 08:18:22 +0000 (08:18 +0000)]
MFC: r234932
Added D_TRACKCLOSE to sndstat_cdevsw to fix the situation when
another process is in open() or stat() for the device node, then
close() from the owning process does not result in cdevsw close
method call. This fixes the pemanent "Device busy" seen.
Changed the sndstat_lock from mutex to sx. This allows to extend
the region covered by the lock, to include the uiomove() call in
sndstat_read() and bufptr increment. This fixes the "panic:
sbuf_put_byte called with finished or corrupt sbuf" seen.
bapt [Sun, 6 May 2012 22:50:07 +0000 (22:50 +0000)]
MFC r234313 r234315 r234322 r234351 r234870
bootstrap tool for pkgng.
it respects PACKAGESITE, PACKAGEROOT, and a new environment variable ABI (if a
user want to use a different API from the base one for its packages)
it has no man page on purpose to avoid hidding the pkg(8) man page from the
pkgng package.
for now uses pkgbeta.FreeBSD.org as default mirror to find its package
it respects MK_PKGTOOLS
Hide kernel option ROUTETABLES evaluations in the implementation
rather than the header file. With this also move RT_MAXFIBS and
RT_NUMFIBS into the implemantion to avoid further usage in other
code. rt_numfibs is all that should be needed.
This allows users to change the number of FIBs from 1..RT_MAXFIBS(16)
dynamically using the tunable without the need to change the kernel
config for the maximum anymore. This means that the multi-FIB
feature is now fully available with GENERIC kernels.
The kernel option ROUTETABLES can still be used to set the default
numbers of FIBs in absence of the tunable.
nwhitehorn [Sat, 5 May 2012 16:41:17 +0000 (16:41 +0000)]
MFC r230993,230994,230995,230999,231003,231026,231046,231149,231908:
Reduce code duplication in Open Firmware based PCI bus drivers, implement
infrastructure for NEW_PCIB, and switch to using NEW_PCIB by default.
melifaro [Sat, 5 May 2012 11:33:48 +0000 (11:33 +0000)]
MFC r234572
Do not require radix write lock to be held while dumping route table
via sysctl(4) interface. This permits router not to stop forwarding
packets while route table is being written to user-supplied buffer.
glebius [Sat, 5 May 2012 07:55:50 +0000 (07:55 +0000)]
Merge 234342 from head:
When we receive an ICMP unreach need fragmentation datagram, we take
proposed MTU value from it and update the TCP host cache. Then
tcp_mss_update() is called on the corresponding tcpcb. It finds the
just allocated entry in the TCP host cache and updates MSS on the
tcpcb. And then we do a fast retransmit of what we have in the tcp
send buffer.
This sequence gets broken if the TCP host cache is exausted. In this
case allocation fails, and later called tcp_mss_update() finds nothing
in cache. The fast retransmit is done with not reduced MSS and is
immidiately replied by remote host with new ICMP datagrams and the
cycle repeats. This ping-pong can go up to wirespeed.
To fix this:
- tcp_mss_update() gets new parameter - mtuoffer, that is like
offer, but needs to have min_protoh subtracted.
- tcp_mtudisc() as notification method renamed to tcp_mtudisc_notify().
- tcp_mtudisc() now accepts not a useless error argument, but proposed
MTU value, that is passed to tcp_mss_update() as mtuoffer.
Reported by: az
Reported by: Andrey Zonov <andrey zonov.org>
Reviewed by: andre (previous version of patch)
jilles [Fri, 4 May 2012 20:45:53 +0000 (20:45 +0000)]
MFC r234057: sem_open: Make sure to fail an O_CREAT|O_EXCL open, even if
that semaphore is already open in this process.
If the named semaphore is already open, sem_open() only increments a
reference count and did not take the flags into account (which otherwise
happens by passing them to open()). Add an extra check for O_CREAT|O_EXCL.
hselasky [Fri, 4 May 2012 15:38:47 +0000 (15:38 +0000)]
MFC r233662, r233677 and r233678:
Writing zero to BAR actually does not disable it and
it is even harmful as hselasky found out. Historically,
this code was originated from (OLDCARD) CardBus driver and later leaked into
PCI driver when CardBus was newbus'ified and refactored with PCI driver.
However, it is not really necessary even for CardBus.
hselasky [Fri, 4 May 2012 15:10:49 +0000 (15:10 +0000)]
MFC r234803 and r234961:
Add support for Multi-TT mode of modern USB HUBs.
This will give you more bandwidth for isochronous
FULL speed applications connected through a
High Speed HUB.
- Use more natural ip->i_flags instead of vap->va_flags in the final
flags check.
- Add a comment for the immutable/append check done after handling of
the flags.
- Style improvements.
No functional change intended.
MFC r234421:
The part about exec atime no longer applies in the comment.
mav [Wed, 2 May 2012 07:17:53 +0000 (07:17 +0000)]
MFC r234415:
Some improvements to GEOM MULTIPATH:
- Implement "configure" command to allow switching operation mode of
running device on-fly without destroying and recreation.
- Implement Active/Read mode as hybrid of Active/Active and Active/Passive.
In this mode all paths not marked FAIL may handle reads same time,
but unlike Active/Active only one path handles write requests at any
point in time. It allows to closer follow original write request order
if above layers need it for data consistency (not waiting for requisite
write completion before sending dependent write).
- Hide duplicate messages about device status change.
- Remove periodic thread wake up with 10Hz rate.
delphij [Wed, 2 May 2012 00:30:30 +0000 (00:30 +0000)]
MFC r233770:
Eliminate two cases of unwanted strncpy(). The name is not required
by the current code, and the results would get overwritten anyway
by subsequent memset().
kib [Tue, 1 May 2012 10:49:20 +0000 (10:49 +0000)]
MFC r234657:
Take the spinlock around clearing of the fp->_flags in fclose(3), which
indicates the avaliability of FILE, to prevent possible reordering of
the writes as seen by other CPUs.
r233998:
Add reserved memory limit sysctl to tmpfs. Cleanup availble and used
memory functions. Check if free pages available before allocating new
node.
r233999 (partial):
Add vfs_getopt_size. Support human readable file system options in tmpfs.
Increase maximum tmpfs file system size to 4GB*PAGE_SIZE on 32 bit archs.
NOTE: To preserve KBI add tmpfs_getopt_size function instead of global
vfs_getopt_size.
r234000:
tmpfs supports only INT_MAX nodes due to limitations of unit number
allocator. Replace UINT32_MAX checks with INT_MAX. Keeping more than 2^31
nodes in memory is not likely to become possible in foreseeable feature
and would require new unit number allocator.
r234325:
Provide better description for vfs.tmpfs.memory_reserved sysctl.
MFC r233507:
Use program exit status as pam_exec return code (optional)
pam_exec(8) now accepts a new option "return_prog_exit_status". When
set, the program exit status is used as the pam_exec return code. It
allows the program to tell why the step failed (eg. user unknown).
However, if it exits with a code not allowed by the calling PAM service
module function (see $PAM_SM_FUNC below), a warning is logged and
PAM_SERVICE_ERR is returned.
The following changes are related to this new feature but they apply no
matter if the "return_prog_exit_status" option is set or not.
The environment passed to the program is extended:
o $PAM_SM_FUNC contains the name of the PAM service module function
(eg. pam_sm_authenticate).
o All valid PAM return codes' numerical values are available
through variables named after the return code name. For instance,
$PAM_SUCCESS, $PAM_USER_UNKNOWN or $PAM_PERM_DENIED.
pam_exec return code better reflects what went on:
o If the program exits with !0, the return code is now
PAM_PERM_DENIED, not PAM_SYSTEM_ERR.
o If the program fails because of a signal (WIFSIGNALED) or doesn't
terminate normally (!WIFEXITED), the return code is now
PAM_SERVICE_ERR, not PAM_SYSTEM_ERR.
o If a syscall in pam_exec fails, the return code remains
PAM_SYSTEM_ERR.
waitpid(2) is called in a loop. If it returns because of EINTR, do it
again. Before, it would return PAM_SYSTEM_ERR without waiting for the
child to exit.
Several log messages now include the PAM service module function name.
Fix a bug where we copy out more data from a mbuf chain that are
actually in it. This happens when SCTP receives an unknown chunk, which
requires the sending of an ERROR chunk, and there is no final padding but
the chunk is not 4-byte aligned.
Reported by yueting via rwatson@
Export the udp_cksum sysctl for upcoming SCTP work. Rather than always,
SCTP will only do IPv4 UDP checksum calculation as defined by the host
policy. When tunneling SCTP always calculates the inner checksum already
so not doing the outer UDP can save cycles.
MFC r234038
If a page belonging a reservation is cached, then mark the reservation so
that it will be freed to the cache pool rather than the default pool.
Otherwise, the cached pages within the reservation may be recycled sooner
than necessary.
MFC r234556:
When MAP_STACK mapping is created, the map entry is created only to
cover the initial stack size. For MCL_WIREFUTURE maps, the subsequent
call to vm_map_wire() to wire the whole stack region fails due to
VM_MAP_WIRE_NOHOLES flag.
Use the VM_MAP_WIRE_HOLESOK to only wire mapped part of the stack.
MFC r233097
With the changes over the past year to how accesses to the page's dirty
field are synchronized, there is no need for pmap_protect() to acquire
the page queues lock unless it is going to access the pv lists.
dim [Sat, 28 Apr 2012 09:21:43 +0000 (09:21 +0000)]
MFC r234540:
Fix the following clang warning in dpt(4):
sys/dev/dpt/dpt_scsi.c:612:18: error: implicit truncation from 'int' to bitfield changes value from -2 to 2 [-Werror,-Wconstant-conversion]
dpt->cache_type = DPT_CACHE_WRITEBACK;
^ ~~~~~~~~~~~~~~~~~~~
by defining DPT_CACHE_WRITEBACK as 2, since dpt_softc::cache_type is an
unsigned bitfield. No binary change.
dim [Sat, 28 Apr 2012 09:18:20 +0000 (09:18 +0000)]
MFC r228572:
Fix format string Z --> z, since the former is a deprecated and (in FreeBSD)
unsupported form of the latter. This change has been reviewed and accepted
in the -hackers list.
Submitted by: Alexander Best
Reviewed by: David Schulz