]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoOnly set -Wno-c++11-extensions if we're building with clang, so bootstrapping
David Chisnall [Fri, 6 Sep 2013 20:42:14 +0000 (20:42 +0000)]
Only set -Wno-c++11-extensions if we're building with clang, so bootstrapping
clang with gcc doesn't fail.

10 years agoAdd vmx device to the i386 and amd64 NOTES files
Bryan Venteicher [Fri, 6 Sep 2013 20:24:21 +0000 (20:24 +0000)]
Add vmx device to the i386 and amd64 NOTES files

10 years agoFix use of MACHINE_ARCH where MACHINE was intended for pc98 detection.
David Chisnall [Fri, 6 Sep 2013 20:23:15 +0000 (20:23 +0000)]
Fix use of MACHINE_ARCH where MACHINE was intended for pc98 detection.

Reported by: nwhitehorn

10 years agoOn platforms where clang is the default compiler, don't build gcc or libstdc++.
David Chisnall [Fri, 6 Sep 2013 20:08:03 +0000 (20:08 +0000)]
On platforms where clang is the default compiler, don't build gcc or libstdc++.
To enable them, set WITH_GCC and WITH_GNUCXX in src.conf.
Make clang default to using libc++ on FreeBSD 10.
Bumped __FreeBSD_version for the change.

GCC is still enabled on PC98, because the PC98 bootloader requires GCC to build
(or, at least, hard-codes the use of gcc into its build).

Thanks to everyone who helped make the ports tree ready for this (and bapt
for coordinating them all).  Also to imp for reviewing this and working on the
forward-porting of the changes in our gcc so that we're getting to a much
better place with regard to external toolchains.

Sorry to all of the people who helped who I forgot to mention by name.

Reviewed by: bapt, imp, dim, ...

10 years agoReturn BUS_PROBE_DEFAULT instead of BUS_PROBE_SPECIFIC.
Xin LI [Fri, 6 Sep 2013 18:41:57 +0000 (18:41 +0000)]
Return BUS_PROBE_DEFAULT instead of BUS_PROBE_SPECIFIC.

This change is a 9.2-RELEASE candidate.

Approved by: HighPoint Technologies

10 years agoFix build with gcc. Move sf_buf_alloc()/sf_buf_free() declarations
Gleb Smirnoff [Fri, 6 Sep 2013 17:44:13 +0000 (17:44 +0000)]
Fix build with gcc. Move sf_buf_alloc()/sf_buf_free() declarations
to MD headers.

10 years agoKeep PRIV_KMEM_READ permitted inside jails as it is on the outside.
Jamie Gritton [Fri, 6 Sep 2013 17:32:29 +0000 (17:32 +0000)]
Keep PRIV_KMEM_READ permitted inside jails as it is on the outside.

10 years agocomment out some stale loader configurations.
Luigi Rizzo [Fri, 6 Sep 2013 17:19:57 +0000 (17:19 +0000)]
comment out some stale loader configurations.

10 years agogenerate multiple host keys and do that unconditionally
Luigi Rizzo [Fri, 6 Sep 2013 17:18:43 +0000 (17:18 +0000)]
generate multiple host keys and do that unconditionally

10 years agor253616 nuked BINMAKE so we need to adapt to the new definition
Luigi Rizzo [Fri, 6 Sep 2013 17:16:33 +0000 (17:16 +0000)]
r253616 nuked BINMAKE so we need to adapt to the new definition

10 years agoOnly lock pvh_global_lock read-only for pmap_page_wired_mappings(),
Konstantin Belousov [Fri, 6 Sep 2013 16:53:48 +0000 (16:53 +0000)]
Only lock pvh_global_lock read-only for pmap_page_wired_mappings(),
pmap_is_modified() and pmap_is_referenced(), same as it was done for
pmap_ts_referenced().

Consolidate identical code for pmap_is_modified() and
pmap_is_referenced() into helper pmap_page_test_mappings().

Reviewed by: alc
Tested by: pho (previous version)
Sponsored by: The FreeBSD Foundation

10 years agoIn pmap_ts_referenced(), when restarting the loop due to pv list
Konstantin Belousov [Fri, 6 Sep 2013 16:48:34 +0000 (16:48 +0000)]
In pmap_ts_referenced(), when restarting the loop due to pv list
generation changed, do not drop and immediately relock the pv list.

Suggested and reviewed by: alc
Sponsored by: The FreeBSD Foundation

10 years agoAdd firmware downloading support for Samsung drives
Bryan Venteicher [Fri, 6 Sep 2013 16:34:09 +0000 (16:34 +0000)]
Add firmware downloading support for Samsung drives

Tested on Samsung SM1625 SSDs.

10 years agoMake SES driver adequately react on simple enclosure devices -- read Short
Alexander Motin [Fri, 6 Sep 2013 15:41:37 +0000 (15:41 +0000)]
Make SES driver adequately react on simple enclosure devices -- read Short
Enclosure status to enclosure status field, clear previous state and exit.

10 years agoAdd camcontrol support for the SCSI sanitize command
Bryan Venteicher [Fri, 6 Sep 2013 15:19:57 +0000 (15:19 +0000)]
Add camcontrol support for the SCSI sanitize command

Reviewed by: ken, mjacob (eariler version)
Sponsored by: Netapp

10 years agoBump __FreeBSD_version to 1000053 after cap_rights_t change.
Pawel Jakub Dawidek [Fri, 6 Sep 2013 14:34:20 +0000 (14:34 +0000)]
Bump __FreeBSD_version to 1000053 after cap_rights_t change.

Suggested by: danfe

10 years agoFix kernel panic if cache->nelms is zero.
Alexander Motin [Fri, 6 Sep 2013 14:31:52 +0000 (14:31 +0000)]
Fix kernel panic if cache->nelms is zero.

MFC after: 2 weeks

10 years agolibc/stdio: Allow fopen/freopen modes in any order (except initial r/w/a).
Jilles Tjoelker [Fri, 6 Sep 2013 13:47:16 +0000 (13:47 +0000)]
libc/stdio: Allow fopen/freopen modes in any order (except initial r/w/a).

Austin Group issue #411 requires 'e' to be accepted before and after 'x',
and encourages accepting the characters in any order, except the initial
'r', 'w' or 'a'.

Given that glibc accepts the characters after r/w/a in any order and that
diagnosing this problem may be hard, change our libc to behave that way as
well.

10 years agolibc/stdio: Run mkostemp test using prove.
Jilles Tjoelker [Fri, 6 Sep 2013 12:59:48 +0000 (12:59 +0000)]
libc/stdio: Run mkostemp test using prove.

10 years agolibc/stdio: Provide proper TAP output for fmemopen/open_[w]memstream.
Jilles Tjoelker [Fri, 6 Sep 2013 12:56:49 +0000 (12:56 +0000)]
libc/stdio: Provide proper TAP output for fmemopen/open_[w]memstream.

A *.t file should provide Test Anything Protocol output so that it can be
run using the Perl "prove" tool.

10 years agoFix the leakage of dma tags on if_arge. The leak occur when arge_start()
Luiz Otavio O Souza [Fri, 6 Sep 2013 12:47:14 +0000 (12:47 +0000)]
Fix the leakage of dma tags on if_arge.  The leak occur when arge_start()
add some packet(s) to tx ring and arge_stop() is called before receive the
sent packet interrupt from hardware.  Fix arge_stop() to unload the in use
dma tags and free the associated mbuf.

PR: 178319, 163670
Approved by: adrian (mentor)

10 years agoUse Makefile.inc instead of .export.
David Chisnall [Fri, 6 Sep 2013 10:40:38 +0000 (10:40 +0000)]
Use Makefile.inc instead of .export.

10 years agoFix the namespace pollution caused by iconv.h including stdbool.h
David Chisnall [Fri, 6 Sep 2013 09:46:44 +0000 (09:46 +0000)]
Fix the namespace pollution caused by iconv.h including stdbool.h
This broke any C89 ports that defined bool themselves, including things
like gcc, gtk, and so on.

10 years agoUpdate some signal man pages for multithreading.
Jilles Tjoelker [Fri, 6 Sep 2013 09:08:40 +0000 (09:08 +0000)]
Update some signal man pages for multithreading.

10 years agoAdd stub implementations of the missing C++11 math functions.
David Chisnall [Fri, 6 Sep 2013 07:58:23 +0000 (07:58 +0000)]
Add stub implementations of the missing C++11 math functions.
These are weak and so can be replaced by other versions in applications
that choose to do so, and will give a linker warning when used so that
applications that rely on the extra precision can avoid them.

Note that since the C/C++ specs only guarantee that long double has
precision equal to double, code that actually relies on these functions
having greater precision is unportable at best and broken at worst.

10 years agoFix spelling.
Peter Grehan [Fri, 6 Sep 2013 05:58:10 +0000 (05:58 +0000)]
Fix spelling.

10 years agoAllow level-triggered interrupt sources. While this isn't
Peter Grehan [Fri, 6 Sep 2013 05:55:43 +0000 (05:55 +0000)]
Allow level-triggered interrupt sources. While this isn't
precisely emulated, it is good enough for the single consumer
i.e. irq4, the serial port on Linux.

10 years agoFix build.
Gleb Smirnoff [Fri, 6 Sep 2013 05:38:20 +0000 (05:38 +0000)]
Fix build.

10 years agoOn those machines, where sf_bufs do not represent any real object, make
Gleb Smirnoff [Fri, 6 Sep 2013 05:37:49 +0000 (05:37 +0000)]
On those machines, where sf_bufs do not represent any real object, make
sf_buf_alloc()/sf_buf_free() inlines, to save two calls to an absolutely
empty functions.

Reviewed by: alc, kib, scottl
Sponsored by: Nginx, Inc.
Sponsored by: Netflix

10 years agoEmulate reading of the IA32_MISC_ENABLE MSR, by returning
Peter Grehan [Fri, 6 Sep 2013 05:20:11 +0000 (05:20 +0000)]
Emulate reading of the IA32_MISC_ENABLE MSR, by returning
the host MSR and masking off features that aren't supported.
Linux reads this MSR to detect if NX has been disabled via
BIOS.

10 years agoAllow CPUID leaf 0xD to be read as zeroes.
Peter Grehan [Fri, 6 Sep 2013 05:16:10 +0000 (05:16 +0000)]
Allow CPUID leaf 0xD to be read as zeroes.
Linux reads this even though extended features
aren't exposed.

Support for 0xD will be expanded once AVX[2]
is exposed to the guest in upcoming work.

10 years agoDuring universe/tinderbox export MAKE_JOB_ERROR_TOKEN=no
Simon J. Gerraty [Fri, 6 Sep 2013 02:57:15 +0000 (02:57 +0000)]
During universe/tinderbox export MAKE_JOB_ERROR_TOKEN=no
This avoids aborting everything when one kernel fails.

Reviewed by: obrien

10 years agoIf MAKE_JOB_ERROR_TOKEN is set to false, do not put an error token ("E")
Simon J. Gerraty [Fri, 6 Sep 2013 02:55:51 +0000 (02:55 +0000)]
If MAKE_JOB_ERROR_TOKEN is set to false, do not put an error token ("E")
into the job queue.
This avoids closing down an entire build on failure of one branch.
Probably has no use outside the context of universe/tinderbox.

Reviewed by: obrien

10 years agoIt was reported via email that the cu_sent field used by the
Rick Macklem [Fri, 6 Sep 2013 02:34:34 +0000 (02:34 +0000)]
It was reported via email that the cu_sent field used by the
krpc client side UDP was observed as way out of range and
caused the rpc.lockd daemon to hang trying to do an RPC.
Inspection of the code found two places where the RPC request
is re-queued, but the value of cu_sent was not incremented.
Since cu_sent is always decremented when the RPC request is
dequeued, I think this could have caused cu_sent to go out of
range. This patch adds lines to increment cu_sent for these
two cases.

Reported by: dwhite@ixsystems.com
Discussed with: dwhite@ixsystems.com
MFC after: 2 weeks

10 years agoAlso align the 32-bit PowerPC stacks.
Nathan Whitehorn [Thu, 5 Sep 2013 23:28:50 +0000 (23:28 +0000)]
Also align the 32-bit PowerPC stacks.

10 years agoRemove contractions.
Carl Delsey [Thu, 5 Sep 2013 23:14:27 +0000 (23:14 +0000)]
Remove contractions.

Approved by: jimharris
Sponsored by: Intel

10 years agoOnly tear down interface and transport if they've been successfully setup.
Carl Delsey [Thu, 5 Sep 2013 23:12:58 +0000 (23:12 +0000)]
Only tear down interface and transport if they've been successfully setup.

Approved by: jimharris
Sponsored by: Intel

10 years agoWorkaround an issue with hardware by accessing remote device through mem
Carl Delsey [Thu, 5 Sep 2013 23:11:11 +0000 (23:11 +0000)]
Workaround an issue with hardware by accessing remote device through mem
window.

Approved by: jimharris
Sponsored by: Intel

10 years agoSimplify register access macros by removing one level of indirection.
Carl Delsey [Thu, 5 Sep 2013 23:08:22 +0000 (23:08 +0000)]
Simplify register access macros by removing one level of indirection.

Approved by: jimharris
Sponsored by: Intel

10 years agoCleaning up spacing and making hex value case consistent.
Carl Delsey [Thu, 5 Sep 2013 23:06:25 +0000 (23:06 +0000)]
Cleaning up spacing and making hex value case consistent.

Approved by: jimharris
Sponsored by: Intel

10 years agoImplement workaround for IvyTown 4K BAR size issue.
Carl Delsey [Thu, 5 Sep 2013 23:04:36 +0000 (23:04 +0000)]
Implement workaround for IvyTown 4K BAR size issue.

Approved by: jimharris
Sponsored by: Intel

10 years agoSimplifying bus alloc resource call since we only need the default values.
Carl Delsey [Thu, 5 Sep 2013 23:02:43 +0000 (23:02 +0000)]
Simplifying bus alloc resource call since we only need the default values.

Approved by: jimharris
Sponsored by: Intel

10 years agoAdd support for per device features and workarounds.
Carl Delsey [Thu, 5 Sep 2013 23:00:59 +0000 (23:00 +0000)]
Add support for per device features and workarounds.

Approved by: jimharris
Sponsored by: Intel

10 years agoAlign stacks of kernel threads correctly at 16-byte boundaries rather than
Nathan Whitehorn [Thu, 5 Sep 2013 23:00:24 +0000 (23:00 +0000)]
Align stacks of kernel threads correctly at 16-byte boundaries rather than
making sure they are all misaligned at +8 bytes. This fixes clang builds
of powerpc64 kernels (aside from a required increase in KSTACK_PAGES which
will come later).

This commit from FreeBSD/powerpc64 with a clang-built kernel.

MFC after: 2 weeks

10 years agoRestructure the PCI bar initialization code in anticipation of upcoming
Carl Delsey [Thu, 5 Sep 2013 22:59:18 +0000 (22:59 +0000)]
Restructure the PCI bar initialization code in anticipation of upcoming
bug fixes.

Approved by: jimharris
Sponsored by: Intel

10 years agoFix name change from ntb_transport to if_ntb. A few places were
Carl Delsey [Thu, 5 Sep 2013 22:56:52 +0000 (22:56 +0000)]
Fix name change from ntb_transport to if_ntb. A few places were
overlooked.

Approved by: jimharris
Sponsored by: Intel

10 years agoFix a typo.
Carl Delsey [Thu, 5 Sep 2013 22:55:08 +0000 (22:55 +0000)]
Fix a typo.

Approved by: jimharris
Sponsored by: Intel

10 years agoThrow a bit to enable the link to come up on Xeon.
Carl Delsey [Thu, 5 Sep 2013 22:52:40 +0000 (22:52 +0000)]
Throw a bit to enable the link to come up on Xeon.

Approved by: jimharris
Sponsored by: Intel

10 years agoAdd some logging to ntb link up.
Carl Delsey [Thu, 5 Sep 2013 22:46:48 +0000 (22:46 +0000)]
Add some logging to ntb link up.

Approved by: jimharris
Sponsored by: Intel

10 years agoStyle clean-ups.
Hiroki Sato [Thu, 5 Sep 2013 21:19:16 +0000 (21:19 +0000)]
Style clean-ups.

Reviewed by: md5

10 years agoEnable "late" option when a file= option is specified in /etc/fstab.
Hiroki Sato [Thu, 5 Sep 2013 20:50:52 +0000 (20:50 +0000)]
Enable "late" option when a file= option is specified in /etc/fstab.
The file= option requires rw mount where the backing store exists but
it does not work because rc.d/swap runs before rc.d/fsck.
Reported by: wblock

10 years agowatch: Do not mess up the tty modes on early error.
Jilles Tjoelker [Thu, 5 Sep 2013 19:02:03 +0000 (19:02 +0000)]
watch: Do not mess up the tty modes on early error.

Record the initial state earlier, so it is always safe to restore it.

One way this happens is if watch(8) is started by a user that does not have
access to /dev/snp. The result is "staircase effect" during later commands.

PR: bin/153052
MFC after: 1 week

10 years agoFixing a small typo.
Hiren Panchasara [Thu, 5 Sep 2013 18:18:23 +0000 (18:18 +0000)]
Fixing a small typo.

Reviewed by: gjb
Approved by: sbruno (mentor)

10 years agoMinor printf nit to keep out clean
Sean Bruno [Thu, 5 Sep 2013 16:38:26 +0000 (16:38 +0000)]
Minor printf nit to keep out clean

10 years agoMerge bmake-20130904
Simon J. Gerraty [Thu, 5 Sep 2013 15:57:26 +0000 (15:57 +0000)]
Merge bmake-20130904

10 years agoImport bmake-20130904
Simon J. Gerraty [Thu, 5 Sep 2013 15:49:22 +0000 (15:49 +0000)]
Import bmake-20130904

10 years agoUse LIST_FOREACH_SAFE() instead of doing it by hand.
John Baldwin [Thu, 5 Sep 2013 14:26:37 +0000 (14:26 +0000)]
Use LIST_FOREACH_SAFE() instead of doing it by hand.

10 years agoUse an unsigned long when indexing into mfchashtbl[] and mf6ctable[]. This
John Baldwin [Thu, 5 Sep 2013 14:16:37 +0000 (14:16 +0000)]
Use an unsigned long when indexing into mfchashtbl[] and mf6ctable[].  This
matches the types used when computing hash indices and the type of the
maximum size of mfchashtbl[].

PR: kern/181821
Submitted by: Sven-Thorsten Dietrich <sven@vyatta.com> (IPv4)
MFC after: 1 week

10 years agoFix build.
Gleb Smirnoff [Thu, 5 Sep 2013 13:53:25 +0000 (13:53 +0000)]
Fix build.

10 years agoFix build.
Gleb Smirnoff [Thu, 5 Sep 2013 13:46:30 +0000 (13:46 +0000)]
Fix build.
counter.h requires systm.h

10 years agoThe vm_pageout_flush() functions sbusies pages in the passed pages
Konstantin Belousov [Thu, 5 Sep 2013 12:56:08 +0000 (12:56 +0000)]
The vm_pageout_flush() functions sbusies pages in the passed pages
run.  After that, the pager put method is called, usually translated
to VOP_WRITE().  For the filesystems which use buffer cache,
bufwrite() sbusies the buffer pages again, waiting for the xbusy state
to drain.  The later is done in vfs_drain_busy_pages(), which is
called with the buffer pages already sbusied (by vm_pageout_flush()).

Since vfs_drain_busy_pages() can only wait for one page at the time,
and during the wait, the object lock is dropped, previous pages in the
buffer must be protected from other threads busying them.  Up to the
moment, it was done by xbusying the pages, that is incompatible with
the sbusy state in the new implementation of busy.  Switch to sbusy.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation

10 years agoThe vm_page_trysbusy() should not fail when shared busy counter or
Konstantin Belousov [Thu, 5 Sep 2013 12:54:40 +0000 (12:54 +0000)]
The vm_page_trysbusy() should not fail when shared busy counter or
VPB_BIT_WAITERS flag were changed between reading of busy_lock and the
cas.  The vm_page_sbusy(), which is the only user of
vm_page_trysbusy() in the tree, panics on the failure, which in these
cases is transient and do not mean that the current page state
prevents sbusying.

Retry the operation inside vm_page_trysbusy() if cas failed, only
return a failure when VPB_BIT_SHARED is cleared.

Reported and tested by: pho
Reviewed by: attilio
Sponsored by: The FreeBSD Foundation

10 years agoauthpf needs /var/authpf to exist and be writable by group authpf.
Dag-Erling Smørgrav [Thu, 5 Sep 2013 12:35:23 +0000 (12:35 +0000)]
authpf needs /var/authpf to exist and be writable by group authpf.

10 years agoCorrect two comments.
Hans Petter Selasky [Thu, 5 Sep 2013 12:21:11 +0000 (12:21 +0000)]
Correct two comments.

10 years agoThe fget() function now takes pointer to cap_rights_t, so change 0 to NULL.
Pawel Jakub Dawidek [Thu, 5 Sep 2013 11:59:23 +0000 (11:59 +0000)]
The fget() function now takes pointer to cap_rights_t, so change 0 to NULL.

10 years agoHandle cases where capability rights are not provided.
Pawel Jakub Dawidek [Thu, 5 Sep 2013 11:58:12 +0000 (11:58 +0000)]
Handle cases where capability rights are not provided.

Reported by: kib

10 years agoFix !CAPABILITIES build.
Gleb Smirnoff [Thu, 5 Sep 2013 10:24:09 +0000 (10:24 +0000)]
Fix !CAPABILITIES build.

10 years agoAdd support for DLINK DWA-127 Wireless Adapter
Ruslan Bukin [Thu, 5 Sep 2013 10:09:24 +0000 (10:09 +0000)]
Add support for DLINK DWA-127 Wireless Adapter

Approved by: cognet (mentor)

10 years agoRemove stub implementation.
Andrey V. Elsukov [Thu, 5 Sep 2013 09:44:09 +0000 (09:44 +0000)]
Remove stub implementation.

MFC after: 1 week

10 years agoCorrect the logic broken in my last commit.
Pawel Jakub Dawidek [Thu, 5 Sep 2013 09:36:19 +0000 (09:36 +0000)]
Correct the logic broken in my last commit.

Reported by: tijl

10 years agoRemove unused code and sort variables declarations.
Andrey V. Elsukov [Thu, 5 Sep 2013 08:12:36 +0000 (08:12 +0000)]
Remove unused code and sort variables declarations.

PR: kern/181822
MFC after: 1 week

10 years agoAdd more references.
Alexander Motin [Thu, 5 Sep 2013 07:13:08 +0000 (07:13 +0000)]
Add more references.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 1 week

10 years agoFix file selection logic for the RCS/SCCS case, as was done for the simple
Stefan Eßer [Thu, 5 Sep 2013 05:51:15 +0000 (05:51 +0000)]
Fix file selection logic for the RCS/SCCS case, as was done for the simple
file case before. Bump version because of the changed behavior, which now
matches the documentation.

Reviewed by: pfg

10 years agoRestore builds on architectures that don't support CAPABILITIES (mips).
Sean Bruno [Thu, 5 Sep 2013 03:46:44 +0000 (03:46 +0000)]
Restore builds on architectures that don't support CAPABILITIES (mips).

10 years agoThis looks like a typo that breaks the build. Yell at me if this isn't the
Sean Bruno [Thu, 5 Sep 2013 03:36:57 +0000 (03:36 +0000)]
This looks like a typo that breaks the build. Yell at me if this isn't the
intended declaration.

10 years agoFix the build.
Justin Hibbits [Thu, 5 Sep 2013 01:13:26 +0000 (01:13 +0000)]
Fix the build.

10 years agoRemove fallback to fork(2) if pdfork(2) is not available. If the parent
Pawel Jakub Dawidek [Thu, 5 Sep 2013 01:05:48 +0000 (01:05 +0000)]
Remove fallback to fork(2) if pdfork(2) is not available. If the parent
process dies, the process descriptor will be closed and pdfork(2)ed child
will be killed, which is not the case when regular fork(2) is used.

The PROCDESC option is now part of the GENERIC kernel configuration, so we
can start depending on it.

Add UPDATING entry to inform that this option is now required and log
detailed instruction to syslog if pdfork(2) is not available:

The pdfork(2) system call is not available; recompile the kernel with options PROCDESC

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by: Google Summer of Code 2013

10 years agoAdd sysctl/tunables for various metaslab variables.
Pawel Jakub Dawidek [Thu, 5 Sep 2013 00:53:01 +0000 (00:53 +0000)]
Add sysctl/tunables for various metaslab variables.

10 years agoAdvise a full buildworld, because of the recent Capsicum changes.
Pawel Jakub Dawidek [Thu, 5 Sep 2013 00:52:16 +0000 (00:52 +0000)]
Advise a full buildworld, because of the recent Capsicum changes.

Sponsored by: The FreeBSD Foundation

10 years agoAdd missing '2'.
Pawel Jakub Dawidek [Thu, 5 Sep 2013 00:41:07 +0000 (00:41 +0000)]
Add missing '2'.

10 years agoRemove trailing comma.
Pawel Jakub Dawidek [Thu, 5 Sep 2013 00:38:53 +0000 (00:38 +0000)]
Remove trailing comma.

10 years agoStyle fixes.
Pawel Jakub Dawidek [Thu, 5 Sep 2013 00:19:30 +0000 (00:19 +0000)]
Style fixes.

10 years agoStyle fixes. Most fixes are about not treating integers and pointers as
Pawel Jakub Dawidek [Thu, 5 Sep 2013 00:17:38 +0000 (00:17 +0000)]
Style fixes. Most fixes are about not treating integers and pointers as
booleans.

10 years agoRegenerate after r255219.
Pawel Jakub Dawidek [Thu, 5 Sep 2013 00:11:59 +0000 (00:11 +0000)]
Regenerate after r255219.

Sponsored by: The FreeBSD Foundation

10 years agoChange the cap_rights_t type from uint64_t to a structure that we can extend
Pawel Jakub Dawidek [Thu, 5 Sep 2013 00:09:56 +0000 (00:09 +0000)]
Change the cap_rights_t type from uint64_t to a structure that we can extend
in the future in a backward compatible (API and ABI) way.

The cap_rights_t represents capability rights. We used to use one bit to
represent one right, but we are running out of spare bits. Currently the new
structure provides place for 114 rights (so 50 more than the previous
cap_rights_t), but it is possible to grow the structure to hold at least 285
rights, although we can make it even larger if 285 rights won't be enough.

The structure definition looks like this:

struct cap_rights {
uint64_t cr_rights[CAP_RIGHTS_VERSION + 2];
};

The initial CAP_RIGHTS_VERSION is 0.

The top two bits in the first element of the cr_rights[] array contain total
number of elements in the array - 2. This means if those two bits are equal to
0, we have 2 array elements.

The top two bits in all remaining array elements should be 0.
The next five bits in all array elements contain array index. Only one bit is
used and bit position in this five-bits range defines array index. This means
there can be at most five array elements in the future.

To define new right the CAPRIGHT() macro must be used. The macro takes two
arguments - an array index and a bit to set, eg.

#define CAP_PDKILL CAPRIGHT(1, 0x0000000000000800ULL)

We still support aliases that combine few rights, but the rights have to belong
to the same array element, eg:

#define CAP_LOOKUP CAPRIGHT(0, 0x0000000000000400ULL)
#define CAP_FCHMOD CAPRIGHT(0, 0x0000000000002000ULL)

#define CAP_FCHMODAT (CAP_FCHMOD | CAP_LOOKUP)

There is new API to manage the new cap_rights_t structure:

cap_rights_t *cap_rights_init(cap_rights_t *rights, ...);
void cap_rights_set(cap_rights_t *rights, ...);
void cap_rights_clear(cap_rights_t *rights, ...);
bool cap_rights_is_set(const cap_rights_t *rights, ...);

bool cap_rights_is_valid(const cap_rights_t *rights);
void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src);
void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src);
bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little);

Capability rights to the cap_rights_init(), cap_rights_set(),
cap_rights_clear() and cap_rights_is_set() functions are provided by
separating them with commas, eg:

cap_rights_t rights;

cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT);

There is no need to terminate the list of rights, as those functions are
actually macros that take care of the termination, eg:

#define cap_rights_set(rights, ...) \
__cap_rights_set((rights), __VA_ARGS__, 0ULL)
void __cap_rights_set(cap_rights_t *rights, ...);

Thanks to using one bit as an array index we can assert in those functions that
there are no two rights belonging to different array elements provided
together. For example this is illegal and will be detected, because CAP_LOOKUP
belongs to element 0 and CAP_PDKILL to element 1:

cap_rights_init(&rights, CAP_LOOKUP | CAP_PDKILL);

Providing several rights that belongs to the same array's element this way is
correct, but is not advised. It should only be used for aliases definition.

This commit also breaks compatibility with some existing Capsicum system calls,
but I see no other way to do that. This should be fine as Capsicum is still
experimental and this change is not going to 9.x.

Sponsored by: The FreeBSD Foundation

10 years agoCorrect blkback handling of the BLKIF_OP_FLUSH_DISKCACHE opcode.
Justin T. Gibbs [Wed, 4 Sep 2013 23:32:49 +0000 (23:32 +0000)]
Correct blkback handling of the BLKIF_OP_FLUSH_DISKCACHE opcode.

Properly round-trip the "operation code" for client requests.

sys/dev/xen/blkback/blkback.c:
In xbb_dispatch_dev() when processing a flush request,
correctly set bio->bio_caller1 to the request list (not
bare request) for the operation, as is expected by the
completion handler xbb_bio_done().

In xbb_get_resources(), initialize "operation" in the
driver's internal request object from the client's "ring
request", so it is correct when used to populate the reply
when this operation completes.

Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs

10 years agoTidy up some loose ends in the PCID code:
Konstantin Belousov [Wed, 4 Sep 2013 23:31:29 +0000 (23:31 +0000)]
Tidy up some loose ends in the PCID code:

- Restore the pre-PCID TLB shootdown handlers for whole address space
  and single page invalidation asm code, and assign the IPI handler to
  them when PCID is not supported or disabled.  Old handlers have
  linear control flow.  But, still use the common return sequence.

- Stop using pcpu for INVPCID descriptors in the invlrg handler.  It
  is enough to allocate descriptors on the stack.  As result, two
  SWAPGS instructions are shaved off from the code for Haswell+.

- Fix the reverted condition in invlrng for checking of the PCID
  support [1], also in invlrng check that pmap is kernel pmap before
  performing other tests.  For the kernel pmap, which provides global
  mappings, the INVLPG must be used for invalidation always.

- Save the pre-computed pmap' %CR3 register in the struct pmap.  This
  allows to remove several checks for pm_pcid validity when %CR3 is
  reloaded [2].

Noted by:   gibbs [1]
Discussed with: alc [2]
Tested by: pho, flo
Sponsored by: The FreeBSD Foundation

10 years agoCrashes have been observed for NFSv4.1 mounts when the system
Rick Macklem [Wed, 4 Sep 2013 22:47:56 +0000 (22:47 +0000)]
Crashes have been observed for NFSv4.1 mounts when the system
is being shut down which were caused by the nfscbd_pool being
destroyed before the backchannel is disabled. This patch is
believed to fix the problem, by simply avoiding ever destroying
the nfscbd_pool. Since the NFS client module cannot be unloaded,
this should not cause a memory leak.

MFC after: 2 weeks

10 years agosh: Make return return from the closest function or dot script.
Jilles Tjoelker [Wed, 4 Sep 2013 22:10:16 +0000 (22:10 +0000)]
sh: Make return return from the closest function or dot script.

Formerly, return always returned from a function if it was called from a
function, even if there was a closer dot script. This was for compatibility
with the Bourne shell which only allowed returning from functions.

Other modern shells and POSIX return from the function or the dot script,
whichever is closest.

Git 1.8.4's rebase --continue depends on the POSIX behaviour.

Reported by: Christoph Mallon, avg

10 years agoAdd myself as a new committer and cognet as my mentor.
Zbigniew Bodek [Wed, 4 Sep 2013 20:49:32 +0000 (20:49 +0000)]
Add myself as a new committer and cognet as my mentor.

Approved by: cognet (mentor)

10 years agoAdd 32-bit support for Gxemul's oldtestmips machine emulation
Oleksandr Tymoshenko [Wed, 4 Sep 2013 20:34:36 +0000 (20:34 +0000)]
Add 32-bit support for Gxemul's oldtestmips machine emulation

Original work by: kan@

10 years agoAdd myself to the list of ports committers.
George V. Neville-Neil [Wed, 4 Sep 2013 20:12:33 +0000 (20:12 +0000)]
Add myself to the list of ports committers.

Approved by: skreuzer (mentor)

10 years agoRevert r255152:
Eitan Adler [Wed, 4 Sep 2013 18:42:05 +0000 (18:42 +0000)]
Revert r255152:

It turns out that synaptics_support was turned off by default
because its probing method is too intrusive not because it was unstable.

Once this is fixed it should be enabled once again.

Reported by: delphij, jkim

10 years agoadd links for the various vmem functions...
John-Mark Gurney [Wed, 4 Sep 2013 17:48:41 +0000 (17:48 +0000)]
add links for the various vmem functions...

10 years agoMFP4 217312, 222008, 222052, 222053, 222673, 231484, 231491, 231565, 570643
Brooks Davis [Wed, 4 Sep 2013 17:19:21 +0000 (17:19 +0000)]
MFP4 217312, 222008, 222052, 222053, 222673, 231484, 231491, 231565, 570643

Rework the timeout code to use actual time rather than a DELAY() loop and
to use both typical and maximum to allow logging of timeout failures.
Also correct the erase timeout, it is specified in milliseconds not
microseconds like the other timeouts.  Do not invoke DELAY() between
status queries as this adds significant latency which in turn reduced
write performance substantially.

Sanity check timeout values from the hardware.

Implement support for buffered writes (only enabled on Intel/Sharp parts
for now).  This yields an order of magnitude speedup on the 64MB Intel
StrataFlash parts we use.

When making a copy of the block to modify, also keep a clean copy around
until we are ready to commit the block and use it to avoid unnecessary
erases.  In the non-buffer write case, also use it to avoid
unnecessary writes when the block has not been erased.  This yields a
significant speedup when doing things like zeroing a block.

Sponsored by: DARPA, AFRL
Reviewed by: imp (previous version)

10 years agoAdd a c++/v1/tr1 include directory containing symlinks to all of the standard
David Chisnall [Wed, 4 Sep 2013 15:02:14 +0000 (15:02 +0000)]
Add a c++/v1/tr1 include directory containing symlinks to all of the standard
headrs.

Lots of third-party code expects to find C++03 headers under tr1 because that's
where GNU decided to hide them.  This should fix ports that expect them there.

MFC after: 1 week

10 years agoTrim a couple of panic messages.
John Baldwin [Wed, 4 Sep 2013 11:52:28 +0000 (11:52 +0000)]
Trim a couple of panic messages.

10 years ago- Add myself as a src committer
Ruslan Bukin [Wed, 4 Sep 2013 11:28:47 +0000 (11:28 +0000)]
- Add myself as a src committer
- Note cognet is my mentor

Approved by: cognet (mentor)

10 years agoMake default cache size more modern.
Gleb Smirnoff [Wed, 4 Sep 2013 10:17:50 +0000 (10:17 +0000)]
Make default cache size more modern.

Requested by: Slawa Olhovchenkov <slw zxy.spb.ru>

10 years agoFix hwpmc(4) for 32-bit PowerPC.
Justin Hibbits [Wed, 4 Sep 2013 04:11:38 +0000 (04:11 +0000)]
Fix hwpmc(4) for 32-bit PowerPC.