Clean up and style(9) SPX code prior to significant functional changes
being committed:
- Wrap comments more evenly on right border.
- Clean up braces.
Also, along similar lines:
- Assert some pointers are non-NULL before dereferencing them.
- Remove one assertion that looks, on face value, poor.
Admit to ourselves that we don't actually implement pr_ctlinput() for
IPX or SPX, as the code in the implementing functions is essentially
a no-op. Replace with a comment indicating we don't implement these
currently.
In spx_attach() and spx_detach(), there is no need to check whether the
ipxpcb is NULL or not: in attach it will be, and on detach it won't be.
If for any reason these invariants don't hold true, panicking is a good
idea.
Noticed by: Coverity Prevent analysis tool
Comment that raw output filter code for IPX should run in a netisr so as
to avoid recursing the socket code, as this input path can run in the
call stack of an output path.
Move spx_savesi from being a global variable to an automatically allocated
variable on the spx_input() stack. It's not very large, and this will
avoid parallelism issues when spx_input() runs in more than one thread at
a time.
Adjust minimum iod threads from 4 to 0 -- since we compile the NFS
client into the kernel by default, and many users won't use NFS,
don't start an extra 4 kernel threads that are unused. Once NFS
becomes active, it will start nfsiod's as it needs them.
We might consider mandating a minimum iod's equal to the number of
active NFS mounts (truncated to some value), which would force some
to remain available without having to create a new one if the file
system is mostly inactive.
PR: 70880
Prodded by: cel
Head nod: peter
Pointed out by: Joe <fbsd_user at a1poweruser dot com>
sys/sparc64/sparc64/trap.c 1.80 (partial)
- s,tramoline,trampoline, in a comment.
- Use FBSDID in trap.c
- Make the global trap_sig[] static as it's not used outside of trap.c.
- Sync cpu_thread_siginfo() and sendsig() with the other archs; for fast
data access MMU miss and data access protection traps set ksi_addr to
the SFAR reg which contains the faulting address and otherwise to the
TPC reg. Generally the TCP reg contains the address of the instruction
that caused the exception, except for fast instruction access traps
(and some others; more refinement may be needed here) it also contains
the faulting address.
Previously, sendsig() always set si_addr to the SFAR reg which is wrong
for most traps and cpu_thread_siginfo() didn't set it at all.
- In sendsig() add support for FreeBSD old-style signals.
Revert the (int *) -> (intptr_t *) conversion done as part of rev. 1.59
(MFC'ed in rev. 1.55.2.3) for IOCTLs where casting data to intptr_t *
isn't the right thing to do, fixing tap(4) on big-endian LP64 machines.
Note that this is not the exact right place for this code since it runs
a little earlier than the normal reset SYSINIT. However, it appears to
work fine and can be backed out if it causes problems.
showing lockmgr) encountered with "make -jX release" for X > 1
and running on SMP hardware are gone once PREEMPTION is disabled.
Better ideas on fixing the problem are more than welcome.
When allocating a bucket to hold a free'd item in UMA fails, don't
report this as an allocation failure for the item type. The failure
will be separately recorded with the bucket type. This may eliminate
high mbuf allocation failure counts under some circumstances, which
can be alarming in appearance, but not actually a problem in
practice.
Reported by: ps, Peter J. Blok <pblok at bsd4all dot org>,
OxY <oxy at field dot hu>,
Gabor MICSKO <gmicskoa at szintezis dot hu>
This is a RELENG_6_1 merge candidate.
Tested by: Peter J. Blok <pblok at bsd4all dot org>,
OxY <oxy at field dot hu>,
Michael Butler <imb at protected-networks dot net>
Use only lower 64bit of src/dest (and src/dest port) for hashing of IPv6
connections and get rid of the flow_id as it is not guaranteed to be stable
some (most?) current implementations seem to just zero it out.
PR: kern/88664
vmspace_exitfree() and vmspace_free() which could result in the same
vmspace being freed twice.
Factor out part of exit1() into new function vmspace_exit(). Attach
to vmspace0 to allow old vmspace to be freed earlier.
Add new function, vmspace_acquire_ref(), for obtaining a vmspace
reference for a vmspace belonging to another process. Avoid changing
vmspace refcount from 0 to 1 since that could also lead to the same
vmspace being freed twice.
Change vmtotal() and swapout_procs() to use vmspace_acquire_ref().
- When setting up a packet for transmit, if we the tx ring is over half
full, kick the binary blob to force it to complete any pending tx
completions.
- In the watchdog routine, poke the binary blob to force it to flush any
pending tx completions and only reset the chip if the blob doesn't
complete any of them.
Correct a bug in the handling of backslash characters in smbfs which can
allow an attacker to escape from a chroot(2). [2]
Security: FreeBSD-SA-06:15.ypserv [1]
Security: FreeBSD-SA-06:16.smbfs [2]
mimicing the NFS reference implementation.
NFS over TCP does not need fast retransmit timeouts, since network loss
and congestion are managed by the transport (TCP), unlike with NFS over
UDP. A long timeout prevents the unnecessary retransmission of non-
idempotent NFS requests.
Reviewed by: mohans, silby, rees?
Sponsored by: Network Appliance, Incorporated
the estimator to be more easily tuned and maintained.
There should be no functional change except there is now a lower limit
on the retransmit timeout to prevent the client from retransmitting
faster than the server's disks can fill requests, and an upper limit
to prevent the estimator from taking too long to retransmit during a
server outage.
Reviewed by: mohan, kris, silby
Sponsored by: Network Appliance, Incorporated
for nfsclient and nfs4client in order to prevent local root users
from panicing the system.
MFC of nfs4client/nfs4_dev.c revision 1.9.
PR: kern/77463
Submitted by: Wojciech A. Koszek
Reviewed by: cel, rees
Security: Local root users can panic the system at will
Sponsored by: Network Appliance, Incorporated
In devfs_first(), set mp->mnt_opt to a valid empty list of mount options
instead of leaving it NULL. This eliminates a kernel panic
when trying to do a mount -o update of /dev.
Noticed by: cjsp
Reviewed by: phk
I encountered repeatable Unaligned access panics similar to:
fatal kernel trap:
trap entry = 0x4 (unaligned access fault)
cpuid = 0
faulting va = 0xfffffc0000fae1c2
opcode = 0x28
register = 0x1
pc = 0xfffffc00004d07dc
ra = 0xfffffc00004d0a1c
sp = 0xfffffe0031875bc0
curthread = 0xfffffc007da237a0
pid = 2, comm = g_event
These occur when a floppy or a CD (the 6.1R install CD will do in most
cases) is in the drive during boot. A floppy or CD inserted *after*
the system was booted did not give me this problem. Interestingly
enough booting from the 6.1-R install CD sometimes caused the crash,
sometimes it did not. When it did not panic an installation of 6.1-R
was possible without any incidents. A subsequent boot from HD with
the CD still present sometimes(...) worked fine, sometimes paniced.
Taking GEOM_GPT out of the kernel config file allows booting without
incidents. We do not need GPT on Alpha, so this is the easy way out.
Discussed with: phk
: /usr/src/sys/i386/acpica/acpi_wakecode.S:35:19: assym.s: No such file or directory
: /usr/src/sys/i386/acpica/acpi_wakecode.S: Assembler messages:
: /usr/src/sys/i386/acpica/acpi_wakecode.S:103: Error: suffix or operands invalid for `ljmp'
Reported by: many