and acquire the proctree_lock if needed first. Then we lock the process
if necessary and fiddle with it as appropriate. Finally we drop locks and
do any needed copyout's. This greatly simplifies the locking.
belong to a user virtual address; while this happens to work on some
architectures, it can't on sparc64, since user and kernel virtual
address spaces overlap there (the distinction between them is done via
separate address space identifiers).
Instead, look up the page in the vm_map of the process in question.
Reviewed by: jake
(apparently by markus@, at least committed by him). This has the
advantage of not using the bad IV's from Fluhrer/Mantin/Shamir as well
as bringing the drivers a little closer together.
Also use a few constants in place of magic numbers in one place.
Obtained from: OpenBSD 1.25, 1.28, 1.36, 1.38, 1.42
time we tell CAM to rescan the bus. Together with the previous patch
this should avoid the problem where the devices would wedge because they
got spoken to over two different pipes.
Tested by: Tomas Pluskal <plusik@pohoda.cz>
up the module_path string, we would walk one past the end of the buffer.
This hurting ia64 originally, but it was probably also happening on i386
occasionally as well. The effects were usually harmless, it would add
bogus "binary" search directories to the places it actually looked for
files.
the S_IFREG bit for regular files. This caused the path search code to
skip it when it finally did find the kernel (after the common/module.c
buffer overrun bug was fixed)
wrote. This code was for 4.5-release, so I've ported it to -current
and made a few minor tweaks. The biggest non-style tweak was to not
make access point the default.
More changes will be needed to get this actually working, but I wanted
to get a relatively pure baseline. This doesn't seem to break what
works now.
the same thing as the SMC 1211, but with their own vendor ID.
Update the device list to support this NIC. (Discovered these
cards lying around the lab at work.)
the indentation more like the other multi-line assembley in
this file.
Someone who understands gcc constraints could update the
constraints for do_cpuid.
o Recent changes to osigreturn() and sigreturn() have made them MPSAFE. Add
a comment to this effect.
Submitted by: bde (bullet #1)
Reviewed by: jhb (bullet #2)
without a few patches for the rest of the kernel to allow the image
activator to override exec_copyout_strings and setregs.
None of the syscall argument translation has been done. Possibly, this
translation layer can be shared with any platform that wants to support
running ILP32 binaries on an LP64 host (e.g. sparc32 binaries?)
to be sure that it is always correct and this was not true for the first
call to cpu_switch. When thread0 resumed later, it ended up calling
pmap_install with a null pmap, which is bad.
_BYTE_ORDER. These are far more useful than their non-underscored
equivalents as these can be used in restricted namespace environments.
Mark the non-underscored variants as deprecated.
attachment after boot in some cases where the device gets confused if
spoken to over two different pipes simultaneously (resulting in TIMEOUT
errors on requesting INQUIRY data).
This solution is far from perfect, as after umass_attach has returned
the USB stack fetches the string descriptors in order for creating the
event that is sent to userland. It just makes the chances of collisions
less likely.
Tested by: Tomas Pluskal <plusik@pohoda.cz>
This hack turns out to be a bad idea. Many auto configuration scripts
will #include a bunch of system headers, run it through cpp and then
grep/sed to see if there was really a prototype. The regular
expressions that are used to test this didn't accept all possible
legal ANSI-C prototypes. In particular, they didn't accept the ()
around ioctl. Several different programs do this, so eliminating the
parans will keep FreeBSD maximally compatible with other systems.
Appologies to: obrien (he was right in the end)
This potentally breaks some ports (and fixes vim and others that
haven't been fixed to deal with the parens).
so it can use td_ucred.
- Push Giant down into the end of settime() where we actually set the time
on the timecounter and time of day clock.
- Remove Giant from clock_settime().
- Push Giant down in settimeofday() to just protect the 'tz' global
variable.
submitter, this permits Russian (and probably other locales') characters
to be entered via watch(8).
PR: 35636
Submitted by: Gleb Smirnoff <glebius@rinet.ru>
the card for command completion.
digi_delay() uses either tsleep() or DELAY() depending on the value of
``cold''.
Pointed in the right direction by: jhb
calling ioctl(SIOC[AS]IFADDR).
This allows the following:
ifconfig xx0 inet 1.2.3.1 netmask 0xffffff00
ifconfig xx0 inet 1.2.3.17 netmask 0xfffffff0 alias
ifconfig xx0 inet 1.2.3.25 netmask 0xfffffff8 alias
ifconfig xx0 inet 1.2.3.26 netmask 0xffffffff alias
but would (given the above) reject this:
ifconfig xx0 inet 1.2.3.27 netmask 0xfffffff8 alias
due to the conflicting netmasks. I would assert that it's wrong
to mask the EEXIST returned from rtinit() as in the above scenario, the
deletion of the 1.2.3.25 address will leave the 1.2.3.27 address
as unroutable as it was in the first place.
Offered for review on: -arch, -net
Discussed with: stephen macmanus <stephenm@bayarea.net>
MFC after: 3 weeks
This change allows bootp to work with more than one interface, at the
expense of some rather ``wrong'' looking code. I plan to MFC this in
place of luigi's recent #ifdef BOOTP stuff that was committed to this
file in -stable, as that's slightly more wrong that this is.
Offered for review on: -arch, -net
MFC after: 2 weeks
Add the card name to the error message for the first initialisation
failure, giving us more info about what was actually discovered.
This code has been tested by Robert Suetterlin <robert@mpe.mpg.de>
to work on a PCI Xem card.
linker_search_module().
Without this, modules loaded from loader.conf that then try to load
in additional modules (such as digi.ko loading a card's BIOS) die
badly in the vn_open() called from linker_search_module().
It may be worth checking (KASSERTing?) that rootdev != NODEV in
vn_open() too.
mod_depend * (which may be NULL). The only consumer of this
function at the moment is digi_loadmoduledata(), and that passes
a NULL mod_depend *.
In linker_reference_module(), check to see if we've already got
the required module loaded. If we have, bump the reference count
and return that, otherwise continue the module search as normal.
is called.
- Change sysctl_out_proc() to require that the process is locked when it
is called and to drop the lock before it returns. If this proves too
complex we can change sysctl_out_proc() to simply acquire the lock at
the very end and have the calling code drop the lock right after it
returns.
- Lock the process we are going to export before the p_cansee() in the
loop in sysctl_kern_proc() and hold the lock until we call
sysctl_out_proc().
- Don't call p_cansee() on the process about to be exported twice in
the aforementioned loop.
p_pgrp since the pgrp locking went in. We also don't need it to check for
invalid values in the options argument to wait1(), so push Giant down
slightly.
drivers with MI portions into the MI notes. Device drivers such as busses
like the isa, eisa, and pci devices are now in the MD NOTES section even
though they have some MI code. This will ensure that only the proper bits
of device drivers will be included due to the optional bits dependent on
the busses in sys/conf/files. This commit also takes the stance that since
hints are ignored in NOTES anyways, it is ok to include hints for a bus
that may not be present.
Advice from: bde
behavior by default. Also, change the options line to reflect this.
If there are no problems reported this will become the only behavior and the
knob will be removed in a month or so.
Demanded by: obrien
While it may have allowed the XFree86 4 port to build; it killed TONS
of other ports. The XFree86 4 can be patched to not use its macro a lot
easier than figuring how to deal with 1000 other now-broken ports.
and add some compatibility defines. Add fields for ins and locals to
struct reg also for the same reason; these aren't filled in yet because
getting at those registers sucks and I'd rather not save them in the
trapframe just for this. Reorder struct reg to be ABI compatible as
well. Add needed include of machine/emul.h.
This gets pmdb (poor man's debugger) from OpenBSD mostly compiling but it
doesn't work yet :(
newer ultras and probably other sun machines. This is a pretty decent
chip with 32 byte read and write fifos and support for many higher baud
rates. It supports hdlc and sdlc as well as asynchronoue serial, but the
goal here is just decent serial console support for the sparc64 port, so
these modes are not expected to be supported. So far this only has support
for the low level routines used by kernel printf and thus ddb over serial,
a character device which can be used for login consoles has not yet been
written.
3.The only thing worse than generalizing from one example
is generalizing from no examples at all.
Remove the fwcylinders attribute before anybody gets the idea that we
alone have squared the circle.
Sponsored by: DARPA & NAI Labs.
didn't like the wait argument and that if you were removing a zone it had
better be empty.
Also, I broke out part of hash_expand and made a seperate hash_free() for use
in uma_zdestroy.
never held across blocking operations. Also, fix two other lock order
reversals that were exposed by jhb's witness change.
The free path previously had a bug that would cause it to skip the free bucket
list in some cases and go straight to allocating a new bucket. This has been
fixed as well.
These changes made the bucket handling code much cleaner and removed quite a
few lock operations. This should be marginally faster now.
It is now possible to call malloc w/o Giant and avoid any witness warnings.
This still isn't entirely safe though because malloc_type statistics are not
protected by any lock.
relating to extreme low memory situations occured. This was only ever seen on
the port build cluster, so many thanks to kris for helping me debug this.
Tested by: kris