In pass1(), cap inosused to fs_ipg rather than allowing arbitrary
number read from cylinder group. Chances that we read a smarshed
cylinder group, and we can not 100% trust information it has
supplied. fsck_ffs(8) will crash otherwise for some cases.
PR: bin/138043
Reminded by: mckusick
used within FreeBSD base system only, and discourage user applications
from using it. User applications should use the expat version from the
ports/package collection.
Reviewed by: simon (earlier version)
by doing the work in a programmatical way. This is an
accumulative patch of the following changes:
Makefile: 1.46-1.53
bzipfs.c: 1.7
as well as removal of the now unneeded files.
stdio is currently limited to file descriptors not greater than
{SHRT_MAX}, so {STREAM_MAX} should be no greater than that. (This
does not exactly meet the letter of POSIX but comes reasonably close
to it in spirit.)
When killing a user process from DDB, check that the requested signal is
> 0 rather than >= 0, or we will panic when trying to deliver the signal.
PR: 100802
Submitted by: Valerio Daelli <valerio.daelli at gmail.com>
Reserve two bytes at the end of the DDB input line in db_readline() to
hold the newline and nul terminator. Otherwise, there are cases where
garbage may end up in the command history due to a lack of a nul
terminator, or input may end up without room for a newline.
PR: 119079
Submitted by: Michael Plass <[email protected]>
When redrawing an input line, count backspaces to get to the beginning of
the input field from the current cursor location, rather than the end of
the input line, as the cursor may not be at the end of the line.
Otherwise, we may overshoot, overwriting a bit of the previous line and
failing to fully overwrite the current line.
PR: 119079
Submitted by: Michael Plass <[email protected]>
commas due to our deconstruction of the line in cf/feature/dnsbl.m4.
PR: 120038
Submitted by: mattijs vreeling
Revision Changes Path
1.36 +1 -1 src/etc/sendmail/freebsd.mc
Fix calculation of descriptor tag checksums. According to ECMA-167, Part 4,
7.2.3, bytes 0-3 and 5-15 are used to calculate the checksum of a descriptor
tag.
Approved by: emax (mentor)
date: 2008/01/12 00:54:47; author: delphij; state: Exp; lines: +4 -0
Plug memory leaks that is observed when argbuf or argspc is used in the
context.
Submitted by: Michal Vranek <michal.vranek seznam cz>
PR: bin/118380
date: 2008/01/12 00:11:26; author: delphij; state: Exp; lines: +4 -4
- Handle the case where interface from "middle" is missing by
more carefully inspecting the return value from sysctl(3). [1]
- Use calloc instead of malloc+memset of zero.
Submitted by: Alexander Chernikov <admin su29 net> [1]
PR: bin/119581
MFC after: 2 weeks
Import two binutils header files from FSF 2.15 branch.
These fix binutils compilation on i386/amd64 with GCC 4.1 and
have no other effect.
This fixes RELENG_5 build on RELENG_7/HEAD.
1. Determine the location of the rndc* binaries relative to $command
2. Make the stop routine work more like rc.subr's, but try rndc first
3. Allow the rndc.key file to be owned by root OR the named_uid user
Teach makewhatis.c to treat .SS with the same severity as .SH.
At least one port (net-mgmt/net-snmp) creates man-pages which are
in the format:
.SH NAME
The Net-SNMP agent \- The snmp agent responds to SNMP queries from manag
ement stations.
.PP
.SS "Modules"
At this moment, makewhatis determines the end of the .SH NAME section
as where it finds .SH again, but there is none here, is it "terminated"
by the .SS.
PR: bin/116706
Submitted by: edwin@
Dutch calendar
More dates: Sint Maarten, Dierendag, Trinitatis
Fix spelling: Carnaval
Add more of the Royal Family.
Croation calendars:
Update to calendar/calendars/hr_HR.ISO_8859-2/calendar.praznici
with fixes and new dates.
PR: conf/26658
Submitted by: Josip Rodin <[email protected]>
Original PR description:
man(1) can't handle compressed included files.
Some ports will install with compressed manpages. man handles
this by looking for the .gz version of a man source file.
It is also common to include other files with the .so
directive where commands or functions share a man page.
Traditionally ports have had to handle this by either not
compressing the manpages, or using the _MLINKS macro in the
port makefile to create symlinks to the actual source file,
rather than using .so versions. Notably, the current version
of Xorg port breaks. See ports/113096 and ports/115845.
PR: bin/115850
Submitted by: Callum Gibson <[email protected]>
Make zoneinfo optional so that a filesystem upgrade/update does not overwrite
possibly installed thirdparte zoneinfo databases (from ports for example).
Submitted by: Mark Andrews <Mark_Andrews at isc dot org> (original patch
rewritten by me to be more consistent with the new practise).
Approved by: re (kensmith)
Approved by: imp (mentor)
Reviewed by: ru (some time ago already)
Approved by: imp (mentor, implicit MFC)
jails with custom fstab's from starting due to use of incorrect
variable. [1]
Correct buffer overflow in tcpdump(1). [SA-07:06]
Reported by: Joel Hatton <[email protected]> [1]
Security: FreeBSD-SA-07:06.tcpdump
The DNS query id generation is vulnerable to cryptographic
analysis which provides a 1 in 8 chance of guessing the next
query id for 50% of the query ids. This can be used to perform
cache poisoning by an attacker.
This bug only affects outgoing queries, generated by BIND 9 to
answer questions as a resolver, or when it is looking up data
for internal uses, such as when sending NOTIFYs to slave name
servers.
All users are encouraged to upgrade.
See also:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-2926
tar archives, including a potentially exploitable buffer overflow.
Approved by: so (cperciva)
Reviewed by: kientzle
Security: FreeBSD-SA-07:05.libarchive
o For this change I needed to modify a little extra, since the RELENG_5 version
works different then the RELENG_6 or HEAD version that we currently have.
I "backported" the -n change to RELENG_5 as well, without modifying the
current behaviour for the other options etc.
-n is used by newfs to tell "do not generate a .snap directory" instead of
specifying rotational-positions, reflect that in the command arguments.
PR: bin/110178
Submitted by: Alex Kozlov <spam at rm-rf dot kiev dot ua>
Approved by: imp (mentor)
Approved by: imp (mentor, implicit)
Correct corrupt read when the read starts at a non-aligned offset.
PR: kern/77234
Approved by: imp (mentor)
Requested by: many many people
Submitted by: Andriy Gapon <avg at icyb dot net dot ua>
Approved by: imp (implicit, mentor)
MFC: You can never have enough documentation.
Document the SENDMAIL_ALIASES, SENDMAIL_MAP_SRC, SENDMAIL_MAP_TYPE, and
SENDMAIL_START_SCRIPT
.Xr make.conf 5
variables.
These are used in
.Pa /etc/mail/Makefile .
PR: conf/40548
Revision Changes Path
1.140 +40 -0 src/share/man/man5/make.conf.5
/etc/rc.d/sendmail whether or not to run newaliases if the database
is missing or the aliases text file is newer than aliases.db.
In my opinion, the aliases file should never be automatically rebuilt.
The current text form could represent a work in progress. Therefore,
in FreeBSD 7.0, this new option will default to "NO". When this rc.d
change is MFC'ed, it will need to remain "YES" to maintain backward
compatibility.
PR: conf/86252
Approved by: re (kensmith)
MFC after: 3 days
Revision Changes Path
1.316 +1 -0 src/etc/defaults/rc.conf
1.17 +10 -8 src/etc/rc.d/sendmail
1.1039 +6 -0 src/release/doc/en_US.ISO8859-1/relnotes/article.sgml
cleanup about the reassembly structures and routine:
- removed unused structure members
- fixed a minor bug that the ECN code point may not be restored correctly
Approved by: ume (mentor)
src/sys/netinet6/frag6.c: 1.31
src/sys/netinet6/ip6_var.h: 1.38
- Disabled responding to NI queries from a global address by default as
specified in RFC4620. A new flag for icmp6_nodeinfo was added to enable the
feature.
- Also cleaned up the code so that the semantics of the icmp6_nodeinfo
flags is clearer (i.e., defined specific macro names instead of using
hard-coded values).
Approved by: gnn (mentor)
src/sys/netinet/icmp6.h: 1.21
src/sys/netinet6/icmp6.c: 1.76
src/sys/netinet6/in6_proto.c: 1.43
Reduce the default number of header options that the IPv6 protocol
stack will process from 50 to 15. As this is a sysctl variable it
can be tuned up or down at the user/administrator's whim.
to disable the processing of Route Header Type 0 options in IPv6.
This is not really an MFC because currently in HEAD the processing
of these options is disabled unilateraly pending discussion at the IETF
on the future of such headers.
Suggested By: itojun
Reviewed By: jinmei
update. Unfortunately, this problem (the need to recompile filters) was
found after the MFC. The release engineering team has asked for this
instead of doing a full backout of sendmail 8.14 in the RELENG_[456]
branches.
Requested by: re (bmah)
Try to silence Coverity by adding (void) in front of function call.
Also add a comment, explaining why return value is not being checked.
Requested by: netchild
Check that the length of the received message is at least as big as a PDU
before we use pdu->len.
While I'm here, sync up code with RELENG_6 and CURRENT.
Submitted by: Iain Hibbert
Remove hard-coded limit (200) on maximum number of packages that can be
added with a single invocation of pkg_add, replacing it with something
rather more dynamic.
Fix a typo in ata-queue.c
PR: kern/107100
Submitted by: Stephen J. Roznowski <sjr at comcast dot net>
Approved by: sos
and
Add the SMART command to the ATA instruction set.
When the disk has an error, it will now print SMART
instead of 'Unknown CMD'.
PR: kern/93368
Submitted by: Garry Belka <garry at NetworkPhysics dot COM>
Approved by: sos
Approved by: sos (implicitly with the two previous commits).
Retest tp->t_session because Giant might have been temporarily dropped
while waiting for proctree_lock, allowing for an intervening tty_close()
that cleared tp->t_session.
Submitted by: tegge
group to read kernel memory. [1]
Disable handling of GNUTYPE_NAMES tar file entries by default,
since they can be used to extract files outside of the cwd. [2]
Security: FreeBSD-SA-06:25.kmem [1]
Security: FreeBSD-SA-06:26.gtar [2]
since if you're compiling the base with this upgraded, you've already
got your openssl upgraded, but it's a good idea to include this for
completeness sake.
- Add new service class definitions and a new attribute identifier definition
- Update URL of the Assigned Numbers document for SDP
Approved by: emax (mentor)
Add missing parentheses to fix a segmentation fault that is easily
reproducable with `jot -s " " 400 1 | column -t'. The bug was present
in the the original CSRG 'column -t' added in 1989.
Correct multiple denial-of-service vulnerabilities in BIND related to
SIG Query Processing and Excessive Recursive Queries. [2]
Security: FreeBSD-SA-06:19.openssl [1]
Security: FreeBSD-SA-06:20.bind [2]
In rev. 1.2 we have introduced a fallback handler for files with unknown
extensions. This seems to be unnecessary and prevents less(1) from being
able to detect file changes, so remove the part.
Submitted by: Eric Huss <e-huss netmeridian com>
PR: bin/102624
Discussed with: des
- Do not leak memory while flushing rules.
Noticed by: yar
- Remove useless NULL pointer check: we are using M_WAITOK flag
for memory allocation.
Submitted by: Andrey Elsukov <bu7cher at yandex dot ru>
Handle failure to malloc() part of the thread structure.
PR: 83457
r1.118:
Allocate a thread's tcb last so it is easier to handle failures to
malloc() siginfo.
PR: 85468
1.28: Avoid moving onto a new line while testing syslog prios.
1.27: WARNS=6 cleanup.
1.26: Print a usage message if a non-option is specified.
1.25: Don't add integers to void pointers.
date: 2006/08/12 18:32:51; author: krion; state: Exp; lines: +1 -1
Fix "pkg_version -Io" coredump, if some packages have no origin at all
PR: bin/101932
Submitted by: novel, sat
|Note that when -d flag is used, mountd(8) will not detach from the
|controlling terminal.
|
|PR: docs/96660
|Submitted by: Jeff Ito <[email protected]>
In change 1.15, an arbitrary setting of the max RPC record size to
RPC_MAXDATASIZE was introduced. This is believed to have been debugging
code committed accidentally, although I've been unable to reach the
committer to confirm this. The effect was to limit the size of RPCs on
TCP and UDP to 9k, well below the default protocol limits in the libc
rpc code. This change simply removes these introduced limits, falling
back on the libc definitions.
PR: 88856
Reported by: Keith Bostic <bostic at sleepycat dot com>
Testing by: Susan LoVerso <sue at loverso dot southborough dot ma dot us>
Reveiwed by: cel, rees
Review timeout: alfred, mbr
Approved by: mbr
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]
usr.sbin/portsnap/portsnap/portsnap.8 revs 1.8-1.9,
usr.sbin/portsnap/portsnap/portsnap.sh revs 1.16-1.24:
* Allow "HTTP_PROXY" to be (mis)spelled "http_proxy".
* Add "-l descfile" option to portsnap, to merge local describes
output when building INDEX files.
* If a port directory is a symlink, remove the symlink when
extracting a new version of the port.
* Make portsnap's automatic mirror selection interoperate better
with HTTP proxies.
* Switch mirrors if the first mirror(s) selected fails.
* During mirror selection, parse the output of host(1) from
BIND 8 as well as BIND 9.
* NO_BIND -> WITHOUT_BIND in a comment.
PR: ports/93901, bin/96288
Sponsored by: FreeBSD security development fundraiser
no 5.6-RELEASE is planned at this time. The &release.next; entity may
go away in the future to help enforce this in release documentation.
Approved by: re (implicitly)
hardware/common/artheader.sgml 1.7 -> 1.8
installation/common/artheader.sgml 1.7 -> 1.8
(Not an exact MFC because the installation document was also missing
2005 in its copyright year list, which I added.)
PR: 97134
Approved by: re (blanket approval from hrs for RELENG_5 src/doc)
The removal of CIRCLEQ left four queue macro families, but one sentence
in the man page wasn't updated.
PR: docs/94938
Submitted by: Ed Schouten <[email protected]>
Approved by: re
Fix a one byte off error which causes "less" to crash if you view a
large file, jump to the end, scroll backwards with "b" and try to search
backwards afterwards.
Submitted by: Matthias Scheler
Approved by: re (hrs)
Fix ypwhich -m. This should be MFC'ed back at least as far as RELENG_5.
Submitted by: Gil Kloepfer <[email protected]>
PR: 64445
Approved by: re (scottl)
Correct bug that caused the completed "recovery" scb to have its
timer reset rather than the timer of an SCB still pending on the
controller after recovery completed. This should correct timeout
loops seen in the field.
This change seems to help with a hang we've seen in the field with
SCB timeout recovery.
Approved by: re
OK'ed by: gibbs
> Drop the languages we'll build docs for as part of the release down to
> just English due to a ISO size crisis for disc2. This is being done
> after consultation with the doceng folks, who basically agreed that
> of the two evils this is less evil than going with the -lite versions
> of gnome/kde. We are only doing this on RELENG_5/RELENG_6. On HEAD
> we plan to adjust sysinstall so there will be no packages at all on
> disc1/disc2 and we can have an arbitrary number of dedicated package
> discs but that seems like too much of a change for RELENG_5/RELENG_6
> particularly at this stage in the release.
Discussed with: re@, doceng@
Approved by: re (scottl)
rev. 1.3 src/sys/netipsec/xform.h, rev. 1.12 src/sys/netipsec/xform_ipip.c
Fix more stack corruptions on amd64.
Vararg functions have a different calling convention than regular
functions on amd64. Casting a varag function to a regular one to
match the function pointer declaration will hide the varargs from
the caller and we will end up with an incorrectly setup stack.
Entirely remove the varargs from these functions and change the
functions to match the declaration of the function pointers.
Remove the now unnecessary casts.
Also change static struct ipprotosw[] to two independent
protosw/ip6protosw definitions to remove an unnecessary cast.
PR: amd64/95008
Submitted by: Mats Palmgren
Approved by: re (scottl)
The following bug was just identified in OpenBSD and it looks like the same
bug exists in the other BSDen NFS servers.
A Linux client (don't know which version, but you can look at
http://bugzilla.kernel.org/show_bug.cgi?id=6256)
does a Setattr of mtime to the server's time, where the file is mode 0664 and
the client user has group access (ie. caller is not the file owner).
The BSD servers fail the Setattr with EPERM, since the VA_UTIMES_NULL flag
isn't set before doing the VOP_SETATTR.
It seems to me that this should be allowed, since it is allowed for a local
utimes(2). If so, the fix is to set VA_UTIMES_NULL for the
"set-time-to-server-time" cases of setting atime and/or mtime.
MFC of revision 1.140 to RELENG_5.
Submitted by: [email protected]
Reviewed by: cel
Approved by: re (scottl), silby
Remove manual assignment of m_pkthdr from one mbuf to another in
ipsec_copypkt(), as this is already handled by the call to
M_MOVE_PKTHDR(), which also knows how to correctly handle MAC m_tags.
This corrects a panic when running with MAC and KAME IPSEC.
PR: kern/94599
Submitted by: zhouyi zhou <zhouyi04 at ios dot cn>
Reviewed by: bz
Approved by: re (mux)
request, the FreeBSD NFS client will quickly back off to a excessively
long wait (days, then weeks) before retrying the request.
Change the behavior of the FreeBSD NFS client to match the behavior of
the reference NFS client implementation (Solaris). This provides a fixed
delay of 10 seconds between each retry by default. A sysctl, called
nfs3_jukebox_delay, is now available to tune the delay. Unlike Solaris,
the sysctl value on FreeBSD is in seconds, rather than in HZ.
MFC revision 1.136 to RELENG_5
Sponsored by: Network Appliance, Incorporated
Reviewed by: rick
Approved by: re (kensmith), silby
The client's READDIRPLUS logic skips the attributes and
filehandle of the ".." entry. If the server doesn't send
attributes but does send a filehandle for "..", the
client's logic doesn't account for the extra "value
follows" field that indicates whether the filehandle is
present, causing the remaining entries in the reply
to be ignored.
This is an MFC of 1.264 in the CURRENT branch.
Sponsored by: Network Appliance, Inc.
Reviewed by: rick, mohans
Approved by: re, silby
- When res_send() fails, we should reserve an error code.
- When res_nquerydomain() returns SERVFAIL, we should try next domain.
src/lib/libc/net/getaddrinfo.c: 1.75, 1.76
src/lib/libc/resolv/res_query.c: 1.3
Approved by: re (hrs)
The rpc.pcnfsd server was in the base for a little over seven
minutes back in 1994. Change the example entry to point at the
port, as per the entries for uucpd et al.
Approved by: re (kensmith)
Loopback pf_norm.c rev. 1.106 from OpenBSD:
fixup IP checksum when modifying IP header fields
PR: kern/93849
Obtained from: OpenBSD
Approved by: re (kensmith)
Correctly identify the user running opiepasswd(1) when the login name
differs from the account name. [2]
Modify timeout handling logic in sendmail(8) to correct a reported
signal handling race condition. [3]
Approved by: re (scottl)
Security: FreeBSD-SA-06:11.ipsec [1]
Security: FreeBSD-SA-06:12.opie [2]
Security: FreeBSD-SA-06:13.sendmail [3]
r1.30 etc/defaults/periodic.conf
r1.51 share/man/man5/periodic.conf.5 }
- Add a knob 'daily_status_security_diff_flags' controlling the
format of the 'diff' output generated during periodic(8) scripts.
- When looking for new lines in diff output, grep for '^[>+]' instead of
'^>', in order to catch both normal and unified diffs.
Approved by: re (hrs)
Rev: 1.261
Ensure that a thread stays on same CPU when calculating per CPU
TLB shootdown requirements. Otherwise a CPU may not get the needed
TLB invalidation.
The PTE valid and access flags can not be used here to avoid TLB
shootdowns unless sf->cpumask == all_cpus.
( Otherwise some CPUs may still hold an even older entry in the TLB)
Since sf_buf_alloc mappings are normally always used this is
also not really useful and presetting accessed and modified
allows the CPU to speculatively load the entry into the TLB.
Both bugs can cause random data corruption.
Rev: 1.262
Restore optimizations to reduce TLB shootdowns.
Alan Cox pointed out that they are really useful for
sendfile().
Rev: 1.263
Restore the UP optimization to reduce the number of TLB
invalidations. The previous revision only restored the MP optimization.
Describe the optimization strategy for TLB invalidations in a comment.
Approved by: re@ (scottl)
> date: 2006/03/17 02:05:46; author: kensmith; state: Exp; lines: +0 -5
> First pass at trimming package set down. Disc2 is still too big
> even with this but we're still deciding exactly what to do about
> that.
Approved by: re (scottl)
when interrupts are routed via phyiscal addressing to the BSP during boot.
Once we switch over to logical destinations, it uses low pri delivery mode
just as in earlier 5.x releases.
Tested by: kensmith
Approved by: re (scottl)
Further refine the bridge hack in the arp code. Only do the special arp
handling for interfaces which are actually in the bridge group, ignore all
others.
Approved by: re (hrs)
Check to see if the hash table is present in link_elf_lookup_symbol()
before dereferencing it. Certain corrupt kernel modules might not have
a valid hash table, and would cause a kernel panic when they were loaded.
Instead of panic'ing, the kernel now prints out a warning that it is
missing the symbol hash table.
Approved by: re (mux)
Now login.access(5) feature belongs to pam_login_access(8),
not to login(1), unlike it used to. This appears to apply
to RELENG_5, too.
Approved by: re (mux)
Two years ago, in rev. 1.12, a typo slipped in etc/isdn/Makefile:
a control variable was misspelled as `SCRIPTS_NAME_isdntel.sh'
(should've been `SCRIPTSNAME_isdntel.sh') when the Makefile was
converted to using <bsd.prog.mk>. Consequently, `isdntel.sh' has
been installed as `isdntel' since then. Nevertheless, nobody has
been unhappy with the change. So it's time to make it official.
Approved by: re (mux)
1.21 src/lib/libipsec/ipsec_set_policy.3
1.14 src/lib/libipsec/ipsec_strerror.3
1.17,1.18 src/share/man/man4/ipsec.4
Clean up some descriptions and remove ambiguities in the language.
Add explanations to the examples.
Approved by: re (scottl)
Fix for an inappropriate bzero of the ICMPv6 stats. The code was zero'ing the wrong structure member but setting the correct one.
Submitted by: James dot Juran at baesystems dot com
Approved by: re (scottl)
- Reduce needless DNS query by lookup only appropriate address
family.
- Specify appropriate hints to getaddrinfo(3).
- Obtain address family from peername in inetd mode.
Approved by: re (mux)
- Just query 'as is', if there is a trailing dot in the name.
- Don't query 'as is' twice.
lib/libc/net/getaddrinfo.c: 1.71
lib/libc/net/res_query.c: 1.31
Approved by: re (scottl)
Properly initialize args structure before passing it to ipfw_chk(): having
uninitialized args.inp is unhealthy for uid/gid/jail ipfw rules.
PR: kern/92589
Approved by: re (scottl)
Fix five years old bug in ip_reass(): if we are using 'full' (i.e. including
pseudo header) hardware rx checksum offloading ip_reass() fails to calculate
TCP/UDP checksum for reassembled packet correctly.
Reviewed by: sam (earlier version), bde
Approved by: re (scottl)
separation. [06:09]
Submitted by: des
Correct a remote kernel panic when processing zero-length RPC records
via TCP. [06:10]
Security: FreeBSD-SA-06:09.openssh
Security: FreeBSD-SA-06:10.nfs
Approved by: re (scottl)
Avoid kernel panic when attaching a process which may not be stopped
by debugger, e.g process is dumping core. Only access p_xthread if
P_STOPPED_TRACE is set, this means thread is ready to exchange signal
with debugger, print a warning if P_STOPPED_TRACE is not set due to
some bugs in other code, if there is.
The patch has been tested by Anish Mistry mistry.7 at osu dot edu, and
is slightly adjusted.
Approved by: re (scottl)
(The struct ip_fw_args is not touched to preserve ABI compatibility).
PR: kern/93754
Requested by: Joerg Pernfuss <elessar bsdforen.de>
Approved by: re (scottl)
- Use official version strings for LMP and HCI version reporting and add
version strings up to Bluetooth 2.0
- Update manufacturer list
Revisions:
hccontrol.h rev. 1.5
info.c rev. 1.4
link_control.c rev. 1.10
util.c rev. 1.6
Approved by: re (scottl), emax
to RELENG_5:
Add the ability to specify the boot2 serial console speed in
/boot.config or on the "boot:" prompt line via a "-S<speed>" flag,
e.g. "-h -S19200". This adds about 50 bytes to the size of boot2
and required a few other small changes to limit the size impact.
Approved by: re (scottl)
in syncache_lookup() is not cleared and may lead to an arbitrary and
bogus rtentry pointer which later gets free'd.
MFC: rev 1.84
Approved by: re (scottl)
Fix two important typos in watchdog handling:
- Restart watchdog if we *did* processed any descriptors. [1]
- Log the watchdog event if the link is *up*. [2]
PR: kern/92948 [1]
Submitted by: Mihail Balikov <mihail.balikov interbgc.com> [1]
PR: kern/92895 [2]
Submitted by: Vladimir Ivanov <wawa yandex-team.ru> [2]
Approved by: re (kensmith)
- Sync the list of supported chips with pcn_probe() as of sys/pci/if_pcn.c
rev. 1.77 (also applies to RELENG_%), i.e. remove Am53C974/Am79C970/
Am79C974 PCnet-PCI and Am79C970A PCnet-PCI II.
- Change the entry of the PCnet-Home in the list of supported chips to
match the other ones, i.e. s,PCnet/Home HomePNA,Am79C978 PCnet-Home,.
Approved by: re (scottl)
to :: if we have another PCB which is bound to 0.0.0.0. If a PCB has
the INP_IPV6 flag, then we set its cost higher than IPv4 only PCBs.
Approved by: re (scottl)
- Mention that users need to be in the wheel group to `su - root' by default, and how to change it.
PR: docs/70616
Submitted by: Jilles Tjoelker <jilles at stack dot nl>
Reviewed by: ru@
Approved by: ceri@
Fix minor bug in uRPF: if net.link.ether.inet.useloopback=1 and we send
broadcast packet using our own source ip address it may be rejected by
uRPF rules.
PR: kern/76971
Add bounds checking to the setenv part of the kernel environment.
This has no security implications since only root is allowed to use
kenv(1) (and corrupt the kernel memory after adding too much variables
previous to this commit).
This is based upon the PR [1] mentioned below, but extended to check both
bounds (in case of an overflow of the counting variable) and to comply
to the style of the function. An overflow of the counting variable
shouldn't happen after adding the check for the upper bound, but better
safe than sorry (in case some other function in the kernel overwrites
random memory).
An interested soul may want to add a printf to notify root in case the
bounds are hit.
Also allocate KENV_SIZE+1 entries (the array is NULL-terminated), since
the comment for KENV_SIZE says it's the maximum number of environment
strings. [2]
Reorder statements to avoid accessing unknown memory.
In theory, invoking kenv with very long string can panic
kernel.
PR: 83687 [1]
Submitted by: Harry Coin <[email protected]> [1]
The resource_xxx routines in subr_hints.c are called before and after the
kenv environment in kern_environment.c switches to dynamic kenv. The prior
call sets the static variable hintp to the static hints in subr_hints.c
(hintmode==0).
However, changes to the environment are not detected by the resource_xxx
lookups after the change to dynamic kernel environment, so the lookup
routines only report the old stuff of hintmode==0, even after the change to
the dynamic kenv. This causes kenv users to see a different environment than
the kernel routines.
This is a problem in the mixer.c code that looks up initial mixer volume
settings from the hints: If the hints are dynamic and not from the
device.hints file, mixer.c doesn't see them, but kenv does.
The patch from the PR (modified to comply to the style of the function)
solves this.
PR: 83686
Submitted by: Harry Coin <[email protected]>
Replace "fetch" with "fetch -r" when downloading the initial ~38MB
snapshot in order to avoid unnecessary re-downloading.
Remove the earlier "rm -f ${SNAPSHOTHASH}.tgz" to make this work.
if_ath.c:1.99 awi.c:1.39 if_bfe.c:1.26 if_bge.c:1.92 if_ed.c:1.255
if_em.c:1.67 if_ex.c:1.57 if_fe.c:1.92 if_fxp.c:1.242 if_gem.c:1.32
if_hme.c:1.38 if_ie.c:1.103 if_ndis.c:1.100 if_ixgb.c:1.12 if_lge.c:1.40
if_lnc.c:1.112 if_my.c:1.30 if_nge.c:1.76 if_nve.c:1.9 if_owi.c:1.11
pdq_ifsubr.c:1.27 if_ray.c:1.80 if_re.c:1.47 if_sn.c:1.47 dp83932.c:1.20
if_tx.c:1.90 if_txp.c:1.32 if_aue.c:1.91 if_axe.c:1.31 if_cue.c:1.58
if_kue.c:1.65 if_rue.c:1.22 if_udav.c:1.15 if_vge.c:1.15 if_wi.c:1.182
if_wl.c:1.67 if_xe.c:1.58 if_dc.c:1.161 if_de.c:1.167 if_pcn.c:1.70
if_rl.c:1.153 if_sf.c:1.83 if_sis.c:1.134 if_sk.c:1.107 if_ste.c:1.85
if_ti.c:1.108 if_tl.c:1.100 if_vr.c:1.105 if_wb.c:1.80 if_xl.c:1.193:
Modify device drivers supporting multicast addresses to lock if_addr_mtx
over iteration of their multicast address lists when synchronizing the
hardware address filter with the network stack-maintained list.
Note that with these changes, these drivers now depend on locking the global
if_addr_mtx, so binary modules of these drivers will not work on 5.4 or
earlier releases.
Approved by: rwatson (mentor)
rev. 1.39 sys/net/if_gre.c
rev. 1.21 sys/netinet/ip_gre.c rev. 1.4 sys/netinet/ip_gre.h
rev. 1.12 sys/netipsec/keysock.c rev. 1.3 sys/netipsec/keysock.h
rev. 1.32 sys/netkey/keysock.c rev. 1.9 sys/netkey/keysock.h
Fix stack corruptions on amd64.
Vararg functions have a different calling convention than regular
functions on amd64. Casting a varag function to a regular one to
match the function pointer declaration will hide the varargs from
the caller and we will end up with an incorrectly setup stack.
Entirely remove the varargs from these functions and change the
functions to match the declaration of the function pointers.
Remove the now unnecessary casts.
Lots of explanations and help from: peter
PR: amd64/89261
rmdir() fails with EINVAL if the last component of the path is "..".
Document the previously undocumented behaviour of rmdir(".") returning
EINVAL as required by POSIX and SUSv3. Bump the man page change date.
undelete() fails with EINVAL if the last component of the path is "..".
Bump the man page change date.
Original commit messages:
Log:
Track all lock relationships instead of pruning direct relationships
if an indirect relationship exists (keep both A->B->C and A->C).
This allows witness_checkorder() to use isitmychild() instead of
the much more expensive isitmydescendant() to check for valid lock
ordering.
Don't do an expensive tree walk to update the w_level values when
the tree is updated. Only update the w_level values when using the
debugger to display the tree.
Nuke the experimental "witness_watch > 1" mode that only compared
w_level for the two locks. This information is no longer maintained
at run time, and the use of isitmychild() in witness_checkorder
should bring performance close enough to the acceptable level that
this hack is not needed.
Report witness data structure allocation statistics under the
debug.witness sysctl.
Reviewed by: jhb
MFC after: 30 days
Log:
Relocate witness_levelall(), witness_leveldescendents(), and
witness_displaydescendants() so that they are protected by
"#ifdef DDB/#endif" to unbreak kernels not using "option DDB".
MFC after: 3 weeks
Return EINVAL from lookup() if cn_nameiop is DELETE or RENAME and
the last component of the path name is "..". This keeps VOP_LOOKUP()
from locking vnodes in reverse order.
In kern_unlink(), remap EINVAL errors returned from namei() to EPERM
to match existing (and POSIX required) behaviour.
from HEAD to RELENG_5:
Add a "comconsole_speed" loader variable that can be used to change
the serial console speed (i386 and amd64 only). If the previous
stage boot loader requested a serial console (RB_SERIAL or RB_MULTIPLE)
then the default speed is determined from the current serial port
speed. Otherwise it is set to 9600 or the value of BOOT_COMCONSOLE_SPEED
at compile time.
Approved by: rwatson (mentor)
them to userland. [1]
MFC rev. 1.16 of sys/contrib/pf/net/pf_norm.c: Correct an error in pf
handling of IP packet fragments which could result in a kernel panic. [2]
Security: FreeBSD-SA-06:06.kmem [1]
Security: FreeBSD-SA-06:07.pf [2]
r1.36:
Correct obsolete chown syntax.
r1.37:
If sysinstall was used to configure an anonymous FTP area, it
was possible for information to be copied from the group file to
the group file in the FTP area. This patch based on a patch
from Zak Johnson <zakj at nox dot cx>.
limits or global scoreboard limits are reached, or when memory
exhaustion occurs. This can occur when an existing hole fails to be
split due to limits or memory exhaustion.
Found by: Scott Wood <[email protected]>
Submitted by: Raja Mukerji <[email protected]>
Reviewed by: Mohan, Noritoshi, and Scott
sys/sparc64/pci/psychoreg.h 1.10 - 1.11,
sys/sparc64/pci/psychovar.h 1.13 - 1.14
Sync psycho(4) with HEAD expect for the UPA_RANGE_* -> OFW_PCI_RANGE_*
and PCI_CS_* -> OFW_PCI_CS_* changes in order to mainly obtain the
following changes:
- Add a workaround for the incorrect interrupt map entry for the EBus
bridge on E250 machines. [1]
- Register an interrupt handler for the spare hardware interrupt which
according to OpenSolaris is used as the over-temperature interrupt in
systems with Psycho bridges.
PR: 88279 [1]
contains incorrect fractional second values (outside the range
0-999999).
Prior to this change users could create files with values outside
that range. Moreover, on 32-bit machines tv_usec offsets larger than
4.3s would result in an unnormalized AND wrong timestamp value,
due to overflow.
Add a warning pointing out that incomplete ports trees are not
supported and that users of REFUSE directives should update their
entire ports tree before asking for help on the mailing lists.
Allow to use Time DPA20B 1GB MP3 Player [1]
Allow to use Qware BeatZkey! Pro [2]
PR: usb/81846 [1], usb/79164 [2]
Submitted by: Ruben de Groot <[email protected]> [1], Radek Kozlowski <[email protected]> [2]
Approved by: njl (implict)
few changes to preserve ABI compatibility.
subr_witness.c:1.196:
Add in_multi_mtx, igmp_mtx, and if_addr_mtx lock order to hard-coded
lock order in WITNESS, in that order.
in_var.h:1.54 in6_var.h:1.23 mld6.c:1.22:
Modify network protocol consumers of the ifnet multicast address lists
to lock if_addr_mtx.
igmp.c:1.49 in.c:1.86: in_var.h:1.55 ip_input.c:1.303 ip_output.c:1.243:
Introduce in_multi_mtx, which will protect IPv4-layer multicast address
lists, as well as accessor macros. For now, this is a recursive mutex
due code sequences where IPv4 multicast calls into IGMP calls into
ip_output(), which then tests for a multicast forwarding case.
For support macros in in_var.h to check multicast address lists, assert
that in_multi_mtx is held.
Acquire in_multi_mtx around iteration over the IPv4 multicast address
lists, such as in ip_input() and ip_output().
Acquire in_multi_mtx when manipulating the IPv4 layer multicast
addresses, as well as over the manipulation of ifnet multicast address
lists in order to keep the two layers in sync.
Lock down accesses to IPv4 multicast addresses in IGMP, or assert the
lock when performing IGMP join/leave events.
Eliminate spl's associated with IPv4 multicast addresses, portions of
IGMP that weren't previously expunged by IGMP locking.
in.c:1.89 in.c:1.90:
Acquire Giant conditionally in in_addmulti() and in_delmulti() based on
whether the interface being accessed is IFF_NEEDSGIANT or not. This
avoids lock order reversals when calling into the interface ioctl
handler, which could potentially lead to deadlock.
The long term solution is to eliminate non-MPSAFE network drivers.
Discussed with: jhb
Unlock Giant symmetrically with respect to lock acquire order as that's
generally nicer.
Spotted by: johan
ip_output.c:1.244:
Add helper function ip_findmoptions(), which accepts an inpcb, and attempts
to atomically return either an existing set of IP multicast options for the
PCB, or a newlly allocated set with default values. The inpcb is returned
locked. This function may sleep.
Call ip_moptions() to acquire a reference to a PCB's socket options, and
perform the update of the options while holding the PCB lock. Release the
lock before returning.
Remove garbage collection of multicast options when values return to the
default, as this complicates locking substantially. Most applications
allocate a socket either to be multicast, or not, and don't tend to keep
around sockets that have previously been used for multicast, then used for
unicast.
This closes a number of race conditions involving multiple threads or
processes modifying the IP multicast state of a socket simultaenously.
Approved by: rwatson (mentor)
Add -K option to pkg_add and pkg_info.
This option saves packages to PKGDIR (if defined or current directory by default)
as they are downloaded.
Silent a warning when -n is used and package has a +DISPLAY file.
src/usr.sbin/pkg_install/info/perform.c: rev 1.53 -> 1.54
src/usr.sbin/pkg_install/add/main.c: rev 1.65 -> 1.66
src/usr.sbin/pkg_install/lib/lib.h: rev 1.56 -> 1.57
src/usr.sbin/pkg_install/info/pkg_info.1: rev 1.55 -> 1.56
src/usr.sbin/pkg_install/add/add.h: rev 1.12 -> 1.13
src/usr.sbin/pkg_install/add/pkg_add.1: rev 1.68 -> 1.69
src/usr.sbin/pkg_install/add/perform.c: rev 1.78 -> 1.79
src/usr.sbin/pkg_install/info/info.h: rev 1.28 -> 1.29
src/usr.sbin/pkg_install/lib/url.c: rev 1.4 -> 1.5
src/usr.sbin/pkg_install/info/main.c: rev 1.48 -> 1.49
date: 2005/12/16 18:32:39; author: delphij; state: Exp; lines: +2 -0
In pipe_write(): when uiomove() fails, do not spin on it forever.
Submitted by: Kostik Belousov <kostikbel at gmail.com> on -current@
Message-ID: <[email protected]>
Security: Local DoS
Fix semantics in the documentation of the "jail_socket_unixiproute_only"
variable ("YES" vs. "NO") and be more precise and intuitive on what is
actually allowed/restricted by this variable ("UNIX/IP/route sockets"
vs. "TCP/IP protocols").
1. Add missing semicolon between "warn" and "return" to make sure
the line continuation backslash doesn't cause "warn" to print
"return".
2. Group "warn" and "return" together as the "return 1" should be
performed only if the "kldload nfsclient" also failed (and not
already if the "vfs.nfs" sysctl(8) check failed).
De-spl parts of the routing socket code now generally protected
through locking; leave some spl references around code where there
are open questions about global variable references.
The comment about IF_ADDR_LOCK() and SYSCTL_OUT() in 1.127 does not
apply, as that issue was fixed by the MFC of 1.129.
Approved by: rwatson (mentor)
Protect interface and address lists using the appropriate mutex. These
locks were not aquired because the user buffers were not wired, thus it
was possible that that SYSCTL_OUT could sleep, causing a number of
different problems such as lock ordering issues and dead locks.
-Wire user supplied buffer to ensure SYSCTL_OUT will not sleep.
-Pickup ifnet locks to protect the list.
-Where applicable pickup address locks.
-Pickup radix node head locks.
-Remove splnet stubs
-Remove various comments about locking here, because they are no
longer needed.
It is the hope that these changes will make sysctl_rtsock MP safe.
Approved by: rwatson (mentor)
date: 2005/12/13 15:32:52; author: delphij; state: Exp; lines: +5 -5
In Linux, kernel parameters passed to ioctl are by value, while in FreeBSD
they are passed by reference. Handle the difference within the
linux_ioctl_termio on the LINUX_TCFLSH path.
Submitted by: Jaroslav Drzik <jaro_AT_coop-voz_dot_sk>
Reminded by: glebius
The receive function em_process_receive_interrupts() unlocks the
adapter while ether_input() processes the packet, and then locks
it back. In the meantime, em_init() may be called, either from
em_watchdog() from softclock interrupt or from the ifconfig(8)
program. The em_init() resets the card, in particular it sets
adapter->next_rx_desc_to_check to 0 and resets hardware RX Head
and Tail descriptor pointers. The loop in
em_process_receive_interrupts() does not expect these things to
change, and a mess may result.
PR: kern/87418
Submitted by: Dmitrij Tejblum <tejblum yandex-team.ru>
Correct insecure temporary file usage in ee. [06:02]
Correct a race condition when setting file permissions, sanitize file
names by default, and fix a buffer overflow when handling files
larger than 4GB in cpio. [06:03]
Security: FreeBSD-SA-06:01.texindex
Security: FreeBSD-SA-06:02.ee
Security: FreeBSD-SA-06:03.cpio
When removing the local domain, only do so when the result
will be a host name. This is matches the documented behaviro.
The previous behavior would remove the domain name even if
the result retained a dot.
This fixes rsh connections from a.example.com to example.com.
This is also reported to fix rsh connections from host xxx to
yyy.example.com.
PR: 88301
Switch from pax to tar for extracting cpio archives. pax requires a
writable /tmp (or TMPDIR) and thus is unsuitable for this job.
The pax command used was also invalid.
PR: conf/88293
Allow chkprintcap(8) to be run before lpd is started. Disabled by
default. Default flags create missing directories.
Remove comment about doing this in etc/rc.d/var.
PR: conf/71488
info/show.c:1.40 lib/plist.c:1.51
date: 2006/01/07 22:10:57; author: krion; state: Exp; lines: +10 -3
When using @cwd %%FOO%%, we must ensure to return in the original
prefix later, but doing so with @cwd %%OLDPREFIX%% (having
PLIST_SUB+="OLDPREFIX=${PREFIX}") hardcodes the value in the packing
list. That's not really a problem when dealing with ports but that's
a problem with packages since pkg_add -p option only overrides the
first @cwd occurrence.
This patch allow us to use @cwd without any argument. If no
directory argument is given, it will set current working directory
to the first prefix given by the @cwd command.
PR: bin/77212
Submitted by: flz
In ng_netflow_disconnect() check whether we are working with "iface"
or with "out" hook, and clear the right pointer.
Reported by: Vitaliy Ovsyannikov <V.Ovsyannikov kr.ru>
emulating architectures that allow this (Linux so far).
To preserve kernel modules ABI, unlike the version commited into the trunk,
which adds new flag field into Brandinfo structure for this purpose, this
one checks if brand field of Brandinfo matches ELFOSABI_LINUX.
PR: kern/87615
Submitted by: Marcin Koziej <[email protected]>
safe for RELENG_5.
el.c:
Check term_init() and strdup() failure.
history.c and tokenizer.c:
Check malloc() failure.
makelist and map.c:
Respect list sentinel.
refresh.c:
Refresh bug.
inetd(8) requires that /etc/netconfig be present, and contain entries
for each of udp and tcp (and their IPv6 equivalents when INET6 is
enabled). Note that dependency here.
PR: docs/90435
Submitted by: Dmitry Kazarov <kazarov at mcm dot ru>
Pointed out by: Daniel Gerzo <danger at rulez dot sk>
Original commit message:
truckman 2005-10-02 23:27:56 UTC
FreeBSD src repository
Modified files:
sys/kern kern_proc.c
Log:
Always wire the sysctl output buffer in sysctl_kern_proc() before
calling sysctl_out_proc(). -- fix from jhb
Move the code in fill_kinfo_thread() that gathers data from struct proc
into the new function fill_kinfo_proc_only().
Change all callers of fill_kinfo_thread() to call both
fill_kinfo_proc_only() and fill_kinfo() thread. When gathering
data from a multi-threaded process, fill_kinfo_proc_only() only needs
to be called once.
Grab sched_lock before accessing the process thread list or calling
fill_kinfo_thread().
PR: kern/84684
MFC after: 3 days
Testing this patch on RELENG_5 did not uncover any regressions,
but no testing was done by anyone who was suffering from the problem
this patch is intended to fix.
Tested by: "Stian Fjeldstad" <sbf AT pcom DOT no>
PR: kern/84684
---------------------------
revision 1.281
date: 2005/10/04 16:27:54; author: rik; state: Exp; lines: +3 -1
Use FILEDESC_UNLOCK(fdp) after FILE_ULOCK(p), not before to avoid LOR.
Slightly discussed on current@.
LOR #055
MFC after: 14 days
----------------------------
free(3).
- print_recsrc() should honor shortflag and give appropriate output for
later consumption by /etc/rc.d/mixer. This will ensure that recording
device selections survived across reboot. Output everything to stdout
instead of stderr.
with a few changes to preserve ABI compatibility.
if_var.h:1.100:
Add if_addr_mtx, a mutex to protect ifnet-related address lists. Add
accessor macros.
Unlike FreeBSD 6 and HEAD, share a global mutex (instead of putting it
in struct ifnet) to maintain ABI backwards compatibility.
if_var.h:1.101:
- Rename ifmaof_ifpforaddr() to if_findmulti(); assert if_addr_mtx.
Staticize.
if.c:1.239:
Protect link layer network interface multicast address list manipulation
using (global) if_addr_mtx:
- Initialize if_addr_mtx in if_init().
- Rename ifmaof_ifpforaddr() to if_findmulti(); assert if_addr_mtx.
Staticize.
- Extract ifmultiaddr allocation and initialization into if_allocmulti();
accept a 'mflags' argument to indicate whether or not sleeping is
permitted. This centralizes error handling and address duplication.
- Extract ifmultiaddr tear-down and deallocation in if_freemulti().
- Re-structure if_addmulti() to hold if_addr_mtx around manipulation of
the ifnet multicast address list and reference count manipulation.
Make use of non-sleeping allocations. Annotate the fact that we only
generate routing socket events for explicit address addition, not
implicit link layer address addition.
- Re-structure if_delmulti() to hold if_addr_mtx around manipulation of
the ifnet multicast address list and reference count manipulation.
Annotate the lack of a routing socket event for implicit link layer
address removal.
- De-spl all and sundry.
Approved by: rwatson (mentor)
In watchdog_config enable the software watchdog iff the WD_ACTIVE flag
is set. When watchdogd(1) is terminated intentionally it clears the
bit, which should then disable it in the kernel.
PR: kern/74386
Submitted by: Alex Hoff <ahoff at sandvine dot com>
Approved by: rwatson (mentor)
It seems ciss should ignore overrun and underrun on a SCSI INQUIRY
command. This fixes some weird booting issues on newer versions
of the firmware on the MSA20.
- Add -v and -V to the command builtin.
- Return value from unalias.
- Fixes for the errexit mode.
- Avoid segfaults on signals.
- Add the times builtin.
- Make 'set +o' output POSIX compliant.
- Correctly quoted output of trap.
- Man page updates.
power outages, spontaneously generated mini (or larger) black holes,
planetary disruptions, or personal injury or worse that may result from the
use of this material.
-- taken from Samuel M. Goldwasser's
Sam's Strobe FAQ Notes on the Troubleshooting
and Repair of Electronic Flash Units and Strobe Lights
if_iso88025subr.c:1.68 from HEAD to RELENG_5:
When allocating link layer ifnet address list entries in
ifp->if_resolvemulti(), do so with M_NOWAIT rather than M_WAITOK, so
that a mutex can be held over the call. In the FDDI code, add a
missing M_ZERO. Consumers are already aware that if_resolvemulti()
can fail.
Approved by: scottl
Silcence from: rwatson (mentor)
(1.235)
- Introduce a helper function if_setflag() containing the code common
to ifpromisc() and if_allmulti() instead of duplicating the code poorly,
with different bugs.
- Call ifp->if_ioctl() in a consistent way: always use more compatible C
syntax and check whether ifp->if_ioctl is not NULL prior to the call.
(1.237)
Rename equal() macro to sa_equal(), which matches the definitions
of sa_equal() in other files, and makes it more clear what equal()
is comparing.
(1.238)
In multicast routines:
Compare pointers with NULL rather than treating them as booleans.
Compare pointers with NULL rather than 0 to make it more clear
they are pointers.
Assign pointers value of NULL rather than 0 to make it more clear
they are pointers.
Approved by: scottl
Silence from: rwatson (mentor)
When using m_dup(9) to copy more than MHLEN bytes of data, don't
create an mbuf chain that starts with a cluster containing just MHLEN
bytes. This happened because m_dup called m_get or m_getcl depending
on the amount of data to copy, but then always set the size available
in the first mbuf to MHLEN.
Approved by: jmg
Silence from: rwatson (mentor)
isn't CURRENT anymore.
- In upgrade from 4.x paragraph notice that it is important to
delete /sbin/mountd, otherwise it will be started instead of
/usr/bin/mountd.
> revision 1.9
> date: 2005/12/07 22:25:12; author: obrien; state: Exp; lines: +0 -1
> Remove the ports version of bsdiff - it is now in the base system.
>
> revision 1.8
> date: 2005/12/07 21:41:59; author: obrien; state: Exp; lines: +0 -1
> Remove the ports version of portsnap - it is now in the base system.
>
> revision 1.7
> date: 2005/11/03 00:23:13; author: kensmith; state: Exp; lines: +1 -6
> It had been noticed disc2 was overflowing earlier but committing the
> fix slipped through a crack. Remove the apache and php packages under
> the assumption someone installing a Web server has network access and
> doesn't *need* the packages on disc2.
usb_quirks.c: 1.43
usb_quirks.h: 1.19
usb_subr.c: 1.78
usbdevs: 1.236
While this might not be the best solution, this has been considered good enough
to be MFC'ed.
Approved by: ssouhlal
Discussed on: src-committers@
register, remove or change services in the local database. For now only
accept the request if the peer has effective user ID the same as 'root'
user ID.
Preserve /etc/sysctl.conf when doing a binary update. This prevents, for
instance, the dreaded shared memory problem in PostgreSQL coming back to
haunt you after a binary update.
the underlying drive had been hot-unplugged from the system.
This merges the following revisions:
Revision Path
1.94 src/sys/cam/scsi/scsi_cd.c
1.181 src/sys/cam/scsi/scsi_da.c
1.98 src/sys/geom/geom_disk.c
1.5 src/sys/geom/geom_disk.h
1.88 src/sys/geom/geom_subr.c
Prevent backup CARP hosts from replying to arp requests, fixes strangeness
with some layer-3 switches. From Bill Marquette.
Tested by: Kazuaki Oda <kaakun highway.ne.jp>
1. make_index no longer coredumps if input has zero lines.
2. phttpget no longer enters an infinite loop if the TCP connection is
closed while phttpget is reading HTTP headers.
Introduce /etc/rc.d/bluetooth script to start/stop Bluetooth devices. It
will be called from devd(8) in response to device arrival/departure events.
It is also possible to call it by hand to start/stop particular device
without unplugging it.
Introduce generic way to set configuration parameters for Bluetooth devices.
By default /etc/rc.d/bluetooth script has hardwired defaults compatible
with old rc.bluetooth from /usr/share/netgraph/bluetooth/examples. These
can be overridden using /etc/defaults/bluetooth.device.conf file (system
wide defaults). Finally, there could be another device specific override
file located in /etc/bluetooth/$device.conf (where $device is ubt0, btccc0
etc.)
The list of configuration parameters and their meaning described in the
/etc/defaults/bluetooth.device.conf file. Even though Bluetooth device
configuration files are not shell scripts, they must follow basic sh(1) syntax.
Add rc.d scripts for the hcsecd(8) and sdpd(8) daemons. Put defaults into
/etc/defaults/rc.conf. Both daemons can run even if no Bluetooth devices
are attached to the system. Both daemons depend on Bluetooth socket layer.
Fix Bluetooth assigned numbers URL in /etc/bluetooth/protocols file.
date: 2005/11/12 11:45:01; author: krion; state: Exp; lines: +9 -2
Add -P flag, it does the same as the -p option, except that the
given prefix is also used recursively for the dependency packages,
if any. If the -P flag appears after any -p flag on the
command line, it overrides it's effect, causing pkg_add to use the
given prefix recursively.
PR: bin/75742
Submitted by: Frerich Raabe <raabe AT kde DOT org>
In closef(), remove the assumption that there is a thread associated
with the file descriptor. When a file descriptor is closed as a result
of garbage collecting a UNIX domain socket, the file descriptor will
not have any associated thread, so the logic to identify advisory locks
held by that thread is not appropriate. Check the thread for NULL to
avoid this scenario. Expand an existing comment to say a bit more about
this.
Put probe-time printf of adapter speed and duplex behind bootverbose:
since the link takes a bit to negotiate, the information is pretty
much never available during the probe. As such, the boot output
pretty much always prints N/A for speed and duplex. Since we print
out the output of ifconfig during the user space boot, this early
boot information is also generally redundant, and added to the noise.
revision 1.4
date: 2005/11/01 21:16:39; author: trhodes; state: Exp; lines: +0 -6
Quick kill links to the nsmb(8) manual page, there is no such
utility that I can find.
date: 2005/11/08 20:48:26; author: krion; state: Exp; lines: +1 -0
Introduce 3 new options for pkg_create(1), -x for using basic regular
expressions for pkg-name, -E for extended regexps and -G for exact matching.
These new options are only meaningful when using the -b flag of pkg_create(1),
and that the default for the -b parameter is now to do glob matching, as in
other pkg_foo utilities that support package patterns.
Submitted by: mux
multiple rocketport cards in the same machine. Unlike 6.x and 7.x, in 5.x
the tty drivers create the cdevsw entries themselves, so for 5.x I was able
to create compatibility aliases for unit 0 so that the old names will still
work for unit 0.
Reviewed by: phk
Tested by: Jim Pazarena paz at qcislands dot net
- First fill in structure with valid values, and only then attach it
to the global list.
- In in_addprefix() compare not only route addresses, but their masks,
too. This fixes problem when connected prefixes overlap.
- Bail if interface is misspelled instead of falling out into the
"all interfaces" mode.
- Print space character in show_stat(). Remove a lot of priuntf(" ").
- Utilize show_stat() in sidewaysintpr() loop. This makes periodic
statistics to honor -h flag.
- Understand EADDRINUSE, and forget EDQUOT. [1]
- Add description for EEXIST.
- Change description for ENOBUFS. Routing socket can return
this error for many different reasons, including general
memory shortage, mbuf memory shortage and rtentry zone.
PR: kern/64090 [1]
Implement a new feature for ping(8) - sweeping pings. In a sweeping
ping ICMP payload of packets being sent is increased with given step.
Sweeping pings are useful for testing problematic channels, MTU
issues or traffic policing functions in networks.
PR: bin/82625
Submitted by: Chris Hellberg <chellberg juniper.net> (with some cleanups)
HEAD due to OPENBSD_3_7 pf import
- Increment the states reference counter in the rule attached to the state
being inserted, so that the counter does not wrap back when the state
is removed. This fixes pfsync setups with adaptive timeouts.
- Clean up reference counting wrt state creation and destruction. Fixes
problems with adaptive timeouts, max-states limits, and rules not being
freed from memory.
- Set creation timestamps correctly on states learnt by pfsync that are
more than a second old.
PR: 83187
PR: 83186
Submitted by: Martin Matuska
cycle, and are also applicable to RELENG_5:
o Make rt_check() return a locked rtentry.
o Make rt_check() function more strict:
- rt0 passed to rt_check() must not be NULL, assert this.
- rt returned by rt_check() must be valid locked rtentry,
if no error occured.
o Modify callers, so that they never pass NULL rt0
to rt_check().
o Modify callers, so that they unlock rtentry.
o Fix races in ARP code. See if_ether.c 1.139 for more information.
o Fix LORs in ARP code. See if_ether.c 1.141 for more information.
o Lock rtentry before dropping radix lock.
o Send published ARP replies only on correct interface. [1]
o Drop rtentry lock before calling rt_getifa(). [2]
o Fixes to rt_setgate():
- To avoid recursive rtentry locking.
- Do not change routes in case of failure.
- Return EADDRINUSE instead of bogus EDQUOT [3]
Revisions merged:
net/if_atmsubr.c - 1.39, 1.41
net/if_fwsubr.c - 1.13, 1.15
net/if_iso88025subr.c - 1.69, 1.71
net/route.c - 1.110, 1.111, 1.113
net/rtsock.c - 1.110, 1.111, 1.126, 1.130
netinet6/nd6.c - 1.51-1.53
netinet/if_ether.c - 1.139, 1.140, 1.141
PR: kern/75634 [1]
PR: kern/69356 [2]
PR: kern/64090 [3]
- Fix build with TRACE_MESSAGES on.
- Reformat code under TRACE_MESSAGES to make it more readable.
- Move linker hackery out of #ifdef.
- Break long lines in linker hackery block.
- Unwind NG_SEND_MSG_PATH() macro and merge it with already unwinded
version under TRACE_MESSAGES.
- Pass NG_WAITOK flag to ng_package_data() in unwinded macro.
- Remove local error variable, which leads to hiding error from return
value. [1]
- When message can't fit into socket receive buffer return ENOBUFS
to userland program instead of letting it wait until end of days. [2]
PR: kern/81371 [1]
PR: kern/85907 [2]
Don't print anything if we can't do any localpkg shutdown (start already
does this).
Submitted by: Andre Albsmeier <Andre dot Albsmeier at siemens dot com>
PR: conf/86606
Specifically panic() in the case where pmap_insert_entry() fails to
get a new pv under high system load where the available pv entries
have been exhausted before the pagedaemon has a chance to wake up
to reclaim some.
- install ndisgen.8 man page
- fixes for ndisgen.8 man page
- fixes for ndisgen.sh script to make it work correctly on amd64 and
various documentation cleanups
Add a default value for VM_BCACHE_SIZE_MAX of 400MB. This is copied from
amd64, and is a factor of 3 less than the value previously auto-sized on
a 12GB machine, which would cause an overflow in calculations involving the
maxbcache int, causing bufinit() to loop forever at boot.
In a recent MFC, I accidentally picked up a SHLIB_MAJOR
version bump for FreeBSD 6.
Anyone that updated their 5-STABLE system
between October 4, 2005 and now should delete
/usr/lib/libarchive.so.2.
Apologies.
Fix pkg_info(1) and pkg_delete(1) to handle properly packages which
names start with a digit.
PR: bin/76858
Submitted by: Matthew D. Fuller <fullermd@over-yonder dot net>
date: 2005/10/10 12:35:30; author: krion; state: Exp; lines: +9 -4
* pkg_version(1) exits if INDEX files is not found and -I is not
specified. The result is that the package will be listed with a '?'
as if it was not found within the INDEX file, so fix this behaviour.
* Remove trailing spaces.
PR: bin/87136
Submitted by: Sean Farley <sean-freebsd at farley dot org>
Add -o/-O options to pkg_version:
-o Show the origin recorded on package generation instead of the
package name.
-O Only list packages whose registered origin is origin.
Based on PR: bin/78640
Submitted by: Marcus Grando <marcus at corp dot grupos.com.br>, flz
Remove the OPTIONS section, since it only documents FE_DEBUG and wrongly
so. If the full list of fe(4) options is documented we can revive the
entire section.
Original commit messages:
truckman 2005-10-01 08:33:57 UTC
FreeBSD src repository
Modified files:
sys/kern kern_exec.c
Log:
Copy new process argument list in do_execve() before grabbing PROC_LOCK
to avoid touching pageable memory while holding a mutex.
Simplify argument list replacement logic.
PR: kern/84935
Submitted by: "Antoine Pelisse" apelisse AT gmail.com (in a different form)
MFC after: 3 days
Revision Changes Path
1.276 +10 -10 src/sys/kern/kern_exec.c
truckman 2005-10-04 04:02:33 UTC
FreeBSD src repository
Modified files:
sys/kern kern_exec.c
Log:
Add missing word to comment.
Revision Changes Path
1.278 +1 -1 src/sys/kern/kern_exec.c
PR: kern/84935
Submitted by: "Antoine Pelisse" apelisse AT gmail.com (in a different form)
The IN_HASHED bit should not be cleared here in RELENG_5.
Original commit message:
truckman 2005-10-03 21:57:43 UTC
FreeBSD src repository
Modified files:
sys/ufs/ffs ffs_alloc.c
Log:
Initialize the inode i_flag field in ffs_valloc() to clean up any
stale flag bits left over from before the inode was recycled.
Without this change, a leftover IN_SPACECOUNTED flag could prevent
softdep_freefile() and softdep_releasefile() from incrementing
fs_pendinginodes. Because handle_workitem_freefile() unconditionally
decrements fs_pendinginodes, a negative value could be reported at
file system unmount time with a message like:
unmount pending error: blocks 0 files -3
The pending block count in fs_pendingblocks could also be negative
for similar reasons. These errors can cause the data returned by
statfs() to be slightly incorrect. Some other cleanup code in
softdep_releasefile() could also be incorrectly bypassed.
MFC after: 3 days
Revision Changes Path
1.135 +1 -0 src/sys/ufs/ffs/ffs_alloc.c
This includes the recent change to improve handling of the -P flag
on read-only files, addition of the -I option for better handling
of recursive deletes, a test for removal of / in the argument list,
and related mdoc and comment changes and improvements.
The Makefile change removes a spurious SRCS=
after rmdir()
Original commit message:
truckman 2005-09-29 21:50:26 UTC
FreeBSD src repository
Modified files:
sys/ufs/ffs ffs_softdep.c
Log:
After a rmdir()ed directory has been truncated, force an update of
the directory's inode after queuing the dirrem that will decrement
the parent directory's link count. This will force the update of
the parent directory's actual link to actually be scheduled. Without
this change the parent directory's actual link count would not be
updated until ufs_inactive() cleared the inode of the newly removed
directory, which might be deferred indefinitely. ufs_inactive()
will not be called as long as any process holds a reference to the
removed directory, and ufs_inactive() will not clear the inode if
the link count is non-zero, which could be the result of an earlier
system crash.
If a background fsck is run before the update of the parent directory's
actual link count has been performed, or at least scheduled by
putting the dirrem on the leaf directory's inodedep id_bufwait list,
fsck will corrupt the file system by decrementing the parent
directory's effective link count, which was previously correct
because it already took the removal of the leaf directory into
account, and setting the actual link count to the same value as the
effective link count after the dangling, removed, leaf directory
has been removed. This happens because fsck acts based on the
actual link count, which will be too high when fsck creates the
file system snapshot that it references.
This change has the fortunate side effect of more quickly cleaning
up the large number dirrem structures that linger for an extended
time after the removal of a large directory tree. It also fixes a
potential problem with the shutdown of the syncer thread timing out
if the system is rebooted immediately after removing a large directory
tree.
Submitted by: tegge
MFC after: 3 days
Revision Changes Path
1.185 +2 -0 src/sys/ufs/ffs/ffs_softdep.c
Submitted by: tegge
| Fix system shutdown timeout handling by again supporting longer running
| shutdown procedures (which have a duration of more than 120 seconds).
|
| We have two user-space affecting shutdown timeouts: a "soft" one in
| /etc/rc.shutdown and a "hard" one in init(8). The first one can be
| configured via /etc/rc.conf variable "rcshutdown_timeout" and defaults
| to 30 seconds. The second one was originally (in 1998) intended to be
| configured via sysctl(8) variable "kern.shutdown_timeout" and defaults
| to 120 seconds.
|
| Unfortunately, the "kern.shutdown_timeout" was declared "unused" in 1999
| (as it obviously is actually not used within the kernel itself) and
| hence was intentionally but misleadingly removed in revision 1.107 from
| init_main.c. Kernel sysctl(8) variables are certainly a wrong way to
| control user-space processes in general, but in this particular case the
| sysctl(8) variable should have remained as it supports init(8), which
| isn't passed command line flags (which in turn could have been set via
| /etc/rc.conf), etc.
|
| As there is already a similar "kern.init_path" sysctl(8) variable which
| directly affects init(8), resurrect the init(8) shutdown timeout under
| sysctl(8) variable "kern.init_shutdown_timeout". But this time document
| it as being intentionally unused within the kernel and used by init(8).
| Also document it in the manpages init(8) and rc.conf(5).
|
| Reviewed by: phk
| MFC after: 2 weeks
|
| Revision Changes Path
| 1.48 +7 -1 src/sbin/init/init.8
| 1.61 +1 -1 src/sbin/init/init.c
| 1.264 +16 -1 src/share/man/man5/rc.conf.5
| 1.257 +11 -0 src/sys/kern/init_main.c
Bug fix: a numeric flag specification in the substitute command would
cause the next substitute flag to be ignored.
While working at it, detect and report overflows.
Reported by: Jingsong Liu
Bugged by: Xin Li
Among other fixes:
* C++ support
* Portability: remove C99 requirements
* Portability: don't require wchar.h
* Check for memory allocation failures
* Portability: better detection of ACL support
* Signed/unsigned fixes
* Fix crash when archive_read_next_header called after an
open failure
* Fix archive_read_data
* Reduce window for attribute restore security race
* Clean up pathnames before creating leading dirs
* assign default inode/dev values to extracted tar entries
to better support tar->cpio conversions
* Trim mode and time values for inner ustar header when constructing
pax entries
* Sample code in archive_read.3 and archive_write.3 works now
* Many comment and documentation corrections
Add network hooks and support code for if_bridge, including ipv6 and dummynet
support. Use the if_spare1 pointer from struct ifnet to keep ABI.
Approved by: mlaier (mentor)
Add if_bridge, which provides more advanced Ethernet bridging and 802.1d
spanning tree support.
Based on Jason Wright's bridge driver from OpenBSD, and modified by Jason R.
Thorpe in NetBSD.
Conversion to old-ifconfig taken from green@
Approved by: mlaier (mentor)
This can be used to help make our ip stack less alignment restrictive, and help
performance on some ethernet cards which currently copy the entire packet a
couple bytes to get the packet aligned properly...
Required for if_bridge support.
Approved by: mlaier (mentor)
OKed by: jmg
- Fix "end_blk out of range" panic when INVARIANTS.
EROFS check was not MFC'ed because UFS mount tries to access the device
in rw mode even if ro mount is requested.
Add "show allpcpu" to DDB, which prints the current CPU id followed by
the per-cpu data for all CPUs. This is easier to ask users to do than
"figure out how many CPUs you have, now run show pcpu, then run it
once for each CPU you have".
In lockstatus(), don't lock and unlock the interlock when testing the
sleep lock status while kdb_active, or we risk contending with the
mutex on another CPU, resulting in a panic when using "show
lockedvnods" while in DDB.
Reviewed by: jhb
Reported by: kris
Acquire Giant in uprintf() and tprintf() due to the non-MPSAFEty of
the tty code invoked from these functions.
Correct age-old comments about uprintf()/tprintf() sleeping: they
will never sleep.
Unlike in the merge to RELENG_6, it is not necesary to acquire Giant
in the NFS code, as the NFS client runs entirely under Giant in 5.x.
Likewise, this is not a critical fix in 5.x as the vast majority of
relevant calls to uprintf() are in the VFS code, which also runs
with Giant in 5.x. However, there are some exposed code paths that
make this MFC a good idea.
Much useful feedback from: bde
Approved by: re (scottl)
For reasons of consistency (and necessity), assert an exclusive vnode
lock on the fifo vnode in fifo_open(): we rely on the vnode lock to
serialize access to v_fifoinfo.
Add three new read-only socket options, which allow regression tests
and other applications to query the state of the stack regarding the
accept queue on a listen socket:
SO_LISTENQLIMIT Return the value of so_qlimit (socket backlog)
SO_LISTENQLEN Return the value of so_qlen (complete sockets)
SO_LISTENINCQLEN Return the value of so_incqlen (incomplete sockets)
Minor white space tweaks to existing socket options to make them
consistent.
Discussed with: andre
the RDONLY option, so subsequent call of UFS_TRUNCATE (ffs_truncate)
would not panic the system. This fixes a panic that can happen
when mounting a corrputed filesystem read-only, and reading data
from it.
Reviewed by: mckusick
date: 2005/09/24 21:41:47; author: krion; state: Exp; lines: +1 -1
Do not bitch about bsdpan modules not having origin.
Based on PR: bin/82269
Submitted by: Steven Hartland <killing at multiplay dot co dot uk>
MFC after: 3 days
date: 2005/09/24 19:41:56; author: krion; state: Exp; lines: +1 -1
Remove '\n' since it's redundant in case if file doesn't exist while
running 'pkg_info -g'
Based on PR: bin/42609
Submitted by: Jeff King <peff-freebsd at peff dot net>
MFC after: 3 days
Include opt_net.h from netisr.c, or compiling in NET_WITH_GIANT
will not change the default setting for debug.mpsafenet.
Submitted by: Ed Maste <emaste at phaedrus dot sandvine dot ca>
Pass 'curthread' into VFS_STATFS() from acctwatch(), rather than passing
NULL. The NFS client expects that a thread will always be present for a
VOP so that it can check for signal conditions, and will dereference a
NULL pointer if one isn't present.
Add a new rc.conf entry, kerberos5_server_flags, which allows the
administrator to specify additional start-up flags to the Kerberos
5 Authentication Server.
Add "-q" argument to sysctl(8), which suppresses a limited set of
warnings/ errors generated. In particular, it suppresses "unknown oid"
when attempting to get or set a sysctl not present in the kernel.
Re-comment sbcompress() to explain what it is it does; it took me
quite a bit of reading to figure it out, and I want to avoid figuring
it out again.
Convert an if (foo) else printf("this is almost a panic") into a
KASSERT.
Don't free a struct inodedep if another process is allocating saved
inode memory for the same struct inodedep in
initiate_write_inodeblock_ufs[12]().
Handle disappearing dependencies in softdep_disk_io_initiation().
As a result of kqueue locking work, socket buffer locks will always
be held when entering a kqueue filter for fifos via a socket buffer
event: as such, assert the lock unconditionally rather than acquiring
it conditionally.
Use kenv -q to extract dumpdev rather than kenv, in order to avoid
spamming the console in the event that a loader tunable 'dumpdev'
isn't defined, which is not a relevant failure to report.
When a request is made to register a filter on a fifo that doesn't
apply to the fifo (i.e., not EVFILT_READ or EVFILT_WRITE), reject
it as EINVAL, not by returning 1 (EPERM).
Add an assertion that fifo_open() doesn't race against other threads
while sleeping to allocate fifo state: due to using the vnode lock to
serialize access to a fifo during open, it shouldn't happen (tm).
Rather than reaching into the internals of the UNIX domain socket code
by calling uipc_connect2() to connect two socket endpoints to create a
fifo, call soconnect2().
When padding with zero, do pad after prefixes rather than padding
before prefixes.
Use cases:
printf("%05d", -42); --> "00-42" (should be "-0042")
printf("%#05x", 12); --> "000xc" (should be "0x00c")
Submitted by: Oliver Fromme
PR: kern/85520
Approved by: re (kensmith)
pf_ioctl.c Revision 1.153 Sun Aug 7 11:37:33 2005 UTC by dhartmei
| verify ticket in DIOCADDADDR, from Boris Polevoy, ok deraadt@
pf_ioctl.c Revision 1.158 Mon Sep 5 14:51:08 2005 UTC by dhartmei
| in DIOCCHANGERULE, properly initialize table, if used in NAT rule.
| from Boris Polevoy <vapcom at mail dot ru>, ok mcbride@
When a carp(4) interface is being destroyed and is in a promiscous mode,
first interface is detached from parent and then bpfdetach() is called.
If the interface was the last carp(4) interface attached to parent, then
the mutex on parent is destroyed. When bpfdetach() calls if_setflags()
we panic on destroyed mutex.
To prevent the above scenario, clear pointer to parent, when we detach
ourselves from parent.
src/sys/kern/kern_shutdown.c 1.175
src/sys/sys/buf.h 1.189
FreeBSD src repository
Modified files:
sys/gnu/fs/ext2fs fs.h
sys/kern kern_shutdown.c
sys/sys buf.h
Log:
Add a new struct buf flag bit, B_PERSISTENT, and use it to tag
struct bufs that are persistently held by ext2fs. Ignore any buffers
with this flag in the code in boot() that counts "busy" and dirty
buffers and attempts to sync the dirty buffers, which is done before
attempting to unmount all the file systems during shutdown.
This fixes the problem caused by any ext2fs file systems that are
mounted at system shutdown time, which caused boot() to give up on
a non-zero number of buffers and skip the call to vfs_unmountall().
This left all the mounted file systems in a dirty state and caused
them to all require cleanup by fsck on reboot.
Move the two separate copies of the "busy" buffer test in boot()
to a separate function.
Nuke the useless spl() stuff in the ext2fs ULCK_BUF() macro.
Bring the PRINT_BUF_FLAGS definition in sys/buf.h up to date with
this and previous flag changes.
PR: kern/56675, kern/85163
Tested by: "Matthias Andree" matthias.andree at gmx.de
Reviewed by: bde
MFC after: 3 days
Revision Changes Path
1.18 +8 -8 src/sys/gnu/fs/ext2fs/fs.h
1.175 +13 -11 src/sys/kern/kern_shutdown.c
1.189 +4 -4 src/sys/sys/buf.h
PR: kern/56675, kern/85163
Tested by: "Matthias Andree" matthias.andree at gmx.de
Reviewed by: bde
- in ng_ksocket_incoming2() clear m_nextpkt on all mbufs
read from socket.
- restore rev. 1.54 change in ng_ksocket_incoming().
PR: kern/84952
PR: kern/82413
In collaboration with: rwatson
Raise one more bit in READER_MASK. I believe that before this change
it was possible to have 1 reader and 1 writer thread working on
a node simultaneously.
Reviewed by: julian
Use non-debug macros inside debugging functions, to prevent
important information from being rewritten.
In INVARIANTS case also check that nodes do not pass queues of mbufs
each other.
scmouse.c, 1.39: In set_mouse_pos(), try to avoid division by zero errors.
scvidctl.c, 1.36:
In sc_set_text_mode(), reset fontwidth if it is <= 0.
Eliminates division by zero errors in syscons driver.
Allow removal of empty directories with high link counts. These can
occur on a filesystem running with soft updates after a crash and
before a background fsck has been run. To prevent discrepancies
from arising in a background fsck that may already be running,
the directory is removed but its inode is not freed and is left
with the residual reference count. When encountered by the
background fsck it will be reclaimed.
This change was present at the time of the RELENG_6 branch point, so
does not need to be merged to RELENG_6.
Approved by: mckusick
Bumped into by: Mikhail Teterin <mi plus mx at aldan dot algebra dot com>
Fix dangling callout problem in the Bluetooth L2CAP code that leads to
panic. The panic happens when outgoing L2CAP connection descriptor is
deleted with the L2CAP command(s) pending in the queue. In this case when
the last L2CAP command is deleted (due to cleanup) and reference counter
for the L2CAP connection goes down to zero the auto disconnect timeout
is incorrectly set. pjd gets credit for tracking this down and committing
bandaid.
Reported by: Jonatan B <onatan at gmail dot com>
Approved by: re (scottl)
Prevent division by zero errors in sc_mouse_move()
by explicitly setting sc->font_width, in the same
places where sc->font_size is set, instead of
relying on the default initialized value of 0 for sc->font_width.
PR: kern/84836
Reported by: Andrey V. Elsukov <bu7cher at yandex dot ru>
- Use 'ipfw list'.
- Correctly parse output, when logging amount is limited in the
rule itself, not in verbose_limit sysctl. [1]
PR: conf/77929
Submitted by: Andriy Gapon [1]
eviewed by: matteo
FDOPT_NORETRY is an option, and must be compared with fd->options,
not fd->flags.
PR: kern/85481
Submitted by: Lev Levinson <llevinson at inbox dot ru>
- Document the fact that the real length of listen queue is 1.5 more
than the value of backlog argument.
- Document the fact that a subsequent listen(2) calls on the listening
socket change the backlog argument.
- Note that current listen queue lengths can be queried using netstat(1).
Submitted by: Igor Sysoev <is rambler-co.ru>
Wording by: gnn
Update man page to reflect the fact that VOP_LISTEXTATTR
does not return a list of ASCII NUL terminated strings.
Instead, a list of attribute names is returned, where each
list entry consists of one byte for the name length, followed
by the name, without a terminating ASCII NUL.
This in similar to change 1.17 to extattr_get_file.2
Reviewed by: rwatson, ru
MFC: VOP_LISTEXTATTR.9, 1.6
Minor formatting fixes.
Don't loop back packets that have been routed by pf. This fixes an
endless loop where the same packet is sent over and over again.
Obtained from: OpenBSD
Reported by: Sergey Lapin
Tested by: Sergey Lapin
Make sure ng_fec_init() uses the same calling convention as the rest of
the code, i.e. ng_fec_init() is called with the ifp->if_softc pointer and
NOT with the ifp pointer.
PR: kern/85239
Reviewed by: brooks
Approved by: re (scottl)
In order to support CARP interfaces kernel was taught to handle more
than one interface in one subnet. However, some userland apps rely on
the believe that this configuration is impossible.
Add a sysctl switch net.inet.ip.same_prefix_carp_only. If the switch
is on, then kernel will refuse to add an additional interface to
already connected subnet unless the interface is CARP. Default
value is off.
PR: bin/82306
In collaboration with: mlaier
% Add a small paragraph that describes how the current environment
% settings can be displayed, near the end of the DESCRIPTION section,
% immediately after the paragraph that describes how they can be set.
%
% Add a reference to printenv(1) too (and the ``printenv'' csh builtin).
%
% Submitted by: Gary W. Swearingen <[email protected]>
% PR: docs/85008
date: 2005/07/29 22:40:06; author: mux; state: Exp; lines: +1 -0
Add a new PCI id for fxp(4) cards found on ICH7-based systems.
Submitted by: Martin Nilsson <[email protected]>
PR: kern/84559
Fix multiple typos in the mutex names. This fixes false positive (and pretty
strange looking too) LORs I have seen on my system. Pointy hat to goes to me.
Approved by: re (scottl)
Move eventhandler for 'ifnet_departure_event' at the end of the progress.
Some of the (IPv6) cleanup functions send packets to inform peers of the
departure. These packets confused users of ifnet_departure_event (pf at
the moment).
PR: kern/80627
Tested by: Divacky Roman
Forgotten by: mlaier
When doing ARP load balancing source IP is taken in network byte order,
so residue of division for all hosts on net is the same, and thus only
one VHID answers. Change source IP in host byte order.
Reviewed by: mlaier
Document the fact that accept(2) may return EINVAL when addrlen is
negative (in addition to returning EINVAL when called on a descriptor
that is not a socket).
Submitted by: Arne H Juul <[email protected]>
PR: docs/80587
PR: docs/54995, docs/80587
Prodded by: rionda
Add a new switch -h for interface stats mode, which prints all interface
statistics in human readable form.
In collaboration with: vsevolod
Reviewed by: cperciva
Fix bogus check. It was possible to panic the kernel by giving 0 length.
This is actually a local DoS, as every user can use /dev/crypto if there
is crypto hardware in the system and cryptodev.ko is loaded (or compiled
into the kernel).
Reported by: Mike Tancsa <[email protected]>
Security: Local DoS on systems with crypto HW and with /dev/crypto available
Correct the description of the TAPE environment variable.
Based on:
PR: docs/84200
Submitted by: Gary W. Swearingen <garys at opusnet dot com>
Approved by: re (hrs)
- add missing ether_poll_deregister
- add per-device polling
- move the setting of if_capenable further down so that the
VLAN caps are honored as well
Approved by: ru
vm_pager_init() is run before required nswbuf variable has been set
to correct value. This caused system to run with single pbuf available
for vnode_pager. Handle both cluster_pbuf_freecnt and vnode_pbuf_freecnt
variableis in the same way.
Tested by: pre-release.portaone.com
Add support for IPv6 over GRE [1]. PR kern/80340 includes the
FreeBSD specific ip_newid() changes NetBSD does not have.
Correct handling of non AF_INET packets passed to bpf [2].
PR: kern/80340[1], NetBSD PRs 29150[1], 30844[2]
Obtained from: NetBSD ip_gre.c rev. 1.34,1.35, if_gre.c rev. 1.56
Submitted by: Gert Doering <gert at greenie.muc.de>[2]
Delay freeing disk space for file system blocks until all
dirty buffers are safely released. This fixes softdep
problems on truncation (deletion) of files with dirty
buffers.
Use m_uiotombuf() instead of own implementation. This is not just
a cosmetic change. m_uiotombuf() produces a packet header mbuf, while
original implementation did not. When kernel is compiled with MAC
support, headerless mbuf will cause panic.
Reported by: Alexander Nikiforenko <asn rambler-co.ru>
Reported by: Andrew Korovin <freeside inbox.ru>
PR: kern/77111
not initialized yet (case of the bus being reinitialized during the boot
process).
Note that this change is a fix for RELENG_5 only, not relevant to HEAD.
PR: kern/84567
Tested by: Chris Jones <[email protected]>
Prevent a race condition. As pf_send_tcp() - called for expired synproxy
states - has to drop the lock when calling back to ip_output(), the state
purge timeout might run and gc the state. This results in a rb-tree
inconsistency. With this change we flag expiring states while holding the
lock and back off if the flag is already set.
Reported by: glebius
Fix for PR 83885.
Make sure that there actually is a next packet before setting
nextrecord to that field.
PR: 83885
Submitted by: [email protected]
Obtained from: Patch suggested in the PR
the case of an RTM_CHANGE was specific, i.e. that it matched completely. This
led to a route change of a non-existent route changing the default route
as the radix code would simply back track to that point and hand that
route back to the routing socket code.
PR: 82974
Reviewed by: Tai-hwa Liang <[email protected]>
Ben Kaduk <[email protected]>
Bjoern A. Zeeb <[email protected]>
Obtained from: OpenBSD with modifications.
Interpret correctly the glob(3) return value.
Previously, interactive commands specifying a non-existent file or
directory used to display an "out of memory error".
subsequent bug fixes. While the -S feature is not as useful in RELENG_5
as it is in RELENG_6 and HEAD, for people writing scripts it is useful
if the same features are available in all recent releases. I intend to
commit this to RELENG_4 too, after a few more weeks. Since these are
new features, they should not effect any presently-working scripts.
[* = 1.6 env/Makefile, 1.6->1.9 env.1, 1.12->1.16 env.c,
1.1->1.4 envopts.c, 1.1 envopts.h]
MFC after: 12 days
Allow PLAY_MSF, PLAY_TRACK, PLAY_TRACK_REL, PAUSE, PLAY_12 commands to pass
through umass(4), in order to make cdcontrol(1) to issue commands to a USB
CD driver.
The command IDs were obtained from the CAM subsystem. This was tested
on half dozen of USB CD drivers from different vendors.
Suggested by: "intron" <intron at intron dot ac>
PR: usb/83439
Reviewed by: sanpei
Approved by: re (kensmith)
Makefile -> 1.58
devfs.conf.5 -> 1.1
devfs.rules.5 -> 1.1
# Add manpages for devfs.conf and devfs.rules. These have been
# initially written by Roland, but hacked for a while by me. Any
# good parts are the results of Roland's hard work. Any typos or
# style mistakes are mine.
#
# Submitted by: Roland Smith <[email protected]>
# PR: docs/63808, docs/75433, docs/80458, docs/80459
# MFC after: 2 weeks
# Expand n't contractions.
MFC: 1.18:
# Document that /etc/rc.d/ntpdate will read this file to find out a
# list of NTP hosts, if ntpdate_hosts is unset or empty.
#
# PR: conf/79712
# Submitted by: Tsurutani Naoki <[email protected]>
# mdoc text by: Matteo Riondato <[email protected]>
Add support for AVM BlueFRITZ! USB Bluetooth Adapter v2.0. It appears that
there are at least two versions of the adapter. Version 1 (product ID 0x2200)
of the adapter does not work with ng_ubt(4) and require special driver and
firmware. Version 2 (product ID 0x3800) seems to work just fine, except it
does not have bDeviceClass, bDeviceSubClass and bDeviceProtocol set to required
(by specification) values. This change forces ng_ubt(4) to attach to the
version 2 adapter.
Ignore AVM BlueFRITZ! USB Bluetooth Adapter v1.0 (product ID 0x2200).
It does not work with ng_ubt(4) and require special driver and firmware.
Submitted by: Rainer Goellner < rainer at jabbe dot de >
Approved by: re (kensmith)
Obtained from: Marcel Holtmann < marcel at holtmann dot org >
When reloading rules via rc.d/pf, flush everything but existing state
entries that way when rules are read in, it doesn't break established
connections.
OK'ed by: mlaier
Forgotten by: seanc
Fix a longstanding bug with the .END target. Need to pass the ENDNode
to the Run function instead of some random node.
PR: bin/83698
Submitted by: Max Okumoto <[email protected]>
g_stripe.c 1.26
Before calling g_orphan_provider(), add G_PF_WITHER flag, so GEOM will know
to destroy it.
PR: kern/81758
Submitted by: trasz <[email protected]>
* Replace fch{mod,own} with straight ch{mod,own} as the former cannot be used
on socket file descriptors
* Open permissions on /var/run/devd.pipe so that any user can read devd events
from this socket
* Enable non-blocking I/O on devd.pipe to keep clients from wedging devd.
If a write(2) on devd.pipe would block, the client in question will be
removed
Approved by: imp
date: 2005/07/13 10:40:07; author: delphij; state: Exp; lines: +7 -4
Better memory handling:
- It is acceptable to call free(3) when the given pointer itself
is NULL, so we do not need to determine NULL before passing
a pointer to free(3)
- Handle failure of malloc(3)
Submitted by: Dan Lukes <dan at obluda cz>
PR: bin/83352
Approved by: re (scottl)
Fix a bug when shell expansion is done against dangling symlinks, by
converting the stat() call to a lstat() call, which will cover the
situation. One can exercise this bug by referring a dangling link with
something like */the-link.
Submitted by: Simon 'corecode' Schubert [corecode fs ei tum de]
Obtained from: NetBSD via DragonFlyBSD (NetBSD rev. 1.51 and DragonFly
rev. 1.6)
Fix for a SACK crash caused by a bug in tcp_reass(). tcp_reass()
does not clear tlen and frees the mbuf (leaving th pointing at freed
memory), if the data segment is a complete duplicate.
kern/sched_4bsd.c 1.74 1.75
Fix some race conditions for pinned threads that may cause them to run
on the wrong CPU.
Add IPI support for preempting a thread on another CPU.
( To reduce diff for future MFCs, The required MD Part to support
IPI preemption is not part of this MFC)
defaults/rc.conf 1.252
Introduce new per-jail variable jail_<name>_flags, which allows to specify
jail(8) flags (before the change we had hardcoded "-l -U root").
Submitted by: Frank Behrens <[email protected]>
PR: conf/80244
Security: CAN-2005-2019
Security: FreeBSD-SA-05:13.ipfw
Correct bzip2 denial of service and permission race vulnerabilities.
Obtained from: Redhat, Steve Grubb via RedHat
Security: CAN-2005-0953, CAN-2005-1260
Security: FreeBSD-SA-05:14.bzip2
Approved by: obrien
Correct TCP connection stall denial of service vulnerability.
A TCP packets with the SYN flag set is accepted for established
connections, allowing an attacker to overwrite certain TCP options.
Security: CAN-2005-2068
Security: FreeBSD-SA-05:15.tcp
Approved by: cperciva
Defer ip_output of pfsync updates to an independent callout thread instead
of just dropping the lock around the ip_output call. This used to cause
corrupted state tree walks for some call-paths.
Mark pf callouts as NET_MPSAFE.
Tested by: Sascha Luck, Matthew Grooms and pfsense.org (via Scott Ullrich)
Wrap copyin/copyout for kevent so the 32bit wrapper does not have
to malloc nchanges * sizeof(struct kevent) AND/OR nevents *
sizeof(struct kevent) on every syscall.
date: 2005/06/14 10:56:02; author: ru; state: Exp; lines: +3 -3
When IPC_NOWAIT is set and there is no message, msgrcv() fails
with errno set to ENOMSG.
PR: docs/82217
According to the information on:
http://www.opengroup.org/onlinepubs/009695399/functions/swab.html
the prototype for swab() should be in <unistd.h> and not in <string.h>.
Move it, and update to match SUS. Leave the prototype in string.h for
now, for backwards compat.
PR: 74751
Submitted by: Craig Rodrigues <[email protected]>
Discussed with: das
Backout the code which tries to use undocumented way to determine if
fm801 has sound capabilities or not. Unfortunately this code doesn't
work as expected.
PR: kern/45182, kern/48738, kern/82107
Submitted by: many
Limit entries to their respective architectures. We don't need e.g.
ISA troubleshooting in the amd64 installation guide.
Also note that amd64 and ia64 use ACPI.
A lot of people may want to submit PRs from systems that are not
connected to the Internet or systems that do not have a correctly
configured email subsystem. Now that the send-pr web interface has
antispam protection, mention that it is ok to use it for submitting
problem reports.
> Fix a bug relavant to debugging, a masked signal unexpectedly interrupts
> a sleeping thread when process is being debugged.
>
> PR: GNU/77818
> Tested by: Sean C. Farley <sean-freebsd at farley org>
> Remove sleep queue hack, it is no longer needed with current sleep queue.
> Actually, it causes process to hang when it is being debugged.
>
> PR: gnu/77818
Move couple of directories out of mtree and into their respective
ports. This mtree now specifies basic structure of X11BASE, similarly
to BSD.local.dist.
Remove process information leak from inside a jail, when
security.bsd.see_other_uids is set to 0, etc.
One can check if invisible process is active, by doing:
# ktrace -p <pid>
If ktrace returns 'Operation not permitted' the process is alive and
if returns 'No such process' there is no such process.
Assert pcbinfo lock in in_pcbdisconnect() and in_pcbdetach(), as the
global pcb lists are modified.
Commit correct version of previous commit (in_pcb.c:1.164). Use the
local variables as currently named.
XXX: generating footnotes from <ulink> in <table> has
been disabled temporarily because it will put wrong
footnote number and does not respect (define bop-footnotes #t).
When a drive dies, don't call g_wither_geom() directly, but instead
post an event to the geom event queue that will take care of it,
letting outstanding bios finish, and closing the consumers.
Plus some cosmetic clean ups.
date: 2005/05/24 08:26:44; author: cperciva; state: Exp; lines: +1 -0
Add an -I option to pkg_version:
-I Use only the index file for determining if a package is out of
date. This is much faster than using the version number from a
port's Makefile, at the expense of potentially giving an incor-
rect result if the index file is out of date.
Without this option, the index file is only consulted if "make -V PKGNAME"
cannot be used.
are not normally documented in UPDATING on the stable branches, but
since this is a user-visible change, it needs to be here.
This is not an MFC since Hyper-Threading is enabled by default in HEAD.
Pointed out by: Erik Trulsson, via freebsd-stable
Fix long (and long long) to long double, unsigned to long double and unsigned
long (and unsigned long long) to long double conversions.
- Add a parameter that specifies the position of the sign bit to the _QP_TTOQ
macro, previously it always looked at bit 31. Pass a negative number to
disable sign inspection for unsigned types. This fixes _Qp_xtoq(),
_Qp_uitoq() and _Qp_uxtoq().
- In the functions __fpu_itof() and __fpu_xtof(), look at the sign bit to
decide whether we're doing a conversion from an unsigned type. If so, don't
negate the mantissa if the integer exceeds the biggest signed number.
- Add further functionality to check for invalid characters
- Remove keyword 'continue' for more indepth error reporting on each line
- WARNS 6 Clean
Submitted by: Liam J. Foy <[email protected]>
Back out ipx.h:1.18, which introduced a Linux API compatibility field in
the ipx_net data structure. Doing so introduced a stronger alignment
requirement for the address structure, which in turn propagated into
other dependent data structures, which turns out not to be suported by
the available IPX source code. As a result, a number of user space
applications, such as IPX routing components, failed to operate
correctly.
RELENG_5_3 candidate?
PRs: 74059, 80266
Pointy hat to: bms
Fix by: bde
Tested by: Keith White <Keith dot White at site dot uottawa dot ca>
Suffering: great
NFS write gathering defers execution of NFS server write requests to wait
to see if additional write requests will arrive that can be coalesced and
clustered with earlier ones. When doing so, it must determine whether
the two requests are made by credentials with the same access writes, so
as not to coalesce improperly. NFSW_SAMECRED() implements a test of two
credentials using a binary compare.
Replace NFSW_SAMECRED() macro with nfsrv_samecred() function, which is
aware of the contents and layout of a struct ucred, rather than a simple
binary compare. While the binary compare works when ucred is simply a
zero'd and embedded 'struct ucred' in the NFS descriptor, it will work
less well when the ucred associated with an NFS descriptor is "real", so
has defined and populated reference count, mutex, etc.
Obtained from: TrustedBSD Project
In the current world order, each socket has two mutexes: a mutex
that protects socket and receive socket buffer state, and a second
mutex to protect send socket buffer state. In some places, the
mutex shared between the socket and receive socket buffer will be
acquired twice, once by each layer, resulting in some
inconsistency, but providing the abstraction benefit of being able
to more easily separate the two mutexes in the future if desired.
When transitioning a socket to the SS_ISDISCONNECTING or
SS_ISDISCONNECTED states, grab the socket/receive socket buffer lock
once rather than grabbing it as the socket lock, modifying socket
state, then grabbing a second time as the receive lock in order to
modify the socket buffer state to indicate no further data can be
read. This change is believed to close a race between the change in
socket state and the change in socket buffer state, which for a
remotely initiated close on a UNIX domain socket, resulted in
soreceive() returning ENOTCONN rather than an EOF condition.
A similar race still exists in the case of send, however, and is
harder to fix as the socket and send socket buffer mutexes are not
the same, and we would like to avoid holding combinations of socket
mutexes over sb_upcall until we've finished clarifying the locking
protocol for upcalls.
This change has the side affect of reducing the number of mutex
operations to initiate disconnect or perform disconnect on a
socket by two.
PR: 78824
Reported by: Marc Olzheim <[email protected]>
- Avoid a memory leak if realloc(3) fails by using reallocf(3)
Submitted by: Liam J. Foy <[email protected]>
Approved by: mdodd (in-lieu of mentor who is away)
When aborting tcp_attach() due to a problem allocating or attaching the
tcpcb, lock the inpcb before calling in_pcbdetach() or in6_pcbdetach(),
as they expect the inpcb to be passed locked.
According to STP2002QFP User's Guide, it seems that driver should
program RXMAC to discard frames with SA field matching the stations's
MAC address. Experimentation shows that HME receives its own frames
when it operates at 10Mbps half-duplex. With this change HME runs at
10Mbps half-duplx should work with IPv6.
tcp_subr.c rev 1.225
If we don't get a suggested MTU during path MTU discovery
look up the packet size of the packet that generated the
response, step down the MTU by one step through ip_next_mtu()
and try again.
Suggested by: dwmalone
ip_icmp.c rev 1.99, ip_icmp.h rev 1.24, tcp_subr.c rev 1.223
Move Path MTU discovery ICMP processing from icmp_input() to
tcp_ctlinput() and subject it to active tcpcb and sequence
number checking.
Security: draft-gont-tcpm-icmp-attacks-03.txt Section 7.2
make stat return an zero'd struct, and be a FIFO again... This is only
to fix libc_r since it requires stat to close fd's, and so commented in
the code...
finder, be careful not to put your fingers or fingernails in your eye.
-- found in the users manual of the Nikon D2x camera,
a camera for professional photographers
%
date: 2005/05/24 23:42:09; author: csjp; state: Exp; lines: +1 -1
If sysctlbyname fails for kernel related reasons, tag the errno
string to the end of the error message. I think we used errx()
there when we really wanted an err().
would access memory before the beginning of the string to match (the
suffix match starts from the end of both the suffix and the string
to match and proceedes until either the start of the suffix is hit or
the character does not match). This could lead to a memcpy copying
into random memory. This leads to make dumping core on amd64 (on i386
the overwritten memory for some reason does not cause a core dump).
Fix this by checking the length of the string too.
MFC of: 1.57
Submitted by: Matt Dillon <[email protected]>
Tested by: Julian H. Stacey <[email protected]>
MFC after: 2 weeks
isn't really an MFC since support for this part was part of the ata mkIII
mega commit.
PR: kern/80656
Submitted by: Vlad Galu vladgalu at gmail dot com
Move AVM USB Bluetooth-Adapter BlueFritz! from "broken" devices list
(where I incorrectly put it initially) to "ignored" devices list (where
it should be). Pointy hat goes to me.
- do DNS lookup for symbolic names specified for a destination
or gateway.
- improves error reporting using gai_strerror(3) instead of
printing "bad value".
- remove "0" for servname argument for getaddrinfo(3).
We need to use 'applyset' command for devfs, 'apply hide' is not enough,
because new devfs entries can show up later and one can access such entires
from inside named's chroot.
In rc.d scripts we can use devfs_domount() function with devfsrules_hide_all
policy and unhide 'null' and 'random' manually.
2553. In XNS5.2, and subsequently in POSIX-2001 and RFC 3493, it was
changed to a socklen_t. And, the n_net of a struct netent used to be
an unsigned long integer. In XNS5, and subsequently in POSIX-2001, it
was changed to an uint32_t. To accomodate for this while preserving
ABI compatibility with the old interface, we need to prepend or append
32 bits of padding, depending on the (LP64) architecture's endianness.
include/netdb.h: 1.36 (partly)
lib/libc/net/getaddrinfo.c: 1.69
lib/libc/net/getnetbydns.c: 1.30
lib/libc/net/getnetbyht.c: 1.15
lib/libc/net/getnetbynis.c: 1.18
lib/libc/net/getnetnamadr.c: 1.20 (partly)
lib/libc/net/netdb_private.h: 1.9
- Autogenerate device listings for sound(4) aka pcm(4)
- Rename the Audio Devices section into Sound Devices, this is more
in line with out sound and snd_* drivers
Use uma(9) for allocating netgraph items:
- ng_getqblk() simply runs uma_zalloc().
- ng_free_item() simply frees.
- ngq_mtx is pushed down under NETGRAPH_DEBUG.
- NGQF_FREE is removed.
Increase default maxalloc to 512.
Reviewed by: julian
In div_output() explicitly set m->m_nextpkt to NULL. If divert socket
is not userland, but ng_ksocket, then m->m_nextpkt may be non-NULL. In
this case we would panic in sbappend.
1.30: Remove extra ifnet pointer from private data. It can be accessed via arpcom.
1.29: Remove ng_connect_t where it is unused.
1.28: Use subr_unit allocator instead of own functions.
o Use subr_unit allocator. This simplifies code much:
- Remove get_free_unit().
- Remove SLIST of nodes.
- Remove global mutex.
o Increase NGD_MAX to 999.
o Move ngd_mod_event() up to netgraph methods.
When doing the initial open of the proc via procfs, complain if we are
unable to open the /proc/pid/mem file. Otherwise doing a truss on
a nonexistant pid makes us return success even though no such process
exists.
I've been working on this somewhat so I'm moving the
parts I'm touching to be as style(9) compliant as I can.
date: 2005/05/19 21:09:44; author: csjp; state: Exp; lines: +2 -0
Add cases for ENOBUFS and ENETDOWN. We need to make sure that we
catch all transient errors. This fixes situations where transient
error conditions such as network interfaces losing carrier signals
or the system running out of mbufs would result in the permanent
removal of forwarding syslog messages.
Fix problem with session termination. bthidd(8) maintains two L2CAP
connections to Bluetooth HID device. As soon as Bluetooth HID device
is powered off (or goes out of RF range) the stack will terminate both
connections. File descriptors for both connections will become active
on next select(2) call. Because bthidd(8) processes file descriptors
in order, it will detect descriptor for one of the closed connections
first and kill the session. However, there is still a second (active)
descriptor that used to point to the same session. bthidd(8) used to
assert() if it cant find session by file descriptor, which was wrong.
While I'm here fix a couple of typos in parser.y
Reported by: Eric Anderson anderson AT centtech DOT com
won't work with the 5.x version of net80211. This includes all fixes
to date, and support for new cards such as the AirGo MIMO and Ralink
RT2500. This also includes the new driver configuration/conversion
mechanism. Remember that you should use ndisgen(8) to create new
drivers now, and if_ndis.ko will always be pre-built.
date: 2005/05/02 02:07:55; author: csjp; state: Exp; lines: +2 -4
Since it is not possible for curthread to be NULL in this context,
drop the check+initialization for a straight initialization. Also
assert that curthread will never be NULL just to be sure.
- When carp interface is destroyed, and it affects global preemption
suppresion counter, decrease the latter. [1]
- Add sysctl to monitor preemption suppression.
PR: kern/80972 [1]
Submitted by: Frank Volf [1]
Run em_local_timer() once per second instead of running it once per 2 seconds.
This makes gathering of error stats more precise, and netstat(1) output look
right.
Reviewed by: tackerman
Protect against recursive labels creation in simlar way as it is done
in BSD and MBR classes, ie. if provider below us uses the same metadata,
don't create labels based on the metadata.
This allows to create labels on geoms with rank != 1 without hacks.
Move MAC check_vnode_mmap entry point out from being exclusive to
MAP_SHARED so that the entry point gets executed un-conditionally.
This may be useful for security policies which want to perform access
control checks around run-time linking.
-add the mmap(2) flags argument to the check_vnode_mmap entry point
so that we can make access control decisions based on the type of
mapped object.
-update any dependent API around this parameter addition such as
function prototype modifications, entry point parameter additions
and the inclusion of sys/mman.h header file.
-Change the MLS, BIBA and LOMAC security policies so that subject
domination routines are not executed unless the type of mapping is
shared. This is done to maintain compatibility between the old
vm_mmap_vnode(9) and these policies.
Get rid of device nodes interface. It is useless and confusing.
The original idea was to use it for firmware upgrading and similar
operations. In real life almost all Bluetooth USB devices do not
need firmware download. If device does require firmware download
then ugen(4) (or specialized driver like ubtbcmfw(8)) should be
used instead.
Mark AVM USB Bluetooth-Adapter BlueFritz! as "broken". This device is not
supported by ng_ubt(4) driver and needs its own driver.
PR: kern/76205
Submitted by: Tim Hemel < bsd AT timit DOT nl >
- we are no longer shareing any resources to be locked between
getaddrinfo(3) and getipnodeby*(3).
- use definitions in reentrant.h.
- remove obsolete comment.
- now, our getservbyname(3) is thread-safe. So, we don't need
to protect it with mutex lock.
lib/libc/net/getaddrinfo.c: 1.62, 1.65
lib/libc/net/name6.c: 1.43, 1.44
- Use kldstat -m (finds geom_uzip even if it is compiled in statically).
- Create output files with x bit set.
- Make mkuzip 64-bit clean.
- Fix typo in error message.
- Enable mkuzip on all archs.
* "make distfile" uses correct automake/autoconf commands
* Rewrite path shortening to avoid crash on certain paths
between 245 and 255 characters long
* Fix broken ACL configuration on FreeBSD 4 and Linux
* Fix GNU tar long symlink handling
archive_write_open_file.c 1.11: Non-regular files can be added
to an archive, even if output is going to that file.
archive_read_support_compression_gzip.c 1.9: better error messages
archive_read_open_file.c 1.8: better error messages
archive_read_support_format_cpio.c 1.12: better handling of I/O errors
archive_read_support_format_tar.c 1.31: better error handling
Only allow RAID5 plexes to be parity checked.
PR: kern/80427
Submitty by: Stijn Hoop <[email protected]>
--
Don't allow to synchronize a plex that is already sychronizing.
Reset the 'syncing' flag in case of errors, too.
Some cosmetics.
Remove test for zero sectorsize when tasting. This check doesn't
seem to be necessary anymore, and it prevents tasting a valid drive
when booting with geom_vinum already loaded, since SCSI disks set their
sectorsize not until first opening them.
In ng_btsocket_rfcomm_receive_frame() correctly set length variable when
EA bit is set in hdr->length (16-bit length). This currently has no effect
on the rest of the code. It just fixes the debug message.
Change m_uiotombuf so it will accept offset at which data should be copied
to the mbuf. Offset cannot exceed MHLEN bytes. This is currently used to
fix Ethernet header alignment problem on alpha and sparc64. Also change all
users of m_uiotombuf to pass proper offset.
Reviewed by: jmg, sam
Approved by: re
Increase the default stacksizes:
32-bit 64-bit
main thread 2MB 4MB
other threads 1MB 2MB
Approved by: eischen
re (scottl no longer objects since 5.4 is out)
Increase the default stacksizes:
32-bit 64-bit
main thread 2MB 4MB
other threads 1MB 2MB
Approved by: mtm
re (scottl no longer objects since 5.4 is out)
Increase the default stacksizes:
32-bit 64-bit
main thread 2MB 4MB
other threads 1MB 2MB
Approved by: eischen
re (scottl no longer objects since 5.4 is out)
Make "c->c_func = NULL" conditional on the CALLOUT_LOCAL_ALLOC flag,
i.e., only clear c->c_func if the callout c is being used via the old
timeout(9) interface.
- 1.9, joel. Expand contractions.
- 1.8, Reword HOOKS paragraph also mentioning how data received on out* hooks
is handled.
- 1.7, Describe usage of newly implemented out* hooks.
Add a possibility to bypass unmodified accounted data to special
hook(s). Data received on these hook(s) is sent back to ifaceX hook(s).
Refactor node so that it does not modify mbuf contents:
- In ng_netflow_rcvdata() do all necessary pulluping: Ethernet header,
IP header, and TCP/UDP header.
- Pass only pointer to struct ip to ng_netflow_flow_add(). Any TCP/UDP
headers are guaranteed to by after it.
- Merge make_flow_rec() function into ng_netflow_flow_add().
- nuke the logic for AF_UNSPEC and simplify. once, it was introduced
to improve getaddrinfo(3). but, it is not needed for a long time
since getaddrinfo(3) became providing its own res_*N() functions.
- add missing mutex unlock.
from getnameinfo(3). This improves API compatibility with other POSIX
complaint operating systems.
PR: standards/80008
Requested by: Xin Liu <[email protected]>
Reviewed by: freebsd-standards (das)
MFC After: 2 weeks
While 5.4-RELEASE contains the fixes for these bugs, it would have
been too difficult, at this stage in the release cycle, to add these
items to the 5.4 release notes and get all the various translations
updated. Thus we put them in the not-as-time-critical errata
document.
Approved by: re (hrs)
1. Copy a NULL-terminated string into a fixed-length buffer, and
2. copyout that buffer to userland,
we really ought to
0. Zero the entire buffer
first.
Security: FreeBSD-SA-05:08.kmem
- Tweak kern_msgctl() to return a copy of the requested message queue id
structure in the struct pointed to by the 3rd argument for IPC_STAT and
get rid of the 4th argument. The old way returned a pointer into the
kernel array that the calling function would then access afterwards
without holding the appropriate locks and doing non-lock-safe things like
copyout() with the data anyways. This change removes that unsafeness and
resulting race conditions as well as simplifying the interface.
third of several commits to allow kernel System V IPC data structures
to be modified and extended without breaking the user space ABI:
Make the "ipcs" tool, which grubs around in kernel memory to report
status relating to System V IPC, use the _kernel variants on the
System V IPC data structures.
Submitted by: Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from: TrustedBSD Project
Sponsored by: DARPA, SPAWAR, McAfee Research
Requested by: ps
msg.h:1.18:
Second of several commits to allow kernel System V IPC data structures
to be modified and extended without breaking the user space ABI:
Use _kernel variants on _ds structures for System V sempahores, message
queues, and shared memory. When interfacing with userspace, export
only the _ds subsets of the _kernel data structures. A lot of search
and replace.
Define the message structure in the _KERNEL portion of msg.h so that it
can be used by other kernel consumers, but not exposed to user space.
Submitted by: Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from: TrustedBSD Project
Sponsored by: DARPA, SPAWAR, McAfee Research
Correct two incorrectly merged changes introduced in sysv_sem.c:1.71:
return EINVAL rather than setting error, and don't free sops
unconditionally. The first change was merged accidentally as part of
the larger set of changes to introduce MAC labels and access control,
and potentially lead to continued processing of a request even after
it was determined to be invalid. The second change was due to changes
in the semaphore code since the original work was performed.
Pointed out by: truckman
NOTE: Change to ipcs.c in user space that catches up with kernel header
changes to follow shortly in a second commit. The API has changed, but
not the ABI.
Requested by: ps
First of several commits to allow kernel System V IPC data structures
to be modified and extended without breaking the user space ABI:
Define _kernel wrapper data structures for the user-exposed data
structures that current server as the internal data structures for
the implementation:
- struct msqid_kernel wraps struct msqid_ds.
- struct semid_kernel wraps truct semid_ds.
- struct shmid_kernel wraps struct shmid_ds.
- Don't expose extern definition 'shmsegs' outside of sysv_shm.c.
Submitted by: Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net>
Obtained from: TrustedBSD Project
Sponsored by: DARPA, SPAWAR, McAfee Research
Requested by: ps
terminal sharing /dev/console. Peek at tty structs passing through ttymalloc()
and pass them to ttyrel() if they'd get reaped due to the refcount dropping
to 0. Also loosen up the refcount check in ttyrel() to account for
refcounting problems caused by the incestuous relationship. I left the
KASSERT alone in case people want to look into the underlying issue.
Reaping dying tty structs helps keep stale data from growing in the knote
lists, which eventually get tripped over, causing the panic.
This change does not apply to -CURRENT due to differences in tty handling.
MFC after: 3 days
since our getservbyport(3) is thread-safe on CURRENT, we don't need
this workaround on CURRENT. however, it is not MFC'ed to RELENG_5,
yet. so, we need this for RELENG_5.
this fix is candidate for MFS to be in time for 5.4-RELEASE.
Found by: tools/regression/lib/libc/resolv/resolv -r
Reviewed by: hrs
Tested by: hrs
keeping things in sync. For ksu:
* install suid-root by default
* don't fall back to asking for a unix password (ie: be pure kerberos)
* allow custom user instances for things like www and not just root
tcp_output.c rev 1.109, tcp_subr.c rev 1.222, tcp_var.h rev 1.120.
Ignore ICMP Source Quench messages for TCP sessions. Source Quench is
ineffective, depreciated and can be abused to degrade the performance
of active TCP sessions if spoofed.
Replace a bogus call to tcp_quench() in tcp_output() with the direct
equivalent tcpcb variable assignment.
Security: draft-gont-tcpm-icmp-attacks-03.txt Section 7.1
date: 2005/04/14 03:56:06; author: csjp; state: Exp; lines: +2 -0
Do not remove logging sockets. This fixes an issue where logging
sockets placed into prisons from the host environment get clobbered
by the prison's instance of cleanvar. (assuming /etc/rc is run in
the prison).
date: 2005/04/05 01:11:43; author: csjp; state: Exp; lines: +1 -0
Assert that the vnode is locked. This is meant to catch bugs or
mis-use of the vnode API in conditions where IO_NODELOCKED has been
used without the vnode actually being locked.
to workaround Opteron Errata 106. The while loop runs entirely out of
the instruction cache, which blocks updates to the cache from other CPUs.
Interrupts break the lock, allowing the write to post.
Many thanks to Paul Vixie and Peter Losher at ISC for providing resources
to troubleshoot the issue; Stephen Uphoff and Alan Cox for their
expertise; and the rest of the RE team for pushing the resolution along
so we can ship 5.4 with this fix.
Add the vm.exec_map_entries tunable and read-only sysctl, which controls
the number of entries in exec_map (maximum number of simultaneous execs
that can be handled by the kernel). The default value of 16 is
insufficient on heavily loaded machines (particularly SMP machines), and
if it is exceeded then executing further processes will generate a SIGABRT.
This is a workaround until a better solution can be implemented.
> date: 2005/04/17 23:30:20; author: kensmith; state: Exp; lines: +0 -3
> Needed to drop "lang/gnat", "print/teTeX", and "textproc/docproj-jadetex"
> to make the packages fit on the CDs...
1. Make sure that the /etc/namedb symlink is pointing to the right place.
2. Unmount the devfs when stop'ing (including on shutdown).
3. Require cleanvar.
implement kernel side of i386_set_gsbase(2) and friends.
Add symbol to tell NDIS which slot to use.
Notable differences to -current:
* gdt renumber not merged
* user %cs/%ds still live in the ldt.
* NDIS_SEL defined to same value as ndis code had hardcoded(!).
We could have libc and rtld switch to using this as the primary API
to implement TLS and avoid having a custom LDT for every process.
these symbols to satisfy things like libpthread.so.0 when running on
a 6.x machine when the app is linked against libc.so.5. Note that these
don't actually do anything on 5.x kernels yet. I'd actually like to have
5.x use these in the future though, in order to get rid of the evil
#ifdef COMPAT_32BIT stuff.
Fix panics with misconfigured routing:
- Backout previous revision, the check is useless.
- Turn node to queue mode, since it is edge node.
Approved by: re (kensmith)
- Implement linux_nanosleep() using the recently added kern_nanosleep().
- Use linux_emul_convpath() instead of linux_emul_find() in
exec_linux_imgact_try().
- Use kern_{l,f,}stat() and kern_{f,}statfs() functions rather than
duplicating the contents of the same functions inline.
- Consolidate common code to convert a BSD statfs struct to a Linux struct
into a static worker function.
- Implement kern_foo wrappers for stat(), lstat(), fstat(), statfs(),
fstatfs(), and fhstatfs(). Use these wrappers to cut out a lot of
code duplication for freebsd4 and netbsd compatability system calls.
- Add a new lookup function kern_alternate_path() that looks up a filename
under an alternate prefix and determines which filename should be used.
This is basically a more general version of linux_emul_convpath() that
can be shared by all the ABIs thus allowing for further reduction of
code duplication.
Correct multiple security related errors: a buffer overflow, NULL
pointer dereferences, possible use of uninitialized variables, and
memory leaks.
Security: CAN-2005-0753
Security: FreeBSD-SA-05:05.cvs
Approved by: peter
Split out kernel side of {get,set}itimer(2) into two parts: the first that
pops data from the userland and pushes results back and the second which does
actual processing. Use the latter to eliminate stackgap in the linux wrappers
of those syscalls.
kern_ntptime.c, kern_time.c, sys_generic.c p1003_1b.c, syscallsubr.h:
- Implement kern_adjtime(), kern_readv(),
kern_sched_rr_get_interval(), kern_settimeofday(), and
kern_writev() to allow for further stackgap reduction in
the compat ABIs.
osf1_misc.c:
- Use a custom version of copyinuio() to implement
osf1_{read,write}v() via kern_{read,write}v().
linux32_machdep.c:
- Use a custom version of copyinuio() to implement readv/writev using
kern_readv/writev.
- Use kern_sched_rr_get_interval() rather than the stackgap.
freebsd32_misc.c:
- Use a custom version of copyinuio() to implement readv/writev using
kern_readv/writev.
- Use kern_settimeofday() and kern_adjtime() rather than
stackgapping it.
ibcs2_misc.c:
- Use kern_settimeofday() to avoid stackgap use.
- In sparc64_init() remove the call to tick_stop(). There's no need to
call tick_stop() again after tick_init() as tick interrupts already
have been disabled as part of tick_init().
- Use FBSDID.
- Add a workaround for a bug in BlackBird CPUs (said to be part of the
SpitFire erratum #54) which can cause writes to the TICK_CMPR register
to fail. This seems to fix the dying clocks problem reported by jhb@
and kris@.
- In tick_init() just use tick_stop() for stopping the tick interrupts
until a proper handler is set up later. This also stops the system
tick interrupt on USIII systems earlier.
- Some minor changes, e.g. use FBSDID, remove unused headers, etc.
Some changes to intr_execute_handlers():
- Fix NULL pointer dereferences caused when an ithread or a handler is
NULL which happens when a stray interrupt triggers after the respective
device interrupt was torn down.
- Remove the critical section around INTR_FAST handlers which actually
was a nested critical section. Both tl0_intr() and tl1_intr() already
enter a critical section for calling intr_execute_handlers().
| Add snmp_pf, a bsnmpd module for monitoring (not managing!) pf firewalls.
| Currently implemented are most things related to states and interfaces, todo
| are address tables and altq. I've tried to keep this roughly in sync with a
| project implementing this for net-snmpd.
Replace buggy for-loops to skip certain character with strspn(). If *fmt was
'\0' (eg in the invocation 'printf %'), the for-loop would miss the terminating
null character.
Assign 0.0 to the variable passed to getfloating() if the argument is missing.
Add limits on the number of elements in the sack scoreboard both
per-connection and globally. This eliminates potential DoS attacks
where SACK scoreboard elements tie up too much memory.
- Tighten up the Timestamp checks to prevent a spoofed segment from
setting ts_recent to an arbitrary value, stopping further
communication between the two hosts.
- If the Echoed Timestamp is greater than the current time,
fall back to the non RFC 1323 RTT calculation.
- If the reassembly queue limit was reached or if we couldn't allocate
a reassembly queue state structure, don't update (receiver) sack
report.
- Similarly, if tcp_drain() is called, freeing up all items on the
reassembly queue, clean the sack report.
4 bytes of random pages. Rename the vm86 data structure in the pcb from
__pcb_spare[] to pcb_vm86[] to hopefully avoid this happening again.
This was broken in September 2003, and the bug is present in 5.2 and later.
Don't define FS_DEBUG by default, as this causes growfs to write debugging
information to /tmp/growfs.debug, which is a world-writable directory.
Reported by: Jon Passki <[email protected]>
RELENG_5_4 candidate.
Don't default to '/var/tmp/ffsinfo' for the output of ffsinfo(8), since
/var/tmp is a world-writable directory.
Reported by: Jon Passki <[email protected]>
RELENG_5 candidate.
- Add Dell PERC 4ei to the list of supported devices. It's an
alias used by Dell sometimes for PERC 4e/Si. [1]
- Delete some trailing whitespace.
Rapported by: Jon Kuster <[email protected]> [1]
tracks whether or not the receive pipe is stopped. This ensures
that we do not attempt to start the same transfer twice, and it
allows ucomstop() to skip the restarting of the read pipe if it was
not originally running, such as when called indirectly from
ucomreadcb()
PR: kern/79420
Remove PR_ATOMIC flag in ng_btsocket_protosw[] for BLUETOOTH_PROTO_RFCOMM
protocol. RFCOMM is a SOCK_STREAM protocol not SOCK_SEQPACKET. This was a
serious bug caused by cut-and-paste. I'm surprised it did not bite me before.
Dunce hat goes to me.
Approved by: re (kensmith)
Since net/net_osdep.c contained only one function that could be
trivially implemented as a macro, do that and remove it. NetBSD did
this quite a while ago.
PR: kern/33201
Prodded by: Matteo Riondato <rionda at gufi dot org>
Add rudimentary man pages for kernel options sched_4bsd and sched_ule,
which document some of the sysctls available for configuring 4bsd, some
of the bullet features of ule, and that ule is considered experimental
still.
Fix small spelling error.
entry to make it easy to find. It causes some popular motherboards to
fail and the magic required to make them work isn't widely known.
Requested by: des and others whose email address I've lost
Discussed with: peter, obrien, re@
Tested by: various folks on amd64@, des, kensmith
MTR5_4: Soon
Add information from rwatson for the problems he's encountered, along with
expanded advise for ports, packages and updating systems that once ran
2.x and/or 3.x. Not kerberos issues, even though I have no work around.
This should bring the issues wrt 4.x->5 more up to date. Let me know if
there are other issues.
- Return POLLHUP rather than POLLIN/POLLOUT on TS_ZOMBIE ttys
- Remove unneeded POLLWRNORM (old bug)
- TS_ZOMBIE ttys will set POLLIN and POLLRDNORM
- Do not call selrecord in TS_ZOMBIE ttys
PR: kern/73821
When a packet has been reinjected into ipfw(4) after dummynet(4) processing
we have a non-NULL args.rule. If the same packet later is subject to "tee"
rule, its original is sent again into ipfw_chk() and it reenters at the same
rule. This leads to infinite loop and frozen router.
Assign args.rule to NULL, any time we are going to send packet back to
ipfw_chk() after a tee rule. This is a temporary workaround, which we
will leave for RELENG_5. In HEAD we are going to make divert(4) save
next rule the same way as dummynet(4) does.
PR: kern/79546
Submitted by: Oleg Bulyzhin
Reviewed by: maxim, andre
Approved by: re (kensmith)
part of revision 1.8:
- Xref flowctl.8
revision 1.6, 1.5, 1.4:
- Added the SYNOPSIS section.
- Sort sections.
- Markup style.
revision 1.3:
1. To give the user a clue about the expiration timeout values, mention
the default timeouts of 1800 (activity) and 15 (inactivity) seconds.
2. Fix the "ifinfo" ASCII control message description:
it requires the interface number as an argument.
Approved by: re (kensmith)
date: 2005/03/16 16:39:04; author: mux; state: Exp; lines: +3 -4
Unload and destroy the TX DMA maps before destroying the DMA tag
they're attached to, not after.
Spotted by: Coverity via sam
Reminded by: delphij
Approved by: re@ (kensmith)
completed I/O requests here.
- First allocate all needed bios, so if any of allocations fail, we can
free memory before sending any I/O requests down.
Reported by: Pawel Malachowski
Approved by: re (kensmith)
if the `-i' option was always specified. Correct some mostly
theoretical bugs related to misuse of the static buffer returned by
getpwnam.
Security: rexecd's document default policy of disallowing root logins
was not enforced.
seeing a lot of install problems that get fixed by turning DMA
off. The sparc64 mailing list sees the most reports of this but it
does come up on others. Changing the default should give us a more
robust install, at the expense of people who need DMA for burning
CDs needing to turn it on (maybe).
The same change will be made in HEAD shortly by the ata maintainer.
Discussed with: sos, scottl
o FreeBSD 2-4 dump tape reading
- get dates right
- get bounds righ
o FreeBSD 1 dump tape reading
- fix old directory and inodes
o Remove -c and references to it: it was removed a while ago
pictured here. We might want to show a real CDROM layout here.
Also clarify that whatever's in the floppies/ directory is primarily
useful to users who actually need to boot from floppy to start an
installation.
layout.sgml 1.9 -> 1.10
Approved by: re (blanket)
disk names. "Approximately three...floppies" is kind of weird to me, so
substitute "several" here instead.
install.sgml 1.30 -> 1.31
Approved by: re (blanket)
adjustments.
This is MFen 1.69.2.1 -> 1.69.2.16 with current errata items trimmed.
Obtained from: The FreeBSD Simplified Chinese Project CVS
Approved by: re (blanket)
> relocate the power state transition statements to the
> pci_set_powerstate_method function...
and:
> move the statement about switching power states to just before we do it, so
> we don't print a false statement if the destination powerstate is
> unsupported...
>
> Revision Changes Path
> 1.283 +5 -15 src/sys/dev/pci/pci.c
> 1.285 +7 -5 src/sys/dev/pci/pci.c
Approved by: re (kensmith)
> Implement mimimum system software delays, per PCI PM 1.1 spec, as
> suggested by Peter Edwards. This seems to fix my fxp problems and
> likely will fix his as well. Use DELAY rather than *sleep because we
> can be called from any context.
>
> Revision Changes Path
> 1.274 +55 -38 src/sys/dev/pci/pci.c
> 1.275 +2 -2 src/sys/dev/pci/pci.c
Approved by: re (scottl)
changes were mis-merged when brought from HEAD to RELENG_5, as the
socket lock was acquired before the protocol locks, rather than after,
violating the lock order. This commit synchronizes the lock acquisition
with the same code in HEAD.
Approved by: re (scottl)
The SO_NOSIGPIPE socket option allows a user process to mark a socket
so that the socket does not generate SIGPIPE, only EPIPE, when a write
is attempted after socket shutdown. When the option was introduced in
2002, this required the logic for determining whether SIGPIPE was
generated to be pushed down from dofilewrite() to the socket layer so
that the socket options could be considered. However, the change in
2002 omitted modification to soo_write() required to add that logic,
resulting in SIGPIPE not being generated even without SO_NOSIGPIPE when
the socket was written to using write() or related generic system calls.
This change adds the EPIPE logic to soo_write(), generating a SIGPIPE
signal to the process associated with the passed uio in the event that
the SO_NOSIGPIPE option is not set.
Notes:
- The are upsides and downsides to placing this logic in the socket
layer as opposed to the file descriptor layer. This is really fd
layer logic, but because we need so_options, we have a choice of
layering violations and pick this one.
- SIGPIPE possibly should be delivered to the thread performing the
write, not the process performing the write.
- uio->uio_td and the td argument to soo_write() might potentially
differ; we use the thread in the uio argument.
- The "sigpipe" regression test in src/tools/regression/sockets/sigpipe
tests for the bug.
Submitted by: Mikko Tyolajarvi <mbsd at pacbell dot net>
Talked with: glebius, alfred
PR: 78478
Approved by: re (scottl)
date: 2005/03/23 16:43:29; author: gibbs; state: Exp; lines: +13 -2
Restore queue depth settings across tag disable events. The system often
disables tag queuing temporarily in order to allow controllers a window
to safely perform transfer negotiation with non-compliant devices. Before
this change, CAM would restore the queue depth to the controller specified
maximum or device quirk level rather than any depth determined by reactions
to QUEUE FULL/BUSY events or an explicit user setting.
During device probe, initialize the flags field for XPT_SCAN_BUS.
The uninitialized value often confused CAM into not bothering to
issue an AC_FOUND_DEVICE async event for new devices. The reason
this bug wasn't reported earlier is that CAM manually announces
devices after the initial system bus scans.
Approved by: re (scottl)
Don't pass unadulterated unit numbers to make_dev and its ilk- if you
have more than 256 units, you die. Horribly. Convert them using
unit2minor.
Original -HEAD Revisions:
1.43 +5 -4 src/sys/cam/scsi/scsi_pass.c
1.31 +1 -1 src/sys/cam/scsi/scsi_ses.c
Approved by: re (scottl)
date: 2005/03/15 22:53:31; author: imp; state: Exp; lines: +3 -1
If bus_generic_susped returns an error, devlist is not freed. Free it.
Submitted by: Ted Unangst (using the Coverity Prevent analysis tool)
Approved by: re (scottl)
In tcp_usr_send(), broaden coverage of the socket buffer lock in the
non-OOB case so that the sbspace() check is performed under the same
lock instance as the append to the send socket buffer.
Approved by: re (kensmith)
In bpf_setf(), protect against races between multiple user threads
attempting to change the BPF filter on a BPF descriptor at the same
time: retrieve the old filter pointer under the same locked region
as setting the new pointer.
Approved by: re (kensmith)
Update a comment describing bpf_iflist to indicate that the BPF interface
structures correspond to specific link layers, so the same network
interface may appear more than once.
Approved by: re (kensmith)
When upcalling from a socket in soisconnected() for an accept filter,
call with flag M_DONTWAIT rather than M_TRYWAIT, as we don't want to
do blocking memory allocation (etc) in the netisr.
Approved by: re (kensmith)
- Allocate the interrupt resource as RF_SHAREABLE allowing uart(4) to work
with shared IRQs in case the bus code, MD interrupt code, etc. permits.
Together with sys/sparc64/sparc64/intr_machdep.c rev. 1.21 (MFC'ed in
rev. 1.19.2.1) this fixes an endless loop in uart_intr() when using the
second NS16550 on the ISA bus of sparc64 machines.
- Destroy the hardware mutex on detach and in case attaching fails.
Approved by: re (kensmith, scottl)
- Assorted style fixes and minor changes.
- Allow multiple INTR_FAST handlers for the same source. The motivation
for this are the on-board SCCs and UARTs that use a shared IRQ.
- Rework the interrupt counting code to account for shared interrupts.
- In case ithread_add_handler() failed in inthand_add() just return with
the error code instead of setting up a non-fast handler regardless or
setting up a non-fast handler instead of a fast handler. I can't think
of a situation where the former behaviour would do the right thing.
Approved by: re (kensmith, scottl)
1.120 Use M_NOWAIT when allocating from a callout routine.
1.121 Fix an incorrect NULL argument to usbd_set_interface()
associated with the ALT_IFACE_1 quirk.
Approved by: re (kensmith)
1.67 Root hubs don't have transaction translators, so so skip
printing the message about them if the hub depth is zero.
1.68 Fix incorrect language parameter when getting the device serial
number
Approved by: re (kensmith)
date: 2005/01/05 00:06:15; author: cognet; state: Exp; lines: +2 -2
Disable checksum offloading by default. It seems to produce corrupted packets
with some revisions of the chip (particularly when using multiple TX
descriptors).
Approved by: re
carp_carpdev_state_locked() is called every time carp interface is attached.
The first call backs up flags of the first interface, and the second
call backs up them again, erasing correct values.
To solve this, a carp_sc_state_locked() function is introduced. It is
called when interface is attached to parent, instead of calling
carp_carpdev_state_locked. carp_carpdev_state_locked() calls
carp_sc_state_locked() for each sc in chain.
Reported by: Yuriy N. Shkandybin, sem
Approved by: re (kensmith)
- Don't free mbuf, passed to interface output method if the latter
returns error. In this case mbuf has already been freed. [1]
- Remove redundant declaration.
PR: kern/78893 [1]
Submitted by: Liang Yi [1]
Reviewed by: sam
Approved by: re (kensmith)
When disarming a watchdog by using an interval of WD_TO_NEVER a non-zero
return value of the ioctl doesn't indicate that the command has failed
so don't let watchdog(8) return an error in this case.
Approved by: re (kensmith)
o Enable all supported frame types when neither is enabled explicitly in
the kernel config;
o fix ef(4) driver when kernel compiled w/o IPX.
Approved by: re (kensmith)
re(4) ALTQ support and replace of some RFC derived manual pages.
Update release notes:
s/Early Adopter's Guide/Migration Guide/[*]
Pointed out by: delphij[*]
Approved by: re (implicitly)
RELENG_5. This includes almost everything, except for if_ndis_usb.c,
which is just a stub at the moment and won't be ready in time for
5.4, and for the patches to enable "ifconfig ndis0 scan" to work,
since net80211 in RELENG_5 doesn't support it.
Also turn on ndiscvt(8) for the amd64 platform.
Approved by: re
The way this was done in HEAD was to remove the old pages
and add the new pages. The same process is being followed here in
STABLE.
Reviewed by: Hiroki Sato for Release Engineering
Approved by: re (Hiroki Sato) for Release Engineering
Fix a bunch of bugs I came accross when looking at the ixgb(4) driver,
some of which are rather serious:
- Use the device sysctl tree instead of rolling our own.
- Don't create a bus_dmamap_t to pass to bus_dmamem_alloc(), it is
bus_dmamem_alloc() that creates it itself. The DMA map created
by the driver was overwritten and its memory was leaked.
- Fix resource handling bugs in the error path of ixgb_dma_alloc().
- Don't use vtophys() to get the base address of the TX and RX rings
when busdma already gave us the correct address to use!
- Remove now useless includes and the alpha_XXX_dmamap() hack.
- Don't initialize if_output to ether_output(), ether_ifattach() does
it for us already.
- Add proper module dependencies on ether and pci.
Tested by: Paul Willmann willmann at rice dot edu
Approved by: re@ (kensmith)
Fix a problem with the cd(4) driver -- the CAMGETPASSTHRU ioctl wouldn't
succeed if there was no media in the drive.
This was broken in rev 1.72 when the media check was added to cdioctl().
For now, check the ioctl group to decide whether to check for media or not.
(We only need to check for media on CD-specific ioctls.)
Reported by: bland
Approved by: re (kensmith)
camcontrol.c: 1.53
camcontrol.8: 1.40
Add "report only" functionality to 'camcontrol format', so users can get a
report on the status of a format already running on a drive.
Fix status reporting for 'camcontrol format'. This was broken in rev 1.34
of camcontrol.c, almost 4 years ago!
Submitted by: joerg (most of the reportonly changes)
Approved by: re (kensmith)
> fix kldloading of pci driver modules after boot on sparc64... since
> we weren't using the pci module, we weren't restoring the pci state...
>
> Revision Changes Path
> 1.6 +1 -1 src/sys/sparc64/pci/ofw_pcibus.c
Approved by: re (kensmith)
You must selwakeup{,pri}() when closing a selectable object or the
td->td_sel will get trashed and crash the system. Fix BPF's mistake
in this area.
Approved by: re
* When adding/deleting multicast addresses, only whack the address filter
if the interface is marked RUNNING.
Obtained from: NetBSD if_sk.c rev. 1.12
* Don't initialize the card (and start an autonegotiation) every time the IP
address changes. Makes 'dhclient sk0' invocations way faster and more
consistant. i.e. one DHCPREQUEST elicits the DHCPACK.
Obtained from: OpenBSD if_sk.c rev. 1.56
* Additional locking changes in sk_ioctl.
MFC if_sk.c rev. 1.100, if_skreg.h rev. 1.26
* Improve chip identification.
Obtained from: NetBSD if_sk.c rev. 1.11
* Take PHY out of reset for Yukon Lite Rev. A3.
Submitted by: postings on net@ in thread "skc0: no PHY found", 2005-02-22
MFC if_sk.c rec. 1.102, if_skreg.h rev. 1.28
Do not try to free non allocated memory in error case.
Do our best to plug some memory leaks (VPD data, jumbo memory buffer,...).
Log if we cannot free because memory still in use.
Change locking to avoid ''acquiring duplicate lock of same
type: "network driver"'' and potential deadlock. Also seems to fix LOR #063.
PR: kern/75677
Approved by: re (scottl)
Approved by: rwatson (mentor)
- hardware/common/dev.sgml: 1.227.2.14 -> 1.227.2.24
- installation/common/install.sgml: 1.27 -> 1.27.2.2
- relnotes/common/new.sgml: 1.761.2.11 -> 1.761.2.37
Which has made Simplified Chinese translation in sync with RELENG_5
again.
Obtained from: The FreeBSD Simplified Chinese Project CVS
Approved by: re (blanket)
1. Annotate the rc.conf reference with a hint to the "cloned_interfaces"
variable, because it might be not obvious how to configure carp(4)
devices in rc.conf.
2. Remove the sentence about the not implemented "carpdev" option (this
was not imported from OpenBSD according to our source code) to avoid
confusion.
Approved by: re
pointed to by "us". This isnot really a problem in practice because
it nearly always points to the same cred but it could have caused a problem
in the future.
Approved by: re (ken)
>fix aio+kq... I've been running ambrisko's test program for much longer
>w/o problems than I was before... This simply brings back the knote_delete
>as knlist_delete which will also drop the knote's, instead of just clearing
>the list and setting _ONESHOT...
>
>Fix a race where if a note was _INFLUX and _DETACHED, it could end up being
>modified... whoopse..
>
>Revision Changes Path
>1.90 +11 -8 src/sys/kern/kern_event.c
>1.183 +1 -1 src/sys/kern/vfs_aio.c
>1.28 +6 -1 src/sys/sys/event.h
Approved by: re (kensmith)
spaces in the middle of lines. This wasn't intended; apparently
emacs tabify doesn't do what I thought it did. Go fix these up.
As before, no content changes, this only affects whitespace.
den also submitted a fix-up patch that was nearly identical to
this change.
Pointed out by: Kelly Yancy < kbyanc#at#posi#dot#net >, den
Approved by: re (blanket)
> Log:
> Update parsing of the ports INDEX file to accomodate some new
> fields that got added to it recently-ish. While here document
> what each of the fields is based on discussion with portmgr@.
>
> Patch from: murray (slightly adapted)
Approved by: re (scottl)
date: 2005/03/22 18:29:41; author: krion; state: Exp; lines: +4 -0
Add mt locale directory, since more and more ports create and use it.
Approved by: re (kensmith)
Fix up an omission related to obsolete BIND executables that should
have been in the 5.3-RELEASE version of this document (obtained from
5.3-RELEASE errata).
Reviewed by: trhodes
Approved by: re (blanket)
This behaviour is inline with ata-mkIII that will be committed to HEAD
soon and fixes making crashdumps (and automatic reboots) after panic.
Approved by: re (the patch slightly differs from what was sent for approval)
No objections from: sos
RELENG_5 including:
- make package-split target and changes to iso.1 and cdrom.* targets.
- Replace print-cdrom-packages.sh with package-split.py and add
package-trees.sh.
- Merge livefs onto disc1 unless SEPARATE_LIVEFS is set in which case it
is put on livefs.iso instead.
- Add /stand symlink to livefs to fix fixit.profile.
- Sync release(7).
- Remove drivers.conf(5).
Approved by: re (kensmith)
Avoid repeated acquisition and release of the vm object lock inside of
two loops in agp_generic_bind_memory(). As an intended side-effect, all
of the calls to vm_page_wakeup() are now performed with the containing
vm object lock held.
Approved by: re (kensmith)
1.98: Support should now cover all old and current products.
1.97: Update the Promise support for combo (SATA+PATA) controllers.
1.96: Compensate for off by one bugs in disk firmware for 48BIT
addressing cutover
1.95: Update the ICH6 support so all 4 SATA channels can be used.
We still use "normal" mode, AHCI mode is in the works still.
ata-pci.h
1.36: Add first shot on support for the new Promise SATAII chips.
Approved by: re
1.42: When resubmitting a timed out request, reset donecount.
1.41: Reset timeout when we are back from interrupt.
1.40: Correct logical error, result was that retries wasn't always made but
failure reported instead.
1.39: Do not retry on requests that have lost their device during reinit.
Approved by: re
1.53: Resolve "memory modified after free" panics on Thinkpads
1.52: Avoid long hangs on resume on some systems.
1.51: Try to get out of probing as early as possible on (hopefully) vacant
channels.
1.50: Compensate for off by one bugs in disk firmware for 48BIT
addressing cutover.
Approved by: re
conf/options.i386 rev 1.218
i386/conf/NOTES rev 1.1189
date: 2005/03/17 01:20:49; author: cognet; state: Exp; lines: +121 -2
Bring back some of the ioctl junk that was removed in rev 1.59 as a
i386-only kernel option, ASR_COMPAT, and under BURN_BRIDGES.
It is really ugly, but raidutils depends on it.
Discussed with: scottl
Approved by: re
sleeping if necessary and prioritising normal abort requests over
timeouts. This fixes crashes that occur when a transfer is aborted
after it has timed out but before the timeout processing completes,
as was quite frequently seen when lpd was printing to a USB printer.
Approved by: re (kensmith)
all devices in the system have been attached, but no later. This
ensures that we do not explore ohci or uhci busses before the
companion echi controller has been initialised, so it should fix
the problem of multi-speed USB devices getting attached as USB 1
devices first and then re-attached as USB 2.
Approved by: re (kensmith)
o Fix minor endianness confusion
o Fix the bug that prevented most EHCI interrupt transfers from
working correctly, and enable split transactions
o Arrange the periodic QH tree correctly
o Ignore non-fatal qTD token status bits
o Set the split transaction interrupt C-mask correctly
Approved by: re (kensmith)
race conditions when stopping and resetting timers. This only avoids
the race conditions with Giant-locked callouts; it was not possible
to backport callout_init_mtx() since adding the c_mtx field to
struct callout would have changed the callout ABI.
Giant-locked callouts will now have much simpler semantics. As long
as Giant is held when invoking callout_stop() or callout_reset(),
then these functions will guarantee that the callout will be stopped,
even if softclock() had already begun to process the callout.
There should be no change in behaviour for "MP-safe" callouts; these
still need to use the techniques now described in timeout(9) to
avoid race conditions.
Approved by: re (kensmith)
Change the PATH for pkg_add to be the same used for pointyhat package builds.
This will give our users and porters a more consistent experience between
installing ports and installing packages.
Approved by: re (kensmith)
snapshots, instead point them at a Web page on the main FreeBSD
site that gives more information on the monthly (RE-created) snapshots
plus pointers to the jp.freebsd.org and se.freebsd.org snapshots.
release.ent 1.22 -> 1.23
Approved by: re (blanket)
compat libraries on amd64. It's not seen during a normal 'buildworld'.
This isn't an MFC because the compat libraries have been ripped out
of HEAD complely.
Reviewed by: obrien
Approved by: re (scottl despite a mail client disagreement :-)
- Reduce the number of netgraph messages when listing
nodes from (N + 1) to 1, where N is the number of
nodes in the system.
- Implement "ls -l" which runs the "show" command for
each node.
In collaboration with: glebius
Approved by: re (kensmith)
Fix a terrible braino in last commit. Put kern.debug back to /var/log/messages
and do exactly what last commit message described.
Approved by: re (kensmith)
Fixes a bug that caused UFS2 filesystems bigger than 2TB to
prematurely report that they were full and/or to panic the kernel
with the message ``ffs_clusteralloc: allocated out of group''.
Approved by: re (kensmith), mckusick
Plug item leak in macro NG_RESPOND_MSG. Item was leaked when destination
node couldn't be addressed.
Submitted by: Roselyn Lee
Approved by: re (kensmith)
(the log is based on tags and is not very clean
about actual updates):
1.69.2.15 -> 1.69.2.16 errata/article.sgml
1.257 -> 1.227.2.24 hardware/common/dev.sgml
1.28 -> 1.27.2.2 installation/common/install.sgml
1.35 -> 1.31.2.2 readme/article.sgml
Obtained from: The FreeBSD Russian Documentation Project
Approved by: re (hrs)
cycle. This is particularly useful when VESA is available (either
`options VESA' or load the vesa module), as BIOSes in some notebooks
may correctly save and restore LCD panel settings using VESA in
cases where calling the video BIOS POST is not effective. On some
systems it may also be necessary to set the hw.acpi.reset_video
sysctl to 0.
Approved by: re (kensmith)
actually work. Also save the DAC state, increase the maximum save
state size up to 12k, and refuse to save the VESA state if the BIOS
reports it is larger than the maximum size we can handle.
Approved by: re (kensmith)
revision 1.224
date: 2005/02/27 15:12:50; author: mux; state: Exp; lines: +10 -10
Fix a stupid bogon from myself, sc->revision wasn't initialized when
testing it to know whether we should enable the 82503 serial mode...
Move code to the right location and disallow the use of the 82503
serial mode if the sc->revision field is 0 again. This makes fxp(4)
work correctly with ATMEL 350 93C46 cards (3 port 82559 based with a
82555 PHY), as well as with the older ATMEL 220 93C46 (same flavour)
and with the even older 10Mbps-only 82557 cards with the 82503 serial
interface.
Tested by: Andre Albsmeier <[email protected]>, krion
Approved by: re@ (kensmith)
merge from HEAD to RELENG_5 of fil.c:1.43:
Elminate 1 LOR (actually a recursive mutex grab) involving ipfilter where
we loop through all the list of NICs (struct ifnet), holding the lock on
it and then do a name lookup with ifunit() whilst holding it.
Approved by: re (kensmith)
fine-grained locking for ipfilter. This is an approximate merge of
several overlapping changes introduced due to build problems with the
original changes, first attempted fixes, second attempted fixes, et al.
ip_auth.c:1.37, ip_compat.h:1.24, ip_frag.c:1.26, ip_log.c:1.28, ip_nat.h:1.22,
ip_proxy.c:1.23, ip_state.c:1.34, ip_state.h:1.16, mlfk_ipl.c:1.14
Enable fine grained locking within IPFilter, using mtx(9) and sx(9) allowing
the the "needs giant" flag to be removed from the driver.
fil.c:1.41, ip_file.c:1.50, ip_fil.h:1.28
Sprinkle in some __FreeBSD_version checks so that this compiles again. Don't
define PFIL_HOOKS anymore.
Submitted by: keramida
|| (__FreeBSD_version >= 503000)
ip_fil.h:1.29
Darnit, through a maze of twisty passages, ipfilter needs to have PFIL_HOOKS
defined. Revert part of the previous commit to fix this.
fil.c:1.42, ip_fil.c:1.51
* The #ifdef's to cause mutex's for freebsd to be declared were meant to pick
up on USE_MUTEX being defined, but this patch
* Remove some code that's in a #ifndef FreeBSD that's no longer used.
ip_auth.c:1.38
* Remove some code that's in a #ifndef FreeBSD that's no longer used.
This collective set of changes should reduce/eliminate reported crashes
associated with ipfilter and SMP configurations.
Timeout: darrenr
Approved by: re (kensmith)
Tested by: nectar
When prepending an LCC SNAP header to an atalk outgoing ethernet packet,
allocate the additional mbuf (if needed) using a non-sleeping memory
allocation.
Approved by: re (kensmith)
In the ddp_output() path, which can be called in a variety of threading
and locking contexts, use a non-sleeping allocation for mbufs.
Approved by: re (kensmith)
Assert sem_lock in id_to_sem() and sem_lookup_byname(), since these
functions iterate over the global POSIX semaphore lists.
Approved by: re (kensmith)
> Remove a shadow declaration of 'error' that caused certain tests to be
> pointless.
>
> Submitted by: Coverity Prevent analysis tool
Approved by: re (kensmith)
The m_ext reference counts are potentially shared and modified
asynchronously by different threads. Thus, declare as volatile the
reference count that is accessed through m_ext's pointer, ref_cnt.
Approved by: re (dwhite,jhb)
date: 2005/03/03 00:22:59; author: mux; state: Exp; lines: +13 -8
Fix the panic recently reported on -current@ occuring when configuring
a vlan interface attached to a fxp(4) card when it has not been
initialized yet. We now set the links from our internel TX descriptor
structure to the TX command blocks at attach time rather than at init
time. While I'm here, slightly improve the style in fxp_attach().
PR: kern/78112
Reported by: Gavin Atkinson <[email protected]> and others
Tested by: flz, Gavin Atkinson <[email protected]>
Approved by: re@ (kensmith)
Give a better advice on how to convert DOS text to UNIX text.
The former tip used `col -bx', which would not only discard
CR's, but also expand TAB's and remove BS'en. This effect is
not always wanted.
Approved by: re (kensmith)
Cisco uses milliseconds for uptime. This is stupid. Nobody cares of such
precision when IP packet may travel through internet for several seconds.
Also uptime measured in milliseconds overflows every 48+ days.
But we have to do same to keep compatibility with Cisco and flow-tools.
Make a macro MILLIUPTIME, which does overflowable multiplication to 1000.
Requested by: Sergey Ryabin, Oleg Bulyzhin
Approved by: re (kensmith)
Mark the IPX netisr as MPSAFE so that inbound IPX traffic is processed
without Giant, and can be directly dispatched in the ithread when
net.isr.enable is turned on.
Approved by: re (kensmith)
Recent changes have locked down most of the highly dynamic data
structures in IPX/SPX -- primarily, sequence numbering, PCB lists,
and PCBs for IPX raw sockets, IPX datagram sockets, and IPX/SPX.
As such, remove remove NET_NEEDS_GIANT() for IPX, and remove the
assertion of Giant in the ipxintr() IPX input path.
Note that IPX/SPX is not fully MPSAFE, and that there are some
problems with IPX/SPX locking that will require some further work.
However, it is now safe enough to run in general without the Giant
lock.
Approved by: re (kensmith)
Use the IPX PCB list mutex and IPX PCB mutexes to lock down the SPX
portion of IPX/SPX:
- Protect IPX PCB lists with the IPX PCB list mutex, in particular
when calling PCB and PCB list manipulation routines in ipx_pcb.c.
- Protect both IPX PCB state and SPX PCB state using the IPX PCB
mutex.
- Generally annotate locking, as well as adding liberal use of lock
assertions to document locking requirements.
- Where possible, use unlocked reads when reading integer or smaller
sized socket options on SPX sockets.
- De-spl throughout.
Notes:
- spx_input() expects both the list mutex and PCB mutex to be held
on entry, but will release both on return. Because sonewconn() is
called from spx_input(), it may actually drop one PCB lock and
acquire another during generation of a new connection, meaning the
caller is not in a position to unlock the PCB mutex.
Approved by: re (kensmith)
Protect ipx_pexseq with the IPX PCB list mutex.
When processing socket options against IPX PCBs, generally protect
PCB fields using the IPX PCB mutex. Where possible, use unlocked
reads on integer values to avoid locking overhead.
Approved by: re (kensmith)
Acquire or assert the IPX PCB list lock or IPX PCB lock during various
protocol methods relating to IPX. Conditionally acquire the PCB list
lock in the send operation only if the socket requires binding in order
to use the requested address.
Remove spl's generally no longer required during these accesses.
Approved by: re (kensmith)
date: 2005/01/09 05:10:43; author: rwatson; state: Exp; lines: +21 -1
Assert or acquire the IPX PCB list lock or IPX PCB locks throughout
the IPX-related PCB routines. In general, the list lock is required
to iterate the PCB list, either for read or write; the PCB lock is
required to access or modify a PCB. To change the binding of a PCB,
both locks must be held.
Approved by: re (kensmith)
RELENG_5:
Introduce a global mutex, ipxpcb_list_mtx, to protect the global
IPX PCB lists. Add macros to initialize, destroy, lock, unlock,
and assert the mutex. Initialize the mutex when IPX is started.
Add per-IPX PCB mutexes, ipxp_mtx in struct ipxpcb, to protect
per-PCB IPX/SPX state. Add macros to initialize, destroy, lock,
unlock, and assert the mutex. Initialize the mutex when a new
PCB is allocated; destroy it when the PCB is free'd.
Approved by: re (kensmith)
- Autogenerate device listings for hptmv(4).
- Add vge(4) to the Hardware Notes.
- Auto generate device listings for the following drivers: snd_ad1816,
snd_cmi, snd_cs4281, snd_ds1, snd_emu10k1, snd_es137x, and snd_solo.
- Auto generate device listing for snd_neomagic(4).
Approved by: re (hrs)
Introduce two new options, "CPU private" and "no wait", to sf_buf_alloc().
Change the spelling of the "catch" option to be consistent with the new
options.
Approved by: re (kensmith)
> fix a bug where bpf would try to wakeup before updating the state.. This
> was causing kqueue not to see the correct state and not wake up a process
> that is waiting...
>
> Submitted by: nCircle Network Security, Inc.
>
> Revision Changes Path
> 1.146 +6 -2 src/sys/net/bpf.c
Approved by: re (kensmith)
atm_socket.c:1.23, atm_var.h:1.26, ipatm_load.c:1.l21,
ng_btsocket_l2cap.c:1.16, ng_btsocket_rfcomm.c:1.15, tcp_usrreq.c:1.15,
spx_usrreq.c:1.62, socketvar.h:1.139 from HEAD to RELENG_5:
In the current world order, solisten() implements the state transition of
a socket from a regular socket to a listening socket able to accept new
connections. As part of this state transition, solisten() calls into the
protocol to update protocol-layer state. There were several bugs in this
implementation that could result in a race wherein a TCP SYN received
in the interval between the protocol state transition and the shortly
following socket layer transition would result in a panic in the TCP code,
as the socket would be in the TCPS_LISTEN state, but the socket would not
have the SO_ACCEPTCONN flag set.
This change does the following:
- Pushes the socket state transition from the socket layer solisten() to
to socket "library" routines called from the protocol. This permits
the socket routines to be called while holding the protocol mutexes,
preventing a race exposing the incomplete socket state transition to TCP
after the TCP state transition has completed. The check for a socket
layer state transition is performed by solisten_proto_check(), and the
actual transition is performed by solisten_proto().
- Holds the socket lock for the duration of the socket state test and set,
and over the protocol layer state transition, which is now possible as
the socket lock is acquired by the protocol layer, rather than vice
versa. This prevents additional state related races in the socket
layer.
This permits the dual transition of socket layer and protocol layer state
to occur while holding locks for both layers, making the two changes
atomic with respect to one another. Similar changes are likely require
elsewhere in the socket/protocol code.
Reported by: Peter Holm <[email protected]>
Review and fixes from: emax, Antoine Brodin <[email protected]>
Philosophical head nod: gnn
Note that this changes the behavior of the pru_listen() protocol entry point;
all protocols are updated to match the new behavior. We do not know of any
third party protocol implementations that this might cause problems for.
Approved by: re (kensmith)
Fix a problem in the Skinny ALG where a specially crafted packet could cause
a libalias application (e.g. natd, ppp, etc.) to crash. Note: Skinny support
is not enabled in natd or ppp by default.
Approved by: re (kensmith)
Security: This fixes a remote DoS exploit
locking, many other performance enhancements, new PCI IDs, and support for new
management apps. Many thanks to LSI for providing engineering, QA, and
hardware donation support for this.
Approved by: re
preserve the ABI for poorly-behaved programs like xsysinfo that grovel
around in kvm to read nfiles rather than using the kern.openfiles sysctl.
Approved by: re
- Fix braino introduced in rev. 1.17 (MFC'ed in rev. 1.15.2.2), unlike the
X1032A (HME-ISP1040-combo) and the X1034A (quad HME; QFE) cards the X1033A
(single HME) don't have a PCI-PCI-bridge so we can't rely on the PCI slot
number being useable as index for the network address to read from the VPD
on the latter. Use the end tag to determine whether it is a QFE VPD with
4 NAs and only use the slot number as index in this case.
- Remove a useless check.
return after freeing data element, instead of falling through, and using
the free'd element, and ultimate NULL deref of the failed allocation.
MFC after: 1 week
Revision Changes Path
1.79 +1 -0 src/sys/dev/firewire/firewire.c
don't try to recurse on the bpf lock.. kqueue already locks the bpf lock
now...
Submitted by: Ed Maste of Sandvine Inc.
MFC after: 1 week
Revision Changes Path
1.139 +1 -2 src/sys/net/bpf.c
with the kernel compile time option:
options IPFIREWALL_FORWARD_EXTENDED
This option has to be specified in addition to IPFIRWALL_FORWARD.
PR: kern/71910
PR: kern/73129
date: 2005/02/24 00:13:16; author: csjp; state: Exp; lines: +6 -0
Add locking assertions into vn_extattr_set, vn_extattr_get and
vn_extattr_rm. This is meant to catch conditions where IO_NODELOCKED
has been specified without the vnode being locked.
+ Remove lots of tab/space errors introduced by massive cut-n-paste action.
+ Take into account that Pinnacle screwed up their PCI ID in the beginning..
Older cards have it reversed.
Also, use some already defined values instead of magic numbers.
+ Add code to do better auto detection of tuner types etc.
+ Add support for the Pixelview PlayTV
+ Remove vnode.h and adjust includes to compensate for pollution.
+ Remove support for FreeBSD < 4.recent from this driver.
Attempt to free any static TLS space used by a shared library when it
is unloaded. This allows applications which load and unload libraries
like libGL.so.1 several times to work properly.
- remove OpenBSDisms, add FreeBSDisms
- comment out feature, we do not have yet: tcpdumping on pfsync,
add a BUGS section
- reference carp.4
- dereference bpf(4), tcpdump(7), hostname.if(5)
- sort references
- tell when pfsync appeared in FreeBSD
Reviewed by: mlaier
date: 2005/02/24 00:05:50; author: csjp; state: Exp; lines: +1 -2
Drop bzero and shove the responsibility of zeroing the kse upcall
object on to the zone allocator. It should be noted that uma_zalloc(9)
uses bzero to zero out the object so there probably wont be any
real performance benefit. If UMA grows the ability to supply
zeroed zones more efficiently in the future, we will not have to
modify all the existing consumers.
Assert that page allocations during an interrupt specify
VM_ALLOC_INTERRUPT.
Assert that pages removed from the cache queue are not busy.
MFC revision 1.303
Transfer responsibility for freeing the page taken from the cache
queue and (possibly) unlocking the containing object from
vm_page_alloc() to vm_page_select_cache().
parsing (on the `#!' line) back to the way it has worked in FreeBSD since
March 2000. That processing is not correct, but we aren't going to have
the right fix for it tested in time for 5.4-release. Revision 1.26.4.1
fixed the behavior for some uses, and broke it for others. In particular,
it broke tricks like: #!/bin/sh -- # -*- perl -*-
which is recommended (by perl documentation) for some situations.
PR: 16393 (gives history)
Reviewed by: freebsd-arch
Introduce new commands 'tid <tid>' and 'proc <pid>' to accompany
gdb's default 'thread <thread num>' to make the task of switching
between different contexts easier.
cutover. This fix is from Dec 9th, and solves a problem some users see with
some models of large disks. Many users have reported that this fix works on
current, and I wanted to be sure it made it into 5.4-release.
[* = 1.87 ata-all.h, 1.96 ata-chipset.c, 1.181 ata-disk.c, 1.50 ata-lowlevel.c]
date: 2005/02/24 00:04:45; author: csjp; state: Exp; lines: +3 -1
-document the fact that extattr_get_* can fail if the requested
attribute does not exist on the file.
-bump document date
- Add md_provsize field to metadata, which will help with
shared-last-sector problem.
After this change, even if there is more than one provider with the same
last sector, the proper one will be chosen based on its size.
It still doesn't fix the 'c' partition problem (when da0s1 can be confused
with da0s1c) and situation when 'a' partition starts at offset 0
(then da0s1a can be confused with da0s1 and da0s1c). One can use '-h'
option there, when creating device or avoid sharing last sector.
Actually, when providers share the same last sector and their size is equal,
they provide exactly the same data, so the name (da0s1, da0s1a, da0s1c)
isn't important at all.
- Provide backward compatibility.
- Update copyright's year.
files: 1.1000
puc_sbus.c: 1.8
Declare the sbus(4) front-end of puc(4) also for fhc(4), allowing
uart(4) to support the Zilog 8530 SCCs which hang off of a FireHose
bus on Sun E4000/E5000 class machines.
geom.c 1.10
- Add GEOM_LIBRARY_PATH environment variable which allows to specify an
alternative to /lib/geom/ path where shared libraries are stored.
- Improve debugging.
the given providers. Without even one of the configured components there
should be no way to get the secret.
Supported by: WHEEL Sp. z o.o.
http://www.wheel.pl
rev. 1.111 by dds
Clarify the structure element size ordering.
rev. 1.112 - 1.113 by imp
A large majority of the source files in the tree start their license
and copyright statements in a comment that begins with /*-. Document
this tradition. A strict adherence to this rule will help resellers
that wish to publish all copyright notices, generated automatically
from the tree. There are too many variant licenses to do it purely
by more complicated pattern matching.
Clarify /*- convention.
rev. 1.114 by keramida
Fix typos and add .Pp after the end of a display to separate the
displayed text from the paragraph right after it.
rev. 1.115 - 1.117 by ru
Nits.
Add a few colons.
Fixed the misplaced $FreeBSD$.
- Improve mediasize verification.
- Remove TDP_GEOM flag from thread after ggate device creation.
This flag means "wait for all pending requests before returning to userland".
There are pending events for sure, because we just created new provider and
other classes want to taste it, but we cannot answer on I/O requests until
we're here.
Reminded by: phk
Bring the prototype for alq_open() in line with the code. Add a section
on locking.
Note that functions alq_flush() and alq_post() should not be called in
contexts where sleeping is disallowed.
- fix typo.
- icmp6_notify_error uses IP6_EXTHDR_CHECK, which in turn calls
m_pullup. icmp6_notify_error continued to use the old pointer,
which after the m_pullup is not suitable as a packet header any
longer (see m_move_pkthdr).
and this is what causes the kernel panic in sbappendaddr later on.
In newfs:
Add an option to suppress the creation of the .snap directory in
the new filesystem. This is intended for memory and vnode filesystems
that will never be fsck'ed or dumped.
In dump:
Improved error checking for existence of a .snap directory to
generate snapshots in when -L is requested. If the .snap directory
does not exist, or is not a directory, issue a warning and revert
to the non- live behavior.
Obtained from: St. Bernard Software RAPID
Add and document ilogbl(), a long double version of ilogb().
MFC Makefile,v 1.55
Hook up and document floorl().
MFC Makefile,v 1.56
Implement and document ceill().
MFC Makefile,v 1.59
Add fma() and fmaf(), which implement a fused multiply-add operation.
MFC Makefile,v 1.60
- Move the functions presently described in in ieee(3) to their own
manpages. They are not very related, so separating them makes it
easier to add meaningful cross-references and extend some of the
descriptions.
- Move the part of math(3) that discusses IEEE 754 to the ieee(3)
manpage.
MFC Makefile,v 1.62
Move machine-dependent crud to its own makefile.
MFC Makefile,v 1.64
Un-document the non-extant exp10() and exp10f() functions.
exp10() was a casualty of the transition away from the VAX.
Remove the i387 versions of atan(), atan2(), and atan2f().
They are slower than the MI routines on modern hardware,
except for degenerate cases such as the Pentium 4.
Remove i387 versions of asin() and acos(). Although the hardware
instruction was faster on the 486, it's slower than our MD version on
modern processors.
Import the subset of J.T. Conklin's single-precision x86-optimized
math routines that appear to be (a) correct and (b) faster than their
MI counterparts on my Pentium 4.
MFC Makefile.inc,v 1.1
Move machine-dependent crud to its own makefile.
MFC Makefile.inc,v 1.2
Remove the float versions of the i387 trig functions obtained from
NetBSD. They're buggy, giving particularly for inputs larger in
magnitude than 2**63.
MFC Makefile.inc,v 1.3
Remove i387 versions of asin() and acos(). Although the hardware
instruction was faster on the 486, it's slower than our MD version on
modern processors.
MFC Makefile.inc,v 1.4
Remove the i387 versions of atan(), atan2(), and atan2f().
They are slower than the MI routines on modern hardware,
except for degenerate cases such as the Pentium 4.
If x == y, return y, not x. C99 (though not IEEE 754) requires that
nextafter(+0.0, -0.0) returns -0.0 and nextafter(-0.0, +0.0) returns +0.0.
MFC s_nextafter.c,v 1.9 s_nextafterf.c,v 1.9
Update comment to reflect the code change in the previous revision.
Add and document ilogbl(), a long double version of ilogb().
MFC math.h,v 1.47
Whitespace nit.
MFC math.h,v 1.48
Implement floorl().
MFC math.h,v 1.49
Implement and document ceill().
MFC math.h,v 1.51
Set math_errhandling to MATH_ERREXCEPT. Now that we have fenv.h, we
basically support this, subject to gcc's lack of FENV_ACCESS support.
In any case, the previous setting of math_errhandling to 0 is not
allowed by POSIX.
MFC math.h,v 1.53
Only annotate pure routines with __pure2.
MFC math.h,v 1.54
Add fma() and fmaf(), which implement a fused multiply-add operation.
The origional commit message follows:
Change the definition of struct if_data's member ifi_epoch from
wall clock time to uptime because wall clock time may go
backwards.
This is a change in the API which will impact SNMP agents who
are using ifi_epoch to set RFC2233's ifCounterDiscontinuityTime.
None are known to exist today. This will not impact applications
that are using the <index, epoch> tuple to verify interface
uniqueness except that it eliminates a race which could lead to
a false assumption of uniqueness.
Discussed with: re (jhb, scottl)
Pointed out by: pkh (way back at EuroBSDCon)
Pointy hat: brooks
Correctly calculate what to do and how to retry a request to a plex
when the previous one failed and there are more than one plex in the
volume.
This could have led to a flood of error messages on the console and
probably a deadlock in certain situations.
For ethernet interfaces populate the ifSpecific field with
{transmission 7} as per RFC3635. This is done differently in
current, but that change would require changing the ABI.
Fix a critical bug in handling unix domain sockets. The daemon was
just exiting when a socket was connected.
PR: bin/76502
Submitted by: Hiroshi Oota <[email protected]>
rev. 1.33 by andre
Remove entire section talking about RTF_PRCLONING that got nuked in 5.2 already.
o Better description of IP fastforwarding. It can do the full thing now
including firewalling.
o Reword the description of ICMP redirects.
o Add references to route(4) and pfil(9).
rev. 1.34 by ru
Scheduled mdoc(7) sweep.
rev. 1.35 by ru
Fixed xref.
date: 2004/10/06 17:10:56; author: jhb; state: Exp; lines: +7 -1
- Fix the compile to chase the p_rux changes.
- Add a comment noting that the ru_[us]times values being read aren't
actually valid and need to be computed from the raw values.
Submitted by: many (1)
This is the likely missed counterpart of the recently merged kernel changes
that eliminate p_runtime in favor of rux_runtime.
date: 2005/02/20 11:32:49; author: delphij; state: Exp; lines: +0 -0
When creating a new FFS file system, the block size will indirectly
affect the largest file size that is allowed by the file system.
On the other hand, when creating a snapshot, the snapshot file will
appear as it is as big as the file system itself. Hence we will not
be able to create a snapshot on large file systems with small block
sizes.
Add a warning about this, and gives some hints to correct the issue.
Reviewed by: mckusick
summary to background fsck. This will improve startup speed when
mounting a large volume.
Original commit log:
The recomputation of file system summary at mount time can be a
very slow process, especially for large file systems that is just
recovered from a crash.
Since the summary is already re-sync'ed every 30 second, we will
not lag behind too much after a crash. With this consideration
in mind, it is more reasonable to transfer the responsibility to
background fsck, to reduce the delay after a crash.
Add a new sysctl variable, vfs.ffs.compute_summary_at_mount, to
control this behavior. When set to nonzero, we will get the
"old" behavior, that the summary is computed immediately at mount
time.
Add five new sysctl variables to adjust ndir, nbfree, nifree,
nffree and numclusters respectively. Teach fsck_ffs about these
API, however, intentionally not to check the existence, since
kernels without these sysctls must have recomputed the summary
and hence no adjustments are necessary.
This change has eliminated the usual tens of minutes of delay of
mounting large dirty volumes.
Reviewed by: mckusick
Revision Changes Path
1.35 +5 -0 src/sbin/fsck_ffs/fsck.h
1.41 +55 -0 src/sbin/fsck_ffs/pass5.c
1.132 +68 -1 src/sys/ufs/ffs/ffs_alloc.c
1.176 +12 -3 src/sys/ufs/ffs/ffs_softdep.c
1.48 +6 -1 src/sys/ufs/ffs/fs.h
In in_pcbconnect_setup() jailed sockets are treated specially: if local
address is not supplied, then jail IP is choosed and in_pcbbind() is called.
Since udp_output() does not save local addr after call to in_pcbconnect_setup(),
in_pcbbind() is called for each packet, and this is incorrect.
So, we shall treat jailed sockets specially in udp_output(), we will save
their local address.
This fixes a long standing bug with broken sendto() system call in jails.
PR: kern/26506
Reviewed by: rwatson
We can make code simplier after last change.
Noticed by: Andrew Thompson
In in_pcbconnect_setup() remove a check that route points at
loopback interface. Nobody have explained me sense of this check.
It breaks connect() system call to a destination address which is
loopback routed (e.g. blackholed).
Reviewed by: silence on net@
Do not print kernel debugging on console. In case of serial console
this can cause a really heavy load on system. Several kernel debugging
messages can be triggered even remotely (e.g. bad ARP replies).
Use kern.warning instead, so that really significant messages still
will be printed on console.
Reviewed by: current@
Security: this change fixes a DoS condition, when default system
console is serial, and box is flooded with bogus ARP
packets
Reimplement recursion protection, checking whether current thread holds
sockbuf mutex.
Reviewed by: rwatson
Remove a recursion protection, which we inherited from splnet() netgraph times.
Now several threads may write data to ng_ksocket. Locking of socket is done in
sosend().
Reviewed by: archie, julian, rwatson
store the raw values including for child process statistics and only compute
the system and user timevals on demand.
(See the 2004-10-05 18:51:12 UTC jhb commit for full details.)
rev 1.244: handle PSL_T properly across fork. Typo fix.
rev 1.243: remove redundant code to drop per-thread debug register state from
cpu_exit().
rev 1.242: restore cpu_reset proxy code to enable reset from ddb on an AP.
rev 1.241: reduce diffs to i386.
rev 1.240: remove unused cnt variable for the SMP case & trim some blank lines.
rev 1.239: take advantage of the shutdown processing being wired to the BSP
and eliminate the evil cpu_reset_proxy code now that it will never
be activated.
rev. 1.22 by alfred:
Document EMSGSIZE return from recvmsg due to insufficient free files
when transfering rights (file descriptors.)
rev. 1.23 + 1.24 by keramida
Correct NULL/nil/null pointer usage.
Revise the part of vm_pageout_scan() that moves pages from the cache
queue to the free queue. With this change, if a page from the cache
queue belongs to a locked object, it is simply skipped over rather
than moved to the inactive queue.
>ps 2005-02-17 23:04:56 UTC
>
> FreeBSD src repository
>
> Modified files:
> sys/netinet tcp_input.c tcp_sack.c tcp_var.h
> Log:
> Remove 2 (SACK) fields from the tcpcb. These are only used by a
> function that is called from tcp_input(), so they oughta be passed on
> the stack instead of stuck in the tcpcb.
>
> Submitted by: Mohan Srinivasan
>
> Revision Changes Path
> 1.268 +2 -5 src/sys/netinet/tcp_input.c
> 1.8 +8 -7 src/sys/netinet/tcp_sack.c
> 1.117 +1 -3 src/sys/netinet/tcp_var.h
- Reformat arguments bus_dma_tag_create().
- Modify ida_v3_done() to treat FIFO status of -1 as FIFO empty (0).
This is what ida_v4_done() does and seems to be necessary with some
firmware versions on v3 devices.
- Add a callout to dump card status on command queue timeouts.
1.14 libmap.c
1.4 libmap.h
1.39 rtld.1
1.102 rtld.c
Description from Dan:
Another handy libmap patch. Lets you do stuff like this:
LD_LIBMAP="libpthread.so.1=libthr.so.1" mythreadedapp
If you already have a program-specific override in libmap.conf, note
that you must use a program-specific override in LD_LIBMAP:
LD_LIBMAP="[mythreadedapp],libpthread.so.1=libthr.so.1" mythreadedapp
PR: bin/74471
Submitted by: Dan Nelson <dnelson AT allantgroup.com>
Avoid using tsleep() in the resume path as it may result in the
system hanging if timer interrupts aren't running yet.
This allows my Thinkpad to resume successfully with APM.
date: 2005/02/19 07:31:33; author: delphij; state: Exp; lines: +1 -1
When clearing a fragment, it's possible that the length is zero.
Reviewed by: mckusick
MFC After: 1 week
The Intel C/C++ compiler doesn't require a typedef for _Bool when compiling
C source so don't declare one when using the GCC-compatibility (defaulting
to GCC 2.95.0) of ICC.
Continue the transition from synchronizing access to the page's PG_BUSY
flag and busy field with the global page queues lock to synchronizing
their access with the containing object's lock. Specifically, acquire the
containing object's lock before reading the page's PG_BUSY flag and busy
field in vm_fault().
syslogd logpriv socket, tail(1) -f.
Also added a note about backported libpthread bugfixes. I wasn't sure
if this "made the bar" for HEAD release notes, so I just noted this
here in RELENG_5. Might revisit this decision later.
Add 'nocona' to the list of Intel ia64 CPUs and k8 to the AMD CPUs.
Replace -fmemoize-lookups -fsave-memoized with a working example,
-fconserve-space. To quote part of the GCC docs on this option:
"Put uninitialized or runtime-initialized global variables into the
common segment, as C does."
MFC after: 2 days
Submitted by: Daniel Gerzo <[email protected]> (original version)
Eliminate an unnecessary call to vm_page_busy().
MFC revision 1.141
Pass VM_ALLOC_NOBUSY to vm_page_grab() so that we don't have to call
vm_page_flag_clear(PG_BUSY). The object lock is held the entire time.
Thus, whether or not the PG_BUSY flag is set is invisible to others.
MFC revision 1.145
Acquire the source pmap's lock in pmap_copy().
To be more complete, discuss 'make kernel' since we do cover buildkernel.
Xref config.8.
Bump doc date.
PR: 76064
Submitted by: Gavin Atkinson <[email protected]> (original version)
Reviewed by: keramida (follow-up in the PR)
Do not mislead users into checking for a mount_ufs or mount_ufs2 manual
page. They do not exist.
PR: 53303
Submitted by: Marc Silver <[email protected]> (original version)
- make the hardware list look like that of other manpages
- fix typo
- Reword the HARDWARE section, so it can be used in the autogenerated
hardware notes.
Synchronize access to the vm page's PG_BUSY flag using the containing vm
object's lock. In the same place, eliminate unnecessary checks for a NULL
vm object pointer.
MFC revision 1.161
Eliminate (now) unnecessary acquisition and release of the global page
queues lock.
Assert that the containing object is locked in vm_page_io_start() and
vm_page_io_finish().
MFC revision 1.295
Assert that the containing vm object is locked in vm_page_busy() and
vm_page_wakeup().
MFC revision 1.296
Assert that the containing vm object is locked in vm_page_flash().
MFC revision 1.297
Assert that the containing vm object is locked in vm_page_cache() and
vm_page_try_to_cache().
MFC revision 1.300
Access to the page's busy field is (now) synchronized by the containing
object's lock. Therefore, the assertion that the page queues lock is held
can be removed from vm_page_io_start().
Modify the vm object locking in do_sendfile() so that the containing object
is locked when vm_page_io_finish() is called on a page.
MFC revision 1.203
Use VM_ALLOC_NOBUSY instead of calling vm_page_wakeup().
MFC revision 1.205
Eliminate unnecessary calls to vm_page_busy().
In soreceive(), when considering delivery to a socket in SS_ISCONFIRMING,
only call the protocol's pru_rcvd() if the protocol has the flag
PR_WANTRCVD set. This brings that instance of pru_rcvd() into line with
the rest, which do check the flag.
date: 2005/02/18 00:52:17; author: rwatson; state: Exp; lines: +4 -6
In solisten(), unconditionally set the SO_ACCEPTCONN option in
so->so_options when solisten() will succeed, rather than setting it
conditionally based on there not being queued sockets in the completed
socket queue. Otherwise, if the protocol exposes new sockets via the
completed queue before solisten() completes, the listen() system call
will succeed, but the socket and protocol state will be out of sync.
For TCP, this didn't happen in practice, as the TCP code will panic if
a new connection comes in after the tcpcb has been transitioned to a
listening state but the socket doesn't have SO_ACCEPTCONN set.
This is historical behavior resulting from bitrot since 4.3BSD, in which
that line of code was associated with the conditional NULL'ing of the
connection queue pointers (one-time initialization to be performed
during the transition to a listening socket), which are now initialized
separately.
Discussed with: fenner, gnn
this was not merged with the other earlier parts of netrate previously.
Bring both netblast.c and Makefile to revisions 1.2, ommitting only the
change to NO_MAN present in HEAD:
date: 2004/10/08 19:23:11; author: rwatson; state: Exp;
Add a version of netsend that uses the interval timer rather than
explicit clock reads to set an overall duration to the send, and
blasts rather than trying to clock output. The goal of netblast,
unlike netsend, is to send as many UDP packets as possible; the
cost is that there's no ability to control the rate, and there's
less accuracy in the timing as the interval timer granularity is
relatively low.
revision 1.2
date: 2005/02/12 20:03:30; author: rwatson; state: Exp; lines: +1 -1
Mark the signum argument to signal_handler() as __unused.
Cancelling the callout on shutdown, and move part responsible for freeing
a node resources from ng_bridge_timer() to ng_bridge_shutdown().
(see detailed log in original commit)
Noticed by: ru
Submitted by: glebius, ru
Re-write OF_decode_addr() with a bus-neutral approach, adding support
for nodes hanging off of Central, FireHose and PCI busses.
Meanwhile, i.e. after rev. 1.13 was committed to HEAD, this was also
confirmed to actually work for devices on FireHose which implies that
it also works for devices on Central.
Tested by: hrs, kris (FireHose)
UltraSparc II[e,i] based systems come up with the tick interrupt
enabled and a handler that resets the tick counter, causing DELAY()
to not work properly when used early in boot.
Disable the tick interrupt in tick_init(), which is called early in
sparc64_init(), until the interrupt is enabled again in tick_start(),
called by cpu_initclocks(), with our own handler. This fixes the hang
during probing Sun keyboards on AXi boards and Ultra 10, with other
machines like Ultra 5 probably being affected but not tested.
Some changes related to reading the MAC-address from the VPD on systems
without Open Firmware:
- Remove the checks for matching class code and PCI data structure length
and revsion, some HME PROMs vary here and we don't need that info anyway.
- On Sun QFE (Quad FastEthernet) cards read the Nth MAC-address for the
Nth HME controller instead of always the first one for all four HMEs.
- Improve the comment describing the used VPD format to better reflect
reality.
- Minor clean-up.
Clean up return handling for a number of SPX-related routines that
were derived from more complex TCP versions of the same:
- spx_close(), spx_disconnect(), spx_drop(), and spx_usrclosed() all
always free's the spxpcb invalidating the argument, so a return
value is not required to indicate if it has.
- Annotate that the cb arguments to each of these functions is
invalidated via a comment.
- When tearing down a pcb due to sonewconn() having failed, mark the
cb as NULL; later, when deciding whether to store trace information
due to SO_DEBUG, check that cb is not NULL before dereferencing or
a NULL pointer dereference may occur.
Increase the coverage scope of the receive socket buffer lock in
spx_reass() to increase atomicity across multiple operations on the
socket buffer when iterating over the SPX fragment reassembly list
for the ipxpcb, as well a to reduce the number of locking operations.
Explicitly lock the send socket buffer in spx_reass() to cover the drop
record loop for ACK'd data, rather than relying on lokcing in
sbdroprecord() and sowwakeup(), reducing the number of lock operations
as well as eliminating a possible race against the head of the send
buffer mbuf chain. Use the _locked variants of sbdroprecord() and
sowwakeup().
Eliminate XXX comments regarding allocation failures when retrieving
the peer address by using M_WAITOK in ipx_setpeeraddr() to prevent
allocation failure. The socket reference used to reach these calls
will prevent the ipxpcb from being released prematurely.
Improve handling of SPX session timeout, specifically, make sure to
properly handle the case where a connection is disconnected. The
queue(9)-enabled version of this code broke from the inner but not
outer loop, and so potentially frobbed an ipxpcb flag after the ipxpcb
was free'd, which might be picked up later by the malloc debugging
code. Properly break from the loop context and avoid touching the
cb/ipxpcb after free.
Don't cast NULL on return or when passing to another function.
Extend the annotation as to why spx_close() isn't called in spx_reass(),
and mark this code more clearly as broken.
RELENG_5:
Use a global variable, ipxpcb_lport_cache, to cache the most recently
used IPX port number, rather than using the global ipxpcb list head.
Add 'struct ipxpcb' forward declaration to ipx_var.h. I had this in
the netperf branch but for some reason didn't trigger a build failure
locally when I merged to CVS and omitted it. Presumably driver error.
Pointed out by: cperciva, tinderbox
date: 2004/12/31 00:32:50; author: rwatson; state: Exp; lines: +23 -3
Update netstat(1) for recent conversion of netipx to queue(9) from
home-brew linked lists. Read in the ipxpcb_list structure first in
order to find the first pcb pointer. Then follow the chain as
before, only the termination condition is a NULL next pointer
rather than a next pointer equal to the original offset.
date: 2004/12/31 12:04:21; author: rwatson; state: Exp; lines: +14 -34
Apply a simplifying patch submitted by rik to the IPX support in
netstat(1):
- Make previously unnecessarily global variables local.
- Use LIST_FOREACH() in preference to manual iteration.
- Restore a sanity check through slightly incestuous use of queue macro
knowledge.
Submitted by: rik
date: 2005/01/02 19:26:06; author: rwatson; state: Exp; lines: +5 -11
Revise use of queue(9) macros for netipx when used from userspace:
LIST_FOREACH() is difficult to use correctly, so don't try to.
ipx_var.h:1.19, spx_usrreq.c:1.49 from HEAD to RELENG_5:
Convert netipx to use queue(9) doubly-linked lists instead of home-brew
linked lists for ipxpcb's.
This brings a number of new features (iso9660 and ZIP support),
some important bug fixes and a number of documentation enhancements.
All in time for 5.4. ;-)
Only send packet to bpf if we are committed to send it. Previously it was
possible that the same packet would show up multiple times. This poses some
constraints on the TBD locking for snc(4) (see comment).
Obtained from: DragonFlyBSD
Submitted by: Joerg Sonnenberger
Reviewed by: rwatson
Fix a terrible braino in pfi_maybe_destroy() and unbreak "$pfctl -Fall"
with renamed interfaces.
PR: kern/77645
Reported by: Harald Schmalzbauer <harryNOschmalzbauerSPAMde>
Reviewed by: yongari
date: 2005/02/21 14:21:50; author: rwatson; state: Exp; lines: +3 -1
When aborting a UNIX domain socket bind() because VOP_CREATE() failed,
make sure to call vn_finished_write(mp) before returning.
Correct a sanity check in vnode_pager_generic_putpages(). The cast used
to implement the sanity check should have been changed when we converted
the implementation of vm_pindex_t from 32 to 64 bits. (Thus, RELENG_4 is
not affected.) The consequence of this error would be a legimate write to
an extremely large file being treated as an errant attempt to write meta-
data.
MFC revision 1.207
fix comment
Move a call to wakeup() from vm_object_terminate() to
vnode_pager_dealloc() because this call is only needed to wake threads
that slept when they discovered a dead object connected to a vnode. To
eliminate unnecessary calls to wakeup() by vnode_pager_dealloc(),
introduce a new flag, OBJ_DISCONNECTWNT.
Eliminate unnecessary calls to vm_page_busy().
MFC revision 1.340
Move the acquisition and release of the page queues lock outside of a loop
in vm_object_split() to avoid repeated acquisition and release.
MFC revision 1.343
Consider three objects, O, BO, and BBO, where BO is O's backing object
and BBO is BO's backing object. Now, suppose that O and BO are being
collapsed. Furthermore, suppose that BO has been marked dead
(OBJ_DEAD) by vm_object_backing_scan() and that either
vm_object_backing_scan() has been forced to sleep due to encountering
a busy page or vm_object_collapse() has been forced to sleep due to
memory allocation in the swap pager. If vm_object_deallocate() is
then called on BBO and BO is BBO's only shadow object,
vm_object_deallocate() will collapse BO and BBO. In doing so, it adds
a necessary temporary reference to BO. If this collapse also sleeps
and the prior collapse resumes first, the temporary reference will
cause vm_object_collapse to panic with the message "backing_object %p
was somehow re-referenced during collapse!"
Resolve this race by changing vm_object_deallocate() such that it
doesn't collapse BO and BBO if BO is marked dead. Once O and BO are
collapsed, vm_object_collapse() will attempt to collapse O and BBO.
So, vm_object_deallocate() on BBO need do nothing.
MFC revision 1.345
Update the text of an assertion to reflect changes made in revision 1.148.
Eliminate an unnecessary, temporary increment of the backing object's
reference count in vm_object_qcollapse().
+ small required hack for RELENG_5, setting kg_user_pri = PRI_MAX_IDLE:
Set the scheduling class of the zeroidle thread to PRI_IDLE.
Reviewed by: jhb
Approved by: grehan (mentor)
Set the scheduling class of the idle threads to PRI_IDLE.
While there, set their priority with sched_prio() instead of changing it
'by hand'.
Reviewed by: jhb
Approved by: grehan (mentor)
Reviewed by: jhb
Approved by: grehan (mentor)
Reword a sentence to conform with our mdoc(7) style.
Modify wording in a sentence to avoid a run on within ().
Remove a contraction.
Submitted by: Joel Dahl <[email protected]> (original version)
date: 2005/02/20 20:05:11; author: rwatson; state: Exp; lines: +2 -3
In unp_attach(), allow uma_zalloc to zero the new unpcb rather than
explicitly using bzero().
Update copyright.
date: 2005/02/20 04:18:22; author: rwatson; state: Exp; lines: +1 -1
Move assignment of UNIX domain socket pcb during unp_attach() outside
of the global UNIX domain socket mutex: no protection is needed that
early in the setup of the UNIX domain socket and socket structures.
sys/sys/jail.h, 1.264 of sys/ufs/ufs/ufs_vnops.c, and revision 1.61 of
usr.sbin/jail/jail.8:
Add a new sysctl, "security.jail.chflags_allowed", which controls the
behaviour of chflags within a jail. [...]
The default behaviour (security.jail.chflags_allowed = 0) is unchanged.
MFC ps.1 revision 1.84
date: 2005/02/14 16:56:15; author: delphij; state: Exp; lines: +22 -10
Several improvements to ps.1:
- Document the fact that empty heading text suppresses the
heading line (e.g. 'ps -o pid='), as this is very useful
in scripts.
- Describe logname keyword more completely.
- Describe the printing of arguments more completely.
- Put lockname in the correct alphabetical order in the list
of all keywords.
- Correct sentence in standards section.
Submitted by: Jilles Tjoelker <jilles at stack nl>
PR: docs/73618
MFC After: 1 week
MFC ps.1 revision 1.83, ps.c revision 1.110
date: 2005/02/09 17:37:38; author: ru; state: Exp; lines: +2 -3
Sync program's usage() with manpage's SYNOPSIS.
MFC Makefile revision 1.27
date: 2005/01/27 13:42:40; author: delphij; state: Exp; lines: +1 -1
ps(1) is WARNS=6 on all Tier-1 platforms as far as I can test,
so use default WARNS level from bin/Makefile.inc
MFC ps.1 revision 1.82
date: 2005/01/10 08:39:24; author: imp; state: Exp; lines: +1 -0
/*- or .\"- or #- to begin license clauses.
MFC Makefile revision 1.26
date: 2004/11/13 17:12:22; author: ru; state: Exp; lines: +0 -2
Removed bitrot.
Discussed with: ru
date: 2005/02/15 10:23:01; author: delphij; state: Exp; lines: +1 -1
Be more careful when doing el_parse() - only do it when el is
properly initialized, that happens when lpc is called from a tty.
Without this change, it's possible to get SIGSEGV simply doing:
echo "..:" | lpc
Reported by: Wojciech A. Koszek <dunstan at freebsd czest pl>
PR: 77462 (patch rewritten by myself)
MFC After: 1 week
date: 2005/02/14 14:09:21; author: delphij; state: Exp; lines: +4 -2
Fix parsing of '0' and non-alphanumerics in steps. Previously, an
entry having stepping value of zero can cause crontab to hang there,
and if the main crontab is being changed in this way, then cron(8)
will keep spining.
Obtained from: OpenBSD [src/usr.sbin/cron/entry.c,v 1.17]
PR: 68683 (my own, but forgot to commit it...)
MFC After: 1 week
sparc64, snd_audiocs(4), cp(4)/ctau(4)/cx(4) MPSAFE, em(4) hardware
VLAN support disabled by default, fxp(4) flow control disabled
by default, sppp(4) FR support.
date: 2005/02/18 18:43:33; author: rwatson; state: Exp; lines: +3 -3
Re-order checks in socheckuid() so that we check all deny cases before
returning accept.
date: 2005/02/18 10:49:55; author: rwatson; state: Exp; lines: +7 -3
Conditionalize cd9660 chattiness regarding the nature of the file system
mounted (is it Joliet, RockRidge, High Sierra) based on bootverbose.
Most file systems don't generate log messages based on details of the
file system superblock, and these log messages disrupt sysinstall output
during a new install from CD. We may want to explore exposing this
status information using nmount() at some point.
date: 2005/02/08 22:16:26; author: rwatson; state: Exp; lines: +13 -5
Lock raw IP socket pcb list and PCBs when processing input via
icmp6_rip6_input().
Reviewed by: gnn
date: 2005/02/09 01:12:43; author: rwatson; state: Exp; lines: +1 -0
Add missed merge of ripcbinfo extern. Given how widely used
ripcbinfo is, we should probably add it to an include file.
Spotted by: mux
- Let hme_start()/hme_init() acquire lock and then call
hme_start_locked()/hme_init_locked() respectivly.
- Teardown interrupt handler before hme_detach().
- Remove IFF_NEEDSGIANT flag and mark interrupt handler INTR_MPSAFE.
- Set callout handler to CALLOUT_MPSAFE.
- Add locks in hme MII interface.
Reviewed by: jake
Tested by: Julian C. Dunn <jdunn at opentrend dot net>
Grrr. Relocate netcat and tzdata notes to the correct section. Maybe
having two different "contrib" sections wasn't such a great idea, or
maybe I'm still trying to re-learn my way around this document.
date: 2005/02/17 13:00:23; author: rwatson; state: Exp; lines: +2 -2
In accept1(), extend coverage of the socket lock from just covering
soref() to also covering the update of so_state. While no other user
threads can update the socket state here as it's not yet hooked up to
the file descriptor array yet, the protocol could also frob the
socket state here, leading to a lost update to the so_state field.
No reported instances of this bug (as yet).
date: 2005/02/17 12:53:45; author: rwatson; state: Exp; lines: +1 -1
In sonewconn(), set the new socket's state to show the protocol-provided
connection status before inserting the new socket into the listen
socket's accept queue, or there might be a race in which another thread
wakes up when the accept lock is released, and sees the socket before its
state is set correctly. The wakeup still occurs after the accept lock is
released. There have been no diagnoses of this bug in real-world systems
(as yet).
can't MFC socketvar.h since it will break ABI between kernel and several
modules. This workaround saves sb_state in local variable and restores
it after bzero().
Original commit log of socketvar.h and problem description:
Move sb_state to the beginning of structure, above sb_startzero member.
sb_state shouldn't be erased, when socket buffer is flushed by sorflush().
When sb_state was bzero'ed, a recently set SBS_CANTRCVMORE flag was cleared.
If a socket was shutdown(SHUT_RD), a subsequent read() would block on it.
Reported by: Ed Maste, Gerrit Nagelhout
Reviewed by: rwatson
date: 2005/02/12 01:22:39; author: csjp; state: Exp; lines: +12 -6
MFC revision 1.75 sys/kern/sysv_sem.c
date: 2005/02/12 01:22:39; author: csjp; state: Exp; lines: +20 -10
MFC revision 1.101 /sys/kern/sysv_shm.c
date: 2005/02/12 01:22:39; author: csjp; state: Exp; lines: +15 -8
Add much needed descriptions for a number of the IPC related sysctl OIDs.
This information will be very useful for people who are tuning applications
which have a dependence on IPC mechanisms.
When netgraph(4) was converted to use mbuf_tags(9) instead of meta-data
a definite setup was broken: two ng_ksockets are connected to each other,
connect()ed to different remote hosts, and bind()ed to different local
interfaces. In this case one ng_ksocket is fooled with tag from the other
one.
Put node id into tag. In rcvdata method utilize tag only if it has our
own id inside or id equals zero. The latter case is added to support
packets send by some third, not ng_ksocket node.
sys/socketvar.h rev. 1.136 is not merged due to API freeze.
- Add SYSCTL_PROC() around somaxconn, not accepting values < 1 or > SHRT_MAX.
Before this change setting somaxconn to smth above 32767 and calling
listen(fd, -1) lead to a socket, which doesn't accept connections at all.
Reviewed by: rwatson
Reported by: Igor Sysoev
- Continue, in case of error.
- Add WARNS?= 6
Submitted by: Liam J. Foy <[email protected]>
Original commit done by: ssouhlal
And some of my own pointy hats
Reminded by: Tony Maher <[email protected]> via
bin/77670, and bin/77670 via maxim
Adjust TX threshold on every TX underrun. Some supported cards
(8139-based) can retransmit on TX underrun and set TOK in addition to
TUND. Also add a check to prevent overflow of the addressable threshold.
This fixed some reports of rl(4) slowness, believed to be related to ALTQ
before.
PR: kern/61448
Submitted by: Tim Draegen-Gilman <timNOeudaemonSPAMnet> (with changes)
>ps 2005-02-16 01:46:17 UTC
>
> FreeBSD src repository
>
> Modified files:
> sys/netinet tcp_input.c
> Log:
> Fix for a SACK (receiver) bug where incorrect SACK blocks are
> reported to the sender - in the case where the sender sends data
> outside the window (as WinXP does :().
>
> Reported by: Sam Jensen <sam at wand dot net dot nz>
> Submitted by: Mohan Srinivasan
Add a front-end for the `rtc' device which is a MC146818 compatible
clock found on the ISA bus (some USIIe, USIIi and USIIIi models) and
EBus (USIII models) instead of a MK48Txx clock.
This isn't an 1:1 MFC though, as the driver in -current relies on
probing the ISA version via PnP. That functionality of the sparc64
ISA code isn't MFC'ed on probably never will be. An identify function
is used in RELENG_5 instead.
src/sys/sys/mbuf.h 1.165. Original commit message:
"Optimize the way reference counting is performed with Mbufs. We
do not need to perform an extra memory fetch in the Packet (Mbuf+Cluster)
constructor to initialize the reference counter anymore. The reference
counts are located in a separate memory region (in the slab header,
because this zone is UMA_ZONE_REFCNT), so the memory fetch resulted very
often in a cache miss. Additionally, and perhaps more significantly,
optimize the free mbuf+cluster (packet) case, which is very common, to
no longer require an atomic operation on free (to verify the reference
counter) if the reference on the cluster has never been increased (also
very common). Reduces an atomic on mbuf free on average.
Original patch submitted by: Gerrit Nagelhout <[email protected]>"
latest versions in HEAD:
sys/kern/kern_mbuf.c
sys/vm/uma.h
sys/vm/uma_core.c
sys/vm/uma_dbg.c
sys/vm/uma_dbg.h
sys/vm/uma_int.h
(Basically re-add "All rights reserved" in time for 5.4-RELEASE, at least
until we clear out the surrounding legal issues once and for all).
"While we want the recursion protection for the bucket zones so that
recursion from the VM is handled (and the calling code that allocates
buckets knows how to deal with it), we do not want to prevent allocation
from the slab header zones (slabzone and slabrefzone) if uk_recurse is
not zero for them. The reason is that it could lead to NULL being
returned for the slab header allocations even in the M_WAITOK
case, and the caller can't handle that (this is also explained in a
comment with this commit).
The problem analysis is documented in our mailing lists:
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=153445+0+archive/2004/freebsd-current/20041231.freebsd-current
(see entire thread for proper context)."
"Fix a INVARIANTS-only bug introduced in Revision 1.104:
IF INVARIANTS is defined, and in the rare case that we have
allocated some objects from the slab and at least one initializer
on at least one of those objects failed, and we need to fail the
allocation and push the uninitialized items back into the slab
caches -- in that scenario, we would fail to [re]set the
bucket cache's ub_bucket item references to NULL, which would
eventually trigger a KASSERT."
better reflects the controllers capabilities, it is only valid when
talking to targets using packetized protol. CAM will need to understand
this limitation of SPI-4 before we can tell it the truth.
from a few printfs. This could cause the tag field to appear byteswapped
in the printf output. Print the tags in decimal instead of hex.
Initialize the timedout_scbs list. Since the softc is zeroed, the
missing initialization had no side effects.
i386 does. Note that we cannot inherit the bios key repeat rate because
that requires a bios call (which is impossible for us).
+ Give syscons the ability to beep on amd64.
+ bios_sigsearch() etc is useful for finding tables in roms.
Validate ifc->ifc_len before submitting its incarnation to sbuf_new,
which will finally lead to kernel panic.
Security: This prevents a local DoS that can be exploited by
Security: both privileged and unprivileged users.
Submitted by: Wojciech A. Koszek [dunstan at freebsd czest pl]
PR: 77421
Early MFC discussed with and reviewed by:
security (simon, trhodes)
date: 2005/01/30 23:30:28; author: rwatson; state: Exp; lines: +1 -1
Have tcp_isn_tick() fire 100 times a second, rather than HZ times a
second; since the default hz has changed to 1000 times a second,
this resulted in unecessary work being performed.
Discussed with: phk, cperciva
General head nod: silby
date: 2005/01/31 01:35:01; author: rwatson; state: Exp; lines: +1 -1
Update an additional reference to the rate of ISN tick callouts that was
missed in tcp_subr.c:1.216: projected_offset must also reflect how often
the tcp_isn_tick() callout will fire.
Submitted by: silby
Note that although the default has not changed for HZ on i386 in RELENG_5,
many sites run with elevated HZ for the purposes of DUMMYNET, etc. This
will reduce the CPU overhead of this.
date: 2005/01/29 13:34:22; author: rwatson; state: Exp; lines: +1 -1
Because the argument to strvalid() is a size_t, use a size_t to iterate
over the array.
Submitted by: stefanf
date: 2005/01/17 19:57:59; author: rwatson; state: Exp; lines: +33 -3
If su(1) is run without an effective uid of 0, generate an error to
the user indicating that su is not running setuid, which may help
suggest to the user that it should be setuid, or should not be
running from a file system mounted nosuid.
Suggested by: Ivan Voras <ivoras at fer dot hr>
udpconnectjail.c:1.2:
Add udpconnectjail, a simple regression test to exercise an (as yet)
unfixed bug in the jail() implementation relating to using the connect()
system call on UDP sockets.
PR: 26506
The only change in the merge was NO_MAN -> NOMAN.
date: 2005/01/08 04:17:48; author: rwatson; state: Exp; lines: +1 -1
In kern_wait(), let the compiler copy the rusage structure rather than
an explicit bcopy() -- it probably does a better job.
Add a simple regression test for mlock()/munlock() to make sure they
work on a single page as root, and fails on a single page as nobody.
Intended to help diagnose reports regarding insecure memory use with
gnupg.
Merged with one tweak: NO_MAN -> NOMAN.
date: 2004/11/14 19:30:02; author: csjp; state: Exp; lines: +25 -0
Currently if the user specifies -e and procfs is not mounted on /proc,
printing of the process environment will fail silently.
-define a function which will check to see if procfs is mounted on /proc
-Implement this test if the user specified -e
-If procfs is not mounted on /proc and -e was specified, print a warning.
informing the user that procfs(5) is required.
MFC ps.c revision 1.108
date: 2004/11/19 16:11:54; author: csjp; state: Exp; lines: +6 -9
Use statfs instead of getmntinfo(). This will make the procfs checks
play nicer in prisons. It also simplifies things.
RELENG_5:
date: 2004/12/30 17:21:07; author: rwatson; state: Exp; lines: +0 -55
date: 2004/12/30 17:21:07; author: rwatson; state: Exp; lines: +0 -3
date: 2004/12/30 17:21:07; author: rwatson; state: Exp; lines: +0 -50
Garbage collect unused (and incompletely implemented) functions:
- ipx_pcbnotify(), which is never called.
- ipx_rtchange(), which is never called, is incomplete inplemented, and
also #ifdef notdef.
- spx_fixmtu(), which is never called, is incompletely implemented, and
also #ifdef notdef.
Makefile:1.1 and aiotest.c:1.2:
Add a basic aio functionality regression test, which simply writes and
then reads from a fairly broad range of object types: regular file,
fifo, UNIX socketpair, pty, UNIX pipe, and an md device. Not a deep
test of functionality, just a basic test that aio_write followed by
aio_read returns the correct data in a relatively timely manner.
Requested by: phk
other out due to a back-out):
date: 2004/11/18 23:01:07; author: rwatson; state: Exp; lines: +29 -2
Add a couple of summary paragraphs at the head of mbuf_tags(9) to
indicate how m_tags might be used, and what their high level properties
are. This may help developers using tags get a more clear picture
before delving into the technical details of ABI cookies and API calls.
Suggested by: Rene de Vries <rene at canyon dot xs4all dot nl>
date: 2004/11/21 00:24:21; author: rwatson; state: Exp; lines: +6 -3
Word choice fix; use .Fn for non-.Xr functions.
Submitted by: ru
date: 2005/01/12 21:48:25; author: ru; state: Exp; lines: +5 -3
Scheduled mdoc(7) sweep.
bring RELENG_5 to listenclose.c, and to Makefile:1.3. Makefile:1.2,
the NO_MAN change, is not merged.
Add a small regression test that opens a TCP socket, listens on it,
performs a non-blocking connect from another socket, and then closes
the listen socket rather than accepting. This is intended to
exercise the close path in which connections are aborted due to a
close on the listen socket while the connection is in the listen
queue.
to RELENG_5:
date: 2004/10/27 19:26:01; author: rwatson; state: Exp; lines: +2 -0
date: 2004/10/27 19:26:01; author: rwatson; state: Exp; lines: +1 -0
date: 2004/10/27 19:26:01; author: rwatson; state: Exp; lines: +8 -0
Move the 'debug' sysctl tree under options SYSCTL_DEBUG. It generates
an inordinate amount of synchronous console output that is fairly
undesirable on slower serial console. It's easily hit by accident
when frobbing other sysctls late at night.
introduction of the '.t' file as the regression test framework has
not yet been MFC'd:
date: 2004/10/23 22:18:37; author: rwatson; state: Exp; lines: +38 -65
Use errx() instead of fprintf()/exit() for conciseness.
date: 2004/11/11 19:47:53; author: nik; state: Exp; lines: +26 -16
Switch over to a different, more flexible test output protocol that's
understood by Perl's Test::Harness module and prove(1) commands.
Update README to describe the new protocol. The work's broken down into
two main sets of changes.
First, update the existing test programs (shell scripts and C programs)
to produce output in the ok/not ok format, and to, where possible, also
produce a header describing the number of tests that are expected to be
run.
MFC rev. 1.19 telnetd/telnetd.8 and rev. 1.26 telnetd/telnetd.c:
add -4 and -6 flags to a man page and usage().
MFC rev. 1.20 telnetd/telnetd.8, rev. 1.27 telnetd/telnetd.c,
rev. 1.20 telnet/main.c: make telnet[d] -S (IP TOS) flag really work.
date: 2005/01/16 10:49:48; author: charnier; state: Exp; lines: +28 -25
Add prototypes and remove unused variables for WARNS=6 compliance. Add
'usage: ' in front of usage string. Use warnx(3) instead of fprintf in error
messages to get progname prepended.
date: 2004/10/20 08:01:32; author: rwatson; state: Exp; lines: +21 -0
Explicitly break out NETA license from Berkeley license to clearly
indicate license grant, as well as to indicate that NETA is asserting
only two clauses, not four clauses.
Requested by: imp
ipsockopt.c to revision 1.4, and Makefile to revision 1.2:
Add a simple exercise suite for IP-level socket options. The suite
atempts to read and write various IP-level socket options as root and
nobody, making sure the initial values are as expected, that they can
be changed to valid values and take effect, etc. No attempt is made
to check for the correct implementation of side effects (such as
changes in packet headers) as yet.
The IP options section is currently broken but will be fixed shortly.
Not all multicast options are currently tested.
up to 1.3, and Makefile to 1.2:
Add a simple C-based TCP connection generator, which generates and
closes the specified number of TCP connections sequentially and
synchronously. Useful for trying to trigger races in the accept
code.
tcpstream.c in RELENG_5 up to 1.2, and Makefile up to 1.2.
Add tcpstream, a simple TCP stream generator that uses a pseudo-random
sequence to detect data corruption visible to an application.
date: 2004/08/27 18:41:41; author: rwatson; state: Exp; lines: +12 -10
Semi-gratuitous white space synchronization with KAME tree: to reduce
diffs against #ifdef'd version of IPSEC, use "struct thread *p"
rather than "struct proc *p", fix some white space, and make some
already inconsistent white space inconsiste differently.
a .t file are not included:
date: 2004/08/24 04:59:26; author: rwatson; state: Exp; lines: +1 -0
Make sure to properly initialize 'size' to sizeof(sin) before passing
it into accept(). Depending on the initial value in memory, it is
otherwise possible to get EINVAL.
date: 2004/09/18 13:06:00; author: rwatson; state: Exp; lines: +3 -2
Modify accept_fd_leak regression test to generate "PASS" output, not
just "FAIL" output, in order to make it consistent with other tests in
the regression test tree.
date: 2004/10/23 22:11:35; author: rwatson; state: Exp; lines: +24 -44
Use errx() instead of perror()/exit() for conciseness.
Suggested by: ru (some time ago)
date: 2004/11/11 19:47:53; author: nik; state: Exp; lines: +4 -2
Switch over to a different, more flexible test output protocol that's
understood by Perl's Test::Harness module and prove(1) commands.
Update README to describe the new protocol. The work's broken down into
two main sets of changes.
First, update the existing test programs (shell scripts and C programs)
to produce output in the ok/not ok format, and to, where possible, also
produce a header describing the number of tests that are expected to be
run.
the RELENG_5 kqueue.c up to revision 1.3, and Makefile 1.4:
Add a basic kqueue + UNIX domain socket pair regression test to do some
elementary exercising of kqueues on datagram and stream sockets. Note
that the datagram write kqueue case is left untested due to potentially
confusing behavior for the developer (me) that might require attention.
date: 2005/01/23 21:34:00; author: rwatson; state: Exp; lines: +1 -1
Bump the default maximum on nfsd processes from 20 to 256. Real-world
measurements suggest that higher degrees of parallelism for large
numbers of clients help performance substantially.
Submitted by: Eric Anderson <anderson at centtech dot com>
date: 2005/01/30 14:58:00; author: rwatson; state: Exp; lines: +26 -5
Insert an explicit McAfee license, as we use a stock two-clause BSD
license rather than the slightly custom licence in ufsread.c.
date: 2005/01/30 19:28:27; author: rwatson; state: Exp; lines: +3 -6
Remove clause three from tcp_syncache.c license per permission of
McAfee. Update copyright to McAfee from NETA.
- Don't blindly use the return value of uart_cpu_channel() to calculate
the address of a channel on a SCC, it returns 0 on failure.
- Hardcode channel 1 for the keyboard on Z8530, the information present
in the Open Firmware device tree doesn't allow to determine this via
uart_cpu_channel(). This makes the keyboard on Ultra 2 basically work.
- Add and improve comments about uart_cpu_channel() and uart_cpu_getdev_*().
date: 2005/02/03 10:35:05; author: rwatson; state: Exp; lines: +9 -5
When entering siocnputc() with (kdb_active), don't acquire (or
release) the sio spin mutex, as use of synchronization primitives in
the debugger can result in substantial problems. With this patch in
place entering the debugger via a serial console is made
substantially more reliable.
date: 2005/02/08 17:56:04; author: rwatson; state: Exp; lines: +5 -9
Simplify the "and if we're in the debugger, don't use locks" logic,
correcting some misthinking.
Discussed with (really this time): bde
date: 2005/02/06 21:43:55; author: rwatson; state: Exp; lines: +0 -6
Remove a comment from the raw IPv6 output function regarding
M_TRYWAIT allocations: M_PREPEND() now uses M_DONTWAIT.
Document the fact that blackhole routes normally need to be bound
to lo(4) interfaces to have an effect, and that this is not needed
when using IP fast forwarding.
Log:
Since it is not un-common for a process's resident set size (rss)
to exceed 10 megabytes in size (especially in X), bump the max
column width from 4 bytes to 5. This will make the ps auxw output
uniform again when a process's rss exceeds 10 megs.
It should be noted that when 5 digits becomes to small, other
solutions should be explored such as displaying them in megabytes
or having ps automatically re-size column widths.
date: 2005/02/11 15:17:57; author: rwatson; state: Exp; lines: +23 -0
Add a bit more caveat text about MUTEX_PROFILING -- try to avoid using it
with other profiling and debugging options, such as INVARIANTS, WITNESS,
kernel profiling, etc. They all interfere with each other nastily and
will generate fairly useless results.
The driver is not 64-bit clean and causes the kernel to fault
(page faults and hidden unalignment faults).
I may have a chance to look at it in the near future, so I left
it in GENERIC for -current. People there should be able to deal
with it. For now, let's avoid that ida(4) ends up in 5.4-RELEASE.
Although an object may already be known in the configuration, it's
worker thread may have been destroyed (e.g. during orphaning).
Make sure that objects get back their worker threads when they get a
new geom.
revision 1.108
date: 2005/01/12 21:40:51; author: ps; state: Exp; lines: +16 -6
Fix a TCP SACK related crash resulting from incorrect computation
of len in tcp_output(), in the case where the FIN has already been
transmitted. The mis-computation of len is because of a gcc
optimization issue, which this change works around.
Submitted by: Mohan Srinivasan
Remove redundant parameter inherited from ipacctctl.
Remove code, inherited from ipacctctl, which sets socket to non-blocking
mode, since this introduces problems on SMP.
Expire aged flows in normal expiry thread. This fixes the problem, when
a node disconnected from all sources of traffic never purges its cache.
In case of various tunneling protocols, mbuf may pass several interfaces
before entering ng_netflow. In this case it will have not NULL m_pkthdr.rcvif.
However, it will enter ng_iface soon with another index. So let in_ifIndex
value configured by user override m_pkthdr.rcvif.
Reported by: Damir Bikmuhametov
revision 1.37
date: 2004/12/13 22:07:23; author: rik; state: Exp; lines: +296 -66
Make code MPSAFE.
You could turn this off by debug.mpsafenet=0 for full network
stack or via debug.{cp|cx|ctau}.mpsafenet for cp(4), cx(4) and
ctau(4) accordingly.
MFC after: 10 days
----------------------------
revision 1.35
date: 2004/12/03 16:57:15; author: rik; state: Exp; lines: +4 -2
Don not call pp_down()/pp_up() form XX_tlf()/XX_tls() in non PPP mode
to privent running of PPP's state machine in non PPP mode.
MFC: after 3 days.
----------------------------
revision 1.33
date: 2004/10/13 07:02:56; author: phk; state: Exp; lines: +4 -401
First half of tty code rework: unifdef -D__FreeBSD_Version=600000
The changes in the next commit would make the code totally unreadable
if the #ifdef'ing were maintained.
It might make a lot of sense to split if_cx.c in a netgraph related
and in a tty related file but I will not attempt that without hardware.
----------------------------
revision 1.32
date: 2004/09/23 12:21:11; author: phk; state: Exp; lines: +0 -13
Remove bogus cdevsw frobbing code which tries to prevent double
loading of modules.
MODULE_VERSION() should be used for this I belive.
revision 1.19
date: 2004/12/13 22:07:23; author: rik; state: Exp; lines: +213 -47
Make code MPSAFE.
You could turn this off by debug.mpsafenet=0 for full network
stack or via debug.{cp|cx|ctau}.mpsafenet for cp(4), cx(4) and
ctau(4) accordingly.
MFC after: 10 days
----------------------------
revision 1.18
date: 2004/12/10 05:54:45; author: rik; state: Exp; lines: +5 -320
Clean up from '#if __FreeBSD_version'.
----------------------------
revision 1.17
date: 2004/12/03 16:57:15; author: rik; state: Exp; lines: +4 -2
Don not call pp_down()/pp_up() form XX_tlf()/XX_tls() in non PPP mode
to privent running of PPP's state machine in non PPP mode.
MFC: after 3 days.
----------------------------
revision 1.16
date: 2004/09/23 12:21:11; author: phk; state: Exp; lines: +0 -13
Remove bogus cdevsw frobbing code which tries to prevent double
loading of modules.
MODULE_VERSION() should be used for this I belive.
revision 1.17
date: 2004/12/14 23:13:08; author: rik; state: Exp; lines: +1 -1
Bring back ability to use FR support with sppp from Cronyx.
----------------------------
revision 1.16
date: 2004/12/13 22:07:23; author: rik; state: Exp; lines: +259 -68
Make code MPSAFE.
You could turn this off by debug.mpsafenet=0 for full network
stack or via debug.{cp|cx|ctau}.mpsafenet for cp(4), cx(4) and
ctau(4) accordingly.
MFC after: 10 days
----------------------------
revision 1.15
date: 2004/12/11 05:38:16; author: rik; state: Exp; lines: +5 -357
Clean up from '#if __FreeBSD_version'.
----------------------------
revision 1.14
date: 2004/12/03 16:57:15; author: rik; state: Exp; lines: +4 -2
Don not call pp_down()/pp_up() form XX_tlf()/XX_tls() in non PPP mode
to privent running of PPP's state machine in non PPP mode.
MFC: after 3 days.
----------------------------
revision 1.13
date: 2004/09/23 12:21:10; author: phk; state: Exp; lines: +0 -13
Remove bogus cdevsw frobbing code which tries to prevent double
loading of modules.
MODULE_VERSION() should be used for this I belive.
macthes NG_VERSION or 0. There was a bug in libnetgraph, when messages were
sent with version of 0. The bug was fixed in msg.c rev 1.9.2.1. With this
commit we do not break ABI during RELENG_5 lifetime, and also protect from
using older and newer APIs. It is also important, that NG_VERSION has never
been 0.
This gentle kind of fix was suggested by scottl.
o replace out-of-line copy of FCS w/ a flag that indicates the
frame includes FCS (requires applications to be updated, but since
we weren't doing the out-of-line FCS stuff anyway app changes
were needed already)
o add a flag to indicate padding exists between the 802.11 header and
the payload (e.g. for Atheros cards)
o diff reducation against netbsd
o disable pci retry timeout to avoid problems when operating in C3 state
(fix imported from madwifi by Takanori Watanabe)
o eliminate save/restore of pci registers handled by the system
o eliminate duplicate zero of the softc (noted by njl)
o consolidate common code
date: 2005/01/29 23:13:20; author: rwatson; state: Exp; lines: +1 -1
Disable ethernet flow control in if_fxp by default, in order to prevent
unexpected surprises when a system panics or is left in the debugger.
Requested by: kris
FreeBSD src repository
Modified files:
sys/netinet ip_fw2.c
Log:
Change the state allocator from using regular malloc to using
a UMA zone instead. This should eliminate a bit of the locking
overhead associated with with malloc and reduce the memory
consumption associated with each new state.
Reviewed by: rwatson, andre
Silence on: ipfw@
MFC after: 1 week
Driver should work again on RELENG_5. Tested on PCI Xem w/ 16 port EBI.
PR: kern/72436
Submitted by: Peter Jeremy <[email protected]>
Testing hardware sponsored by: Looksmart
of the inquiry additional length field and inquiry buffer length.
This has fixed my Adaptec 39320A cards when connecting with some
disk arraies that is configured with multiple LUNs that is mapped
in one channel, which represents as "transmission error", and
strange timeouts, and only the first device is detected.
Add a note about the slot number not necessarily indicating the physical
location of a PCI device in the system chassis.
Remove the note about PAE.
Update document date.
Update my email address.
Update copyright.
Pass through the commands necessary to format USB floppy devices,
from within umass_ufi_transform(). This includes the 12-byte commands
FORMAT_UNIT, WRITE_AND_VERIFY, VERIFY, and READ_FORMAT_CAPACITIES
(sorted in numerical order).
2004-11-20 02:32:50 UTC
Remove the p_uarea and p_upages_obj fields from struct proc.
Prototype new routines to allocate, copy, and free pstats.
In the MFC, p_uarea and p_upages_obj are replaced with placeholders to
avoid changing the struct proc ABI.
2004-11-20 02:32:04 UTC
Maintain the broken state of backwards compatibilty for a.out (and
PECOFF!) core dumps. None of the old versions of gdb I tried were
able to read a.out core dumps before or after this change.
2004-11-27 06:46:45 UTC
Axe the semblance of support for PECOFF and Linux a.out core dumps.
2004-11-20 02:32:04 UTC
Maintain the broken state of backwards compatibilty for a.out (and
PECOFF!) core dumps. None of the old versions of gdb I tried were
able to read a.out core dumps before or after this change.
2004-11-27 06:46:59 UTC
Axe a.out core dump support. Neither older gdb binaries nor current
bfd sources understand the present format.
2004-11-20 02:31:46 UTC
We don't do U area swapping anymore, so update some comments. Also,
prototype the new routine that creates a mock U area for a.out core
dumps.
2004-11-27 06:46:59 UTC
Axe a.out core dump support. Neither older gdb binaries nor current
bfd sources understand the present format.
2004-11-20 02:30:02 UTC
gcore(1) apparently still cares about a.out core dumps, so it still
needs to know that a 1-page U area is part of the dump format.
2004-11-27 06:46:48 UTC
Remove a.out support from gcore(1).
2004-11-20 02:29:25 UTC
U areas are going away, so don't allocate one for process 0.
2004-11-27 06:51:39 UTC
Don't include sys/user.h merely for its side-effect of recursively
including other headers.
2004-11-20 02:29:00 UTC
Disable U area swapping and remove the routines that create, destroy,
copy, and swap U areas.
2004-11-27 06:51:39 UTC
Don't include sys/user.h merely for its side-effect of recursively
including other headers.
2004-11-20 02:28:48 UTC
Malloc p_stats instead of putting it in the U area. We should consider
simply embedding it in struct proc.
2004-11-20 23:00:59 UTC
Remove local definitions of RANGEOF() and use __rangeof() instead.
Also remove a few bogus casts.
2004-11-27 06:46:59 UTC
Axe a.out core dump support. Neither older gdb binaries nor current
bfd sources understand the present format.
2004-11-20 02:28:48 UTC
Malloc p_stats instead of putting it in the U area. We should consider
simply embedding it in struct proc.
2004-11-20 23:00:59 UTC
Remove local definitions of RANGEOF() and use __rangeof() instead.
Also remove a few bogus casts.
2004-11-27 06:51:39 UTC
Don't include sys/user.h merely for its side-effect of recursively
including other headers.
2004-11-20 02:28:48 UTC
Malloc p_stats instead of putting it in the U area. We should consider
simply embedding it in struct proc.
2004-11-27 06:51:39 UTC
Don't include sys/user.h merely for its side-effect of recursively
including other headers.
including:
Pull debug symbols in for statically linked binaries.
gcc -O2 cleanups.
Don't call _thr_start_sig_daemon() when SYSTEM_SCOPE_ONLY is defined.
If a system scope thread didn't set a timeout, don't call the clock_gettime
system call before and after sleeping.
Add missing reference count drops to close a memory leak.
Save cancelflags in signal frame.
Use a generic way to back threads out of wait queues when handling
signals instead of having more intricate knowledge of thread state
within signal handling.
Simplify signal code because of above (by David Xu).
Use macros for libpthread usage of pthread_cleanup_push() and
pthread_cleanup_pop(). This removes some instances of malloc()
and free() from the semaphore and pthread_once() implementations.
When single threaded and forking(), make sure that the current
thread's signal mask is inherited by the forked thread.
Use private mutexes for libc and libpthread. Signals are
deferred while threads hold private mutexes. This fix breaks
an internal system ABI that old versions of the
www/linuxpluginwrapper port depend on. Upgrading that port to the
latest version will fix that.
Fix race condition in condition variables where handling a
signal (pthread_kill() or kill()) may not see a wakeup
(pthread_cond_signal() or pthread_cond_broadcast()).
Don't panic when sigsuspend is interrupted by a cancellation.
Update the list of VLAN-aware interface types.
Revise the part on VLAN support in physical interfaces.
Bump the document date since its content has changed.
fix up socket/ip layer violation... don't assume/know that
SO_DONTROUTE == IP_ROUTETOIF and SO_BROADCAST == IP_ALLOWBROADCAST
This appears to fix a bug where under certain conditions sendto(2)
will fail with EHOSTUNREACH (No route to host) while sending data
to machines on the local network via raw sockets.
When performing IP fast forwarding, immediately drop traffic which is
destined for a blackhole route.
This also means that blackhole routes do not need to be bound to lo(4)
or disc(4) interfaces for the net.inet.ip.fastforwarding=1 case.
Submitted by: james at towardex dot com
Sponsored by: eXtensible Open Router Project <URL:http://www.xorp.org/>
requests when lqr fails by default (PR 74821)
- Add radius_Flush() and call it before trying to send RAD_STOP messages
- Update the slcompress.[ch] copyright
- Fix some signed/unsigned types and add a const or two
- Remove various unused arguments
- Add __unused where appropriate
- Send both NAS-IP-Address and NAS-Identifier but make them configurable
- Fix a reference-after-free error when deleting datalink chains
- Fix an offset error when emitting the content of packets
- Add comments to explain why we use strlen()
- Optimise out two socket() calls
- Use MAX_FSM_OPT_LEN instead of 24
- Check some returns from malloc and fix some alignment issues (PRs 59995
& 71592)
- Pad static structures out with explicit NULLs
- #define NOALIAS -> NONAT
- Document ${var} and ~ and fix a SEE ALSO xref
- Bump to version 3.4.2 (from 3.2)
Hopefully this also fixes PR 38058.
Protect against recursive slices creation in simlar way as it is done
in BSD class, ie. if provider below us uses the same metadata, don't
create slices based on the metadata.
This allows to create slices on geoms with rank != 1 without hacks.
Discussed with: phk
Approved by: phk
o Lots of pccard updates: all my fe pccards now work
o Fix some style issues and namespace polution
o Use macro to determine if the MAC address is a broadcast/multicast one or
not.
1.10: Hardlink the generated /etc/fstab to /conf/base/etc/fstab
where it is also needed.
1.11: Fix geometry calculation for media where the cylindersize is not
sufficiently magic.
date: 2005/01/24 16:49:50; author: rwatson; state: Exp; lines: +4 -0
When "no_ccache" is set as an argument to the pam_krb5 module, don't
copy the acquired TGT from the in-memory cache to the on-disk cache
at login. This was documented but un-implemented behavior.
PR: bin/64464
Reported and tested by: Eric van Gyzen <vangyzen at stat dot duke dot edu>
date: 2005/01/24 22:56:09; author: rwatson; state: Exp; lines: +2 -0
Acquire the raw_cb mutex around LIST_REMOVE() of a raw socket control
block from the global raw socket list.
Submitted by: Roselyn Lee <rosel at verniernetworks dot com>
EISCONN may be returned by sendto() if an attempt is made to specify the
destination address to a datagram socket that is already connected.
Submitted by: Rudolf Cejka <[email protected]>
PR: docs/76399
MFC after: 1 week
Fix a long-standing bug when make(1) is passed the -V and
-f options in MAKEFLAGS environment variable, and some of
these options are also specified on the command line.
date: 2004/12/26 07:30:35; author: jeff; state: Exp; lines: +4 -5
- Run sched_userret() after thread_userret(). Before, sched_userret() would
lower the priority of the returning thread to a user priority before
calling into thread_userret() which would call wakeup() which in turn would
cause the returning thread to eventually context switch rather than
completing its slice. Allowing this thread to complete its slice first
yields a 15% performance improvement in super-smack on my dual opteron with
4BSD.
This commit also containes rev. 1.278's style change.
I've been running RELENG_5 with this change for two weeks.
- Always respect IFCAP_VLAN_HWTAGGING.
- By default, disable VLAN processing in hardware since we are not ready yet
to handle all aspects of using it together with promiscuous mode.
Agreed with: rwatson
date: 2004/10/12 14:55:59; author: rwatson; state: Exp; lines: +4 -0
Add a note ahea of the esource enum that if new entropy source
categories are added, the set of entropy source assertions in the
harvesting code also need to be updated.
date: 2004/10/12 20:18:27; author: glebius; state: Exp; lines: +1 -1
Fix comment: since move from mballoc to mbuma, the allocation functions live
in kern_mbuf.c, not subr_mbuf.c
date: 2004/10/22 11:29:30; author: rwatson; state: Exp; lines: +15 -4
Expand comments on various sections of the MAC Framework Policy API,
as well as document the properties of the mac_policy_conf structure.
Warn about the ABI risks in changing the structure without careful
consideration.
Obtained from: TrustedBSD Project
Sponsored by: SPAWAR
date: 2004/10/21 18:35:24; author: rwatson; state: Exp; lines: +2 -1
date: 2004/10/21 18:35:24; author: rwatson; state: Exp; lines: +26 -0
Add KTR_GEOM, which allows tracing of basic GEOM I/O events occuring
in the g_up and g_down threads. Each time a bio is propelled up and
down the stack, an event is generating showing the provider, offset,
and length, as well as thread wakeup and work status information.
tweak because 5.x is neither 4-STABLE nor -CURRENT:
date: 2004/12/27 18:21:39; author: imp; state: Exp; lines: +3 -0
Add note about where major numbers are now assigned
date: 2004/12/27 18:58:57; author: imp; state: Exp; lines: +1 -1
nos->now typo reported by njl
date: 2005/01/23 21:01:00; author: rwatson; state: Exp; lines: +0 -4
When reading pr_securelevel from a prison, perform a lockless read,
as it's an integer read operation and the resulting slight race is
acceptable.
date: 2005/01/23 21:11:39; author: rwatson; state: Exp; lines: +2 -4
Style cleanup: with removal of mutex operations, we can also remove
{}'s from securelevel_gt() and securelevel_ge().
date: 2005/01/23 20:59:19; author: rwatson; state: Exp; lines: +4 -5
When retrieving the current per-jails securelevel for a sysctl read,
don't acquire the prison mutex, as it's an integer read and races
here don't make a difference.
date: 2005/01/30 00:31:19; author: rwatson; state: Exp; lines: +1 -1
Fix spelling of integer in a comment.
Beady eyes: ceri
1.68-1.69:
Rename debug macro to DBG and indent it properly.
1.70:
- Use ng_callout() instead of timeout()
- remove spl(9) calls
1.71:
/* -> /*- for license, minor formatting changes
- Use ng_callout() instead of timeout(9).
- Do not put/remove node references, since this no longer
needed.
- Remove timerActive flag, use callout flags.
- Schedule next callout after doing current one.
Reviewed by: archie
Approved by: julian (mentor)
- Use ng_callout() instead of callout_reset(9).
- Use callout_pending() instead of our own flags.
- Remove home-grown protection of node, which has a scheduled
callout().
- Remove spl(9) calls.
Tested by: bz
Return 0, not NULL, from a function declared as returning int.
Remove a check that never returns true, because in this case we have panic
before the check.
- Use ng_callout() instead of timeout.
- Schedule next timeout *after* finishing job of the current one.
- Remove spl(9) calls.
Tested by: ru
Reviewed by: julian
date: 2005/01/23 23:10:33; author: yar; state: Exp; lines: +2 -2
Reduce the global name space pollution.
The cloner structure isn't referenced by name outside this file.
date: 2005/01/24 15:48:00; author: yar; state: Exp; lines: +1 -1
Fix spelling in a comment.
date: 2004/08/22 21:32:52; author: rwatson; state: Exp; lines: +15 -38
Style update: use newer style function prototypes in if_sl.c in
prep for merging locking.
date: 2004/08/30 04:48:52; author: yar; state: Exp; lines: +1 -2
Use an ANSI-style definition for slstart()
in accord with the rest of the file.
date: 2004/11/17 18:32:44; author: jmg; state: Exp; lines: +1 -1
sync comment on IFF_OACTIVE with reality.. IFF_OACTIVE is set when the
hardware cannot take anymore packets, and so will supress the calling of
the device's if_start method...
Submitted by: bde
date: 2005/01/11 10:47:51; author: keramida; state: Exp; lines: +1 -1
Fix a typo in a comment that may be confusing if one doesn't really
check what the code does. Separators are spaces, commas or tabs;
not '*' characters (as one may assume by reading the old comment).
date: 2004/10/22 12:10:50; author: rwatson; state: Exp; lines: +2 -4
In osethostname(), don't need to call suser() directly as
userland_sysctl() will perform all necessary privilege checks for
the caller.
date: 2004/10/21 11:21:13; author: rwatson; state: Exp; lines: +12 -13
Modify libugidfw(3) to use MBI_* permission flags from mac_bsdextended.h
instead of using the V* permission flags from vnode.h. Remove include
of vnode.h.
Requested by: phk
to RELENG_5:
date: 2004/10/21 11:19:02; author: rwatson; state: Exp; lines: +59 -33
date: 2004/10/21 11:19:02; author: rwatson; state: Exp; lines: +15 -0
Modify mac_bsdextended policy so that it defines its own vnode access
right bits rather than piggy-backing on the V* rights defined in
vnode.h. The mac_bsdextended bits are given the same values as the V*
bits to make the new kernel module binary compatible with the old
version of libugidfw that uses V* bits. This avoids leaking kernel
API/ABI to user management tools, and in particular should remove the
need for libugidfw to include vnode.h.
Requested by: phk
date: 2004/10/21 11:29:56; author: rwatson; state: Exp; lines: +1 -1
date: 2004/10/21 11:29:56; author: rwatson; state: Exp; lines: +1 -1
Bump copyright dates for NETA on these files.
date: 2004/10/22 11:08:52; author: rwatson; state: Exp; lines: +3 -1
In the MAC label zone destructor, assert that the label is only
destroyed in an initialized state.
date: 2004/10/22 11:07:18; author: rwatson; state: Exp; lines: +0 -1
Remove extern declaration of mac_enforce_sysv, as it's not present in
the CVS version of the MAC Framework.
Fix ACLs handling for the root file system.
Without this fix, when ACLs are set via tunefs(8) on the root file system,
they are removed on boot when 'mount -a' is called, because mount(8)
called for the root file system always add MNT_UPDATE flag and MNT_UPDATE
flag isn't perfect.
Now, one cannot remove ACLs stored in superblock (configured with tunefs(8))
via 'mount -a' nor 'mount -u -o noacls <file system>', but it is still
possible to mount file system which doesn't have ACLs in superblock via
'mount -o acls <file system>' or /etc/fstab's 'acls' option.
Reported by: Lech Lorens/pl.comp.os.bsd
Discussed with: phk, rwatson
Reviewed by: rwatson
o rework pll setup code to follow h/w specification
o add hint.hifn.X.pllconfig to specify reference clock setup
requirements; default is pci66 which means the clock is
derived from the PCI bus clock and the card resides in a
66MHz slot
Tested on 7955 and 7956 cards; support for 7954 cards not enabled
since we have no cards to test against.
In collaboration with Poul-Henning Kamp.
Reviewed by: phk
selecting a replacement address for an rdr rule. Some rdr rules
have no address family (when the replacement is a table and no
other criterion implies one AF). In this case, pf would fail to
select a replacement address and drop the packet due to
translation failure.
date: 2005/01/24 16:49:50; author: rwatson; state: Exp; lines: +4 -0
When "no_ccache" is set as an argument to the pam_krb5 module, don't
copy the acquired TGT from the in-memory cache to the on-disk cache
at login. This was documented but un-implemented behavior.
PR: bin/64464
Reported and tested by: Eric van Gyzen <vangyzen at stat dot duke dot edu>
revision 1.2
date: 2005/01/07 01:45:35; author: imp; state: Exp; lines: +1 -1
/* -> /*- for license, minor formatting changes
----------------------------
revision 1.1
date: 2004/12/28 00:07:57; author: rik; state: Exp;
Add FR support to sppp (MFCronyx).
Silence on: net@, current@, hackers@.
No objections: joerg
Requested by: by many (mostly Cronyx) users for a long long time.
MFC after: 10 days
PR: kern/21771, kern/66348
Get the vnode from file.f_vnode instead of file.f_data.
Nowadays, f_data points to the vnode only if the underlying filesystem
doesn't use it for other purposes (devfs uses it to store the cdev,
for example).
Found by: csjp
Reviewed by: csjp
Approved by: phk, wes, grehan (mentor)
MFC after: 1 week
Approved by: grehan (mentor)
Add -frandom-seed=RepeatabilityConsideredGood to CFLAGS for building this
library. As the value suggests, this allows the library to be built
repeatably; without this flag, gcc uses a random value in its parsing.
date: 2005/01/09 04:47:42; author: rwatson; state: Exp; lines: +2 -2
In ipx_setsockaddr(), use M_WAITOK instead of M_NOWAIT so that the
call always succeeds, avoiding causing the caller to return success
even though the returned *sockaddr is NULL.
date: 2005/01/09 04:39:16; author: rwatson; state: Exp; lines: +14 -13
Eliminate jump to 'bad' label in order to clean up the ipx_input()
return/unwind path for locking work.
date: 2005/01/22 21:14:21; author: rwatson; state: Exp; lines: +2 -0
When DDB is not defined, don't implement witness_thread_has_locks() and
witness_proc_has_locks(), as they are unused, which results in a compiler
error. This problem was introduced with the implementation of "show
alllocks".
Spotted by: Artem Kuchin <matrix at itlegion dot ru>
date: 2005/01/08 04:45:57; author: rwatson; state: Exp; lines: +12 -1
In acct_process(), do a lockless read of acctvp to see if it's NULL
before deciding to do more expensive locking to account for process
exit. This acceptable minor race avoids two mutex operations in
that highly common case of accounting not being enabled.
date: 2005/01/03 19:22:37; author: rwatson; state: Exp; lines: +5 -1
date: 2005/01/03 19:22:37; author: rwatson; state: Exp; lines: +1 -0
Add PCI and device ID's to if_xl to support:
3C920B-EMB-WNM Integrated Fast Ethernet Controller
Submitter reports that the card appears to autonegotiate properly, and
operate well with high levels of NFS traffic.
PR: 75253
Submitted by: "Oleg V. Nauman" <oleg at reis dot zp dot ua>
date: 2004/12/30 13:56:34; author: rwatson; state: Exp; lines: +4 -2
Make the sysctls kern.ipc.msgmnb and kern.ipc.msgtql into tunables as
is the case for most other sysctls in the System V IPC message queue
implementation.
PR: 75541
Submitted by: Sergiy Vyshnevetskiy <serg at vostok dot net>
Kill a half dead comment. It's first half was killed in rev 1.12.
MFC after: 3 days
MFC: -j 1.25 -j 1.26
Fix creation on "dlciX" hook in ng_sample.
Approved by: julian
MFC after: 3 days
MFC: -j 1.24 -j 1.25
Fix counting length of leadin for hook name (sizeof () => strlen ()).
Approved by: julian
MFC after: 3 days
Fix comment. Code 0x95 means locking shift to codeset 5 according to
T1.617 AnnexD.
Locking shift procedure is described in ANSI T1.607.
MFC after: 3 days
Add-on: codeset 5 is a codeset for national use according Q.xxx standards.
so this procedure is used for compatibility with ITU.
Remove a.out runtime linker. It doesn't build and was removed from the
build over two years ago by peter.
The binary a.out version of ld.so can be obtained from misc/compat22 or
src/lib/compat/compat22.
Add support for Chase/Perle PCI FAST-4 4 port serial cards which appear
to be the same as Boca Research Turbo Serial 654 (4 serial port).
While add the 8 port variants as well.
Submitted by: [email protected]
PR: kern/75793
- Prevent ndis_get_info()/ndis_set_info() from possibly sleeping on
the same wait channel from two different threads
- Protect calls to MiniportQueryInformation()/MiniportSetInformation()
with a spinlock
- Export ntoskrnl_init_spinlock() from subr_ntoskrnl
rc.subr -> 1.32, 1.33
rc.d/tmp -> 1.35
rc.d/var -> 1.35
Fix a minor, cosmetic typo of `rc.subr'.
Add two new rc.conf options: tmpmfs_flags and varmfs_flags.
These can be used to pass extra options to the mdmfs(8) utility,
to customize the finer details of the md file system creation
(i.e. to turn on/off softupdates, to specify a default owner for
md filesystem, etc).
Use these two new flags to mount tmpmfs and varmfs without
softupdates, since it doesn't make much sense to use SU on
malloc-backed file systems.
It appears that part of 1.136 snuck into the MFC by accident. This fixes
the build on my system and for others on -stable as well.
Submitted by: Jon Noack <[email protected]>
revision 1.138
date: 2005/01/09 17:42:03; author: cognet; state: Exp; lines: +64 -64
Use uint32_t instead of u_long when appropriate.
That's enough to make my bt848 work on amd64.
algorithm when they calculate the job number for a job, based on the name
of the control-file. This also uses a newer algorithm for determining a
job number, to avoid some problems caused when a control-file is named
using an IP address, instead of the hostname
[* = 1.34 common.c, 1.26 displayq.c, 1.25 lp.h, 1.5 matchjobs.c, 1.21 rmjob.c]
Make default RFCOMM session MTU match default L2CAP MTU.
This is just a workaround for a know problem with Motorola E1000
phone. Something is wrong with the configuration of L2CAP/RFCOMM
channel. Even though we set L2CAP MTU to 132 bytes (default RFCOMM
MTU 127 + 5 bytes RFCOMM frame header) and the phone accepts it,
the phone still sends oversized L2CAP packets. It appears that the
phone wants to use bigger (667 bytes) RFCOMM frames, but it does
not segment them according to the configured L2CAP MTU. The 667
bytes RFCOMM frame size corresponds to the default L2CAP MTU of
672 bytes (667 + 5 bytes RFCOMM frame header).
This problem only appears if connection was initiated from the
phone. I'm not sure who is at fault here, so for now just put
workaround in place. Quick look at the spec did not reveal any
anwser.
Fix the derivation of the GEOM name from the specified device name by
complementing the existing special case of a not existing /dev prefix
with the recognition of an already existing /dev prefix.
This implicitly solves the following two issues related to working on
GEOM devices /dev/foo/bar (which have the GEOM provider name "foo/bar")
with the expected commands like "bsdlabel /dev/foo/bar":
1. the error "Geom not found" when trying to write or edit the BSD
label (because previously the incorrect GEOM name "bar" instead of
"foo/bar" was derived from "/dev/foo/bar").
2. the multiple times reported "magically introduced" partition offset
of 63 blocks and the resulting errors like "partition extends past
end of unit" and "partition c doesn't start at 0!".
This implicitly resulted because bsdlabel(8) determines the "MBR
offset" via GEOM and (intentionally) silently falls back to an offset
of 0 if it could not be queried (which is the case if the name was
incorrectly derived).
Usually (at least on PCs) the offset for the first slice is 63 blocks
and bsdlabel(8) automatically subtracts them from the absolute
offsets in the read on-disk BSD label, resulting in the display of an
effective offset of 0. If the GEOM query fails, the assumed offset of
0 is subtracted and an incorrect effective offset of 63 is displayed
and tried to be worked upon.
Reviewed by: pjd
from the control-file for each print job. The main reason is to handle the
case where some remote host sends a print job where the given userid is an
uppercase-version of the real userid. Now if lpd sees that in a job which
came from a remote host, it will check to see if the given userid is valid,
and if not it will make a lowercase version of it.
/usr/lib doesn't contain only archive (ar(1) style) libraries. Shared
libraries live there too. Also point to ar(1) which contains a nice
description of what an 'archive library' is.
PR: docs/76056
Submitted by: Enrique Matías Sanchez <[email protected]>
Fix typo %d -> %x
That should fix the problem with invalid PSM returned from bthidcontrol.
Pointy hat goes to me.
While I'm here change #include <libusbhid.h> to #include <usbhid.h>
revision 1.37
date: 2004/09/07 07:06:36; author: phk; state: Exp; lines: +2 -1
Make the alpha timecounter preferable to the i8254.
This might help fix a problem Kris is having with the package builders.
Create three additional X socket directories. Using X applications when another
user owns these directories or the sticky bit is unset may open security holes,
so simply create them at startup with the correct owner/mode.
date: 2005/01/04 19:30:14; author: mux; state: Exp; lines: +1 -1
Allow fxp(4) cards with a revision id of 0 to use the 82503 serial
interface as well. This is not an expected revision id per the
datasheet, but unfortunately there are such cards out there with
a 82557 chipset, and they want to use the 82503.
PR: kern/75739
Reported by: Andre Albsmeier <[email protected]>
- Use 64bit 'fts_bignum' field instead of 32bit (on 32bit archs) field
'fts_number' to remember number of blocks.
- Use %jd format when printing intmax_t values.
This makes du(1) 64bit-clean.
This work is part of the BigDisk project:
http://www.FreeBSD.org/projects/bigdisk/
Discussed on: arch@
fts.3 1.22
Introduce new field 'fts_bignum' which is 64bit long and will allow to
make utilities like du(1) 64bit-clean.
When this field is used, one cannot use 'fts_number' and 'fts_pointer'
fields.
This commit doesn't break API nor ABI.
This work is part of the BigDisk project:
http://www.FreeBSD.org/projects/bigdisk/
Discussed on: arch@
Manual page work from: Peter Jeremy <[email protected]>
- The .Fn macro and description of the `struct statfs' type of `sbp'.
- List of struct statfs fields that are related to file systems, much
like the list in stat.2 for the userlevel `struct stat'.
- Bump document date.
. Use a -tag instead of an -inset list, which makes the arguments of the
macro stand out more clearly.
. Various other wording fixes.
. Bump document date.
Move the description of MNT_FORCE closer to mntflags and use a .Bl list
for the valid flag values. This way, if VFS_UNMOUNT(9) supports more
flags in the future, adding a single list item is going to be easy and
all the flags are going to be in one place.
Use byteorder(9) functions to implement the [g,s]et[d,w][b,l]e macros so
only one set is needed for either endianess. This also completes them for
big endian archs and fixes the compilation of libncp, netncp, etc. there.
Fix kernel crash when both Netgraph(4) framework and Netgraph
Bluetooth Drivers are compiled into the kernel.
Introduce new startup level SI_SUB_NETGRAPH that is after
SI_SUB_INIT_IF but before SI_SUB_DRIVERS. Make Netgraph(4)
framework initialize at SI_SUB_NETGRAPH level.
This does not address the bigger problem: MODULE_DEPEND
does not seem to work when modules are compiled into the
kernel, but it fixes the problem with Netgraph Bluetooth
device drivers reported by a few folks.
This should not have any impact on API/ABI and should not
break anything that was working before.
moused.8 r1.47
date: 2004/10/11 07:57:08; author: philip; state: Exp; lines: +102 -3
Add 'virtual scrolling' support to moused(8). When holding down the middle
mouse button, motions are interpreted as scrolling.
g_raid3.h 1.9
g_raid3_ctl.c 1.7
- Fix 'rebuild' command - it can no longer relay on retaste event
(we ignore it).
- Remove code used for handling spoil events, as spoiling is not possible
anymore, because we keep consumers open for writing all the time.
g_mirror.h 1.13,1.14
g_mirror_ctl.c 1.7,1.8
- Fix 'rebuild' command (we ignore retaste event now, so don't relay on it).
- Spoiling is now not possible, because we keep consumers open for writing
all the time. Remove unused code then.
- add new supported chips: 82541ER and 82546GB
- add the long supported, but still missing 82545
- change .Nd to look better (no need to mention FreeBSD there)
- bump .Dd
Log:
This commit adds a shared locking mechanism very similar to the
mechanism used by pfil. This shared locking mechanism will remove
a nasty lock order reversal which occurs when ucred based rules
are used which results in hard locks while mpsafenet=1.
So this removes the debug.mpsafenet=0 requirement when using
ucred based rules with IPFW.
It should be noted that this locking mechanism does not guarantee
fairness between read and write locks, and that it will favor
firewall chain readers over writers. This seemed acceptable since
write operations to firewall chains protected by this lock tend to
be less frequent than reads.
Reviewed by: andre, rwatson
Tested by: myself, seanc
Silence on: ipfw@
MFC after: 1 month
- If the COMSPEED is set to 0, then don't try to initialize the serial port
and assume that the BIOS has set it up for us. This allows folks with a
serial-aware BIOS to set the BIOS to speeds above 9600 and allow boot0 to
just use the existing settings.
- Purge some gratuitous cpp comments as per style(9).
- Add a new MD per-CPU field for Alpha 'pal_id' which is the PAL ID
associated with each processor. This ID is inferred from the index
of the pcs structure in the hwprb.
- Give Alpha CPUs FreeBSD CPU IDs more like other architectures where the
boot processor is always CPU 0 and the other processors are numbered
1 ... N. List active CPUs in the system in cpu_mp_announce() as well.
- Set the priority of the page zeroing thread using sched_prio() when the
thread is created rather than adjusting the priority in the main
function. (kthread_create() should probably take the initial priority
as an argument.)
- Only yield the CPU in the !PREEMPTION case if there are any other
runnable threads. Yielding when there isn't anything else better to do
just wastes time in pointless context switches (albeit while the system
is idle.)
- list the LSI MegaRAID SATA 150-(2|4|6) controllers as supported
- mention SATA support in a few places
- AMI -> AMI/LSI for controllers now sold my LSI
- bump .Dd
MFC link_control.c v1.9 to RELENG_5
Rename 'class' field to 'uclass' in the ng_hci_inquiry_response structure.
class is a reserved word in C++
Submitted by: Markus Brueffer < markus AT brueffer DOT de >
Add send buffer locking to uipc_send(). Without this locking a race can
occur between a reader and a writer that results in a panic upon close,
e.g.,
"panic: sbflush_locked: cc 4 || mb 0xffffff0052afa400 || mbcnt 0"
- Use VM_ALLOC_NOBUSY to eliminate vm_page_wakeup() calls and the
acquisition and release of the global page queues lock required to make
those calls.
- Remove GIANT_REQUIRED from vm_hold_free_pages(). All of its VM operations
are properly synchronized.
- Hold the lock on the containing vm object when calling
vm_page_sleep_if_busy().
- Eliminate unnecessary calls to vm_page_busy().
date: 2004/12/27 10:47:08; author: rwatson; state: Exp; lines: +2 -2
Attempt to slightly refine the print out from "show alllocks" -- list
the process and thread numbers/names on the same line rather than on
separate lines, and print the thread pointer not just the tid.
date: 2004/12/26 22:52:24; author: rwatson; state: Exp; lines: +42 -0
Add "show alllocks" command to DDB, which dumps a list of processes
and threads currently holding sleep mutexes (and spin mutexes for
curthread). This can be quite useful in looking for a lock condition
summary for a system, as it avoids manually iterating through threads
and processes to find all the interesting locks.
NB: "alllocks" is up there with "lockedvnods" for a bad argument for
show.
MFC after: 2 weeks
date: 2004/12/23 02:22:47; author: rwatson; state: Exp; lines: +2 -0
Assert the sem lock in sem_ref() and sem_rel(), as it is required to
safely manipulate the reference count.
date: 2004/12/23 01:34:26; author: rwatson; state: Exp; lines: +18 -18
Attempt to consistently use () around return values in calls to
return() in newer code (sysctl, ISN, timewait).
date: 2004/12/23 01:16:21; author: rwatson; state: Exp; lines: +5 -5
In sonewconn(), the s/if/while/ change to wait for room at the tail of
the accept queue is a feature, not a bug/issue, so remove the XXXRW
from the comment.
date: 2004/11/28 11:06:22; author: rwatson; state: Exp; lines: +2 -0
Assert the inpcb lock in tcp_xmit_timer() as it performs read-modify-
write of various time/rtt-related fields in the tcpcb.
After releasing the tcbinfo lock in preparation for jumping to
check_delack, set headlocked to 0. At the check_delack label,
assert that headlocked is 0.
date: 2004/12/05 21:38:33; author: rwatson; state: Exp; lines: +8 -10
Push the inpcb argument into ip_setmoptions() when setting IP multicast
socket options, so that it is available for locking.
date: 2004/12/23 01:27:13; author: rwatson; state: Exp; lines: +1 -6
Remove an XXXRW comment relating to whether or not the TCP timers are
MPSAFE: they are now believed to be.
Correct a typo in a second comment.
MFC after: 2 weeks
date: 2004/12/23 01:21:54; author: rwatson; state: Exp; lines: +0 -7
Remove an annotation of a minor race relating to the update of
multiple MIB entries using sysctl in short order, which might
result in unexpected values for tcp_maxidle being generated by
tcp_slowtimo. In practice, this will not happen, or at least,
doesn't require an explicit comment.
MFC after: 2 weeks
date: 2004/12/23 01:07:12; author: rwatson; state: Exp; lines: +4 -12
Remove an XXXRW indicating atomic operations might be used as a
substitute for a global mutex protecting the socket count and
generation number.
The observation that soreceive_rcvoob() can't return an mbuf
chain is a property, not a bug, so remove the XXXRW.
In sorflush, s/existing/previous/ for code when describing prior
behavior.
For SO_LINGER socket option retrieval, remove an XXXRW about why
we hold the mutex: this is correct and not dubious.
MFC after: 2 weeks
date: 2004/12/23 00:59:43; author: rwatson; state: Exp; lines: +3 -14
In soalloc(), simplify the mac_init_socket() handling to remove
unnecessary use of a global variable and simplify the return case.
While here, use ()'s around return values.
In sodealloc(), remove a comment about why we bump the gencnt and
decrement the socket count separately. It doesn't add
substantially to the reading, and clutters the function.
MFC after: 2 weeks
date: 2005/01/02 01:47:56; author: rwatson; state: Exp; lines: +1 -1
date: 2005/01/02 01:47:56; author: rwatson; state: Exp; lines: +1 -1
Use RTFREE() to free route references rather than rtfree(), as rtfree()
expects a locked route reference. This removes a panic that occurs
when connected ipxpcb is closed and its route free'd, and may have been
present since the route locking took place.
MFC after: 2 weeks
RELENG_5_3 candidate.
date: 2004/12/23 01:19:27; author: rwatson; state: Exp; lines: +0 -4
Remove temporary debugging printf that was used to detect the presence
of a race that had previously caused a panic in order to determine if
the fix was for the right problem. It was.
MFC after: 2 weeks
date: 2005/01/02 12:40:40; author: rwatson; state: Exp; lines: +0 -1
Remove cross reference to uustat(1), which is no longer in the base
tree.
MFC after: 3 days
Submitted by: bkoenig at cs dot tu-berlin dot de
date: 2005/01/02 15:06:47; author: rwatson; state: Exp; lines: +2 -2
Mark 'struct spx' and 'struct spxhdr' as __packed to prevent possible
alignment problems.
MFC after: 3 days
RELENG_5_3 candidate.
date: 2005/01/02 02:30:27; author: rwatson; state: Exp; lines: +1 -1
Mark 'struct ipx', the IPX packet header, as __packed. Otherwise,
recent versions of gcc will insert an extra 16 bits of padding in
the structure, corrupting all IPX packet output.
MFC after: 3 days
RELENG_5_3 candidate.
sys/i386/i386/apic_vector.s 1.101 -> 1.102
sys/i386/i386/mp_machdep.c 1.241 -> 1.243
sys/i386/include/apicvar.h 1.8 -> 1.9
sys/i386/include/smp.h 1.78 -> 1.79
To quote the original commit message:
Avoid more than two pending IPI interrupt vectors per local APIC
as this may cause deadlocks.
This should fix kern/72123.
Discussed with: jhb
Tested by: Nik Azim Azam, Andy Farkas, Flack Man, Aykut KARA
Izzet BESKARDES, Jens Binnewies, Karl Keusgen
Approved by: sam (mentor)
This commit is a combination of Stephan's original one and John's style
fix on mp_machdep.c. I have tested the patch on various SMP boxes running
RELENG_5_3 (4*P3 Xeon, 2*P4 w/HTT, 2*P4 Xeon configurations) under heavy
load for a couple of weeks, so commit on behalf of Stephan when he is
on vacation.
RELENG_5_3 candidate after settle time.
Discussed with: ups
Reviewed by: jhb
revision 1.32
date: 2004/12/29 20:00:29; author: trhodes; state: Exp; lines: +5 -6
Catch up with stat.h a bit:
o Sticky bit is actually defined as S_ISTXT not S_ISVTX.
o Sticky bit is wrapped in if __BSD_VISIBLE not _POSIX_SOURCE.
When RAID3 device is configured in "verify" mode, synchronization of the
parity component is now force on creation.
Change regression test which check "verify" mode to work properly after
this change.
date: 2004/12/05 22:50:09; author: rwatson; state: Exp; lines: +1 -1
Convert a GIANT_REQUIRED; into a NET_ASSERT_GIANT();, as sockets are
now only conditionally protected by Giant based on debug.mpsafenet.
date: 2004/12/05 13:27:30; author: rwatson; state: Exp; lines: +4 -2
Acquire socket receive buffer mutex before appending and then waking up
a receive socket in DDP. This reduces the number of mutex operations
required to deliver to a socket by two, and is the model used in other
protocols.
date: 2004/11/23 23:11:47; author: rwatson; state: Exp; lines: +6 -0
When printing a stack trace for a thread, also print the pid and tid.
When a series of traces is included in a bug report, this will make it
easier to tie the trace information back to ps or threads output,
each of which will show the pid or the tid, but usually not both.
date: 2004/11/23 23:07:12; author: rwatson; state: Exp; lines: +6 -1
When printing information on the current thread, such as when entering
DDB, also print the pid of the process if present. Since much
debugging still centers around processes, having the pid is quite
helpful.
date: 2004/11/07 23:11:32; author: rwatson; state: Exp; lines: +4 -0
date: 2004/11/07 23:11:32; author: rwatson; state: Exp; lines: +2 -1
Add basic critical section tracing to KTR using event type KTR_CRITICAL.
This generates a KTR event for each critical section entered and exited.
It would be desirable to also log the filename and line number of the
source entering or exiting the critical section, but this requires
hacking up the critical section API, so I've not done that yet.
date: 2004/11/06 11:43:30; author: rwatson; state: Exp; lines: +23 -7
Abstract the logic to look up the uma_bucket_zone given a desired
number of entries into bucket_zone_lookup(), which helps make more
clear the logic of consumers of bucket zones.
Annotate the behavior of bucket_init() with a comment indicating
how the various data structures, including the bucket lookup tables,
are initialized.
date: 2004/11/06 11:24:40; author: rwatson; state: Exp; lines: +5 -1
Annotate what bucket_size[] array does; staticize since it's used only
in uma_core.c.
- Fix force-stopping mirrors.
- Introduce 'idle' functionality, which works by marking components as
clean after the given idle time.
- Use shutdown hooks to mark raid3-devices as clean after all file systems
are unmounted.
- Use g_topology_try_lock() in the event thread to avoid deadlocks, because
some classes hold the topology lock when calling g_(read|write)_data().
- Keep consumers open even if device is not open to avoid races which taste
mechanism and to be able to always update metadata.
- Treat components which has I/O errors as broken, don't try to rebuild
them.
- Introduce metadata backward compatibility code, which updates detected
all metadata to the current version.
- Fix force-stopping mirrors.
- Introduce 'idle' functionality, which works by marking components as
clean after the given idle time.
- Use shutdown hooks to mark mirrors as clean after all file systems are
unmounted.
- Use g_topology_try_lock() in the event thread to avoid deadlocks, because
some classes hold the topology lock when calling g_(read|write)_data().
- Keep consumers open even if mirror is not open to avoid races which taste
mechanism and to be able to always update metadata.
- Treat components which has I/O errors as broken, don't try to rebuild
them.
- Introduce metadata backward compatibility code, which updates detected
all metadata to the current version.
Detect if class name is '-h' or 'help' and if it is, show general help
message, i.e.:
geom: usage: geom <class> <command> [options]
PR: bin/71537
Submitted by: bugghy <[email protected]>
- Plug a memory leak in ng_netflow_cache_init().
- Initialize error to 0 in ng_netflow_flow_add() (a nop change).
- Update cache statistics holding workqueue mutex.
- call the driver 'bktr' instead of 'brooktree' throughout the document
- add a HARDWARE section
- add a more descriptive NAME section
- update for recently imported Pinnacle PCTV support
- add Branko Lankester, the original author of the PCTV patches,
to the AUTHORS section
- bump .Dd
Rewrite ehci_abort_xfer() to use the method hinted at in the EHCI spec.
to remove a transaction from the async schedule. The previous method didn't
work well and led to the hardware writing to free'd buffers etc, as
it didn't always know that the transaction had been aborted.
Written after consultation with David Brownell who wrote the Linux
EHCI driver.
As part of this give the sqh structure a "previous" pointer.
Fixes a bug that caused UFS2 filesystems bigger than 2TB to
prematurely report that they were full and/or to panic the kernel
with the message ``ffs_clusteralloc: allocated out of group''.
Submitted by: Henry Whincup <[email protected]>
Diff reduction to NetBSD.
Now only things that are different between us and NetBSD show up.
Means that these files are more of NetBSD style in some places but
since thay are NetBSD files, um, that's ok.
Obtained from: NetBSD
Slightly reorganise part of the ohci_softintr() function
to better keep track of the total amoutn transferred during a
transfer. Seems similar to some code in the NetBSD version.
I notice they have incorporated matches from him so I don't know which
direction it went.
Submitted by: [email protected]
Obtained from: patches to make the ueagle driver work
Changes to cache endpoint descriptors for all the interfaces. this
information is not always available if we change interfaces.
Submitted by: jamie at bishopston dot net (jamie jones)
Due to unknown reasons, Disk_Names() returns SCSI CDROM as a valid
disk. This is main reason why sysinstall presents SCSI CDROM to
available disks in Fdisk/Label menu. In addition, adding a blank
SCSI CDROM to the menu generates floating point exception in sparc64.
Disk_Names() just extracts sysctl "kern.disks". Why GEOM treats SCSI
CDROM as a disk is beyond me and that should be investigated.
For temporary workaround, ignore SCSI CDROM device.
PR: sparc64/72962
Tested by: R. Tyler Ballance < tyler AT tamu DOT edu>
MFC after: 1 week
date: 2004/12/20 10:18:21; author: mux; state: Exp; lines: +2 -2
Only try to use the 82503 serial interface for the 82557 chipsets. The
datasheet says it is only valid for such chipsets and shouldn't be used
with others. This fixes some 82559 based cards which otherwise only
work at 10Mbit.
MFC after: 5 days
Tested by: krion
src/etc/rc.d/jail:1.20
src/etc/rc.shutdown:1.30
Improve the RC framework for the clean booting/shutdown of Jails:
1. Feature: for flexibility reasons and as a prerequisite to clean
shutdowns, allow the configuration of a stop/shutdown command
via rc.conf variable "jail_<name>_exec_stop" in addition to the
start/boot command (rc.conf variable "jail_<name>_exec_start"). For
backward compatibility reasons, rc.conf variable "jail_<name>_exec"
is still supported, too.
2. Debug: Add the used boot/shutdown commands to the debug output of
the /etc/rc.d/jail script, too.
3. Security: Run the Jail start/boot command in a cleaned environment
to not leak information from the host to the Jail during startup.
4. Feature: Run the Jail stop/shutdown command "jail_<name>_exec_stop" on
"/etc/rc.d/jail stop <name>" to allow a graceful shutdown of the Jail
before its processes are just killed.
5. Bugfix: When killing the remaining Jail processes give the processes
time to actually perform their termination sequence. Without this the
subsequent umount(8) operations usually fail because the resources
are still in use. Additionally, if after trying to TERM-inate the
processes there are still processes hanging around, finally just KILL
them.
6. Bugfix: In rc.shutdown, if running inside a Jail, skip the /etc/rc.d/*
scripts which are flagged with the KEYWORD "nojail" to allow the
correct operation of rc.shutdown under jail_<name>_exec_stop="/bin/sh
/etc/rc.shutdown". This is analogous to what /etc/rc does inside a Jail.
Now the following typical host-configuration for two Jails works as
expected and correctly boots and shutdowns the Jails:
-----------------------------------------------------------
# /etc/rc.conf:
jail_enable="YES"
jail_list="foo bar"
jail_foo_rootdir="/j/foo"
jail_foo_hostname="foo.example.com"
jail_foo_ip="192.168.0.1"
jail_foo_devfs_enable="YES"
jail_foo_mount_enable="YES"
jail_foo_exec_start="/bin/sh /etc/rc"
jail_foo_exec_stop="/bin/sh /etc/rc.shutdown"
jail_bar_rootdir="/j/bar"
jail_bar_hostname="bar.example.com"
jail_bar_ip="192.168.0.2"
jail_bar_devfs_enable="YES"
jail_bar_mount_enable="YES"
jail_bar_exec_start="/path/to/kjailer -v"
jail_bar_exec_stop="/bin/sh -c 'killall kjailer && sleep 60'"
-----------------------------------------------------------
# /etc/fstab.foo
/v/foo /j/foo/v/foo nullfs rw 0 0
-----------------------------------------------------------
# /etc/fstab.bar
/v/bar /j/bar/v/bar nullfs rw 0 0
-----------------------------------------------------------
Restore standard behavior: log to console only when normal logging
failed, not always.
PR: bin/75356
Submitted by: Mark Knight <markk knigma org>
Pointy hat to: glebius
date: 2004/10/12 17:10:40; author: rwatson; state: Exp; lines: +7 -1
Modify the thrilling "%D is using my IP address %s!" message so that
it isn't printed if the IP address in question is '0.0.0.0', which is
used by nodes performing DHCP lookup, and so constitute a false
positive as a report of misconfiguration.
one block obsoleted by the decision not to hold the TCP pcbinfo lock
over a jump to check_delack:
date: 2004/11/23 23:41:20; author: rwatson; state: Exp; lines: +19 -12
In tcp_reass(), assert the inpcb lock on the passed tcpcb, since the
contents of the tcpcb are read and modified in volume.
In tcp_input(), replace th comparison with 0 with a comparison with
NULL.
At the 'findpcb', 'dropafterack', and 'dropwithreset' labels in
tcp_input(), assert 'headlocked'. Try to improve consistency between
various assertions regarding headlocked to be more informative.
MFC after: 2 weeks
to RELENG_5:
date: 2004/11/23 17:21:30; author: rwatson; state: Exp; lines: +4 -0
date: 2004/11/23 17:21:30; author: rwatson; state: Exp; lines: +2 -0
date: 2004/11/23 17:21:30; author: rwatson; state: Exp; lines: +9 -0
tcp_timewait() performs multiple non-atomic reads on the tcptw
structure, so assert the inpcb lock associated with the tcptw.
Also assert the tcbinfo lock, as tcp_timewait() may call
tcp_twclose() or tcp_2msl_rest(), which require it. Since
tcp_timewait() is already called with that lock from tcp_input(),
this doesn't change current locking, merely documents reasons for
it.
In tcp_twstart(), assert the tcbinfo lock, as tcp_timer_2msl_rest()
is called, which requires that lock.
In tcp_twclose(), assert the tcbinfo lock, as tcp_timer_2msl_stop()
is called, which requires that lock.
Document the locking strategy for the time wait queues in tcp_timer.c,
which consists of protecting the time wait queues in the same manner
as the tcbinfo structure (using the tcbinfo lock).
In tcp_timer_2msl_reset(), assert the tcbinfo lock, as the time wait
queues are modified.
In tcp_timer_2msl_stop(), assert the tcbinfo lock, as the time wait
queues may be modified.
In tcp_timer_2msl_tw(), assert the tcbinfo lock, as the time wait
queues may be modified.
MFC after: 2 weeks
date: 2004/11/23 16:45:07; author: rwatson; state: Exp; lines: +11 -15
De-spl tcp_slowtimo; tcp_maxidle assignment is subject to possible
but unlikely races that could be corrected by having tcp_keepcnt
and tcp_keepintvl modifications go through handler functions via
sysctl, but probably is not worth doing. Updates to multiple
sysctls within evaluation of a single addition are unlikely.
Annotate that tcp_canceltimers() is currently unused.
De-spl tcp_timer_delack().
De-spl tcp_timer_2msl().
MFC after: 2 weeks
date: 2004/11/23 16:23:13; author: rwatson; state: Exp; lines: +10 -0
Assert the inpcb lock in tcp_twstart(), which does both read-modify-write
on the tcpcb, but also calls into tcp_close() and tcp_twrespond().
Annotate that tcp_twrecycleable() requires the inpcb lock because it does
a series of non-atomic reads of the tcpcb, but is currently called
without the inpcb lock by the caller. This is a bug.
Assert the inpcb lock in tcp_twclose() as it performs a read-modify-write
of the timewait structure/inpcb, and calls in_pcbdetach() which requires
the lock.
Assert the inpcb lock in tcp_twrespond(), as it performs multiple
non-atomic reads of the tcptw and inpcb structures, as well as calling
mac_create_mbuf_from_inpcb(), tcpip_fillheaders(), which require the
inpcb lock.
MFC after: 2 weeks
date: 2004/11/23 16:06:15; author: rwatson; state: Exp; lines: +4 -0
Assert inpcb lock in tcp_quench(), tcp_drop_syn_sent(), tcp_mtudisc(),
and tcp_drop(), due to read-modify-write of TCP state variables.
MFC after: 2 weeks
date: 2004/11/23 15:59:43; author: rwatson; state: Exp; lines: +11 -4
Assert the tcbinfo write lock in tcp_new_isn(), as the tcbinfo lock
protects access to the ISN state variables.
Acquire the tcbinfo write lock in tcp_isn_tick() to synchronize
timer-driven isn bumping.
Staticize internal ISN variables since they're not used outside of
tcp_subr.c.
MFC after: 2 weeks
date: 2004/11/07 19:19:35; author: rwatson; state: Exp; lines: +5 -6
...
Free the mbuf at the end of tcp_input after releasing any held locks to
reduce the time the locks are held.
MFC after: 3 weeks
Enable jumbo frames on Yukon variants of sk(4).
In contrast to OpenBSD we enable jumbo frame support
depending on MTU setting (like done for xmac).
Obtained from: OpenBSD if_sk.c r1.52 (YU_SMR_MFL_JUMBO flag)
Approved by: pjd (mentor)
In the ethernet-nic-regex:
- add udav(4)
In the scsi-controller-regex:
- correct an entry
- move another one to the right place
- add a bunch of missing drivers
sure the file will be created with the right access, if the call to open()
does create it. Also fix the other call to umask() to turn off "write
others", just as a matter of general safety.
PR: 74418
date: 2004/12/08 11:46:44; author: rwatson; state: Exp; lines: +23 -0
Add a new sysctl/tunable to mac_portacl:
security.mac.portacl.autoport_exempt
This sysctl exempts to bind port '0' as long as IP_PORTRANGELOW hasn't
been set on the socket. This is quite useful as it allows applications
to use automatic binding without adding overly broad rules for the
binding of port 0. This sysctl defaults to enabled.
This is a slight variation on the patch submitted by the contributor.
MFC after: 2 weeks
Submitted by: Michal Mertl <mime at traveller dot cz>
date: 2004/12/06 19:43:45; author: rwatson; state: Exp; lines: +19 -26
Switch from using an sx lock to a mutex for the mac_portacl rule chain:
the sx lock was used previously because we might sleep allocating
additional memory by using auto-extending sbufs. However, we no longer
do this, instead retaining the user-submitted rule string, so mutexes
can be used instead. Annotate the reason for not using the sbuf-related
rule-to-string code with a comment.
Switch to using TAILQ_CONCAT() instead of manual list copying, as it's
O(1), reducing the rule replacement step under the mutex from O(2N) to
O(2).
Remove now uneeded vnode-related includes.
MFC after: 2 weeks
date: 2004/12/05 22:53:17; author: rwatson; state: Exp; lines: +6 -1
Convert GIANT_REQUIRED; in nfs_mountroot() to NET_ASSERT_GIANT(),
and annotate that nfs_mountroot assumes it is OK to step on the
values in the global NFSv3 diskless structure as the mountroot
function is called during a serialized part of the boot, before
any other NFS client activity occurs.
MFC after: 2 weeks
date: 2004/12/05 22:08:37; author: rwatson; state: Exp; lines: +14 -6
Pass the inpcb reference into ip_getmoptions() rather than just the
inp->inp_moptions pointer, so that ip_getmoptions() can perform
necessary locking when doing non-atomic reads.
Lock the inpcb by default to copy any data to local variables, then
unlock before performing sooptcopyout().
MFC after: 2 weeks
ip_output.c:1.234) from HEAD to RELENG_5:
date: 2004/12/05 19:11:09; author: rwatson; state: Exp; lines: +13 -10
Start working through inpcb locking for ip_ctloutput() by cleaning up
modifications to the inpcb IP options mbuf:
- Lock the inpcb before passing it into ip_pcbopts() in order to prevent
simulatenous reads and read-modify-writes that could result in races.
- Pass the inpcb reference into ip_pcbopts() instead of the option chain
pointer in the inpcb.
- Assert the inpcb lock in ip_pcbots.
- Convert one or two uses of a pointer as a boolean or an integer
comparison to a comparison with NULL for readability.
date: 2004/11/28 11:01:31; author: rwatson; state: Exp; lines: +3 -2
Expand coverage of the receive socket buffer lock when handling urgent
pointer updates: test available space while holding the socket buffer
mutex, and continue to hold until until the pointer update has been
performed.
MFC after: 2 weeks
date: 2004/12/22 09:04:47; author: rwatson; state: Exp; lines: +0 -1
Remove single line containing the word "KLD" ommitted in ps.1:1.80.
Pointed out by: ru (some time ago)
date: 2004/11/29 12:00:24; author: rwatson; state: Exp; lines: +4 -5
Point at the mac(4) man page when describing the -Z option.
Remove reference to /dev/lomac, which is no longer used by mac_lomac(4).
MFC after: 3 days
date: 2004/11/23 23:31:33; author: rwatson; state: Exp; lines: +10 -8
Assign if_broadcastaddr to NULL not 0 in if_attach().
Printf() a warning if if_attachdomain() is called more than once on an
interface to generate some noise on mailing lists when this occurs.
Fix up style in if_start(), where spaces crept in instead of tabs at
some point.
MFC after: 1 week
MFC note: Not the printf().
the same as in CVS HEAD except for Makefile's affected by the recent
NO_MAN change:
Add netrate (netreceive, netsend), a tool for generating (and sinking)
UDP packets of specified size at a fixed rate. I've been using this for
netperf-related testing.
Add a version of netsend that uses the interval timer rather than
explicit clock reads to set an overall duration to the send, and
blasts rather than trying to clock output. The goal of netblast,
unlike netsend, is to send as many UDP packets as possible; the
cost is that there's no ability to control the rate, and there's
less accuracy in the timing as the interval timer granularity is
relatively low.
Requested by: Matthew George <mdg at secureworks dot net>
prevents a possible endless loop in pf_get_sport() with
'static-port'
ICMP state entries use the ICMP ID as port for the unique state
key. When checking for a usable key, construct the key in the
same way. Otherwise, a colliding key might be missed or a state
insertion might be refused even though it could be inserted. The
second case triggers the endless loop, possibly allowing a NATed
LAN client to lock up the kernel.
Fixes:
* Failed writes are recognized
* Correct spacing of dates in -tv format
* Display large file sizes correctly
* Eliminate a redundant "Unrecognized option"
warning.
Among other fixes:
* Corrected handling of write errors,
use consistent error return values throughout.
* Correct assembly/disassembly of major/minor device
numbers so that very large minor numbers don't
result in incorrect major numbers.
* Allow tar format to read a non-existent file.
(It will be treated as empty.) This allows
bsdtar -r/-u to work with empty files.
* Update some comments/documentation, prune out
some dead code, other minor changes.
- Add a HARDWARE section which lists supported devices.
- "device sound" does not pull in sound device drivers (like "device
pcm" used to do), so do not mention that option.
- Make the document title more like the title in the other sound
device drivers.
- Make a warning less cryptic.
- Update usage to reflect the current reality.
- Fix a bug where manual pages which had a "_" in their name did not
get proper architecture setting.
Never emit a message to stderr: use syslog instead.
When in inetd mode, this prevents bogus messages from
appearing on the control channel. When running as a
daemon, we shouldn't write to the terminal we used to
have at all.
Synchronize reference list to the ng_xxx(4) manpages of netgraph nodes
with the actually installed manpages by adding the missing ones. This
way they can be found more easily.
- add a HARDWARE section based on the hardware notes and the devices
already listed in the manpage
- reword some DESCRIPTION sentences
- Xref ehci(4)
- bump .Dd
MFC: src/tools/tools/kttcp/sys/kttcp.c 1.4
Make kttcp work in -stable (and -current)
- Removed kttcp_sosend() and kttcp_soreceive() in favor of using
sosend() / soreceive() with UIO_NOCOPY. The locking changes in the
socket layer make merging the kttcp_so* and the so* routines a real
pain. It was a lot easier to just use the integrated routines.
- Eliminated KTTCP_MAX_XMIT restrictions on send and receive sizes
because I encountered no problems with streams larger than MAX_INT.
MAX_INT bytes is only good for a few seconds at 4Gb/sec ;)
- Removed Giant from send / recv routines.
- Fixed character device protos, cdevsw init, etc, to work in 5.x /
6.x
MFC acpi_cmbat.c:1.38
MFC OsdInterrupt.c:1.19
MFC OsdSchedule.c:1.30
Catch up with AcpiOsSleep() interface change.
Catch up with some #define's renaming.
Implement AcpiOsGetTimer() as per ACPI 3.0.
+ Define "I386_CPU" if CPUTYPE is 'i386'.
+ Embellish the AMD64 sections a little. Including supporting 'nocona'.
+ Simplify by treating the standard x86 CPU names as the CPUTYPE vs.
treating them as an alias.
+ Separate the x86 GCC CPU CFLAGS from the ICC CFLAGS.
+ Add support for Pentium M, Pentium 3M and Pentium 4M.
if_sk.c rev. 1.87 (partly) date: 2004/11/01 17:21:04; author: obrien
* Correct an off-by-one reading vpd ro data.
if_sk.c rev. 1.90 date: 2004/11/15 19:37:21; author: jmg
if_skreg.h rev. 1.24 date: 2004/11/15 19:37:21; author: jmg
fix the missing lock in sk_jfree (verified w/ an assert)
also fix up handling and proding of the tx, _OACTIVE is now handled
better...
if_sk.c rev. 1.91 date: 2004/11/15 22:24:32; author: jmg
move the lock after the NULL check so we don't have a hard(er) to
diagnose panic...
if_sk.c rev. 1.92 date: 2004/11/17 21:35:22; author: jmg
only clear the IFF_OACTIVE flag when we have a chance of being able to
queue a packet to the hardware... instead of when the hardware queue is
empty..
don't initalize cur_tx now that it doesn't need to be...
Approved by: pjd (mentor)
Add workaround for {not so|too} smart phones that cannot handle SDP attribute
ID ranges that consist of exactly one attribute ID. libsdp(3) will check start
and end of the attribute ID range and if they are the same the range will be
collapsed to one atribute ID.
The problem was observed on Audiovox SMT5600 and Palm Treo 650.
Reviewed by: re (kensmith, scottl)
Device driver for onboard CS4231 audio controller which is found
on UltraSPARC workstations. The driver is based on OpenBSD's SBus
cs4231 driver and heavily modified to incorporate into sound(4)
infrastructure. Due to the lack of APCDMA documentation, the DMA
code of SBus cs4231 came from OpenBSD's driver.
The driver runs without Giant lock and supports both SBus and EBus
based CS4231 audio controller. Special thanks to marius for providing
feedbacks during the driver writing. His feedback made it possible
to write hiccup free playback code under high system loads.
ICMP6 header. pf finds the first TCP/UDP/ICMP6 header to filter by
traversing the header chain. In the case where headers are skipped,
the protocol checksum verification used the wrong length (included
the skipped headers), leading to incorrectly mismatching checksums.
Such IPv6 packets with headers were silently dropped.
Move session state from on-card memory to host memory so we no longer are
constrained to a small number of sessions by the small on-card memories found
in newer devices. This is really a stopgap solution as having session state
in main memory incurs a (small but noticeable) performance penalty. The better
solution is to manage session state so that it's cached on chip.
1.42: Add a -k flag for querying whois.krnic.net (the National Internet
Development Agency of Korea) which hold details of IP address
allocations within Korea.
MFC whois.1:
1.33: Add a -k flag for querying whois.krnic.net (the National Internet
Development Agency of Korea) which hold details of IP address
allocations within Korea.
1.34: Bump document date.
Short MFC interval to get this into RELENG_4 via RELENG_5 before the
freeze for FreeBSD 4.11.
MFC ok'ed by: ceri
Introduce VM_ALLOC_NOBUSY, an option to vm_page_alloc() and vm_page_grab()
that indicates that the caller does not want a page with its busy flag
set. In many places, the global page queues lock is acquired and released
just to clear the busy flag on a just allocated page. Both the allocation
of the page and the clearing of the busy flag occur while the containing
vm object is locked. So, the busy flag might as well never be set.
MFC vm_page.c's revision 1.298
This change (1) eliminates the calls to vm_page_busy() that
immediately precede a call to vm_page_remove() or functions, such as
vm_page_free() and vm_page_rename(), that call it and (2) relaxes the
requirement in vm_page_remove() that the vm page's PG_BUSY flag is
set.
Change the way we automatically add prefix routes when adding a new
address. This makes it possible to have more than one address with the
same prefix. The first address added is used for the route. On deletion
of an address with IFA_ROUTE set, we try to find a "fallback" address and
hand over the route if possible.
Obtained from: Open/NetBSD
Discussed on: -net, -arch
A lot of help: ru
- Use uint16_t to pass argument for NGM_NETFLOW_IFINFO, bump cookie.
- Always check that index number passed from userland
is <= NG_NETFLOW_MAXIFACES. [1]
- Increase NG_NETFLOW_MAXIFACES up to 512. [2]
Almost nine years ago, when support for 1TB files was introduced in
revision 1.55, the address parameter to vnode_pager_addr() was changed
from an unsigned 32-bit quantity to a signed 64-bit quantity. However,
an out-of-range check on the address was not updated. Consequently,
memory-mapped I/O on files greater than 2GB could cause a kernel panic.
Since the address is now a signed 64-bit quantity, the problem resolution
is simply to remove a cast.
Acquire the vm object lock before rather than after calling
vm_page_sleep_if_busy(). (The motivation being to transition
synchronization of the vm_page's PG_BUSY flag from the global page queues
lock to the per-object lock.)
During traversal of the active and inactive queues, try locking the page's
containing object before accessing the page's flags or the object's
reference count.
Move the acquisition and release of the lock on the object at the head of
the shadow chain outside of the loop in vm_object_madvise(), reducing the
number of times that this lock is acquired and released.
MFC revision 1.336
Eliminate an unnecessary atomic operation. Articulate the rationale in
a comment.
We don't have any providers of `beforenetlkm' in FreeBSD.
Remove the dependency to it from our rc.d scripts.
This resolves the following rcorder(8) complains in 5.3-STABLE:
$ rcorder /etc/rc.d/* 2>&1 | grep rcorder
rcorder: requirement `beforenetlkm' in file `/etc/rc.d/ike' has no providers.
rcorder: requirement `beforenetlkm' in file `/etc/rc.d/pflog' has no providers.
rcorder: requirement `beforenetlkm' in file `/etc/rc.d/pf' has no providers.
Fix off-by-one errors and potential buffer overruns
in handling file and link names that reach the allowed
maximum for old tar and ustar archive formats.
Log:
-Add a note that currently two syntax styles for label element declaration
is supported.
-Document the new more preferred syntax
-Add examples for the new syntax
-Add a note that the old syntax will be deprecated in the future.
Teach periodic(8) security output to display information about blocked
packet counts by pf(4).
This adds a `daily_status_security_pfdenied_enable'' variable to
periodic.conf, which defaults to `YES'' as the matching IPF(W) versions.
Submitted by: clive (thanks a lot!)
PR: conf/73959
Fix description: the argument to setcontext(3) must have been previously
initialized "by a call to getcontext(3) or makecontext(3)" and not "by a
call to setcontext(3) or makecontext(3)".
and 0(zero padding) padding specifiers.
Bump __FreeBSD_version so the ports team would be able to distinguish
between 5.3-STABLE before and after this change.
Introduce new failure detection algorithm, called NG_ONE2MANY_FAIL_NOTIFY.
It means, that node listens to flow control messages from downstreams
and removes link from list of active links whenever a LINK_IS_DOWN message
is received. If LINK_IS_UP message is received, then links is put
back into list of active links.
1.53: Document how to set file mode in -l.
1.54: Document path to privileged socket.
1.55: Add newsyslog(8) to the "See Also" section.
1.56 - 1.57: Grammar and mdoc fixes.
1.132: Use stailqueue for sockets. Remove limit. Add possibility
to specify file mode for sockets created with -l.
1.133: Open an additional socket /var/run/logpriv, with 0600 perms.
1.134: Double receive buffer size on sockets.
1.135 - 1.138: Whitespace and grammar.
With mii.h rev 1.4 changes to BMSR_MEDIAMASK merged in from
NetBSD got activated. NetBSD has an additional change in
their mii.c rev 1.26 which got missed with that merger:
: When probing for a PHY, look at the EXTSTAT bit in the BMSR, as well,
: not just the media mask. This prevents PHYs/TBIs that only support
: Gigabit media from slipping through the cracks.
With this GE only ones like from the SK-9844 are detected again.
PR: i386/63313, i386/71733, kern/73725
Tested by: matt baker <matt at sevenone dot com>, Jin Guojun <jin at george dot lbl dot gov>
Obtained from: NetBSD mii.c rev 1.26
Approved by: rwatson (mentor)
with a knob to disable it at build time--flag 0x80 for
BOOT_MBR_FLAGS and BOOT_BOOT1_FLAGS. In fact, disabling
packet mode completely, even a test for it, should be
necessary only for old and brain-damaged machines FreeBSD 5
will hardly run on.
mbr/Makefile 1.14
mbr/mbr.s 1.7
boot2/Makefile 1.57
boot2/boot1.S 1.30
Encouraged by: Valentin Nechayev
Try to close a potential, but serious race in our VM subsystem
that may result in panic with damaged page bucket hash table or
file system corruption.
The revision 1.41 tighten the check of vm_contigalloc1() and
vm_contigalloc2().
Please note that this MFC does not merged 1.39 and 1.40's changes.
Approved by: alc
Restore ng_timeout() and ng_untimeout() as they were in ng_base.c:1.84, so that
during RELENG_5 both interfaces are supported.
Reviewed by: scottl
Approved by: julian (mentor), implicitly
----------------------------
revision 1.7
date: 2004/11/03 10:02:50; author: rwatson; state: Exp; lines: +11 -14
(1) Move from O(n) list copies to O(1) list concatenation, which is
supported for STAILQ via STAILQ_CONCAT().
(2) Maintain a count of the number of entries in the thread-local entropy
fifo so that we can keep the other fifo counts in synch.
MFC after: 3 weeks
MFC with: randomdev_soft.c revisions 1.5 and 1.6
Suggested by: jhb (1)
----------------------------
revision 1.6
date: 2004/10/12 14:57:14; author: rwatson; state: Exp; lines: +6 -0
Assert that the entropy source category provided by a caller submitting
entropy is valid, as an invalid source will cause dereferencing of an
array of queues to an incorrect memory location.
----------------------------
revision 1.5
date: 2004/10/09 22:04:13; author: rwatson; state: Exp; lines: +41 -50
Modify entropy harvesting locking strategy:
- Trade off granularity to reduce overhead, since the current model
doesn't appear to reduce contention substantially: move to a single
harvest mutex protecting harvesting queues, rather than one mutex
per source plus a mutex for the free list.
- Reduce mutex operations in a harvesting event to 2 from 4, and
maintain lockless read to avoid mutex operations if the queue is
full.
- When reaping harvested entries from the queue, move all entries from
the queue at once, and when done with them, insert them all into a
thread-local queue for processing; then insert them all into the
empty fifo at once. This reduces O(4n) mutex operations to O(2)
mutex operations per wakeup.
In the future, we may want to look at re-introducing granularity,
although perhaps at the granularity of the source rather than the
source class; both the new and old strategies would cause contention
between different instances of the same source (i.e., multiple
network interfaces).
Reviewed by: markm
Also merge subr_witness.c:1.182 from HEAD to RELENG_5:
date: 2004/10/11 08:26:18; author: rwatson; state: Exp; lines: +1 -2
Add entropy harvest mutex to hard-coded spin lock witness lock order,
remove previous entropy harvesting mutex names as they are no longer
present. Commit to this file was ommitted when randomdev_soft.c:1.5
was made.
Feet shot: Robert Huff <roberthuff at rcn dot com>
date: 2004/11/22 13:16:27; author: rwatson; state: Exp; lines: +0 -3
Remove "Unlocked read" annotations associated with previously unlocked
use of socket buffer fields in the TCP input code. These references
are now protected by use of the receive socket buffer lock.
MFC after: 1 week
Remove unnecessary check for curthread == NULL.
MFC revision 1.197
System maps are prohibited from mapping vnode-backed objects. Take
advantage of this restriction to avoid acquiring and releasing Giant when
wiring pages within a system map.
MFC revisions 1.193 and 1.194
Further reduce the use of Giant by vm_fault(): Giant is held only when
manipulating a vnode, e.g., calling vput(). This reduces contention for
Giant during many copy-on-write faults, resulting in some additional
speedup on SMPs.
- Document the DISABLE_VULNERABILITIES knob.
- Don't say this manual page is too long, it's not that long.
- s/man page/manual page/g
- Bump document date.
Port NetBSD auxio driver. The driver was modified to use led(4) and can
be used to announce various system activity.
The auxio device provides auxiliary I/O functions and is found on various
SBus/EBus UltraSPARC models. At present, only front panel LED is
controlled by this driver.
Improved interface handling. This fixes the use of renamed interfaces
(ifconfig xl0 name foo) as well as some special interfaces such as the
6to4 tunnel.
Reported by: Ed Schouten <ed (at) il ! fontys , nl>
Tested by: freebsd-pf
PR: kern/72444
date: 2004/11/14 20:20:28; author: rwatson; state: Exp; lines: +19 -4
Further refine the if_em vlan fix in if_em.c:1.53:
- Because em_encap() can now fail in a way that leaves us without an
mbuf chain, potentially set *m_headp to NULL if that happens, so that
the caller can do the right thing. This case can occur when we try
to prepend the vlan header mbuf but can't allocate additional memory.
- Modify the caller of em_encap() to detect a NULL m_head and not try
to queue the mbuf if that happens.
- When em_encap() fails, make sure to call bus_dmamap_destroy() to
clean up.
date: 2004/11/12 11:03:07; author: rwatson; state: Exp; lines: +1 -0
date: 2004/11/12 11:03:07; author: rwatson; state: Exp; lines: +43 -6
Correct a bug in the if_em driver relating to the use of vlans with
promiscuous mode introduced in 1.45, which programs the em card not
to strip or prepend tags when in promiscuous mode without also
modifying behavior to manually prepend a vlan header in the event
that the card isn't doing it on transmit. Due to a feature of card
operation, if the global VLAN prepend/strip register isn't set,
setting the VLAN tag flag on individual packet descriptors will
cause the packet to be transmitted using ISL encapsulation rather
than 802.1Q VLAN encapsulation.
This fix causes em_encap() to prepend the header by tracking whether
the card is configured to temporarily disable prepending/stripping
due to promiscuous mode. As a result, entering promiscuous mode on
the parent em interface no longer causes vlans to appear to "wedge"
or transmit ISL-encapsulated frames, which typically will not be
configured/spoken by the other endpoints on the VLAN trunk. This
bug may also exist in other drivers, and the additional vlan
encapsulation logic should be abstracted and centralized in
if_vlan.c if so.
RELENG_5_3 candidate.
MFC after: 1 week
Tested by: pjd, rwatson
Reported by: astesin at ukrtelecom dot net
Reported by: Mike Tancsa <mike at sentex dot net>
Reported by: Iasen Kostov <tbyte at OTEL dot net>
MFC after: 1 week
- Add paging support to the various MD stack trace handlers.
- Allow the number of lines per page to be adjusted via the $lines
variable in ddb. Setting this variable to 0 effectively disables
paging.
- Fix the sparc64 userland stack trace to honor the total count argument
so it won't loop forever in some cases.
- Since divert protocol is not connection oriented, remove SS_ISCONNECTED flag
from divert sockets.
- Remove div_disconnect() method, since it shouldn't be called now.
- Remove div_abort() method. It was never called directly, since protocol
doesn't have listen queue. It was called only from div_disconnect(),
which is removed now.
MFC part of 1.109:
- in the beginning of div_output() replace KASSERT with assignment, as
it was in rev. 1.83.
Limit DMA address space to 1GB since the trident audio cards can't
handle DMA addresses located above 1GB. The LBA(loop begin address)
register which holds DMA base address is 32bits register. But the
MSB 2bits are used for other purposes. This effectivly limits the
DMA address space up to 1GB.
ess.c, 1.33
mss.c, 1.92
sb16.c, 1.89
sb8.c, 1.78
au88x0.c, 1.9
aureal.c, 1.30
csapcm.c, 1.32
ds1.c, 1.41
emu10k1.c, 1.53
es137x.c, 1.52
fm801.c, 1.25
ich.c, 1.47
maestro3.c, 1.26
solo.c, 1.33
t4dwave.c, 1.45
via8233.c, 1.18
via82c686.c, 1.32
Audio drivers failed to detect failure condition and attempted to
assign DMA address to the wrong address. It can cause system lockup
or other mysterious errors. Since most sound cards requires low DMA
address(BUS_SPACE_MAXADDR_24BIT) sndbuf_alloc() would fail when the
audio driver is loaded after long running of operations.
date: 2004/11/04 01:25:23; author: rwatson; state: Exp; lines: +24 -57
Until this change, the UDP input code used global variables udp_in,
udp_in6, and udp_ip6 to pass socket address state between udp_input(),
udp_append(), and soappendaddr_locked(). While fine in the default
configuration, when running with multiple netisrs or direct ithread
dispatch, this can result in races wherein user processes using
recvmsg() get back the wrong source IP/port. To correct this and
related races:
- Eliminate udp_ip6, which is believed to be generated but then never
used. Eliminate ip_2_ip6_hdr() as it is now unneeded.
- Eliminate setting, testing, and existence of 'init' status fields
for the IPv6 structures. While with multiple UDP delivery this
could lead to amortization of IPv4 -> IPv6 conversion when
delivering an IPv4 UDP packet to an IPv6 socket, it added
substantial complexity and side effects.
- Move global structures into the stack, declaring udp_in in
udp_input(), and udp_in6 in udp_append() to be used if a conversion
is required. Pass &udp_in into udp_append().
- Re-annotate comments to reflect updates.
With this change, UDP appears to operate correctly in the presence of
substantial inbound processing parallelism. This solution avoids
introducing additional synchronization, but does increase the
potential stack depth.
Discovered by: kris (Bug Magnet)
MFC after: 3 weeks
Note that this bug does not effect the default configuration, only systems
running with net.isr.enable=1, or with modified network stacks to increase
parallelism.
- Add KTR tracing
- Small performance tweaks
- Create sub-pools for bounce pages with similar attributes
- Don't erroneosuly account for boundary crossing when using bounce pages.
- Add KTR tracing
- Small performance tweaks
- Create sub-pools for bounce pages with similar attributes
- Don't erroneosuly account for boundary crossing when using bounce pages.
- Eliminate an unused but initialized variable.
- Introduce a Boolean variable wakeup_needed to avoid repeated,
unnecessary calls to wakeup() by vm_page_zero_idle_wakeup().
Apply a bandaid to avoid hangs on Ultra 2 machines. The second Z8530
connects to the keyboard and mouse and needs some special treatment.
Until this is fully understood, implemented and tested, simply avoid
probing the second Z8530. This is also what the zs(4) driver does.
Set ramsize depending on a value from eprom instead of using
hardcoded 128k for Yukon devices. 88E8001 only has 64k of on-chip RAM.
Approved by: rwatson (mentor)
Remove the BR tag. When the machine doesn't have the DIG64 HCDP
table with console settings, we now only need to know at which
address the UART lives. Leaving the baudrate unspecified results
in us using the baudrate at which the UART operates.
date: 2004/10/24 23:45:01; author: rwatson; state: Exp; lines: +87 -23
Move from using the socket reference count to the file reference
count to prevent sockets from being garbage collected during
socket-specific system calls. This is the same approach used in
most VFS-specific system calls, as well as generic file descriptor
system calls such as read() and write().
To do this, add a utility function getsock(), which is logically
identical to getvnode() used for the same purpose in VFS. Unlike
fgetsock(), it returns with the file reference count elevated, but
no bump of the socket reference count. Replace matching calls to
fputsock() with fdrop().
This change is made to all socket system calls other than
sendfile() and accept(), but the approach should be applicable to
those system calls also.
This shaves about four mutex operations off of each of these
system calls, including send() and recv() variants, adding about
1% to pps on minimal UDP packets for UP using netblast, and 4% on
SMP.
Reviewed by: pjd
date: 2004/11/11 21:30:52; author: rwatson; state: Exp; lines: +52 -38
Correct a bug in nfsrv_create() where a call to nfsrv_access() might
be made holding the NFS server mutex. To clean this up, introduce a
version of the function, nfsrv_access_withgiant(), that expects the
NFS server mutex to already have been dropped and Giant acquired.
Wrap nfsrv_access() around this. This permits callers to more
efficiently check access if they're in a code block performing VFS
operations, and can be substitited for the nfsrv_access() call that
triggered this bug.
PR: 73807, 73208
MFC after: 1 week
RELENG_5_3 candidate.
MFC after: 10 days
Add an -f option (for force) to the migrate command. Normally an MBR
with unknown partitions is not migrated. By specifying the -f option
migration will happen and unknown partitions will be lost.
Add an -f option (for force) to the create command. The -f option
allows the user to force the creation of a GPT even when there's a
MBR on the device. The MBR is simply wiped and any partitions
described by it are lost. Without the -f option one cannot create
a GPT when there's a MBR.
Correct two errors in PG_BUSY management by vm_page_cowfault(). Both
errors are in rarely executed paths.
1. Each time the retry_alloc path is taken, the PG_BUSY must be set again.
Otherwise vm_page_remove() panics.
2. There is no need to set PG_BUSY on the newly allocated page before
freeing it. The page already has PG_BUSY set by vm_page_alloc().
Setting it again could cause an assertion failure.
Fix a braino: the partition size in the PMBR is in sectors, not bytes
and 'mediasz' is in bytes. As it so happens, we define 'last' as the
sector number of the last sector on the medium which also is the size
of the PMBR partition. Therefore, use 'last' instead of 'mediasz'.
user (for creation of the zone journal file). This is separate from the
master/ directory for security. Give an example dynamic zone in the
sample named.conf.
Approved by: dougb
Noticed by: Eivind Olsen <eivind at aminor.no>
Revision Changes Path
1.6 +2 -0 src/etc/mtree/BIND.chroot.dist
1.20 +14 -0 src/etc/namedb/named.conf
Another missing ! in front of IFQ_DRV_IS_EMPTY, this time in an even more
sensitive, but less excercised location (the watchdog). While here use the
*_start_locked function directly to avoid drop, grab, drop lock.
stable-supfile are meant to provide.
Note this is not an MFC and a similar change was not made to HEAD
because the confusion revolves around the specific branches involved.
- sort struct rtentry fields in man page in some order as they are in struct
- remove RTF_PRCLONING
- add rt_mtx field
- rename rt_metrics -> rt_metrics_lite
- mention that only 3 metrics are really used in rt_metrics_lite
Make profiling actually work. The gcc compiler emits a call to the
_mcount() stub when profiling is enabled.
MFC exception.S:1.54, locore.S:1.36, support.S:1.23, syscall.S:1.13
s/ENTRY/ENTRY_NOPROFILE/g for particular functions that do not follow
the C calling convention or are otherwise not regular functions. This
allows us to boot a profiling kernel.
i386/include/profile.h:1.38, ia64/include/profile.h:1.11,
sparc64/include/profile.h:1.7, libkern/mcount.c:1.23:
Move the kernel-specific logic to adjust frompc from MI to MD. This
introduces macros MCOUNT_FROMPC_USER and MCOUNT_FROMPC_INTR.
Required for GPROF on ia64.
Have the linker provide the btext symbol when referenced. This is needed
for profiling kernels. Apparently, nobody has ever tried to build one on
alpha...
Reactivate skipping over bogus IPCP addresses on ppp interfaces. Be more
careful with the skip condition this time. Addresses are only not taken
into account if:
- The interface is POINTTOPOINT
- There is no route installed for the address
- The user specified noalias (:0)
and - We are looking at an IPv4 address.
This should be enough paranoia to not cause any false positives.
PR: misc/69954
Discussed with: yongari
Another forgotten MFC :-( ... 5.4R then ...
This is magic and no other operating system do so (i.e. Solaris, Tru64,
Linux, AIX, HP-UX, Irix, MacOS X, NetBSD).
Discussed on: current@
Reported by: S³awek ¯ak <[email protected]>
pass1.c:1.43, pass2.c:1.26, pass3.c:1.15, pass4.c:1.15, pass5.c:1.40
> truckman 2004-10-08 20:44:48 UTC
>
> FreeBSD src repository
>
> Modified files:
> sbin/fsck_ffs dir.c fsck.h fsutil.c inode.c main.c
> pass1.c pass2.c pass3.c pass4.c pass5.c
> Log:
> Eliminate linked list used to track inodes with an initial link
> count of zero and instead encode this information in the inode state.
> Pass 4 performed a linear search of this list for each inode in
> the file system, which performs poorly if the list is long.
>
> Reviewed by: sam & keramida (an earlier version of the patch), mckusick
> MFC after: 1 month
>
> Revision Changes Path
> 1.30 +2 -3 src/sbin/fsck_ffs/dir.c
> 1.33 +15 -15 src/sbin/fsck_ffs/fsck.h
> 1.25 +1 -3 src/sbin/fsck_ffs/fsutil.c
> 1.37 +2 -0 src/sbin/fsck_ffs/inode.c
> 1.42 +0 -8 src/sbin/fsck_ffs/main.c
> 1.43 +5 -16 src/sbin/fsck_ffs/pass1.c
> 1.26 +5 -1 src/sbin/fsck_ffs/pass2.c
> 1.15 +3 -3 src/sbin/fsck_ffs/pass3.c
> 1.15 +8 -11 src/sbin/fsck_ffs/pass4.c
> 1.40 +2 -0 src/sbin/fsck_ffs/pass5.c
- Estimate the amount of data in flight in sack recovery and use it
to control the packets injected while in sack recovery (for both
retransmissions and new data).
- Cleanups to the sack codepaths in tcp_output.c and tcp_sack.c.
- Add a new sysctl (net.inet.tcp.sack.initburst) that controls the
number of sack retransmissions done upon initiation of sack recovery.
Submitted by: Mohan Srinivasan <[email protected]>
Fix a panic discovered with some apache2 configure test (that seemed to
trigger a socket creation race some some kind). Checking for non-NULL
socket and credential is not a bad idea anyway. Unfortunatly too late for
the release.
Reported & tested by: Gilbert Cao
I completly forgot about this when the release was pushed back. Depending on
the new maintance policies for RELENG_5_3 it might be a candidate. Let's
just not forget ... I hope the MFC reminder works here ...
MFC after: 2 weeks
Remove the -k option to migrate. The option causes gpt(8) to preserve
the MBR after it is migrated to a GPT. While this was useful during
the early days when GPT support was under development, it's something
that users can use without knowing what they're getting themselves
into. The possible harm outweights the marginal usefulness it now has.
[MFC notice: due to the harm that the option can do it is believed that
this feature reduction is appropriate on a stable branch]
Put the ispfw.ko module on the EFI boot partition when creating a
bootable ISO. HP machines (like the rx2600) that (also) have isp(4)
may have a non-standard firmware on the controller. Our isp(4) driver
is not able to work with those and even panics. This makes installing
FreeBSD rather impossible. By adding the ispfw.ko module, we give the
user a chance to upload a certified firmware onto the card and so make
it possible to either use the isp(4) successfully or otherwise avoid
the panic.
Missed for 5.3 by: marcel
Don't barf when we encounter an UUID for GPT partitions. Instead, add
the GPT partition on i386 and adm64 as type=gpt, subtype=0 and with the
sname set to the UUID. This prevents sysinstall from bombing out. This
also makes sure the GPT partition shows up in sysinstall so as to avoid
accidental "clobberage".
PR: bin/72896
If the argument to the -r flag starts with a ':' or a '|', don't try to
make sure it is a device. GDB special cases these prefixes and treats
:#### as a tcp port on localhost and executes what ever follows '|'.
This allows kgdb to debug via dconschat.
Credits to: brooks
Abstract the handling of dirty stacked registers in ia64_read_reg() and
ia64_write_reg() and call these whenever we read or write registers from
and to memory. This way we correctly read registers from addresses in
the register cache and thus fixes backtraces when the saved registers
(such as rp and ar.pfs) are in dirty stacked registers.
Give each plex a separate queue where held back bios are put on.
This lowers the CPU usage of the worker thread and prevents a
possible live lock on non-SMP machines.
date: 2004/11/02 17:15:13; author: rwatson; state: Exp; lines: +1 -0
Acquire the accept mutex in soabort() before calling sotryfree(), as
that is now required.
RELENG_5_3 candidate.
Foot provided by: Dikshie <dikshie at ppk dot itb dot ac dot id>
Approved by: re (kensmith)
- Update the following items:
* remove "s/tag=RELENG_5/tag=RELENG_5_3/ in cvsup/standard-cvsup" and
"sk(4) panic on shutdown" because they are already fixed.
* update "sk(4) locking up"[2] and "gvinum at boot time"[3].
- Add new items:
ULE scheduler disabled[4], libpthread CPU usage statistics[5], and
ataraid support for CMD649 and SiI0680 controllers[6].
Reported by: Pawel Worach (pawel.worach at telia.com)[1],
Adrian Wontroba (aw1 at stade.co.uk)[1],
Joel Dahl (joel at automatvapen.se)[1],
Bjoern A. Zeeb (bzeeb-lists at lists.zabbadoz.net)[2],
le[3],
Ryan Sommers (ryans at gamersimpact.com)[4],
Dan Nelson (dnelson at allantgroup.com)[5], and
Emanuel Strobl (Emanuel.Strobl at gmx.net)[6]
Approved by: re (implicitly)
date: 2004/10/30 09:39:13; author: rwatson; state: Exp; lines: +25 -0
Move if_handoff() from an inline in if_var.h to a function to if.c
in orden to harden the ABI for 5.x; this will permit us to modify
the locking in the ifnet packet dispatch without requiring drivers
to be recompiled.
MFC after: 3 days
Discussed at: EuroBSDCon Developer's Summit
Approved by: re (kensmith)
date: 2004/10/30 08:45:13; author: rwatson; state: Exp; lines: +5 -0
Add additional "spare" fields to 'struct ifnet' in order to improve
the resistance of the network driver ABI to changes that will be
required as we optimize locking.
MFC after: 3 days
Discussed at: Developer Summit
Approved by: re (kensmith)
date: 2004/10/30 14:20:59; author: rwatson; state: Exp; lines: +21 -0
Disable use of synchronization early in the boot by the MAC Framework;
for modules linked into the kernel or loaded very early, panics will
result otherwise, as the CV code it calls will panic due to its use
of a mutex before it is initialized.
Approved by: re (kensmith)
cvsup/standard-supfile s/tag=RELENG_5/tag=RELENG_5_3/,
em(4), re(4), sk(4) performance degradation under heavy load,
burncd(8) strange behavior,
debug.mpsafenet should be set to 0 when user/group rule modificators
in pf(4) and ipfw(4) are used,
vinum panic on boot and geom_vinum,
"netstat -m" on SMP systems, and
installation to systems with USB keyboard only.
Approved by: re (implicitly)
date: 2004/10/30 12:02:50; author: rwatson; state: Exp; lines: +2 -2
Correct a bug in TCP SACK that could result in wedging of the TCP stack
under high load: only set function state to loop and continuing sending
if there is no data left to send.
RELENG_5_3 candidate.
Feet provided: Peter Losher <Peter underscore Losher at isc dot org>
Diagnosed by: Aniel Hartmeier <daniel at benzedrine dot cx>
Submitted by: mohan <mohans at yahoo-inc dot com>
Approved by: re (kensmith)
revision 1.16
date: 2004/10/05 07:18:11; author: imp; state: Exp; lines: +4 -4
Yet another case of resources:
+ * 9: 0x3f0-0x3f3,0x3f4-0x3f5,0x3f7
This requires only one change to support. Rather than keying on the
size of the resource being 2, instead key off the end & 7 being 3.
This covers the same cases that the size of 2 would catch, but also
covers the new above case.
In addition, I think it is clearer to use the end in preference to the
size and start for case #8 as well. Turns two tests into one, and
catches no other cases.
Make minor commentary changes to deal with new case #9.
# This change is specifically minimal to allow easy MFC. A more
# extensive change will go into current once I've had a chance to test
# it on a lot of hardware...
Approved by: re@ (kensmith)
Forgotten by: imp@
Fix a panic during shutdown on SMP machines, by forcing interrupts to
be disabled, and avoiding recursive acquisition of the driver mutex.
CVS tag slip pending by kensmith@.
Approved by: re@
Tested by: seb at struchtrup dot com
PR: kern/62889
share/man/man5/rc.conf.5 1.229, 1.230
: Introduce root_rw_mount as a new variable in defaults/rc.conf to
: unbreak /etc/rc.d/root for diskless systems that get their root
: filesystem from a read-only NFS mount.
:
: PR: conf/72927
: Submitted by: Ralf Wenk <[email protected]>
: Reviewed by: brooks
Approved by: re (kensmith)
> revision 1.251
> date: 2004/10/23 11:20:26; author: davidxu; state: Exp; lines: +1 -1
> Remove P_STOPPED_TRACE bit if debugger dies without a chance to
> detach debugged process.
Work by: davidxu
Approved by: re (kensmith approved davidxu but he asked me to commit)
Check that rt_mask(rt) is non-NULL before dereferencing it, in the
RTM_ADD case, thus avoiding a panic.
PR: kern/42030
Submitted by: Iasen Kostov
Approved by: re@
Do not retry on requests that has lost thier device during reinit.
Should fix hangs on IBM's etc with the fake slave problem.
Approved by: re@ (scottl)
majority of users shift GENERIC back to UP instead of SMP. Provide
a config file people with MP boxes can use.
Discussed by: re@
Approved by: re (scottl)
Return the unit number of a channel instead of a hardcoded '1' from
the ATA pccard locking function. This makes pccard devices like
Compact Flash cards work again.
PR: kern/72805
Submitted by: James E. Flemer <[email protected]>
Approved by: re@ (scottl)
> fix (for me) the problems where if_de gets really slow after time
> (usually taking 20 seconds to transmit a packet).. no longer fall back
> to only transmitting one packet (instead of the entire queue) after we
> have processed the entire send queue... I have no idea why we didn't
> start seeing this problem ~6 years ago when this code was introduced...
Approved by: re (scottl)
Don't put devel/gdb6 on disc1 for non-i386 platforms. We have gdb6 in
the base-system. Adding the port for ia64 on disc1 is especially bogus,
because the port doesn't even build on ia64. It also doesn't support
libthread_db.
MFC: rev 1.68:
Seperate ia64 from the pack. The disc1 is overflowing to such extend
that most packages can not be included. It's much easier to list those
that we do want on disc1 for ia64. We only need to list 11 of them.
Approved by: re (scottl)
Define IFF_LOCKGIANT() and IFF_UNLOCKGIANT() macros, which conditionally
acquire Giant if the passed interface has IFF_NEEDSGIANT set on it.
Modify calls into (ifp)->if_ioctl() in if.c to use these macros in order
to ensure that Giant is held.
MFC after: 3 days
Bumped into by: jmg
Approved by: re (kensmith)
Close a possible race which could prevent geom classes from being unloaded
on SMP machines due to traffic counters getting out of whack.
Approved by: re::scottl
1.7, but the correction is different: Rather than making sure the
string we're constructing doesn't grow too large, we realloc() to make
sure the buffer is large enough.
This violates the IEEE Std 1003.1-2004 standard, but retains backwards
compatability.
Approved by: re (scottl)
raw_cb.c:1.30, raw_usrreq.c:1.35, ddp_pcb.c:1.45, atm_socket.c:1.21,
ng_btsocket_hci_raw.c:1.16, ng_btsocket_l2cap.c:1.14,
ng_btsocket_l2cap_raw.c:1.13, ng_btsocket_rfcomm.c:1.13, in_pcb.c:1.156,
tcp_subr.c:1.205, in6_pcb.c:1.61, ipx_pcb.c:1.29, ipx_usrreq.c:1.41,
natm.c:1.35, socketvar.h:1.135 from HEAD to RELENG_5:
Push acquisition of the accept mutex out of sofree() into the caller
(sorele()/sotryfree()):
- This permits the caller to acquire the accept mutex before the socket
mutex, avoiding sofree() having to drop the socket mutex and re-order,
which could lead to races permitting more than one thread to enter
sofree() after a socket is ready to be free'd.
- This also covers clearing of the so_pcb weak socket reference from
the protocol to the socket, preventing races in clearing and
evaluation of the reference such that sofree() might be called more
than once on the same socket.
This appears to close a race I was able to easily trigger by repeatedly
opening and resetting TCP connections to a host, in which the
tcp_close() code called as a result of the RST raced with the close()
of the accepted socket in the user process resulting in simultaneous
attempts to de-allocate the same socket. The new locking increases
the overhead for operations that may potentially free the socket, so we
will want to revise the synchronization strategy here as we normalize
the reference counting model for sockets. The use of the accept mutex
in freeing of sockets that are not listen sockets is primarily
motivated by the potential need to remove the socket from the
incomplete connection queue on its parent (listen) socket, so cleaning
up the reference model here may allow us to substantially weaken the
synchronization requirements.
RELENG_5_3 candidate.
MFC after: 3 days
Reviewed by: dwhite
Discussed with: gnn, dwhite, green
Reported by: Marc UBM Bocklet <ubm at u-boot-man dot de>
Reported by: Vlad <marchenko at gmail dot com>
MFC after: 1 day
Approved by: re (scottl)
date: 2004/10/18 11:23:11; author: rwatson; state: Exp; lines: +61 -13
Correct several instances where calls to vfs_getvfs() resulting in
failure in the NFS server would result in a leaked instance of the NFS
server subsystem lock. Liberally sprinkle assertions in all target
labels for error unwinding to assert the desired locking state.
RELENG_5_3 candidate.
MFC after: 3 days
Reported by: Wilkinson, Alex <alex dot wilkinson at dsto dot defence
dot govdot au>
MFC after: 1 day
Approved by: re (scottl)
Instead, add 'swapoff' variable to rc.conf (turned off by default),
so users who use gmirror and swap-on-mirror configuration still can
turn it on and avoid problems with dirty mirror components on next
boot.
Idea from: NetBSD
Approved by: re (scottl)
Prevent preemption in slot_fill.
Implement preemption between threads in the same ksegp in out of slot
situations to prevent priority inversion.
Fix maybe_preempt_in_ksegrp for !SMP.
Approved by: re (kensmith)
Added support for Intel PRO/1000 GT Desktop Adapter(Device ID 8086 107C)
Removed support for Intel 82541ER
Added fix for 82547 which corrects an issue with Jumbo frames larger than 10k.
Added fix for vlan tagged frames not being properly bridged.
Corrected TBI workaround.
Corrected incorrect LED operation issues
Fix typeo. Should read ***!***IFQ_DRV_IS_EMPTY.
This might fix some of the trouble around em(4) filling up its buffers.
Don't count RNBC (internal buffer full) towards the RX error count since it's
not really an error.
Approved by: re[scott long]
> improve the mbuf m_print function.. Only pull length from pkthdr if there
> is one, detect mbuf loops and stop, add an extra arg so you can only print
> the first x bytes of the data per mbuf (print all if arg is -1), print
> flags using %b (bitmask)...
musycc.c v1.34:
> Add -1 to this non-existent use of m_print in the source tree so LINT
> compiles again :-)
Approved by: re (scottl)
- Be more userfriendly and allow to specify gbde device name in those forms:
device
device.bde
/dev/device
/dev/device.bde
- Fix stop routine:
+ There don't have to be file system mounted on gbde device,
so ignore errors from umount(8).
+ Only detach existing gbde devices.
Approved by: re (kensmith)
anymore.
- Avoid race while synchronizing components.
- Decrease timeout to 4 seconds.
- Just use MAXPHYS as maximum I/O request size, instead of using my own
#define for this purpose.
Approved by: re (kensmith)
#define for this purpose.
- Before root file system is mounted, wait for mirrors in degraded state.
- Be sure to always return 0 for negative access requests.
Approved by: re (kensmith)
date: 2004/10/01 15:23:31; author: mux; state: Exp; lines: +4 -4
Read the MAC address in the EEPROM in the correct byte order. This
is a no-op on little endian architectures, but fixes getting the MAC
address for some dc(4) cards on big endian architectures.
Approved by: re (scottl)
A power failure left the temporary /var/.diskless directory
on my system, and since then my /var was always created as
MFS which was very surprising. Fix this for /tmp and /var.
Approved by: re (kensmith)
date: 2004/10/12 20:03:56; author: rwatson; state: Exp; lines: +3 -3
Don't release the udbinfo lock until after the last use of UDP inpcb
in udp_input(), since the udbinfo lock is used to prevent removal of
the inpcb while in use (i.e., as a form of reference count) in the
in-bound path.
RELENG_5 candidate.
Approved by: re (scottl)
date: 2004/10/12 09:25:52; author: rwatson; state: Exp; lines: +2 -0
date: 2004/10/12 09:25:52; author: rwatson; state: Exp; lines: +2 -0
Mark i4b IPR and SPPP drivers as NET_NEEDS_GIANT(), as they both
interface with the network stack but are not yet sufficiently
synchronized to run without the Giant lock. It migh be possible
to mark the interfaces as IFF_NEEDSGIANT, but I'm unable to test
that configuration and am unfamiliar with the architecture of
i4b.
Approved by: re (scottl)
date: 2004/10/12 16:47:25; author: rwatson; state: Exp; lines: +41 -20
When the access control on creating raw sockets was modified so that
processes in jail could create raw sockets, additional access control
checks were added to raw IP sockets to limit the ways in which those
sockets could be used. Specifically, only the socket option IP_HDRINCL
was permitted in rip_ctloutput(). Other socket options were protected
by a call to suser(). This change was required to prevent processes
in a Jail from modifying system properties such as multicast routing
and firewall rule sets.
However, it also introduced a regression: processes that create a raw
socket with root privilege, but then downgraded credential (i.e., a
daemon giving up root, or a setuid process switching back to the real
uid) could no longer issue other unprivileged generic IP socket option
operations, such as IP_TOS, IP_TTL, and the multicast group membership
options, which prevented multicast routing daemons (and some other
tools) from operating correctly.
This change pushes the access control decision down to the granularity
of individual socket options, rather than all socket options, on raw
IP sockets. When rip_ctloutput() doesn't implement an option, it will
now pass the request directly to in_control() without an access
control check. This should restore the functionality of the generic
IP socket options for raw sockets in the above-described scenarios,
which may be confirmed with the ipsockopt regression test.
RELENG_5 candidate.
Reviewed by: csjp
Approved by: re (scottl)
date: 2004/10/11 08:11:26; author: rwatson; state: Exp; lines: +19 -5
Rework sofree() logic to take into account a possible race with accept().
Sockets in the listen queues have reference counts of 0, so if the
protocol decides to disconnect the pcb and try to free the socket, this
triggered a race with accept() wherein accept() would bump the reference
count before sofree() had removed the socket from the listen queues,
resulting in a panic in sofree() when it discovered it was freeing a
referenced socket. This might happen if a RST came in prior to accept()
on a TCP connection.
The fix is two-fold: to expand the coverage of the accept mutex earlier
in sofree() to prevent accept() from grabbing the socket after the "is it
really safe to free" tests, and to expand the logic of the "is it really
safe to free" tests to check that the refcount is still 0 (i.e., we
didn't race).
RELENG_5 candidate.
Much discussion with and work by: green
Reported by: Marc UBM Bocklet <ubm at u-boot-man dot de>
Reported by: Vlad <marchenko at gmail dot com>
Note that this fix is not yet confirmed by submitters to correct the
specific symptom they are seeing, but does correct a known problem.
Approved by: re (scottl)
Fix compiler warnings, when __stdcall is #defined, by adding explicit
casts. These normally only manifest if the ndis compat module is
statically compiled into a kernel image by way of 'options NDISAPI'.
Submitted by: Dmitri Nikulin
Approved by: wpaul
PR: kern/71449
Approved by: re (kensmith)
date: 2004/09/08 11:25:41; author: tjr; state: Exp; lines: +18 -3
Merge from NetBSD:
Fix a problem in previous: we can't blindly assume that we have
wincnt entries available at the offset the file has been found. If the dos
directory entry is not preceded by appropriate number of long name
entries (happens e.g. when the filesystem is corrupted, or when
the filename complies to DOS rules and doesn't use any long name entry),
we would overwrite random directory entries.
There are still some problems, the whole thing has to be revisited and solved
right.
Approved by: re (scottl)
Approved by: murray (mentor)
date: 2004/09/08 10:57:09; author: tjr; state: Exp; lines: +5 -0
Merge from NetBSD:
Fix a panic that occurred when trying to traverse a corrupt msdosfs
filesystem. With this particular corruption, the code in pcbmap()
would compute an offset into an array that was way out of bounds,
so check the bounds before trying to access and return an error if
the offset would be out of bounds.
Approved by: re (scottl)
Approved by: murray (mentor)
if_re.c v1.35, if_rlreg.h v1.48:
> fix jumbo frames as much as they can be fixed for re. We now cap the MTU
> to 7422 since it appears that the 8169S can't transmit anything larger..
> The 8169S can receive full jumbo frames, but we don't have an mru to let
> the upper layers know this...
>
> add fixup so that this driver should work on alignment constrained
> platforms
> (!i386 && !amd64)
re.4 v1.9 & v1.10:
> document the limit on jumbo frame size.. and bump document date
Approved by: re (scottl)
date: 2004/10/09 16:48:51; author: rwatson; state: Exp; lines: +14 -2
Acquire the send socket buffer lock around tcp_output() activities
reaching into the socket buffer. This prevents a number of potential
races, including dereferencing of sb_mb while unlocked leading to
a NULL pointer deref (how I found it). Potentially this might also
explain other "odd" TCP behavior on SMP boxes (although haven't
seen it reported).
Approved by: re (kensmith)
date: 2004/10/09 16:42:57; author: rwatson; state: Exp; lines: +1 -0
Add SOCKBUF_UNLOCK_ASSERT(), which asserts that the current thread does
not hold the mutex for a socket buffer.
This change is a dependency to merge tcp_output.c:1.103.
Approved by: re (kensmith)
Capture calls to execve() to make sure that the
signal mask is set correctly on the thread that is going to
continue in the new process. Required for Posix compliance.
This is not perfect and better fixes may happen after 5.3
is released.
Approved by: re (scottl)
amd64 and i386
- Remove unnecessary checks for curthread == NULL and pmap == NULL.
- Release the page queues lock earlier in pmap_protect() and pmap_remove()
in order to reduce contention.
- Remove an outdated assertion from _pmap_allocpte().
- Simplify the reference counting of page table pages. Specifically, use
the page table page's wired count rather than its hold count to contain
the reference count.
- Prevent the unexpected deallocation of a page table page while
performing pmap_copy().
- Eliminate the unnecessary masking of the page offset bits from the
physical address that is stored in the vm_page.
- Undo revision 1.251. This change was a performance pessimizing work-
around that is no longer required. Now, if the preexisting PTE is
invalid, pmap_enter() does not call pmap_invalidate_page() to update
the TLB(s).
- Make pte_load_store() an atomic operation in all cases, not just i386
PAE.
- Restructure pmap_enter() to prevent the loss of a page modified (PG_M)
bit in a race between processors. (This restructuring assumes the newly
atomic pte_load_store() for correct operation.)
amd64 only
- It is now an error to call pmap_unuse_pt without the paddr of the pde
that contained the pte.
- Remove an unused declaration.
i386 only
- Modify pmap_pte() to support its use on non-current, non-kernel pmaps
without holding Giant.
Approved by: re (scottl)
----------------------------
revision 1.372
date: 2004/10/07 14:51:23; author: mtm; state: Exp; lines: +0 -0
Make a note in UPDATING about the recent change regarding
the FreeBSD keyword.
=============================================================================
o Add additional information on how to cope with this change.
o Fix the date for the previous libthr change to correctly reflect
the date it was MFCed on.
Approved by: re/assumed because of approval for the actual src change
Pull ATA up to -current levels minus PC98 geometry changes:
Fix the serverworks modesetting code, of mask offset was wrong.
Always set half'n'half mode on ICH* chips.
Fix the PC98 lockups on boot.
Add SHARP to the pool of drives that doesn not need byteswapping.
Add support for the ICH6 in legacy mode.
Dont sleep with lock held.
Approved by: re@ (scottl)
Add a note to the man page warning users about possible lock order
reversals+system lock ups if they are using ucred based rules
while running with debug.mpsafenet=1.
I am working on merging a shared locking mechanism into ipfw which
should take care of this problem, but it still requires a bit more testing and review.
Approved by: re@ (hrs)
| nfsclient/nfs_bio.c has a PHOLD() without a PRELE(). Neither should
| be necessary here. Also, use killproc() instead of psignal().
Approved by: re (scottl)
| Don't PHOLD() the target process in procfs, since this is already done
| in pseudofs. Moreover, PHOLD() may block between the p_candebug()
| access check and the actual operation.
Approved by: re (scottl)
| Fix the following race:
|
| 1. Process p1 is currently being swapped in.
| 2. Process p2 calls linux_ptrace(PTRACE_GETFPXREGS, p1_pid, ...)
| 3. After acquiring a reference to FIRST_THREAD_IN_PROC(p1),
| p2 blocks in faultin() while p1 finishes being swapped in.
| This means p2 won't get back the lock on p1 until after p1's
| threads are runnable.
| 4. After p1 is swapped in, the first thread in p1 exits.
| 5. p2 now uses its dangling reference to p1's first thread.
Approved by: re (scottl)
Add a minimal altq.4 manpage to tell about the kernel options and where
to find more information. Also move the "SUPPORTED DEVICES" section from
altq.9 to altq.4, where is belongs.
Requested by: green
AND
Rename the QUEUEING section of pf.conf(5) to QUEUEING/ALTQ to make it
easier to find the appropiate section when redirected from ALTQ(4).
Approved by: re (scottl)
Fix sis, bfe and ndis in the same way dc was fixed:
Do not tell the hardware to send when there were no packets enqueued.
Found and reviewed by: green
Approved by: re (scottl)
revision 1.32
date: 2004/09/22 18:51:16; author: mtm; state: Exp; lines: +1 -14
Remove vestiges of libthr's signal mangling past. This fixes that last
known problem with mysql on libthr: not being able to kill mysqld.
----------------------------
revision 1.31
date: 2004/09/22 16:53:23; author: mtm; state: Exp; lines: +6 -27
The SUSv3 function say that the affected functions MAY FAIL, if the
specified mutex is invalid. In spec parlance 'MAY FAIL' means it's
up to the implementor. So, remove the check for NULL pointers for two
reasons:
1. A mutex may be invalid without necessarily being NULL.
2. If the pointer to the mutex is NULL core-dumping in the
vicinity of the problem is much much much better than failing
in some other part of the code (especially when the application
doesn't check the return value of the function that you oh so
helpfully set to EINVAL).
=============================================================================
Approved by: re/scottl
----------------------------
revision 1.15
date: 2004/10/08 14:48:02; author: mtm; state: Exp; lines: +1 -4
Remove a reference to a non-existent syscall: _thr_exit(). The
actual name is thr_exit(). How this ever worked is beyond me.
----------------------------
revision 1.14
date: 2004/10/06 14:20:57; author: mtm; state: Exp; lines: +2 -3
Close a race between a thread exiting and the freeing of it's stack.
After some discussion the best option seems to be to signal the thread's
death from within the kernel. This requires that thr_exit() take an
argument.
Discussed with: davidxu, deischen, marcel
MFC after: 3 days
=============================================================================
Approved by: re/scottl
date: 2004/10/07 14:13:35; author: rwatson; state: Exp; lines: +7 -4
When running with debug.mpsafenet=0, initialize IP multicast routing
callouts as non-CALLOUT_MPSAFE. Otherwise, they may trigger an
assertion regarding Giant if they enter other parts of the stack from
the callout.
MFC after: 3 days
Reported by: Dikshie < dikshie at ppk dot itb dot ac dot id >
Approved by: re (scottl)
lib/Makefile:
----------------------------
revision 1.1
date: 2004/08/19 23:41:12; author: davidxu; state: Exp;
Add AMD64 support code.
=============================================================================
RCS file: /home/ncvs/src/lib/libthr/arch/i386/i386/_setcurthread.c,v
----------------------------
revision 1.15
date: 2004/08/19 23:49:04; author: davidxu; state: Exp; lines: +10 -3
Adjust code to support AMD64, on AMD64, thread needs to set fsbase by
itself before it can execute any other code, so new thread should be
created with all signals are masked until after fsbase is set.
=============================================================================
RCS file: /home/ncvs/src/lib/Makefile,v
----------------------------
revision 1.190
date: 2004/08/19 23:51:42; author: davidxu; state: Exp; lines: +1 -2
build libthr on amd64.
=============================================================================
Approved by: re/scottl
part of a small change by davidxu that didn't exactly correspond to
a perfect MFC as it was a change to code that was removed from -current and
put back, where it was never removed from 5.x in the first place.
Approved by: re (scottl)
Allocate red zone and stack space together and then split red zone from
allocated space, orignal code left red zone unallocated, but those space
can be allocated by user code, and result was providing no protection.
Approved by: re (scottl)
Slight rearrangement of some code to get some locking
more correct
Revision Changes Path
1.204 +27 -15 src/sys/kern/kern_kse.c
Approved by: re (scottl)
Fix whitespace botch that only showed up in the commit message diff :-/
Revision Changes Path
1.134 +1 -1 src/sys/kern/sched_ule.c
Approved by: re (scottl)
When preempting a thread, put it back on the HEAD of its run queue.
(Only really implemented in 4bsd)
Revision Changes Path
1.97 +8 -6 src/sys/kern/kern_switch.c
1.67 +28 -26 src/sys/kern/sched_4bsd.c
1.133 +14 -6 src/sys/kern/sched_ule.c
1.408 +2 -0 src/sys/sys/proc.h
1.5 +1 -1 src/sys/sys/runq.h
Approved by: re (scottl)
Fix breakpoint handling for i386.
Also fixes small problems with examining some registers and
some specific gdb transfer problems.
PR: i386/71715
Submitted by: Stephan Uphoff <[email protected]>
Approved by: re (scottl)
Break out to a separate function, the code to revert a multithreaded
process back to officially being a non-threaded program.
Revision Changes Path
1.203 +1 -2 src/sys/kern/kern_kse.c
1.201 +26 -14 src/sys/kern/kern_thread.c
1.407 +1 -0 src/sys/sys/proc.h
Approved by: re (scottl)
1.254 +46 -12 src/sys/kern/kern_exec.c
1.203 +60 -23 src/sys/kern/kern_thread.c
1.409 +5 -3 src/sys/sys/proc.h
In original kern_execve() code, at the start of the function, it forces
all other threads to suicide, problem is execve() could be failed, and
a failed execve() would change threaded process to unthreaded, this side
effect is unexpected.
The new code introduces a new single threading mode SINGLE_BOUNDARY, in
the mode, all threads should suspend themself at user boundary except
the singler. we can not use SINGLE_NO_EXIT because we want to start from
a clean state if execve() is successful, suspending other threads at unknown
point and later resuming them from there and forcing them to exit at user
boundary may cause the process to start from a dirty state. If execve() is
successful, current thread upgrades to SINGLE_EXIT mode and forces other
threads to suicide at user boundary, otherwise, other threads will be resumed
and their interrupted syscall will be restarted.
Submitted by: davidxu
Approved by: re (scottl)
Close a race between thr_create and sysctl -w, the thr_scope_sys could
be changed when thr_create is running, and we tested it for several times.
Submitted by: davidxu
Approved by: re (scottl)
Note that this change does not apply to -CURRENT, because config(8)
there has been modified not to require the quoting.
Noticed by: Martin Faxer <[email protected]>
mdoc(7) advise: ru
Approved by: re (hrs)
Make pflogd cope with module unload (and the sudden disappearing of
pflog0). Instead of eating all the available CPU we now shutdown
gracefully.
Submitted by: yongari
Approved by: re (scottl)
SA-04:15, and BIND update (8.3.1->9.3.0).
Update release notes:
update a list of network interfaces which support polling(4), and
fix a typo s/lukemftp/lukemftpd/.
Approved by: re (implicitly)
"Another case where we need to guard against a partially
constructed process.
Submitted by: Stephan Uphoff ( ups at tree.com ) "
Approved by: re (scottl)
in the CPUs so they will not be chosen as the main timecounter. Because
we don't even try to keep the timers in the CPUs synchronized using them
can result in time not monotonically increasing at the whims of which CPU
the timer is checked on. On non-MP machines use a relatively high value
so the CPUs timer is more likely to be chosen as the main timecounter.
Approved by: re (scottl)
Make it possible to rebuild degraded RAID5 plexes. Note that it is
currently not possible to do this while the volume is mounted.
Correctly skip the '/dev/' part when creating new drives and prefix
a drive's provider with '/dev/' when printing the config.
Don't allow to create a drive that already exists.
Approved by: re@ (scottl)
Add a HARDWARE section which lists supported devices.
EPSON GT-8400UF(This product is same device id, 0x011f
as EPSON Perfection 1670 scanner)
Approved by: re (hrs)
>Don't bother to turn off other P_STOPPED bits for SIGKILL, doing
>so would cause kernel to produce an unkillable process in some cases,
>especially, P_STOPPED_SINGLE has a singling thread, turning off the
>bit would mess the state
Approved by: re (jhb)
Document a problem with user/group filtering. With debug.mpsafenet=1 this
might result in a deadlock. The fix involves critical changes in the PF
locking strategy (which will happen after 5.3R). For now advise users to
set debug.mpsafenet=0 if they use this kind of filtering.
Approved by: re (hrs)
Add an additional struct inpcb * argument to pfil(9) in order to enable
passing along socket information. This is required to work around a LOR
with the socket code which results in an easy reproducible hard lockup
with debug.mpsafenet=1. This commit does *not* fix the LOR, but enables us
to do so later. The missing piece is to turn the filter locking into a
leaf lock and will follow in a seperate (later) commit.
Suggested by: rwatson
A lot of work by: csjp
LOR IDs: 14 - 17 (not fixed yet)
Approved by: re (scottl)
Document this. These changes make it possible to write something like
set device "!/usr/bin/rfcomm_sppd -a BD_ADDR"
inside the /etc/ppp/ppp.conf file. Very convenient for the users :)
Submitted by: Konstantin Stepanenkov <kstepanenkov AT oilspace DOT com>
Approved by: re (scottl)
o Correct handling of SADB_UPDATE and SADB_ADD requests.
o Add missing locking for secpolicy refcnt manipulations.
o Remove extraneous SECPOLICY_LOCK_DESTROY calls.
Submitted by: Roselyn Lee
Approved by: re (scottl)
libhistory.so.4
libm.so.2
libopie.so.2
libpcap.so.2
libreadline.so.4
Update the following libraries:
libc.so.4
libc_r.so.4
libperl.so.3
These changes were made by sliding the RELENG_5 and RELENG_5_BP labels.
Approved by: re
Merge netipsec/key.c:1.17 into KAME pfkey implementation:
date: 2004/09/26 02:01:27; author: sam; state: Exp; lines: +0 -5
Correct handling of SADB_UPDATE and SADB_ADD requests. key_align may
split the mbuf due to use of m_pulldown. Discarding the result because
of this does not make sense as no subsequent code depends on the entire
msg being linearized (only the individual pieces). It's likely
something else is wrong here but for now this appears to get things back
to a working state.
Submitted by: Roselyn Lee
This change was also made in the KAME CVS repository as key.c:1.337 by
itojun.
Approved by: re
Fix typeo. Should read ***!***IFQ_DRV_IS_EMPTY.
This might fix some of the trouble around em(4) filling up its buffers.
Submitted by: mtm
This is a 5.3 TODO item.
PR: misc/72183
Approved by: re (scottl)
| Remove __isnanl() to avoid conflicting with the same function in libm.
| __isnan() and __isnanf() must remain in libc for hysterical raisins.
| On the other hand, __isnanl() must live in libm because libm uses it
| internally and can't depend on older versions of libc to provide it.
| Fortunately, we don't need __isnanl() in both libraries.
Approved by: re (scottl)
> comment requirement that rx/tx descriptor counts must be equal due to
> shared code...
> define rx descriptor count in terms of tx
> align defines
v1.47:
> fix misspelling of TX...
MFC: if_re.c: v1.32
> pass in pointer to m_head to re_encap because m_defrag could free the
> original mbuf causing a free'd mbuf passed to bpf later and panic'ing the
> system.. This should only effect jumbo frames.
v1.33:
> spell RX correctly
> don't call re_rxeof a second time when we've already done the work
> pull common code out from if and else clauses
v1.34:
> trim trailing white space..
> call the re mutex by it's name..
Approved by: re (scottl)
This includes:
1. More granular NO_BIND_* make knobs.
2. WITH_BIND_LIBS make knob.
3. Run in an automatically configured chroot dir by default.
4. Edit paths in man pages, and install man pages for liblwres.
5. Improve named.conf and make it work with the new structure.
6. Install the bind9 docs.
7. A few Makefile style fixes.
Approved by: re (scottl)
Remove the old ATA_*LOCK_CH macros that used atomic ops and use
mutexes instead.
This closes the last (known) race issues in ATA which should fix
the various hangs etc seen on heavy loaded systems.
Change from using timeout functions to using callout functions in
the timeout code. This together with above closes the race that could
happen if timeout and device interrupt occured simultaniously.
Also fix the possible recursion in ata_reinit() on very dodgy
devices that could take us down in the probe.
Approved by: re@ (scottl)
> Protect sockaddr_union definitions with a protecting define. This allows
> to build kernels with FAST_IPSEC and PF. This is the least disruptive
> fix.
>
> PR: kern/71836
> Reviewed by: bms, various mailing lists
Approved by: re (scottl)
> Switch order for mtx_unlock and cv_signal as (condvar(9)) sez:
>
> A thread must hold mp while calling cv_signal(), cv_broadcast(), or
> cv_broadcastpri() even though it isn't passed as an argument.
>
> and is right with this claim.
>
> While here remove a "\" from the macro -> __inline conversion.
>
> Found by: csjp
Approved by: re (scottl)
- Add a HARDWARE section which lists supported devices based on the
Hardware Notes.
- Update some text to fit better now that this driver support
multiple different device types.
Approved by: re (hrs)
Initialize the count of saved register windows to 0 in the pcb created
for the new thread. The rest of the fields in the pcb wind up being
written to before they're read as a normal part of the pcb usage but
this field may be read upon return to userland, having it be uninitialized
garbage is bad.
Approved by: re (scottl)
>>revision 1.15
>>date: 2004/09/20 06:12:19; author: imp; state: Exp; lines: +14 -4
>>das@ has a ACPI bios that lists 0x3f0-0x3f1, 0x3f2-0x3f3, 0x3f4-0x3f5
>>and 0x3f7. fdc_isa_alloc_resource() didn't work right in this case
>>(it accessed FDOUT correctly due to an overflow of the first resource.
>>It accesed FDSTS and FDDATA incorrectly via the second resource (which
>>wound up accessing FDOUT and the tape register at 0x3f3) and badly for
>>the CTL register (at location 0x3f4). This is a minimal fix that just
>>'eats' the first one if it covers two locations and has an offset of
>>0. This confusion lead the floppy driver to think there'd been a disk
>>change, which uncovered a deadlock in the floppy/geom code which lead
>>to a panic. These changes fix that by fixing the underlying resource
>>problem, but doesn't address the potential deadlock issue that might
>>still be there.
>>
>>This is a minimal fix so it can more safely be merged into 5 w/o risk
>>for known working configurations (hence the use of the ugly goto,
>>which reduces case 8 to case 6 w/o affecting cases 1-7). A more
>>invasive fix that will handle more ACPI resource list diversity is in
>>the pipeline that should kill these issues once and for all, while
>>staying within the resources that we allocate.
>>
>>Tested/Reported by: das
>>Reviewed by: njl
>>MFC before: re->next_release_name(5.3-BETA5);
If you get floppy hangs on boot, please try after this patch and let
me know if they are solved.
Approved by: re@ (scottl)
- Avoid race while synchronizing components. It is very hard to bump into,
but it is possible:
1. Read data from good component for synchronization.
2. Write data to the same area.
3. Write synchronization data, which are now stale.
- Decrease kern.geom.mirror.timeout to 4, so it is smaller than
vfs.root.mountdelay by default.
- Don't skip providers with 0 sectorsize.
Approved by: re (scottl)
routine, it is now forced by GEOM.
Actually, it can even cause some problems, because GEOM requires
sectorsize to be greater than 0 on first access, not on provider
creation, so we can skip valid providers by doing this check in
taste method.
Approved by: re (scottl)
Without this change, if one had a swap-on-mirror configuration, gmirror
will rebuild mirror component(s) on boot, because they are dirty (they
were open on shutdown).
Approved by: re (scottl)
- When command is not available, just say it, instead of says, that
command is unknown. Old behaviour seems to be too confusing.
Approved by: re (scottl)
device to the list. This prevents crashes on /0 errors in 'lsdev'
et al.
Submitted by: Nicko Dehaine <[email protected]>
Reviewed by: jhb@
Approved by: re@
| Don't look for swap blocks in objects that aren't swap-backed.
| I expect that this will fix the following panic, reported by Jun:
| swap_pager_isswapped: failed to locate all swap meta blocks
Approved by: re (scottl)
the CD for it. Unfortunately, not all of the KDE pieces are building yet,
and even the pieces that are there now overflow the ISO image.
Approved by: re
- Only use the desired bits in the time related registers leaving bits
with different meaning alone.
- Fix two off-by-one errors in the handling of the day of week. This
makes the date being stored in the same format Sun/Solaris uses.
- Check the state of the battery on mk48txx that support this in the
attach function.
- Add a note that use of the century bit should be implemented but isn't
required at the moment because it isn't used on sparc64.
Approved by: re (scottl)
Correct a long-standing error in _pmap_unwire_pte_hold() affecting
multiprocessors. Specifically, the error is conditioning the call to
pmap_invalidate_page() on whether the pmap is active on the current CPU.
This call must be unconditional.
Approved by: re (kensmith)
Fix a LOR where ifconf() used copyout while holding a mutex. This LOR
was seen when configuring addresses on interfaces using ifconfig. This
patch has been verified to work with over eight thousand addresses
assigned to an interface.
Approved by: re (scottl)
LOR id: 031
Bring kernel time variable and access function docs up to date by
updating the list of variables and mentioning the bin(up)time functions.
Approved by: re (kensmith)
values that must remain ustar compatible to less than this limit.
This fixes an internal assertion failure triggered by large uid/gid.
Approved by: re (Scott Long)
Move pf* init from SI_SUB_PSEUDO to SI_SUB_PROTO_IFATTACHDOMAIN where it
is save to call if_attachdomain from if_attach() (as done for if_loop.c).
We will now end up with a properly initialized if_afdata array and the nd6
callout will no longer try to deref a NULL pointer.
Still this is a temp workaround and the locking for if_afdata should be
revisited at a later point.
Requested by: rwatson
Discussed with and tested by: yongari (a while ago)
PR: kern/70393
Approved by: re (scottl)
Break out altq_enable/disable from DIOC{START,STOP}ALTQ into seprate
functions that can be called from enable/disable pf as well. This
improves switching from non-altq ruleset to altq ruleset (and the other
way 'round) by a great deal and makes pfctl act like the user would
except it to.
PR: kern/71746
Tested by: Aurilien "beorn" Rougemont (PR submitter)
Approved by: re (scottl)
Add 'hint.atkbd.0.flags="0x1"' back to /boot/device.hints on the
install media on i386 and amd64. While the current default is very
useful in server environments, the ability to use USB keyboards is
vastly more important then the ability to use PS/2 keyboards the admin
forgot to plug in during the install process.
Approved by: re (scottl)
PR: kern/71443 kern/71568 (probably others)
date: 2004/09/17 03:55:50; author: rwatson; state: Exp; lines: +2 -0
Destroy global tapmtx when the if_tap module is unloaded.
RELENG_5 candidated.
Approved by: re (scottl)
date: 2004/09/15 08:19:03; author: delphij; state: Exp; lines: +7 -1
Clear all "active partition" bits before we set a new one.
This adds a safebelt that prevents users to mark more than
one "active" partitions, which will lead to a unbootable
machine, especially in multi-boot configurations.
Approved by: re (scottl), mentor (murray)
Reorganize the "Kernel Changes" section, including:
- Add "Hardware Support" section and move device driver-related
items there.
- Move "Multimedia Support" and "Network Interface Support" into
the "Hardware Support" section as sub-sections.
- Move Netgraph-related items to "Network Protocols".
For translators: many items are moved but the contents
are not changed.
Approved by: re (implicitly)
Use atomic ops in pmap_clear_ptes() and pmap_protect() to prevent the loss
of a page modified (PG_M) bit in a race between processors.
Approved by: re (scottl)
PR: i386/61852
support to a non-instantly-crashing state.
Also includes some cosmetic changes to keep the diffs to a minimum and
an experimental option (followon) in sched_4bsd. (turned off but
included to keep diffs to a mimimum)
Approved by: re (scottl)
Do not call xl_init_locked() unconditionally when we are bringed UP. Call
it only if we weren't UP before. In some cases xl_init causes long media
re-negotiation, and ppp(8) fails to open PPPoE connection because it sets
IFF_UP every time before opening PPPoE connection.
Approved by: re (scottl)
Bring in some examples (and create space for future work here):
- Add OpenBSD example rulesets as advertised in etc/pf.conf and
pf.conf(5)
- Tweak the pointer to fit the FreeBSD default location share/examples/pf
- Account for the new directory in BSD.usr.dist (no hier(7) change
required as share/examples is an opaque item there).
Obtained from: OpenBSD
Reminded by: Thomas T. Veldhouse
PR: docs/71691
Approved by: re (scottl)
One more round on the H/W supported checksum code: Fix NICs that can't do
the pseudo header. We really need the TCP packet length here. This happens
to end up in ip->ip_len in tcp_input.c, but here we should get it from the
len function variable instead.
Submitted by: yongari
Tested by: Nicolas Linard, yongari (sparc64 + hme)
Approved by: re (scottl)
> unlock global lock in kqueue_scan before msleep'ing to prevent dead
> lock.. we didn't unlock global lock earlier to prevent just having
> to reaquire it again..
Approved by: re (scottl)
is really more of a rewrite than a set of edits, but basically the
focus is now on "how to help 4.X users switch to 5.3" rather than on
the "why users should (or should not) run 5.X". There were also a lot
of content updates, and the "source upgrade" section now includes an
annotated version of the steps from src/UPDATING.
This is a direct commit to RELENG_5 since technically it doesn't apply
to HEAD. Subsequent commits will (after testing) rename the rendered
output files on the release media and fix the document title in
sysinstall(8).
Many helpful comments were provided by reviewers via the doc and
current lists.
Approved by: re (scottl)
Reviewed by: trhodes, scottl, imp, hrs, marcus, brooks, keramida, brueffer,
Michel TALON < talon at lpthe dot jussieu dot fr >,
Len Zettel < zettel at acm dot org >
Currently when ipfw(8) generates the micro-instructions for rules which
contain O_UID, O_GID and O_JAIL opcodes, the F_NOT or F_OR logical
operator bits get clobbered. Making it impossible to use the ``NOT'' or
``OR'' operators with uid, gid and jail based constraints.
The ipfw_insn instruction template contains a ``len'' element which
stores two pieces of information, the size of the instruction
(in 32-bit words) in the low 6 bits of "len" with the 2 remaining
bits to implement OR and NOT.
The current code clobbers the OR and NOT bits by initializing the
``len'' element to the size, rather than OR'ing the bits. This change
fixes this by changing the initialization of cmd->len to an OR operation
for the O_UID, O_GID and O_JAIL opcodes.
Approved by: re@ (scottl)
PR: kern/63961 (partially)
- Auto generate device listings for the ubsa(4), ubser(4), uftdi(4),
and uplcom(4) drivers.
- Auto generate device listing for the uvisor driver.
- Auto generate device listings for the fwohci(4), hifh(4), safe(4),
and ubsec(4) drivers.
Approved by: re (blanket)
- Add a HARDWARE section which lists supported devices based on the
FreeBSD Hardware Notes, source code and cvs comments from
FreeBSD and NetBSD.
- Update page title and DESCRIPTION section to reflect the fact that
this driver supports much more than Handspring Visor now.
Approved by: re (blanket)
- Auto generate device listings for the following drivers: snd_ad1816,
snd_cmi, snd_cs4281, snd_ds1, snd_emu10k1, snd_es137x, and snd_solo.
- Add vge(4) to the Hardware Notes.
- Add snd_csa(4) and snd_gusc(4).
- Add ubser(4).
- Auto generate device listing for the uvisor driver.
- Add fwohci, hifn, safe, sbp, and ubsec.
- note ia64 support for several drivers.
Approved by: re (blanket)
- autogenerate device listings for em(4) and gx(4)
- fix an entity
- autogenerate device listings for lnc(4), ng_ubt(4) and pcn(4)
Approved by: re (blanket)
Change sb_lock() calls to sbc_lockassert() and remove the sb_unlock()
calls in sb_cmd2() and sb_getmixer(). The lock has already be grabbed
before these functions are called.
PR: 71189
Submitted by: stephane
Approved by: re (scottl)
- note ia64 support for several drivers
- remove drivers that work on all supported architectures
- add lnc(4), ng_ubt(4) and pcn(4)
Approved by: re (blanket)
----------------------------
revision 1.24
date: 2004/08/28 14:32:10; author: mtm; state: Exp; lines: +2 -1
Also, match the full path to the special nologin shell.
Previously, it would recognize it as a valid shell only
if the basename (nologin) was specified. Now, it will
recognize both the basename and the full path.
NOTE: The full path as adduser(8) understands it is /usr/sbin/nologin.
There is a symlink, /sbin/nologin, but that's deprecated and
only there for backwards compatibility.
=============================================================================
Approved by: re (scottl)
On a system with huge number of pipes, M_NOWAIT failes almost always,
because of memory fragmentation.
My fix is different than the patch proposed by Pawel Malachowski,
because in FreeBSD 5.x we cannot sleep while holding dummynet mutex
(in 4.x there is no such lock).
PR: kern/46557
Submitted by: Eugene Grosbein <[email protected]>
Reviewed by: mlaier
Approved by: re (scottl)
- Make kern.geom.raid3.debug sysctl tunable.
- Add warnings.
- Bump version number and add version history.
- Don't handle spoiling for synchronization geom.
- Skip providers with 0 sectorsize.
Approved by: re (scottl)
> Convert sndstat_lock from a mutex to an sx lock. sndstat_read()
> holds sndstat_lock across a call to uiomove(), which is not legal
> to do with a mutex because of the possibility that the data transfer
> could sleep because of a page fault. It is not possible to just
> unlock the mutex for the uiomove() call without introducing another
> locking mechanism to prevent the body of sndstat_read() from being
> re-entered. Converting sndstat_lock to an sx lock is the least
> complicated change.
LOR: 030
Approved by: re (scottl)
Fix an datatype issue which could result in key-sectors being
overwritten if less than the full complement of keys (4) were
configured.
Approved by: re:scottl
> remove XXX comment now that the kernel is fixed, there isn't any obvious
> reason to enable this as performance didn't significantly change...
Approved by: re (kensmith)
> make witness it's own sysctl branch instead of using _ to do this. I have
> left the old tunables in to give people a few days to transition their
> loader.conf and sysctl.conf's over to the new names..
MFC: witness.4 1.6, UPDATING 1.356
> document the recent change to debug.witness.*
> fix spelling of debug.witness.kdb
Approved by: re (kensmith)
kern_event.c: v1.80, if.c: v1.205
> don't call f_detach if the filter has alread removed the knote.. This
> happens when a proc exits, but needs to inform the user that this has
> happened.. This also means we can remove the check for detached from
> proc and sig f_detach functions as this is doing in kqueue now...
kern_event.c: v1.81
> remove giant required from kqueue_close..
Approved by: re (kensmith, scottl)
0xffffffff sectors. Document this limit and avoid installing bogus
labels on disks with more sectors (by refusing to install one at all).
Approved by: re (scottl)
> add support for documented readonly option...
> also print out the option that is unknow so that the user knows what (s)he
> did wrong..
Approved by: re (kensmith)
> merge in if_rl locking because if_re was originally based upon if_rl.
> This essentially merges revs 1.143-1.1445 of sys/pci/if_rl.c.
> This now marks the interrupt MPSAFE along with making the mutex
> non-recursive.
Approved by: re (kensmith)
date: 2004/09/09 04:11:12; author: rwatson; state: Exp; lines: +20 -11
Reformulate bpf_dettachd() to acquire the BIF_LOCK() as well as
BPFD_LOCK() when removing a descriptor from an interface descriptor
list. Hold both over the operation, and do a better job at
maintaining the invariant that you can't find partially connected
descriptors on an active interface descriptor list.
This appears to close a race that resulted in the kernel performing
a NULL pointer dereference when BPF sessions are detached during
heavy network activity on SMP systems.
RELENG_5 candidate.
date: 2004/09/09 00:19:27; author: rwatson; state: Exp; lines: +20 -35
date: 2004/09/09 00:19:27; author: rwatson; state: Exp; lines: +4 -3
Reformulate use of linked lists in 'struct bpf_d' and 'struct bpf_if'
to use queue(3) list macros rather than hand-crafted lists. While
here, move to doubly linked lists to eliminate iterating lists in
order to remove entries. This change simplifies and clarifies the
list logic in the BPF descriptor code as a first step towards revising
the locking strategy.
RELENG_5 candidate.
Reviewed by: fenner
date: 2004/09/09 00:11:50; author: rwatson; state: Exp; lines: +3 -3
Compare/set pointers using NULL not 0.
Approved by: re (scottl)
revision 1.19
date: 2004/09/10 05:00:27; author: marcel; state: Exp; lines: +14 -62
The previous commit, roughly one and a half years ago removed the
branch prediction optimization for LINT, because the kernel was too
large. This commit now removes it altogether since it causes build
failures for GENERIC kernels and the various applicable trends are
such that one can expect that it these failure will cause more
problems than they're worth in the future. These trends include:
1. Alpha was demoted from tier 1 to tier 2 due to lack of active
support. The number of people willing to fix build breakages
is not likely to increase and those developers that do have the
gumption to test MI changes on alpha are not likely to spend
time fixing unexpected build failures first.
2. The kernel will only increase in size. Even though stripped-down
kernels do link without problems now, compiler optimizations (like
inlining) and new (non-optional) functionality will likely cause
stripped-down kernels to break in the future as well.
So, with my asbestos suit on, get rid of potential problems before
they happen.
Approved by: re (scottl)
Don't rely on properly setup linker.hints to figure out that pflog is now
part of the pf module.
While here fix a comment that was c'n'ped from rc.d/pf
PR: bin/71096 (partly)
Submitted by: Ville-Pertti Keinonen
Approved by: re (kensmith)
Make pflogd(8) store pcap_sf_pkthdr instead of MD timeval contaminated
pcap_pkthdr. This makes /var/log/pflog standart compliant on 64bit archs.
OpenBSD has fixed this by changing the bpf timeval to 32bit in the kernel,
so no need to report this over (again).
PR: bin/71096 (w/ changes)
Submitted by: Ville-Pertti Keinonen
Tested by: amd64(submitter), sparc64(yongari), i386(myself)
Approved by: re (kensmith)
For removable devices without media we set a zero mediasize but a non-zero
sectorsize in order to avoid a lot of checks around various divisions etc.
Enforce the sectorsize being > 0 with a KASSERT on successful open.
Fix scsi_cd.c to return 2k sectors when no media inserted.
Approved by: re::kensmith
Better fix the busdma problem exposed by ATA. With the CMD 646 for
example the maximum segment size is 64K while the boundary is set
to 8K due to controller limitations. It is impossible to NOT cross
the boundary for any segment size that's larger than the boundary.
So, once we inherited the boundary from the parent tag, make sure
to reduce the maximum segment size to the boundary if it was larger.
Work done by: marcel
Approved by: re (scottl) [ Sooner than normal, needed for BETA4... ]
Fix an assertion when if_down()ing a ALTQ managed interface. The lock
should have been in place all the time the mtx_assert in the ALTQ code
just discovered the shortcoming.
PR: i386/71195
Tested by: Bettan (PR originator), myself
Approved by: re (scottl)
it panics systems on boot remove it from GENERIC so that tga(4)
equipped systems can get installed with 5.3.
This needs documenting in the 5.3 release notes.
Discussed with: marcel, -alpha@
Approved by: re (scottl)
Increase PPTP_MAX_TIMEOUT up to 3 seconds. 10 proved too much for high
packet
loss links, and 1 second appeared to be too small for high latency links.
Approved by: re (scottl)
should be checked only after the full header is read, including any
extensions; otherwise regular files in GNU tar archives with '/' as the
100th char get treated as directories.
Approved by: re@ (Ken Smith)
hack that hardcoded setting "hw.ata.ata_dma=0" because of DMA issues
on sparc64. A fix is being done to bus_machdep.c that makes this
unnecessary now.
Approved by: re (scottl)
- Auto generate device listings for the following drivers: cp, ct,
ctau, uhci.
- Remove listing for NCR5380/NCR53400 and UltraStor 14F/24F/3F4;
the drivers were removed over 5 years ago.
- Note that WD7000 is supported by the wds(4) driver and move it
to the generic SCSI section, since it was converted to CAM some time ago.
- Remove section about non-CAM drivers, since there are none left in
the section.
Approved by: re (blanket)
1.155:
Fix a typo in a variable name.
1.156:
Avoid double appearing of cloned interfaces in the output
from list_net_interfaces() when network_interfaces=auto.
Approved by: re (kensmith)
Give libthr a choice (per system) of scope_system or scope_thread
scheduling.
Revision Changes Path
1.26 +37 -10 src/sys/kern/kern_thr.c
Approved by: re (scottl)
Don't do IPIs on behalf of interrupt threads.
just punt straight on through to the preemption code.
Make a KASSSERT out of a condition that can no longer occur.
Approved by: re (scottl)
Refactor a bunch of scheduler code to give basically the same behaviour
but with slightly cleaned up interfaces.
(2004-09-05 02:09:54 UTC)
see version 1.16 of sched.h for the original commit message.
Approved by: re (scottl)
Give setrunqueue() and sched_add() more of a clue as to
where they are coming from and what is expected from them.
( 2004-09-01 02:11:28 UTC )
Approved by: re (scottl)
code. Replace it with a friendly paragraph about how the debugging code
was disabled recently.
Submitted by: Xin Li (who really is in dire need of a commit bit!)
Approved by: re
date: 2004/09/05 17:27:54; author: rwatson; state: Exp; lines: +1 -0
Call callout_init() on nd6_slowtimo_ch before setting it going; otherwise,
the flags field will be improperly initialized resulting in inconsistent
operation (sometimes with Giant, sometimes without, et al).
RELENG_5 candidate.
Approved by: re (scottl)
date: 2004/09/05 14:33:21; author: rwatson; state: Exp; lines: +4 -4
Expand the scope of the socket buffer locks in sopoll() to include the
state test as well as set, or we risk a race between a socket wakeup
and registering for select() or poll() on the socket. This does
increase the cost of the poll operation, but can probably be optimized
some in the future.
This appears to correct poll() "wedges" experienced with X11 on SMP
systems with highly interactive applications, and might affect a plethora
of other select() driven applications.
RELENG_5 candidate.
Problem reported by: Maxim Maximov <mcsi at mcsi dot pp dot ru>
Debugged with help of: dwhite
Approved by: re (scottl)
When an USB keyboard is plugged in to a machine with a builtin
keyboard, cause the USB keyboard to take over from the builtin one.
Approved by: re (scottl)
PR: kern/71354 (partial workaround only)
Use a spare byte in struct if_data to store the structure size without
increasing it. Add code to ifconfig to use this size to find the
sockaddr_dl after the struct if_data in the routing message. This
allows struct if_data to grow (up to 255 bytes) without breaking
ifconfig.
Approved by: re (scottl)
date: 2004/09/02 19:53:13; author: rwatson; state: Exp; lines: +3 -3
In FreeBSD 5.x, curthread is always defined, so we don't need to to test
and optionally use &thread0 if it's NULL.
Spotted by: julian
Approved by: re (scottl)
- Properly capitalize Ethernet.
- Add a HARDWARE section which lists supported devices.
- Add a standard 2 clause BSD license.
Approved by: re (blanket)
Do not display bogus entries for sockets in the TIME_WAIT or similar
states that no longer have a corresponding file descriptor - until now,
sockstat would mostly randomly match null kern.file.*.xf_data fields
with the first mostly-closed socket.
Approved by: re (rwatson)
with 'log' keyword but without 'logamount' limit the amount of their
log messages by net.inet.ip.fw.verbose_limit sysctl value.
Approved by: re (scottl)
- move list of supported devices into a HARDWARE section
- mention which chip the devices use (where known)
- bump document date
Approved by: re (blanket)
- replace the ERRORS section with a DIAGNOSTICS section
- move list of supported adapters into a HARDWARE section
- sort the device list
- some minor fixes
Approved by: re (blanket)
date: 2004/09/02 16:04:09; author: rwatson; state: Exp; lines: +0 -11
Back out pseudo_vnops.c:1.45, which was a workaround for pfind()
returning incompletely initialized processes. This problem was
eliminated by kern_proc.c:1.215, which causes pfind() not to
return processes in the PRS_NEW state.
Approved by: re (scottl)
date: 2004/09/02 20:14:03; author: rwatson; state: Exp; lines: +0 -22
The KAME IPSEC implementation at one point used its own pseudo-random
number generator, which was re-seeded via a timeout. Now centralized
randomness/entropy is used, we can garbage collect the timeout and
re-seeding code (which was largely a no-op).
Discussed with: itojun, suz, JINMEI Tatuya < jinmei at isl dot rdc dot
toshiba dot co dot jp >
Approved by: re (scottl)
Fix the handling of "inflight" requests when doing reinit's.
Always pick up giant before returning from an ioctl call.
Sii_reset needs to wait up to 1 second to get slow disks with it.
Set and reset the right bit for UDMA enable/disable on the ICH* chips.
Only call dmainit() if there is a valid busmaster resource.
Workaround devices that responds with registers as *both* master & slave.
Introduce ata_udelay() that uses tsleep instead of DELAY if possible.
Properly check malloc returns.
Approved by: re@
date: 2004/09/03 03:19:14; author: rwatson; state: Exp; lines: +2 -0
Tag AIO as requiring Giant over the network stack using
NET_NEEDS_GIANT().
RELENG_5 candidate.
Approved by: re (scottl)
date: 2004/09/03 23:26:55; author: stefanf; state: Exp; lines: +1 -1
Embarrassing typo: s/nextbyint/nearbyint/
date: 2004/09/03 23:31:28; author: stefanf; state: Exp; lines: +4 -4
Use the keyword '_Complex' rather than the macro 'complex' since
applications are allowed to undefine the latter.
date: 2004/09/03 23:44:09; author: stefanf; state: Exp; lines: +2 -1
Add a workaround to recognise I/_Complex_I as complex arguments. Although
the GCC manual claims that the expression 1.0fi has type float _Complex,
__builtin_types_compatible_p(float _Complex, __typeof__(1.0fi))) yields 0.
Approved by: re (scottl)
- move list of supported adapters into a HARDWARE section
- list the Digital EtherWORKS adapter as supported [1]
- properly capitalize (Fast|Gigabit) Ethernet
- bump document date
Obtained from: NetBSD [1]
Approved by: re (blanket)
- Add &release.manpath.xorg;.
- Bump &release.manpath.xfree86;.
- Bump &release.manpath.freebsd;.
- Fix a mail address in ($email-footer$).
Approved by: re (implicitly)
- Auto generate device listing for ath(4).
- Remove the listing for the Seagate ST01/02 and the Future Domain
8xx/950 SCSI controllers.
Approved by: re (blanket)
- Add a HARDWARE section which lists supported devices.
- Mark up each item in the device list with .It, as per mdoc(7) and to
make it simpler for auto generated Hardware Notes to parse the manual
page.
- Bump document date.
Approved by: re (blanket)
- Support column lists, by only extracting the first column.
- s/_/./g for an entity name.
- For column lists: ignore first item when it is likely to be a header.
- Clean up and improve handling of trailing punctuation characters.
- Handle the Pa macro.
- Give a warning when ignoring unimplemented mdoc commands.
- Improve handling of trailing punctuation characters for the Xr macro.
Approved by: re (blanket)
> Remove an unneeded argument..
> The removed argument could trivially be derived from the remaining one.
> That in turn should be the same as curthread, but it is possible that
> curthread could be expensive to derive on some systems so leave it as an
> argument.
> Having both proc and thread as an argument just gives an opportunity for
> them to get out sync.
>
>
> Revision Changes Path
> 1.120 +1 -1 src/sys/alpha/alpha/trap.c
> 1.281 +2 -2 src/sys/amd64/amd64/trap.c
> 1.269 +2 -2 src/sys/i386/i386/trap.c
> 1.105 +1 -1 src/sys/ia64/ia64/trap.c
> 1.197 +2 -2 src/sys/kern/kern_kse.c
> 1.290 +1 -1 src/sys/kern/kern_sig.c
> 1.272 +1 -1 src/sys/kern/subr_trap.c
> 1.49 +1 -1 src/sys/powerpc/powerpc/trap.c
> 1.72 +1 -1 src/sys/sparc64/sparc64/trap.c
> 1.395 +1 -1 src/sys/sys/proc.h
Remove TDP_USTATCLOCK, we no longer need it because we now always
update tick count for userland in thread_userret. This change
also removes a "no upcall owned" panic because fuword() schedules
an upcall under heavily loaded, and code assumes there is no upcall
can occur.
Reported and Tested by: Peter Holm <[email protected]>
Revision Changes Path
1.198 +30 -55 src/sys/kern/kern_kse.c
1.396 +0 -1 src/sys/sys/proc.h
----
Note free bit.. as per the flags word.
MFC after: 2 days
Revision Changes Path
1.397 +1 -0 src/sys/sys/proc.h
Approved by: re (scottl)
> Remove sched_free_thread() which was only used
> in diagnostics. It has outlived its usefulness and has started
> causing panics for people who turn on DIAGNOSTIC, in what is otherwise
> good code.
>
> MFC after: 2 days
>
> Revision Changes Path
> 1.119 +0 -6 src/sys/alpha/alpha/trap.c
> 1.280 +0 -6 src/sys/amd64/amd64/trap.c
> 1.7 +0 -3 src/sys/amd64/ia32/ia32_syscall.c
> 1.268 +0 -6 src/sys/i386/i386/trap.c
> 1.104 +0 -10 src/sys/ia64/ia64/trap.c
> 1.235 +0 -3 src/sys/kern/kern_fork.c
> 1.188 +0 -13 src/sys/kern/kern_prot.c
> 1.271 +0 -3 src/sys/kern/subr_trap.c
> 1.48 +0 -3 src/sys/powerpc/powerpc/trap.c
> 1.71 +0 -6 src/sys/sparc64/sparc64/trap.c
> 1.50 +0 -3 src/sys/sys/ucred.h
Approved by: re (scottl)
> Only test return_instead if P_SINGLE_EXIT is set, otherwise a fork()
> syscall can interrupt other thread's syscall in sleepq_catch_signals().
> Current, all callers know thread_suspend_check may suspend thread
> itself, so we need't to check return_instead for normal suspension
> flags (no P_SINGLE_EXIT set).
>
> Tested by: deischen
> Reported by: Maarten L. Hekkelman <[email protected]>
>
> Revision Changes Path
> 1.195 +1 -1 src/sys/kern/kern_thread.c
Approved by: re (scottl)
> Move TDF_CAN_UNBIND to thread private flags td_pflags, this eliminates
> need of sched_lock in some places. Also in thread_userret, remove
> spare thread allocation code, it is already done in thread_user_enter.
> Reviewed by: julian
> Revision Changes Path
> 1.195 +4 -19 src/sys/kern/kern_kse.c
> 1.394 +3 -4 src/sys/sys/proc.h
>
Approved by: re (scottl)
date: 2004/08/28 17:08:30; author: rwatson; state: Exp; lines: +13 -0
Add an updating entry for the recent change in network stack locking
default for debug.mpsafenet, pointing at the recent announcement and
things to try if instability is experienced.
Approved by: re (scottl)
sys/netipx/ipx.c:1.27 to RELENG_5:
Mark Netgraph TTY, KAME IPSEC, and IPX/SPX as requiring Giant for correct
operation using NET_NEEDS_GIANT(). This will result in a boot-time
restoration of Giant-enabled network operation, or run-time warning on
dynamic load (applicable only to the Netgraph component). Additional
components will likely need to be marked with this in the future.
Approved by: re (scottl, kensmith)
sys/sys/kernel.h:1.118 to RELENG_5:
Change the default disposition of debug.mpsafenet from 0 to 1, which
will cause the network stack to operate without the Giant lock by
default. This change has the potential to improve performance by
increasing parallelism and decreasing latency in network processing.
Due to the potential exposure of existing or new bugs, the following
compatibility functionality is maintained:
- It is still possible to disable Giant-free operation by setting
debug.mpsafenet to 0 in loader.conf.
- Add "options NET_WITH_GIANT", which will restore the default value of
debug.mpsafenet to 0, and is intended for use on systems compiled with
known unsafe components, or where a more conservative configuration is
desired.
- Add a new declaration, NET_NEEDS_GIANT("componentname"), which permits
kernel components to declare dependence on Giant over the network
stack. If the declaration is made by a preloaded module or a compiled
in component, the disposition of debug.mpsafenet will be set to 0 and
a warning concerning performance degraded operation printed to the
console. If it is declared by a loadable kernel module after boot, a
warning is displayed but the disposition cannot be changed. This is
implemented by defining a new SYSINIT() value, SI_SUB_SETTINGS, which
is intended for the processing of configuration choices after tunables
are read in and the console is available to generate errors, but
before much else gets going.
This compatibility behavior will go away when we've finished the last
of the locking work and are confident that operation is correct.
Approved by: re (scottl, kensmith)
date: 2004/09/02 20:18:02; author: rwatson; state: Exp; lines: +1 -1
Unlock rather than lock the ripcbinfo lock at the end of rip6_input().
RELENG_5 candidate.
Foot provided by: Patrick Guelat <pg at imp dot ch>
Approved by: re (scottl) (accelerated schedule for BETA3)
if_wb.c:1.74 to RELENG_5:
Tag a last set of PCI network interfaces as IFF_NEEDSGIANT until they
are either locked down or demonstrated MPSAFE.
Approved by: re (scottl)
anything else.)
When creating a new md, g_waitidle() to make sure the /dev entry gets
created before mdconfig(8) returns, *but only if it's not a preloaded
md*.
Approved by: re (kensmith)
date: 2004/08/30 14:41:25; author: rwatson; state: Exp; lines: +2 -0
Acquire Giant arounds calls into the linker from Netgraph sockets.
We now no longer hold Giant in send(), so it isn't inheritted by the
linker, which calls into VFS.
Reported by: glebius
Discussed with: glebius, bz
Approved by: re (kensmith)
When a prison is given the ability to create raw sockets (when the
security.jail.allow_raw_sockets sysctl MIB is set to 1) where privileged
access to jails is given out, it is possible for prison root to manipulate
various network parameters which effect the host environment. This commit
plugs a number of security holes associated with the use of raw sockets
and prisons.
This commit makes the following changes:
- Add a comment to rtioctl warning developers that if they add
any ioctl commands, they should use super-user checks where necessary,
as it is possible for PRISON root to make it this far in execution.
- Add super-user checks for the execution of the SIOCGETVIFCNT
and SIOCGETSGCNT IP multicast ioctl commands.
- Add a super-user check to rip_ctloutput(). If the calling cred
is PRISON root, make sure the socket option name is IP_HDRINCL,
otherwise deny the request.
Although this patch corrects a number of security problems associated
with raw sockets and prisons, the warning in jail(8) should still
apply, and by default we should keep the default value of
security.jail.allow_raw_sockets MIB to 0 (or disabled) until
we are certain that we have tracked down all the problems.
Looking forward, we will probably want to eliminate the
references to curthread.
Approved by: re (kensmith)
MFC netinet/raw_ip.c v1.143
When a prison is given the ability to create raw sockets (when the
security.jail.allow_raw_sockets sysctl MIB is set to 1) where privileged
access to jails is given out, it is possible for prison root to manipulate
various network parameters which effect the host environment. This commit
plugs a number of security holes associated with the use of raw sockets
and prisons.
This commit makes the following changes:
- Add a comment to rtioctl warning developers that if they add
any ioctl commands, they should use super-user checks where necessary,
as it is possible for PRISON root to make it this far in execution.
- Add super-user checks for the execution of the SIOCGETVIFCNT
and SIOCGETSGCNT IP multicast ioctl commands.
- Add a super-user check to rip_ctloutput(). If the calling cred
is PRISON root, make sure the socket option name is IP_HDRINCL,
otherwise deny the request.
Although this patch corrects a number of security problems associated
with raw sockets and prisons, the warning in jail(8) should still
apply, and by default we should keep the default value of
security.jail.allow_raw_sockets MIB to 0 (or disabled) until
we are certain that we have tracked down all the problems.
Looking forward, we will probably want to eliminate the
references to curthread.
Approved by: re (kensmith)
Do not match TGA2 adapters. They are not compatible with TGA adapters,
nor are they 3D accelarators as the description would like us to
believe. Since the TGA2 adapter has a VGA mode (unlike the TGA adapter),
one can use the VGA driver instead.
Remove redundant _FBSDID.
Approved by: re (scottl)
In alpha_pci_alloc_resource(), when allocating a memory resource,
do not set the virtual address to the bus address when the bus
doesn't have either of the PCI_RF_DENSE or PCI_RF_BWX flags set.
The TGA driver uses the virtual address to access the registers,
which on some machines can cause a memory management fault. Map
the bus address as K0SEG virtual memory instead. Note that with
some hardware combinations involving the TGA2 adapter this change
merely results that the memory management fault is replaced by a
machine check.
Approved by: re (scottl)
date: 2004/08/25 21:24:36; author: rwatson; state: Exp; lines: +15 -8
Don't hold the UNIX domain socket subsystem lock over the body of the
UNIX domain socket garbage collection implementation, as that risks
holding the mutex over potentially sleeping operations (as well as
introducing some nasty lock order issues, etc). unp_gc() will hold
the lock long enough to do necessary deferal checks and set that it's
running, but then release it until it needs to reset the gc state.
Discussed with: alfred
Approved by: re (kensmith)
Currently, if the secure level is low enough, system flags can
be manipulated by prison root. In 4.x prison root can not manipulate
system flags, regardless of the security level. This behavior
should remain consistent to avoid any surprises which could lead
to security problems for system administrators which give out
privileged access to jails.
This commit changes suser_cred's flag argument from SUSER_ALLOWJAIL
to 0. This will prevent prison root from being able to manipulate
system flags on files.
Approved by: re (kensmith)
Introduce g_alloc_bio() as a waiting variant of g_new_bio().
Use in places where we can sleep and where we previously
failed to check for a NULL pointer.
Approved by: re(ken)
sysresource objects before allocating. This includes adding a
bus_get_resource_list() method to all archs as well. Includes:
Revision Changes Path
1.189 +82 -7 src/sys/dev/acpica/acpi.c
1.31 +59 -115 src/sys/dev/acpica/acpi_resource.c
1.81 +0 -2 src/sys/dev/acpica/acpivar.h
Approved by: re (scottl)
- move the list of supported adapters into a HARDWARE section
- sort the list of adapters
- add the 3Com 3c460 HomeConnect Ethernet USB Adapter [1]
- properly capitalize Ethernet
- replace a misleading 'adapter' with 'chipset'
- bump document date
Obtained from: NetBSD [1]
Approved by: re (blanket)
- move the list of supported adapters into a HARDWARE section
- properly capitalize Ethernet
- replace a misleading 'adapter' with 'chipset'
- bump document date
Approved by: re (blanket)
- put the list of supported adapters into a HARDWARE section
- make the Buffalo entry look better
- properly capitalize Ethernet and Fast Ethernet
- bump document date
Approved by: re (blanket)
1.8:
- move device listing and hardware notes into a HARDWARE section
- properly capitalize Gigabit Ethernet
- bump document date
1.9:
Move a paragraph from the HARDWARE section back into the
DESCRIPTION section. Also adapt it to make it fit in better.
Approved by: re (blanket)
- move the list of supported adapters to a HARDWARE section
- correct entry for the Belkin card
- properly capitalize Gigabit Ethernet
- wordsmithing on a sentence
- bump document date
Approved by: re (blanket)
- move list of supported adapters into a HARDWARE section
- correctly capitalize Fast Ethernet
- correct two typos
- correct the link to the AIC-6915 programmer's manual
- bump document date
Approved by: re (blanket)
date: 2004/08/25 16:52:59; author: rwatson; state: Exp; lines: +1 -1
Convert a mtx_lock(&Giant) to a mtx_unlock(&Giant) in nfsrv_link() to
prevent leakage of Giant. With INVARIANTS, this results in an
assertion failure following execution of the RPC. Without INVARIANTS,
it could result in problems if the NFS server is killed causing nfsd
to return to user space holding Giant.
Feet provided by: brueffer
Approved by: re (scottl)
date: 2004/08/25 01:23:38; author: rwatson; state: Exp; lines: +2 -4
In nfs_timer(), pass curthread rather than &thread0 into the protocol
send routine. In IPv6 UDP, the thread will be passed to suser(), which
asserts that if a thread is used for a super user check, it be
curthread. Many of these protocol entry points probably need to
accept credentials instead of threads.
MT5 candidate.
Noticed/tested by: kuriyama
Approved by: re (scottl)
- Now that I discovered that 164SX SRM recognises Intel 8255x NICs and allows
them to be net booted lets document that fact.
- Note that Adaptec 3940UW won't be recognised by the 164sx SRM
- Warn that 164SX is a picky customer with regards to DIMMs.
Approved by: re (kensmith)
date: 2004/08/24 05:28:18; author: rwatson; state: Exp; lines: +16 -35
Conditional acquisition of socket buffer mutexes when testing socket
buffers with kqueue filters is no longer required: the kqueue framework
will guarantee that the mutex is held on entering the filter, either
due to a call from the socket code already holding the mutex, or by
explicitly acquiring it. This removes the last of the conditional
socket locking.
Approved by: re (scottl)
revision 1.165
date: 2004/08/22 01:32:48; author: rwatson; state: Exp; lines: +3 -1
When sliding the m_data pointer forward, update m_pktrhdr.len as well
as m_len, or the pkthdr length will be inconsistent with the actual
length of data in the mbuf chain. The symptom of this occuring was
"out of data" warnings from in_cksum_skip() on large UDP packets sent
via the loopback interface.
revision 1.164
date: 2004/08/21 16:14:04; author: rwatson; state: Exp; lines: +7 -4
When prepending space onto outgoing UDP datagram payloads to hold the
UDP/IP header, make sure that space is also allocated for the link
layer header. If an mbuf must be allocated to hold the UDP/IP header
(very likely), then this will avoid an additional mbuf allocation at
the link layer. This trick is also used by TCP and other protocols to
avoid extra calls to the mbuf allocator in the ethernet (and related)
output routines.
Approved by: re (Scottl)
> Don't bother calling the module event handlers from module_shutdown()
> in the shutdown_final state if the RB_NOSYNC flag is set.
>
> The specific motivation in this case is that a system panic in an
> interrupt context results in a call to module_shutdown(), which
> calls g_modevent(), which calls g_malloc(..., M_WAITOK), which
> results in a second panic. While g_modevent() could be fixed to
> not call malloc() for MOD_SHUTDOWN events (which it doesn't handle
> in any case), it is probably also a good idea to entirely skip the
> execution of the module shutdown handlers after a panic.
Approved by: re (kensmith)
> Don't attempt to trigger the syncer thread final sync code in the
> shutdown_pre_sync state if the RB_NOSYNC flag is set. This is the
> likely cause of hangs after a system panic that are keeping crash
> dumps from being done.
Approved by: re (kensmith)
Document supported devices here (for lack of a better place). Users
interested in ALTQ are likely to type in "man altq" at some point and
maybe they will scroll down to the bottom as well.
Approved by: re (hrs)
Fix securelevel handling for tables:
Loopback a fix from Cedric Berger:
Fix table add/replace commands with securelevel=2.
Reported by James J. Lippard.
and
Use securelevel_gt instead of reading global securelevel unprotected.
Approved by: re (kensmith)
mdconfig returning before the device's name appears in /dev but it seems
to cause a worse problem. When booting the installation media (CD or
boot floppies) the system hangs after the device probes, at the point
it should be trying to mount a MD-based filesystem as its root filesystem.
Backing out this patch solves that problem, allowing it to proceed to
the sysinstall menu.
Approved by: re (rwatson)
Remove in6_prefix.[ch] and the contained router renumbering capability.
The prefix management code currently resides in nd6, leaving only the
unused router renumbering capability in the in6_prefix files. Removing
it will make it easier for us to provide locking for the remainder of
IPv6 by reducing the number of objects requiring synchronized access.
This functionality has also been removed from NetBSD and OpenBSD.
Submitted by: George Neville-Neil <gnn at neville-neil.com>
Discussed with/approved by: suz, keiichi at kame.net, core at kame.net
Revision Changes Path
1.944 +0 -1 src/sys/conf/files
1.48 +0 -7 src/sys/netinet6/in6.c
1.24 +0 -3 src/sys/netinet6/in6_ifattach.c
1.11 +0 -1199 src/sys/netinet6/in6_prefix.c (dead)
1.6 +0 -91 src/sys/netinet6/in6_prefix.h (dead)
1.30 +0 -1 src/sys/netinet6/in6_proto.c
1.76 +0 -5 src/sys/netinet6/ip6_input.c
1.44 +0 -21 src/sys/netinet6/nd6.c
Approved by: re (scottl)
5.3 seems the last change to get this in before we freeze the ABI
for a while.
MFC'd from:
> 1.345 +7 -0 src/UPDATING
> 1.6 +1 -6 src/sys/netgraph/bluetooth/include/ng_btsocket.h
> 1.44 +1 -1 src/sys/netgraph/netgraph.h
> 1.24 +5 -3 src/sys/netgraph/ng_message.h
Submitted by: jdp, emax
Approved by: re (scottl)
Pass a correct lowaddr to bus_dma_tag_create(), lnc(4) cards can only
deal with 24-bit addresses. While the two other attachments, namely
isa and cbus, do it properly, the PCI attachment was passing
BUS_SPACE_MAXADDR instead of BUS_SPACE_MAXADDR_24BIT. This bug
became apparent with the new contigmalloc() code.
This fixes the problem reported with lnc(4) interfaces inside VMWare,
and should theoritically also fix any user of a PCI lnc(4) card. It
is a RELENG_5 MFC candidate.
Approved by: re@
date: 2004/08/22 15:10:52; author: rwatson; state: Exp; lines: +1 -0
Make debug.kdb.stop_cpus also a TUNABLE() so it can be set prior to boot
to help debug early nasty hangs.
Approved by: re (scottl)
date: 2004/08/21 21:45:40; author: rwatson; state: Exp; lines: +3 -1
If a tunable for the routing socket netisr queue max is defined, allow it
to override the default value, rather than the default value overriding
the tunable.
date: 2004/08/21 21:20:06; author: rwatson; state: Exp; lines: +6 -1
Allow the size of the routing socket netisr queue to be configured using
the tunable or sysctl 'net.route.netisr_maxqlen'. Default the maximum
depth to 256 rather than IFQ_MAXLEN due to the downsides of dropping
routing messages.
Approved by: re (scottl)
- Move listing of DTC 3290 to aha(4).
- Remove note about device listings going away.
- Add a note about possibility for duplicate listing of devices.
- Auto generate device listings for the following drivers: ncr, sym,
umodem, and uscanner
Approved by: re (blanket)
date: 2004/08/22 14:48:55; author: rwatson; state: Exp; lines: +0 -2
Don't need to assert Giant in fw_output(), only in the firewire start
routine.
Approved by: re (scottl)
date: 2004/08/21 17:38:48; author: rwatson; state: Exp; lines: +5 -3
When notifying protocol components of an event on an in6pcb, use the
result of the notify() function to decide if we need to unlock the
in6pcb or not, rather than always unlocking. Otherwise, we may unlock
and already unlocked in6pcb.
Reported by: kuriyama, Gordon Bergling <gbergling at 0xfce3.net>
Tested by: kuriyama, Gordon Bergling <gbergling at 0xfce3.net>
Discussed with: mdodd
Approved by: re (kensmith)
date: 2004/08/19 01:45:16; author: rwatson; state: Exp; lines: +10 -2
Add UNP_UNLOCK_ASSERT() to asser that the UNIX domain socket subsystem
lock is not held.
Rather than annotating that the lock is released after calls to
unp_detach() with a comment, annotate with an assertion.
Assert that the UNIX domain socket subsystem lock is not held when
unp_externalize() and unp_internalize() are called.
Approved by: re (kensmith)
date: 2004/08/19 01:13:10; author: rwatson; state: Exp; lines: +35 -25
Push down pcbinfo and inpcb locking from udp_send() into udp_output().
This provides greater context for the locking and allows us to avoid
locking the pcbinfo structure if not binding operations will take
place (i.e., already bound, connected, and no expliti sendto()
address).
Approved by: re (kensmith)
date: 2004/08/19 01:11:17; author: rwatson; state: Exp; lines: +1 -1
In in_pcbrehash(), do assert the inpcb lock as well as the pcbinfo lock.
Approved by: re (kensmith)
only. This is a temporary hack needed until kernel support for DMA
buffer alignment support is added. The newer ATA code expects this
support and it has been added to each arch except for sparc64. This
commit will be backed out when the support is added.
Approved by: re (scottl)
File diff suppressed because it is too large.
Load diff
Loaded 100 of 8898 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.