]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoFix typo in r231010.
Gleb Smirnoff [Sun, 5 Feb 2012 12:52:28 +0000 (12:52 +0000)]
Fix typo in r231010.

Submitted by: linimon

12 years agoAnalogous to r230407 a separate path buffer in vfs_mount.c is required
Martin Matuska [Sun, 5 Feb 2012 10:59:50 +0000 (10:59 +0000)]
Analogous to r230407 a separate path buffer in vfs_mount.c is required
for r230129. Fixes a out of bounds write to fspath.

MFC after: 10 days

12 years agoWhitespace fixes.
Ed Schouten [Sun, 5 Feb 2012 09:17:49 +0000 (09:17 +0000)]
Whitespace fixes.

- Remove redundant empty lines.
- Replace ^L by \014. This allows you to safely cat/grep/etc this file
  without causing confusion.

12 years agoBetter comment for ifa_init(), ifa_ref(), ifa_free().
Gleb Smirnoff [Sun, 5 Feb 2012 08:53:05 +0000 (08:53 +0000)]
Better comment for ifa_init(), ifa_ref(), ifa_free().

12 years agoIn ifa_init() initialize if_data.ifi_datalen. This would be
Gleb Smirnoff [Sun, 5 Feb 2012 08:31:15 +0000 (08:31 +0000)]
In ifa_init() initialize if_data.ifi_datalen. This would be
required after upcoming changes from bz@.

Discussed with: bz

12 years agoAdd 32-bit compat code for AIO kevent flags introduced in revision 230857.
David Xu [Sun, 5 Feb 2012 04:49:31 +0000 (04:49 +0000)]
Add 32-bit compat code for AIO kevent flags introduced in revision 230857.

12 years agoAdd support for bus_adjust_resource() on all PowerPC/AIM PCI bridges. With
Nathan Whitehorn [Sun, 5 Feb 2012 00:51:59 +0000 (00:51 +0000)]
Add support for bus_adjust_resource() on all PowerPC/AIM PCI bridges. With
this change, NEW_PCIB appears to work without incident at least on a G5
iMac. More testing will be required before it is turned on in GENERIC.

12 years agosh: Fix swapped INTON/INTOFF.
Jilles Tjoelker [Sat, 4 Feb 2012 23:29:07 +0000 (23:29 +0000)]
sh: Fix swapped INTON/INTOFF.

A possible consequence of this bug was a memory leak if SIGINT arrived
during a 'set' command (listing variables).

MFC after: 1 week

12 years agoCompatibility with IBM firmware.
Nathan Whitehorn [Sat, 4 Feb 2012 23:25:18 +0000 (23:25 +0000)]
Compatibility with IBM firmware.

12 years agosh: Use vfork in a few common cases.
Jilles Tjoelker [Sat, 4 Feb 2012 23:12:14 +0000 (23:12 +0000)]
sh: Use vfork in a few common cases.

This uses vfork() for simple commands and command substitutions containing a
single simple command, invoking an external program under certain conditions
(no redirections or variable assignments, non-interactive shell, no job
control). These restrictions limit the amount of code executed in a vforked
child.

There is a large speedup (for example 35%) in microbenchmarks. The
difference in buildkernel is smaller (for example 0.5%) but still
statistically significant. See
http://lists.freebsd.org/pipermail/freebsd-hackers/2012-January/037581.html
for some numbers.

The use of vfork() can be disabled by setting a variable named
SH_DISABLE_VFORK.

12 years agoFix installation script after r230482 -- a missing character apparently.
Nathan Whitehorn [Sat, 4 Feb 2012 23:00:27 +0000 (23:00 +0000)]
Fix installation script after r230482 -- a missing character apparently.
Now, back to convalescing.

12 years agoAfter multiple requests for back out, after multiple promisses from adrian@
Pawel Jakub Dawidek [Sat, 4 Feb 2012 20:17:07 +0000 (20:17 +0000)]
After multiple requests for back out, after multiple promisses from adrian@
to fix it (without fixing it), after making one of my servers unbootable,
after now making also my laptop unbootable and after running out of patiance
back out r229800 until better solution is found.

12 years agoMissed file in r230993.
Nathan Whitehorn [Sat, 4 Feb 2012 20:09:06 +0000 (20:09 +0000)]
Missed file in r230993.

12 years agoMiffed r230993 due to a one-character typo while reviewing the patch.
Nathan Whitehorn [Sat, 4 Feb 2012 20:04:35 +0000 (20:04 +0000)]
Miffed r230993 due to a one-character typo while reviewing the patch.

12 years agoUnify OF PCI infrastructure, including changing from parsing the device
Nathan Whitehorn [Sat, 4 Feb 2012 19:54:13 +0000 (19:54 +0000)]
Unify OF PCI infrastructure, including changing from parsing the device
tree based on heuristics to parsing it based on the spec. This should also
lay the foundation for NEW_PCIB on PowerPC.

MFC after: 3 months

12 years agoAvoid warnings about duplicate modules.
Nathan Whitehorn [Sat, 4 Feb 2012 19:50:26 +0000 (19:50 +0000)]
Avoid warnings about duplicate modules.

MFC after: 2 weeks

12 years agoFix $ipv6_network_interfaces handling in rc.d/routing. It could fail when
Hiroki Sato [Sat, 4 Feb 2012 18:14:49 +0000 (18:14 +0000)]
Fix $ipv6_network_interfaces handling in rc.d/routing.  It could fail when
it was set to "auto", for example.

MFC after: 3 days

12 years agoCorrect typo in comment (numbver)
Ed Maste [Sat, 4 Feb 2012 18:14:39 +0000 (18:14 +0000)]
Correct typo in comment (numbver)

12 years agoFix a possible infinite loop in "route flush" on 64-bit archs.
Hiroki Sato [Sat, 4 Feb 2012 17:53:22 +0000 (17:53 +0000)]
Fix a possible infinite loop in "route flush" on 64-bit archs.

MFC after: 3 days

12 years agoWhenever a new kernel thread is spawned, explicitly clear any CPU affinity
Ryan Stone [Sat, 4 Feb 2012 16:49:29 +0000 (16:49 +0000)]
Whenever a new kernel thread is spawned, explicitly clear any CPU affinity
set on the new thread.  This prevents the thread from inadvertently
inheriting affinity from a random sibling.

Submitted by: attilio
Tested by: pho
MFC after: 1 week

12 years agoFix input validation in SO_SETFIB.
Hiroki Sato [Sat, 4 Feb 2012 15:00:26 +0000 (15:00 +0000)]
Fix input validation in SO_SETFIB.

Reviewed by: bz
MFC after: 1 day

12 years agoAdd "nodevice adw" to WITHOUT_SOURCELESS_UCODE.
Robert Millan [Sat, 4 Feb 2012 13:45:39 +0000 (13:45 +0000)]
Add "nodevice adw" to WITHOUT_SOURCELESS_UCODE.

Approved by: kib (mentor)
MFC after: 13 days

12 years agoRemove useless and potentially dangerous rw() function which tries to
Jaakko Heinonen [Sat, 4 Feb 2012 13:37:31 +0000 (13:37 +0000)]
Remove useless and potentially dangerous rw() function which tries to
update access and modification times by reading and writing the file.
chmod(2) in rw() doesn't help because utimes(2) allow owner and the
super-user to change times. Using just utimes(2) should be sufficient.

The -f option becomes no-op.

Reviewed by: jilles

12 years agoBe as explicit as possible when describing relation between the -m mask
Konstantin Belousov [Sat, 4 Feb 2012 13:12:52 +0000 (13:12 +0000)]
Be as explicit as possible when describing relation between the -m mask
argument and slices. Adjust example for the same reason.

Submitted by: Valentin Nechayev <netch netch kiev ua>
MFC after: 3 days

12 years agoAdd /usr/src/cddl/ to the hierarchy.
Joel Dahl [Sat, 4 Feb 2012 08:03:01 +0000 (08:03 +0000)]
Add /usr/src/cddl/ to the hierarchy.

12 years agoFix typo in comment.
Pawel Jakub Dawidek [Sat, 4 Feb 2012 07:59:12 +0000 (07:59 +0000)]
Fix typo in comment.

MFC after: 3 days

12 years agoAdd MK_SOURCELESS build option. Setting MK_SOURCELESS to "no" will disable
Robert Millan [Sat, 4 Feb 2012 00:54:43 +0000 (00:54 +0000)]
Add MK_SOURCELESS build option. Setting MK_SOURCELESS to "no" will disable
kernel modules that include binary-only code.

More fine-grained control is provided via MK_SOURCELESS_HOST (for native code
that runs on host CPU) and MK_SOURCELESS_UCODE (for microcode).

Reviewed by: julian, delphij, freebsd-arch
Approved by: kib (mentor)
MFC after: 2 weeks

12 years agoRestore callee saved registers later and micro-optimize.
Jung-uk Kim [Fri, 3 Feb 2012 21:24:28 +0000 (21:24 +0000)]
Restore callee saved registers later and micro-optimize.

12 years agoFix a function prototype to reflect reality. No functional change.
Jung-uk Kim [Fri, 3 Feb 2012 21:21:00 +0000 (21:21 +0000)]
Fix a function prototype to reflect reality.  No functional change.

12 years agoRevert r230913 and r230914.
Martin Matuska [Fri, 3 Feb 2012 13:40:51 +0000 (13:40 +0000)]
Revert r230913 and r230914.

The initialization was correct, the problem needs deeper analysis.

12 years agoPrint the owner process for unix domain sockets when restricted to the
Sergey Kandaurov [Fri, 3 Feb 2012 09:07:53 +0000 (09:07 +0000)]
Print the owner process for unix domain sockets when restricted to the
specified files.

PR: bin/143962
MFC after: 2 weeks

12 years agoWhitespace removal.
Rui Paulo [Fri, 3 Feb 2012 02:06:14 +0000 (02:06 +0000)]
Whitespace removal.

12 years agoAdd some missing radar config parameters to athradar.
Adrian Chadd [Thu, 2 Feb 2012 21:04:24 +0000 (21:04 +0000)]
Add some missing radar config parameters to athradar.

12 years agoInsert ordered command every 1/4 of the current command timeout, not 1/4
Alexander Motin [Thu, 2 Feb 2012 19:02:15 +0000 (19:02 +0000)]
Insert ordered command every 1/4 of the current command timeout, not 1/4
of the default one.

Without this change setting kern.cam.ada.default_timeout to 1 instead of 30
allowed me to trigger several false positive command timeouts under heavy
ZFS load on a SiI3132 siis(4) controller with 5 HDDs on a port multiplier.

MFC after: 1 week

12 years agoFix the netback driver build for i386.
Kenneth D. Merry [Thu, 2 Feb 2012 17:54:35 +0000 (17:54 +0000)]
Fix the netback driver build for i386.

netback.c: Add missing VM includes.

xen/xenvar.h,
xen/xenpmap.h: Move some XENHVM macros from <machine/xen/xenpmap.h> to
<machine/xen/xenvar.h> on i386 to match the amd64 headers.

conf/files: Add netback to the build.

Submitted by: jhb
MFC after: 3 days

12 years agoRemove leftovers from previous commits.
Joel Dahl [Thu, 2 Feb 2012 17:25:39 +0000 (17:25 +0000)]
Remove leftovers from previous commits.

Approved by: jhb

12 years agoAdd copyright information on last commits to comply with CDDL.
Martin Matuska [Thu, 2 Feb 2012 16:33:58 +0000 (16:33 +0000)]
Add copyright information on last commits to comply with CDDL.

Discussed with: pluknet@
MFC after: 3 days

12 years agoFix out of bounds write causing random panics,
Martin Matuska [Thu, 2 Feb 2012 16:18:40 +0000 (16:18 +0000)]
Fix out of bounds write causing random panics,
uncovered by the change in r230256

Reviewed by: pluknet@
MFC after: 3 days

12 years agoMake CAM ATA honor old hw.ata.ata_dma and hw.ata.atapi_dma tunables.
Alexander Motin [Thu, 2 Feb 2012 14:17:58 +0000 (14:17 +0000)]
Make CAM ATA honor old hw.ata.ata_dma and hw.ata.atapi_dma tunables.

Even having more specific hint.ata.X.mode controls, global ones are
still could be useful from some points, including compatibility.

PR: kern/164651
MFC after: 1 week

12 years agoUnbreak the i386 full PV (XEN kernel) build by reverting rev 230878 and
Kenneth D. Merry [Thu, 2 Feb 2012 07:38:40 +0000 (07:38 +0000)]
Unbreak the i386 full PV (XEN kernel) build by reverting rev 230878 and
taking the netback driver out of the build temporarily.

12 years agoCleanup some sound headers that don't need to be in the modules makefiles.
Pedro F. Giffuni [Thu, 2 Feb 2012 00:10:20 +0000 (00:10 +0000)]
Cleanup some sound headers that don't need to be in the modules makefiles.

Approved by: jhb (mentor)
MFC after: 1 week

12 years agoUse new OSS-based BSD-licensed header for cs sound driver.
Pedro F. Giffuni [Wed, 1 Feb 2012 21:38:01 +0000 (21:38 +0000)]
Use new OSS-based BSD-licensed header for cs sound driver.

The cs driver requires a table with firmware values. An
alternative firmware is available in a similar Open Sound
System driver. This is actually a partial revert of
Revision 77504.

Special thanks to joel@ for patiently testing several
replacement attempts.

The csa driver and the complete sound system are now free
of the GPL.

Tested by: joel
Approved by: jhb (mentor)
MFC after: 3 weeks

12 years agoAdd the GSO prefix descriptor define.
Kenneth D. Merry [Wed, 1 Feb 2012 20:19:33 +0000 (20:19 +0000)]
Add the GSO prefix descriptor define.

MFC after: 3 days

12 years agoAdd the netback driver to the build.
Kenneth D. Merry [Wed, 1 Feb 2012 20:18:57 +0000 (20:18 +0000)]
Add the netback driver to the build.

MFC after: 3 days

12 years agoFix NULL dereference panic on attempt to turn off (on system shutdown)
Alexander Motin [Wed, 1 Feb 2012 20:12:44 +0000 (20:12 +0000)]
Fix NULL dereference panic on attempt to turn off (on system shutdown)
disconnected swap device.

This is quick and imperfect solution, as swap device will still be opened
and GEOM will not be able to destroy it. Proper solution would be to
automatically turn off and close disconnected swap device, but with existing
code it will cause panic if there is at least one page on device, even if
it is unimportant page of the user-level process. It needs some work.

Reviewed by: kib@
MFC after: 1 week

12 years agoAdd myself to the relevant docs.
Davide Italiano [Wed, 1 Feb 2012 19:46:12 +0000 (19:46 +0000)]
Add myself to the relevant docs.

Approved by: alc, gnn (mentors)

12 years agoTry to avoid ambiguity when sysctl returns ENOMEM additionally
Mikolaj Golub [Wed, 1 Feb 2012 18:03:21 +0000 (18:03 +0000)]
Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check sockstat gets stuck in loop leaking the
memory if the returned ENOMEM was due the exceeded memorylocked
limit. This is easily can be observed running `limits -l 1k sockstat'.

Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week

12 years agoTry to avoid ambiguity when sysctl returns ENOMEM additionally
Mikolaj Golub [Wed, 1 Feb 2012 18:02:13 +0000 (18:02 +0000)]
Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check kvm_getprocs() gets stuck in loop if the
returned ENOMEM was due the exceeded memorylocked limit. This is
easily can be observed running `limits -l 1k top'.

Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week

12 years agoChange the notes about the pidfile to include Doug's preference
Guy Helmer [Wed, 1 Feb 2012 16:40:59 +0000 (16:40 +0000)]
Change the notes about the pidfile to include Doug's preference
for pre-creating the pidfile with appropriate owner and permissions.

Requested by dougb

12 years agoAdd kqueue support to /dev/klog.
Konstantin Belousov [Wed, 1 Feb 2012 14:34:52 +0000 (14:34 +0000)]
Add kqueue support to /dev/klog.

Submitted by: Mateusz Guzik <mjguzik gmail com>
PR:   kern/156423
MFC after: 1 weeks

12 years agoAdjust mvs(4) to handle interrupt cause reg depending on the actual number of
Rafal Jaworowski [Wed, 1 Feb 2012 13:39:52 +0000 (13:39 +0000)]
Adjust mvs(4) to handle interrupt cause reg depending on the actual number of
channels available

- current code treats bits 4:7 in 'SATAHC interrupt mask' and 'SATAHC
  interrupt cause' as flags for SATA channels 2 and 3

- for embedded SATA controllers (SoC) these bits have been marked as reserved
  in datasheets so far, but for some new and upcoming chips they are used for
  purposes other than SATA

Submitted by: Lukasz Plachno
Reviewed by: mav
Obtained from: Semihalf
MFC after: 2 weeks

12 years agoMake the sys/ucontext.h self-contained by changing the return type
Konstantin Belousov [Wed, 1 Feb 2012 13:33:53 +0000 (13:33 +0000)]
Make the sys/ucontext.h self-contained by changing the return type
of __getcontextx_size(3) from size_t to int.

PR: ports/164654
MFC after: 1 month

12 years agoo Provide functions carp_ifa_addroute()/carp_ifa_delroute()
Gleb Smirnoff [Wed, 1 Feb 2012 11:07:41 +0000 (11:07 +0000)]
o Provide functions carp_ifa_addroute()/carp_ifa_delroute()
  to cleanup routes from a single ifa.
o Implement carp_addroute()/carp_delroute() via above functions.
o Call carp_ifa_delroute() in the carp_detach() to avoid
  junk routes left in routing table, in case if user
  removes an address in a MASTER state. [1]

Reported by: az [1]

12 years ago- remove non-existent input directories from the configs
Alexander Leidinger [Wed, 1 Feb 2012 10:59:19 +0000 (10:59 +0000)]
- remove non-existent input directories from the configs
- add the target-arch to the project name where applicable (arch dependend code)
- fix comment for __FreeBSD__ [1]

Noticed by: bz [1]

12 years agoThe scheme code may not know about some inconsistency in the metadata.
Andrey V. Elsukov [Wed, 1 Feb 2012 09:28:16 +0000 (09:28 +0000)]
The scheme code may not know about some inconsistency in the metadata.
So, add an integrity check after recovery attempt.

MFC after: 1 week

12 years agoEnable the pccard/cardbus modules for powerpc.
Justin Hibbits [Wed, 1 Feb 2012 03:42:14 +0000 (03:42 +0000)]
Enable the pccard/cardbus modules for powerpc.

Approved by: nwhitehorn (mentor)

12 years agoIf multiple threads call kevent() to get AIO events on same kqueue fd,
David Xu [Wed, 1 Feb 2012 02:53:06 +0000 (02:53 +0000)]
If multiple threads call kevent() to get AIO events on same kqueue fd,
it is possible that a single AIO event will be reported to multiple
threads, it is not threading friendly, and the existing API can not
control this behavior.
Allocate a kevent flags field sigev_notify_kevent_flags for AIO event
notification in sigevent, and allow user to pass EV_CLEAR, EV_DISPATCH
or EV_ONESHOT to AIO kernel code, user can control whether the event
should be cleared once it is retrieved by a thread. This change should
be comptaible with existing application, because the field should have
already been zero-filled, and no additional action will be taken by
kernel.

PR: kern/156567

12 years agoSupport AR9281/AR5B91 - a 1x2 stream device based on the AR9280.
Adrian Chadd [Tue, 31 Jan 2012 22:31:16 +0000 (22:31 +0000)]
Support AR9281/AR5B91 - a 1x2 stream device based on the AR9280.

* Override the TX/RX stream count if the EEPROM reports a single RX or
  TX stream, rather than assuming the device will always be a 2x2 strea
  device.

* For AR9280 devices, don't hard-code 2x2 stream.  Instead, allow the
  ar5416FillCapabilityInfo() routine to correctly determine things.

The latter should be done for all 11n chips now that
ar5416FillCapabilityInfo() will set the TX/RX stream count based on the
active TX/RX chainmask in the EEPROM.

Thanks to Maciej Milewski for donating some AR9281 NICs to me for
testing.

12 years agoCorrectly fetch the TX/RX stream count from the HAL.
Adrian Chadd [Tue, 31 Jan 2012 22:27:35 +0000 (22:27 +0000)]
Correctly fetch the TX/RX stream count from the HAL.

Pointy hat to: me

12 years agoMake sound(4) more flexible in setting soft buffer and block sizes when
Alexander Motin [Tue, 31 Jan 2012 21:46:28 +0000 (21:46 +0000)]
Make sound(4) more flexible in setting soft buffer and block sizes when
hardware imposes strict limitations on hard buffer and block sizes.

Previous code set soft buffer to be no smaller then hard buffer. On some
cards with fixed 64K physical buffer that caused up to 800ms play latency.
New code allows to set soft buffer size down to just two blocks of the hard
buffer and to not write more then that size ahead to the hardware buffer.
As result of that change I was able to reduce full practically measured
record-playback loop delay in those conditions down to only about 115ms
with theoretical playback latency of only about 50ms.

New code works fine for both vchans and direct cases. In both cases sound(4)
tries to follow hw.snd.latency_profile and hw.snd.latency values and
application-requested buffer and block sizes as much as limitation of two
hardware blocks allows.

Reviewed by: silence on multimedia@

12 years agoAdd isci(4) driver for amd64 and i386 targets.
Jim Harris [Tue, 31 Jan 2012 19:38:18 +0000 (19:38 +0000)]
Add isci(4) driver for amd64 and i386 targets.

The isci driver is for the integrated SAS controller in the Intel C600
(Patsburg) chipset.  Source files in sys/dev/isci directory are
FreeBSD-specific, and sys/dev/isci/scil subdirectory contains
an OS-agnostic library (SCIL) published by Intel to control the SAS
controller.  This library is used primarily as-is in this driver, with
some post-processing to better integrate into the kernel build
environment.

isci.4 and a README in the sys/dev/isci directory contain a few
additional details.

This driver is only built for amd64 and i386 targets.

Sponsored by: Intel
Reviewed by: scottl
Approved by: scottl

12 years ago- Restore XCR0 before restoring extended FPU states.
Jung-uk Kim [Tue, 31 Jan 2012 17:51:30 +0000 (17:51 +0000)]
- Restore XCR0 before restoring extended FPU states.
- Update my copyright dates.

Reviewed by: kib

12 years agoFix a spelling mistake in the surprise link down error constant.
John Baldwin [Tue, 31 Jan 2012 15:48:40 +0000 (15:48 +0000)]
Fix a spelling mistake in the surprise link down error constant.

Submitted by: glebius

12 years agoAdd -e to set arbitrary kernel environment variables.
Ed Maste [Tue, 31 Jan 2012 15:32:05 +0000 (15:32 +0000)]
Add -e to set arbitrary kernel environment variables.

Nextboot(8) can now set any combination of kernel name (-k), kernel
options (-o), and environment strings (-e).  As a result of this change
-k also becomes optional.

Reviewed by: freebsd-current (Ian Lepore, pluknet@, jhb@)

12 years agoIsolate v_caddr_t in the ie driver.
Sergey Kandaurov [Tue, 31 Jan 2012 13:00:40 +0000 (13:00 +0000)]
Isolate v_caddr_t in the ie driver.

Submitted by: Bruce Evans on net@

12 years agoJust in case, clear stream interrupts before enabling them.
Alexander Motin [Tue, 31 Jan 2012 12:57:21 +0000 (12:57 +0000)]
Just in case, clear stream interrupts before enabling them.

12 years agoFix a whitespace nit
Kevin Lo [Tue, 31 Jan 2012 05:49:49 +0000 (05:49 +0000)]
Fix a whitespace nit

Reviewed by: bz

12 years agoWhen a "mount -u" switches an NFS mount point from TCP to UDP,
Rick Macklem [Tue, 31 Jan 2012 03:58:26 +0000 (03:58 +0000)]
When a "mount -u" switches an NFS mount point from TCP to UDP,
any thread doing an I/O RPC with a transfer size greater than
NFS_UDPMAXDATA will be hung indefinitely, retrying the RPC.
After a discussion on freebsd-fs@, I decided to add a warning
message for this case, as suggested by Jeremy Chadwick.

Suggested by: freebsd at jdc.parodius.com (Jeremy Chadwick)
MFC after: 2 weeks

12 years agojwd@ reported a problem via email to freebsd-fs@ on Aug 25, 2011
Rick Macklem [Tue, 31 Jan 2012 02:11:05 +0000 (02:11 +0000)]
jwd@ reported a problem via email to freebsd-fs@ on Aug 25, 2011
under the subject "F_RDLCK lock to FreeBSD NFS fails to R/O target file".
This occurred because the server side NLM always checked for VWRITE
access, irrespective of the type of lock request. This patch
replaces VOP_ACCESS(..VWRITE..) with one appropriate to
the lock operation. It allows unlock and lock cancellation
to be done without a check of VOP_ACCESS(), so that files
can't be left locked indefinitely after the file permissions
have been changed.

Discussed with: zack
Submitted by: jwd (earlier version)
Reviewed by: dfr
MFC after: 2 weeks

12 years agoAllow contents of multiple directories to be merged to the current image.
Jung-uk Kim [Tue, 31 Jan 2012 00:32:37 +0000 (00:32 +0000)]
Allow contents of multiple directories to be merged to the current image.
Note this patch was submitted to NetBSD and they already adopted it.

http://mail-index.netbsd.org/source-changes/2012/01/28/msg031078.html

MFC after: 1 week

12 years agoAdd a DFS debugging mode which is useful when doing automated DFS
Adrian Chadd [Tue, 31 Jan 2012 00:03:49 +0000 (00:03 +0000)]
Add a DFS debugging mode which is useful when doing automated DFS
compliance testing.

In order to allow for radar pattern matching to occur, the DFS CAC/NOL
handling needs to be made configurable.  This commit introduces a new
sysctl, "net.wlan.dfs_debug", which controls which DFS debug mode
net80211 is in.

* 0 = default, CSA/NOL handling as per normal.
* 1 = announce a CSA, but don't add the channel to the non-occupy list
  (NOL.)
* 2 = disable both CSA and NOL - only print that a radar event occured.

This code is not compiled/enabled by default as it breaks regulatory
handling.  A user must enable IEEE80211_DFS_DEBUG in their kernel
configuration file for this option to become available.

Obtained from: Atheros

12 years agoRadar API related fixes.
Adrian Chadd [Mon, 30 Jan 2012 23:07:27 +0000 (23:07 +0000)]
Radar API related fixes.

* For legacy NICs, the combined RSSI should be used.
  For earlier AR5416 NICs, use control chain 0 RSSI rather than combined
  RSSI.
  For AR5416 > version 2.1, use the combined RSSI again.

* Add in a missing AR5212 HAL method (get11nextbusy) which may be called
  by radar code.

This serves no functional change for what's currently in FreeBSD.

12 years agoWrap the bool typedef
Jack F Vogel [Mon, 30 Jan 2012 23:03:21 +0000 (23:03 +0000)]
Wrap the bool typedef

12 years agoImprove media status reporting, when the driver knows...
Warner Losh [Mon, 30 Jan 2012 22:47:02 +0000 (22:47 +0000)]
Improve media status reporting, when the driver knows...

12 years agoManpages for the buf_ring and drbr interfaces.
Christian Brueffer [Mon, 30 Jan 2012 21:02:25 +0000 (21:02 +0000)]
Manpages for the buf_ring and drbr interfaces.

Submitted by: kmacy (aeons ago)
MFC after: 1 week

12 years agoAllow specification of build shell for the buildenv target.
Warner Losh [Mon, 30 Jan 2012 20:19:28 +0000 (20:19 +0000)]
Allow specification of build shell for the buildenv target.

Submitted by: ian lepore

12 years agoA debugger which requested PT_FOLLOW_FORK should get the notification
Konstantin Belousov [Mon, 30 Jan 2012 20:00:29 +0000 (20:00 +0000)]
A debugger which requested PT_FOLLOW_FORK should get the notification
about new child not only when doing PT_TO_SCX, but also for PT_CONTINUE.
If TDB_FORK flag is set, always issue a stop, the same as is done for
TDB_EXEC.

Reported by: Dmitry Mikulin <dmitrym juniper net>
MFC after: 1 week

12 years agoAdd support for GNU RELRO.
Konstantin Belousov [Mon, 30 Jan 2012 19:52:17 +0000 (19:52 +0000)]
Add support for GNU RELRO.

Submitted by: John Marino <draco marino st>
MFC after: 2 weeks

12 years agoAdd definition for PT_GNU_RELRO.
Konstantin Belousov [Mon, 30 Jan 2012 19:50:13 +0000 (19:50 +0000)]
Add definition for PT_GNU_RELRO.

MFC after: 3 days

12 years agoRefine the implementation of POSIX_FADV_NOREUSE for the read(2) case such
John Baldwin [Mon, 30 Jan 2012 19:35:15 +0000 (19:35 +0000)]
Refine the implementation of POSIX_FADV_NOREUSE for the read(2) case such
that instead of using direct I/O it allows read-ahead similar to
POSIX_FADV_NORMAL, but invokes VOP_ADVISE(POSIX_FADV_DONTNEED) after the
read(2) has completed to purge just-read data.  The write(2) path continues
to use direct I/O for POSIX_FADV_NOREUSE for now.  Note that NOREUSE works
optimally if an application reads and writes full fs blocks.

12 years agoFix build for the case of powerpc64 kernel without COMPAT_FREEBSD32.
Konstantin Belousov [Mon, 30 Jan 2012 19:31:17 +0000 (19:31 +0000)]
Fix build for the case of powerpc64 kernel without COMPAT_FREEBSD32.

MFC after: 2 months

12 years agoWhen detaching an AIO or LIO requests grab the lock and tell knlist_remove
Doug Ambrisko [Mon, 30 Jan 2012 19:19:22 +0000 (19:19 +0000)]
When detaching an AIO or LIO requests grab the lock and tell knlist_remove
that we have the lock now.  This cleans up a locking panic ASSERT when
knlist_empty is called without a lock when INVARIANTS etc. are turned.

Reviewed by: kib jhb
MFC after: 1 week

12 years agoNaturally align a newly added wakeup_fpusave.
Jung-uk Kim [Mon, 30 Jan 2012 18:28:56 +0000 (18:28 +0000)]
Naturally align a newly added wakeup_fpusave.

12 years agoNew hardware support: Intel X540 adapter support added.
Jack F Vogel [Mon, 30 Jan 2012 16:42:02 +0000 (16:42 +0000)]
New hardware support:  Intel X540 adapter support added.
Some shared code reorganization along with the new adapter.
Sync changes to OACTIVE in igb into this driver.
Misc small fixes.

12 years agoAdd a constant for the PCI-e surprise link down uncorrectable error.
John Baldwin [Mon, 30 Jan 2012 15:09:03 +0000 (15:09 +0000)]
Add a constant for the PCI-e surprise link down uncorrectable error.

12 years agoFix typo in comments.
Alexander Motin [Mon, 30 Jan 2012 09:59:33 +0000 (09:59 +0000)]
Fix typo in comments.

12 years agoFinally, try to enable the nxstacks on amd64 and powerpc64 for both 64bit
Konstantin Belousov [Mon, 30 Jan 2012 07:56:00 +0000 (07:56 +0000)]
Finally, try to enable the nxstacks on amd64 and powerpc64 for both 64bit
and 32bit ABIs. Also try to enable nxstacks for PAE/i386 when supported,
and some variants of powerpc32.

MFC after: 2 months (if ever)

12 years agoMove xrstor/xsave/xsetbv into fpu.c and reorder them.
Konstantin Belousov [Mon, 30 Jan 2012 07:53:33 +0000 (07:53 +0000)]
Move xrstor/xsave/xsetbv into fpu.c and reorder them.

Requested by: bde
MFC after: 1 month

12 years agoSynchronize the struct sigcontext definitions on x86 with mcontext_t.
Konstantin Belousov [Mon, 30 Jan 2012 07:51:52 +0000 (07:51 +0000)]
Synchronize the struct sigcontext definitions on x86 with mcontext_t.

Pointed out by: bde
MFC after: 1 month

12 years agoUupdate code to vendor rev. 4183 (release/2.8)
Martin Matuska [Sun, 29 Jan 2012 22:20:28 +0000 (22:20 +0000)]
Uupdate code to vendor rev. 4183 (release/2.8)

Fixes vendor issue 224:
"Mishandling CD9660 images with RockRidge extensions from FreeBSD makefs"

References:
http://code.google.com/p/libarchive/issues/detail?id=224

MFC after: 1 week

12 years agoUpdate to vendor revision 4183
Martin Matuska [Sun, 29 Jan 2012 22:12:48 +0000 (22:12 +0000)]
Update to vendor revision 4183

Obtained from: http://libarchive.googlecode.com/svn/release/2.8

12 years agoAlways return 0 if the sysctl failed.
Mikolaj Golub [Sun, 29 Jan 2012 20:39:42 +0000 (20:39 +0000)]
Always return 0 if the sysctl failed.

This fixes the bug: when procstat -xa was run and the sysctl for a
process returned ESRCH or EPERM, for this process procstat output the
result collected for the previous successful process.

12 years agoMissing code for receiving MESH PREP that should be part of r230409.
Adrian Chadd [Sun, 29 Jan 2012 19:35:40 +0000 (19:35 +0000)]
Missing code for receiving MESH PREP that should be part of r230409.

Submitted by: <monthadar@gmail.com>

12 years agoGS105v3 exhibit the same behavior
Eitan Adler [Sun, 29 Jan 2012 14:52:42 +0000 (14:52 +0000)]
GS105v3 exhibit the same behavior

PR: docs/135999
Submitted by: Boris Kochergin <spawky@acm.poly.edu>
No objection from: jfv
Approved by: cperciva
MFC after: 3 days

12 years agoFix build when RELEASE_CRUNCH is defined.
Yoshihiro Takahashi [Sun, 29 Jan 2012 09:12:34 +0000 (09:12 +0000)]
Fix build when RELEASE_CRUNCH is defined.

12 years agoPerform IPv6 DAD only in ifn_start.
Hiroki Sato [Sun, 29 Jan 2012 08:33:34 +0000 (08:33 +0000)]
Perform IPv6 DAD only in ifn_start.

12 years agoalways exclude data bufs regardless of debug settings
Kip Macy [Sun, 29 Jan 2012 00:19:19 +0000 (00:19 +0000)]
always exclude data bufs regardless of debug settings

12 years agoupdate .Dd
Kip Macy [Sat, 28 Jan 2012 23:30:39 +0000 (23:30 +0000)]
update .Dd

12 years agoAs it turns out r227960 may still be insufficient with PREEMPTION
Marius Strobl [Sat, 28 Jan 2012 22:42:33 +0000 (22:42 +0000)]
As it turns out r227960 may still be insufficient with PREEMPTION
so try harder to get the CDMA sync interrupt delivered and also in
a more efficient way:
- wrap the whole process of sending and receiving the CDMA sync
  interrupt in a critical section so we don't get preempted,
- send the CDMA sync interrupt to the CPU that is actually waiting
  for it to happen so we don't take a detour via another CPU,
- instead of waiting for up to 15 seconds for the interrupt to
  trigger try the whole process for up to 15 times using a one
  second timeout (the code was also changed to just ignore belated
  interrupts of a previous tries should they appear).

According to testing done by Peter Jeremy with the debugging also
added as part of this commit the first two changes apparently are
sufficient to now properly get the CDMA sync interrupts delivered
at the first try though.

12 years agoOops, commit a missing implementation change.
Adrian Chadd [Sat, 28 Jan 2012 22:24:59 +0000 (22:24 +0000)]
Oops, commit a missing implementation change.

Whilst I'm here, add a comment about what would happen in this function
if hypothetically you had a radar pattern matching detector written.