gad [Tue, 9 Oct 2001 00:09:46 +0000 (00:09 +0000)]
Get rid of some minor compile-time errors by changing copyright/rcsid
definitions to the same format used in other lpr source files, and by
adding parenthesis to the right spot in one 'if' statement.
jhb [Mon, 8 Oct 2001 23:35:40 +0000 (23:35 +0000)]
Don't attempt to initialize the pcaudio device on open. The attach routine
already does the initialization (though it didn't set pca_initialized, so
we always initialized twice) and since attach calls make_dev(), there's no
way that pcaopen() can be called before pcaattach().
jhb [Mon, 8 Oct 2001 20:58:24 +0000 (20:58 +0000)]
Allow atomic ops to be somewhat safely used in userland. We always use
lock prefixes in the userland case so that the binaries will work on both
SMP and UP systems.
sobomax [Mon, 8 Oct 2001 17:05:34 +0000 (17:05 +0000)]
(forced)
Forgot to mention: creation of a full-fleged package archive requires some
changes in bsd.ports.mk, because currently it doesn't install some files
that are usually packed into the package archive (+MTREE_DIRS, +DISPLAY
and so on). Support for this will be committed later.
sobomax [Mon, 8 Oct 2001 17:01:35 +0000 (17:01 +0000)]
- Allow package archive to be created from a locally installed package. This
allows for an easy way to backup old version of port prior to installing
a new one;
- silence compiler warnings by killing some unused variables and adding
all includes necessary.
dillon [Mon, 8 Oct 2001 00:37:54 +0000 (00:37 +0000)]
Remove panics for rename() race conditions. The panics are inappropriate
because the IN_RENAME flag only fixes a few of the huge number of race
conditions that can result in the source path becoming invalid even
prior to the VOP_RENAME() call. The panics created a serious security
issue whereby an attacker could fairly easily cause the panic to
occur, crashing the machine.
The correct solution requires a great deal of work in the namei
path cache code.
des [Sun, 7 Oct 2001 20:08:42 +0000 (20:08 +0000)]
Dissociate ptrace from procfs.
Until now, the ptrace syscall was implemented as a wrapper that called
various functions in procfs depending on which ptrace operation was
requested. Most of these functions were themselves wrappers around
procfs_{read,write}_{,db,fp}regs(), with only some extra error checks,
which weren't necessary in the ptrace case anyway.
This commit moves procfs_rwmem() from procfs_mem.c into sys_process.c
(renaming it to proc_rwmem() in the process), and implements ptrace()
directly in terms of procfs_{read,write}_{,db,fp}regs() instead of
having it fake up a struct uio and then call procfs_do{,db,fp}regs().
It also moves the prototypes for procfs_{read,write}_{,db,fp}regs()
and proc_rwmem() from proc.h to ptrace.h, and marks all procfs files
except procfs_machdep.c as "optional procfs" instead of "standard".
des [Sun, 7 Oct 2001 19:37:13 +0000 (19:37 +0000)]
In procfs_readdir(), when the directory being read was a process directory,
the target process was being held locked during the uiomove() call. If the
process calling readdir() was the same as the target process (for instance
'ls /proc/curproc/'), and uiomove() caused a page fault, the result would
be a proc lock recursion. I have no idea how long this has been broken -
possibly ever since pfind() was changed to lock the process it returns.
Also replace the one and only call to procfs_findtextvp() with a direct
test of td->td_proc->p_textvp.
mjacob [Sun, 7 Oct 2001 18:18:50 +0000 (18:18 +0000)]
Some patches from Doug for ia64 support- the principle one being the
appropriate cache flush that provides MEMORY_BARRIER in between handoffs
between host && RISC processor for the shared memory request/response
queues.
iedowse [Sun, 7 Oct 2001 16:11:37 +0000 (16:11 +0000)]
Fix a typo in do_sigaction() where sa_sigaction and sa_handler were
confused. Since sa_sigaction and sa_handler alias each other in a
union, the bug was completely harmless. This had been fixed as part
of the SIGCHLD changes in revision 1.125, but it was reverted when
they were backed out in revision 1.126.
benno [Sun, 7 Oct 2001 13:22:25 +0000 (13:22 +0000)]
Mega-patch for OpenFirmware loader support.
- Flesh out ofw_readin routine.
- Add OpenFirmware load and exec routines.
- Make sure memory allocation for the kernel is done correctly.
- Change the way the heap is allocated so as to make it easier to deallocate
when we hand over.
- Add a command to print memory maps similar to the one for ia64.
With this patch, I can now load and hand over to a kernel on my iMac. There
are some problems with OpenFirmware routines failing after the hand over that
still need to be addressed.
nyan [Sun, 7 Oct 2001 10:04:18 +0000 (10:04 +0000)]
Rewrite the pc98 bus_space stuff.
The type of bus_space_tag_t is now a pointer to bus_space_tag structure,
and the bus_space_tag structure saves pointers to functions for direct
access and relocate access.
Added bsh_bam member to the bus_space_handle structure, it saves access
method either direct access or relocate access which is called by
bus_space_* functions.
Added the mecia device support. If the bs_da and bs_ra in bus tag are set
NEPC_io_space_tag and NEPC_mem_space_tag respectively, new bus_space stuff
changes the register of mecia automatically for 16bit access.
rwatson [Sun, 7 Oct 2001 03:51:22 +0000 (03:51 +0000)]
o Introduce an 'options REGRESSION'-dependant sysctl namespaces,
'regression.*'.
o Add 'regression.securelevel_nonmonotonic', conditional on 'options
REGRESSION', which allows the securelevel to be lowered for the purposes
of efficient regression testing of securelevel policy decisions.
Regression tests for securelevels will be committed shortly.
NOTE: 'options REGRESSION' should never be used on production machines, as
it permits violation of system invariants so as to improve the ability to
effectively test edge cases, and improve testing efficiency.
deischen [Sun, 7 Oct 2001 02:34:43 +0000 (02:34 +0000)]
Limit maximum poll interval to 60 seconds. This prevents an overflow
from occurring when converting from a timeval/timespec to a timeout in
milliseconds.
marcel [Sun, 7 Oct 2001 00:16:31 +0000 (00:16 +0000)]
Fix breakage caused by previous commit. The lkmnosys and lkmressys
syscalls are of type NODEF but not in a way that fits the given
definition of that type. The exact difference of lkmressys and
lkmnosys is unclear, which makes it all the more confusing. A
reevaluation of what we have and what we really need is in order.
Spotted by: Maxime Henrion <mux@qualys.com>
Pointy hat: marcel
mjacob [Sat, 6 Oct 2001 19:19:24 +0000 (19:19 +0000)]
Respect QLogic's errata- read BIU_ISR even on the 2300
to see if there's an interrupt (avoids PCI parity errors
which can occur on the 2312 if you access some registers
from the host at the same time the RISC on the 2312 is
C accessing them).
nyan [Sat, 6 Oct 2001 16:27:21 +0000 (16:27 +0000)]
- Moved the bus_dma declarations from bus_{at386,pc98}.h into bus_dma.h.
(bus_dma.h is repo-copied from bus_at386.h)
- Added '#include <machine/bus_dma.h>' into bus.h for backward compatibility.
marcel [Sat, 6 Oct 2001 09:31:43 +0000 (09:31 +0000)]
o Change ia64_memory_address to explicitly take a u_int64_t
o Add memcpy_fromio, memcpy_io, memcpy_toio, memset_io,
memsetw and memsetw_io. I'm not sure this is the right
place for it, though.
fenner [Sat, 6 Oct 2001 05:02:11 +0000 (05:02 +0000)]
- Fix typo in "didn't find tag in list" code -- != should have been ==.
This fixes the panic when receiving a packet with an unknown tag, and
also allows reception of packets with known tags.
- Allow overlapping tag number spaces when using multiple hardware-assisted
VLAN parent devices (by comparing the parent interface in
vlan_input_tag() just as in vlan_input() ).
- fix typo in comment
bmah [Fri, 5 Oct 2001 22:03:35 +0000 (22:03 +0000)]
Add an abstract for this document, flesh out the introduction a
bit, and fix up the upgrading section. While I'm here, delete some
of the SGML comments that were left-over from merging the source
files.
jayanth [Fri, 5 Oct 2001 21:33:38 +0000 (21:33 +0000)]
Add a flag TF_LASTIDLE, that forces a previously idle connection
to send all its data, especially when the data is less than one MSS.
This fixes an issue where the stack was delaying the sending
of data, eventhough there was enough window to send all the data and
the sending of data was emptying the socket buffer.
Problem found by Yoshihiro Tsuchiya (tsuchiya@flab.fujitsu.co.jp)