Commit Graph

194432 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
7417198fcf 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.
2014-11-02 01:47:27 +00:00
Mateusz Guzik
d3f3e12a4f filedesc: lock filedesc lock in fdcloseexec only when needed 2014-11-02 01:13:11 +00:00
John-Mark Gurney
7bd12696d7 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..
2014-11-02 00:11:25 +00:00
Mateusz Guzik
cdcf242896 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
2014-11-01 22:36:40 +00:00
Enji Cooper
4c8d4de868 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
2014-11-01 22:00:46 +00:00
Enji Cooper
6a4bfd1397 Expect :sscanf_whitespace to fail on !NetBSD OSes
Submitted by: pho
2014-11-01 21:30:18 +00:00
Enji Cooper
c069d69178 Skip :fopen_regular on !NetBSD because it's a NetBSD specific test
Submitted by: pho
2014-11-01 21:25:22 +00:00
Enji Cooper
708c5b014e Add new atf_tc_expect_fail to fflush_err; this is a new (within the past couple months) bug 2014-11-01 21:23:27 +00:00
Enji Cooper
c621fcdc50 Disable testcases 12 and 15-22 on FreeBSD
Submitted by: pho
2014-11-01 21:21:06 +00:00
Enji Cooper
952234df16 Expect :snprintf_posarg_error to blow up with a SIGSEGV on !NetBSD OSes 2014-11-01 21:00:40 +00:00
Enji Cooper
d57c6b5e4f 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
2014-11-01 20:50:39 +00:00
Enji Cooper
4925f4feec 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
2014-11-01 20:45:45 +00:00
Enji Cooper
1cb870ee31 Port t_kevent to FreeBSD
Submitted by: pho
2014-11-01 20:41:40 +00:00
Enji Cooper
8bd02ea557 Skip :sethostname_basic because it messes up the test host's hostname
Convert code from #if defined(__FreeBSD__) to #ifdef __FreeBSD__
2014-11-01 20:33:42 +00:00
Gavin Atkinson
22c056ce83 Updates to the list of CPUs supported by the amd64 platform
MFC after:	3 days
2014-11-01 20:07:32 +00:00
Marcel Moolenaar
dacdf5e0fc 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.
2014-11-01 18:51:48 +00:00
Mark Murray
4384929abb Remove duplicate macro settings (probably due to an SVN merge /faux pas/ on my part.
Spotted by: DES
Approved by:	DES(implicit)
2014-11-01 17:52:04 +00:00
Enji Cooper
a8b9bac8b5 getitimer on FreeBSD returns the last set time instead of the remaining time;
test for that instead

Submitted by: pho
2014-11-01 17:22:53 +00:00
Enji Cooper
4dc3ed6a7b 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
2014-11-01 17:19:43 +00:00
Enji Cooper
b0b9a540ca Port lib/libc/net/h_dns_server to FreeBSD
Submitted by: pho
2014-11-01 17:14:29 +00:00
Enji Cooper
0d913b6592 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
2014-11-01 17:13:13 +00:00
Andrew Turner
8c81befd0b 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
2014-11-01 17:12:44 +00:00
Enji Cooper
b6fbc510be Don't prune duplicate services in the expected output from /etc/services on
FreeBSD

Submitted by: pho
2014-11-01 17:09:39 +00:00
Jean-Sébastien Pédron
da49f6bcc3 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
2014-11-01 17:05:15 +00:00
Julio Merino
0677dfd1c4 MFV: Import atf-0.21. 2014-11-01 11:17:54 +00:00
Julio Merino
80d53cbe7f 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.)
2014-11-01 11:07:59 +00:00
Andrew Turner
47264cb680 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
2014-11-01 10:50:18 +00:00
Luiz Otavio O Souza
409c183904 Fix the build of non-FDT systems by moving the gpiobusvar.h header outside
the FDT #ifdef.

While here remove a few unused headers.
2014-11-01 10:40:29 +00:00
Michael Tuexen
f885296d70 Don't zero the stats before they are read out.
MFC after: 3 days
2014-11-01 10:35:45 +00:00
Dag-Erling Smørgrav
4b52e0d84f <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
2014-11-01 09:10:21 +00:00
Nathan Whitehorn
5b9ee78d49 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
2014-10-31 23:52:02 +00:00
Jilles Tjoelker
5dff1efc27 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
2014-10-31 22:28:10 +00:00
Xin LI
202bbb3d74 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').
2014-10-31 22:20:27 +00:00
Edward Tomasz Napierala
9f19947146 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
2014-10-31 19:26:12 +00:00
Luiz Otavio O Souza
9d35acacd3 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.
2014-10-31 19:15:14 +00:00
Andrew Turner
85462455a5 The command name is a constant, use the correct type.
MFC after:	1 week
2014-10-31 18:35:03 +00:00
Andrew Turner
a7ac719d30 Clean up the types of a few strings to make them const when they are never
written to.
2014-10-31 18:20:39 +00:00
Konstantin Belousov
2361c6d135 Add type qualifier volatile to the base (userspace) address argument
of fuword(9) and suword(9).  This makes the functions type-compatible
with volatile objects and does not require devolatile force, e.g. in
kern_umtx.c.

Requested by:	bde
Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2014-10-31 17:43:21 +00:00
Gleb Smirnoff
3a4c61c2fd Use macro ERROUT() to make code more laconic and follow style of other
netgraph code.

Submitted by:	Dmitry Luhtionov <dmitryluhtionov gmail.com>
2014-10-31 16:00:45 +00:00
Andrey V. Elsukov
1d904a55c8 Remove the check for packets with broadcast source from if_gif's encapcheck.
The check was recommened in the draft-ietf-ngtrans-mech-05.txt. But it isn't
clear, should it compare the source with all direct broadcast addresses in the
system or not.
RFC 4213 says it is enough to verify that the source address is the address
of the encapsulator, as configured on the decapsulator. And this verification
can be extended by administrator with any other forms of IPv4 ingress filtering.

Discussed with:	glebius, melifaro
Sponsored by:	Yandex LLC
2014-10-31 15:23:24 +00:00
Kevin Lo
cde04bfa59 Fix usage of kern_getenv(). 2014-10-31 15:07:51 +00:00
Dag-Erling Smørgrav
a9375a0ab2 Add /etc/rc.d/initrandom, which was removed in r273872.
Noticed by:	ache@
2014-10-31 14:22:26 +00:00
Alexander V. Chernikov
ad4278e8fd Print human-readable error for "route not found" case.
Submitted by:	vsevolod (initial version)
MFC after:	2 weeks
Sponsored by:	Yandex LLC
2014-10-31 13:37:47 +00:00
Andrey V. Elsukov
f5196a58a0 Use in_localip() instead of handmade implementation.
MFC after:	1 week
Sponsored by:	Yandex LLC
2014-10-31 12:19:22 +00:00
Andrey V. Elsukov
7e4217558c Fix typo. 2014-10-31 11:40:49 +00:00
Tijl Coosemans
d2e9b22c5d Build ttm_agp_backend.c.
Reported by:	dumbbell
MFC after:	1 month
2014-10-31 10:45:34 +00:00
Mateusz Guzik
2534d8eeb6 filedesc: drop retval argument from do_dup
It was almost always td_retval anyway.

For the one case where it is not, preserve the old value across the call.
2014-10-31 10:35:01 +00:00
Hans Petter Selasky
f0efae7791 Only put one CTASSERT() inside each macro to avoid compile issues.
The problem is that the __LINE__ macro is constant inside a macro and
results in identical assert statements when the compiler does not
support the static builtin assert function.

MFC:		3 days
Sponsored by:	Mellanox Technologies
2014-10-31 10:18:58 +00:00
Mateusz Guzik
8a5177cca3 filedesc: fix missed comments about fdsetugidsafety
While here just note that both fdsetugidsafety and fdcheckstd take sleepable
locks.
2014-10-31 09:56:00 +00:00
Edward Tomasz Napierala
6575d18476 Build mount_nfs(8) with WARNS=6.
Reviewed by:	rmacklem@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-31 09:51:54 +00:00