Alexander Kabaev [Sat, 19 May 2007 04:45:54 +0000 (04:45 +0000)]
Add -Wno-pointer-sign to CWARNFLAGS.
Switch ia64 kernels to -fpic. This is likely wrong, but at least gets
ia64 kernels to compile and link with GCC 4.2. The previous -mno-sdata
trick is not working anymore.
Alexander Kabaev [Sat, 19 May 2007 04:31:43 +0000 (04:31 +0000)]
Follow NetBSD, OpenBSD and DragonfyBSD project and add BSD-licensed
SSP functions into FreeBSD libc. Use the same file name and location
for consistency with other projects.
Alexander Kabaev [Sat, 19 May 2007 04:25:59 +0000 (04:25 +0000)]
Update bmake glue to build GCC 4.2.
Also:
Switch FreeBSD to use libgcc_s.so.1.
Use dl_iterate_phdr to locate shared objects' exception frame
info instead of depending on older register_frame_info machinery.
This allows us to avoid depending on libgcc_s.so.1 in binaries
that do not use exception handling directly. As an additional
benefit it breaks circular libc <=> libgcc_s.so.1 dependency too.
Build newly added libgomp.so.1 library, the runtime support
bits for OpenMP.
Build LGPLed libssp library. Our libc provides our own
BSD-licensed SSP callbacks implementation, so this library
is only built to benefit applications that have hadcoded
knowledge of libssp.so and libssp_nonshared.a. When linked
in from command line, these libraries override libc
implementation.
Alexander Kabaev [Sat, 19 May 2007 03:34:59 +0000 (03:34 +0000)]
GCC will now properly link libc with all shared objects in order to record
their dependency on libc and its versioned symbols. For that to work,
libc needs to be built before any other shared library that might depend
on it. Add necessary glue to make that happen.
Alexander Kabaev [Sat, 19 May 2007 03:29:37 +0000 (03:29 +0000)]
Fix generator glue to only expose extern struct units %s_units[] is
struct units defintition it known. The above construct is treated
as an incorrect C by GCC 4.2 otherwise.
Andre Oppermann [Fri, 18 May 2007 19:58:37 +0000 (19:58 +0000)]
Add tcp_log_addrs() function to generate and standardized TCP log line
for use thoughout the tcp subsystem.
It is IPv4 and IPv6 aware creates a line in the following format:
"TCP: [1.2.3.4]:50332 to [1.2.3.4]:80 tcpflags <RST>"
A "\n" is not included at the end. The caller is supposed to add
further information after the standard tcp log header.
The function returns a NUL terminated string which the caller has
to free(s, M_TCPLOG) after use. All memory allocation is done
with M_NOWAIT and the return value may be NULL in memory shortage
situations.
Either struct in_conninfo || (struct tcphdr && (struct ip || struct
ip6_hdr) have to be supplied.
Due to ip[6].h header inclusion limitations and ordering issues the
struct ip and struct ip6_hdr parameters have to be casted and passed
as void * pointers.
Robert Watson [Fri, 18 May 2007 19:34:54 +0000 (19:34 +0000)]
In nfs_down(), if rep can be NULL, which we test for, then we should
lock and unlock conditionally, not just set the flag on it conditionally.
In practice, this bug couldn't manifest, as in the current revision of
the code, no callers pass a NULL rep.
Bruce A. Mah [Fri, 18 May 2007 17:17:21 +0000 (17:17 +0000)]
This file was originally added to document the transition of the
release documentation from *.TXT files to the RELNOTESng *.sgml
files. I'm pretty sure that, five years later, nobody is wondering
where the original *.TXT files went to in our source tree, so
remove this file to declutter the source tree a bit.
David Malone [Fri, 18 May 2007 15:05:49 +0000 (15:05 +0000)]
Help ng_fec deal with multicast addresses.
While ng_fec called the ioctl to let interfaces in the bundle know
the list of multicast addresses had changed, it never actually
updated that list on the interfaces in the bundle. Consequently,
the multicast filters could be programmed incorrectly.
if_lagg does this correctly, by maintaining a list of addresses
that it has added to interfaces in the bundle. This commit basically
takes the if_lagg code and adds it to ng_fec.
A version of this patch for RELENG_6 has fixed some problems with
IPv6 ND over ng_fec. This is probably the problem in PR 107523.
Since renaming of vop_lock to _vop_lock, pre- and post-condition
function calls are no more generated for vop_lock.
Rename _vop_lock to vop_lock1 to satisfy tools/vnode_if.awk assumption
about vop naming conventions. This restores pre/post-condition calls.
Add -U and -P options that allow the specification of the per-user
and per-process summary file location.
These make the program more flexible, and also make it possible to write
sane regression tests.
Ruslan Ermilov [Fri, 18 May 2007 12:25:48 +0000 (12:25 +0000)]
Fix a logic bug I re-introduced in my patch I sent to Daniel
that would cause the selected shared threading library to be
overwritten with its 32-bit version on amd64.
Mike Makonnen [Fri, 18 May 2007 12:04:41 +0000 (12:04 +0000)]
o Implement the stop_boot subroutine [1]. This subroutine can be used by
scripts in rc.d to stop rc(8) from booting into multi-user mode when
a critical or severe error condition is encountered.
o Modify scripts in etc/rc.d that already implemented this functionality
independently.
o Document it.
[1] - This subroutine was implemented in FreeBSD in rc.d/fsck. I moved it
to rc.subr(8). Our version differs slightly in that it takes an
optional argument to stop the boot even if "autoboot" is not set.
Jeff Roberson [Fri, 18 May 2007 07:10:50 +0000 (07:10 +0000)]
- define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating
vmcnts. This can be used to abstract away pcpu details but also changes
to use atomics for all counters now. This means sched lock is no longer
responsible for protecting counts in the switch routines.
Jeff Roberson [Fri, 18 May 2007 06:32:24 +0000 (06:32 +0000)]
- Convert turnstiles and sleepqueus to use UMA. This provides a modest
speedup and will be more useful after each gains a spinlock in the
impending thread_lock() commit.
- Move initialization and asserts into init/fini routines. fini routines
are only needed in the INVARIANTS case for now.
Submitted by: Attilio Rao <attilio@FreeBSD.org>
Tested by: kris, jeff
JINMEI Tatuya [Thu, 17 May 2007 21:20:24 +0000 (21:20 +0000)]
- 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).
Update the man page to reflect that certain variables will be unset in
the case that the program is set-user-ID or set-group-ID. Add missing
annotations for LIBMAP and LIBMAP_DISABLE.
In the event a process is tainted (setuid/setgid binaries), un-set any
potentially dangerous environment variables all together. It should be
noted that the run-time linker will not honnor these environment variables
if the process is tainted currently. However, once a child of the tainted
process calls setuid(2), it's status as being tainted (as defined by
issetugid(2)) will be removed. This could be problematic because
subsequent activations of the run-time linker could honnor these
dangerous variables.
This is more of an anti foot-shot mechanism, there is nothing I am
aware of in base that does this, however there may be third party
utilities which do, and there is no real negative impact of clearing
these environment variables.
Marcel Moolenaar [Thu, 17 May 2007 15:34:51 +0000 (15:34 +0000)]
Fix the construction of the gctl_req that got broken by my
previous commit and that introduced optional parameters.
Existing classes (like geli(8)) use empty strings by default
and expect the parameter to be passed to the kernel as such.
Also, the default value of a string argument can be NULL.
Fix both cases by making the optional parameter conditional
upon gc_argname being set and making sure to test for NULL
before dereferencing the pointer.
Randall Stewart [Thu, 17 May 2007 12:16:24 +0000 (12:16 +0000)]
- Fixed 1-2-1 model to not worry about associd in sockopts
- Fixed RTOinfo for bounding.
- Fixed connect() to return ECONNREFUSED when an ABORT is received.
- Added comments to direct Static Analysis not to look at some things
it does not understand (comments are /* sa_ignore XXXXX */)
- Bind when colliding was broken, missing not_found = 1 before
checking to see if the port was in use caused endless bind loop.
- Cookie life needs to be in milliseconds to conform to socket api.
- Cookie life is not supposed to change if its 0, On the assoc
level set we changed it to 0 opps.
- Two more static analysis issues identified by the cisco
tool. Null checks needed.
- An issue for sendfile(). Need to validate the correct
input argument.
- When sending failed due to a no route to host, we leaked
the mbuf chain failing to call m_freem().
- Fix #ifdef issue for getting hash block len when HAVE_SHA2 is NOT defined
Reviewed by: gnn
Mike Makonnen [Thu, 17 May 2007 08:57:14 +0000 (08:57 +0000)]
The precmd routine does not need to check whether the command should be
"forced". If some pre-condition is not met, it should fail as it normally
does and rc.subr(8) will make the appropriate decision. Incidentally, the
previous behaviour had a bug where the "force" flag was respected only
when checking rc.conf(5) knobs. The flag was ignored when verifying the
rpcbind(8) dependency.
Warner Losh [Thu, 17 May 2007 05:05:12 +0000 (05:05 +0000)]
Don't export a kern.conftxt sysctl, except when INCLUDE_CONF_FILE is
defined. This restores the old behavior, and eliminates the
dependency on the kernconf.tmpl when INCLUDE_CONFIG_FILE isn't
included in the kernel config. There were many people in the terminal
room that had almost, but not quite, up-to-date config files that this
helps. I don't know if this is the result of skew among the cvsup
servers, or some other more subtle problem. However, this fix should
work for any config of recent vintage (I tested with the latest, and
one before the recent changes, and eye-balled the intermediate
versions).
Warner Losh [Thu, 17 May 2007 04:53:52 +0000 (04:53 +0000)]
Fix some problems that affect multiple file inclusion. Bruce found
this bug and submitted these patches to dunstan@. He sent them to me
to test, and I discovered they were needed for the atmel kernel config
files. Since we were playing with them in the terminal room after the
developer's summit today, I thought I'd go ahead and commit them to
allow those folks that now have atmel hardware (thanks Andre) a chance
to try it out w/o my help. Since dunstan@ is asleep right now, risk
stepping on his toes a little by going ahead and committing this
change.
Juli Mallett [Thu, 17 May 2007 00:18:01 +0000 (00:18 +0000)]
o) Correct for missing whitespace.
o) We don't need to check if ifp == stdin to give the filename, since we already
know that ifn will be "stdin" if it is.
Jack F Vogel [Thu, 17 May 2007 00:14:03 +0000 (00:14 +0000)]
Couple of changes, back down on last TSO change, instead make old
adapter list still capable, but only PCI-E adapters are now enabled.
The user can enable older PCI-X or PCI adapters using ifconfig.
Secondly, Arthur Hartwig pointed out my MSI change was not working
correctly, changed to something that now does. Thanks Arthur.
There was also a fundamental bug in the 82575 MSIX code, the MSIX
registers had to be mapped, opps :)
John Baldwin [Wed, 16 May 2007 23:42:04 +0000 (23:42 +0000)]
Don't completely skip pci_cfg_save() in the PCI nomatch routine if
the power_nodriver tunable is off. pci_cfg_save() already checks the
tunable internally, and no other callers of pci_cfg_save() check the
tunable.
John Baldwin [Wed, 16 May 2007 23:40:08 +0000 (23:40 +0000)]
Fix interrupt routing for some cards after the previous fix to clear BARs
in cardbus cards: update the saved copy of the PCIR_INTLINE register in
the PCI ivars in addition to the actual register.
- Added TSO support
- Updated firmware to latest release (v3.4.8) to fix TSO + jumbo frame lockup
- Added MSI (hw.bce.msi_enable) and TSO (hw.bce.tso_enable) sysctls
- Fixed kernel panic when MSI is used and module is unloaded
- Added several new debug routines
- Removed slack space for RX/TX chains since it only covers sloppy coding
- Fixed a potential problem when programming jumbo MTU size in hardware
- Various other comment changes
Marcel Moolenaar [Wed, 16 May 2007 23:24:15 +0000 (23:24 +0000)]
Don't enable symbol versioning on ia64 for now. It causes
symbol lookup failures that later result in null-pointer
dereferences. This needs looking into, but since we're
close to release it's possible that it's not resolved before
that time.
Randall Stewart [Wed, 16 May 2007 20:23:39 +0000 (20:23 +0000)]
-Fix so getoptinfo() is in conformance with socket api (it
can be used on any read socketopt).
-Clean up of sendmsg call and make it conformant when no syscall
is available.
Warner Losh [Wed, 16 May 2007 20:00:36 +0000 (20:00 +0000)]
Write 0 to all the bars in cardbus_cardbus_setup_regs. This is needed
because on at least my dc based cards there's garbage in there. The
recent changes in the resource code appears to have unmasked this
problem... At least dc now probes/attaches better than it did before.
Also, we no longer need to write to the cfg for the other registers.
Warner Losh [Wed, 16 May 2007 19:53:49 +0000 (19:53 +0000)]
o Don't hold lock over bus_teardown_intr when we're waiting for the
thread to die, since that can cause deadlock with the ISR (in theory).
o Minor cleanup
o comment nit