]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoFix build.
rpaulo [Fri, 5 Sep 2008 18:11:18 +0000 (18:11 +0000)]
Fix build.

15 years agoKeep entries sorted.
rpaulo [Fri, 5 Sep 2008 18:09:49 +0000 (18:09 +0000)]
Keep entries sorted.

15 years agoAdd a couple more Apple GPT entries and NetBSD GPT entries.
rpaulo [Fri, 5 Sep 2008 17:45:24 +0000 (17:45 +0000)]
Add a couple more Apple GPT entries and NetBSD GPT entries.

15 years agoAdd two example regexps: (1) one for matching all the characters
keramida [Fri, 5 Sep 2008 17:41:20 +0000 (17:41 +0000)]
Add two example regexps: (1) one for matching all the characters
that belong in a character class, and (2) one for matching all
the characters *not* in a character class.

Submitted by: Mark B, mkbucc at gmail.com
MFC after: 3 days

15 years agoInclude the vendor in the partition name.
rpaulo [Fri, 5 Sep 2008 16:54:07 +0000 (16:54 +0000)]
Include the vendor in the partition name.

15 years agoFix a small typo in a comment in calcru1().
ed [Fri, 5 Sep 2008 15:55:06 +0000 (15:55 +0000)]
Fix a small typo in a comment in calcru1().

The word "happene" should read "happened".

Submitted by: Jille Timmermans <jille quis cx>

15 years agoAdd a note that CTASSERT() should not be used in header files.
emaste [Fri, 5 Sep 2008 15:24:54 +0000 (15:24 +0000)]
Add a note that CTASSERT() should not be used in header files.

15 years agoCorrect a copy-paste error---do not look for REX prefixes in i386 code.
jkoshy [Fri, 5 Sep 2008 14:45:56 +0000 (14:45 +0000)]
Correct a copy-paste error---do not look for REX prefixes in i386 code.

15 years agoMerge fix for P4 expansion from vendor branch.
rpaulo [Fri, 5 Sep 2008 13:18:06 +0000 (13:18 +0000)]
Merge fix for P4 expansion from vendor branch.

15 years agoDetect Apple HFS GPT slices.
rpaulo [Fri, 5 Sep 2008 12:49:14 +0000 (12:49 +0000)]
Detect Apple HFS GPT slices.

15 years agoAdd ZyXEL G-202
weongyo [Fri, 5 Sep 2008 11:27:33 +0000 (11:27 +0000)]
Add ZyXEL G-202

Obtained from: OpenBSD

15 years agoFix LOR between vnode lock and internal mqueue locks.
davidxu [Fri, 5 Sep 2008 07:32:57 +0000 (07:32 +0000)]
Fix LOR between vnode lock and internal mqueue locks.

15 years agoCatch up after last insmntque() changes:
pjd [Fri, 5 Sep 2008 07:00:40 +0000 (07:00 +0000)]
Catch up after last insmntque() changes:
- The vnode has to be locked exclusively before calling insmntque().
- Until I find a way to handle insmntque() failures use VV_FORCEINSMQ flag
  to force insmntque() to always succeed.

Reported by: kris, trasz, des, others
Suggested by: kib
Tested by: trasz

15 years agoThe link resolver now unsets the size to mark a hardlink
kientzle [Fri, 5 Sep 2008 06:15:25 +0000 (06:15 +0000)]
The link resolver now unsets the size to mark a hardlink
with no body instead of setting it to zero.

15 years agoMfP4: Handle entries with unset size properly: Regular files with
kientzle [Fri, 5 Sep 2008 06:13:11 +0000 (06:13 +0000)]
MfP4: Handle entries with unset size properly: Regular files with
unspecified size are "unlimited" (required by Zip reader, which
sometimes does not know the uncompressed size of an entry until it
gets to the end).  Also, hardlinks with unspecified (or zero) size do
not overwrite the data on disk nor do they set metadata.  This is
compatible with GNU tar and NetBSD pax behavior.

15 years agoMfP4: Use the set/unset tracking to determine when mtime or atime
kientzle [Fri, 5 Sep 2008 05:55:49 +0000 (05:55 +0000)]
MfP4: Use the set/unset tracking to determine when mtime or atime
is unavailable.  Use start_time as a substitute when one is missing;
if both are missing, skip the call to {f,l,}utime{s,}() entirely.

15 years agoRemove the alignment of the align parameter. This is up to the caller to pass
thompsa [Fri, 5 Sep 2008 04:05:31 +0000 (04:05 +0000)]
Remove the alignment of the align parameter. This is up to the caller to pass
in and it breaks tap(4) on strict alignment machines as m_uiotombuf is called
with ETHER_ALIGN.

Found by: Jared Go
Reviewed by: emax
MFC after: 3 days

15 years agoFix lock name conflict.
davidxu [Fri, 5 Sep 2008 02:07:25 +0000 (02:07 +0000)]
Fix lock name conflict.

PR: kern/127040

15 years agoSlightly reword comment and remove typos.
keramida [Fri, 5 Sep 2008 01:36:30 +0000 (01:36 +0000)]
Slightly reword comment and remove typos.

15 years agoWhen determining whether we trapped while in the PROM don't only
marius [Thu, 4 Sep 2008 21:06:09 +0000 (21:06 +0000)]
When determining whether we trapped while in the PROM don't only
check for addresses below the PROM range but also those above.

15 years agoUse the PROM provided SUNW,set-trap-table to take over the trap
marius [Thu, 4 Sep 2008 20:52:54 +0000 (20:52 +0000)]
Use the PROM provided SUNW,set-trap-table to take over the trap
table. This is required in order to set obp-control-relinquished
within the PROM, allowing to safely read the OFW translations node.
Without this, f.e. a `ofwdump -ap` triggers a fatal reset error or
worse things on machines based on USIII and beyond.
In theory this should allow to remove touching %tba in cpu_setregs(),
in practice we seem to currently face a chicken and egg problem when
doing so however.

15 years agoHook up ixgbe(4) to the build. D'oh!
brueffer [Thu, 4 Sep 2008 20:45:32 +0000 (20:45 +0000)]
Hook up ixgbe(4) to the build.  D'oh!

15 years agoEnsure the caches have the desired configuration (see especially
marius [Thu, 4 Sep 2008 20:08:21 +0000 (20:08 +0000)]
Ensure the caches have the desired configuration (see especially
cheetah_cache_enable()).

15 years agoFlesh out MMU and cache handling of cheetah-class CPUs.
marius [Thu, 4 Sep 2008 19:58:52 +0000 (19:58 +0000)]
Flesh out MMU and cache handling of cheetah-class CPUs.

15 years agoThe physical address space of cheetah-class CPUs has been extended
marius [Thu, 4 Sep 2008 19:43:14 +0000 (19:43 +0000)]
The physical address space of cheetah-class CPUs has been extended
to 43 bits so update TD_PA_BITS accordingly. For the most part this
increase is transparent to the existing code except for when reading
the physical address from ASI_{D,I}TLB_DATA_ACCESS_REG, which we
only do in the loader and which was already adjusted in r182478, or
from the OFW translations node.
While at it, ensure we are only taking valid OFW mapping entries
into account.

15 years agoEnsure interrupts are off while in {d,i}tlb_va_to_pa_sun4u().
marius [Thu, 4 Sep 2008 19:41:54 +0000 (19:41 +0000)]
Ensure interrupts are off while in {d,i}tlb_va_to_pa_sun4u().
I think this is necessary in order to make sure the workarounds
in {d,i}tlb_get_data_sun4u() work correctly.

15 years agostyle(9)
obrien [Thu, 4 Sep 2008 17:10:52 +0000 (17:10 +0000)]
style(9)

15 years agoImplement pts(4) packet mode.
ed [Thu, 4 Sep 2008 16:39:02 +0000 (16:39 +0000)]
Implement pts(4) packet mode.

As reported by several users on the mailing lists, applications like
screen(1) fail to properly handle ^S and ^Q characters. This was because
MPSAFE TTY didn't implement packet mode (TIOCPKT) yet. Add basic packet
mode support to make these applications work again.

Obtained from: //depot/projects/mpsafetty/...

15 years agoFix an awful bug inside our COMPAT_43TTY code.
ed [Thu, 4 Sep 2008 16:30:53 +0000 (16:30 +0000)]
Fix an awful bug inside our COMPAT_43TTY code.

When I migrated tty_compat.c to MPSAFE TTY, I just hooked it up to the
build and fixed it until it compiled and somewhat worked. It turns out
this was not the smartest thing, because the old TTY layer also had a
field called t_flags, which contained a set of sgtty flags.

This means our current COMPAT_43TTY code overwrites the TTY flags,
causing all strange problems to occur. Fix this code to use a new struct
member called t_compatflags. This commit may cause kern/127054 to be
fixed, but this still has to be tested/confirmed by the originator. It
has to be fixed anyway.

PR: kern/127054

15 years agoFix an off-by-one error in the replay detection logic.
dfr [Thu, 4 Sep 2008 14:54:22 +0000 (14:54 +0000)]
Fix an off-by-one error in the replay detection logic.

15 years agoUnbreak the build.
des [Thu, 4 Sep 2008 13:06:36 +0000 (13:06 +0000)]
Unbreak the build.

Pointy hat to: kevlo

15 years agoRecognize 88E1116R phy variation. This part is found on some embedded devices.
raj [Thu, 4 Sep 2008 11:09:40 +0000 (11:09 +0000)]
Recognize 88E1116R phy variation. This part is found on some embedded devices.

Obtained from: Semihalf

15 years agoIf the process id specified is invalid, the system call returns ESRCH
kevlo [Thu, 4 Sep 2008 10:44:33 +0000 (10:44 +0000)]
If the process id specified is invalid, the system call returns ESRCH

15 years agoAdd one more SII3132 chip PCI ID found on Adaptec Serial ATA II RAID 1220SA.
mav [Thu, 4 Sep 2008 10:27:58 +0000 (10:27 +0000)]
Add one more SII3132 chip PCI ID found on Adaptec Serial ATA II RAID 1220SA.

Submitted by: Dmitry S. Luhtionov <mitya@cabletv.dp.ua>

15 years agoEliminate __alpha__ leftover from libstand.
raj [Thu, 4 Sep 2008 10:05:44 +0000 (10:05 +0000)]
Eliminate __alpha__ leftover from libstand.

15 years agoMarkup fix.
kientzle [Thu, 4 Sep 2008 05:22:00 +0000 (05:22 +0000)]
Markup fix.

MFC after: 3 days

15 years agoDon't destroy the archive until after you finish pulling useful
kientzle [Thu, 4 Sep 2008 05:20:46 +0000 (05:20 +0000)]
Don't destroy the archive until after you finish pulling useful
information out of it.  As reported by Giorgos Keramidas.

15 years agoAdditionally clear the STICK bit in the SOFTINT register when
marius [Wed, 3 Sep 2008 21:48:12 +0000 (21:48 +0000)]
Additionally clear the STICK bit in the SOFTINT register when
receiving a PIL_TICK interrupt. This change was erroneously
omitted in r182730.

15 years agoReplace a line matching /^ $/ with one matching /^$/.
brooks [Wed, 3 Sep 2008 20:33:11 +0000 (20:33 +0000)]
Replace a line matching /^ $/ with one matching /^$/.

Obtained from: //depot/projects/vimage-commit2/...

15 years agoNew file missed vimagification.
julian [Wed, 3 Sep 2008 19:23:01 +0000 (19:23 +0000)]
New file missed vimagification.

15 years ago- Fix amd64 local privilege escalation. [08:07]
simon [Wed, 3 Sep 2008 19:09:47 +0000 (19:09 +0000)]
- Fix amd64 local privilege escalation. [08:07]
- Fix nmount(2) local privilege escalation. [08:08]
- Fix IPv6 remote kernel panics. [08:09]

Fix for [08:07] is merge of r181823.

Submitted by: kib [08:07], csjp [08:08], bz [08:09]
Reviewed by: peter [08:07], jhb [08:07]
Reviewed by: jinmei [08:09], rwatson [08:09]
Approved by: re (SA blanket)
Approved by: so (simon)
Security: FreeBSD-SA-08:07.amd64
Security: FreeBSD-SA-08:08.nmount
Security: FreeBSD-SA-08:09.icmp6

15 years agoReflect license change of NetBSD code.
delphij [Wed, 3 Sep 2008 18:53:48 +0000 (18:53 +0000)]
Reflect license change of NetBSD code.

Obtained from: NetBSD
MFC after: 3 days

15 years agoCatch up with the move from mips32/.
obrien [Wed, 3 Sep 2008 18:49:54 +0000 (18:49 +0000)]
Catch up with the move from mips32/.

15 years agoCatch up with the move from mips32/.
obrien [Wed, 3 Sep 2008 18:40:29 +0000 (18:40 +0000)]
Catch up with the move from mips32/.

15 years agoStyle(9).
obrien [Wed, 3 Sep 2008 18:40:02 +0000 (18:40 +0000)]
Style(9).

15 years agoAdd Marko's pipe node.
julian [Wed, 3 Sep 2008 18:17:45 +0000 (18:17 +0000)]
Add Marko's pipe node.
This allows one to do flow modulation similar to dummynet
between arbitrary nodes.

15 years agowhitespace nit
julian [Wed, 3 Sep 2008 18:09:15 +0000 (18:09 +0000)]
whitespace nit

15 years agoImprove loader support for U-Boot.
raj [Wed, 3 Sep 2008 17:48:41 +0000 (17:48 +0000)]
Improve loader support for U-Boot.

- add new diag commands: devinfo, sysinfo for U-Boot-style details about the system
  configuration
- better memory info summary
- style corrections

Obtained from: Semihalf

15 years agoShow info about net devices in loader's 'lsdev' command. While there fix style.
raj [Wed, 3 Sep 2008 17:41:44 +0000 (17:41 +0000)]
Show info about net devices in loader's 'lsdev' command. While there fix style.

15 years ago- USIII-based machines can consist of CPUs running at different
marius [Wed, 3 Sep 2008 17:39:19 +0000 (17:39 +0000)]
- USIII-based machines can consist of CPUs running at different
  frequencies (and having different cache sizes) so use the STICK
  (System TICK) timer, which was introduced due to this and is
  driven by the same frequency across all CPUs, instead of the
  TICK timer, whose frequency varies with the CPU clock, to drive
  hardclock. We try to use the STICK counter with all CPUs that are
  USIII or beyond, even when not necessary due to identical CPUs,
  as we can can also avoid the workaround for the BlackBird erratum
  #1 there. Unfortunately, using the STICK counter currently causes
  a hang with USIIIi MP machines for reasons unknown, so we still
  use the TICK timer there (which is okay as they can only consist
  of identical CPUs).
- Given that we only (try to) synchronize the (S)TICK timers of APs
  with the BSP during startup, we could end up spinning forever in
  DELAY(9) if that function is migrated to another CPU while we're
  spinning due to clock drift afterwards, so pin to the CPU in order
  to avoid migration. Unfortunately, pinning doesn't work at the
  point DELAY(9) is required by the low-level console drivers, yet,
  so switch to a function pointer, which is updated accordingly, for
  implementing DELAY(9). For USIII and beyond, this would also allow
  to easily use the STICK counter instead of the TICK one here,
  there's no benefit in doing so however.
  While at it, use cpu_spinwait(9) for spinning in the delay-
  functions. This currently is a NOP though.
- Don't set the TICK timer of the BSP to 0 during at startup as
  there's no need to do so.
- Implement cpu_est_clockrate().
- Unfortunately, USIIIi-based machines don't provide a timecounter
  device besides the STICK and TICK counters (well, in theory the
  Tomatillo bridges have a performance counter that can be (ab)used
  as timecounter by configuring it to count bus cycles, though unlike
  the performance counter of Schizo bridges, the Tomatillo one is
  broken and counts Sun knows what in this mode). This means that
  we've to use a (S)TICK counter for timecounting, which has the old
  problem of not being in sync across CPUs, so provide an additional
  timecounter function which binds itself to the BSP but has an
  adequate low priority.

15 years agoSwitch sun4v to back to using its own clock.c, which was ressurected
marius [Wed, 3 Sep 2008 17:31:13 +0000 (17:31 +0000)]
Switch sun4v to back to using its own clock.c, which was ressurected
in 182691, as the sparc64 version is going to be rototilled and sun4v
currently can't be verified to still work with the new sparc64 one
due to its overall state.

15 years agoUse current SP instead of global data ptr for the U-Boot API signature search hint.
raj [Wed, 3 Sep 2008 16:38:27 +0000 (16:38 +0000)]
Use current SP instead of global data ptr for the U-Boot API signature search hint.

Global data (pointed by R2 on PowerPC) in principle is not guaranteed to be in
proximity of U-Boot heap (where the API signature is placed) accross different
architectures and platforms. Instead, use U-Boot stack pointer as a hint for
the search instead of the global data; this method tends to be more uniform
accross different platforms.

Obtained from: Semihalf

15 years agoIntroduce crunchide to the ELF e_machine MIPS values.
obrien [Wed, 3 Sep 2008 16:21:28 +0000 (16:21 +0000)]
Introduce crunchide to the ELF e_machine MIPS values.

15 years agoMake metadata.c shared across all platforms using U-Boot.
raj [Wed, 3 Sep 2008 15:52:05 +0000 (15:52 +0000)]
Make metadata.c shared across all platforms using U-Boot.

This will [soon] be needed for ARM.

15 years agoMove U-Boot compatibility library to WARNS=2 level.
raj [Wed, 3 Sep 2008 15:39:50 +0000 (15:39 +0000)]
Move U-Boot compatibility library to WARNS=2 level.

15 years agoFix the sysctl function parameters. We were only querying Sensor 0.
rpaulo [Wed, 3 Sep 2008 13:34:31 +0000 (13:34 +0000)]
Fix the sysctl function parameters. We were only querying Sensor 0.

Noticed by: des
MFC after: 3 days

15 years agoWhen calling extattr_check_cred, use V{READ,WRITE}, not I{READ,WRITE}.
trasz [Wed, 3 Sep 2008 12:46:09 +0000 (12:46 +0000)]
When calling extattr_check_cred, use V{READ,WRITE}, not I{READ,WRITE}.

Approved by: rwatson (mentor)

15 years agoMention ntpd upgrade to 4.2.4p5.
roberto [Wed, 3 Sep 2008 08:30:17 +0000 (08:30 +0000)]
Mention ntpd upgrade to 4.2.4p5.

15 years agoFix a bug, when a specially crafted ICMPV6 MLD packet could lead
bz [Wed, 3 Sep 2008 08:13:58 +0000 (08:13 +0000)]
Fix a bug, when a specially crafted ICMPV6 MLD packet could lead
to an integer divide by zero panic in the kernel, if the kernel was
run with hz<1000.
Neither i386, pc98, amd64 or sparc64 are affected in the currently
supported branches and default configuration.

Submitted by: Miikka Saukko, Ossi Herrala and Jukka Taimisto from
the CROSS project at Codenomicon Ltd. via CERT-FI.
Reviewed by: bz, rwatson
Security: CVE-2008-2464
MFC after: 8 hours

15 years agoRegression tests for bugs in gdtoa.
das [Wed, 3 Sep 2008 07:35:14 +0000 (07:35 +0000)]
Regression tests for bugs in gdtoa.

15 years agoMake strtof() respect the current rounding mode.
das [Wed, 3 Sep 2008 07:32:06 +0000 (07:32 +0000)]
Make strtof() respect the current rounding mode.

15 years agoMerge gdtoa 20080831. This fixes several bugs, including an infinite
das [Wed, 3 Sep 2008 07:23:57 +0000 (07:23 +0000)]
Merge gdtoa 20080831. This fixes several bugs, including an infinite
loop pointed out by cognet@ that occurs when calling strtod() with a
string representing a number between DBL_MAX and 2*DBL_MAX, when the
rounding mode is anything other than the default.

15 years agostyle nit: indent continuation lines correctly, use style(9) style
imp [Wed, 3 Sep 2008 07:08:22 +0000 (07:08 +0000)]
style nit: indent continuation lines correctly, use style(9) style
if() statement.

15 years agominor style(9) police: sort getopt options alphabetically. The
imp [Wed, 3 Sep 2008 07:03:38 +0000 (07:03 +0000)]
minor style(9) police: sort getopt options alphabetically.  The
semi-logical segregation of 'b' and 'h' doesn't seem to make sense and
makes it harder to read.

15 years agoStyle nit. Continued lines are indented 2 spaces in this file.
imp [Wed, 3 Sep 2008 06:57:21 +0000 (06:57 +0000)]
Style nit.  Continued lines are indented 2 spaces in this file.

15 years agoMake sure internal rtld malloc routines are not called from unlocked
kan [Wed, 3 Sep 2008 01:05:32 +0000 (01:05 +0000)]
Make sure internal rtld malloc routines are not called from unlocked
contexts as rtld's malloc is not thread safe and is only supposed to be
called with exclusive bind lock already held.

The originating PR submitted a patch on top of different pre-requisite
workaroud for unsafe dlopen calls, and the patch was midief slighlty to apply
to stock sources for the purpose of this commit. Running rtld malloc from
unlocked contexts is a bug on its own.

PR: 126950
Submited by: Oleg Dolgov

15 years agoenable the xen_guest string so that the freebsd xen kernel will
kmacy [Wed, 3 Sep 2008 00:06:10 +0000 (00:06 +0000)]
enable the xen_guest string so that the freebsd xen kernel will
at least pass muster with the loader on 3.0.3

Note that this doesn't actually make it work as Xen 3.0.3
appears to disallow recursive mappings on the page directory

15 years agoIndicate at probe time if device can do offload and which revision it is
kmacy [Tue, 2 Sep 2008 22:38:49 +0000 (22:38 +0000)]
Indicate at probe time if device can do offload and which revision it is

MFC after: 3 days

15 years agoAdd support for t3c to cxgbtool
kmacy [Tue, 2 Sep 2008 22:20:46 +0000 (22:20 +0000)]
Add support for t3c to cxgbtool

Obtained from: Chelsio Inc.

15 years agoahc(4) work better in Sparc64 with AHC_ALLOW_MEMIO.
obrien [Tue, 2 Sep 2008 21:46:17 +0000 (21:46 +0000)]
ahc(4) work better in Sparc64 with AHC_ALLOW_MEMIO.

Submitted by: Nathan Whitehorn <nwhitehorn@freebsd.org>

15 years agoMFsparc64: r177642
marius [Tue, 2 Sep 2008 21:35:57 +0000 (21:35 +0000)]
MFsparc64: r177642

Remove sysbeep() from the non-beeping archs.

15 years agoResurrect clock.c from r164371.
marius [Tue, 2 Sep 2008 21:28:04 +0000 (21:28 +0000)]
Resurrect clock.c from r164371.

15 years agoFix typo in comment.
thomas [Tue, 2 Sep 2008 21:27:19 +0000 (21:27 +0000)]
Fix typo in comment.

15 years ago- USIII-based machines can consist of CPUs having different cache
marius [Tue, 2 Sep 2008 21:13:54 +0000 (21:13 +0000)]
- USIII-based machines can consist of CPUs having different cache
  sizes (and running at different frequencies) so move the cacheinfo
  to the PCPU data. While at it, remove some redundant and/or unused
  members from struct cacheinfo.
- In sparc64_init don't assume the first CPU node we find in the OFW
  device tree is the BSP.

15 years agoBypass isa_probe_children(9) and directly call bus_generic_attach(9)
marius [Tue, 2 Sep 2008 21:06:28 +0000 (21:06 +0000)]
Bypass isa_probe_children(9) and directly call bus_generic_attach(9)
in order to avoid the invasive probes done by identify-routines of
ISA drivers, which may access unassigned addresses or those of
unrelated devices and thus in turn can trigger master/target aborts
as revealed by r182108 and ahc(4). I think that this is also the
cause of the hang previously seen on B100 blades during boot.
Bypassing isa_probe_children(9) also avoids adding ISA hints, which
just can be wrong for sparc64.

Reported by: gavin

15 years agoAdd support for RLIMIT_NPTS to limits(1).
ed [Tue, 2 Sep 2008 19:13:24 +0000 (19:13 +0000)]
Add support for RLIMIT_NPTS to limits(1).

After the MPSAFE TTY import we support an additional rlimit, called
RLIMIT_NPTS. This limit allows you to cap the amount of pseudo-terminals
allocated by one user.

We forgot to add support for this limit to limits(1), which means it
crashed. Add the proper bits to make it work like it should.
Unfortunately not all shells actually implement the RLIMIT, so
unfortunately I suspect it to be broken with certain shells.

Submitted by: Yuriy Tsibizov <yuriy tsibizov gfk ru>

15 years ago- When executing FreeBSD/amd64 binaries from FreeBSD/i386 or Linux/i386
kib [Tue, 2 Sep 2008 17:52:11 +0000 (17:52 +0000)]
- When executing FreeBSD/amd64 binaries from FreeBSD/i386 or Linux/i386
  processes, clear PCB_32BIT and PCB_GS32BIT bits [1].

- Reread the fs and gs bases from the msr unconditionally, not believing
  the values in pcb_fsbase and pcb_gsbase, since usermode may reload
  segment registers, invalidating the cache. [2].

Both problems resulted in the wrong fs base, causing wrong tls pointer
be dereferenced in the usermode.

Reported and tested by: Vyacheslav Bocharov <adeepv at gmail com> [1]
Reported by: Bernd Walter <ticsoat cicely7 cicely de>,
Artem Belevich <fbsdlist at src cx>[2]
Reviewed by: peter
MFC after: 3 days

15 years agoUse size_t to store the return value of ttydisc_getc().
ed [Tue, 2 Sep 2008 17:13:11 +0000 (17:13 +0000)]
Use size_t to store the return value of ttydisc_getc().

The ttydisc_getc() routine obtains a read length from ttyoutq_read().
For no valid reason, the current code stores this value in an int, and
returns a size_t. There is no need to perform this useless conversion.

Obtained from: //depot/projects/mpsafetty/...

15 years agoRemove XXXRW in soreceive_dgram that proves unnecessary.
rwatson [Tue, 2 Sep 2008 16:55:21 +0000 (16:55 +0000)]
Remove XXXRW in soreceive_dgram that proves unnecessary.

Remove unused orig_resid variable in soreceive_dgram.

Submitted by: alfred
X-MFC with: soreceive_dgram (r180198, r180211)

15 years agoAdd gprof MIPS MD header and enable building gprof.
obrien [Tue, 2 Sep 2008 15:35:47 +0000 (15:35 +0000)]
Add gprof MIPS MD header and enable building gprof.

Obtained from: Juniper Networks

15 years agoAllow again compilation w/o GNU readline. There are conditionals in
roberto [Tue, 2 Sep 2008 14:00:17 +0000 (14:00 +0000)]
Allow again compilation w/o GNU readline.  There are conditionals in
{ntpdc,ntpq}/Makefile.

Submitted by: Ben Kelly <bkelly@vadev.org>

15 years agoImport ioctl updates for latest rev of cxgbtool
kmacy [Tue, 2 Sep 2008 07:47:14 +0000 (07:47 +0000)]
Import ioctl updates for latest rev of cxgbtool

Obtained from: Chelsio Inc.
MFC after: 3 days

15 years agoFix an ABI breakage found after the import that will be part of the
gshapiro [Tue, 2 Sep 2008 04:53:24 +0000 (04:53 +0000)]
Fix an ABI breakage found after the import that will be part of the
next version of sendmail.  Putting it in now for the upcoming 7-BETA
and 6-BETA test releases.

Submitted by: Mike Tancsa

15 years agofree ifp allocated at ieee80211_vap_setup.
weongyo [Tue, 2 Sep 2008 04:49:35 +0000 (04:49 +0000)]
free ifp allocated at ieee80211_vap_setup.

Reviewed by: sam, thompsa

15 years agoUse RUSAGE_SELF for the current process instead of hardcoded value
kevlo [Tue, 2 Sep 2008 02:59:38 +0000 (02:59 +0000)]
Use RUSAGE_SELF for the current process instead of hardcoded value

15 years agoUse RUSAGE_SELF for the current process instead of hardcoded value
kevlo [Tue, 2 Sep 2008 02:59:13 +0000 (02:59 +0000)]
Use RUSAGE_SELF for the current process instead of hardcoded value

15 years agoAccomodate the fact that the number of l1 pages varies with the size of the initially
kmacy [Tue, 2 Sep 2008 02:55:45 +0000 (02:55 +0000)]
Accomodate the fact that the  number of l1 pages varies with the size of the initially
allocated memory - this lets us boot with 3GB

MFC after: 1 month

15 years agoFix a multiple locking bug in bm(4) that could cause panics on a WITNESS-enabled...
nwhitehorn [Tue, 2 Sep 2008 02:50:52 +0000 (02:50 +0000)]
Fix a multiple locking bug in bm(4) that could cause panics on a WITNESS-enabled kernel.

Approved by: marcel (mentor)
MFC after: 1 day

15 years agoFix problem with large memory configuration by ensuring that all NKPT
kmacy [Tue, 2 Sep 2008 01:32:52 +0000 (01:32 +0000)]
Fix problem with large memory configuration by ensuring that all NKPT
page table pages have been zeroed before entering them in the page
directory

MFC after: 1 month

15 years agoPer email to arch@ a little while ago (that was greeted with silence),
imp [Mon, 1 Sep 2008 23:59:00 +0000 (23:59 +0000)]
Per email to arch@ a little while ago (that was greeted with silence),
prefer the more common > ${.TARGET} over > opt_foo.h in modules
makefiles.

15 years agoBelatedly add a notice about the reversed order of preference for OpenSSH
des [Mon, 1 Sep 2008 23:50:56 +0000 (23:50 +0000)]
Belatedly add a notice about the reversed order of preference for OpenSSH
authentication keys.

15 years agoWe're not quite ready for the full %(endian_spec).
obrien [Mon, 1 Sep 2008 23:09:45 +0000 (23:09 +0000)]
We're not quite ready for the full %(endian_spec).

15 years agoUpdate for version 9.4.2-P2
dougb [Mon, 1 Sep 2008 22:55:23 +0000 (22:55 +0000)]
Update for version 9.4.2-P2

15 years agoMerge from vendor/bind9/dist as of the 9.4.2-P2 import
dougb [Mon, 1 Sep 2008 22:54:49 +0000 (22:54 +0000)]
Merge from vendor/bind9/dist as of the 9.4.2-P2 import

15 years agoAdd __unix__. Tweak __KPRINTF_ATTRIBUTE__ while I'm here.
obrien [Mon, 1 Sep 2008 22:22:44 +0000 (22:22 +0000)]
Add __unix__.  Tweak __KPRINTF_ATTRIBUTE__ while I'm here.

15 years agoWrap an 81 column SYSCTL_NODE decleration.
brooks [Mon, 1 Sep 2008 19:25:27 +0000 (19:25 +0000)]
Wrap an 81 column SYSCTL_NODE decleration.

Obtained from: //depot/projects/vimage-commit2/...

15 years agoRemove unneeded D_NEEDMINOR from cpuctl(4).
ed [Mon, 1 Sep 2008 18:56:01 +0000 (18:56 +0000)]
Remove unneeded D_NEEDMINOR from cpuctl(4).

The D_NEEDMINOR flag was introduced for drivers that do not actually
depend on storing a device unit/minor number, but require the ability to
address the cdevs by this number, which is used by clone_create().

The cpuctl(4) driver sets D_NEEDMINOR, even though it doesn't use the
clone_create() API. Remove the flag, because maybe we want to get rid of
it somewhere in the far future.

15 years agoAdd FreeBSD/MIPS support to GCC.
obrien [Mon, 1 Sep 2008 18:46:03 +0000 (18:46 +0000)]
Add FreeBSD/MIPS support to GCC.

15 years agoGDB isn't building on MIPS. Temporarily disable, to revisit soon.
obrien [Mon, 1 Sep 2008 18:18:19 +0000 (18:18 +0000)]
GDB isn't building on MIPS.  Temporarily disable, to revisit soon.

15 years agoTruss and gprof doesn't build for MIPS.
obrien [Mon, 1 Sep 2008 18:03:09 +0000 (18:03 +0000)]
Truss and gprof doesn't build for MIPS.