bapt [Sat, 22 Nov 2014 18:57:23 +0000 (18:57 +0000)]
Update mandoc to 1.13.1
imp [Sat, 22 Nov 2014 18:40:14 +0000 (18:40 +0000)]
Retire old, transition code for managing the FreeBSD 5 -> 6 migration.
kib [Sat, 22 Nov 2014 18:15:02 +0000 (18:15 +0000)]
The size value should be asserted when it is known.
Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
bapt [Sat, 22 Nov 2014 18:08:25 +0000 (18:08 +0000)]
Import mandoc 1.13.1
alc [Sat, 22 Nov 2014 17:46:30 +0000 (17:46 +0000)]
By the time that vm_reserv_init() runs, vm_phys_segs[] is initialized. Use
it instead of phys_avail[].
Discussed with: Svatopluk Kraus
hselasky [Sat, 22 Nov 2014 17:26:43 +0000 (17:26 +0000)]
Fix the host mode ISOCHRONOUS transfer interval programming in the
SAF1761 OTG driver. Currently the driver logic is very simple and
double buffering the USB transactions is not done. Also you need to
use an external USB high speed USB HUB for reliable FULL speed
outgoing ISOCHRONOUS traffic, because the internal one chokes on
so-called split transfers above 188 bytes.
trasz [Sat, 22 Nov 2014 16:48:29 +0000 (16:48 +0000)]
Implement "automount -c".
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
trasz [Sat, 22 Nov 2014 16:46:00 +0000 (16:46 +0000)]
Cross-reference autounmountd(8) from umount(8).
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
trasz [Sat, 22 Nov 2014 16:43:36 +0000 (16:43 +0000)]
Cross-reference automount(8) from mount(8).
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
dim [Sat, 22 Nov 2014 16:30:31 +0000 (16:30 +0000)]
Avoid undefined behaviour in gas's rotate_left() macro for n == 0.
Otherwise, clang can effectively remove the first iteration of the for
loops where this macro is invoked, and as a result, "cmp r0, #99" fails
to assemble.
Obtained from: joerg at netbsd
MFC after: 3 days
jilles [Sat, 22 Nov 2014 16:03:18 +0000 (16:03 +0000)]
sh: Use DQSYNTAX only while expanding, not SQSYNTAX.
Quoting during expansion only cares about CCTL, which is the same for
DQSYNTAX and SQSYNTAX.
mav [Sat, 22 Nov 2014 15:09:18 +0000 (15:09 +0000)]
For both iSCSI initiator and target increase socket buffer sizes before
establishing connection.
This is a workaround for Chelsio TOE driver, that does not update socket
buffer size in hardware after connection established, and unless that is
done beforehand, kernel code will stuck, attempting to send/receive full
PDU at once.
MFC after: 1 week
smh [Sat, 22 Nov 2014 14:59:50 +0000 (14:59 +0000)]
Fix build with asr driver
This was broken by r274819 as asr is not in GENERIC because its not 64bit
safe.
MFC after: 1 month
X-MFC-With: r274819
Sponsored by: Multiplay
ian [Sat, 22 Nov 2014 14:53:50 +0000 (14:53 +0000)]
Add libm to eliminate "undefined reference to sqrt" on arm 'softfp' builds.
bapt [Sat, 22 Nov 2014 12:48:09 +0000 (12:48 +0000)]
Enforce -lpthread and -lc to always be the 2 last components of the link list
Differential Revision: https://reviews.freebsd.org/D1118
Suggested by: kib
dim [Sat, 22 Nov 2014 12:13:05 +0000 (12:13 +0000)]
Fix the following -Werror warnings from clang 3.5.0, while building
usr.bin/locate:
usr.bin/locate/locate/util.c:249:29: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
^
usr.bin/locate/locate/util.c:249:29: note: remove the call to 'abs' since unsigned values cannot be negative
MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
^~~
usr.bin/locate/locate/util.c:274:32: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
^
usr.bin/locate/locate/util.c:274:32: note: remove the call to 'abs' since unsigned values cannot be negative
MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
^~~
The problem is that ntohl() always returns an unsigned quantity. In
this case, it's expected to be cast back to a signed integer, but to
stop complaints about abs() we just store it into an integer, and don't
call ntohl() again.
Reviewed by: ngie
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D1196
dim [Sat, 22 Nov 2014 12:10:09 +0000 (12:10 +0000)]
Fix the following -Werror warning from clang 3.5.0, while building
usr.bin/cpio on amd64 (or any arch with 64-bit time_t):
contrib/libarchive/cpio/cpio.c:1143:6: error: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
if (abs(mtime - now) > (365/2)*86400)
^
contrib/libarchive/cpio/cpio.c:1143:6: note: use function 'labs' instead
if (abs(mtime - now) > (365/2)*86400)
^~~
labs
1 error generated.
This is because time_t is a long on amd64. To avoid the warning, just
copy the equivalent test from a few lines before, which is used in the
Windows case, and which is type safe.
Reviewed by: emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D1198
mav [Sat, 22 Nov 2014 09:45:32 +0000 (09:45 +0000)]
Fix use-after-free introduced in r274843.
I've missed that iscsi_outstanding_remove() frees the second pointer,
so it should no longer be used. And in fact we don't really need to.
MFC after: 2 weeks
mav [Sat, 22 Nov 2014 09:05:54 +0000 (09:05 +0000)]
Move icl_pdu_get_data() and xpt_done() out of initiator's session lock.
During heavy reads data copying in icl_pdu_get_data() may consume large
percent of CPU time. Moving it out of the lock significantly reduces
lock hold time and respectively lock congestion on read operations.
MFC after: 2 weeks
hselasky [Sat, 22 Nov 2014 08:47:04 +0000 (08:47 +0000)]
Use correct length mask for split transactions. The hardware would
sometimes put non-zero values in the upper length bits, which are
available for high-speed-only USB transactions, breaking the reception
of data.
hrs [Sat, 22 Nov 2014 08:09:26 +0000 (08:09 +0000)]
Remove examples of gif_interfaces and gifconfig. These have already been
marked as deprecated in rc.conf(5) manual page but these examples
were still here.
Spotted by: jmg
mav [Sat, 22 Nov 2014 04:40:24 +0000 (04:40 +0000)]
Make iSCSI frontend less chatty while waiting for tasks termination.
MFC after: 1 week
ian [Sat, 22 Nov 2014 03:03:11 +0000 (03:03 +0000)]
When doing a PREREAD sync of an mbuf-type dma buffer, do a writeback of
the first cacheline if the buffer start address is not on a cacheline
boundary. Normally a buffer which is not cacheline-aligned is bounced,
but a special rule applies for mbufs, which are always misaligned due to
the header. We know the cpu will not write to the header while dma is in
progress (so we've been told anyway), but it may have written to the
header shortly before starting a read, so we need to flush that write out
to memory before invalidating the whole buffer.
In collaboration with Mical Meloun and Svata Kraus.
bapt [Sat, 22 Nov 2014 01:27:45 +0000 (01:27 +0000)]
Revert accidently message Makefile from 274836 and connect soeliminate(1)
bapt [Sat, 22 Nov 2014 01:22:03 +0000 (01:22 +0000)]
Add a new soeliminate(1) command
mandoc(1) does not provide an equivalent of the GNU groff's soelim(1) as an
external binary. It does provide the funcitonnality but internally.
Lots if manpages in ports uses ".so" directives to include the content of
another manpage, which works properly if the manpages are not compressed.
With compressed manpages it will fail. So we need to preprocess those manpages
with soelim(1) before compressing them.
soeliminate(1) add the minimum functionnality from soelim(1) required for that
task, in order to still be able to prepare properly those manpages in case we
ship the base system only with mandoc as a manpage renderer.
soeliminate(1) accept all the arguments from soelim(1) for compatibility but
only '-I dir' is really functionnal.
Name it soeliminate and not soelim, so groff from base or ports can still call
soelim(1) for its internal use and avoid potential incompatibilities
MFC after: 1 month
davide [Sat, 22 Nov 2014 00:42:30 +0000 (00:42 +0000)]
Use the correct variable name.
davide [Sat, 22 Nov 2014 00:37:37 +0000 (00:37 +0000)]
Make ufs_dirhashreclaimperc a percentage for real and
rename it to ufs_dirhashreclaimpercent, as suggested
by jhb@. As an added bonus this avoids divide-by-zero
errors.
Requested by: jhb, markj
Reviewied by: jhb, markj
imp [Fri, 21 Nov 2014 23:04:12 +0000 (23:04 +0000)]
Sort -K option before -k rather than at the top.
MFC after: 1 week
brooks [Fri, 21 Nov 2014 21:34:19 +0000 (21:34 +0000)]
Merge from CheriBSD:
commit
6d3c4c09226ad6bdd662e3e52489ef294a6ce298
Add terasic_mtl vt(4) framebuffer driver
terasic_mtl can be built with syscons(4) and vt(4) attachments, selected
at compile time.
commit
33240259b47a7c990a5a88a19f133a5600432a4c
Clear terasic_mtl text buffer on attach
commit
d188c2d2412953f949624aa35cd07082830943c9
Update terasic vt(4) driver for FreeBSD r269783
commit
d1cc54eee852fa4fc9d359d5bb2171d24ec73369
Safety belt to ensure vt(4) fb parameters are correct
commit
76e6d468ef45711d7952786095fc4791289ebb4b
Improve terasic_mtl_vt fdt parsing
- Use OF_getencprop to avoid need for explicit endian handling
(submitted by ray@freebsd.org)
- Check for expected length and correct pointer type
commit
3e2524b8995ab66e8a9295e4c87cbc7126eeddf4
Correct device_printf usage
commit
9e53e3c8e0766414e25662c95b09cc51c92443b0
Switch framebuffer to match host endianness
Xorg and xf86-video-scfb work much better with a native-endian
framebuffer.
commit
0f49259d596321ed85288ac0e1fb4ee1c966df48
Switch DE4 to vt(4) and enable kbdmux
commit
5bc96ebc89db7d134ad478335090c8477c1677c7
Add missing \n in device_printf calls
Submitted by: emaste
Sponsored by: DARPA, AFRL
ian [Fri, 21 Nov 2014 21:30:08 +0000 (21:30 +0000)]
Document the recent enhancements for configuring bus speed in iicbus(4).
Differential Revision: https://reviews.freebsd.org/D1182
PR: 195009
brooks [Fri, 21 Nov 2014 21:14:05 +0000 (21:14 +0000)]
Merge from CheriBSD:
commit
d0c7d235c09fc65dbdb278e7016a96f79c6a49cc
Make the Altera JTAG UART device driver slightly more forgiving of
the foibles of a sub-par hrdware interface by increasing the timeout
for spotting JTAG polling from one to two seconds.
commit
19ed45a18832560dab967c179d83b71081c3a220
Update comment.
commit
8edfe803f033cc8e33229f99894c2b7496a44d5f
Add a comment about a device-driver race condition that could cause the BERI
pipeline to wedge awaiting JTAG in the event that both the low-level console
and the tty layer decide to write to the JTAG FIFO just before JTAG is
disconnected. Resolving this race is a bit tricky as it looks like there
isn't a way to 'give the character back' to the tty layer when we discover
the race. The easy fix is to drop the character, which we don't yet do, but
perhaps should as that is a better outcome than wedging the pipeline.
commit
2ea26cf579c9defcf31e413e7c9b0fbc159237fc
Add a comment about an inherent race with hardware in the Altera JTAG
UART's low-level console code.
Submitted by: rwatson
MFC after: 1 week
Sponsored by: DARPA, AFRL
brooks [Fri, 21 Nov 2014 21:10:02 +0000 (21:10 +0000)]
Merge from CheriBSD (
2e28d2a3090239b30481f35dc452ad95a5c57389)
Remove initalized, but unused devname variable
MFC after: 1 week
Sponsored by: DARPA, AFRL
smh [Fri, 21 Nov 2014 21:01:24 +0000 (21:01 +0000)]
Prevent overflow issues in timeout processing
Previously, any timeout value for which (timeout * hz) will overflow the
signed integer, will give weird results, since callout(9) routines will
convert negative values of ticks to '1'. For unsigned integer overflow we
will get sufficiently smaller timeout values than expected.
Switch from callout_reset, which requires conversion to int based ticks
to callout_reset_sbt to avoid this.
Also correct isci to correctly resolve ccb timeout.
This was based on the original work done by Eygene Ryabinkin
<rea@freebsd.org> back in 5 Aug 2011 which used a macro to help avoid
the overlow.
Differential Revision: https://reviews.freebsd.org/D1157
Reviewed by: mav, davide
MFC after: 1 month
Sponsored by: Multiplay
brooks [Fri, 21 Nov 2014 20:54:12 +0000 (20:54 +0000)]
Merge from CheriBSD (
3422ebe71b6c06fe78b1be73623b240c219e08e3):
Rename beripic to beripic0.
MFC after: 1 week
Sponsored by: DARPA, AFRL
jhb [Fri, 21 Nov 2014 20:53:17 +0000 (20:53 +0000)]
Improve support for XSAVE with debuggers.
- Dump an NT_X86_XSTATE note if XSAVE is in use. This note is designed
to match what Linux does in that 1) it dumps the entire XSAVE area
including the fxsave state, and 2) it stashes a copy of the current
xsave mask in the unused padding between the fxsave state and the
xstate header at the same location used by Linux.
- Teach readelf() to recognize NT_X86_XSTATE notes.
- Change PT_GET/SETXSTATE to take the entire XSAVE state instead of
only the extra portion. This avoids having to always make two
ptrace() calls to get or set the full XSAVE state.
- Add a PT_GET_XSTATE_INFO which returns the length of the current
XSTATE save area (so the size of the buffer needed for PT_GETXSTATE)
and the current XSAVE mask (%xcr0).
Differential Revision: https://reviews.freebsd.org/D1193
Reviewed by: kib
MFC after: 2 weeks
brooks [Fri, 21 Nov 2014 20:02:06 +0000 (20:02 +0000)]
Add FPU support for MIPS setjmp(3)/longjmp(3).
This change saves/restores the callee-saved MIPS floating point
registers as documented by the o32/n32/n64 spec ("MIPSpro N32
ABI Handbook", Table 2-1) for the _setjmp(3), _longjmp(3),
setjmp(3) and longjmp(3) C library functions. This is only
included when the C library is built with hardware floating point
support (or when "SOFTFLOAT" is not defined).
Submitted by: sson
MFC after: 1 month
Sponsored by: DARPA, AFRL
brooks [Fri, 21 Nov 2014 18:35:48 +0000 (18:35 +0000)]
Slightly alter the handling of LOCAL_LIB_DIRS to skip addition of
directories in LOCAL_LIB_DIRS if they are subdirectories of directories
listed in LOCAL_DIRS. This allows a hierarchy like:
foo
foo/lib
foo/usr.bin
foo/usr.sbin
to be supported with LOCAL_DIRS=foo LOCAL_DIRS=foo/lib.
MFC after: 1 week
Sponsored by: DARPA, AFRL
brooks [Fri, 21 Nov 2014 18:18:37 +0000 (18:18 +0000)]
Add a guard against attempting to invoke the buildenv target with -j# as
that silently exits rather than doing something useful.
MFC after: 1 week
Sponsored by: DARPA, AFRL
mav [Fri, 21 Nov 2014 18:05:02 +0000 (18:05 +0000)]
Make cfiscsi_offline() synchronous, waiting for connections termination
before return. This should make ctld restart more clean and predictable.
MFC after: 2 weeks
mav [Fri, 21 Nov 2014 18:00:00 +0000 (18:00 +0000)]
In conf_apply() remove iSCSI ports from kernel before removing LUNs.
Previous order confused initiators with messages about "removed" LUNs
during simple ctld restart without any real config change. After this
commit initiators only reestablish lost connection, receive "Power on
occurred" UNIT ATTENTION status and continue normal operation.
MFC after: 1 month
rodrigc [Fri, 21 Nov 2014 17:57:37 +0000 (17:57 +0000)]
Create a vimage.9 link to vnet.9
Requested by: glebius
rodrigc [Fri, 21 Nov 2014 17:55:38 +0000 (17:55 +0000)]
Make MLINKS text match text in bsd.man.mk added by wosch@ in 1996.
trasz [Fri, 21 Nov 2014 16:14:32 +0000 (16:14 +0000)]
Fix error handling.
MFC after: 1 month
Coverity CID: 1249768
Sponsored by: The FreeBSD Foundation
trasz [Fri, 21 Nov 2014 15:49:41 +0000 (15:49 +0000)]
Document use of wildcards (*) and ampersands (&) in autofs map files.
Differential Revision: https://reviews.freebsd.org/D1199
Reviewed by: wblock@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
mav [Fri, 21 Nov 2014 15:38:31 +0000 (15:38 +0000)]
Close race between cfiscsi_offline() and new connection arrival.
Incoming connection should be either rejected or accepted and terminated.
n_hibma [Fri, 21 Nov 2014 14:53:42 +0000 (14:53 +0000)]
Simply remove the tmp dir before creating the symlink. We are doing
chroots all over the place, so there is bound to be a stale file lying
around in there (in my case samba lock files from creating accounts). If
we don't do that, the symlink later will fail.
trasz [Fri, 21 Nov 2014 12:35:18 +0000 (12:35 +0000)]
Add missing error checking for kernel_port_{add,remove}(). Both can fail
for reasons yet unknown; don't make it increment cumulated_error as a kind
of temporary workaround.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
mav [Fri, 21 Nov 2014 11:21:39 +0000 (11:21 +0000)]
Remove bunch of unused lun variables.
MFC after: 1 week
mav [Fri, 21 Nov 2014 11:20:24 +0000 (11:20 +0000)]
Reduce race between LUN destruction and request arrival.
MFC after: 1 week
bz [Fri, 21 Nov 2014 10:47:29 +0000 (10:47 +0000)]
Fix build for certain MIPS kernels hiding an unused variable under #ifndef.
mav [Fri, 21 Nov 2014 08:24:37 +0000 (08:24 +0000)]
Log errors for absent LUNs too.
MFC after: 1 week
mav [Fri, 21 Nov 2014 06:27:37 +0000 (06:27 +0000)]
Partially reconstruct Active/Standby clusting.
In this mode one head is in Active state, supporting all commands, while
another is in Standby state, supporting only minimal LUN discovery subset.
It is still incomplete since Standby state requires reservation support,
which is impossible to do right without having interlink between heads.
But it allows to run some basic experiments.
trasz [Fri, 21 Nov 2014 06:21:39 +0000 (06:21 +0000)]
Fix smbfs to not zero out statfs f_flags field. Previously, this
made getmntinfo() return empty flags for smbfs filesystems when
called with MNT_WAIT. It's not visible with mount(8), since it uses
MNT_NOWAIT, but broke autounmount(8) operation.
PR: 195161
Differential Revision: https://reviews.freebsd.org/D1194
Reviewed by: kib@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
jhibbits [Fri, 21 Nov 2014 02:45:39 +0000 (02:45 +0000)]
Fix the powerpc64 build.
Pointy-hat to: me
X-MFC-with: r274735
emaste [Fri, 21 Nov 2014 02:05:48 +0000 (02:05 +0000)]
Use canonical __PIC__ flag
It is automatically set when -fPIC is passed to the compiler.
Reviewed by: dim, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1179
imp [Fri, 21 Nov 2014 01:43:55 +0000 (01:43 +0000)]
Recommit r274750.
emaste [Thu, 20 Nov 2014 23:16:19 +0000 (23:16 +0000)]
Clamp too-large hwpmc callchaindepth to the maximum
If the depth requested by the user is too large, it's better to provide
the maximum than the smaller default.
Sponsored by: The FreeBSD Foundation
imp [Thu, 20 Nov 2014 21:18:19 +0000 (21:18 +0000)]
Back our r274750 until discussions on proper fix are over.
jhb [Thu, 20 Nov 2014 20:50:05 +0000 (20:50 +0000)]
Lock the scsi_low code and the drivers which use it along with other
related cleanups:
- Require each driver to initalize a mutex in the scsi_low_softc that
is shared with the scsi_low code. This mutex is used for CAM SIMs,
timers, and interrupt handlers.
- Replace the osdep function switch with direct calls to the relevant
CAM functions and direct manipulation of timers via callout(9).
- Collapse the CAM-specific scsi_low_osdep_interface substructure
directly into scsi_low_softc.
- Use bus_*() instead of bus_space_*().
- Return BUS_PROBE_DEFAULT from probe routines instead of 0.
- No need to zero softcs.
- Pass 0ul and ~0ul instead of 0 and ~0 to bus_alloc_resource().
- Spell "dettach" as "detach".
- Remove unused 'dvname' variables.
- De-spl().
Tested by: no one
jhb [Thu, 20 Nov 2014 20:24:30 +0000 (20:24 +0000)]
Lock spic(4) and mark it MPSAFE:
- Add a per-softc mutex as a driver lock.
- Use callout(9) instead of timeout(9).
- Set softc pointer in si_drv1 of cdev instead of looking softc
up via devclass in cdev methods.
Tested by: no one
jhb [Thu, 20 Nov 2014 20:09:18 +0000 (20:09 +0000)]
Various fixes for wl(4):
- Don't recurse driver mutex.
- Don't hold driver mutex across fubyte/subyte.
- Replace fubyte/subyte loops with copyin/copyout calls.
- Use relatively sane locking in wl_ioctl().
- Use bus space accessors instead of in*()/out*().
- Use callout(9) instead of timeout(9).
- Stop watchdog timer in detach and don't hold mutex across
bus_teardown_intr().
- Use device_printf() and if_printf().
- De-spl().
Tested by: no one
mav [Thu, 20 Nov 2014 19:28:42 +0000 (19:28 +0000)]
Remove residual xpt_release_device() call left after r272406 cleanup.
Excessive release here could trigger use-after-free condition and kernel
panic on LUN 0 disconnect.
MFC after: 1 week
imp [Thu, 20 Nov 2014 17:31:25 +0000 (17:31 +0000)]
Actually, that was a bad idea. Go back to MAXPARTITIONS.
Submitted by: bruce
br [Thu, 20 Nov 2014 17:06:41 +0000 (17:06 +0000)]
Add L2-cache writeback/flush operations. Supported 32,128-byte line-size,
else ignored. Cavium Networks also ignored as it has non-standard config
registers.
Obtained from: NetBSD
Sponsored by: DARPA, AFRL
andrew [Thu, 20 Nov 2014 17:03:40 +0000 (17:03 +0000)]
The ranges parent bus address may just be a tag to the entry in the parent
node. Take this in to account by searching until we find the range for the
root node.
Differential Revision: https://reviews.freebsd.org/D1160
Reviewed by: ian
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
ae [Thu, 20 Nov 2014 16:31:31 +0000 (16:31 +0000)]
Use geom attribute "PART::type" to determine partition type and choose
relevant fsck_xxx utility.
MFC after: 1 week
emaste [Thu, 20 Nov 2014 14:18:07 +0000 (14:18 +0000)]
Spell out "Windows" - no need to censor it in a man page
rodrigc [Thu, 20 Nov 2014 09:56:34 +0000 (09:56 +0000)]
MFp4: @179066
Add page which describes VNET network stack virtualization infrastructure.
Submitted by: bz
Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH
rodrigc [Thu, 20 Nov 2014 08:11:54 +0000 (08:11 +0000)]
Set the current vnet inside the ioctl handler for ipfilter.
Without this fix, the vnet was NULL and would crash.
This fix is similar to what was done inside the ioctl handler for PF.
Tested by:
(1) Boot a kernel with "options VIMAGE" enabled
(2) Type:
echo "map lo0 from 10.0.0.0/24 to ! 10.0.0.0/24 -> 127.0.0.1/32" > /etc/ipnat.rules ; service ipnat onerestart
PR: 176992
Differential Revision: https://reviews.freebsd.org/D1191
Reviewed by: cy
jhibbits [Thu, 20 Nov 2014 06:32:47 +0000 (06:32 +0000)]
cpudep_ap_early_bootstrap() takes no arguments, so no need to give it one.
MFC after: 3 weeks
trasz [Thu, 20 Nov 2014 06:14:40 +0000 (06:14 +0000)]
Uniformly refer to a file system as "file system".
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
trasz [Thu, 20 Nov 2014 06:12:11 +0000 (06:12 +0000)]
Add example on how to use gpart before growfs. While here, reorder examples
so that the simplest one comes first.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
adrian [Thu, 20 Nov 2014 05:54:29 +0000 (05:54 +0000)]
* Add a random device
* Use the same rootdev path as MALTA, so the same emulator setups
can be used with minimal fuss.
adrian [Thu, 20 Nov 2014 05:52:48 +0000 (05:52 +0000)]
Include a random device.
trasz [Thu, 20 Nov 2014 05:31:41 +0000 (05:31 +0000)]
Document growfs(8) feature apparently nobody knows about.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
trasz [Thu, 20 Nov 2014 05:25:52 +0000 (05:25 +0000)]
Use proper ordering in EXAMPLES section in growfs(8).
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
jmg [Thu, 20 Nov 2014 04:15:58 +0000 (04:15 +0000)]
I agree w/ tedu that this isn't a Bug.. it's like complaining that
you can't use an ssh client to fetch a web page...
Submitted by: tedu (via -tech)
jhibbits [Thu, 20 Nov 2014 03:47:04 +0000 (03:47 +0000)]
Use db_printsym() instead of our own in backtraces
Summary:
Currently if there are problems finding a symbol, backtrace ends up printing
something like:
0xdeadbeef: at +0x12345
Which is pretty useless. This on its own should be fixed (retrieving symbols),
but aside from that, using db_printsym() is a better solution anyway. If it
can't find a valid symbol it prints the actual address, and it has the added
benefit that if it can find the symbol, it might be able to print the file and
line as well.
Test Plan: Tested on my G4 PowerBook
Reviewers: #powerpc, nwhitehorn
Reviewed By: nwhitehorn
Differential Revision: https://reviews.freebsd.org/D1173
MFC after: 3 weeks
jhibbits [Thu, 20 Nov 2014 03:23:33 +0000 (03:23 +0000)]
Add support for Power Button PMU events on non-ADB macs, such as aluminum
PowerBooks.
MFC after: 2 weeks
Relnotes: yes
brd [Wed, 19 Nov 2014 23:07:46 +0000 (23:07 +0000)]
Replace the pw(1) calls with a variable, to make it easier to to change across all the tests as needed.
Reviewed by: will
np [Wed, 19 Nov 2014 20:16:56 +0000 (20:16 +0000)]
cxgbe(4): figure out the max payload size and save it for later.
MFC after: 1 week
trasz [Wed, 19 Nov 2014 19:46:58 +0000 (19:46 +0000)]
Make the auto_master(5) man page clearer on how auto_master
and map files work together, and add example for smbfs.
Differential Revision: https://reviews.freebsd.org/D1184
Reviewed by: wblock@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
trasz [Wed, 19 Nov 2014 19:43:39 +0000 (19:43 +0000)]
Remove acl_size.c; apparently it was never used.
PR: 194398
Submitted by: ngie@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
imp [Wed, 19 Nov 2014 18:55:27 +0000 (18:55 +0000)]
The number of BSD partitions is variable. Return the proper number
(which is in basetable->gpt_entries).
Submitted by: ae@
trasz [Wed, 19 Nov 2014 18:19:21 +0000 (18:19 +0000)]
Fix improper .Fx macro usage.
Differential Revision: https://reviews.freebsd.org/D1158
Reviewed by: wblock@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
glebius [Wed, 19 Nov 2014 16:29:39 +0000 (16:29 +0000)]
Use __func__ in KASSERTs, since the code is about to be moved to other place.
Sponsored by: Nginx, Inc.
glebius [Wed, 19 Nov 2014 15:17:19 +0000 (15:17 +0000)]
In vnode_pager_generic_getpages() vp->v_mount is dereferenced in the
beginning, thus can't be NULL.
Sponsored by: Nginx, Inc.
br [Wed, 19 Nov 2014 14:49:29 +0000 (14:49 +0000)]
Add BERI-specific virtio mmio "platform" device.
This device provides a connector to Altera PIO allowing us
to interrupt software-implemented virtio mmio backend.
Sponsored by: DARPA, AFRL
glebius [Wed, 19 Nov 2014 14:27:38 +0000 (14:27 +0000)]
Do not allocate zero-length mbuf in sosend_generic().
Found by: pho
Sponsored by: Nginx, Inc.
zbb [Wed, 19 Nov 2014 14:23:29 +0000 (14:23 +0000)]
Stop using early_putc immediately after configuring console with cninit()
Early UART should be released right after system console initialization is
completed. Otherwise, after cninit() both early and system console coexist
what may lead to various issues (i.a. writing to unmapped early
UART address). This cannot be done in cninit_finish() since it can be
called late at the end of MI configuration.
Obtained from: Semihalf
Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
feld [Wed, 19 Nov 2014 13:57:39 +0000 (13:57 +0000)]
Expose groups by default in ifconfig output. This was never hidden by
OpenBSD; unsure why we chose to do so. As groups are a requirement for
pf, exposing them by default will make our pf implementation less
confusing.
While here add a missing free() that OpenBSD fixed 7 years ago.
PR: 194925
Differential Revision: https://reviews.freebsd.org/D1185
Approved by: des
Obtained from: OpenBSD
eri [Wed, 19 Nov 2014 13:31:08 +0000 (13:31 +0000)]
pf(4) needs to have a correct checksum during its processing.
Calculate checksums for the IPv6 path when needed before
delving into pf(4) code as required.
PR: 172648, 179392
Reviewed by: glebius@
Approved by: gnn@
Obtained from: pfSense
MFC after: 1 week
Sponsored by: Netgate
mav [Wed, 19 Nov 2014 13:04:25 +0000 (13:04 +0000)]
Fix build without INVARIANTS, broken by r274675.
dchagin [Wed, 19 Nov 2014 11:05:45 +0000 (11:05 +0000)]
Revert r274635 as it's completely wrong.
The parent of a pci dev device is a pciX device which do not
implement the PCIB_POWER_FOR_SLEEP method from pcib_if.m.
trasz [Wed, 19 Nov 2014 08:59:49 +0000 (08:59 +0000)]
Fix typo.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
dim [Wed, 19 Nov 2014 07:47:37 +0000 (07:47 +0000)]
Fix the following -Werror warning from clang 3.5.0, while building
lib/libngatm:
sys/contrib/ngatm/netnatm/saal/saal_sscop.c:4030:32: error: 'break' is bound to current loop, GCC binds it to the enclosing loop [-Werror,-Wgcc-compat]
} while(sn < sscop->vr_h && !QFIND(&sscop->rbuf, sn));
^
sys/contrib/ngatm/netnatm/saal/saal_sscop.c:173:4: note: expanded from macro 'QFIND'
break; \
^
1 error generated.
The idea is to remove any ambiguity by replacing the macro with an
equivalent static inline function.
Reviewed by: emaste, rpaulo
See also: http://reviews.llvm.org/D2518
Differential Revision: https://reviews.freebsd.org/D1188
dim [Wed, 19 Nov 2014 07:44:21 +0000 (07:44 +0000)]
Fix the following -Werror warning from clang 3.5.0, while building cddl/lib/libctf:
In file included from cddl/contrib/opensolaris/common/ctf/ctf_create.c:31:
In file included from sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h:34:
sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h:334:9: warning: '_ILP32' macro redefined [-Wmacro-redefined]
#define _ILP32
^
<built-in>:26:9: note: previous definition is here
#define _ILP32 1
^
1 warning generated.
This is because clang 3.5.0 started predefining _ILP32 and __ILP32__ for
the i386 arch. (Earlier versions already predefined _LP64 and __LP64__
for the x86_64 arch.)
Reviewed by: emaste, avg, smh, delphij, markj
Differential Revision: https://reviews.freebsd.org/D1187
kevlo [Wed, 19 Nov 2014 05:38:45 +0000 (05:38 +0000)]
Add Trendnet TEW-646UBH.
Submitted by: bolshakov_1 at yahoo dot com
delphij [Tue, 18 Nov 2014 22:35:19 +0000 (22:35 +0000)]
Make vfs.zfs.max_recordsize read-write at runtime.
MFC after: 2 weeks
jhb [Tue, 18 Nov 2014 22:12:51 +0000 (22:12 +0000)]
Add locking to wds(4) and mark MPSAFE.
- Add per-softc mutex.
- Use mutex for CAM SIM lock.
- Use bus_*() instead of inb() and outb().
- Use bus_alloc_resource_any() when reasonable.
Tested by: no one