read/write action. It would panic on a diagnosic assertion. When a scsi
read/write command fails, the whole extent is gone bad so mark all as not
done.
page being entered with pmap_kenter(), which does not record the mapping
in the pv table. Attempting to inhibit caching of that page as required
by the 68060 hardware no longer changes the PTE and caused varying degrees
of multiple faulting, sometimes resulting in an unusable system. Apparently
very few people attempted to run a 68060 based system since that change.
Fix to to change the caching bits directly rather than using pmap_changebit().
- Fix shmat return value on amd64: it uses no black magic with retval[0]
- Fix integer overflows in sysinfo
- Implement sysinfo, mmap2, sched_getparam, sched_getscheduler, mremap,
and madvise in COMPAT_LINUX32
- Fix improper types used in setgroups16/getgroups16
- Implement mmap2 for COMPAT_LINUX32
- Ifdef debug messages by DEBUG_LINUX
is still not working.)
cpu.h:
- add a pointer for DDB regs in SMP environment to struct cpu_info
- remove the #defines for mp_pause_cpus() and mp_resume_cpus()
cpuset.h:
- remove CPUSET_ALL() and rename CPUSET_ALL_BUT() to CPUSET_EXCEPT()
from petrov.
db_machdep.h:
- rename the members of db_regs_t to be the same as sparc
- change "db_regs_t ddb_regs" to "db_regs_t *ddb_regp" and change
all references to suit
- redo DDB_REGS to no longer be a pointer to a fixed data structure
but to one allocated per-cpu when ddb is entered
- move a bunch of prototypes in here
intr.h:
- remove SPARC64_IPI_* macros, no longer used
db_interface.c:
- change "db_regs_t ddb_regs" to "db_regs_t *ddb_regp" and change
all references to suit
- make "nil" a 64 bit entity
- change the ddb register access methods to work in multiprocessor
environment, it is now very much like sparc does it
- in kdb_trap() avoid accessing ddb_regp when it is NULL
- update several messages to include the cpu number
- unpause other cpus much later when resuming from ddb
- rename db_lock() to db_lock_cmd(), as the sparc-like code has
db_lock as a simple lock
- remove "mach cpus" command, and replace it with "mach cpu" (which
does the same) and also implement "mach cpu N" to switch to
another cpus saved trapframe
db_trace.c:
- update for the ddb_regs -> ddb_regp change
genassym.cf:
- add TF_KSTACK as offsetof(struct trapframe64, tf_kstack)
ipifuncs.c:
- overhaul extensively
- remove all normal interrupt handlers as IPI's, we now handle
them all specially in locore.s:interrupt_vector
- add a simplelock around all ipi functions - it's not safe for
multiple cpus to be sending IPI's to each other right now
- rename sparc64_ipi_pause() to sparc64_ipi_pause_thiscpu() and,
if DDB is configured, enable it to save the passed-in trapframe
to a db_regs_t for this cpu's saved DDB registers.
- remove the "ipimask" system (SPARC64_IPI_* macros) and instead
pass functions directly
- in sparc64_send_ipi() always set the interrupt arguments to 0,
the address and argument of the to be called function. (the
argument right now is the address of ipi_tlb_args variable, and
part of the reason why only one CPU can send IPI's at a time.)
don't wait forever for an IPI to complete. some of this is
from petrov.
- rename sparc64_ipi_{halt,pause,resume}_cpus() to
mp_{halt,pause,resume}_cpus()
- new function mp_cpu_is_paused() used to avoid access missing
saved DDB registers
- actually broadcast the flush in smp_tlb_flush_pte(),
smp_tlb_flush_ctx() and smp_tlb_flush_all(). the other end may
not do anything yet in the pte/ctx cases yet...
kgdb_machdep.c:
- rework for changed member names in db_regs_t.
locore.s:
- shave an instruction from syscall_setup() (set + ld -> sethi + ld)
- remove some old dead debug code
- add new sparc64_ipi_halt IPI entry point, it just calls the C
vector to shutdown.
- add new sparc64_ipi_pause IPI entry point, which just traps into
the debugger using the normal breakpoint trap. these cpus usually
lose the race in db_interface.c:db_suspend_others() and end up
calling the C vector sparc64_ipi_pause_thiscpu().
- add #if 0'ed code to sparc64_ipi_flush_{pte,ctx}() IPI entry
points to call the sp_ version of these functions.
- in rft_kernel (return from trap, kernel), check to see if the
%tpc is at the sparc64_ipi_pause_trap_point and if so, call
"done" not "retry"
- rework cpu_switch slightly: save the passed-in lwp instead of
using the one in curlwp
- in cpu_loadproc(), save the new lwp not the old lwp, to curlwp
- in cpu_initialize(), set %tl to zero as well. from petrov.
- in cpu_exit(), fix a load register confusion. from petrov.
- change some "set" in delay branch to "mov".
machdep.c:
- deal with function renames
pmap.c:
- remove a spurious space
trap.c:
- remove unused "trapstats" variable
- add cpu number to a couple of messages
when the bluetooth code is not expecting it to be. During a disconnect, we can
detach the channel that is being disconnected, but its not really safe to detach
any others.
is giving you. Also, while here, bump the threshold for "preposterous"
dates by 20 years. Now any date earlier than late 1994 is considered
preposterous.
hci_event.c:
- Convert memo->response.clock_offset to host-endian.
hci_ioctl.c:
- printf format tweak (size_t)
hci_link.c:
- Convert memo->response.clock_offset from host-endian.
- Tweak a DIAGNOSTIC message.
l2cap_signal.c:
- In l2cap_recv_config_req(), rp->scid is little-endian so make sure
we convert from host-endian.
from scw@
- In hci_link_free(), do not unlink items from a LIST queue within
a LIST_FOREACH() iterator.
rfcomm_session.c:
- In rfcomm_session_recv_mcc_nsc(), do not unlink items from a LIST
queue within a LIST_FOREACH() iterator.
from scw@
- sco_getopt(..., SO_SCO_MTU, ...) expects the address of a uint16_t,
not an int. So change sc_mtu's type to uint16_t.
- Try a little harder to ensure btsco_round_blocksize() does not
return zero. Prevents a subsequent panic in audio_init_ringbuffer().
from scw@
inserted or removed. Refactor node insertion to not require rebalancing
all the time or a loop if it does. In rb_tree_swap_prune_and_rebalance,
don't call rb_tree_reparent_nodes, instead do the work ourselves (since
we will eventually undo half of the work of rb_tree_reparent_nodes).
the case of HZ!=100, and might be beneficial otherwise.
The set_timer_op in idle_block remains, to protect against a system_time
miscalculation's causing us to block without the timer set; so, while
there, spl-protect the processed_system_time read and set_timer_op.
remove pseudo-device btdev(4) and inherent limitations
add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.
btdevctl(8) and its cache is updated to handle new semantics
etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf
assumed that all the strings were stored in a row, separated by NUL chars,
at the address pointed bu argv[0] (or envp[0]).
This was wrong: if the program changed argvs[0], we still read the
first string correctly, but the next strings did contain unexpected data.
The fix: read the whole argv (or envp) array, then copy the string one by
one, using their addresses in argv (or agrp)
- fix a bunch of comments for proc->lwp
- remove old TRAPTRACE, NOT_DEBUG, etc. code that has bit-rotted
- put some older DEBUG code under NOT_DEBUG
- add a bunch of new debugging/tracing code ("KTR") that depends on
other changes not yet present.
used for hardclcok(9). Old code is still left for reference.
XXX: possibly problematic if hardclock(9) is blocked more than 1/HZ,
XXX: but old microtime(9) implementation also had the similar problem.
from Mark Kettenis of OpenBSD. There are still some outstanding
issues with this driver, namely:
- Checksum offload is unsupported
- There is a significant amount of code duplication from sk(4)
- There remain some 'magic numbers'
- Performance is not heavily tested, and likely to be lower than
the chip is capable of in some cases. Syncing some of the
aforementioned 'magic numbers' with the Marvell FreeBSD driver
should help here.
Tested on a motherboard with Marvell 88E8053 ethernet, under NetBSD/i386
and NetBSD/amd64.
functions to a separate rb_tree_ops structure. Make every int explicit
in being signed or unsigned. Use RBDEBUG to enable debug code. Move
rbt_count to RBSTATS. Use RBSMALL to not keep track of min/max.
with some tweaks (add a comment and macro):
Handle odd byte case correctly in (ETHER_MIN_LEN-ETHER_CRC_LEN) padding
so that bus_space_set_region_2() won't be called with count==0.
converted the platform to use the MIPS3 cp0 for the hardclock interrupt yet,
but that should be done as well. In the meantime, there are no functional
changes.
useful. The functions delay, cpu_initclocks, and setstatclcokrate have been
renamed to mips3_delay, mips3_initclocks, and mips3_setstatclockrate.
We provide weak aliases for the original names, so machdep code doesn't have
to provide wrapper routines. (Giving good performance.)
I've moved mips3_clockintr, mips3_initclocks, and mips3_setstatclockrate to
their own mips3_clockintr file, because some ports may not be able to use
these, and its senseless to carry that baggage.
- Add a few scopes to the kernel: system, network, and machdep.
- Add a few more actions/sub-actions (requests), and start using them as
opposed to the KAUTH_GENERIC_ISSUSER place-holders.
- Introduce a basic set of listeners that implement our "traditional"
security model, called "bsd44". This is the default (and only) model we
have at the moment.
- Update all relevant documentation.
- Add some code and docs to help folks who want to actually use this stuff:
* There's a sample overlay model, sitting on-top of "bsd44", for
fast experimenting with tweaking just a subset of an existing model.
This is pretty cool because it's *really* straightforward to do stuff
you had to use ugly hacks for until now...
* And of course, documentation describing how to do the above for quick
reference, including code samples.
All of these changes were tested for regressions using a Python-based
testsuite that will be (I hope) available soon via pkgsrc. Information
about the tests, and how to write new ones, can be found on:
http://kauth.linbsd.org/kauthwiki
NOTE FOR DEVELOPERS: *PLEASE* don't add any code that does any of the
following:
- Uses a KAUTH_GENERIC_ISSUSER kauth(9) request,
- Checks 'securelevel' directly,
- Checks a uid/gid directly.
(or if you feel you have to, contact me first)
This is still work in progress; It's far from being done, but now it'll
be a lot easier.
Relevant mailing list threads:
http://mail-index.netbsd.org/tech-security/2006/01/25/0011.htmlhttp://mail-index.netbsd.org/tech-security/2006/03/24/0001.htmlhttp://mail-index.netbsd.org/tech-security/2006/04/18/0000.htmlhttp://mail-index.netbsd.org/tech-security/2006/05/15/0000.htmlhttp://mail-index.netbsd.org/tech-security/2006/08/01/0000.htmlhttp://mail-index.netbsd.org/tech-security/2006/08/25/0000.html
Many thanks to YAMAMOTO Takashi, Matt Thomas, and Christos Zoulas for help
stablizing kauth(9).
Full credit for the regression tests, making sure these changes didn't break
anything, goes to Matt Fleming and Jaime Fournier.
Happy birthday Randi! :)
* Stop fhandle memory leaks and use the correct fhandle dealloc routine
(thanks to Elad for these fixes)
* Remove include of kmem.h, it is not required.
on port-ews4800mips.
XXX: ews4800mips can't use mips/mips/mips3_clock.c for now because
it isn't configured to use internal clock interrupt for CPU INT 5,
i.e. mips3_clockintr() is not needed and its own cpu_initclocks(9)
is required.
pseudo array in the structure. The scsi command issued used
sizeof(scsipi_read_discinfo_data) but included thus the last byte that
wasn't going to be inspected anyway. Using the constant
READ_DISCINFO_BIGSIZE fixes the bug.
Even though SCSI adapters *should* accept odd lengths, the Sun U10
(sparc64's) crashes in bus_space_read_multi_stream_2(). That explains the
crash.
NOTE: somewhere in NetBSD/sparc64's atapibus support there is the
assumption on the even size; this needs to be fixed! (Hi Sparc64 portmaster
:-) )