]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoCorrect a typo.
jkoshy [Sun, 3 Feb 2008 06:04:38 +0000 (06:04 +0000)]
Correct a typo.

16 years agoEliminate xargs in favor of find -exec {} +
des [Sun, 3 Feb 2008 00:33:05 +0000 (00:33 +0000)]
Eliminate xargs in favor of find -exec {} +

16 years agoAdd a few more CPUID feature bits while here. We don't support these
das [Sat, 2 Feb 2008 23:17:27 +0000 (23:17 +0000)]
Add a few more CPUID feature bits while here. We don't support these
features yet.

16 years agoSSE4 CPUID bits
das [Sat, 2 Feb 2008 22:40:17 +0000 (22:40 +0000)]
SSE4 CPUID bits

16 years agoAdd comment that bpfread() has multi-threading issues.
rwatson [Sat, 2 Feb 2008 20:35:05 +0000 (20:35 +0000)]
Add comment that bpfread() has multi-threading issues.

Fix minor white space nit.

16 years agopc98 lint builds w/o warnings. Remove the last special case from our
imp [Sat, 2 Feb 2008 19:55:28 +0000 (19:55 +0000)]
pc98 lint builds w/o warnings.  Remove the last special case from our
compiler upgrade.

# if tinderbox breaks, I'll fix it, but it shouldn't...

16 years agoThis commit was generated by cvs2svn to compensate for changes in r175898,
obrien [Sat, 2 Feb 2008 18:26:53 +0000 (18:26 +0000)]
This commit was generated by cvs2svn to compensate for changes in r175898,
which included commits to RCS files with non-trunk default branches.

16 years agoFix some bugs in dealing with DCMD'd without data. MegaCli was sending
ambrisko [Sat, 2 Feb 2008 17:29:28 +0000 (17:29 +0000)]
Fix some bugs in dealing with DCMD'd without data.  MegaCli was sending
down some DCMD's without any data.  Thanks to Dell and LSI for helping
to provide clues to figure out this problem.  Now MegaCli can upgrade
the firmware and should work identical when run on Linux.

Reviewed by: scottl, LSI
MFC after: 1 day

16 years agoArm should build fine with -Werror as well.
cognet [Sat, 2 Feb 2008 16:47:15 +0000 (16:47 +0000)]
Arm should build fine with -Werror as well.

16 years agosun4v has a MACHINE_ARCH of sparc64, so it was covered under that clause and
imp [Sat, 2 Feb 2008 16:40:40 +0000 (16:40 +0000)]
sun4v has a MACHINE_ARCH of sparc64, so it was covered under that clause and
shouldn't have been added.  Remove it.

16 years agoRather than passing around a cached 'priv', pass in an ucred to
bz [Sat, 2 Feb 2008 14:11:31 +0000 (14:11 +0000)]
Rather than passing around a cached 'priv', pass in an ucred to
ipsec*_set_policy and do the privilege check only if needed.

Try to assimilate both ip*_ctloutput code blocks calling ipsec*_set_policy.

Reviewed by: rwatson

16 years agoRewrite to consume significantly less memory, by using find -s instead of
des [Sat, 2 Feb 2008 12:27:37 +0000 (12:27 +0000)]
Rewrite to consume significantly less memory, by using find -s instead of
find | sort.  As a bonus, this simplifies the logic considerably.  Also
remove the bogus "overruning the args to ls" comment and the corresponding
"-n 20" argument to xargs; the whole point with xargs is precisely that it
knows how large the argument list can safely get.

Note that the first run of the updated script may hypotheticall produce
false positives due to differences between find's and sort's sorting
algorithm.  I haven't seen this during testing, but others might.

MFC after: 2 weeks

16 years agoFix one more grammo.
marck [Sat, 2 Feb 2008 08:41:53 +0000 (08:41 +0000)]
Fix one more grammo.

Noticed by: ru

16 years agoSome platforms that are currently under development have to cope with
imp [Sat, 2 Feb 2008 07:52:24 +0000 (07:52 +0000)]
Some platforms that are currently under development have to cope with
a variety of bootloaders.  This sometimes means that different loader
scripts are required within one ${MACHINE_ARCH}, which makes the
current practice of using ldscript.${MACHINE_ARCH} unsuitable.
Instead, make the default the current convention and allow the ld
scripts to be overridden as necessary.

16 years agoWall of shame rather than wall of fame for the -Werror suppression.
imp [Sat, 2 Feb 2008 07:43:38 +0000 (07:43 +0000)]
Wall of shame rather than wall of fame for the -Werror suppression.
If we aren't arm, pc98 or sun4v, then enable treating warnings like
errors.  That doesn't mean these platforms aren't -Werror clean, just
that we haven't enforced it before.  Someone with some spare time
should investigate these three platforms to see if any can be removed.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r175882,
obrien [Sat, 2 Feb 2008 07:19:01 +0000 (07:19 +0000)]
This commit was generated by cvs2svn to compensate for changes in r175882,
which included commits to RCS files with non-trunk default branches.

16 years agoFix nit in version 4.23 in which -p does not work (thus updating access
obrien [Sat, 2 Feb 2008 07:19:01 +0000 (07:19 +0000)]
Fix nit in version 4.23 in which -p does not work (thus updating access
times when it shouldn't).  The PR's patch has been incorporated upstream
as magic.c rev 1.46.

PR: 107676
Submitted by: Dr. Markus Waldeck <waldeck@gmx.de>

16 years agoadd opaque pointer to tx ampdu state for drivers
sam [Sat, 2 Feb 2008 00:38:02 +0000 (00:38 +0000)]
add opaque pointer to tx ampdu state for drivers

MFC after: 3 days

16 years agoWhen the state of the interface changes rapidly enough (usually due to
brooks [Fri, 1 Feb 2008 23:43:58 +0000 (23:43 +0000)]
When the state of the interface changes rapidly enough (usually due to
rapid wireless association changes in my experience), there is a race
where dhclient is in the process of exiting due to the link going down
when the link coming up causes devd to try and start a new one.  This
results is the link being up, but no dhclient running.

Work around this race by checking a second time after a one second delay
before refusing to start a dhclient instance due to one already being
running.

MFC after: 1 week

16 years agoo correct typo that broke check when handling addba response
sam [Fri, 1 Feb 2008 21:31:10 +0000 (21:31 +0000)]
o correct typo that broke check when handling addba response
o add a comment about the ht rates being for 20MHz channels w/ long GI;
  needs a separate fix after more thought

MFC after: 3 days

16 years agoRelax the check for a PCI-express chipset by assuming the system is a
jhb [Fri, 1 Feb 2008 20:31:09 +0000 (20:31 +0000)]
Relax the check for a PCI-express chipset by assuming the system is a
PCI-express chipset (and thus has functional MSI) if there are any
PCI-express devices in the system, not requiring a root port device.

With PCI-X the chipset detection has to be very conservative because there
are known systems with PCI-X devices that do not appear to have PCI-X
chipsets.  However, with PCI-express I'm not sure it is possible to have
a PCI-express device in a system with a non-PCI-express chipset.  If we
assume that is the case then this change is valid.  It is also required
for at least some PCI-express systems that don't have any devices with
a root port capability (some ICH9 systems).

MFC after: 1 week
Reported by: jfv

16 years agoUpdate korean locale messages:
jkim [Fri, 1 Feb 2008 20:15:21 +0000 (20:15 +0000)]
Update korean locale messages:

- Remove redundant `s' and `S' from yesexpr.
- Add fullwidth latin letters to yesexpr and noexpr (inspired by ja_JP.UTF-8).
- Add korean translated yesexpr (`Ye') and noexpr (`Anio').
- Add yesstr and nostr entries (inspired by zh_CN.*).
- Add UTF-8 encoded file and connect to build.

16 years agoGive MEXTADD() another argument to make both void pointers to the
phk [Fri, 1 Feb 2008 19:36:27 +0000 (19:36 +0000)]
Give MEXTADD() another argument to make both void pointers to the
free function controlable, instead of passing the KVA of the buffer
storage as the first argument.

Fix all conventional users of the API to pass the KVA of the buffer
as the first argument, to make this a no-op commit.

Likely break the only non-convetional user of the API, after informing
the relevant committer.

Update the mbuf(9) manual page, which was already out of sync on
this point.

Bump __FreeBSD_version to 800016 as there is no way to tell how
many arguments a CPP macro needs any other way.

This paves the way for giving sendfile(9) a way to wait for the
passed storage to have been accessed before returning.

This does not affect the memory layout or size of mbufs.

Parental oversight by: sam and rwatson.

No MFC is anticipated.

16 years agoReword recent comment a bit.
marck [Fri, 1 Feb 2008 17:35:46 +0000 (17:35 +0000)]
Reword recent comment a bit.

16 years agoUse FEATURE() macro to advertise aio availability.
rwatson [Fri, 1 Feb 2008 11:59:14 +0000 (11:59 +0000)]
Use FEATURE() macro to advertise aio availability.

16 years agoAdd comments about stack protection mechanism.
mav [Fri, 1 Feb 2008 11:01:15 +0000 (11:01 +0000)]
Add comments about stack protection mechanism.

16 years agoTune the message for better informativity.
mav [Fri, 1 Feb 2008 07:25:06 +0000 (07:25 +0000)]
Tune the message for better informativity.
Print the hook pointer as other functions do.

16 years agoBand-aid recent commit by mav by replacing a variable in a CTR statement with
benno [Fri, 1 Feb 2008 07:17:26 +0000 (07:17 +0000)]
Band-aid recent commit by mav by replacing a variable in a CTR statement with
the variable that appears as if it should've been there.

Pointy hat to: mav
Not tested either by: benno

16 years agoImplement Session-ID hashing to improve receive performance scalability
mav [Thu, 31 Jan 2008 22:42:37 +0000 (22:42 +0000)]
Implement Session-ID hashing to improve receive performance scalability
for big number of concurrent sessions.

16 years agoWhen reinitializing a lockuser, don't assume that the lock is in
deischen [Thu, 31 Jan 2008 19:38:26 +0000 (19:38 +0000)]
When reinitializing a lockuser, don't assume that the lock is in
use.  If it is in use, use the watched request, otherwise use the
lockuser's own request.  Only allocate a lockuser request if both
requests are null.

PR: 119920
Tested by (6.x): Landon Fuller <landonf -at- bikemonkey -dot- org>

16 years agoFix an indentation.
jkim [Thu, 31 Jan 2008 16:58:07 +0000 (16:58 +0000)]
Fix an indentation.

16 years agoThe devstat(3) manpage claims that only <devstat.h> is needed as a
jhb [Thu, 31 Jan 2008 16:55:12 +0000 (16:55 +0000)]
The devstat(3) manpage claims that only <devstat.h> is needed as a
prerequisite for using this interface.  However, the 'statinfo' struct
actually references CPUSTATES from <sys/resource.h>, so in fact it
requires <sys/resource.h> to compile.  Use a nested include of
<sys/resource.h> to make the code match the docs.

Reported by: Pietro Cerutti  gahr | gahr.ch

16 years agoDo not sanitize disk geometry if it is set by scripts in non-interactive mode.
jkim [Thu, 31 Jan 2008 16:54:02 +0000 (16:54 +0000)]
Do not sanitize disk geometry if it is set by scripts in non-interactive mode.

MFC after: 3 days

16 years agoFor no good reason I had assumed that ACPI table headers would be page
jhb [Thu, 31 Jan 2008 16:51:43 +0000 (16:51 +0000)]
For no good reason I had assumed that ACPI table headers would be page
aligned (or at least not cross a page boundary).  However, it turns out
that on at least one machine one table header does cross a page boundary.
This caused problems with the MADT early probe as it uses the crash dump
map to load ACPI tables by loading the RSDT/XSDT into pages 1 ... N and
loading the header of each ACPI table header into page 0 looking for the
MADT.  However, if a table header crossed a page boundary, then page 1
would get trashed resulting in a panic.  Fix this by reserving the first
2 pages for ACPI table headers (headers are less than a page in size,
so 2 pages will be sufficient) and use pages 2 .. N for the RSDT and XSDT.

Note: amd64 should probably be simplified to just use pmap_mapbios()
for all these tables which will use the direct map and not need the
crash dump hack.

MFC after: 5 days
Tested on: i386
Reported by: Pete French  petefrench of ticketswitch.com

16 years agoUse dump_write() instead of direct calls to di->dumper() in textdumps.
rwatson [Thu, 31 Jan 2008 16:22:14 +0000 (16:22 +0000)]
Use dump_write() instead of direct calls to di->dumper() in textdumps.
Textdumps already do pretty much the same sanity checking, but
abstractions and seatbelts are both useful.

MFC after: 2 months

16 years agoDe-sparc64-ify (now that it's also installed on PowerPC).
ru [Thu, 31 Jan 2008 14:58:55 +0000 (14:58 +0000)]
De-sparc64-ify (now that it's also installed on PowerPC).

16 years agoSpot two more bugs WRT adherence to the local prompt style.
yar [Thu, 31 Jan 2008 13:22:13 +0000 (13:22 +0000)]
Spot two more bugs WRT adherence to the local prompt style.

16 years agoUse consistent style in user prompts: the question is in a new line
yar [Thu, 31 Jan 2008 13:16:29 +0000 (13:16 +0000)]
Use consistent style in user prompts: the question is in a new line
and begins with a capital letter.  The rest of pwarn/ask pairs here
follows this style.

Requested by: bde

16 years agoSome code reformat.
mav [Thu, 31 Jan 2008 10:13:04 +0000 (10:13 +0000)]
Some code reformat.

16 years agoImplement stack protection based on GET_STACK_USAGE() macro.
mav [Thu, 31 Jan 2008 08:51:48 +0000 (08:51 +0000)]
Implement stack protection based on GET_STACK_USAGE() macro.
This fixes system panics possible with complicated netgraph setups
and allows to avoid unneded extra queueing for stack unwrapping.

16 years agoMove GET_STACK_USAGE from MI header to i386/amd64 MD ones.
mav [Thu, 31 Jan 2008 08:24:27 +0000 (08:24 +0000)]
Move GET_STACK_USAGE from MI header to i386/amd64 MD ones.
Somebody who can, please feel free to implement it for other archs
or copy this one if it suits.

16 years agoCorrect two problems relating to sorflush(), which is called to flush
rwatson [Thu, 31 Jan 2008 08:22:24 +0000 (08:22 +0000)]
Correct two problems relating to sorflush(), which is called to flush
read socket buffers in shutdown() and close():

- Call socantrcvmore() before sblock() to dislodge any threads that
  might be sleeping (potentially indefinitely) while holding sblock(),
  such as a thread blocked in recv().

- Flag the sblock() call as non-interruptible so that a signal
  delivered to the thread calling sorflush() doesn't cause sblock() to
  fail.  The sblock() is required to ensure that all other socket
  consumer threads have, in fact, left, and do not enter, the socket
  buffer until we're done flushin it.

To implement the latter, change the 'flags' argument to sblock() to
accept two flags, SBL_WAIT and SBL_NOINTR, rather than one M_WAITOK
flag.  When SBL_NOINTR is set, it forces a non-interruptible sx
acquisition, regardless of the setting of the disposition of SB_NOINTR
on the socket buffer; without this change it would be possible for
another thread to clear SB_NOINTR between when the socket buffer mutex
is released and sblock() is invoked.

Reviewed by: bz, kmacy
Reported by: Jos Backus <jos at catnook dot com>

16 years agoAdd hook routine archive_write_ar_finish() which writes the 'ar'
kaiw [Thu, 31 Jan 2008 08:11:01 +0000 (08:11 +0000)]
Add hook routine archive_write_ar_finish() which writes the 'ar'
global header if nothing else has been written before the closing of
the archive. This will change the behaviour when creating archives
without members, i.e., instead of generating a 0-size archive file, an
archive with just the global header (8 bytes in total) will be created
and it is indeed a valid archive by the definition of libarchive, thus
subsequent operation on this archive will be accepted. This especially
solves the failure caused by following sequence: (several ports do)

% ar cru libfoo.a       # without specifying obj files
% ranlib libfoo.a

Reviewed by: kientzle, jkoshy
Approved by: kientzle
Approved by: jkoshy (mentor)
Reported by: erwin
MFC after: 1 month

16 years agoAdd a test to verify compatibility with archives with
kientzle [Thu, 31 Jan 2008 07:47:38 +0000 (07:47 +0000)]
Add a test to verify compatibility with archives with
odd hardlinks.  I need to extend this to test pax extended
archives with bodies attached to hardlinks and other less-common cases.

16 years agoTighten up the heuristic that decides whether or not we should
kientzle [Thu, 31 Jan 2008 07:41:45 +0000 (07:41 +0000)]
Tighten up the heuristic that decides whether or not we should
obey or ignore the size field on a hardlink entry.  In particular,
if we're reading a non-POSIX archive, we should always ignore
the size field.

This should fix both the audio/xmcd port and the math/unixstat port.

Thanks to: Pav Lucistnik for pointing these two ports out to me.
MFC after: 7 days

16 years agoEnable ofwdump on powerpc (finally). Tested on G3 & G4 machines.
grehan [Thu, 31 Jan 2008 01:57:33 +0000 (01:57 +0000)]
Enable ofwdump on powerpc (finally). Tested on G3 & G4 machines.

Submitted by: Dan Stekloff  <dsteklof at c i s c o dot com>
Discussed with: marcel

16 years agoBring in the nice work from Mark Tinguely on arm pmap.
cognet [Thu, 31 Jan 2008 00:05:40 +0000 (00:05 +0000)]
Bring in the nice work from Mark Tinguely on arm pmap.
The only downside is that it renames pmap_vac_me_harder() to pmap_fix_cache().
From Mark's email on -arm :
pmap_get_vac_flags(), pmap_vac_me_harder(), pmap_vac_me_kpmap(), and
pmap_vac_me_user() has been rewritten as pmap_fix_cache() to be more
efficient in the kernel map case. I also removed the reference to
the md.kro_mappings, md.krw_mappings, md.uro_mappings, and md.urw_mappings
counts.

In pmap_clearbit(), we can also skip over tests and writeback/invalidations
in the PVF_MOD and PVF_REF cases if those bits are not set in the pv_flag.
PVF_WRITE will turn caching back on and remove the PV_MOD bit.

In pmap_nuke_pv(), the vm_page_flag_clear(pg, PG_WRITEABLE) has been moved
to the pmap_fix_cache().

We can be more agressive in attempting to turn caching back on by calling
pmap_fix_cache() at times that may be appropriate to turn cache on
(a kernel mapping has been removed, a write has been removed or a read
has been removed and we know the mapping does not have multiple write
mappings to a page).

In pmap_remove_pages() the cpu_idcache_wbinv_all() is moved to happen
before the page tables are NULLed because the caches are virtually
indexed and virtually tagged.

In pmap_remove_all(), the pmap_remove_write(m) is added before the
page tables are NULLed because the caches are virtually indexed and
virtually tagged. This also removes the need for the caches fixing routine
(whichever is being used pmap_vac_me_harder() or pmap_fix_cache()) to be
called on any of these mappings.

In pmap_remove(), I simplified the cache cleaning process and removed
extra TLB removals. Basically if more than PMAP_REMOVE_CLEAN_LIST_SIZE
are removed, then just flush the entire cache.

16 years agoFix two typos.
delphij [Wed, 30 Jan 2008 22:11:59 +0000 (22:11 +0000)]
Fix two typos.

16 years agoImplement GET_STACK_USAGE() macro to get the current kernel thread stack usage.
mav [Wed, 30 Jan 2008 21:24:10 +0000 (21:24 +0000)]
Implement GET_STACK_USAGE() macro to get the current kernel thread stack usage.
This implemntation made for growing down stack organization like i386/amd64
platforms have, but prefers different machine dependent version if it is present.

16 years agoAdd a note pointing to build(7) for more info.
jhb [Wed, 30 Jan 2008 19:33:18 +0000 (19:33 +0000)]
Add a note pointing to build(7) for more info.

MFC after: 1 week
Reviewed by: ru

16 years agoAllow watch(8) to use more than 10 snp* devices. This limitation was purely
rink [Wed, 30 Jan 2008 13:55:32 +0000 (13:55 +0000)]
Allow watch(8) to use more than 10 snp* devices. This limitation was purely
due to the way watch(8) looks for available snoop devices.

PR: bin/118286
Submitted by: Mykola Zubach <zuborg@advancedhosters.com>
Reviewed by: rwatson, csjp, imp (all a long time ago)
Approved by: imp (mentor) (long time ago)
MFC after: 1 week

16 years agoFix bootparamd on 64 bit platforms - at least amd64 was broken due to the
rink [Wed, 30 Jan 2008 13:48:37 +0000 (13:48 +0000)]
Fix bootparamd on 64 bit platforms - at least amd64 was broken due to the
code believing long == 64 bits and using it to store/compare IPv4 addresses.

PR: bin/112163
Submitted by: Tyler Spivey <tspivey@pcdesk.net>
Reviewed by: imp
Approved by: imp (mentor)
MFC after: 1 week

16 years agoMap 'boot' to GPT_ENT_TYPE_FREEBSD_BOOT when parsuing UUIDs so that things
jhb [Wed, 30 Jan 2008 13:29:10 +0000 (13:29 +0000)]
Map 'boot' to GPT_ENT_TYPE_FREEBSD_BOOT when parsuing UUIDs so that things
like 'gpt add -t boot' work.

MFC after: 1 week
Submitted by:  Niki Denev nike_d of cytexbg.com

16 years agoAdd unix_sorflush, a regression test for the following scenario:
rwatson [Wed, 30 Jan 2008 13:23:34 +0000 (13:23 +0000)]
Add unix_sorflush, a regression test for the following scenario:

 - Process (a) is blocked in read on a socket waiting on data.
 - Process (b) is blocked in shutdown() on a socket waiting on (a).
 - Process (c) delivers a signal to (b) interrupting its wait.

When the signal is delivered, the kernel panics as sblock() fails in
sorflush().  Even if it didn't panic, shutdown() would block potentially
indefinitely waiting for recv() to succeeded.  Fixes to follow.

Reported by: Jos Backus <jos at catnook dot com>

16 years agoChristos decided to keep the manpages in mdoc(7) format,
ru [Wed, 30 Jan 2008 12:56:59 +0000 (12:56 +0000)]
Christos decided to keep the manpages in mdoc(7) format,
so stop using our own versions of these.

16 years agoUpdate for the 4.23 import.
obrien [Wed, 30 Jan 2008 02:48:24 +0000 (02:48 +0000)]
Update for the 4.23 import.

16 years ago- Rework the kld support to hook into GDB's shared library support.
jhb [Tue, 29 Jan 2008 23:44:34 +0000 (23:44 +0000)]
- Rework the kld support to hook into GDB's shared library support.
  kgdb(8) now treats kld's as shared libraries relative to the kernel
  "binary".  Thus, you can use 'info sharedlibrary' to list the kld's
  along with 'sharedlibrary' and 'nosharedlibrary' to manage symbol
  loading and unloading.  Note that there isn't an easy way to force GDB
  to use a specific path for a shared library.  However, you can use
  'nosharedlibrary' to unload all the klds and then use 'sharedlibrary'
  to load specific klds where it gets the kld correct and use
  'add-kld' for the kld's where the default open behavior doesn't work.
  klds opened via 'sharedlibrary' (and during startup) do have their
  sections listed in 'info files'.
- Change the 'add-kld' command to use filename completion to complete its
  argument.

16 years agoDon't close the kernel bfd object during startup. Instead, leave it open
jhb [Tue, 29 Jan 2008 23:37:59 +0000 (23:37 +0000)]
Don't close the kernel bfd object during startup.  Instead, leave it open
and build a section table from the kernel file so that 'info files' output
for kgdb now matches the usage of gdb on a regular file with the exception
that we don't list sections for memory in the crash dump.

16 years agoUse target_read_memory() and extract_unsigned_integer() instead of direct
jhb [Tue, 29 Jan 2008 23:36:42 +0000 (23:36 +0000)]
Use target_read_memory() and extract_unsigned_integer() instead of direct
KVM access to read kernel pointers.

16 years agoDon't look for "foo.ko.symbols" files. GDB is smart enough to open the
jhb [Tue, 29 Jan 2008 23:36:10 +0000 (23:36 +0000)]
Don't look for "foo.ko.symbols" files.  GDB is smart enough to open the
".symbols" file automatically when you tell it to load "foo.ko" because of
the debug link.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r175801,
des [Tue, 29 Jan 2008 20:22:00 +0000 (20:22 +0000)]
This commit was generated by cvs2svn to compensate for changes in r175801,
which included commits to RCS files with non-trunk default branches.

16 years agoMerge r412 from vendor, which reintroduces _OPENPAM. See comment in the
des [Tue, 29 Jan 2008 20:22:00 +0000 (20:22 +0000)]
Merge r412 from vendor, which reintroduces _OPENPAM.  See comment in the
code for explanation.  Hopefully, this will forestall any reports of
breakage in OpenPAM-aware ports.

MFC after: 3 days

16 years agoSome clarifications to make keyboard configuration under syscons.
trhodes [Tue, 29 Jan 2008 18:28:50 +0000 (18:28 +0000)]
Some clarifications to make keyboard configuration under syscons.

PR: 89325
Submitted by: Oliver Fromme <olli@secnetix.de>
Reviewed by: emax

16 years agoUpdate this manual page to describe the extattr_list_file() and the
trhodes [Tue, 29 Jan 2008 18:15:38 +0000 (18:15 +0000)]
Update this manual page to describe the extattr_list_file() and the
extattr_list_fd() functions.

PR: 108142
Submitted by: Richard Dawe <rich@phekda.gotadsl.co.uk>
Reviewed by: kientzle

16 years agoAn average consumer of fts(3) that avoids keeping pointers to old
yar [Tue, 29 Jan 2008 17:50:29 +0000 (17:50 +0000)]
An average consumer of fts(3) that avoids keeping pointers to old
FTSENTs and uses only what fts_read() has just returned can rely
on fts_path being NUL-terminated.  Under these conditions, a plain
vanilla "%s" format can be safely used to printf an fts_path.

OK'ed by: rwatson

16 years ago\jedi-mind-trick{this is not the file you were looking for}
obrien [Tue, 29 Jan 2008 16:17:42 +0000 (16:17 +0000)]
\jedi-mind-trick{this is not the file you were looking for}

16 years agoThis commit was generated by cvs2svn to compensate for changes in r175790,
obrien [Tue, 29 Jan 2008 16:12:06 +0000 (16:12 +0000)]
This commit was generated by cvs2svn to compensate for changes in r175790,
which included commits to RCS files with non-trunk default branches.

16 years agoBring in fix for Binutils PR other/16240: Check for a failure return from
obrien [Tue, 29 Jan 2008 16:12:06 +0000 (16:12 +0000)]
Bring in fix for Binutils PR other/16240: Check for a failure return from
cplus_demangle_type.  This is the rev 1.50-1.51 change.

Our addr2line, etc.. would crash if used on C++ code that contains
certain symbol types.  One example is
_ZN13PatternDriver23StringScalarDeleteValueC1ERKNS_25ConflateStringScalarValueERKNS_25AbstractStringScalarValueERKNS_12TemplateEnumINS_12pdcomplementELZNS_16complement_namesEELZNS_14COMPLEMENTENUMEEEE

16 years agoFix link state handling in bfe(4).
yongari [Tue, 29 Jan 2008 02:15:11 +0000 (02:15 +0000)]
Fix link state handling in bfe(4).
 o conversion to callout(9) API.
 o add a missing driver lock in bfe_ifmedia_sts().
 o use our callout to drive watchdog timer.
 o restart Tx routine if pending queued packets are present in
   watchdog handler.
 o unarm watchdog timer only if there are no queued packets.
 o don't blindly reset phy and let phy driver handle link change
   request in bfe_init_locked().
 o return the status of mii_mediachg() to caller in
   bfe_ifmedia_upd(). Previously it always returned 0 to caller.
 o add check for IFF_DRV_RUNNING flag as well as IFF_DRV_OACTIVE
   in bfe_start_locked().
 o implement miibus_statchg method that keeps track of current
   link state changes as well as negotiated speed/duplex/
   flow-control configuration.
   Reprogram MAC to appropriate duplex state. Flow-control
   configuration was also implemented but commented out at the
   moment. The flow-control configuration will be enabled again
   after we have general flow-control framework in mii layer.

Reported by: Yousif Hassan < yousif () alumni ! jmu ! edu >
Tesdted by: Yousif Hassan < yousif () alumni ! jmu ! edu >

16 years agoDon't coredump when executed with -o.
delphij [Tue, 29 Jan 2008 00:20:00 +0000 (00:20 +0000)]
Don't coredump when executed with -o.

16 years agoProperly Xref device.hints.5.
trhodes [Tue, 29 Jan 2008 00:13:20 +0000 (00:13 +0000)]
Properly Xref device.hints.5.

Noticed by: ru

16 years agoUse calloc() when requesting zero'ed memory allocation rather than rolling
delphij [Tue, 29 Jan 2008 00:06:44 +0000 (00:06 +0000)]
Use calloc() when requesting zero'ed memory allocation rather than rolling
our own.

16 years agoForced commit to note that the previous revision also covered:
brueffer [Mon, 28 Jan 2008 23:08:18 +0000 (23:08 +0000)]
Forced commit to note that the previous revision also covered:

PR: 119683
Submitted by: Adam McDougall <mcdouga9@egr.msu.edu>

16 years agoAvoid data copying when it is possible.
mav [Mon, 28 Jan 2008 22:37:17 +0000 (22:37 +0000)]
Avoid data copying when it is possible.
bpf_filter() is able to work directly on mbuf chain.

16 years agoUse a for loop in find_kld_address() as in kgdb_auto_load_klds() and
jhb [Mon, 28 Jan 2008 21:45:09 +0000 (21:45 +0000)]
Use a for loop in find_kld_address() as in kgdb_auto_load_klds() and
replace the remaining goto's with continues as a result.

16 years agoAdd support for automatically loading symbols for kld's on startup:
jhb [Mon, 28 Jan 2008 21:40:10 +0000 (21:40 +0000)]
Add support for automatically loading symbols for kld's on startup:
- Add a new 'kgdb_auto_load_klds()' routine which is invoked during
  startup that walks the list of linker files and tries to find a matching
  kld on disk for each non-kernel kld.  If a kld file is found, then it
  is added as if the 'add-kld' command is invoked.  One change from
  'add-kld' is that this method attempts to use the 'pathname' from the
  linker_file structure first to try to load the file.  If that fails
  it then looks in the kernel directory followed by the directories in
  the module path.
- Move the kld file suffix handling into a separate routine so that it
  can be called standalone and to reduce duplicate code in find_kld_path().
- Cache the offsets of members of 'struct linker_file' during startup
  instead of computing them for each 'add-kld'.
- Use GDB's target_read_string() instead of direct KVM access.
- Add all resident sections from a kld by using bfd_map_over_sections() to
  build the section list rather than just adding symbols for ".text",
  ".data", ".bss", and ".rodata".
- Change the 'add-kld' command to do a y/n prompt before adding the
  symbols when run interactively to match 'add-symbol-file'.

MFC after: 1 week

16 years agoRemove the warnx() from kgdb_lookup() so that we don't emit a warning about
jhb [Mon, 28 Jan 2008 20:33:19 +0000 (20:33 +0000)]
Remove the warnx() from kgdb_lookup() so that we don't emit a warning about
optional symbols that are missing (e.g. kgdb complains about _stoppcbs and
_stopped_cpus on UP kernels).  Instead, callers that really want their
symbols to be present now do explicitly warnx() about the missing symbol.

16 years agoIf the quiet flag is specified (-q), don't dump the unread portion of
jhb [Mon, 28 Jan 2008 20:31:30 +0000 (20:31 +0000)]
If the quiet flag is specified (-q), don't dump the unread portion of
the message buffer on startup.

16 years agoAdd a wrapper function that bound checks writes to the dump device.
ru [Mon, 28 Jan 2008 19:04:07 +0000 (19:04 +0000)]
Add a wrapper function that bound checks writes to the dump device.

16 years agoCorrect the kernel config hint in a printf statement.
brueffer [Mon, 28 Jan 2008 18:13:03 +0000 (18:13 +0000)]
Correct the kernel config hint in a printf statement.

Submitted by: R.Mahmatkhanov <cvs-src@yandex.ru>
Reviewed by: scottl
Approved by: rwatson (mentor)
MFC after: 3 days

16 years agoRemove references to the obsolete card(4) manpage.
brueffer [Mon, 28 Jan 2008 18:08:41 +0000 (18:08 +0000)]
Remove references to the obsolete card(4) manpage.

16 years agoMake sure that the termid type is initialized to AU_IPv4 by default.
csjp [Mon, 28 Jan 2008 17:33:46 +0000 (17:33 +0000)]
Make sure that the termid type is initialized to AU_IPv4 by default.
This makes sure that process tokens credentials with un-initialized
audit contexts are handled correctly.  Currently, when invariants are
enabled, this change fixes a panic by ensuring that we have a valid
termid family.  Also, this fixes token generation for process tokens
making sure that userspace is always getting a valid token.

This is consistent with what Solaris does when an audit context is
un-initialized.

Obtained from: TrustedBSD Project
MFC after: 1 week

16 years agoDon't repeat error logging about NOP message sending if
iwasaki [Mon, 28 Jan 2008 16:21:34 +0000 (16:21 +0000)]
Don't repeat error logging about NOP message sending if
ciss_report_request() return an error (which is most likely data
underrun).

Noticed by: Mark Atkinson
MFC after: 1 week

16 years agoOnly reset driver state when a hardware error is detected.
gallatin [Mon, 28 Jan 2008 13:20:51 +0000 (13:20 +0000)]
Only reset driver state when a hardware error is detected.
Preserve warning but do not reset if we enter the routine
without seeing a hardware error.

16 years ago- Fix a comment about prison.
rrs [Mon, 28 Jan 2008 10:34:38 +0000 (10:34 +0000)]
- Fix a comment about prison.
- Fix it so the VRF is captured while locks are held.
MFC after: 1 week

16 years ago- Change back to using prioity 0. Which means don't change the
rrs [Mon, 28 Jan 2008 10:33:41 +0000 (10:33 +0000)]
- Change back to using prioity 0. Which means don't change the
  prioity when running the thread. (this is for the sctp_interator thread).

MFC after: 1 week

16 years ago- Fix a bug where the socket may have been closed which
rrs [Mon, 28 Jan 2008 10:31:12 +0000 (10:31 +0000)]
- Fix a bug where the socket may have been closed which
  could cause a crash in the auth code.
Obtained from: Michael Tuexen
MFC after: 1 week

16 years ago- Fixes a comparison wrap issue with sack gap ack blocks that
rrs [Mon, 28 Jan 2008 10:25:43 +0000 (10:25 +0000)]
- Fixes a comparison wrap issue with sack gap ack blocks that
  span the 32 bit roll over mark.

16 years agoProperly return the error from mls_subject_privileged() in the ifnet
rwatson [Mon, 28 Jan 2008 10:20:18 +0000 (10:20 +0000)]
Properly return the error from mls_subject_privileged() in the ifnet
relabel check for MLS rather than returning 0 directly.

This problem didn't result in a vulnerability currently as the central
implementation of ifnet relabeling also checks for UNIX privilege, and
we currently don't guarantee containment for the root user in mac_mls,
but we should be using the MLS definition of privilege as well as the
UNIX definition in anticipation of supporting root containment at some
point.

MFC after: 3 days
Submitted by: Zhouyi Zhou <zhouzhouyi at gmail dot com>
Sponsored by: Google SoC 2007

16 years agoReturn errno value rather than boolean in this context.
iwasaki [Mon, 28 Jan 2008 01:57:48 +0000 (01:57 +0000)]
Return errno value rather than boolean in this context.

MFC after: 1 week

16 years agoAdjust the exponent before converting the result from double to
das [Mon, 28 Jan 2008 01:19:07 +0000 (01:19 +0000)]
Adjust the exponent before converting the result from double to
float precision. This fixes some double rounding problems for
subnormals and simplifies things a bit.

16 years agoRevive '-opt' flags which I accidentally removed.
keramida [Sun, 27 Jan 2008 16:20:36 +0000 (16:20 +0000)]
Revive '-opt' flags which I accidentally removed.

Noticed by: simon

16 years agoEnter the sleep state immediately without waiting for timeout if
iwasaki [Sun, 27 Jan 2008 16:11:04 +0000 (16:11 +0000)]
Enter the sleep state immediately without waiting for timeout if
devd(8) is not running such as the system in single user mode.

MFC after: 1 week

16 years agoAdd devctl_process_running() so that power management system driver
iwasaki [Sun, 27 Jan 2008 16:06:37 +0000 (16:06 +0000)]
Add devctl_process_running() so that power management system driver
can check whether devd(8) is running.

MFC after: 1 week

16 years agoBring the DIAGNOSTICS section in ed.4 closer to reality by removing missing
trhodes [Sun, 27 Jan 2008 15:37:49 +0000 (15:37 +0000)]
Bring the DIAGNOSTICS section in ed.4 closer to reality by removing missing
diagnostic messages and adding a few found in the code.

PR: 51891

16 years agoAdd a dummynet_enable knob to go with firewall_enable. If this knob
mtm [Sun, 27 Jan 2008 15:15:12 +0000 (15:15 +0000)]
Add a dummynet_enable knob to go with firewall_enable. If this knob
is enabled dummynet(4) is added to the list of required modules.

Discussed on: #freebsd-bugbusters (rwatson, trhodes)
PR: conf/79196
MFC after: 1 week

16 years agoRun expire even without export hook connected.
mav [Sun, 27 Jan 2008 15:01:16 +0000 (15:01 +0000)]
Run expire even without export hook connected.

PR: kern/119839

16 years agoClarify that devfs_system_ruleset should contain a name, not a number.
mtm [Sun, 27 Jan 2008 13:45:20 +0000 (13:45 +0000)]
Clarify that devfs_system_ruleset should contain a name, not a number.
Prompted by PR conf/85363

MFC after: 3 days

16 years agoAdd the -M command-line option, which will set home directory permissions.
mtm [Sun, 27 Jan 2008 10:15:36 +0000 (10:15 +0000)]
Add the -M command-line option, which will set home directory permissions.
Works both in interactive or batch mode. This is a heavily modified version
of the patch submitted in the PR.

PR: bin/105060
MFC after: 1 week

16 years agoFix memory leak when export hook is not connected.
mav [Sun, 27 Jan 2008 09:22:10 +0000 (09:22 +0000)]
Fix memory leak when export hook is not connected.