aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* Add -p to the example (why isn't this the default?)Dag-Erling Smørgrav2014-02-061-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=261542
* Add an example of the most common use case.Dag-Erling Smørgrav2014-02-051-1/+7
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=261511
* Add support for FreeBSD/i386 guests under bhyve.John Baldwin2014-02-051-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Similar to the hack for bootinfo32.c in userboot, define _MACHINE_ELF_WANT_32BIT in the load_elf32 file handlers in userboot. This allows userboot to load 32-bit kernels and modules. - Copy the SMAP generation code out of bootinfo64.c and into its own file so it can be shared with bootinfo32.c to pass an SMAP to the i386 kernel. - Use uint32_t instead of u_long when aligning module metadata in bootinfo32.c in userboot, as otherwise the metadata used 64-bit alignment which corrupted the layout. - Populate the basemem and extmem members of the bootinfo struct passed to 32-bit kernels. - Fix the 32-bit stack in userboot to start at the top of the stack instead of the bottom so that there is room to grow before the kernel switches to its own stack. - Push a fake return address onto the 32-bit stack in addition to the arguments normally passed to exec() in the loader. This return address is needed to convince recover_bootinfo() in the 32-bit locore code that it is being invoked from a "new" boot block. - Add a routine to libvmmapi to setup a 32-bit flat mode register state including a GDT and TSS that is able to start the i386 kernel and update bhyveload to use it when booting an i386 kernel. - Use the guest register state to determine the CPU's current instruction mode (32-bit vs 64-bit) and paging mode (flat, 32-bit, PAE, or long mode) in the instruction emulation code. Update the gla2gpa() routine used when fetching instructions to handle flat mode, 32-bit paging, and PAE paging in addition to long mode paging. Don't look for a REX prefix when the CPU is in 32-bit mode, and use the detected mode to enable the existing 32-bit mode code when decoding the mod r/m byte. Reviewed by: grehan, neel MFC after: 1 month Notes: svn path=/head/; revision=261504
* Fix ! by not clearing not at the bottom of the loop.Warner Losh2014-02-051-2/+2
| | | | | | | | | Add a blank line Submitted by: bde (blank line) Notes: svn path=/head/; revision=261501
* Implement the '!' operator for files* files. It means 'include thisWarner Losh2014-02-042-5/+18
| | | | | | | | | only if the specified option is NOT specified.' Bump version because old config won't be able to cope with files* files that have this construct in them. Notes: svn path=/head/; revision=261493
* Convert the loop by gotos into a for loop to improve readability. IWarner Losh2014-02-031-124/+122
| | | | | | | | | did this only with the inner loop for the token parsing, and not the outer loop which was understandable enough when the extra layers of looping went away... Notes: svn path=/head/; revision=261446
* Fix a bug introduced in r261437 that failed to honor "optionalWarner Losh2014-02-031-5/+6
| | | | | | | | profiling-routine" to work, since profiling-routine is not really an option or a device, but a special case elsewhere in the code. Notes: svn path=/head/; revision=261445
* Slight cleanup to the error messaging to compress code vertically...Warner Losh2014-02-031-57/+38
| | | | Notes: svn path=/head/; revision=261444
* Better error messages when EOF is hit in the middle of a phrase.Warner Losh2014-02-031-18/+6
| | | | Notes: svn path=/head/; revision=261442
* Move the check for standard keyword + optional inclusion specifier toWarner Losh2014-02-031-6/+6
| | | | | | | | | its proper location. Otherwise you could have 'file.c standard pci' without an error. This construct isn't in our tree, and has no well defined meaning. Notes: svn path=/head/; revision=261438
* Don't believe we have a requirement until after we've checked all theWarner Losh2014-02-031-1/+1
| | | | | | | | known key words. This will make error messages slightly better in weird corner cases, but should otherwise be a nop. Notes: svn path=/head/; revision=261437
* In the 17 years since r30796, the mandatory keyword has never been usedWarner Losh2014-02-031-16/+4
| | | | | | | in any files as far as I can tell, and is currently unused. Retire it. Notes: svn path=/head/; revision=261436
* Slightly deobfuscate read_file() and likely pessimize the runtimeWarner Losh2014-02-031-57/+49
| | | | | | | | | | performance by epsilon. (Translation: elminate bogus macros that hid 'returns' making it hard to read and moved a block of code inline rather than at the end of the fuction where it was effectively a 'gosub' kind of goto). Notes: svn path=/head/; revision=261435
* Fix newsyslog(8) to use the size of the file instead of the blocks itBryan Drewery2014-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | takes on disk, as advertised in newsyslog.conf(5). This fixes newsyslog(8) on ZFS with compression enabled to not have large files compared to the expected rotation size. # grep remotes/messages /etc/newsyslog.conf /var/log/remote/messages root:info 640 5 500 * JC # ls -alh /var/log/remote/messages -rw-r----- 1 root info 3.2M Jan 31 20:02 /var/log/remote/messages # newsyslog -vN|grep remote/messages /var/log/remote/messages <5J>: size (Kb): 464 [500] --> skipping # stat -f "st_size: %z st_blocks: %b" /var/log/remote/messages st_size: 3372627 st_blocks: 928 # zfs get -H compressratio zroot/syslogs zroot/syslogs compressratio 3.77x - With fix: # newsyslog -v | grep remote/messages /var/log/remote/messages <5J>: size (Kb): 3338 [500] --> trimming log.... Approved by: bapt (mentor) PR: docs/150877 Reported by: Joshua Isom <jrisom@gmail.com> MFC after: 2 weeks Notes: svn path=/head/; revision=261401
* Back out r261266 pending security buy-in.Jamie Gritton2014-01-311-11/+0
| | | | | | | | | | | r261266: Add a jail parameter, allow.kmem, which lets jailed processes access /dev/kmem and related devices (i.e. grants PRIV_IO and PRIV_KMEM_WRITE). This in conjunction with changing the drm driver's permission check from PRIV_DRIVER to PRIV_KMEM_WRITE will allow a jailed Xorg server. Notes: svn path=/head/; revision=261326
* Merge from CheriBSD:Brooks Davis2014-01-301-1/+5
| | | | | | | | | | | | | | commit 2d581e8caf79d7a0f5a24590eccd06da90cccb74 Author: Brooks Davis <brooks@one-eyed-alien.net> Date: Mon Jan 27 22:57:51 2014 +0000 Add WITHOUT_FMTREE to disable building fmtree. MFC after: 4 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=261299
* Merge from CheriBSD:Brooks Davis2014-01-303-9/+2
| | | | | | | | | | | | | | | commit 70b8f0c127db6b80411789d237b403cc64a93573 Author: Brooks Davis <brooks@one-eyed-alien.net> Date: Mon Jan 27 22:53:57 2014 +0000 Move mtree.5 to usr.sbin/nmtree. Remove note that mtree 2.0 format files aren't supported. MFC after: 4 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=261298
* Merge from CheriBSD:Brooks Davis2014-01-302-16/+4
| | | | | | | | | | | | | | | commit 6b569451b92c48ccf1768da32e7e89189e1aa253 Author: Brooks Davis <brooks@one-eyed-alien.net> Date: Mon Jan 27 22:50:46 2014 +0000 Always install nmtree as mtree. For compability, link mtree to nmtree. X-MFC after: never Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=261297
* Merge from CheriBSD:Brooks Davis2014-01-304-8/+48
| | | | | | | | | | | | | | | | commit c1acf022c533c5ae27e0cd556977eafe3f5959eb Author: Brooks Davis <brooks@one-eyed-alien.net> Date: Fri Jan 17 21:46:44 2014 +0000 Add an option WITHOUT_NCURSESW to suppress building and linking to libncursesw. While wide character support it useful we'd like to only need one ncurses library on embedded systems. MFC after: 4 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=261296
* Enhance the support for PCI legacy INTx interrupts and enable them inJohn Baldwin2014-01-2912-120/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the virtio backends. - Add a new ioctl to export the count of pins on the I/O APIC from vmm to the hypervisor. - Use pins on the I/O APIC >= 16 for PCI interrupts leaving 0-15 for ISA interrupts. - Populate the MP Table with I/O interrupt entries for any PCI INTx interrupts. - Create a _PRT table under the PCI root bridge in ACPI to route any PCI INTx interrupts appropriately. - Track which INTx interrupts are in use per-slot so that functions that share a slot attempt to distribute their INTx interrupts across the four available pins. - Implicitly mask INTx interrupts if either MSI or MSI-X is enabled and when the INTx DIS bit is set in a function's PCI command register. Either assert or deassert the associated I/O APIC pin when the state of one of those conditions changes. - Add INTx support to the virtio backends. - Always advertise the MSI capability in the virtio backends. Submitted by: neel (7) Reviewed by: neel MFC after: 2 weeks Notes: svn path=/head/; revision=261268
* Add a jail parameter, allow.kmem, which lets jailed processes accessJamie Gritton2014-01-291-0/+11
| | | | | | | | | | | | /dev/kmem and related devices (i.e. grants PRIV_IO and PRIV_KMEM_WRITE). This in conjunction with changing the drm driver's permission check from PRIV_DRIVER to PRIV_KMEM_WRITE will allow a jailed Xorg server. Submitted by: netchild MFC after: 1 week Notes: svn path=/head/; revision=261266
* o Fix typo, sort .Xrs.Maxim Konovalov2014-01-281-3/+3
| | | | | | | | | PR: docs/186191 Submitted by: Andrew (typo fix) MFC after: 1 week Notes: svn path=/head/; revision=261229
* Remove support for legacy PCI devices. These haven't been needed sinceJohn Baldwin2014-01-275-55/+10
| | | | | | | | | | support for LPC uart devices was added and it conflicts with upcoming patches to add PCI INTx support. Reviewed by: neel Notes: svn path=/head/; revision=261217
* Bad timespec_subtract() calculations produce negative tv_nsec on i386Andrey A. Chernov2014-01-251-20/+7
| | | | | | | | | | | | | which cause EINVAL returned from nanosleep() which cause loop in cron_sleep() and making all cron jobs to start about 30 seconds earlier (which cause f.e. logfiles rotation by newsyslog delayed by 1 hour). Use simple and proved calculations from kernel's timespecsub() instead. MFC after: 3 days Notes: svn path=/head/; revision=261146
* Generate /var/db/services.db during 'make distribution' so that it isJohn Baldwin2014-01-222-2/+4
| | | | | | | | | | | present during new installs. Update etcupdate and mergemaster to ignore the generated file. Tested by: gjb (release build) MFC after: 1 month Notes: svn path=/head/; revision=261031
* Similar to cap_mkdb(1), add endianness support to services_mkdb(1)John Baldwin2014-01-223-4/+27
| | | | | | | to support cross-builds once this is invoked during releases. Notes: svn path=/head/; revision=261030
* Fix issue with stale fields from a recycled request pulled off the freelist.Tycho Nightingale2014-01-221-0/+2
| | | | | | | Approved by: grehan (co-mentor) Notes: svn path=/head/; revision=261000
* Increase the block-layer backend maximum number of requests to matchTycho Nightingale2014-01-221-1/+1
| | | | | | | | | | the AHCI command queue depth. This allows a slew of commands issued by a Linux guest to be absorbed without error. Approved by: grehan (co-mentor) Notes: svn path=/head/; revision=260999
* Add check for "hw.usb.no_pf" sysctl value.Hans Petter Selasky2014-01-211-0/+20
| | | | | | | | Submitted by: Warren Block <wblock@wonkity.com> MFC after: 1 week Notes: svn path=/head/; revision=260978
* Implicit include of sys/queue.h instead of relying on gelf.h/libelf.h to ↵Baptiste Daroussin2014-01-201-0/+1
| | | | | | | | | | | | bring it Newer version of gelf.h and libelf.h does not include sys/queue.h anymore Submitted by: kaiw MFC after: 3 days Notes: svn path=/head/; revision=260942
* Add support for displaying VPD for PCI devices via pciconf.John Baldwin2014-01-202-8/+95
| | | | | | | | | | | | | | | - Store the length of each read-only VPD value since not all values are guaranteed to be ASCII values (though most are). - Add a new pciio ioctl to fetch VPD for a single PCI device. The values are returned as a list of variable length records, one for the device name and each keyword. - Add a new -V flag to pciconf's list mode which displays VPD data for each device. MFC after: 1 week Notes: svn path=/head/; revision=260926
* - Allow PCI devices that are attached to a driver to be identified by theirJohn Baldwin2014-01-202-29/+130
| | | | | | | | | | | | | device name instead of just the selector. - Accept an optional device argument to -l to restrict the output to only listing details about a single device. This is mostly useful in conjunction with other flags like -e or -c to allow a user to query details about a single device. MFC after: 1 week Notes: svn path=/head/; revision=260910
* Dummy commit (whitespace changes and style nits) to show previous commitDevin Teske2014-01-201-4/+6
| | | | | | | | | | | (SVN r260866) was [in-part] Submitted-by: Christoph Mallon ... <christoph.mallon@gmx.de> MFC After: 3 days X-MFC-With: r260866 Notes: svn path=/head/; revision=260900
* Dummy commit (s/__num/__number/) in f_expand_number() to describe that theDevin Teske2014-01-201-13/+11
| | | | | | | | | | previous commit here (SVN r260894) was [in-part] from Submitted-by: Christoph Mallon <christoph.mallon@gmx.de> MFC after: 3 days Notes: svn path=/head/; revision=260899
* Optimize f_expand_number(), improving performance.Devin Teske2014-01-191-24/+6
| | | | | | | MFC After: 3 days Notes: svn path=/head/; revision=260894
* Fix a bad comparison operator (s/==/=/), and address a use-case issue where-Devin Teske2014-01-181-8/+6
| | | | | | | | | | | in the one-line comment associated with the dumpdev setting was not present for the case where the user deselects the dumpdev service (restoring pre- r256348 behaviour. MFC After: 3 days Notes: svn path=/head/; revision=260866
* Fix amd64 build breakage caused by r260532.Neel Natu2014-01-111-4/+3
| | | | | | | | Submitted by: Marcus Karlsson (mk@acc.umu.se) Pointy hat to: me Notes: svn path=/head/; revision=260550
* Fix issue with the virtio descriptor region being truncatedPeter Grehan2014-01-091-1/+1
| | | | | | | | | | | | | if it was above 4GB. This was seen with CentOS 6.5 guests with large RAM, since the block drivers are loaded late in the boot sequence and end up allocating descriptor memory from high addresses. Reported by: Michael Dexter MFC after: 3 days Notes: svn path=/head/; revision=260469
* virtio-block does not exist, the correct name is virtio-blk.Remko Lodder2014-01-081-1/+1
| | | | | | | | | | PR: 185573 Submitted by: Allan Jude Facilitated by: Snow B.V. MFC after: 3 days Notes: svn path=/head/; revision=260446
* Split the last gcc-specific flags off into CFLAGS.gcc. This alsoDimitry Andric2014-01-051-1/+1
| | | | | | | | | | removes the need to use -Qunused-arguments for clang throughout the tree. MFC after: 3 days Notes: svn path=/head/; revision=260334
* Allow bsdinstall to use WPA-Enterprise networks when installing. ThisGavin Atkinson2014-01-041-0/+23
| | | | | | | | | | | | | | | | only allows basic username/password config, and does not provide the ability to set any of the other WPA options. Regardless, this is generally sufficient to associate. Perhaps in the future this could allow full configuring (e.g. being able to set "anonymous identity", and perhaps some of the more obscure WPA options), though perhaps that will better belong in bsdconfig when that grows wlan config ability. MFC after: 1 week Notes: svn path=/head/; revision=260262
* Lower the priority of the "connect to any open wireless network" networkGavin Atkinson2014-01-041-1/+1
| | | | | | | | | | description, so guaranteeing that any other defined network will be tried first. MFC after: 1 week Notes: svn path=/head/; revision=260261
* Remove what appears to be a stray debugging printf.Gavin Atkinson2014-01-041-1/+0
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=260260
* Make a copy instead using constant string directly when assigning to char *.Xin LI2014-01-041-7/+3
| | | | | | | While I'm there also remove a few prototypes that are unused. Notes: svn path=/head/; revision=260251
* Use prototype.Xin LI2014-01-042-145/+48
| | | | Notes: svn path=/head/; revision=260250
* Cosmetic change - switch over to vertical SRCS to make itPeter Grehan2014-01-031-5/+31
| | | | | | | | | easier to keep files in alpha order. Reviewed by: neel Notes: svn path=/head/; revision=260239
* Rework the DSDT generation code a bit to generate more accurate info aboutJohn Baldwin2014-01-0212-115/+417
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LPC devices. Among other things, the LPC serial ports now appear as ACPI devices. - Move the info for the top-level PCI bus into the PCI emulation code and add ResourceProducer entries for the memory ranges decoded by the bus for memory BARs. - Add a framework to allow each PCI emulation driver to optionally write an entry into the DSDT under the \_SB_.PCI0 namespace. The LPC driver uses this to write a node for the LPC bus (\_SB_.PCI0.ISA). - Add a linker set to allow any LPC devices to write entries into the DSDT below the LPC node. - Move the existing DSDT block for the RTC to the RTC driver. - Add DSDT nodes for the AT PIC, the 8254 ISA timer, and the LPC UART devices. - Add a "SuperIO" device under the LPC node to claim "system resources" aling with a linker set to allow various drivers to add IO or memory ranges that should be claimed as a system resource. - Add system resource entries for the extended RTC IO range, the registers used for ACPI power management, the ELCR, PCI interrupt routing register, and post data register. - Add various helper routines for generating DSDT entries. Reviewed by: neel (earlier version) Notes: svn path=/head/; revision=260206
* Restructure the VMX code to enter and exit the guest. In large part this changeNeel Natu2014-01-012-2/+6
| | | | | | | | | | | | | | | | hides the setjmp/longjmp semantics of VM enter/exit. vmx_enter_guest() is used to enter guest context and vmx_exit_guest() is used to transition back into host context. Fix a longstanding race where a vcpu interrupt notification might be ignored if it happens after vmx_inject_interrupts() but before host interrupts are disabled in vmx_resume/vmx_launch. We now called vmx_inject_interrupts() with host interrupts disabled to prevent this. Suggested by: grehan@ Notes: svn path=/head/; revision=260167
* Add mibs for hastd(1) queue stats.Mikolaj Golub2013-12-293-1/+88
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=260049
* Record the IEEE P1282 Rock Ridge version 1.12 POSIX File Serial Number,Marius Strobl2013-12-292-3/+4
| | | | | | | | | | | | | | i. e. the POSIX:5.6.1 st_ino field, which can be used to detect hard links in the file system. This is also the default in mkisofs(8) and according to its man page, no system only being able to cope with Rock Ridge version 1.10 is known to exist. PR: 185138 Submitted by: Kurt Lidl MFC after: 1 week Notes: svn path=/head/; revision=260041