summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* The command name is a constant, use the correct type.andrew2014-10-311-3/+3
| | | | MFC after: 1 week
* Clean up the types of a few strings to make them const when they are neverandrew2014-10-311-6/+7
| | | | written to.
* Add type qualifier volatile to the base (userspace) address argumentkib2014-10-316-93/+77
| | | | | | | | | | | 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
* Use macro ERROUT() to make code more laconic and follow style of otherglebius2014-10-311-24/+15
| | | | | | netgraph code. Submitted by: Dmitry Luhtionov <dmitryluhtionov gmail.com>
* Remove the check for packets with broadcast source from if_gif's encapcheck.ae2014-10-311-14/+0
| | | | | | | | | | | | 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
* Fix usage of kern_getenv().kevlo2014-10-311-1/+3
|
* Add /etc/rc.d/initrandom, which was removed in r273872.des2014-10-311-0/+2
| | | | Noticed by: ache@
* Print human-readable error for "route not found" case.melifaro2014-10-311-2/+11
| | | | | | Submitted by: vsevolod (initial version) MFC after: 2 weeks Sponsored by: Yandex LLC
* Use in_localip() instead of handmade implementation.ae2014-10-311-21/+2
| | | | | MFC after: 1 week Sponsored by: Yandex LLC
* Fix typo.ae2014-10-311-1/+1
|
* Build ttm_agp_backend.c.tijl2014-10-311-1/+1
| | | | | Reported by: dumbbell MFC after: 1 month
* filedesc: drop retval argument from do_dupmjg2014-10-311-17/+14
| | | | | | It was almost always td_retval anyway. For the one case where it is not, preserve the old value across the call.
* Only put one CTASSERT() inside each macro to avoid compile issues.hselasky2014-10-311-25/+25
| | | | | | | | | 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
* filedesc: fix missed comments about fdsetugidsafetymjg2014-10-312-5/+3
| | | | | While here just note that both fdsetugidsafety and fdcheckstd take sleepable locks.
* Build mount_nfs(8) with WARNS=6.trasz2014-10-312-50/+59
| | | | | | Reviewed by: rmacklem@ MFC after: 1 month Sponsored by: The FreeBSD Foundation
* filedesc: make fdinit return with source filedesc locked and new one sizedmjg2014-10-311-32/+45
| | | | | | | | | | | | | | appropriately Assert FILEDESC_XLOCK_ASSERT only for already used tables in fdgrowtable. We don't have to call it with the lock held if we are just creating new filedesc. As a side note, strictly speaking processes can have fdtables with fd_lastfile = -1, but then they cannot enter fdgrowtable. Very first file descriptor they get will be 0 and the only syscall allowing to choose fd number requires an active file descriptor. Should this ever change, we can add an 'init' (or similar) parameter to fdgrowtable.
* filedesc: iterate over fd table only once in fdcopymjg2014-10-311-21/+21
| | | | | | | | | While here add 'fdused_init' which does not perform unnecessary work. Drop FILEDESC_LOCK_ASSERT from fdisused and rely on callers to hold it when appropriate. This function is only used with INVARIANTS. No functional changes intended.
* filedesc: tidy up fdfreemjg2014-10-311-22/+14
| | | | | | Implement fdefree_last variant and get rid of 'last' parameter. No functional changes.
* filedesc: tidy up fdcopy a little bitmjg2014-10-311-3/+4
| | | | | | | | | | | | Test for file availability by fde_file != NULL instead of fdisused, this is consistent with similar checks later. Drop badfileops check. badfileops don't have DFLAG_PASSABLE set, so it was never reached in practice. fdiused is now only used in some KASSERTS, so ifdef it under INVARIANTS. No functional changes.
* Use search method instead of fixed offsets for finding rootfs. This unbreakshiren2014-10-301-3/+3
| | | | | | | recent images for picostation by allowing to find rootfs at correct location. Suggested by: loos MFC after: 1 month
* Bump FreeBSD_version due to syscall*_register API changes in r273707mjg2014-10-301-1/+1
|
* Use the right depend file for each program.jmmv2014-10-301-2/+6
| | | | | | | | | | | bsd.progs.mk generates a separate depend file for every program being built, but then it does not properly tell each submake to use those individual files. Properly propagate the depend file to use. Discovered while preparing the update of atf to 0.21 and noticing that the test programs were not being relinked to the new library. This change is "make tinderbox" clean.
* This is the much-discussed major upgrade to the random(4) device, known to ↵markm2014-10-3049-1524/+2460
| | | | | | | | | | | | | | | | | | | you all as /dev/random. This code has had an extensive rewrite and a good series of reviews, both by the author and other parties. This means a lot of code has been simplified. Pluggable structures for high-rate entropy generators are available, and it is most definitely not the case that /dev/random can be driven by only a hardware souce any more. This has been designed out of the device. Hardware sources are stirred into the CSPRNG (Yarrow, Fortuna) like any other entropy source. Pluggable modules may be written by third parties for additional sources. The harvesting structures and consequently the locking have been simplified. Entropy harvesting is done in a more general way (the documentation for this will follow). There is some GREAT entropy to be had in the UMA allocator, but it is disabled for now as messing with that is likely to annoy many people. The venerable (but effective) Yarrow algorithm, which is no longer supported by its authors now has an alternative, Fortuna. For now, Yarrow is retained as the default algorithm, but this may be changed using a kernel option. It is intended to make Fortuna the default algorithm for 11.0. Interested parties are encouraged to read ISBN 978-0-470-47424-2 "Cryptography Engineering" By Ferguson, Schneier and Kohno for Fortuna's gory details. Heck, read it anyway. Many thanks to Arthur Mesh who did early grunt work, and who got caught in the crossfire rather more than he deserved to. My thanks also to folks who helped me thresh this out on whiteboards and in the odd "Hallway track", or otherwise. My Nomex pants are on. Let the feedback commence! Reviewed by: trasz,des(partial),imp(partial?),rwatson(partial?) Approved by: so(des)
* Skip the smap sysctl instead of panicing if no kernel metadata can bejhb2014-10-301-0/+2
| | | | | | | found. Submitted by: bde MFC after: 3 days
* Fix compile warning by removing unused variable.hselasky2014-10-301-3/+0
| | | | | MFC: 3 days Sponsored by: Mellanox Technologies
* Plug memory ordering holes in buf_ring_enqueue. For at least somejpaetzel2014-10-301-33/+16
| | | | | | | | | | users this patch eliminates the races previously discussed on the mailing list. Submitted by: oleg Reviewed by: kmacy MFC after: 2 weeks Tested by: kmacy,rpaulo
* Make UEFI booting of 4Kn disks work:ambrisko2014-10-303-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | - convert boot1.efi to corrrectly calculate the lba for what the media reports and convert the size based on what FreeBSD uses. The existing code would use the 512 byte lba and convert the size using 4K byte size. - make fsck_msdosfs read the boot block as 4K so the read doesn't fail on a 4Kn drive since FreeBSD will error out parition reads of a block. Make the bpbBytesPerSec check a multiple of 512 since it can be 512 or 4K depending on the disk. This allows fsck to pass checking the EFI partition on a 4Kn disk. To create the EFI file system I used: newfs_msdos -F 32 -S 4096 -c 1 -m 0xf8 <partition> This works for booting 512 and 4Kn disks. Caveat is that loader.efi cannot read the 4Kn EFI partition. This isn't critical right now since boot1.efi will read loader.efi from the ufs partition. It looks like loader.efi can be fixed via making some of the 512 bytes reads more flexible. loader.efi doesn't have trouble reading the ufs partition. This is probably a simple fix. I now have FreeBSD installed on a system with 4Kn drives and tested the same code works on 512. MFC after: 1 week
* Avoid possible overflow in agp_generic_alloc_memory.tijl2014-10-301-1/+1
| | | | MFC after: 1 week
* Port the TTM AGP backend to the FreeBSD agp driver and enable AGP supporttijl2014-10-307-60/+55
| | | | | | | | | | | | | | | in the radeonkms driver. Note: In PCI mode virtual addresses on the graphics card that map to system RAM are translated to physical addresses by the graphics card itself. In AGP mode address translation is done by the AGP chipset so fictitious addresses appear on the system bus. For the CPU cache management to work correctly when the CPU accesses this memory it needs to use the same fictitious addresses (and let the chipset translate them) instead of using the physical addresses directly. Reviewed by: kib MFC after: 1 month
* Remove two functions unused after r273848. Would be nice if clangtrasz2014-10-301-29/+0
| | | | | | | or at least scan-build yelled about it. MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Remove redundant code.ae2014-10-301-65/+4
| | | | | | | | if_detach already did these steps. Also, now we didn't keep routes to link-local addresses. Obtained from: Yandex LLC Sponsored by: Yandex LLC
* Move ifq drain into in6m_purge().ae2014-10-301-3/+2
| | | | | | Suggested by: bms MFC after: 1 week Sponsored by: Yandex LLC
* Add two new functions to the AGP driver KPI to bind/unbind arbitrary setstijl2014-10-302-0/+86
| | | | | | | of pages into the GTT. Reviewed by: kib MFC after: 1 month
* Fix mbuf leak in IPv6 multicast code.ae2014-10-301-0/+3
| | | | | | | | | | | | When multicast capable interface goes away, it leaves multicast groups, this leads to generate MLD reports, but MLD code does deffered send and MLD reports are queued in the in6_multi's in6m_scq ifq. The problem is that in6_multi structures are freed when interface leaves multicast groups and thread that does deffered send will not take these queued packets. PR: 194577 MFC after: 1 week Sponsored by: Yandex LLC
* Update acl(3) to expand on NFSv4 ACL support.trasz2014-10-301-5/+9
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Make it clear that ACL flags are NFSv4-only.trasz2014-10-307-14/+14
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Fix handling of "conn" mount_nfs(8) option.trasz2014-10-301-1/+1
| | | | | | Reviewed by: rmacklem@ MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Note that the "timeout" nfs option is in tenths of a second.trasz2014-10-301-1/+2
| | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Fix a race condition in TCP timewait between tcp_tw_2msl_reuse() andjch2014-10-305-68/+93
| | | | | | | | | | | | | | tcp_tw_2msl_scan(). This race condition drives unplanned timewait timeout cancellation. Also simplify implementation by holding inpcb reference and removing tcptw reference counting. Differential Revision: https://reviews.freebsd.org/D826 Submitted by: Marc De la Gueronniere <mdelagueronniere@verisign.com> Submitted by: jch Reviewed By: jhb (mentor), adrian, rwatson Sponsored by: Verisign, Inc. MFC after: 2 weeks X-MFC-With: r264321
* Add support for "timeo", "actimeo", "noac", and "proto" optionstrasz2014-10-303-7/+80
| | | | | | | | | to mount_nfs(8). They are implemented on Linux, OS X, and Solaris, and thus can be expected to appear in automounter maps. Reviewed by: rmacklem@ MFC after: 1 month Sponsored by: The FreeBSD Foundation
* Get rid of obsolete code in mount_nfs(8).trasz2014-10-301-217/+2
| | | | | Reviewed by: rmacklem@ Sponsored by: The FreeBSD Foundation
* filedesc: make sure to force table reload in fget_unlocked when count == 0mjg2014-10-301-1/+6
| | | | This is a fixup to r273843.
* fix spelling of offset since that is what is used in the body...jmg2014-10-301-3/+3
|
* filedesc: microoptimize fget_unlocked by retrying obtaining reference countmjg2014-10-301-4/+3
| | | | | | | without restarting whole lookup Restart is only needed when fp was closed by current process, which is a much rarer event than ref/deref by some other thread.
* filedesc: get rid of atomic_load_acq_int from fget_unlockedmjg2014-10-302-40/+56
| | | | | | | | | | | | | A read barrier was necessary because fd table pointer and table size were updated separately, opening a window where fget_unlocked could read new size and old pointer. This patch puts both these fields into one dedicated structure, pointer to which is later atomically updated. As such, fget_unlocked only needs data a dependency barrier which is a noop on all supported architectures. Reviewed by: kib (previous version) MFC after: 2 weeks
* .a's are installed in /usr/lib, don't delete them.delphij2014-10-291-1/+0
|
* Fix a clang 3.5 warning about abs(3) being given an argument of typedim2014-10-291-5/+5
| | | | | | | | | quad_t in setusercontext(). While here, sanitize the clamping of the priority value, and use the correct type for the return value of login_getcapnum(). Reviewed by: kib MFC after: 3 days
* Replace a magic number with the proper definition. This change actuallyjkim2014-10-291-2/+2
| | | | | fixes broken state field after r273266, i.e., "CPU-1" was displayed in place of "RUN".
* Rework the EXAMPLES section to be a bit clearer.jhb2014-10-291-6/+58
| | | | | | | | | | | | - Add an example of using etcupdate diff. - Create a subsection on bootstrapping that is below the simple examples. This should make it clearer that 'etcupdate extract' is a one-time operation and not part of the common workflow. It also adds more suggestions on when bootstrapping is needed and additional steps to make future merges simpler. Reviewed by: adrian MFC after: 3 days
* Fix iscsictl(8) and ctld(8) to correctly handle Windows newlinestrasz2014-10-292-0/+2
| | | | | | | (CRLF) in iscsi.conf and ctl.conf. MFC after: 1 month Sponsored by: The FreeBSD Foundation
OpenPOWER on IntegriCloud