]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoThose who are ungodlike should be returned an error.
trhodes [Sat, 16 Apr 2005 18:41:00 +0000 (18:41 +0000)]
Those who are ungodlike should be returned an error.

19 years agoIn mac_get_fd(), remove unconditional acquisition of Giant around copying
rwatson [Sat, 16 Apr 2005 18:33:13 +0000 (18:33 +0000)]
In mac_get_fd(), remove unconditional acquisition of Giant around copying
of the socket label to thread-local storage, and replace it with
conditional acquisition based on debug.mpsafenet.  Acquire the socket
lock around the copy operation.

In mac_set_fd(), replace the unconditional acquisition of Giant with
the conditional acquisition of Giant based on debug.mpsafenet.  The socket
lock is acquired in mac_socket_label_set() so doesn't have to be
acquired here.

Obtained from: TrustedBSD Project
Sponsored by: SPAWAR, SPARTA

19 years agoExtend a local buffer to prevent an overflow of the XSDT address.
njl [Sat, 16 Apr 2005 17:38:24 +0000 (17:38 +0000)]
Extend a local buffer to prevent an overflow of the XSDT address.

Submitted by: Joerg Sonnenberger
Obtained from: DragonflyBSD
MFC after: 1 day

19 years agoReduce the width of the THR column to 4 characters, to avoid wrap-around
keramida [Sat, 16 Apr 2005 15:43:38 +0000 (15:43 +0000)]
Reduce the width of the THR column to 4 characters, to avoid wrap-around
of lines in SMP machines (which are wider), until we have a better way
of handling window sizes & columns in top.

Caught by: ache, Andre Guibert de Bruet <andy@siliconlandmark.com>
Point hat: keramida

19 years agoIncrease default HZ for sparc64 to 1000.
marius [Sat, 16 Apr 2005 15:07:41 +0000 (15:07 +0000)]
Increase default HZ for sparc64 to 1000.

19 years ago- MFi386: sys/i386/i386/intr_machdep.c rev. 1.11
marius [Sat, 16 Apr 2005 15:05:56 +0000 (15:05 +0000)]
- MFi386: sys/i386/i386/intr_machdep.c rev. 1.11
  Don't use atomic ops to increment interrupt stats.
  On sparc64 this reduces delay until tick interrupts are service by 1/10th
  on average. In turn this reduces the clock drift caused by these delays
  so there's less drift which has to be compensated in tick_hardclock().
  This includes switching from atomically incrementing the global cnt.v_intr
  to the asm equivalent of PCPU_LAZY_INC(cnt.v_intr) in exception.S
- Correct some comments to match the registers actually used.
- Correct some format specifiers, interrupt levels passed in are u_int.
- Use FBSDID.

Ok'ed by: jhb

19 years agoSome changes to intr_execute_handlers():
marius [Sat, 16 Apr 2005 15:02:16 +0000 (15:02 +0000)]
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().

MFC after: 3 days

19 years ago- In sparc64_init() remove the call to tick_stop(). There's no need to
marius [Sat, 16 Apr 2005 15:00:09 +0000 (15:00 +0000)]
- 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().
- In spinlock_enter() replace the magic value for PIL TICK with the
  respective macro.
- Use FBSDID.

19 years ago- Add a workaround for a bug in BlackBird CPUs (said to be part of the
marius [Sat, 16 Apr 2005 14:57:38 +0000 (14:57 +0000)]
- 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@. [1]
- In tick_start() don't reset the tick counter of the boot processor to
  zero. It's initially reset in _start() and afterwards but _before_
  tick_start() is called on the BSP the APs synchronise with the tick
  counter of the BSP in mp_startup(). Resetting the tick counter of the
  BSP in tick_start() probably also was the cause of problems seen when
  using the CPU tick counter as timecounter on SMP machines.
  Not resetting the tick counter of the BSP in mp_startup() makes the
  tick counters and tick interrupts between the BSP and APs be pretty
  much in sync as it's supposed to be. This also means there's no longer
  a real reason to have separate tick_start() and tick_start_ap() so
  merge them and zap tick_start_ap(). This is also a first step in
  simplifying the interface to the tick counters in preparation to use
  alternate clock hardware where available.
- Switch to the algorithm used on FreeBSD/ia64 for updating the tick
  interrupt register and which compensates the clock drift caused by
  varying delays between when the tick interrupts actually trigger and
  when they are serviced. Not compensating the clock drift mainly hurts
  interactive performance especially when using WITNESS. [2]
  For further information about the algorithm also see the commit log
  of sys/ia64/ia64/interrupt.c rev. 1.38.
  On sparc64 the sysctls for monitoring the behaviour of the tick
  interrupts are machdep.tick.adjust_edges, machdep.tick.adjust_excess,
  machdep.tick.adjust_missed and machdep.tick.adjust_ticks.
- 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.
- In tick_start() check for a rough upper limit of HZ.
- Some minor changes, e.g. use FBSDID, remove unused headers, etc.

Info obtained from: Linux [1]
Ok'ed by: marcel [2]
Additional testing by: kris (earlier version of the workaround), jhb
X-MFC after: 3 days [1]

19 years agoFix a style(9) bug in the stxa_sync() macro (DO NOT use function calls
marius [Sat, 16 Apr 2005 14:47:50 +0000 (14:47 +0000)]
Fix a style(9) bug in the stxa_sync() macro (DO NOT use function calls
in initializers).

19 years agoIntroduce new MAC Framework and MAC Policy entry points to control the use
rwatson [Sat, 16 Apr 2005 13:29:15 +0000 (13:29 +0000)]
Introduce new MAC Framework and MAC Policy entry points to control the use
of system calls to manipulate elements of the process credential,
including:

        setuid()                mac_check_proc_setuid()
        seteuid()               mac_check_proc_seteuid()
        setgid()                mac_check_proc_setgid()
        setegid()               mac_check_proc_setegid()
        setgroups()             mac_check_proc_setgroups()
        setreuid()              mac_check_proc_setreuid()
        setregid()              mac_check_proc_setregid()
        setresuid()             mac_check_proc_setresuid()
        setresgid()             mac_check_rpoc_setresgid()

MAC checks are performed before other existing security checks; both
current credential and intended modifications are passed as arguments
to the entry points.  The mac_test and mac_stub policies are updated.

Submitted by: Samy Al Bahra <samy@kerneled.org>
Obtained from: TrustedBSD Project

19 years agoXref ataraid(4).
brueffer [Sat, 16 Apr 2005 12:43:17 +0000 (12:43 +0000)]
Xref ataraid(4).

19 years agoManual page for the ataraid(4) software RAID driver.
brueffer [Sat, 16 Apr 2005 12:40:38 +0000 (12:40 +0000)]
Manual page for the ataraid(4) software RAID driver.

Reviewed by: sos

19 years agoUnbreak the build on 64-bit architectures.
des [Sat, 16 Apr 2005 12:37:16 +0000 (12:37 +0000)]
Unbreak the build on 64-bit architectures.

19 years agoAdd ALQ and KTR_ALQ to NOTES so that they are built into LINT.
rwatson [Sat, 16 Apr 2005 12:14:43 +0000 (12:14 +0000)]
Add ALQ and KTR_ALQ to NOTES so that they are built into LINT.

19 years agoModify the alq(9) alq_open() API to accept a file creation mode, rather
rwatson [Sat, 16 Apr 2005 12:12:27 +0000 (12:12 +0000)]
Modify the alq(9) alq_open() API to accept a file creation mode, rather
than defaulting the cmode argument to vn_open() to 0.  Supply a default
argument of ALQ_DEFAULT_CMODE (0600) in current callers.

Discussed with/pointed out by: hmp
Reveiwed by: jeff, hmp
MFC after: 3 days

19 years agoStarting point for a regression test for mac_bsdextended(4)/libugidfw(3).
rwatson [Sat, 16 Apr 2005 12:06:40 +0000 (12:06 +0000)]
Starting point for a regression test for mac_bsdextended(4)/libugidfw(3).
Currently only performs basic tests against the library string routines,
and queries less important kernel state.

Obtained from: TrustedBSD Project
Sponsored by: SPAWAR, SPARTA
MFC after: 3 days

19 years agoWhen parsing the second {uid,gid} in an identity phrase for ugidfw,
rwatson [Sat, 16 Apr 2005 11:58:55 +0000 (11:58 +0000)]
When parsing the second {uid,gid} in an identity phrase for ugidfw,
check the password or group database before attempting to parse as an
integer, as is done for the first {uid,gid} in an identity phrase.

Obtained from: TrustedBSD Project
Sponsored by: SPAWAR, SPARTA

19 years agoIn practice, you need to include <sys/types.h> and
rwatson [Sat, 16 Apr 2005 11:32:46 +0000 (11:32 +0000)]
In practice, you need to include <sys/types.h> and
<security/mac_bsdextended/mac_bsdextended.h> in order to include
<ugidfw.h>, so document that.

MFC after: 3 days

19 years ago- Plug memory leak.
pjd [Sat, 16 Apr 2005 10:57:49 +0000 (10:57 +0000)]
- Plug memory leak.
- Fix two style nits.

Found by: Coverity Prevent analysis tool
Reviewed by: rwatson
MFC after: 1 week

19 years agoReturn better "error" values for UWX_BOTTOM and UWX_ABI_FRAME in
marcel [Sat, 16 Apr 2005 05:38:59 +0000 (05:38 +0000)]
Return better "error" values for UWX_BOTTOM and UWX_ABI_FRAME in
unw_step(). Both errors denote the end of a stack trace (i.e. no
prior frame), but are otherwise not error conditions.
Have db_trace() return 0 when the trace ends due to one of these
return codes as they are really normal termination conditions.

This change especially improves the output of the "show thread"
command in DDB when there are threads in fork_trampoline() and
previously db_trace() would return an error, causing the show
command to emit '***'.

19 years agoGrr, fix another braino.
ru [Sat, 16 Apr 2005 05:34:48 +0000 (05:34 +0000)]
Grr, fix another braino.

19 years agoFix braino in previous revision.
ru [Sat, 16 Apr 2005 05:33:42 +0000 (05:33 +0000)]
Fix braino in previous revision.

19 years agoWhen setting up the new stack for a function in x86_64_wrap(), make
wpaul [Sat, 16 Apr 2005 04:47:15 +0000 (04:47 +0000)]
When setting up the new stack for a function in x86_64_wrap(), make
sure to make it 16-byte aligned, in keeping with amd64 calling
convention requirements.

Submitted by: Mikore Li at sun dot com

19 years agoUpdate to DRM CVS as of 2005-04-12, bringing many changes:
anholt [Sat, 16 Apr 2005 03:44:47 +0000 (03:44 +0000)]
Update to DRM CVS as of 2005-04-12, bringing many changes:
- Split core DRM routines back into their own module, rather than using the
  nasty templated system like before.
- Development-class R300 support in radeon driver (requires userland pieces, of
  course).
- Mach64 driver (haven't tested in a while -- my mach64s no longer fit in the
  testbox).  Covers Rage Pros, Rage Mobility P/M, Rage XL, and some others.
- i915 driver files, which just need to get drm_drv.c fixed to allow attachment
  to the drmsub device.  Covers i830 through i915 integrated graphics.
- savage driver files, which should require minimal changes to work.  Covers the
  Savage3D, Savage IX/MX, Savage 4, ProSavage.
- Support for color and texture tiling and HyperZ features of Radeon.

Thanks to: scottl (much p4 handholding)
Jung-uk Kim (helpful prodding)
PR: [1] kern/76879, [2] kern/72548
Submitted by: [1] Alex, lesha at intercaf dot ru
[2] Shaun Jurrens, shaun at shamz dot net

19 years agoFix mbnambuf support for multi-byte characters. If a substring is larger
njl [Sat, 16 Apr 2005 01:49:50 +0000 (01:49 +0000)]
Fix mbnambuf support for multi-byte characters.  If a substring is larger
than WIN_CHARS bytes, we shift the suffix (previous substrings) upwards
by the amount this substring exceeds its WIN_CHARS slot.  Profiling shows
this change is indistinguishable from the previous code at 95% confidence.
This bug would result in attempts to access or create files or directories
with multi-byte characters returning an error but no data loss.

Reported and tested by: avatar
MFC after: 3 days

19 years agoDocument 'clear' and 'dump' subcommands.
pjd [Fri, 15 Apr 2005 23:51:20 +0000 (23:51 +0000)]
Document 'clear' and 'dump' subcommands.

MFC after: 1 week

19 years agoAdd a vm.blacklist tunable which can hold a space or comma seperated list
jhb [Fri, 15 Apr 2005 21:45:02 +0000 (21:45 +0000)]
Add a vm.blacklist tunable which can hold a space or comma seperated list
of physical addresses.  The pages containing these physical addresses will
not be added to the free list and thus will effectively be ignored by the
VM system.  This is mostly useful for the case when one knows of specific
physical addresses that have bit errors (such as from a memtest run) so
that one can blacklist the bad pages while waiting for the new sticks of
RAM to arrive.  The physical addresses of any ignored pages are listed in
the message buffer as well.

19 years ago- Add Dell PERC 4ei to the list of supported devices. It's an
simon [Fri, 15 Apr 2005 21:18:31 +0000 (21:18 +0000)]
- 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.

MFC after: 1 day
Rapported by: Jon Kuster <kwsn@earthlink.net> [1]

19 years agoRemove NO_MIXED_MODE option
peter [Fri, 15 Apr 2005 18:48:27 +0000 (18:48 +0000)]
Remove NO_MIXED_MODE option

19 years agoMFi386: sync rtc code - don't setup an interrupt handler for irq0 when
peter [Fri, 15 Apr 2005 18:46:53 +0000 (18:46 +0000)]
MFi386: sync rtc code - don't setup an interrupt handler for irq0 when
the lapic timer is active.  Don't enable periodic interrupts unless we are
using them.  Replace spl protection with a spinlock.

19 years agoMFi386: remove NO_MIXED_MODE
peter [Fri, 15 Apr 2005 18:45:07 +0000 (18:45 +0000)]
MFi386: remove NO_MIXED_MODE

19 years agoMFi386: use the lapic timer for UP systems that are using the apic so that
peter [Fri, 15 Apr 2005 18:44:53 +0000 (18:44 +0000)]
MFi386: use the lapic timer for UP systems that are using the apic so that
IRQ0 and mixed mode isn't a problem anymore.  This removes mixed mode
support because nothing is left that uses it.

19 years agoMFi386: use c99 types
peter [Fri, 15 Apr 2005 18:41:32 +0000 (18:41 +0000)]
MFi386: use c99 types

19 years agoShow that I can actually count.
peter [Fri, 15 Apr 2005 18:39:31 +0000 (18:39 +0000)]
Show that I can actually count.

19 years agoMFi386: track bus.h changes (unsplit bus_${machine}.h)
peter [Fri, 15 Apr 2005 18:38:59 +0000 (18:38 +0000)]
MFi386: track bus.h changes (unsplit bus_${machine}.h)

19 years agoNow, our getservbyname(3) is thread-safe. So, we don't need
ume [Fri, 15 Apr 2005 18:15:12 +0000 (18:15 +0000)]
Now, our getservbyname(3) is thread-safe.  So, we don't need
to protect it with mutex lock.

19 years ago- add getserv{byname,byport,ent}_r for internal use within libc.
ume [Fri, 15 Apr 2005 18:09:39 +0000 (18:09 +0000)]
- add getserv{byname,byport,ent}_r for internal use within libc.
- make getserv{byname,byport,ent} thread-safe.

Reviewed by: gnn

19 years agoVarious sh(1) enhancements:
keramida [Fri, 15 Apr 2005 14:53:29 +0000 (14:53 +0000)]
Various sh(1) enhancements:
- Move the description of the ``-c string'' option closer to the option itself.
- Add an ENVIRONMENT section (1)
- Add more .Xr cross references to the SEE ALSO section.

Obtained from:  NetBSD (1)

19 years agoAdd a 'SEE ALSO' section.
jkoshy [Fri, 15 Apr 2005 14:46:59 +0000 (14:46 +0000)]
Add a 'SEE ALSO' section.

19 years agohostalias() is not thread-safe. So, introduce _res_hostalias()
ume [Fri, 15 Apr 2005 14:42:29 +0000 (14:42 +0000)]
hostalias() is not thread-safe.  So, introduce _res_hostalias()
and use it.

Obtained from: BIND9

19 years agoDocument FreeBSD-SA-05:04.ifconf.
simon [Fri, 15 Apr 2005 14:27:26 +0000 (14:27 +0000)]
Document FreeBSD-SA-05:04.ifconf.

MFC after: 1 day

19 years agoMFi386: revision 1.219.
nyan [Fri, 15 Apr 2005 14:24:49 +0000 (14:24 +0000)]
MFi386: revision 1.219.

19 years agoMake things compile again with ATA_STATIC_ID.
sos [Fri, 15 Apr 2005 14:19:41 +0000 (14:19 +0000)]
Make things compile again with ATA_STATIC_ID.

19 years agoFix a typo in the comment.
maxim [Fri, 15 Apr 2005 14:01:43 +0000 (14:01 +0000)]
Fix a typo in the comment.

Noticed by: Samy Al Bahra

19 years agoTypo fix
den [Fri, 15 Apr 2005 13:13:08 +0000 (13:13 +0000)]
Typo fix

19 years agoMerge the following from the English version:
den [Fri, 15 Apr 2005 12:03:46 +0000 (12:03 +0000)]
Merge the following from the English version:

   1.832 -> 1.843 relnotes/common/new.sgml

Obtained from: The FreeBSD Russian Documentation Project

19 years agoAdd missing links.
pjd [Fri, 15 Apr 2005 10:57:34 +0000 (10:57 +0000)]
Add missing links.

MFC after: 2 weeks

19 years agoMove the creation of ata_channel child devices to the channel code.
sos [Fri, 15 Apr 2005 10:20:52 +0000 (10:20 +0000)]
Move the creation of ata_channel child devices to the channel code.
This allows to attach to the children (ATA devices) even without a
driver being attached. This allows atapi-cam to do its work both
with and without the pure ATAPI driver being present.

ATA patches by /me
ATAPI-cam pathes by Thomas

19 years ago- Return error, if there was one.
glebius [Fri, 15 Apr 2005 10:14:00 +0000 (10:14 +0000)]
- Return error, if there was one.
- No need to initialize error here.

PR: kern/79884
Submitted by: Wojciech A. Koszek

19 years agoReally remove the last vestiges of mixed mode from all but amd64.
jhb [Fri, 15 Apr 2005 06:56:52 +0000 (06:56 +0000)]
Really remove the last vestiges of mixed mode from all but amd64.

19 years agoOops, remove last mention of mixed mode.
jhb [Fri, 15 Apr 2005 06:13:31 +0000 (06:13 +0000)]
Oops, remove last mention of mixed mode.

Prodded by: marks

19 years agoZero the ifr.ifr_name buffer in ifconf() in order to avoid
cperciva [Fri, 15 Apr 2005 01:52:40 +0000 (01:52 +0000)]
Zero the ifr.ifr_name buffer in ifconf() in order to avoid
accidental disclosure of kernel memory to userland.

Security: FreeBSD-SA-05:04.ifconf

19 years agoCentralized finding the protocol header in IP packets in preperation for
brooks [Fri, 15 Apr 2005 00:47:44 +0000 (00:47 +0000)]
Centralized finding the protocol header in IP packets in preperation for
IPv6 support.  The header in IPv6 is more complex then in IPv4 so we
want to handle skipping over it in one location.

Submitted by: Mariano Tortoriello and Raffaele De Lorenzo (via luigi)

19 years agoInitialize curthread before we save the APs MCA state. Saving the
marcel [Fri, 15 Apr 2005 00:21:23 +0000 (00:21 +0000)]
Initialize curthread before we save the APs MCA state. Saving the
MCA state requires a spin lock, which requires a valid curthread.
This change allows SMP kernels to boot into multi-user again.

While here, update the copyright notice and use __FBSDID for the
revision string.

19 years agoRemove dead code.
rees [Thu, 14 Apr 2005 20:27:30 +0000 (20:27 +0000)]
Remove dead code.

PR: bin/78125
Submitted by: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
Approved by: alfred

19 years agoFix for a TCP SACK bug where more than (win/2) bytes could have been
ps [Thu, 14 Apr 2005 20:09:52 +0000 (20:09 +0000)]
Fix for a TCP SACK bug where more than (win/2) bytes could have been
in flight in SACK recovery.

Found by: Noritoshi Demizu
Submitted by: Mohan Srinivasan <mohans at yahoo-inc dot com>
Noritoshi Demizu <demizu at dd dot ij4u dot or dot jp>
Raja Mukerji <raja at moselle dot com>

19 years agoAlso test \0 in the format string.
stefanf [Thu, 14 Apr 2005 18:33:14 +0000 (18:33 +0000)]
Also test \0 in the format string.

19 years agoClose a race I introduced in the spinlock_* changes. We need to finish
jhb [Thu, 14 Apr 2005 18:30:10 +0000 (18:30 +0000)]
Close a race I introduced in the spinlock_* changes.  We need to finish
disabling interrupts before updating the saved pil in the thread.  If we
save the value first then it can be clobbered if an interrupt comes in
and the interrupt handler tries to acquire a spin lock.

Submitted by: marius

19 years agoUpdate the bugs section, null characters in the format string are now handled.
stefanf [Thu, 14 Apr 2005 18:29:59 +0000 (18:29 +0000)]
Update the bugs section, null characters in the format string are now handled.

19 years agoTrust the settings programmed by the BIOS over what the $PIR says.
jhb [Thu, 14 Apr 2005 18:25:09 +0000 (18:25 +0000)]
Trust the settings programmed by the BIOS over what the $PIR says.
Specifically, if the BIOS has programmed an IRQ for a device that doesn't
match the list of valid IRQs for the link, use it anyway as some BIOSes
don't correctly list the valid IRQs in the $PIR.  Also, allow the user
to specify an IRQ that $PIR claims is invalid as an override, but emit a
warning in that case.

19 years agoRemove support for mixed mode altogether now that we no longer use IRQ 0
jhb [Thu, 14 Apr 2005 17:59:58 +0000 (17:59 +0000)]
Remove support for mixed mode altogether now that we no longer use IRQ 0
when using an APIC.  This simplifies the APIC code somewhat and also allows
us to be pedantically more compliant with ACPI which mandates no use of
mixed mode.

19 years agoCall pci_print_verbose() before pci_add_resources() so that the order of
jhb [Thu, 14 Apr 2005 17:52:55 +0000 (17:52 +0000)]
Call pci_print_verbose() before pci_add_resources() so that the order of
printf's during a verbose boot is more intuitive (the BAR listings and
interrupt routing info now comes after the config header dump rather than
just before it).

19 years agoHandle null characters in the format string. A \0 in the argument passed to %b
stefanf [Thu, 14 Apr 2005 17:02:34 +0000 (17:02 +0000)]
Handle null characters in the format string.  A \0 in the argument passed to %b
still results in trucation but this is be much harder to fix.

19 years agoImplement 32-bit compatable fsbase/gsbase methods so that we can run
peter [Thu, 14 Apr 2005 16:57:58 +0000 (16:57 +0000)]
Implement 32-bit compatable fsbase/gsbase methods so that we can run
(newer) unmodified static i386 binaries again.

19 years agoMove MAC check_vnode_mmap entry point out from being exclusive to
csjp [Thu, 14 Apr 2005 16:03:30 +0000 (16:03 +0000)]
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.

Reviewed by: rwatson
MFC after: 1 month

19 years agoIn ppsintr, we needed ppsdev to get to the softc and nothing else.
imp [Thu, 14 Apr 2005 15:56:10 +0000 (15:56 +0000)]
In ppsintr, we needed ppsdev to get to the softc and nothing else.
Save a memory dereference in the ISR by passing this in directly.
Calling pps_capture is MP safe for all other operations on struct
pps_state, so there's no need to aquire the lock before we do this,
even from a fast ISR.  Avoid dereferencing sc->ppbus until after
pps_capture is called as well.  These actions reduce somewhat the
cache effects that cause variance in interrupt times.  On an
especially slow test machine (300MHz Cyrix GXm), this reduces the
interrupt latency about about 10% (from 21us to 19us) and helps a
little with the variance (although most of the variance seems to be
caused by lots of interrupt masking).

This also happens fixes one or two of bde's style issues.

19 years agoNo reason to write \a and \v as octal escape sequences.
stefanf [Thu, 14 Apr 2005 15:32:21 +0000 (15:32 +0000)]
No reason to write \a and \v as octal escape sequences.

19 years ago- Add a THR column to the process listing, that shows the number of
keramida [Thu, 14 Apr 2005 15:02:03 +0000 (15:02 +0000)]
- Add a THR column to the process listing, that shows the number of
  threads a process has.  The THR column is disabled and disappears
  when 'H' is hit, because then every thread gets its own output line.
- Allow sorting processes by "threads".

Approved by: davidxu
Inspired by: Jiawei Ye <leafy7382@gmail.com>

19 years agoCorrect typo.
brueffer [Thu, 14 Apr 2005 14:40:09 +0000 (14:40 +0000)]
Correct typo.

Obtained from: OpenBSD

19 years agoUnbreak the vector_page == 0x00000000 case. Map the vector page L1PT into the
cognet [Thu, 14 Apr 2005 14:32:32 +0000 (14:32 +0000)]
Unbreak the vector_page == 0x00000000 case. Map the vector page L1PT into the
kernel domain for each pmap, as we don't update the page table when we're
switching to a kernel thread, but we do however update the DACR.

19 years agoMFi386: revision 1.612.
nyan [Thu, 14 Apr 2005 14:19:47 +0000 (14:19 +0000)]
MFi386: revision 1.612.

19 years agoMFi386: revision 1.20.
nyan [Thu, 14 Apr 2005 14:12:54 +0000 (14:12 +0000)]
MFi386: revision 1.20.

19 years agoMerge the following from the English version:
den [Thu, 14 Apr 2005 13:29:07 +0000 (13:29 +0000)]
Merge the following from the English version:

   1.30 -> 1.31 install.sgml
   1.9 -> 1.10 layout.sgml
   1.16 -> 1.17 trouble.sgml

Obtained from: The FreeBSD Russian Documentation Project

19 years agoremove needless res_init() call.
ume [Thu, 14 Apr 2005 11:44:43 +0000 (11:44 +0000)]
remove needless res_init() call.

Inspired by: NetBSD

19 years agoRemove dead code which would never execute.
gnn [Thu, 14 Apr 2005 11:41:23 +0000 (11:41 +0000)]
Remove dead code which would never execute.
    i.e. checking to see if a cluster was every less than 48 bytes,
    a rather unlikely case.

Check return value of m_dup_pkthdr() calls.

Found by: Coverity
Reviewed by: rwatson (mentor), Keiichi Shima (for Kame)
Approved by: rwatson (mentor)

19 years agoRead back the real taskfile register values when in 48BIT mode.
sos [Thu, 14 Apr 2005 08:48:45 +0000 (08:48 +0000)]
Read back the real taskfile register values when in 48BIT mode.

19 years agoPrintf(1) is WARNS 6 clean.
stefanf [Thu, 14 Apr 2005 08:43:36 +0000 (08:43 +0000)]
Printf(1) is WARNS 6 clean.

19 years ago- Move parts of the long main() function into a new function doformat().
stefanf [Thu, 14 Apr 2005 08:40:28 +0000 (08:40 +0000)]
- Move parts of the long main() function into a new function doformat().
- Rewrite the loop in main() to be more understandable.

19 years ago - cache_lookup() relocks the parent in the DOTDOT case for us.
jeff [Thu, 14 Apr 2005 07:08:34 +0000 (07:08 +0000)]
 - cache_lookup() relocks the parent in the DOTDOT case for us.

Spotted by: phk
Sponsored by: Isilon Systems, Inc.

19 years agoUse AcpiUtStrupr() instead of strupr() as the latter will disappear in
marks [Thu, 14 Apr 2005 06:50:13 +0000 (06:50 +0000)]
Use AcpiUtStrupr() instead of strupr() as the latter will disappear in
future versions of acpica.

MFC after: 2 weeks

19 years agoProbe PCI link devices early so that we turn them all off via _DIS before
jhb [Thu, 14 Apr 2005 06:45:24 +0000 (06:45 +0000)]
Probe PCI link devices early so that we turn them all off via _DIS before
we start turning any of them back on again.  This works around a bug in
some BIOSen that alias two different link devices for APIC vs ATPIC modes
onto the same physical hardware link.

Submitted by: njl
Tested by: Antoine Brodin antoine dot brodin at laposte dot net

19 years agoBah, add a missing cast.
jhb [Thu, 14 Apr 2005 06:33:23 +0000 (06:33 +0000)]
Bah, add a missing cast.

19 years agoClose a race between sleepq_broadcast() and sleepq_catch_signals().
jhb [Thu, 14 Apr 2005 06:30:32 +0000 (06:30 +0000)]
Close a race between sleepq_broadcast() and sleepq_catch_signals().
Specifically, sleepq_broadcast() uses td_slpq for its private pending
queue of threads that it is going to wake up after it takes them off the
sleep queue.  The problem is that if one of the threads is actually not
asleep yet, then we can end up with td_slpq being corrupted and/or the
thread being made runnable at the wrong time resulting in the td_sleepqueue
== NULL assertion failures occasionally reported under heavy load.

The fix is to stop being so fancy and ditch the whole pending queue bit.
Instead, sleepq_remove_thread() and sleepq_resume_thread() were merged
into one function that requires the caller to hold sched_lock.  This
fixes several places that unlocked sched_lock only to call a function
that then locked sched_lock, so even though sched_lock is now held
slightly longer, removing the extra lock acquires (1 pair instead of 3
in some cases) probably makes it an overall win if you don't include the
fact that it closes a race.  This is definitely a 5.4 candidate.

PR: kern/79693
Submitted by: Steven Sears stevenjsears at yahoo dot com
MFC after: 4 days

19 years agoAlways use the local APIC timer, even on UP machines.
jhb [Thu, 14 Apr 2005 05:56:17 +0000 (05:56 +0000)]
Always use the local APIC timer, even on UP machines.

19 years agoIf an I/O APIC returns 0xffffffff for its version register after we map it,
jhb [Thu, 14 Apr 2005 05:55:34 +0000 (05:55 +0000)]
If an I/O APIC returns 0xffffffff for its version register after we map it,
assume it is bogus and return NULL instead of trying to parse it as an
APIC.

Inspired by: linux bug reports via njl

19 years agorev 1.54 of i386/include/pcb.h depended on sys/proc.h. The prerequisite
peter [Thu, 14 Apr 2005 05:25:40 +0000 (05:25 +0000)]
rev 1.54 of i386/include/pcb.h depended on sys/proc.h.  The prerequisite
was satisified for the rest of the kernel on the i386 build except for
these two files.  Rather than adding a submarine include to pcb.h, I've
added proc.h here.

I forgot to include these with the original commit. Sorry folks.

19 years agoMake sure we look at the correct sub op codes when
mjacob [Thu, 14 Apr 2005 04:51:18 +0000 (04:51 +0000)]
Make sure we look at the correct sub op codes when
deciding whether it's an operation we can perform
via the control device.

PR: kern/72010
MFC after: 1 week

19 years agoTake constructive advice from njl && reformat
mjacob [Thu, 14 Apr 2005 04:46:46 +0000 (04:46 +0000)]
Take constructive advice from njl && reformat
previously added quirks slightly.

19 years agoQuirk for ZICPlay USB MP3 Player.
njl [Thu, 14 Apr 2005 04:31:48 +0000 (04:31 +0000)]
Quirk for ZICPlay USB MP3 Player.

PR: kern/75057
Submitted by: Aurelien Nephtali <aurelien.nephtali wanadoo.fr>

19 years agoIt seems I introduced a new prerequisite for <machine/pcb.h> on i386,
peter [Thu, 14 Apr 2005 04:13:27 +0000 (04:13 +0000)]
It seems I introduced a new prerequisite for <machine/pcb.h> on i386,
which is included from <sys/user.h>.  Add a bandaid for userland.

19 years agoApply quirk.
mjacob [Thu, 14 Apr 2005 04:12:45 +0000 (04:12 +0000)]
Apply quirk.

PR: 57469
Submitted by: walter@pelissero.de
MFC after: 1 week

19 years agoApplied conservative version of suggested quirk.
mjacob [Thu, 14 Apr 2005 04:05:00 +0000 (04:05 +0000)]
Applied conservative version of suggested quirk.

PR: 57468
Submitted by: walter@pelissero.de
MFC after: 1 week

19 years agoApply quirk suggested by submitter.
mjacob [Thu, 14 Apr 2005 03:59:48 +0000 (03:59 +0000)]
Apply quirk suggested by submitter.

PR: 75486
Submitted by: no_bs@web.de
MFC after: 1 week

19 years agoDo not remove logging sockets. This fixes an issue where logging
csjp [Thu, 14 Apr 2005 03:56:06 +0000 (03:56 +0000)]
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).

Discussed with: pjd, green, cperciva
MFC after: 1 week

19 years agoThe divide by zero panic must have been due to a bogus
mjacob [Thu, 14 Apr 2005 03:52:50 +0000 (03:52 +0000)]
The divide by zero panic must have been due to a bogus
period value. I suppose the BT adapter driver should be
fixed, but more importantly we should protect against
dividing by zero.

PR: kern/75603
MFC after: 1 week

19 years agoAllow user processes to completely empty out their LDT, now that user
peter [Thu, 14 Apr 2005 03:16:58 +0000 (03:16 +0000)]
Allow user processes to completely empty out their LDT, now that user
processes run from segment selectors that live in the GDT.  Doing this
used to be equivalent to committing suicide, but now this is a NOP.

19 years agoAdapt the libpthread patch for using i386_set_gsbase() to libthr.
peter [Thu, 14 Apr 2005 00:44:07 +0000 (00:44 +0000)]
Adapt the libpthread patch for using i386_set_gsbase() to libthr.

19 years agoUse the i386_set_gsbase() syscall if it is implemented in the kernel.
peter [Thu, 14 Apr 2005 00:13:20 +0000 (00:13 +0000)]
Use the i386_set_gsbase() syscall if it is implemented in the kernel.

This is a little hairy here because the allocation and usage of this
functionality is split into two places in libpthread.

19 years agoAttempt to use i386_set_gsbase(), and gracefully fall back to LDT methods
peter [Thu, 14 Apr 2005 00:04:50 +0000 (00:04 +0000)]
Attempt to use i386_set_gsbase(), and gracefully fall back to LDT methods
if the direct access methods are not implemented.