summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add __generic(), to be able to use a very simple _Generic().Ed Schouten2012-01-051-0/+18
| | | | | | | | | Already introducing this allows us to be forward compatible with C11 compilers. By implementing <tgmath.h> on top of this interface, it becomes trivial to support both our existing GCC and newer compilers. Notes: svn path=/head/; revision=229574
* Add new pw_make_v7 to make a passwd line (in v7 format) out of a struct passwdBaptiste Daroussin2012-01-052-1/+16
| | | | | | | | | while here, fix missing parentheses of the return statement of pw_make. Approved by: des (mentor) Notes: svn path=/head/; revision=229572
* Change index() and rindex() to a weak alias.Ed Schouten2012-01-056-6/+6
| | | | | | | | | | | This allows people to still write statically linked applications that call strchr() or strrchr() and have a local variable or function called index. Discussed with: bde@ Notes: svn path=/head/; revision=229571
* Also import WEAK_ALIAS() from the MIPS code.Ed Schouten2012-01-051-0/+7
| | | | Notes: svn path=/head/; revision=229562
* This isn't required any longer - it turns out the flashAdrian Chadd2012-01-051-13/+4
| | | | | | | | has ~ 1.7MB of space for a kernel. There's thus plenty of space for a full, non-module kernel. Notes: svn path=/head/; revision=229561
* Re-enable this bit of logic from before, which only sets a defaultAdrian Chadd2012-01-051-0/+2
| | | | | | | | | | | | opt_ah.h file if KERNBUILDDIR isn't defined. For now, AH_SUPPORT_AR5416 is required, so I'll just fix any configuration file in /usr/src which is missing this option. Pointy hat when things do break to: adrian Notes: svn path=/head/; revision=229560
* Use geom_uncompress now, rather than geom_uzip.Adrian Chadd2012-01-051-4/+4
| | | | | | | | This results in a much smaller rootfs image and it easily fits in the 8MB flash. Notes: svn path=/head/; revision=229556
* Mark a couple of file local functions static and stop exporting them.Bjoern A. Zeeb2012-01-052-6/+6
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=229547
* Convert an #ifdef DIAGNOSTIC if/panic to a KASSERT.Bjoern A. Zeeb2012-01-051-6/+2
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=229546
* mkulzma used to create lzma compressed images, just like mkuzip do.Aleksandr Rybalko2012-01-043-0/+445
| | | | | | | Approved by: adrian (mentor) Notes: svn path=/head/; revision=229538
* GEOM_UNCOMPRESS module, can be used with uzip images and with new ulzma images.Aleksandr Rybalko2012-01-044-6/+695
| | | | | | | Approved by: adrian (mentor) Notes: svn path=/head/; revision=229537
* Update contrib/xz-embedded to build with new GEOM_UNCOMPRESS module.Aleksandr Rybalko2012-01-046-1/+177
| | | | | | | Approved by: adrian (mentor) Notes: svn path=/head/; revision=229533
* now picobsd cross builds work (tried with host amd64, target i386 ).Luigi Rizzo2012-01-041-19/+27
| | | | | | | | | | The fix involved adding a proper build of ld-elf.so.1 , and also replacing ldd with objdump (suggested by Garrett Cooper) to build the list of shared libraries needed by the binaries and libraries on the target. Notes: svn path=/head/; revision=229532
* Add missing -w to kgdb(1)'s usage().Robert Watson2012-01-041-1/+1
| | | | | | | | Sponsored by: Adara Networks, Inc. MFC after: 3 days Notes: svn path=/head/; revision=229521
* Fix 'make clean' for this module so it cleans up the generated gssd.h.John Baldwin2012-01-041-0/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=229519
* Adjust the VLAN section of the ifconfig(8) man page to better reflectRobert Watson2012-01-041-4/+5
| | | | | | | | | | | | | | | reality: 1. Only 12-bit VLAN Identifiers, not full 16-bit VLAN tags can be set using ifconfig vlan. 2. When we mean VLAN Identifiers, spell it that way, rather than as VLAN tag. MFC after: 3 days Sponsored by: Adara Networks, Inc. Notes: svn path=/head/; revision=229518
* Quiet down clang -Werror.Pedro F. Giffuni2012-01-041-2/+2
| | | | | | | | Reported by: Pawel Worach Approved by: jhb (mentor) Notes: svn path=/head/; revision=229516
* remove some stale options (such as running without /boot/loader)Luigi Rizzo2012-01-042-72/+55
| | | | | | | | | | improve support for multi-arch and cross-arch builds, by adding a suffix to the kernel config file and build_directory. (cross builds not clean yet, a cross-built kernel boots but fails when starting /sbin/init) Notes: svn path=/head/; revision=229511
* Postpone the resolution of IRELATIVE relocations and IFUNC-targetedKonstantin Belousov2012-01-041-4/+5
| | | | | | | | | | | | | relocations until tls is initialized and stacks permissions correctly set. This allows the ifunc to call malloc(3) and some other heavy services. Add debug banner. MFC after: 3 days Notes: svn path=/head/; revision=229508
* Apply the same change as in r229494.Andreas Tobler2012-01-041-3/+11
| | | | | | | Requested by: ed Notes: svn path=/head/; revision=229496
* Do not restart the scan in vm_object_page_clean() on the objectKonstantin Belousov2012-01-041-4/+12
| | | | | | | | | | | | | | | generation change if requested mode is async. The object generation is only changed when the object is marked as OBJ_MIGHTBEDIRTY. For async mode it is enough to write each dirty page, not to make a guarantee that all pages are cleared after the vm_object_page_clean() returned. Diagnosed by: truckman Tested by: flo Reviewed by: alc, truckman MFC after: 2 weeks Notes: svn path=/head/; revision=229495
* Introduce internal macros for __U/INT64_C to define the U/INT64_MAX/MINAndreas Tobler2012-01-041-3/+11
| | | | | | | | values properly. The previous definition only worked if __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS were defined at the same time. Notes: svn path=/head/; revision=229494
* Use the mli_relinmhead list normally used to defer calls toJohn Baldwin2012-01-041-21/+29
| | | | | | | | | | | | | in6m_release_locked() to defer calls to mld_v1_transmit_report() until after the IF_ADDR_LOCK is dropped. This removes a race where the lock is dropped and reacquired while attempting to walk an interface's address list. Reviewed by: bz MFC after: 1 week Notes: svn path=/head/; revision=229479
* Use a helper variable to wrap a long line.John Baldwin2012-01-041-1/+2
| | | | Notes: svn path=/head/; revision=229478
* In the handling of the SIOC[DG]LIFADDR icotls in in_lifaddr_ioctl(), addJohn Baldwin2012-01-041-0/+6
| | | | | | | | | | | | missing interface address list locking and grab a reference on the matching interface address after dropping the lock while it is used to avoid a potential use after free. Reviewed by: bz MFC after: 1 week Notes: svn path=/head/; revision=229477
* Fix the SIOC[DG]LIFADDR ioctls in in_lifaddr_ioctl() to work with IPv4John Baldwin2012-01-041-3/+3
| | | | | | | | | | | interface address rather than IPv6. Submitted by: hrs Reviewed by: bz MFC after: 1 week Notes: svn path=/head/; revision=229476
* Update PMC events from October 2011 Intel documentation.Fabien Thomas2012-01-043-23/+17
| | | | | | | | Submitted by: Davide Italiano <davide.italiano@gmail.com> MFC after: 3 days Notes: svn path=/head/; revision=229470
* Add missing MSR programming for some events.Fabien Thomas2012-01-043-6/+61
| | | | | | | | Submitted by: Davide Italiano <davide.italiano@gmail.com> MFC after: 3 days Notes: svn path=/head/; revision=229469
* Add missing file permission to open(O_CREAT) call. This doesn't really matterPawel Jakub Dawidek2012-01-041-1/+1
| | | | | | | | here, as we open /dev/null for test purposes, but it is useful for consistency and further grepping for such bugs. Notes: svn path=/head/; revision=229468
* Add an missing argument to open(2). If O_CREAT flag is specified,Pawel Jakub Dawidek2012-01-041-1/+1
| | | | | | | file permission has to be specified as well. Notes: svn path=/head/; revision=229467
* Add an missing argument to open(2). If O_CREAT flag is specified,Pawel Jakub Dawidek2012-01-041-1/+1
| | | | | | | file permission has to be specified as well. Notes: svn path=/head/; revision=229466
* Use correct locking when traversing interface address list.Gleb Smirnoff2012-01-041-4/+2
| | | | | | | Reviewed by: bz Notes: svn path=/head/; revision=229465
* Add a couple more SPI flash device IDs found in commercialAdrian Chadd2012-01-041-0/+2
| | | | | | | | | consumer wireless kit. Submitted by: Stefan Bethke <stb@lassitu.de> Notes: svn path=/head/; revision=229464
* MFi386: revision 229435Yoshihiro Takahashi2012-01-041-31/+188
| | | | | | | | | | Add special loader environment variables 'comconsole_port' and 'comconsole_pcidev'. MFC after: 2 weeks Notes: svn path=/head/; revision=229463
* Fix 230MB MO support.Yoshihiro Takahashi2012-01-041-1/+1
| | | | | | | | Submitted by: Kaho Toshikazu MFC after: 1 week Notes: svn path=/head/; revision=229462
* Document the fact that chroot(2) is no longer part of POSIX since SUSv3Xin LI2012-01-041-1/+19
| | | | | | | and add a SECURITY CONSIDERATIONS section for recommended practices. Notes: svn path=/head/; revision=229459
* Simply disallow <stdnoreturn.h> to be used in combination with C++.Ed Schouten2012-01-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | There is no way one could possibly use this header file in combination with C++ code. The problem is that in C11 the `noreturn' macro expands to the `_Noreturn' function specifier, while in C++11 the `noreturn' keyword is an attribute. So in C11 you have to write: noreturn void exit(int status); While in C++11 you have to write: [[noreturn]] void exit(int status); It is impossible to #define noreturn for C++ in such a way that it allows both conventions. By intentionally breaking this header this way, we prevent people from using this header in their C++<11 sources. Notes: svn path=/head/; revision=229437
* Fix an obvious typo. We do want to specify file permission when we pass O_CREAT.Pawel Jakub Dawidek2012-01-031-1/+1
| | | | Notes: svn path=/head/; revision=229436
* Add special loader environment variables 'comconsole_port' andKonstantin Belousov2012-01-033-31/+195
| | | | | | | | | | | | | | | | | | | | | 'comconsole_pcidev'. The former allows to set the base address of the serial console i/o port. The later takes the string of the format 'bus:device:function:[bar]' as a value and uses the serial port attached as PCI device at the specified location for console. Both variants pass 'hw.uart.console' variable to the uart driver to properly hand-over the kernel console. Change allows to use ISA serial ports other than COM1 for the loader/kernel console without loader recompilation. Also, you can use PCI-attached port as the console, e.g. Intel AMT serial pseudo-port on some motherboards based on Q67 chipset. Reviewed by: jhb MFC after: 2 weeks Notes: svn path=/head/; revision=229435
* Do the vput() for the lowervp in the null_nodeget() for error case too.Konstantin Belousov2012-01-033-8/+6
| | | | | | | | | | | | Several callers of null_nodeget() did the cleanup itself, but several missed it, most prominent being null_bypass(). Remove the cleanup from the callers, now null_nodeget() handles lowervp free itself. Reported and tested by: pho MFC after: 1 week Notes: svn path=/head/; revision=229431
* Replace a GPL'd header in the emu10k1 snd driver code.Pedro F. Giffuni2012-01-034-248/+1009
| | | | | | | | | | | | | | This brings in the emuxkireg.h from NetBSD (dev/pci) which is used for the same purpose but is smaller. The emu10k1 is now free from the GPL. PR: 153901 Obtained from: NetBSD Approved by: core (mentor implicit) MFC after: 2 weeks Notes: svn path=/head/; revision=229430
* Some small fixes to CPU accounting for threads:John Baldwin2012-01-033-14/+19
| | | | | | | | | | | | | | | | | | | - Only initialize the per-cpu switchticks and switchtime in sched_throw() for the very first context switch on APs during boot. This avoids a small gap between the middle of thread_exit() and sched_throw() where time is not accounted to any thread. - In thread_exit(), update the timestamp bookkeeping to track the changes to mi_switch() introduced by td_rux so that the code once again matches the comment claiming it is mimicing mi_switch(). Specifically, only update the per-thread stats directly and depend on ruxagg() to update p_rux rather than adjusting p_rux directly. While here, move the timestamp bookkeeping as late in the function as possible. Reviewed by: bde, kib MFC after: 1 week Notes: svn path=/head/; revision=229429
* Document the state of the lowervp vnode for null_nodeget().Konstantin Belousov2012-01-031-0/+3
| | | | | | | | Tested by: pho MFC after: 1 week Notes: svn path=/head/; revision=229428
* Fix a few bugs in the SRAT parsing code:John Baldwin2012-01-031-5/+12
| | | | | | | | | | | | | | | | - Actually increment ndomain when building our list of known domains so that we can properly renumber them to be 0-based and dense. - If the number of domains exceeds the configured maximum (VM_NDOMAIN), bail out of processing the SRAT and disable NUMA rather than hitting an obscure panic later. - Don't bother parsing the SRAT at all if VM_NDOMAIN is set to 1 to disable NUMA (the default). Reported by: phk (2) MFC after: 1 week Notes: svn path=/head/; revision=229427
* In sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c, check theDimitry Andric2012-01-031-1/+1
| | | | | | | | | | | | the number of links against LINK_MAX (which is INT16_MAX), not against UINT32_MAX. Otherwise, the constant would implicitly be converted to -1. Reviewed by: pjd MFC after: 1 week Notes: svn path=/head/; revision=229425
* In sys/dev/qlxgb/qla_misc.c, fix a copy/paste issue. Clang complainedDimitry Andric2012-01-031-1/+1
| | | | | | | | | | | the variable 'val' was uninitialized when used. Instead, 'sig' should have been printed. Reviewed by: davidcs MFC after: 1 week Notes: svn path=/head/; revision=229423
* When cancelling multicast timers on an interface, don't release theJohn Baldwin2012-01-032-16/+13
| | | | | | | | | | | | | | | | | | | reference on a group in the leaving state while iterating over the loop. Instead, use the same approach used in igmp_ifdetach() and mld_ifdetach() of placing the groups to free on pending release list and then releasing the references after dropping the IF_ADDR_LOCK. This closes an ugly race where the code was dropping the lock in the middle of iterating over the list. It also fixes some additional potential use-after-free bugs since the cancellation routine also applied other changes to the group after dropping the reference. Now those changes are performed before the reference is dropped and the group is potentially freed. Prodded to fix by: glebius Reviewed by: bz MFC after: 1 week Notes: svn path=/head/; revision=229420
* Don't forget to release queue lock when allocation of memory failed.Xin LI2012-01-031-0/+1
| | | | | | | | | Submitted by: Sascha Wildner <saw online de> Obtained from: DragonFly MFC after: 2 weeks Notes: svn path=/head/; revision=229416
* Integrate the line drawing algorithm from the book "Graphic Gems 1".Pedro F. Giffuni2012-01-031-22/+191
| | | | | | | | | | | | | | http://www.graphicsgems.org/ At the time it claimed to be 3-4 times faster than the traditional algorithm. PR: 18769 Approved by: jhb (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=229415
* Grab a reference on the matching interface address (ifa) in the handlingJohn Baldwin2012-01-031-2/+10
| | | | | | | | | | | | of the SIOC[DG]LIFADDR icotls before dropping the IF_ADDR_LOCK() and release the reference after using it. This prevents the address from being potentially freed out from under the ioctl handler. Reviewed by: bz MFC after: 1 week Notes: svn path=/head/; revision=229414