summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Note that the .POSIX special target disables the "Remaking Makefiles" feature.obrien2008-06-271-0/+3
|
* Include <sys/pcpu.h> for curthread.dfr2008-06-271-0/+1
|
* Add the missing support for Asus Eee PC in acpi_asus(4).rpaulo2008-06-272-6/+131
| | | | | | | | | | | This includes hotkeys support and sysctl variables to control camera and card reader. These new sysctls don't have CTFLAG_ANYBODY set. While there add entries to devd.conf related to the Eee volume keys. Reviewed by: phillip MFC after: 1 week Also tested by: lme (previous version)
* Add USB ids for the Epson DX7400 / CX7300 multifunction scanner printerluigi2008-06-272-0/+2
| | | | | | | card reader. Tested operation of the scanner part with Sane, card and printer correctly recognised as /dev/da0 and /dev/ulpt0 MFC after: 3 days
* Support for filtering on major device number was removed in rev. 1.7 ormtm2008-06-271-2/+2
| | | | | | | rule.c. Update man page example accordingly. Submitted by: Mateusz Guzik <mjguzik@gmail.com> PR: docs/124892
* Rework the lifetime management of the kernel implementation of POSIXjhb2008-06-2720-685/+2379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | semaphores. Specifically, semaphores are now represented as new file descriptor type that is set to close on exec. This removes the need for all of the manual process reference counting (and fork, exec, and exit event handlers) as the normal file descriptor operations handle all of that for us nicely. It is also suggested as one possible implementation in the spec and at least one other OS (OS X) uses this approach. Some bugs that were fixed as a result include: - References to a named semaphore whose name is removed still work after the sem_unlink() operation. Prior to this patch, if a semaphore's name was removed, valid handles from sem_open() would get EINVAL errors from sem_getvalue(), sem_post(), etc. This fixes that. - Unnamed semaphores created with sem_init() were not cleaned up when a process exited or exec'd. They were only cleaned up if the process did an explicit sem_destroy(). This could result in a leak of semaphore objects that could never be cleaned up. - On the other hand, if another process guessed the id (kernel pointer to 'struct ksem' of an unnamed semaphore (created via sem_init)) and had write access to the semaphore based on UID/GID checks, then that other process could manipulate the semaphore via sem_destroy(), sem_post(), sem_wait(), etc. - As part of the permission check (UID/GID), the umask of the proces creating the semaphore was not honored. Thus if your umask denied group read/write access but the explicit mode in the sem_init() call allowed it, the semaphore would be readable/writable by other users in the same group, for example. This includes access via the previous bug. - If the module refused to unload because there were active semaphores, then it might have deregistered one or more of the semaphore system calls before it noticed that there was a problem. I'm not sure if this actually happened as the order that modules are discovered by the kernel linker depends on how the actual .ko file is linked. One can make the order deterministic by using a single module with a mod_event handler that explicitly registers syscalls (and deregisters during unload after any checks). This also fixes a race where even if the sem_module unloaded first it would have destroyed locks that the syscalls might be trying to access if they are still executing when they are unloaded. XXX: By the way, deregistering system calls doesn't do any blocking to drain any threads from the calls. - Some minor fixes to errno values on error. For example, sem_init() isn't documented to return ENFILE or EMFILE if we run out of semaphores the way that sem_open() can. Instead, it should return ENOSPC in that case. Other changes: - Kernel semaphores now use a hash table to manage the namespace of named semaphores nearly in a similar fashion to the POSIX shared memory object file descriptors. Kernel semaphores can now also have names longer than 14 chars (up to MAXPATHLEN) and can include subdirectories in their pathname. - The UID/GID permission checks for access to a named semaphore are now done via vaccess() rather than a home-rolled set of checks. - Now that kernel semaphores have an associated file object, the various MAC checks for POSIX semaphores accept both a file credential and an active credential. There is also a new posixsem_check_stat() since it is possible to fstat() a semaphore file descriptor. - A small set of regression tests (using the ksem API directly) is present in src/tools/regression/posixsem. Reported by: kris (1) Tested by: kris Reviewed by: rwatson (lightly) MFC after: 1 month
* Introduce locking around use of ifindex_table, whose use was previouslyrwatson2008-06-262-16/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | unsynchronized. While races were extremely rare, we've now had a couple of reports of panics in environments involving large numbers of IPSEC tunnels being added very quickly on an active system. - Add accessor functions ifnet_byindex(), ifaddr_byindex(), ifdev_byindex() to replace existing accessor macros. These functions now acquire the ifnet lock before derefencing the table. - Add IFNET_WLOCK_ASSERT(). - Add static accessor functions ifnet_setbyindex(), ifdev_setbyindex(), which set values in the table either asserting of acquiring the ifnet lock. - Use accessor functions throughout if.c to modify and read ifindex_table. - Rework ifnet attach/detach to lock around ifindex_table modification. Note that these changes simply close races around use of ifindex_table, and make no attempt to solve the probem of disappearing ifnets. Further refinement of this work, including with respect to ifindex_table resizing, is still required. In a future change, the ifnet lock should be converted from a mutex to an rwlock in order to reduce contention. Reviewed and tested by: brooks
* change a variable name ot stop it from colliding with other names injulian2008-06-261-7/+7
| | | | | | some situations. (i.e. in vimage) MFC after: 1 week
* Someone cut and pasted a bunch of stuff here so lots ofjulian2008-06-261-15/+15
| | | | | | | | | indents were spaces when they should have been tabs, screwing up diffs and patches.. Whitespace commit as my first SVN commit. (yay) MFC after: 1 week
* Tweak the output of event log messages from the controller:jhb2008-06-261-283/+48
| | | | | | | | | | | - Each log entry contains a text description in the "description" field of the entry. The existing decode logic always ended up duplicating information that was already in the description string. This made the logs overly verbose. Now we just print out the description string. - Add some simple parsing of the timestamp and event classes. Reviewed by: ambrisko, scottl MFC after: 2 weeks
* Adjust the handling of pending log events during boot:jhb2008-06-261-50/+75
| | | | | | | | | | | | | | | | | - Fetch events from the controller in batches of 15 rather than a single event at a time. - When fetching events from the controller, honor the event class and locale settings (via hw.mfi tunables). This also allows the firmware to skip over unwanted log entries resulting in fewer requests to the controller if there many unwanted log entries since the last clean shutdown. - Don't drop the driver mutex while decoding an event. - If we get an error other than MFI_STAT_NOT_FOUND (basically EOF for hitting the end of the event log) then emit a warning and bail on processing further log entries. Reviewed by: ambrisko, scottl MFC after: 2 weeks
* Fix compile on 64-bit platforms.jhb2008-06-261-1/+1
|
* Remove the non-existent rt2860 subdir. Note, the ralfw module is not used inthompsa2008-06-261-1/+1
| | | | | | | the build yet. PR: kern/125015 Submitted by: Dan Cojocar
* As reported by Alexey Shuvaev, -dumpl overwrote files afterkientzle2008-06-261-0/+2
| | | | linking them, with predictably bad results.
* Change SEM_VALUE_MAX (maximum value of a POSIX semaphore) from UINT_MAXjhb2008-06-261-1/+3
| | | | | | | | | to INT_MAX. Otherwise, a process could create a semaphore (or increase its value via ksem_post()) beyond INT_MAX and sem_getvalue() would return a negative value. sem_getvalue() is only supposed to return a negative value if that is the number of waiters for that semaphore. MFC after: 2 weeks
* Add missing counter increments for posix shm checks.jhb2008-06-261-0/+5
|
* - add description of the MLINK errordanger2008-06-261-0/+3
| | | | | PR: docs/123019 MFC after: 3 days
* Some tests won't build at WARNS level 6 due to aliasing violations.des2008-06-261-4/+4
| | | | | Add missing -I. so the tests will build when ${.OBJDIR} != ${.CURDIR}. ${.OBJDIR} does not need to be spelled out.
* Add regression test for CRC32 check. The test file has been modified todes2008-06-262-5/+6
| | | | | | include an invalid checksum for file2. Approved by: kientzle
* Implement CRC32 verification. Note that you have to read until EOF todes2008-06-261-5/+12
| | | | | | | trigger the check. Requested by: ache Approved by: kientzle
* Allow the tests to build without libdmalloc.des2008-06-261-2/+2
|
* Re-implement the client side of rpc.lockd in the kernel. This implementationdfr2008-06-2628-776/+3102
| | | | | | | | | | | | provides the correct semantics for flock(2) style locks which are used by the lockf(1) command line tool and the pidfile(3) library. It also implements recovery from server restarts and ensures that dirty cache blocks are written to the server before obtaining locks (allowing multiple clients to use file locking to safely share data). Sponsored by: Isilon Systems PR: 94256 MFC after: 2 weeks
* Mark the section describing return values with an appropriate section flag.danger2008-06-261-1/+1
| | | | | PR: docs/122818 MFC after: 3 days
* Fix a fallout from SSP commit, and make this compile again.ru2008-06-261-2/+1
| | | | | | | | Bonus: including kern.mk just to pick kernel warning flags was an extremely bad idea anyway, because it also picked up CFLAGS (it probably wasn't the case at the time of CVS rev. 1.1, I haven't checked). Remove duplicate CWARNFLAGS from CFLAGS.
* Fix a chicken-and-egg problem: this files implements SSP support,ru2008-06-261-3/+0
| | | | | | | | | | | | | so we cannot compile it with -fstack-protector[-all] flags (or it will self-recurse); this is ensured in sys/conf/files. This OTOH means that checking for defines __SSP__ and __SSP_ALL__ to determine if we should be compiling the support is impossible (which it was trying, resulting in an empty object file). Fix this by always compiling the symbols in this files. It's good because it allows us to always have SSP support, and then compile with SSP selectively. Repoted by: tinderbox
* Gcc barfs in glob.c when run with -O3. To fix this make g_strchr() work onmtm2008-06-261-5/+5
| | | | | | | and return (const Char *) pointers instead of just (Char *) and get rid of all the type casting. PR: kern/124334
* The signature for a pthread function requires that itmtm2008-06-261-0/+6
| | | | | | | | | | | return a pointer to a void. The send_thread() and disk_thread() funtions; however, do not have a return value because they run for the duration of the daemon's lifetime. This causes gcc to barf when running with -O3. Make these functions return a null pointer to quiet it. PR: bin/124342 Submitted by: Garrett Cooper <gcooper@FreeBSD.org> (minus his comments) MFC after: 1 week
* Fix 6-year old cut&paste error. The # could be escaped with '\', notsobomax2008-06-261-2/+2
| | | | | | with '\\'. MFC after: 2 weeks
* Split out the reference zip file for ease of maintenance.kientzle2008-06-262-19/+16
|
* Regen properly.ru2008-06-251-85/+85
|
* Regen.ru2008-06-251-88/+88
|
* Enable GCC stack protection (aka Propolice) for userland:ru2008-06-2537-22/+126
| | | | | | | | | | | | | | | | | | | | | - It is opt-out for now so as to give it maximum testing, but it may be turned opt-in for stable branches depending on the consensus. You can turn it off with WITHOUT_SSP. - WITHOUT_SSP was previously used to disable the build of GNU libssp. It is harmless to steal the knob as SSP symbols have been provided by libc for a long time, GNU libssp should not have been much used. - SSP is disabled in a few corners such as system bootstrap programs (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves. - It should be safe to use -fstack-protector-all to build world, however libc will be automatically downgraded to -fstack-protector because it breaks rtld otherwise. - This option is unavailable on ia64. Enable GCC stack protection (aka Propolice) for kernel: - It is opt-out for now so as to give it maximum testing. - Do not compile your kernel with -fstack-protector-all, it won't work. Submitted by: Jeremie Le Hen <jeremie@le-hen.org>
* Use "__asm __volatile" rather than "__asm" for instruction sequencesmarius2008-06-251-7/+7
| | | | | | | | | | | | | that modify condition codes (the carry bit, in this case). Without "__volatile", the compiler might add the inline assembler instructions between unrelated code which also uses condition codes, modifying the latter. This prevents the TCP pseudo header checksum calculation done in tcp_output() from having effects on other conditions when compiled with GCC 4.2.1 at "-O2" and "options INET6" left out. [1] Reported & tested by: Boris Kochergin [1] MFC after: 3 days
* Given that sun4u uses sparc64/sparc64/in_cksum.c, use the sparc64marius2008-06-251-164/+2
| | | | | | <machine/in_cksum.h> here also. MFC after: 3 days
* src/compat/ is gone back in March.ru2008-06-251-2/+2
| | | | Reported by: Mars G Miro
* Document spindown constraints as given in the original commitbz2008-06-251-1/+22
| | | | | | | | message[1] and later clarification provided by phk. [1] http://docs.freebsd.org/cgi/mid.cgi?200803171033.m2HAXOeN055116 Reviewed by: brueffer, phk, ed
* Remove the unused M_MEMDEV from the kernel.ed2008-06-252-4/+0
| | | | | | | The M_MEMDEV memory allocation pool does not seem to be used. We can live without it. Approved by: philip (mentor)
* Remove the unused major/minor numbers from iodev and memdev.ed2008-06-2512-18/+1
| | | | | | | | | Now that st_rdev is being automatically generated by the kernel, there is no need to define static major/minor numbers for the iodev and memdev. We still need the minor numbers for the memdev, however, to distinguish between /dev/mem and /dev/kmem. Approved by: philip (mentor)
* Fix links to online gcc docs.ale2008-06-251-3/+3
| | | | | Reported by: Andre Guibert de Bruet <andy@siliconlandmark.com> MFC after: 1 day
* Pass the entry down into the core write loop, so wekientzle2008-06-251-4/+6
| | | | | | can include the filename when reporting errors. Thanks to: Dan Nelson
* Months in English are capitalized (even when abbreviated).wollman2008-06-251-1/+1
|
* Quiet rc.d/syscons unless it has something to say.mtm2008-06-241-6/+35
|
* Emit opcodes closer to GNU as(1) generated codes and micro-optimize.jkim2008-06-242-59/+46
|
* Emit opcodes closer to GNU as(1) generated codes and micro-optimize.jkim2008-06-242-63/+49
|
* Make it simpler to build netgraph modules outside of the kernel sourcegnn2008-06-241-0/+2
| | | | | | tree. This change follows similar ones in the device tree. MFC after: 2 weeks
* In -p mode, don't gaurd against '..' in paths. We continue tokientzle2008-06-241-0/+1
| | | | | | check in -i mode unless --insecure is specified. PR: bin/124924
* In case of interface initialization failure remove struct in_ifaddr* fromgonzo2008-06-241-0/+8
| | | | | | | | | | in_ifaddrhashtbl in in_ifinit because error handler in in_control removes entries only for AF_INET addresses. If in_ifinit is called for the cloned inteface that has just been created its address family is not AF_INET and therefor LIST_REMOVE is not called for respective LIST_INSERT_HEAD and freed entries remain in in_ifaddrhashtbl and lead to memory corruption. PR: kern/124384
* Add two commands to _umtx_op system call to allow a simple mutex to bedavidxu2008-06-245-90/+251
| | | | | | | | | | | | | | locked and unlocked completely in userland. by locking and unlocking mutex in userland, it reduces the total time a mutex is locked by a thread, in some application code, a mutex only protects a small piece of code, the code's execution time is less than a simple system call, if a lock contention happens, however in current implemenation, the lock holder has to extend its locking time and enter kernel to unlock it, the change avoids this disadvantage, it first sets mutex to free state and then enters kernel and wake one waiter up. This improves performance dramatically in some sysbench mutex tests. Tested by: kris Sounds great: jeff
* Fix test for waiting AIFs in aac_poll(). This seems to solve theemaste2008-06-241-2/+7
| | | | | | | | problem where Adaptec's arcconf monitoring tool hangs after producing its expected output. Submitted by: Adaptec, via driver ver 15317 MFC after: 1 week
* Rehash and clean up BPF JIT compiler macros to match AT&T notations.jkim2008-06-232-143/+143
|
OpenPOWER on IntegriCloud