summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Probable fix for the "cdda2wav" panics that various people have beenken1998-12-161-47/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reporting since this past summer. (I think Daniel O'Conner was the first.) The problem appears to have been something like this: - cdda2wav by default passes in a buffer that is close to the 128K MAXPHYS limit. - many times, the buffer is not page aligned - vmapbuf() truncates the address, so that it is page aligned - that causes the total size of the buffer to be greater than MAXPHYS, which of course is a bad thing. Here's a quote from the PR (kern/9067): ================== In particular, note bp->b_bufsize = 0x0001f950 and bp->b_data = 0xf2219960 (which does not start on a page boundary). vunmapbuf() loops through all the pages without any difficulty until addr reaches 0xf2239000, and then the panic occurs. This seems to indicate that we are exceeding MAXPHYS since we actually started from the middle of a page (the data is being transfered to a non page aligned location). To complete the description, note that the system call originates from ReadCddaMMC12() (in scsi_cmds.c of cdda2wav) with a request to read 55 audio sectors of 2352 bytes (which is calculated to fall under MAXPHYS). This in turn ends up calling scsi_send() (in scsi-bsd.c) which calls cam_fill_csio() and cam_send_ccb(). This results in a CAMIOCOMMAND ioctl with a ccb function code of XPT_SCSI_IO. ================== The fix is to change the size check in cam_periph_mapmem() so that it is like the one in minphys(). In particular, it is something like: if ((buffer_length + (buf_ptr & PAGE_MASK)) > MAXPHYS) buffer is too big My fix is based on the one in the PR, but I cleaned up a fair number of things in cam_periph_mapmem(). The checks for each buffer to be mapped are now in a separate loop from the actual mapping operation. With the new arrangement, we don't have to bother with unmapping any previously mapped buffers if one of the checks fails. Many thanks to James Liu for tracking this down. I'd appreciate it if some vm-savvy folks would look this over. I believe this fix is correct, but I could be wrong. PR: kern/9067 (also, kern/8112) Reviewed by: gibbs Submitted by: "James T. Liu" <jtliu@phlebas.rockefeller.edu>
* Declare setproctitle() as printf0-like.bde1998-12-161-2/+2
|
* Adjust for kern.ps_strings and PS_STRINGS not being a pointer. This isbde1998-12-162-16/+14
| | | | | | | | an unimprovement here. I thought it would be an improvement, as in libkvm, but here we can access the strings directly. Use sysctlbyname() instead of sysctl() and trust it to give a nonzero address if it succeeds.
* Document securelevel 3.ghelmer1998-12-161-2/+2
| | | | PR: docs/8674
* Mention affect of securelevel 3 and higher on attempts to change filter lists.ghelmer1998-12-161-0/+6
| | | | Prompted by: PR docs/7785
* Mention securelevel 3 as affecting ipfw and dummynet. Generalize commentghelmer1998-12-161-2/+11
| | | | | about fdisk and securelevel 2. PR: docs/7785
* Removed the cast to a pointer in the definition of PS_STRINGS andbde1998-12-1612-28/+25
| | | | | | | adjusted related casts to match (only in the kernel in this commit). The pointer was only wanted in one place in kern_exec.c. Applications should use the kern.ps_strings sysctl instead of PS_STRINGS, so they shouldn't notice this change.
* Removed all traces of SYSCTL_INTPTR(). Pointers can't really be passedbde1998-12-162-11/+5
| | | | | | | | | across the kernel -> application interface, and for the one sysctl where they were passed and actually used (kern.ps_strings), the applications want addresses represented as u_longs anyway (the other sysctl that passed them, kern.usrstack, has never been used). Agreed to by: dfr, phk
* Implement and document fetchStatFTP.des1998-12-162-49/+132
| | | | | Update description of struct url_stat in the man page. Clean up error handling in ftp.c.
* Removed bogus casts of USRSTACK and/or the other operand in binarybde1998-12-169-43/+34
| | | | expressions involving USRSTACK.
* Sync with current sc driver in sys/i386/isa.kato1998-12-165-1567/+1499
| | | | Submitted by: Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
* Make it possible to have separate install scripts as well as havejkh1998-12-1610-54/+310
| | | | | | an on-delete script. Submitted by: Rajesh Vaidheeswarran <rv@fore.com>
* Best version so far. Flicker floor is now 2e-12.phk1998-12-161-15/+28
|
* Remove appending objformat to obj prefix forache1998-12-161-2/+2
| | | | | | backend targets. Old variant cause top level things build in /usr/obj/elf while lower level things build in /usr/obj which cause mismatch
* Remove unused header files. Fix a few shadowing bugs. Improve error reporting.des1998-12-162-57/+30
|
* Add verbose flag, and support functions.des1998-12-1610-59/+109
| | | | | | | | | Brucify the Makefile. Differentiate atime and mtime in fetch*Stat(). Fix a few pointer bugs. Tweak some error messages. Don't #include sys/param.h and stdio.h in fetch.h. Document that sys/param.h and stdio.h must be #included before fetch.h.
* Removed dynamic loading of FileHandlen_hibma1998-12-161-4/+2
|
* As previously threatened, clean up the rshd -a option and make it defaultpeter1998-12-163-111/+50
| | | | | | | | | | | | | | | | on rshd and rlogind. However, note that: 1: rshd used to drop a connection with -a if the hostname != ip address. This is unneeded, because iruserok() does it's own checking. It was also wrong if .rhosts had an explicit IP address in it, connections would be dropped from that host solely because the DNS was mismatched even though it was explicitly intended to work by IP address. 2: rlogind and rshd check the hostname mappings by default now because that is what goes into the utmp/wtmp and logs. If the hostname != ip address, then it uses the IP address for logging/utmp/wtmp purposes. There isn't much point logging ficticious hostnames. 3: rshd -a is now accepted (but ignored) for compatability. If you really want to make life miserable for people with bad reverse DNS, use tcpd in paranoid mode (which is questionable anyway, given DNS ttl tweaking).
* Update to note which specific brand of IDE drive does this.jkh1998-12-161-1/+1
|
* Old stuff laying around: Don't use getstr which can conflict with somepeter1998-12-164-12/+12
| | | | curses/termcap/terminfo implementations and causes recursion.
* Old stuff laying around: Don't use a function called getstr(), that haspeter1998-12-162-7/+7
| | | | | nasty consequences when the system curses is ncurses as this conflicts with a ncurses funciton and causes recursion.
* Old stuff from a source tree: copy (verbatum) the code to expand thepeter1998-12-162-4/+62
| | | | %s/%m in the default /etc/gettytab.
* Old nit lying around in a source tree: Slightly optimize the number ofpeter1998-12-161-13/+15
| | | | uname/gname overrides and /sets.
* Old nit lying around: Don't override the gname when it's the same as thepeter1998-12-161-2/+2
| | | | previous /set.
* Old stuff laying around: Don't override /tmp to the same uid/gid as thepeter1998-12-161-2/+2
| | | | previous /set defaults
* Old stuff lying around a source tree:peter1998-12-162-5/+11
| | | | Create/remove /etc/wall_cmos_clock without using system() and magic paths.
* Cleaning out old stuff from one of my source trees:peter1998-12-161-5/+14
| | | | use mkdtemp() rather than mktemp() and fix a trivial memory leak.
* Added /usr/share/examples/portal to mtreedillon1998-12-161-1/+3
|
* Add support for building on MIPS based systems.imp1998-12-162-2/+16
|
* Free memory from getmode.imp1998-12-161-1/+2
| | | | Obtained from: OpenBSD
* Free memory from setmode.imp1998-12-161-1/+2
| | | | Obtained from: OpenBSD
* Return memory from setmode.imp1998-12-161-0/+1
| | | | Obtained from: OpenBSD
* Fix two possible non-exploitable buffer overflows.imp1998-12-161-3/+5
| | | | Thanks to: A friend at Sun auditing dump/restore for Solaris.
* Free memory from setmode.imp1998-12-161-2/+3
| | | | Obtained from: OpenBSD
* Use getcwd in stead of using getwd so that we try harder to avoidimp1998-12-161-2/+2
| | | | | | overflowing a buffer. Obtained from: Either OpenBSD or a discussion in bugtraq.
* Free memory obtained from setmode.imp1998-12-162-2/+4
| | | | Obtained from: OpenBSD
* Add reminder to return memory allocated by this call.imp1998-12-161-1/+10
| | | | Obtained from: OpenBSD
* The perlinterp option builds and works, but I'm not so sure how it'll gopeter1998-12-161-5/+6
| | | | in a release or buildworld environment, so I'll leave it disabled.
* Make this work with the perl5 in the source tree - the API has "evolved"peter1998-12-162-3/+7
| | | | and some code glitches had to be fixed.
* Disable build/install of boot.help until we sort out how to construct itmsmith1998-12-161-10/+10
| | | | in the makeworld environment.
* vxalloc() can return NULL. Deal with it.eivind1998-12-162-2/+6
|
* Fix possible NULL-pointer deref in error case (same as DEVFS).eivind1998-12-162-4/+4
|
* Avoid NULL-pointer dereference on error condition.eivind1998-12-151-2/+2
|
* Remove signal mask prior to calling execdillon1998-12-151-1/+2
|
* Fix a rather bad latency problem (uncovered by the recent timer commit).brian1998-12-151-2/+2
| | | | Problem reported by: Christopher Hall <hsw@acm.org>
* Add portal exampledillon1998-12-152-0/+67
| | | | PR: misc/8796
* Add pt_tcplisten.c functionality, fix a few minor bugsdillon1998-12-1521-33/+702
| | | | | PR: kern/8793, misc/8796, kern/8797, kern/8798, kern/8050, kern/6758 Submitted by: Duncan Barclay <dmlb@ragnet.demon.co.uk>
* Wrap two macros into do { ... } while (0), and fix the way they're useddes1998-12-154-22/+26
| | | | | | in the kernel. Reviewed by: bde
* Add some emacs code to make cc-mode almost compatible to style(9).cracauer1998-12-152-7/+47
| | | | Sort entries in toplevel README.
* Compile threaded proframs with -D_THREAD_SAFE, not -D_THREADSAFEcracauer1998-12-151-2/+2
|
OpenPOWER on IntegriCloud