]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoLoosen the processing of *_IF_aliasN vars to be less strict. Previously,
dteske [Mon, 7 Apr 2014 22:40:29 +0000 (22:40 +0000)]
Loosen the processing of *_IF_aliasN vars to be less strict. Previously,
the first alias had to be _alias0 and processing stopped at the first non-
defined variable (preventing gaps). Allowing gaps gives the administrator
the ability to group aliases in an adhoc manner and also lifts the
requirement to renumber aliases simply to comment-out an existing one.
Aliases are processed in numerical ascending order.

Discussed on: -rc
MFC after: 1 week

10 years agoDo not fill screen, while muted.
ray [Mon, 7 Apr 2014 22:37:13 +0000 (22:37 +0000)]
Do not fill screen, while muted.

Sponsored by: The FreeBSD Foundation

10 years agoCall sctp_addr_change() from rt_addrmsg() instead of rt_newaddrmsg_fib(),
tuexen [Mon, 7 Apr 2014 21:28:21 +0000 (21:28 +0000)]
Call sctp_addr_change() from rt_addrmsg() instead of rt_newaddrmsg_fib(),
since rt_addrmsg() gets also called from other functions.

MFC after: 3 days

10 years agoThinko: don't forget to apply 'howto' in case init(8) isn't running.
ed [Mon, 7 Apr 2014 21:18:12 +0000 (21:18 +0000)]
Thinko: don't forget to apply 'howto' in case init(8) isn't running.

10 years agoNeed to test .MAKE.LEVEL everywhere before using it for bootstrapping
imp [Mon, 7 Apr 2014 21:16:51 +0000 (21:16 +0000)]
Need to test .MAKE.LEVEL everywhere before using it for bootstrapping
issues between fmake and bmake.

10 years agoFor GNU as, add two missing modes for each of the fcomip and fucomip
dim [Mon, 7 Apr 2014 21:12:09 +0000 (21:12 +0000)]
For GNU as, add two missing modes for each of the fcomip and fucomip
instructions.  Partially obtained from OpenBSD by Pedro Giffuni, while I
added the fcomip variants.

Apparently this should help with compiling certain variants of WebKit.

MFC after: 3 days

10 years agoClean up shutdown_nice(). Just send the right signal to init(8).
ed [Mon, 7 Apr 2014 21:11:29 +0000 (21:11 +0000)]
Clean up shutdown_nice(). Just send the right signal to init(8).

Right now, init(8) cannot distinguish between an ACPI power button press
or a Ctrl+Alt+Del sequence on the keyboard. This is because
shutdown_nice() sends SIGINT to init(8) unconditionally, but later
modifies the arguments to reboot(2) to force a certain behaviour.

Instead of doing this, patch up the code to just forward the appropriate
signal to userspace. SIGUSR1 and SIGUSR2 can already be used to halt the
system.

While there, move waittime to the function where it's used; kern_reboot().

10 years agoIFp4 @1192291:
pjd [Mon, 7 Apr 2014 20:44:00 +0000 (20:44 +0000)]
IFp4 @1192291:

- Don't include sys/caprights.h, leverage the fact that cap_rights_t
  is also defined in sys/types.h.
- Include sys/types.h directly.
- For systems that do not have cap_rights_t, define it, so we can use
  it in au_to_rights() prototype.

Discussed with: rwatson

10 years agoImplement the final missing sysctls by moving ipf_auth_softc_t from
cy [Mon, 7 Apr 2014 19:32:56 +0000 (19:32 +0000)]
Implement the final missing sysctls by moving ipf_auth_softc_t from
ip_auth.c to ip_auth.h. ip_frag_soft_t moves from ip_frag.c to
ip_frag.h. mlfk_ipl.c creates sysctl MIBs that reference control blocks
that are dynamically created when IP Filter is loaded. This necessitated
creating them on-the-fly rather than statically at compile time.

Approved by: glebius (mentor)

10 years agoFix table alignment. EVFILT_PROCDESC is longer than the existing filters.
ed [Mon, 7 Apr 2014 18:17:31 +0000 (18:17 +0000)]
Fix table alignment. EVFILT_PROCDESC is longer than the existing filters.

10 years agoImplement kqueue(2) for procdesc(4).
ed [Mon, 7 Apr 2014 18:10:49 +0000 (18:10 +0000)]
Implement kqueue(2) for procdesc(4).

kqueue(2) already supports EVFILT_PROC. Add an EVFILT_PROCDESC that
behaves the same, but operates on a procdesc(4) instead. Only implement
NOTE_EXIT for now. The nice thing about NOTE_EXIT is that it also
returns the exit status of the process, meaning that we can now obtain
this value, even if pdwait4(2) is still unimplemented.

Notes:

- Simply reuse EVFILT_NETDEV for EVFILT_PROCDESC. As both of these will
  be used on totally different descriptor types, this should not clash.

- Let procdesc_kqops_event() reuse the same structure as filt_proc().
  The only difference is that procdesc_kqops_event() should also be able
  to deal with the case where the process was already terminated after
  registration. Simply test this when hint == 0.

- Fix some style(9) issues in filt_proc() to keep it consistent with the
  newly added procdesc_kqops_event().

- Save the exit status of the process in pd->pd_xstat, as we cannot pick
  up the proctree_lock from within procdesc_kqops_event().

Discussed on: arch@
Reviewed by: kib@

10 years agoThese were bogusly placed in the arm directory. Move them to their
imp [Mon, 7 Apr 2014 16:38:31 +0000 (16:38 +0000)]
These were bogusly placed in the arm directory. Move them to their
proper location in powerpc directory.

10 years agoAdd some assertions to ensure that the target array doesn't get accessed
scottl [Mon, 7 Apr 2014 15:13:24 +0000 (15:13 +0000)]
Add some assertions to ensure that the target array doesn't get accessed
out of bounds.

Obtained from: Netflix, Inc.
MFC after: 3 days

10 years agoMerge from projects/pf r264198:
mm [Mon, 7 Apr 2014 07:06:13 +0000 (07:06 +0000)]
Merge from projects/pf r264198:
Execute pf_overload_task() in vnet context. Fixes a vnet kernel panic.

Reviewed by: trociny
MFC after: 1 week

10 years agoMove sys/arm/econa to sys/arm/cavium/cns11xx.
rpaulo [Mon, 7 Apr 2014 05:33:30 +0000 (05:33 +0000)]
Move sys/arm/econa to sys/arm/cavium/cns11xx.

10 years agoUse a more professional device description.
rpaulo [Mon, 7 Apr 2014 05:18:27 +0000 (05:18 +0000)]
Use a more professional device description.

10 years agounits(1): make -V print version instead of -v
eadler [Mon, 7 Apr 2014 02:31:10 +0000 (02:31 +0000)]
units(1): make -V print version instead of -v

The units program is likely little used.  It is even less likely that a script
will want the units program to print out its version number by passing -v.

GNU units uses -V for version and -v for verbosity.

Increase compatibility between these two versions (written by the same author)
by switching our flag as well.

Take this opportunity to remove bogus information about the version number and
just call it 'FreeBSD units'.

Discussed with: cperciva, rwatson

10 years agoAdd man page for udplite(4).
kevlo [Mon, 7 Apr 2014 01:57:51 +0000 (01:57 +0000)]
Add man page for udplite(4).

10 years agoMinor style cleanups.
kevlo [Mon, 7 Apr 2014 01:55:53 +0000 (01:55 +0000)]
Minor style cleanups.

10 years agoAdd support for UDP-Lite protocol (RFC 3828) to IPv4 and IPv6 stacks.
kevlo [Mon, 7 Apr 2014 01:53:03 +0000 (01:53 +0000)]
Add support for UDP-Lite protocol (RFC 3828) to IPv4 and IPv6 stacks.
Tested with vlc and a test suite [1].

[1] http://www.erg.abdn.ac.uk/~gerrit/udp-lite/files/udplite_linux.tar.gz

Reviewed by: jhb, glebius, adrian

10 years agounits(1): fix spelling
eadler [Mon, 7 Apr 2014 01:52:35 +0000 (01:52 +0000)]
units(1): fix spelling

Pointyhat to: me

10 years agounits(1): Add some some additional units
eadler [Mon, 7 Apr 2014 01:46:30 +0000 (01:46 +0000)]
units(1): Add some some additional units

Most of these are also recognized by GNU units

10 years agoDo not build the amd64 UEFI loader with GCC
emaste [Mon, 7 Apr 2014 00:49:15 +0000 (00:49 +0000)]
Do not build the amd64 UEFI loader with GCC

The UEFI loader causes buildworld to fail when building with (in-tree)
GCC, due to a typedef redefinition.  As it happens the in-tree GCC
cannot successfully build the UEFI loader anyhow, as it does not support
__attribute__((ms_abi)).  Thus, just avoid trying to build it with GCC,         rather than disconnecting it from the build until the underlying issue
is fixed.

Sponsored by: The FreeBSD Foundation

10 years agoClear the backlight level when it's turned off. Also, reduce the delay times to
jhibbits [Sun, 6 Apr 2014 23:57:19 +0000 (23:57 +0000)]
Clear the backlight level when it's turned off.  Also, reduce the delay times to
less conservative values, also found in the radeonkms driver.

MFC after: 2 weeks
X-MFC-with: r264205

10 years agoFix the memory region. This board has two memory regions.
rpaulo [Sun, 6 Apr 2014 23:22:42 +0000 (23:22 +0000)]
Fix the memory region.  This board has two memory regions.

10 years agoFix the ATI backlight driver off/on handling. Now this driver works correctly
jhibbits [Sun, 6 Apr 2014 21:48:45 +0000 (21:48 +0000)]
Fix the ATI backlight driver off/on handling.  Now this driver works correctly
with the ATI Radeon 9700 in the PowerBook G4 1.67GHz.

Code shamelessly taken in spirit from the radeonkms driver, which I hope will
make this driver redundant in the future.

MFC after: 2 weeks

10 years agoDefine the full 1024M of ram on the imx53 QSB board.
ian [Sun, 6 Apr 2014 21:45:38 +0000 (21:45 +0000)]
Define the full 1024M of ram on the imx53 QSB board.

10 years agoTell VM we now have ARM platforms with physically discontiguous memory.
ian [Sun, 6 Apr 2014 21:40:39 +0000 (21:40 +0000)]
Tell VM we now have ARM platforms with physically discontiguous memory.

10 years agoFix a typo. The function name is pdfork; not pfork.
ed [Sun, 6 Apr 2014 20:20:07 +0000 (20:20 +0000)]
Fix a typo. The function name is pdfork; not pfork.

10 years agofind: Treat errno from fts_read() more carefully.
jilles [Sun, 6 Apr 2014 20:04:33 +0000 (20:04 +0000)]
find: Treat errno from fts_read() more carefully.

fts_read() leaves errno unchanged on EOF and sets it on error, so set errno
to 0 before calling it. Also, don't trust finish_execplus() to leave errno
unchanged.

10 years agoNit: fix locking of p->p_state in procdesc_close().
ed [Sun, 6 Apr 2014 20:00:42 +0000 (20:00 +0000)]
Nit: fix locking of p->p_state in procdesc_close().

According to <sys/proc.h>, this field needs to be locked with either the
p_mtx or the p_slock. In this case the damage was quite small. Instead
of being reaped, the process would just be reparented to init, so it
could be reaped from there.

10 years agoFix the mips64el build: mips64el should use the mips64 directory, not the mips64el...
imp [Sun, 6 Apr 2014 19:51:57 +0000 (19:51 +0000)]
Fix the mips64el build: mips64el should use the mips64 directory, not the mips64el directory.

10 years agoPartially revert r264083.
loos [Sun, 6 Apr 2014 17:09:51 +0000 (17:09 +0000)]
Partially revert r264083.

While it is the recommended initialization procedure, it hangs on the reset
of the second GPIO module on pandaboard.

Removes the module reset for now as more investigation would be needed.

Reported by: jceel

10 years agoMove definitions out of rpc_com so that the linker doesn't complain about
theraven [Sun, 6 Apr 2014 17:06:27 +0000 (17:06 +0000)]
Move definitions out of rpc_com so that the linker doesn't complain about
multiple definitions.

Reported by: sbruno

10 years agoThis should have been obvious, but make it so.
grehan [Sun, 6 Apr 2014 16:48:00 +0000 (16:48 +0000)]
This should have been obvious, but make it so.

10 years agoFork a child process and wait until the process terminates when the -P
jh [Sun, 6 Apr 2014 16:35:49 +0000 (16:35 +0000)]
Fork a child process and wait until the process terminates when the -P
option is specified. This behavior is documented on the manual page.

PR: bin/187265
Submitted by: Kimo R
MFC after: 2 weeks

10 years agoIn addition to r264077, tell GEOM that we do support BIO_DELETE now.
mav [Sun, 6 Apr 2014 16:31:28 +0000 (16:31 +0000)]
In addition to r264077, tell GEOM that we do support BIO_DELETE now.

10 years agoReport stripe size and offset of the backing device in READ CAPACITY (16)
mav [Sun, 6 Apr 2014 10:13:14 +0000 (10:13 +0000)]
Report stripe size and offset of the backing device in READ CAPACITY (16)
as physical sector size and offset.

MFC after: 2 weeks

10 years agoMark __fixdfdi/__aeabi_d2lz with COMPILER_RT_ABI so it uses the correct
andrew [Sun, 6 Apr 2014 09:14:11 +0000 (09:14 +0000)]
Mark __fixdfdi/__aeabi_d2lz with COMPILER_RT_ABI so it uses the correct
calling convention for __aeabi_* functions.

10 years agoCorrect the SRR1 mask, it's 10-15 not 10-11.
jhibbits [Sun, 6 Apr 2014 06:18:43 +0000 (06:18 +0000)]
Correct the SRR1 mask, it's 10-15 not 10-11.

X-MFC-with: r263464,r263752

10 years agoTimestamps may not have a decimal point.
marcel [Sun, 6 Apr 2014 02:57:49 +0000 (02:57 +0000)]
Timestamps may not have a decimal point.
While here, consistently use sbuf_new_auto().

10 years agoAn all-or-nothing approach to labels isn't flexible enough. Embedded
marcel [Sun, 6 Apr 2014 02:44:37 +0000 (02:44 +0000)]
An all-or-nothing approach to labels isn't flexible enough. Embedded
systems need fine-grained control over what's in and what's out.
That's ideal. For now, separate GPT labels from the rest and allow
g_label to be built with just GPT labels.

Obtained from: Juniper Networks, Inc.

10 years agoMake sure we don't free memory that's already been freed by setting
marcel [Sun, 6 Apr 2014 02:20:42 +0000 (02:20 +0000)]
Make sure we don't free memory that's already been freed by setting
the geom->softc pounter to NULL before freeing the g_slicer softc.
In g_slicer_free() the pointer is checked first.

Obtained from: Juniper Networks, Inc.

10 years agoAdd a couple more required TLB flushes.
ian [Sun, 6 Apr 2014 00:17:41 +0000 (00:17 +0000)]
Add a couple more required TLB flushes.

These should have been part of r264129, they are part of the overall set
of changes that got several weeks of testing.  I must have fumbled them
while merging various patchsets.

10 years agoNeed to include machine/fdt.h.
rpaulo [Sat, 5 Apr 2014 23:20:49 +0000 (23:20 +0000)]
Need to include machine/fdt.h.

10 years agoAdd fsl,imx53.
rpaulo [Sat, 5 Apr 2014 23:20:04 +0000 (23:20 +0000)]
Add fsl,imx53.

10 years agoFollow files.imx51 and add vt support.
rpaulo [Sat, 5 Apr 2014 23:16:51 +0000 (23:16 +0000)]
Follow files.imx51 and add vt support.

10 years agoMake the vmm code compile with gcc too. Not entirely sure things are
imp [Sat, 5 Apr 2014 22:43:23 +0000 (22:43 +0000)]
Make the vmm code compile with gcc too. Not entirely sure things are
correct for the pirbase test (since I'd have thought we'd need to do
something even when the offset is 0 and that test looks like a
misguided attempt to not use an uninitialized variable), but it is at
least the same as today.

10 years agoMake this compile with gcc.
imp [Sat, 5 Apr 2014 22:43:18 +0000 (22:43 +0000)]
Make this compile with gcc.

Submitted by: royger@

10 years agoMake some unwise casts. On i386 these casts wind up being safe. Rather
imp [Sat, 5 Apr 2014 22:42:00 +0000 (22:42 +0000)]
Make some unwise casts. On i386 these casts wind up being safe. Rather
than disturb the API, go with these casts to shut gcc up.

10 years agoFix typo (s/teh/the/) in previous commit.
marcel [Sat, 5 Apr 2014 22:28:46 +0000 (22:28 +0000)]
Fix typo (s/teh/the/) in previous commit.

Pointed out by: rpaulo (thanks!)

10 years agoDo not prevent processes from making changes to the baudrate or the
marcel [Sat, 5 Apr 2014 22:25:10 +0000 (22:25 +0000)]
Do not prevent processes from making changes to the baudrate or the
CLOCAL and HUPCL control flags. There are legit reasons for allowing
those to be changed. When /etc/ttys has the "3wire" type (without a
baudrate) for the serial port that is the low-level console, then
this change has no effect.

Obtained from: Juniper Networks, Inc.

10 years agoSpeed up the lookup of interfaces when there are a large number
gnn [Sat, 5 Apr 2014 22:13:32 +0000 (22:13 +0000)]
Speed up the lookup of interfaces when there are a large number
of them, such in a system with a large number of VLANs.

Submitted by: Nick Rogers
MFC after: 2 weeks

10 years agoUse realloc(9) instead of doing the reallocation inline.
kib [Sat, 5 Apr 2014 20:44:52 +0000 (20:44 +0000)]
Use realloc(9) instead of doing the reallocation inline.

Submitted by: bde
MFC after: 1 week

10 years agolib: Remove duplicate SUBDIR libnv.
jilles [Sat, 5 Apr 2014 19:48:19 +0000 (19:48 +0000)]
lib: Remove duplicate SUBDIR libnv.

With SUBDIR_PARALLEL, duplicates in ${SUBDIR} cause harmless but verbose
warnings.

10 years agorun.4: D1 is an mdoc macro, so we have to escape it.
eadler [Sat, 5 Apr 2014 19:08:16 +0000 (19:08 +0000)]
run.4: D1 is an mdoc macro, so we have to escape it.

Obtained from: DragonFlyBSD (357f4b5)

10 years agoIn freebsd32_sendmsg(), replace the call to sockargs() followed by a
marcel [Sat, 5 Apr 2014 18:56:01 +0000 (18:56 +0000)]
In freebsd32_sendmsg(), replace the call to sockargs() followed by a
call to freebsd32_convert_msg_in() with freebsd32_copyin_control() to
readin and convert in a single step. This makes it simpler to put all
the control messages in a single mbuf or mbuf cluster as per the
limitations imposed upon us by ip6_setpktopts().

The logic is as follows:
1.  Go over the array of control messages to determine overall size
    and include extra padding for proper alignment as we go.
2.  Get a mbuf or mbuf cluster as needed or fail if the overall
    (adjusted) size is larger than a cluster.
3.  Go over the array of control messages again, but now copy them
    into kernel space and into aligned offsets.
4.  Update the length of the control message to take padding between
    the header and the data into account (but not for padding added
    between one control message and the next).

Obtained from: Juniper Networks, Inc.
MFC after: 1 week

10 years agoRemove hack to pass STAILQ to a function and do it properly instead.
trasz [Sat, 5 Apr 2014 18:41:08 +0000 (18:41 +0000)]
Remove hack to pass STAILQ to a function and do it properly instead.

Sponsored by: The FreeBSD Foundation

10 years agoAccept RFC 2292 option values so that RFC 2292 compliant programs that
marcel [Sat, 5 Apr 2014 18:32:40 +0000 (18:32 +0000)]
Accept RFC 2292 option values so that RFC 2292 compliant programs that
are unaware of RFC 3542 can construct control messages.

The kernel disallows mixing RFC 2292 behaviour with RFC 3542 behaviour.
Only sockets that have specifically been marked as using the RFC 2292
API can use RFC 2292 specific options. This is all good and well, but
libc itself seems inconsistent with this.

The root cause of this inconsistency seems to relate to the definitions
of IPV6_HOPOPTS and IPV6_DSTOPTS. They are defined in RFC 2292 and re-used
in RFC 3542, yet have distinct values in the kernel. It's for this reason
that the kernel also has definitions for IPV6_2292HOPOPTS and
IPV6_2292DSTOPTS. Not so in libc.

For example: some program calls inet6_option_init() (defined by RFC 2292)
with the RFC 2292 defined IPV6_HOPOPTS and IPV6_DSTOPTS. Before RFC 3542,
this was translated to values of 22 and 23 (resp.) The libc implementation
correctly checks that only options IPV6_HOPOPTS and IPV6_DSTOPTS are given
(as per RFC 2292) but since these defines have taken on the values defined
by RFC 3542 (values 49 and 50 resp,) rejects the correct option values
(22 and 23) passed said program and returns -1.

The precisie fix is to have inet6_option_init() and friends only accept the
RFC 2292 defined IPV6_HOPOPTS & IPV6_DSTOPTS, but that breaks other code
(like mld6query(8)), which seem to not be aware of RFC 3542 and how it
hi-jacked the option names. So the best fix is to accept the options from
both.

Obtained from: Juniper Networks, Inc.
MFC after: 1 week

10 years agoThe getlogin_basic() function can return a 0 status with a NULL
marcel [Sat, 5 Apr 2014 18:14:58 +0000 (18:14 +0000)]
The getlogin_basic() function can return a 0 status with a NULL
pointer for the login name (result). Make sure to handle that
case properly. Improve robustness by checking namelen and then
nul-terminating the provided buffer to simplify subsequent logic.

Obtained from: Juniper Networks, Inc.
MFC after: 1 week

10 years agoRemove code under PMAP_CACHE_VIVT that is not compiled anymore.
rpaulo [Sat, 5 Apr 2014 18:13:28 +0000 (18:13 +0000)]
Remove code under PMAP_CACHE_VIVT that is not compiled anymore.

This is for ARMv4/ARMv5 and it doesn't belong in ARMv6 code.

Reviewed by: ian

10 years agoConvert sort to using newer MK_ convention.
imp [Sat, 5 Apr 2014 18:01:49 +0000 (18:01 +0000)]
Convert sort to using newer MK_ convention.

10 years agoDocument upcoming build option WITH_SORT_THREADS
imp [Sat, 5 Apr 2014 18:00:45 +0000 (18:00 +0000)]
Document upcoming build option WITH_SORT_THREADS

10 years agoUse MK_CRYPT=no in preference to WITHOUT_CRYPT here.
imp [Sat, 5 Apr 2014 17:54:55 +0000 (17:54 +0000)]
Use MK_CRYPT=no in preference to WITHOUT_CRYPT here.

10 years agouse MK_KERBEROS=no in preference to WITHOUT_KERBEROS
imp [Sat, 5 Apr 2014 17:54:50 +0000 (17:54 +0000)]
use MK_KERBEROS=no in preference to WITHOUT_KERBEROS

10 years agoConvert from WITHOUT_SYSCALL_COMPAT to MK_SYSCALL_COMPAT.
imp [Sat, 5 Apr 2014 17:54:43 +0000 (17:54 +0000)]
Convert from WITHOUT_SYSCALL_COMPAT to MK_SYSCALL_COMPAT.

10 years agoThe proper way to request no man pages currently is NO_MAN=xxx. Use it
imp [Sat, 5 Apr 2014 17:54:36 +0000 (17:54 +0000)]
The proper way to request no man pages currently is NO_MAN=xxx. Use it
in preference to the user WITHOUT_MAN knob, which should never be set
in normal src Makefiles.

10 years ago- Fix the setup of interrupts for banks 2 and 3 on AM335x.
loos [Sat, 5 Apr 2014 17:53:59 +0000 (17:53 +0000)]
- Fix the setup of interrupts for banks 2 and 3 on AM335x.

    On AM335x each one of the four GPIO banks has two physical interrupt
    lines, so we now allocate resources and setup our interrupt handler for
    all the (8) available interrupts.

    On OMAP3 and OMAP4 there is only one interrupt for each GPIO bank (6
    banks, 6 interrupts), but there are two set of registers where the
    first one is used to setup the delivery of interrupts to the MPU and
    the second set, setup the delivery of interrupts to the DSP.

    On AM335x, each set of registers controls each one of the interrupt
    lines.

- Remove nonexistent registers for OMAP4 and AM335x, replace their use with
  the correct ones for these SoCs.

- Remove stray whitespace.

Based on OMAP3, OMAP4 and AM335x TRMs.

Tested on Beaglebone-black.

10 years agoPrevent alq from panic when the invalid alq_file path specified.
dchagin [Sat, 5 Apr 2014 16:54:47 +0000 (16:54 +0000)]
Prevent alq from panic when the invalid alq_file path specified.

MFC after: 1 week

10 years agoCorrect the end address of the video frame buffer.
br [Sat, 5 Apr 2014 16:38:27 +0000 (16:38 +0000)]
Correct the end address of the video frame buffer.
This fixes problem that sometimes display suddenly
goes blank.

10 years agoAdd ioctl(2) calls to uftdi(4) to access bitbang, MPSSE, CPU_FIFO, and
ian [Sat, 5 Apr 2014 16:08:13 +0000 (16:08 +0000)]
Add ioctl(2) calls to uftdi(4) to access bitbang, MPSSE, CPU_FIFO, and
other modes supported by the FTDI serial adapter chips.

In addition to adding the new ioctls, this change removes all the code
that reset the chip at attach and open/close time, and also the code
that turned on RTS/CTS flow control on open without any permission to do
so (that was just always a bug in the driver).

When FTDI chips are configured as GPIO or MPSSE or other special-purpose
uses by an attached serial eeprom, the chip will power on with certain
pins driven or floating, and it's important that the driver not do
anything to the chip to perturb that unless it receives a specific
command to do so.  When used for "plain old serial comms" the chip
powers on into the right mode and never needs to be reset while it's
running to operate properly, so this change is transparent to most users.

10 years agoWhen KN_INFLUX is set on the knote due to kqueue_register() or
kib [Sat, 5 Apr 2014 14:09:16 +0000 (14:09 +0000)]
When KN_INFLUX is set on the knote due to kqueue_register() or
kqueue_scan() unlocking the kqueue to call f_event, knote() or
knote_fork() should not skip the knote.  The knote is not going to
disappear during the influx time, and the mutual exclusion between
scan and knote() is ensured by both code pathes taking knlist lock.
The race appears since knlist lock is before kq lock, so KN_INFLUX
must be set, kq lock must be dropped and only then knlist lock can be
taken.  The window between kq unlock and knlist lock causes lost
events.

Add a flag KN_SCAN to indicate that KN_INFLUX is set in a manner safe
for the knote(), and check for it to ignore KN_INFLUX in the knote*()
as needed.  Also, in knote(), remove the lockless check for the
KN_INFLUX flag, which could also result in the lost notification.

Reported and tested by: Kohji Okuno <okuno.kohji@jp.panasonic.com>
Discussed with: jmg
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoAdd property and sysctl to control how ZVOLs are exposed to OS.
mav [Sat, 5 Apr 2014 13:01:44 +0000 (13:01 +0000)]
Add property and sysctl to control how ZVOLs are exposed to OS.

New ZFS property volmode and sysctl vfs.zfs.vol.mode allow switching ZVOL
between three modes:
 geom -- existing fully functional behavior (default);
 dev -- exposing volumes only as raw disk device file in devfs;
 none -- not exposing volumes outside ZFS.

The "dev" mode is less functional (can't be partitioned, mounted, etc),
but it is faster, and in some scenarios with untrusted consumers safer.
It can be useful for NAS, VM block storages, etc.
The "none" mode may be convenient for backup servers, etc. that don't
need direct data access.

Due to the way ZVOL is integrated with main ZFS code, those property
and sysctl are checked only during pool import and volume creation.

MFC after: 1 month
Sponsored by: iXsystems, Inc.

10 years agoAdd missing userspace bits to <sys/procdesc.h>.
ed [Sat, 5 Apr 2014 11:37:58 +0000 (11:37 +0000)]
Add missing userspace bits to <sys/procdesc.h>.

- Include <sys/_types.h> and define pid_t.
- Add __BEGIN_DECLS/__END_DECLS.

In my opinion we should have considered putting the userspace bits in a
different header (e.g., <procdesc.h>), but I think we've already passed
that point.

10 years agoSilence a warning with GCC that was breaking the build with Juniper's GCC.
theraven [Sat, 5 Apr 2014 08:17:48 +0000 (08:17 +0000)]
Silence a warning with GCC that was breaking the build with Juniper's GCC.

Reviewed by: marcel

10 years agoShow error code when failing to destroy a mirror on delay
bdrewery [Sat, 5 Apr 2014 03:01:29 +0000 (03:01 +0000)]
Show error code when failing to destroy a mirror on delay

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

10 years agoInitialise m_pkthdr via bzero instead of explicitly zeroing each member
emaste [Fri, 4 Apr 2014 21:09:06 +0000 (21:09 +0000)]
Initialise m_pkthdr via bzero instead of explicitly zeroing each member

Sponsored by: The FreeBSD Foundation

10 years agoEnable SMP for Pandaboard.
ian [Fri, 4 Apr 2014 20:58:45 +0000 (20:58 +0000)]
Enable SMP for Pandaboard.

10 years agoSwitch wandboards over to the common IMX6 kernel config, which has SMP
ian [Fri, 4 Apr 2014 20:42:44 +0000 (20:42 +0000)]
Switch wandboards over to the common IMX6 kernel config, which has SMP
enabled.  Also switch IMX6 to use SCHED_ULE.

The now-unreferenced WANDBOARD.common config will be deleted after giving
folks who may be including it a heads-up to switch to IMX6.

10 years agoCorrect return type of pdfork(2).
ed [Fri, 4 Apr 2014 19:53:45 +0000 (19:53 +0000)]
Correct return type of pdfork(2).

The pdfork(2) man page states:

"pdfork() returns a PID, 0 or -1, as fork(2) does."

As it returns a PID, the return type should obviously be pid_t. As int
and pid_t have the same size on all architectures, this change does not
affect the ABI in any way.

10 years agoWe don't support any ARM systems with an ISA bus and don't need a freelist
ian [Fri, 4 Apr 2014 19:35:38 +0000 (19:35 +0000)]
We don't support any ARM systems with an ISA bus and don't need a freelist
of memory to support ISA addressing limitations.

10 years agoFix variable type to avoid printf formatter warning.
jmmv [Fri, 4 Apr 2014 18:10:11 +0000 (18:10 +0000)]
Fix variable type to avoid printf formatter warning.

This fixes the build under powerpc64 where gcc complains about a mismatch
between a %zd printf formatter and an int variable passed to it.

10 years agoConnect sys/boot/amd64 to the build
emaste [Fri, 4 Apr 2014 18:07:21 +0000 (18:07 +0000)]
Connect sys/boot/amd64 to the build

Sponsored by: The FreeBSD Foundation

10 years agoPrevent XDTP from being a relative path
bapt [Fri, 4 Apr 2014 17:58:33 +0000 (17:58 +0000)]
Prevent XDTP from being a relative path
XDTP is used as the default SYSROOT for clang and thus should be an absolute path.

PR: arm/188249
Submitted by: Edgar Martinez <wink15987@gmail.com>
Reviewed by: imp

10 years agoAllocate per-cpu resources for doing pmap_zero_page() and pmap_copy_page().
ian [Fri, 4 Apr 2014 17:57:49 +0000 (17:57 +0000)]
Allocate per-cpu resources for doing pmap_zero_page() and pmap_copy_page().
This is performance enhancement rather than bugfix.

10 years agoFix TLB maintenance issues for armv6 and armv7.
ian [Fri, 4 Apr 2014 17:45:39 +0000 (17:45 +0000)]
Fix TLB maintenance issues for armv6 and armv7.

  - Add cpu_cpwait to comply with the convention.
  - Add missing TLB invalidations, especially in pmap_kenter & pmap_kremove
    with distinguishing between D and ID pages.
  - Modify pmap init/bootstrap invalidations to ID, just to be safe.
  - Fix TLB-inv and PTE_SYNC ordering.

This combines changes submitted by ian@, cognet@, and Wojciech Macek,
which have all been tested together as a unit.

10 years agoFix TTB set operation for armv7.
ian [Fri, 4 Apr 2014 17:39:05 +0000 (17:39 +0000)]
Fix TTB set operation for armv7.

Perform sychronization (by "isb" barrier) after TTB is set.  This
is done to ensure that TLB invalidation always executes after
TTB modification and operates on valid CP15 data (per specification).

Submitted by: Wojciech Macek <wma@semihalf.com>
Reviewed by: ian@, cognet@

10 years agoAdd PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4)
sbruno [Fri, 4 Apr 2014 17:01:49 +0000 (17:01 +0000)]
Add PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4)

Submitted by: Benesh, Scott <scott.benesh@hp.com>
MFC after:  2 weeks
Sponsored by: Yahoo! Inc.

10 years agoThe check for local address spoofing lacks ifaddr locking.
ae [Fri, 4 Apr 2014 16:58:32 +0000 (16:58 +0000)]
The check for local address spoofing lacks ifaddr locking.
Remove these loops and use in_localip() and in6_localip()
functions instead.

MFC after: 1 week
Sponsored by: Yandex LLC

10 years agoRemove unused variable.
ae [Fri, 4 Apr 2014 15:57:27 +0000 (15:57 +0000)]
Remove unused variable.

MFC after: 1 week
Sponsored by: Yandex LLC

10 years agoRemove dead code.
ae [Fri, 4 Apr 2014 15:55:38 +0000 (15:55 +0000)]
Remove dead code.

MFC after: 1 week
Sponsored by: Yandex LLC

10 years agoChange kernel/rootfs hints to use search patterns instead of absolute
sbruno [Fri, 4 Apr 2014 15:52:45 +0000 (15:52 +0000)]
Change kernel/rootfs hints to use search patterns instead of absolute
locations.

10 years agoRework the iSCSI PDU transmit code to avoid lock contention and coalesce
trasz [Fri, 4 Apr 2014 15:49:37 +0000 (15:49 +0000)]
Rework the iSCSI PDU transmit code to avoid lock contention and coalesce
PDUs before sending.

Sponsored by: The FreeBSD Foundation

10 years agogcc: define __block when block support is enabled
pfg [Fri, 4 Apr 2014 15:49:23 +0000 (15:49 +0000)]
gcc: define __block when block support is enabled

This mimics the behaviour in clang and lets us build cleanly
the libdispatch port on platforms where the base gcc is still
the default compiler.

Bump __FreeBSD_version for ports.

Tested by: theraven
MFC after: 3 days

10 years agoFlag several sysctl variables as tunables.
ian [Fri, 4 Apr 2014 15:31:57 +0000 (15:31 +0000)]
Flag several sysctl variables as tunables.

10 years agoAdjust the comments about translating clock divisor bits to match recent
ian [Fri, 4 Apr 2014 15:03:03 +0000 (15:03 +0000)]
Adjust the comments about translating clock divisor bits to match recent
code changes.

10 years agoFix printf format mismatches
emaste [Fri, 4 Apr 2014 13:35:36 +0000 (13:35 +0000)]
Fix printf format mismatches

Sponsored by: The FreeBSD Foundation

10 years agoFix SIGIO delivery. Use fsetown() to handle file descriptor owner
davidxu [Fri, 4 Apr 2014 12:31:13 +0000 (12:31 +0000)]
Fix SIGIO delivery. Use fsetown() to handle file descriptor owner
ioctl and use pgsigio() to send SIGIO.

Submitted by: truckman
Reviewed by: mjg

10 years agoAll the iSCSI sysctls are also tunables; advertise that.
trasz [Fri, 4 Apr 2014 08:48:55 +0000 (08:48 +0000)]
All the iSCSI sysctls are also tunables; advertise that.

Sponsored by: The FreeBSD Foundation

10 years agoWe don't need TAILQ for iSCSI PDUs; STAILQ is enough.
trasz [Fri, 4 Apr 2014 08:43:23 +0000 (08:43 +0000)]
We don't need TAILQ for iSCSI PDUs; STAILQ is enough.

Sponsored by: The FreeBSD Foundation