]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoAdd key+=append syntax to sysrc(8).
dteske [Mon, 3 Nov 2014 23:43:41 +0000 (23:43 +0000)]
Add key+=append syntax to sysrc(8).

Reviewed by: shurd
MFC after: 3 days
X-MFC-to: stable/10 stable/9

9 years agorpc_control on FreeBSD is a public-ish API (not prefixed with __), not private
ngie [Mon, 3 Nov 2014 23:37:51 +0000 (23:37 +0000)]
rpc_control on FreeBSD is a public-ish API (not prefixed with __), not private
like NetBSD

Submitted by: pho

9 years agoPort lib/libc/ssp to FreeBSD
ngie [Mon, 3 Nov 2014 23:36:41 +0000 (23:36 +0000)]
Port lib/libc/ssp to FreeBSD

In most cases, the buffers and data were resized, but when dealing with the
helpers, some of the code was adjusted to fail more reliably

Submitted by: pho

9 years agoAdd VirtIO console to the x86 NOTES and files
bryanv [Mon, 3 Nov 2014 22:37:10 +0000 (22:37 +0000)]
Add VirtIO console to the x86 NOTES and files

Requested by: jhb

9 years agoRemove MAINTAINER line for binutils. It has not been maintained by
bdrewery [Mon, 3 Nov 2014 22:19:44 +0000 (22:19 +0000)]
Remove MAINTAINER line for binutils. It has not been maintained by
obrien since 2008.

Approved by: core

9 years agoCreate the tty device after the port is completely initialized
bryanv [Mon, 3 Nov 2014 22:17:25 +0000 (22:17 +0000)]
Create the tty device after the port is completely initialized

This fixes a race with a tty open before the host is the ready.

MFC after: 1 month

9 years agoinet_network on FreeBSD returns NULL when provided "0x" to inet_network
ngie [Mon, 3 Nov 2014 21:26:11 +0000 (21:26 +0000)]
inet_network on FreeBSD returns NULL when provided "0x" to inet_network

Submitted by: pho

9 years agoPort t_db.sh to FreeBSD
ngie [Mon, 3 Nov 2014 21:21:08 +0000 (21:21 +0000)]
Port t_db.sh to FreeBSD

- The blocksize on FreeBSD is 32kB, not 64kB
- Add some detection for MK_DICT == no; /nonexistent is echoed along with
  atf_skip to ensure that the test will fail if dict(..) is called in the
  non-final stage of the pipeline

Submitted by: pho

9 years agoswitch from spaces to tabs to match style and awk...
jmg [Mon, 3 Nov 2014 21:03:54 +0000 (21:03 +0000)]
switch from spaces to tabs to match style and awk...

Pointed out by: brooks

9 years agouse tab instead of spaces like the rest of the file..
jmg [Mon, 3 Nov 2014 19:23:49 +0000 (19:23 +0000)]
use tab instead of spaces like the rest of the file..

9 years agoMove all of the XSAVE support under #ifdef I686_CPU and fix the build
jhb [Mon, 3 Nov 2014 19:16:25 +0000 (19:16 +0000)]
Move all of the XSAVE support under #ifdef I686_CPU and fix the build
without I686_CPU.

9 years agoAdd support for the multiport feature and fix hot plug races
bryanv [Mon, 3 Nov 2014 16:57:01 +0000 (16:57 +0000)]
Add support for the multiport feature and fix hot plug races

MFC after: 1 month

9 years agoFix XEN kernel build.
jhb [Mon, 3 Nov 2014 16:31:31 +0000 (16:31 +0000)]
Fix XEN kernel build.

Pointy hat to: jhb

9 years agovt(4): Start new sentences on their own lines
dumbbell [Mon, 3 Nov 2014 16:01:44 +0000 (16:01 +0000)]
vt(4): Start new sentences on their own lines

Submitted by: brueffer@
MFC after: 1 week

9 years agoRemove unused tests/lib directory
ngie [Mon, 3 Nov 2014 15:40:49 +0000 (15:40 +0000)]
Remove unused tests/lib directory

MFC after: 1 week

9 years agovt(4): Improve the description of kern.vt.fb.modes.$connector
dumbbell [Mon, 3 Nov 2014 15:25:48 +0000 (15:25 +0000)]
vt(4): Improve the description of kern.vt.fb.modes.$connector

Differential Revision: https://reviews.freebsd.org/D1098
Submitted by: emaste@
MFC after: 1 week

9 years agovt(4): Document kern.vt.fb.default_mode and kern.vt.fb.modes.*
dumbbell [Mon, 3 Nov 2014 14:57:41 +0000 (14:57 +0000)]
vt(4): Document kern.vt.fb.default_mode and kern.vt.fb.modes.*

Those tunables are used to set a specific mode in vt(4) instead of using
the default mode.

Differential Revision: https://reviews.freebsd.org/D1098
Reviewed by: ak@, emaste@, kwm@
MFC after: 1 week

9 years agodrm: When reading connector mode tunables, list connectors
dumbbell [Mon, 3 Nov 2014 14:35:07 +0000 (14:35 +0000)]
drm: When reading connector mode tunables, list connectors

... and their associated tunables. This gives a way to know the list of
available connectors, no matter the driver.

The problem is that xrandr(1) can list connectors but it uses a
different naming.

MFC after: 1 week

9 years agoFix misplaced read memory barrier in seq.
mjg [Mon, 3 Nov 2014 13:14:34 +0000 (13:14 +0000)]
Fix misplaced read memory barrier in seq.

Impact on capability races was small: it was possible to get a spurious
ENOTCAPABLE (early return), but it was not possible to bypass checks.

Tidy up some comments.

9 years agoClarify TSO segment limit comment and remove two TABs to make lines a
hselasky [Mon, 3 Nov 2014 13:02:58 +0000 (13:02 +0000)]
Clarify TSO segment limit comment and remove two TABs to make lines a
bit shorter.

Sponsored by: Mellanox Technologies

9 years agoRestore spares used in "struct tcpcb" and bump "__FreeBSD_version" to
hselasky [Mon, 3 Nov 2014 13:01:58 +0000 (13:01 +0000)]
Restore spares used in "struct tcpcb" and bump "__FreeBSD_version" to
indicate need for kernel module re-compilation.

Sponsored by: Mellanox Technologies

9 years agoIf the start bit, PxCMD.ST, is cleared and nothing is in-flight then
tychon [Mon, 3 Nov 2014 12:55:31 +0000 (12:55 +0000)]
If the start bit, PxCMD.ST, is cleared and nothing is in-flight then
PxCI, PxSACT, PxCMD.CCS and PxCMD.CR should be 0.

Reviewed by: grehan

9 years agoagp_intel.c provides support for AGP on Intel chipsets from 440/BX to
kib [Mon, 3 Nov 2014 11:49:35 +0000 (11:49 +0000)]
agp_intel.c provides support for AGP on Intel chipsets from 440/BX to
875.  This intersects with the agp_i810.c, which supports all Intels
from i810 to Core i5/7.  Both agp_intel.c and agp_i810.c are compiled
into kernel when device agp is specified in config, and agp_i810
attach seems to be selected by chance due to linking order.

Strip support for 810 and later from agp_intel.c.  Since 440-class
chipsets do not support any long-mode capable CPUs, remove agp_intel.c
from amd64 kernel file list.  Note that agp_intel.c is not compiled
into agp.ko on amd64 already.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoClean up confusing comment. Move it to the place of code which is
kib [Mon, 3 Nov 2014 11:29:08 +0000 (11:29 +0000)]
Clean up confusing comment.  Move it to the place of code which is
talked about.  Explain where the mentioned trampoline located
(usermode), and the fact that attempt to exit last thread is denied in
kernel (by delegating the work to usermode).

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agos/icl_pdu_new_bhs/icl_pdu_new/; no functional changes, just a little
trasz [Mon, 3 Nov 2014 11:15:51 +0000 (11:15 +0000)]
s/icl_pdu_new_bhs/icl_pdu_new/; no functional changes, just a little
nicer code.

Sponsored by: The FreeBSD Foundation

9 years agoRemove check for obsolete FreeBSD versions
bapt [Mon, 3 Nov 2014 11:11:45 +0000 (11:11 +0000)]
Remove check for obsolete FreeBSD versions

PR: 194517
Submitted by: François Tigeot <ftigeot@wolfpond.org>

9 years agos/icl_pdu_new/icl_pdu_new_empty/g; no functional changes.
trasz [Mon, 3 Nov 2014 11:05:23 +0000 (11:05 +0000)]
s/icl_pdu_new/icl_pdu_new_empty/g; no functional changes.

Sponsored by: The FreeBSD Foundation

9 years agodrm: Take vt(4) default mode from loader tunables
dumbbell [Mon, 3 Nov 2014 10:42:27 +0000 (10:42 +0000)]
drm: Take vt(4) default mode from loader tunables

By default, vt(4) gets the "preferred mode" from DRM, when using a DRM
video driver as its backend. The preferred mode is usually the native
screen resolution.

Now, if this mode isn't appropriate, a user can use loader tunables to
select a mode. The tunables are read in the following order:
    1. kern.vt.fb.modes.$connector_name
    2. kern.vt.fb.default_mode

For example, to set a 1024x768 mode, no matter the connector:
    kern.vt.fb.default_mode="1024x768"

To set a 800x600 mode only on the laptop builtin screen:
    kern.vt.fb.modes.LVDS-1="800x600"

MFC after: 1 week

9 years agoWhen other end of the pipe closed during the write, but some bytes
kib [Mon, 3 Nov 2014 10:01:56 +0000 (10:01 +0000)]
When other end of the pipe closed during the write, but some bytes
were written, return short write instead of EPIPE.

Update comment.

Discussed with: bde (long time ago)
MFC after: 2 weeks

9 years agoRequire root when running the pw_delete and pw_modify test programs (pw(8)
ngie [Mon, 3 Nov 2014 09:26:39 +0000 (09:26 +0000)]
Require root when running the pw_delete and pw_modify test programs (pw(8)
requires it)

9 years agoRemove explicit KYUAFILE=yes from tests/sys/Makefile
ngie [Mon, 3 Nov 2014 09:17:09 +0000 (09:17 +0000)]
Remove explicit KYUAFILE=yes from tests/sys/Makefile

This causes the directory traversing Kyuafile to be installed, which in turn
causes tests/sys/pjdfstest to always be run from /usr/tests/sys

Let KYUAFILE default to auto, so the file generated by suite.test.mk gets
installed instead

MFC after: 1 week

9 years agoReduce boot verbosity.
hselasky [Mon, 3 Nov 2014 09:02:09 +0000 (09:02 +0000)]
Reduce boot verbosity.

MFC: 3 days

9 years agoProvide an on-stack temporary buffer for small ioctl requests.
mjg [Mon, 3 Nov 2014 07:46:51 +0000 (07:46 +0000)]
Provide an on-stack temporary buffer for small ioctl requests.

9 years agoIntegrate pjdfstest test suite execution into kyua
ngie [Mon, 3 Nov 2014 07:18:42 +0000 (07:18 +0000)]
Integrate pjdfstest test suite execution into kyua

pjdfstest execution is opt-in and must be done as root due to some of the
assumptions made by the test suite and lack of error checking in the non-root
case

A description of how to execute pjdfstest with kyua is provided in
share/pjdfstest/README

Phabric: D824 (an earlier prototype patch)
MFC after: 1 month
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division

9 years agofiledesc: plus sys/kdb.h include which crept in with r274007
mjg [Mon, 3 Nov 2014 06:24:43 +0000 (06:24 +0000)]
filedesc: plus sys/kdb.h include which crept in with r274007

9 years agoIntegrate usr.sbin/useradd/t_useradd.sh from NetBSD into FreeBSD as pw_test
ngie [Mon, 3 Nov 2014 06:07:55 +0000 (06:07 +0000)]
Integrate usr.sbin/useradd/t_useradd.sh from NetBSD into FreeBSD as pw_test

- Suffix useradd/userdel commands with pw
- Remove the atf_expect_fail for bin/39546

Phabric: D921
Reviewed by: brd
Sponsored by: EMC / Isilon Storage Division

9 years agofiledesc: plug unnecessary fdp NULL checks in fdescfreee and fdcopy
mjg [Mon, 3 Nov 2014 05:12:17 +0000 (05:12 +0000)]
filedesc: plug unnecessary fdp NULL checks in fdescfreee and fdcopy

Anything reaching these functions has fd table.

9 years agoDon't assert random_adaptors_lock in random_adaptor_read_rate().
delphij [Mon, 3 Nov 2014 04:41:29 +0000 (04:41 +0000)]
Don't assert random_adaptors_lock in random_adaptor_read_rate().

Reported by: many
Pointy hat to: delphij (for not testing the commit with WITNESS)
Approved by: so

9 years agofiledesc: create a dedicated zone for struct filedesc0
mjg [Mon, 3 Nov 2014 04:16:04 +0000 (04:16 +0000)]
filedesc: create a dedicated zone for struct filedesc0

Currently sizeof(struct filedesc0) is 1096 bytes, which means allocations from
malloc use 2048 bytes.

There is no easy way to shrink the structure <= 1024 an it is likely to grow in
the future.

9 years agoFix up some session-related races in devfs.
mjg [Mon, 3 Nov 2014 03:12:15 +0000 (03:12 +0000)]
Fix up some session-related races in devfs.

One was introduced with r272596, the rest was there to begin with.

Noted by: jhb

9 years agoDo not try to create a /dev/log symlink in a jail.
hrs [Mon, 3 Nov 2014 00:37:39 +0000 (00:37 +0000)]
Do not try to create a /dev/log symlink in a jail.

PR: 179828

9 years ago - Make sure random_adaptor accesses happen only when
delphij [Sun, 2 Nov 2014 23:30:50 +0000 (23:30 +0000)]
 - Make sure random_adaptor accesses happen only when
   random_adaptors_lock is held.
 - Use sx_sleep instead of tsleep in read and write path to allow
   another thread that registers a new random adapter when waiting.
   Assert that random_adaptor is not NULL after reacquiring the lock.
 - Capture EINTR/ERESTART from sx_sleep to allow the blocking cycle be
   stopped when user requests so, while there also make short
   read/write's return 0.
 - Move M_WAITOK allocations out of lock scope.

In collobration with: kib, markm, ian, jilles
Reviewed by: kib, markm
Approved by: so

9 years agoMFamd64: Add support for extended FPU states on i386. This includes
jhb [Sun, 2 Nov 2014 22:58:30 +0000 (22:58 +0000)]
MFamd64: Add support for extended FPU states on i386.  This includes
support for AVX on i386.
- Similar to amd64, move the FPU save area out of the PCB and instead
  store saved FPU state in a variable-sized buffer after the PCB on the
  stack.
- To support the variable PCB location, alter the locore code to only use
  the bottom-most page of proc0stack for init386().  init386() returns
  the correct stack pointer to locore which adjusts the stack for thread0
  before calling mi_startup().
- Don't bother setting cr3 in thread0's pcb in locore before calling
  init386().  It wasn't used (init386() overwrote it at the end) and
  it doesn't work with the variable-sized FPU save area.
- Remove the new-bus attachment from npx.  This was only ever useful for
  external co-processors using IRQ13, but those have not been supported
  for several years.  npxinit() is now called much earlier during boot
  (init386()) similar to amd64.
- Implement PT_{GET,SET}XSTATE and I386_GET_XFPUSTATE.
- npxsave() is now only called from context switch contexts so it can
  use XSAVEOPT.

Differential Revision: https://reviews.freebsd.org/D1058
Reviewed by: kib
Tested on: FreeBSD/i386 VM under bhyve on Intel i5-2520

9 years agoFix a bug which prevented ND6_IFF_IFDISABLED flag from clearing when
hrs [Sun, 2 Nov 2014 21:58:31 +0000 (21:58 +0000)]
Fix a bug which prevented ND6_IFF_IFDISABLED flag from clearing when
the newly-added IPv6 address was /128.

PR: 188032

9 years agoMFamd64: Move extern declaration of _ucodesel and _udatasel to
jhb [Sun, 2 Nov 2014 21:40:32 +0000 (21:40 +0000)]
MFamd64: Move extern declaration of _ucodesel and _udatasel to
<machine/md_var.h>

9 years agoMFamd64: Explicitly initialize the mxcsr during npxinit().
jhb [Sun, 2 Nov 2014 21:34:24 +0000 (21:34 +0000)]
MFamd64: Explicitly initialize the mxcsr during npxinit().

9 years agoRemove the FP_SOFTFP flag. It wasn't used but was leftover from the
jhb [Sun, 2 Nov 2014 20:57:19 +0000 (20:57 +0000)]
Remove the FP_SOFTFP flag.  It wasn't used but was leftover from the
software x86 math emulator.

9 years agoDon't check for a NULL curthread. curthread hasn't been NULL after early
jhb [Sun, 2 Nov 2014 19:54:10 +0000 (19:54 +0000)]
Don't check for a NULL curthread.  curthread hasn't been NULL after early
boot since 5.0.

9 years agoFollowup to r273966. Fix the build with ADAPTIVE_LOCKMGRS kernel option.
kib [Sun, 2 Nov 2014 19:51:33 +0000 (19:51 +0000)]
Followup to r273966.  Fix the build with ADAPTIVE_LOCKMGRS kernel option.

Note that the option is currently not used in any in-tree kernel
configs, including LINTs.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoAdd the less-ambiguous freebsd-version command.
wblock [Sun, 2 Nov 2014 19:25:31 +0000 (19:25 +0000)]
Add the less-ambiguous freebsd-version command.

Reviewed by: -stable
MFC after: 3 days

9 years agovt(4): Fix keyboard allocation when kbdmux(4) isn't used
dumbbell [Sun, 2 Nov 2014 16:04:48 +0000 (16:04 +0000)]
vt(4): Fix keyboard allocation when kbdmux(4) isn't used

The problem was that only the kbdmux keyboard index was saved in
vd->vd_keyboard. This index is -1 when kbdmux isn't used. In this
case, the keyboard was correctly allocated, but the returned index was
discarded.

PR: 194718
MFC after: 1 week

9 years agofiledesc: move freeing old tables to fdescfree
mjg [Sun, 2 Nov 2014 14:12:03 +0000 (14:12 +0000)]
filedesc: move freeing old tables to fdescfree

They cannot be accessed by anyone and hold count only protects the structure
from being freed.

9 years agoUse default memory type for TTM buffer objects that may be cached.
tijl [Sun, 2 Nov 2014 14:08:54 +0000 (14:08 +0000)]
Use default memory type for TTM buffer objects that may be cached.

MFC after: 1 week

9 years agofiledesc: factor out some code out of fdescfree
mjg [Sun, 2 Nov 2014 13:43:04 +0000 (13:43 +0000)]
filedesc: factor out some code out of fdescfree

Previously it had a huge self-contained chunk dedicated to dealing with shared
tables.

No functional changes.

9 years agoWhen non-forced unmount or remount rw->ro is performed, writes on UFS
kib [Sun, 2 Nov 2014 13:14:55 +0000 (13:14 +0000)]
When non-forced unmount or remount rw->ro is performed, writes on UFS
are not suspended.  In particular, on the SU-enabled vulumes, there is
no reason why, between the call to softdep_flushfiles() and
softdep_waitidle(), SU work items cannot be queued.

Correct the condition to trigger the panic by only checking when
forced operation is done.  Convert direct panic() call into KASSERT(),
there is no invalid on-disk data structures directly involved, so
follow the usual debugging vs. non-debugging approach.

Reported and tested by: pho
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoFix two issues with lockmgr(9) LK_CAN_SHARE() test, which determines
kib [Sun, 2 Nov 2014 13:10:31 +0000 (13:10 +0000)]
Fix two issues with lockmgr(9) LK_CAN_SHARE() test, which determines
whether the shared request for already shared-locked lock could be
granted.  Both problems result in the exclusive locker starvation.

The concurrent exclusive request is indicated by either
LK_EXCLUSIVE_WAITERS or LK_EXCLUSIVE_SPINNERS flags.  The reverse
condition, i.e. no exclusive waiters, must check that both flags are
cleared.

Add a flag LK_NODDLKTREAT for shared lock request to indicate that
current thread guarantees that it does not own the lock in shared
mode.  This turns back the exclusive lock starvation avoidance code;
see man page update for detailed description.

Use LK_NODDLKTREAT when doing lookup(9).

Reported and tested by: pho
No objections from: attilio
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years ago- agp_generic_unbind_memory: flush AGP TLB before unwiring pages
tijl [Sun, 2 Nov 2014 11:47:40 +0000 (11:47 +0000)]
- agp_generic_unbind_memory: flush AGP TLB before unwiring pages
- agp_bind_pages: assert that pages have been wired down

MFC after: 1 month

9 years agoIn agp_amd_bind_page don't flush the AGP TLB. It's done by the calling
tijl [Sun, 2 Nov 2014 11:28:15 +0000 (11:28 +0000)]
In agp_amd_bind_page don't flush the AGP TLB.  It's done by the calling
function.

9 years agoIn agp(4) avoid the need to flush all cpu caches with wbinvd between
tijl [Sun, 2 Nov 2014 11:26:37 +0000 (11:26 +0000)]
In agp(4) avoid the need to flush all cpu caches with wbinvd between
updating the GTT and flushing the AGP TLB by storing the GTT in
write-combining memory.

On x86 flushing the AGP TLB is done by an I/O operation or a store to a
MMIO register in uncacheable memory.  Both cases imply that WC buffers are
flushed so no memory barriers are needed.

On powerpc there is no WC memory type.  It maps to uncacheable memory and
two stores to uncacheable memory, such as to the GTT and then to an MMIO
register, are strongly ordered, so no memory barriers are needed either.

MFC after: 1 month

9 years agodrm: Lower priority of two messages related to invalid EDID
dumbbell [Sun, 2 Nov 2014 09:52:22 +0000 (09:52 +0000)]
drm: Lower priority of two messages related to invalid EDID

Like in r259717, the prority goes from "error" to "debug" to avoid
spamming logs when the connectors are polled.

MFC after: 1 week

9 years agoAdd pkg-config file for libarchive
mm [Sun, 2 Nov 2014 09:37:45 +0000 (09:37 +0000)]
Add pkg-config file for libarchive

Requested by: bapt
MFC after: 1 week

9 years agoNG_NODE_NAME(node) is always not NULL. Use correct macro.
glebius [Sun, 2 Nov 2014 05:51:31 +0000 (05:51 +0000)]
NG_NODE_NAME(node) is always not NULL. Use correct macro.

Submitted by: Dmitry Luhtionov <dmitryluhtionov gmail.com>

9 years agofiledesc: tidy up fdcheckstd
mjg [Sun, 2 Nov 2014 02:32:33 +0000 (02:32 +0000)]
filedesc: tidy up fdcheckstd

No functional changes.

9 years agoRestore the auto-reseed logic, but move it to a much later point,
des [Sun, 2 Nov 2014 02:01:55 +0000 (02:01 +0000)]
Restore the auto-reseed logic, but move it to a much later point,
immediately before kick_init.

Approved by: so (self)

9 years agoGet rid of the postrandom script. It was born in a time when the
des [Sun, 2 Nov 2014 01:47:27 +0000 (01:47 +0000)]
Get rid of the postrandom script.  It was born in a time when the
random script ran before filesystems were mounted, which is no
longer the case.

In random_start(), immediately delete each file that is fed into
/dev/random, and recreate the default entropy file immediately
after reading and deleting it.  The logic used in random_stop()
to determine which file to write to should probably be factored
out and used here as well.

9 years agofiledesc: lock filedesc lock in fdcloseexec only when needed
mjg [Sun, 2 Nov 2014 01:13:11 +0000 (01:13 +0000)]
filedesc: lock filedesc lock in fdcloseexec only when needed

9 years agoadd an rc.d script to automatically grow the specified FS... It has
jmg [Sun, 2 Nov 2014 00:11:25 +0000 (00:11 +0000)]
add an rc.d script to automatically grow the specified FS...  It has
been tested on both MBR and GPT...  It won't be enabled until you add
growfs_enable="YES" and will only run on first boot..

9 years agoFix up module unload for syscall_module_handler consumers.
mjg [Sat, 1 Nov 2014 22:36:40 +0000 (22:36 +0000)]
Fix up module unload for syscall_module_handler consumers.

After r273707 it was registering syscalls as static.

This fixes hwpmc module unload.

Reported by: markj

9 years agoPort h_hash and t_sha2 to FreeBSD
ngie [Sat, 1 Nov 2014 22:00:46 +0000 (22:00 +0000)]
Port h_hash and t_sha2 to FreeBSD

t_sha2 contains dirty copy-paste hacks that need to be fixed with the openssh
OpenBSD compat layer

Submitted by: pho

9 years agoExpect :sscanf_whitespace to fail on !NetBSD OSes
ngie [Sat, 1 Nov 2014 21:30:18 +0000 (21:30 +0000)]
Expect :sscanf_whitespace to fail on !NetBSD OSes

Submitted by: pho

9 years agoSkip :fopen_regular on !NetBSD because it's a NetBSD specific test
ngie [Sat, 1 Nov 2014 21:25:22 +0000 (21:25 +0000)]
Skip :fopen_regular on !NetBSD because it's a NetBSD specific test

Submitted by: pho

9 years agoAdd new atf_tc_expect_fail to fflush_err; this is a new (within the past couple month...
ngie [Sat, 1 Nov 2014 21:23:27 +0000 (21:23 +0000)]
Add new atf_tc_expect_fail to fflush_err; this is a new (within the past couple months) bug

9 years agoDisable testcases 12 and 15-22 on FreeBSD
ngie [Sat, 1 Nov 2014 21:21:06 +0000 (21:21 +0000)]
Disable testcases 12 and 15-22 on FreeBSD

Submitted by: pho

9 years agoExpect :snprintf_posarg_error to blow up with a SIGSEGV on !NetBSD OSes
ngie [Sat, 1 Nov 2014 21:00:40 +0000 (21:00 +0000)]
Expect :snprintf_posarg_error to blow up with a SIGSEGV on !NetBSD OSes

9 years agoPort h_atexit to FreeBSD
ngie [Sat, 1 Nov 2014 20:50:39 +0000 (20:50 +0000)]
Port h_atexit to FreeBSD

__cxa_atexit varies between FreeBSD and NetBSD, and thus we must use pointers
instead of static fields in the BSS. More extensive discussion is included in
the source code

In collaboration with: kib
Submitted by: pho

9 years agoPort t_mincore to FreeBSD
ngie [Sat, 1 Nov 2014 20:45:45 +0000 (20:45 +0000)]
Port t_mincore to FreeBSD

Mark :mincore_resid as atf_tc_expect_fail on FreeBSD because of new bug
discovered in running the tests (it succeeded from earlier on in the year to
September/October on FreeBSD, at least)

Submitted by: pho

9 years agoPort t_kevent to FreeBSD
ngie [Sat, 1 Nov 2014 20:41:40 +0000 (20:41 +0000)]
Port t_kevent to FreeBSD

Submitted by: pho

9 years agoSkip :sethostname_basic because it messes up the test host's hostname
ngie [Sat, 1 Nov 2014 20:33:42 +0000 (20:33 +0000)]
Skip :sethostname_basic because it messes up the test host's hostname

Convert code from #if defined(__FreeBSD__) to #ifdef __FreeBSD__

9 years agoUpdates to the list of CPUs supported by the amd64 platform
gavin [Sat, 1 Nov 2014 20:07:32 +0000 (20:07 +0000)]
Updates to the list of CPUs supported by the amd64 platform

MFC after: 3 days

9 years agoChange the order of the arguments to file_loadraw(). They were swapped
marcel [Sat, 1 Nov 2014 18:51:48 +0000 (18:51 +0000)]
Change the order of the arguments to file_loadraw(). They were swapped
as of r262345 when file_loadraw() was made public and this little detail
got overlooked during porting.

Obtained from: Juniper Networks, Inc.

9 years agoRemove duplicate macro settings (probably due to an SVN merge /faux pas/ on my part.
markm [Sat, 1 Nov 2014 17:52:04 +0000 (17:52 +0000)]
Remove duplicate macro settings (probably due to an SVN merge /faux pas/ on my part.

Spotted by: DES
Approved by: DES(implicit)

9 years agogetitimer on FreeBSD returns the last set time instead of the remaining time;
ngie [Sat, 1 Nov 2014 17:22:53 +0000 (17:22 +0000)]
getitimer on FreeBSD returns the last set time instead of the remaining time;
test for that instead

Submitted by: pho

9 years agoPort lib/libc/sys/t_dup to FreeBSD/Linux
ngie [Sat, 1 Nov 2014 17:19:43 +0000 (17:19 +0000)]
Port lib/libc/sys/t_dup to FreeBSD/Linux

- The requirements differ between FreeBSD/Linux when dealing with oldd/newd
  being equal (both fail with EINVAL, not EBADF)
- Add an EBADF testcase
- Fix compilation issues on clang

In collaboration with: pho

9 years agoPort lib/libc/net/h_dns_server to FreeBSD
ngie [Sat, 1 Nov 2014 17:14:29 +0000 (17:14 +0000)]
Port lib/libc/net/h_dns_server to FreeBSD

Submitted by: pho

9 years agoPort tests to FreeBSD/Linux
ngie [Sat, 1 Nov 2014 17:13:13 +0000 (17:13 +0000)]
Port tests to FreeBSD/Linux

Some of the testcases don't work outside of NetBSD, and the behavior of
ether_aton_r differs between FreeBSD, Linux, and NetBSD, and the calls to the
API need to be massaged for FreeBSD and Linux.

Submitted by: pho

9 years agoStart to allow platforms other than U-Boot to use the FDT code in loader by
andrew [Sat, 1 Nov 2014 17:12:44 +0000 (17:12 +0000)]
Start to allow platforms other than U-Boot to use the FDT code in loader by
moving U-Boot specific code from libfdt.a to a new libuboot_fdt.a. This
needs to be a new library for linking to work correctly.

Differential Revision: https://reviews.freebsd.org/D1054
Reviewed by: ian, rpaulo (earlier version)
MFC after: 1 week

9 years agoDon't prune duplicate services in the expected output from /etc/services on
ngie [Sat, 1 Nov 2014 17:09:39 +0000 (17:09 +0000)]
Don't prune duplicate services in the expected output from /etc/services on
FreeBSD

Submitted by: pho

9 years agovt(4): Adjust the cursor position after changing the window size
dumbbell [Sat, 1 Nov 2014 17:05:15 +0000 (17:05 +0000)]
vt(4): Adjust the cursor position after changing the window size

A new terminal_set_cursor() is added: it wraps the existing
teken_set_cursor() function.

In vtbuf_grow(), the cursor position is adjusted at the end of the
function. In vt_change_font(), we call terminal_set_cursor() just after
terminal_set_winsize_blank(), while the terminal is mute.

This fixes a bug where, after loading a kernel video driver which
increases the terminal window size, the cursor remains at its old
position, in other words, in the middle of the display content.

PR: 194421
MFC after: 1 week

9 years agoMFV: Import atf-0.21.
jmmv [Sat, 1 Nov 2014 11:17:54 +0000 (11:17 +0000)]
MFV: Import atf-0.21.

9 years agoPut mtree test files into a subdirectory.
jmmv [Sat, 1 Nov 2014 11:07:59 +0000 (11:07 +0000)]
Put mtree test files into a subdirectory.

Kyua 0.11 points TMPDIR to the test's work directory, and atf_check creates
auxiliary files in TMPDIR.  This confuses a couple of mtree tests that were
using the work directory's root to validate the contents of the directory.

Fix the two affected tests by creating an auxiliary directory to use for
the mtree tests.  (Kyua should probably do this on its own; filed bug #133
upstream to take a look at this.)

9 years agoMove the definitions of the fdt functions from a uboot header to a new fdt
andrew [Sat, 1 Nov 2014 10:50:18 +0000 (10:50 +0000)]
Move the definitions of the fdt functions from a uboot header to a new fdt
header. There is nothing in the fdt spec that ties it to U-Boot.

While here sort and fix the signature of fdt_setup_fdtp.

MFC after: 1 week

9 years agoFix the build of non-FDT systems by moving the gpiobusvar.h header outside
loos [Sat, 1 Nov 2014 10:40:29 +0000 (10:40 +0000)]
Fix the build of non-FDT systems by moving the gpiobusvar.h header outside
the FDT #ifdef.

While here remove a few unused headers.

9 years agoDon't zero the stats before they are read out.
tuexen [Sat, 1 Nov 2014 10:35:45 +0000 (10:35 +0000)]
Don't zero the stats before they are read out.

MFC after: 3 days

9 years ago<sys/param.h> is a superset of <sys/types.h> and must always come
des [Sat, 1 Nov 2014 09:10:21 +0000 (09:10 +0000)]
<sys/param.h> is a superset of <sys/types.h> and must always come
first.  Coincidentally, today is the 11th anniversary of this man
page's (and this bug's) first appearance in FreeBSD.

MFC after: 3 days

9 years agoRewrite some of the disk setup documentation to be clearer and contain
nwhitehorn [Fri, 31 Oct 2014 23:52:02 +0000 (23:52 +0000)]
Rewrite some of the disk setup documentation to be clearer and contain
less obsolete information. Also move the entropy command down the list --
the list is ordered by likelihood of use rather than alphabetically.

MFC after: 1 week

9 years agosh: Fix corruption of CTL* bytes in positional parameters in redirection.
jilles [Fri, 31 Oct 2014 22:28:10 +0000 (22:28 +0000)]
sh: Fix corruption of CTL* bytes in positional parameters in redirection.

EXP_REDIR was not being checked for while expanding positional parameters in
redirection, so CTL* bytes were not being prefixed where they should be.

MFC after: 1 week

9 years agorc.d/geli should not depend on random, as the attach functionality
delphij [Fri, 31 Oct 2014 22:20:27 +0000 (22:20 +0000)]
rc.d/geli should not depend on random, as the attach functionality
do not require additional entropy to function.

It would create a circular dependency (not immediately obvious:
geli provides 'disks' and requires 'random' as of r273872,
'random' requires 'FILESYSTEMS', 'FILESYSTEMS' requires 'root',
'root' requires 'swap', and finally 'swap' requires 'disk').

9 years agoChange the default log level for iSCSI target from 3 to 1. It should
trasz [Fri, 31 Oct 2014 19:26:12 +0000 (19:26 +0000)]
Change the default log level for iSCSI target from 3 to 1.  It should
have been 1 from the beginning; not sure how it ended up at 3.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoFix the gpiobus locking by using a more sane model where it isn't necessary
loos [Fri, 31 Oct 2014 19:15:14 +0000 (19:15 +0000)]
Fix the gpiobus locking by using a more sane model where it isn't necessary
hold the gpiobus lock between the gpio calls.

gpiobus_acquire_lock() now accepts a third parameter which tells gpiobus
what to do when the bus is already busy.

When GPIOBUS_WAIT wait is used, the calling thread will be put to sleep
until the bus became free.

With GPIOBUS_DONTWAIT the calling thread will receive EWOULDBLOCK right
away and then it can act upon.

This fixes the gpioiic(4) locking issues that arises when doing multiple
concurrent access on the bus.

9 years agoThe command name is a constant, use the correct type.
andrew [Fri, 31 Oct 2014 18:35:03 +0000 (18:35 +0000)]
The command name is a constant, use the correct type.

MFC after: 1 week