summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove netkey directory from cscope/TAGs generation and replacebz2007-07-052-3/+7
| | | | | | | | | | it with netipsec now that KAME IPsec is gone. While here add missing netinet6 directories. Add comments about the ports needed to be able to run those targets. Reviewed by: philip Approved by: re (rwatson)
* Fix a build breakage as result of disabling parts of I4B.bz2007-07-052-17/+17
| | | | | | | | Check for (temporary gone) kernel options to be defined before using them. Reported by: peter Approved by: re (rwatson)
* Quiet framelen uninitialized warning. I think it was a false alarm.peter2007-07-051-1/+3
| | | | | | | If check_fhdr() returns false, the frame_ok variable should protect any meaningful evaluations of framelen. Approved by: re (rwatson)
* Quiet warnings. I believe gcc is incorrect about these.peter2007-07-051-1/+1
| | | | Approved by: re (rwatson)
* __packed has no effect on u_int8_t's except to cause a warning (andpeter2007-07-051-1/+1
| | | | | | never has had any effect). Approved by: re (rwatson)
* Turn -Werror back on for amd64 for kernel builds.peter2007-07-051-0/+2
| | | | Approved by: re (rwatson)
* Compile pf/pf_subr.c and netnatm/cc_conn.c without -Werror for the timepeter2007-07-052-3/+3
| | | | | | being. Approved by: re (rwatson)
* Quiet warnings. These do not appear to be actually used uninitialized,peter2007-07-051-1/+1
| | | | | | | but gcc's optimizer isn't smart enough to see that. Pre-initializing seems harmless enough. Approved by: re (rwatson)
* Fix a stray splx() that caused a new warning.peter2007-07-051-2/+2
| | | | Approved by: re (rwatson)
* Initialize DWBuf[3].peter2007-07-051-0/+1
| | | | Approved by: re (rwatson, blanket)
* Fix a bunch of warnings due to a missing forward declaration of a struct.peter2007-07-051-0/+1
| | | | Approved by: re (rwatson)
* Prefer device_printf to printf("%s: ...", device_get_nameunit()). Onimp2007-07-051-30/+23
| | | | | | amd64, we save about 240 bytes (this is about 20 per instance). Approved by: re (blanket)
* Prefer device_printf to printf("%s:...", device_get_nameunit(),...);imp2007-07-052-61/+51
| | | | | | This saves ~300 bytes for uvscom.c and ~100 for uvisor.c Approved by: re (blanket)
* Fix 'assignment used as truth value' warningpeter2007-07-051-1/+2
| | | | Approved by: re (rwatson)
* Temporarily turn nowerror on for i386 and amd64 pmap.c. I'd like to studypeter2007-07-052-2/+2
| | | | | | exactly what effect the options cause to the code with gcc these days. Approved by: re (rwatson)
* Fix a second warning, introduced by my last "fix". I committed the wrongpeter2007-07-051-2/+2
| | | | | | | diff from the wrong machine. Pointy hat to: peter Approved by: re (rwatson - blanket, several days ago)
* Fix cast-qualifiers warning when INET6 is not presentpeter2007-07-053-4/+3
| | | | Approved by: re (rwatson)
* Fix bad function type passed to destroy_dev_sched_cb().peter2007-07-051-1/+2
| | | | Approved by: re (rwatson)
* Remove pad argument from ftruncate wrapper. Oops.peter2007-07-051-1/+0
| | | | Approved by: re (kensmith)
* Add quirks, derived from the linux quirks table for:imp2007-07-052-5/+375
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Adonics Cable 205 o Aiptek PocketCAM 3Mega o Belkin USB2SCSI o Casio QV DigiCam o CCYU EasyDisk ED1064 o Desknote UCR-61S2B o Epson Stylus Photo 875DC Card Reader o Epson Stylus Photo 895 Card Reader o Feiya 5-in-1 Card Reader o Hitachi Dvd-CAM DZ-MV100A Camcorder o HP CD-WRiter+ CD-4e o Insystem Storage Adapter v2 o Kyocera Finecam S3x o Kyocera Finecam S4 o Kyocera Finecam S5 o Kyocera Finecam L3 o Lexar USB CF Reader o MindAtWork Digital Wallet o Minolta Dimage F300 o Minolta Dimage E223 o Minsumi USB Fdd o Netac USB-CF-Card o NetChip USB Clik! 40 o Onspec MDCFE-B USB CF Reader o Onspec SIIG/Datafab Memory Stick + CF Reader/Writer o Onspec Datafab-based Reader o Onspec PNY/Datafab CF+SM Reader o Onspec SimpleTech/Datafab CF+SM Reader o Onspec MDSM-b Reader o Onspec USB To CF + SM Combo (LC1) o Onspec ImageMate SDDR55 o Panasonic LS-120 Camera o Samsung Techwin Digimax 410 o Shuttle eUSB SmartMedia / CompactFlash Adapter o Skanhex MD 7425 Camera o Skanhex SX 520z Camera o Sony Memorystick NW-MS7 o Sony Portable USB Hardrive V2 o Sony Memorystick PEG N760c o Sony Memorystick MSC-U03 o TREK/IBM USB memory key o Trumpion T33520 USB Flash Card Controller o Trumpion MP3 Player o Vivtar Vivicam 35Xx o WinMaxGroup USB Flash Disk 64M-C o Zoran Digital Camera EX-20 DSC and maybe a few others... Submitted by: Vaidas Damosevicius and flz PR: 79893 Reviewed by: njl, flz Approved by: re (blanket)
* Add support for Western Digital MyBook external enclosures. They needimp2007-07-052-0/+10
| | | | | | | | this quirk to work. Submitted by: Dierk Sacher PR: usb/99419 Approved by: re (blanket)
* Don't add the 'pad' argument to the mmap/truncate/etc syscalls.peter2007-07-043-5/+0
| | | | | Submitted by: kensmith Approved by: re (kensmith)
* Add compat6 wrapper code for mmap/lseek/pread/pwrite/truncate/ftruncate.peter2007-07-041-0/+83
| | | | Approved by: re (kensmith)
* Regenerate after mmap/lseek/etc syscall changespeter2007-07-044-102/+177
| | | | Approved by: re (kensmith)
* Add i386 emulation wrappers for mmap/lseek/etc. These use COMPAT6, sopeter2007-07-041-6/+22
| | | | | | | you must use the already existing, already in generic, COMPAT_FREEBSD6 kernel option for running old 32 bit binaries. Approved by: re (kensmith)
* Add freebsd6_ wrappers for mmap/lseek/pread/pwrite/truncate/ftruncatepeter2007-07-043-3/+78
| | | | Approved by: re (kensmith)
* Bump version for new mmap/lseek/etc syscallspeter2007-07-041-1/+1
| | | | Approved by: re (kensmith)
* Regenerate after mmap/lseek/etc syscall changes.peter2007-07-046-112/+251
| | | | Approved by: re (kensmith)
* Create new syscalls for mmap(), lseek(), pread(), pwrite(), truncate() andpeter2007-07-041-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | ftruncate(), but without the pad arg. There are several reasons for this. Consider 'mmap()'. On AMD64, the function call (and syscall) ABI allow for 6 register arguments. Additional arguments go on the stack. mmap(2) has 6 arguments. However, the syscall definition has an extra 'int pad' argument. This pushes it to 7 arguments, which means one must spill into the memory stack. Since the kernel API doesn't match userland API, we have a hack in libc - libc/sys/mmap.c. This implements the userland API by calling __syscall() with an extra argument and the pad argument, for a total of 8 args. This is all unnecessary and inconvenient for several things, including the kernel's syscall handler code which now has to handle merging stack arguments with register arguments. It is a big deal for certain 3rd party code. I'm adding libc glue to make the transition totally painless. I had intended to mark the old syscalls as COMPAT6, but the potential to shoot your feet by building a new kernel without COMPAT_FREEBSD6 but with a slighly older userland was too great. For now, they have manual "freebsd6_" prefixes rather than being COMPAT6. They will go back to being marked 'COMPAT6' after 7-stable starts. Approved by: re (kensmith)
* Add support for COMPAT6 syscalls.peter2007-07-041-9/+42
| | | | | | | | | | | | | Also, change the visibility of compat syscalls a slightly. Compat syscalls were missing from 'syscalls.h' entirely. This additionally adds them with their compat prefix. eg: SYS_freebsd6_mmap. Also, the syscalls.c names strings have different prefixes to differentiate syscalls. Instead of several "old.mmap" strings, there will now be a "compat.mmap" and "compat6.mmap" etc. Before, both would have had the same "old.mmap" label. Approved by: re
* Be much more forgiving towards applications that requesting ioctlsariff2007-07-041-4/+2
| | | | | | | | that should be a no-op (for example, requesting SYNC on record path). The standards does not indicate that such requests are illegal, so just return it as success instead of EINVAL. Approved by: re (mux)
* Since cdev mutex is after system map mutex in global lock order, free()kib2007-07-043-1/+38
| | | | | | | | | | | | | | | | | | shall not be called while holding cdev mutex. devfs_inos unrhdr has cdev as mutex, thus creating this LOR situation. Postpone calling free() in kern/subr_unit.c:alloc_unr() and nested functions until the unrhdr mutex is dropped. Save the freed items on the ppfree list instead, and provide the clean_unrhdrl() and clean_unrhdr() functions to clean the list. Call clean_unrhdrl() after devfs_create() calls immediately before dropping cdev mutex. devfs_create() is the only user of the alloc_unrl() in the tree. Reviewed by: phk Tested by: Peter Holm LOR: 80 Approved by: re (kensmith)
* Reintroducing !INET6 + IPSEC building fix which was accidentally revertedavatar2007-07-041-1/+1
| | | | | | in rev. 1.1229. Approved by: re (kensmith)
* Remove a last, dangling, file from the Kame IPsec code.gnn2007-07-041-718/+0
| | | | | Approved by: re Spotted by: rwatson, bz
* Temporary disconnect i4bing, i4bisppp and i4bipr from the build forbz2007-07-0411-32/+36
| | | | | | | | | | the 7.0 timeframe. This is needed because I4B is not locked and NET_NEEDS_GIANT goes away. The plan is to lock I4B and bring everything back for 7.1. Approved by: re (kensmith)
* Significantly reduce the memory leak as noted in BUGS section forscf2007-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | setenv(3) by tracking the size of the memory allocated instead of using strlen() on the current value. Convert all calls to POSIX from historic BSD API: - unsetenv returns an int. - putenv takes a char * instead of const char *. - putenv no longer makes a copy of the input string. - errno is set appropriately for POSIX. Exceptions involve bad environ variable and internal initialization code. These both set errno to EFAULT. Several patches to base utilities to handle the POSIX changes from Andrey Chernov's previous commit. A few I re-wrote to use setenv() instead of putenv(). New regression module for tools/regression/environ to test these functions. It also can be used to test the performance. Bump __FreeBSD_version to 700050 due to API change. PR: kern/99826 Approved by: wes Approved by: re (kensmith)
* - Use explicit locking in the various fcntl case statements so that wejeff2007-07-031-64/+99
| | | | | | | | | | | can acquire shared filedescriptor locks in the appropriate cases. - Remove Giant from calls that issue ioctls. The ioctl path has been mpsafe for some time now. - Only acquire giant for VOP_ADVLOCK when the filesystem requires giant. advlock is now mpsafe. Reviewed by: rwatson Approved by: re
* - Remove explicit Giant protection from lockf. Use the vnode interlockjeff2007-07-031-54/+56
| | | | | | | | | | to protect this datastructure instead. - Preallocate an extra lockf structure in case we want to split a lock on insert or delete. - msleep() on the vnode interlock when blocking on a lock. Reviewed by: rwatson Approved by: re
* Tweak the low-level MI SMP code some:jhb2007-07-031-11/+23
| | | | | | | | | | | | | - Use cpu_spinwait() in the spin loops in stop_cpus(), restart_cpus(), and smp_rendezvous_action(). - Remove unneeded acq memory barriers in stop_cpus(), restart_cpus(), and smp_rendezvous_action(). - Add an additional synch point in smp_rendezvous() to ensure that all the CPUs will always see an up-to-date value of smp_rv_setup_func. Reviewed by: attilio Approved by: re (kensmith) Tested on: alpha, amd64, i386, sparc64 SMP (for several years)
* Fix for a race where out of order loading of NFS attrs into thejhb2007-07-031-1/+17
| | | | | | | | | | | | nfsnode could lead to attrs being stale. One example (that we ran into) was a READDIR+, WRITE. The responses came back in order, but the attrs from the WRITE were loaded before the attrs from the READDIR+, leading to the wrong size from being read on the next stat() call. MFC after: 1 week Submitted by: mohans Approved by: re (kensmith)
* Fix up NFS client write error handling. Errors are split intojhb2007-07-031-0/+15
| | | | | | | | | | | | | recoverable and unrecoverable. For the former, we redirty the buffer and hang onto it for future retries. For the latter (eg. ESTALE), we discard the buffer and return the error back to the user on the next syscall. This fixes a number of vfs panics and fixes having a large number of dirty buffers (that cannot be written out and reclaimed) from hanging around. Thanks to ups@ for discussions on this issue. Reported by: kris, Kai, others Approved by: re (kensmith)
* Rev. 1.204 and 1.205 got an erronous version of destroy_dev() thatkib2007-07-031-6/+18
| | | | | | | | calls destroy_dev_sched() with cdev mutex locked. Commit the code that was actually tested. Pointy hat to: kib Approved by: re (implicit)
* Lock Giant and proctree lock around dereferencing p_session->s_ttyvp->v_rdev.kib2007-07-031-1/+13
| | | | | | | | | | Lock cdev mutex too to close the race with tty being freed. Relock clone_drain_lock to prevent the LOR with proctree lock, thus add #include <fs/devfs/devfs_int.h>. Suggested by: tegge Debugging help and testing by: Peter Holm Approved by: re (kensmith)
* Use make_dev_credf(MAKEDEV_REF) instead of make_dev() from pty clone handler.kib2007-07-031-2/+1
| | | | | Debugging help and testing by: Peter Holm Approved by: re (kensmith)
* Use make_dev_credf(MAKEDEV_REF) instead of make_dev() from the clone handler.kib2007-07-031-10/+16
| | | | | | | | | | Lock Giant in the clone handler. Use destroy_dev_sched() explicitely from pty_maybecleanup() and postpone pty_release() until both master and slave cdevs are destroyed by setting it as callback for destroy_dev_sched(). Debugging help and testing by: Peter Holm Approved by: re (kensmith)
* Use make_dev_credf(MAKEDEV_REF) instead of make_dev() from snp clone handler.kib2007-07-031-3/+4
| | | | | | | Drain clone events and cdev destruction from the module unload handler. Debugging help and testing by: Peter Holm Approved by: re (kensmith)
* Automatically detect deadlock condition in destroy_dev(), that is, ifkib2007-07-031-2/+8
| | | | | | | | | destroy_dev() is called from csw method, and no d_purge driver method is provided. Transform the direct call to destroy_dev() into destroy_dev_sched(). Reviewed by: njl (programming interface) Debugging help and testing by: Peter Holm Approved by: re (kensmith)
* Since rev. 1.199 of sys/kern/kern_conf.c, the thread that callskib2007-07-034-18/+176
| | | | | | | | | | | | | | | | | | | | | | | destroy_dev() from d_close() cdev method would self-deadlock. devfs_close() bump device thread reference counter, and destroy_dev() sleeps, waiting for si_threadcount to reach zero for cdev without d_purge method. destroy_dev_sched() could be used instead from d_close(), to schedule execution of destroy_dev() in another context. The destroy_dev_sched_drain() function can be used to drain the scheduled calls to destroy_dev_sched(). Similarly, drain_dev_clone_events() drains the events clone to make sure no lingering devices are left after dev_clone event handler deregistered. make_dev_credf(MAKEDEV_REF) function should be used from dev_clone event handlers instead of make_dev()/make_dev_cred() to ensure that created device has reference counter bumped before cdev mutex is dropped inside make_dev(). Reviewed by: tegge (early versions), njl (programming interface) Debugging help and testing by: Peter Holm Approved by: re (kensmith)
* Relock the sema_mtxp unconditionally after copyin() for SETALL case inkib2007-07-031-1/+1
| | | | | | | | kern_semctl. Otherwise, later mtx_unlock() can operate on unlocked mutex. Submitted by: rdivacky MFC after: 3 days Approved by: re (kensmith)
* Add a note about the pf update, mark libexec/ftp-proxy as obsolete and bumpmlaier2007-07-031-1/+1
| | | | | | __FreeBSD_version for ports. Approved by: re (implicit)
OpenPOWER on IntegriCloud