]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoupdate to 0.5.11: some useful bug fixes (check ChangeLog)
sam [Tue, 27 Jan 2009 22:18:04 +0000 (22:18 +0000)]
update to 0.5.11: some useful bug fixes (check ChangeLog)

Submitted by: scf
MFC after: 3 weeks

15 years agoFollowing a fair amount of real world experience with ACLs and
rwatson [Tue, 27 Jan 2009 21:48:47 +0000 (21:48 +0000)]
Following a fair amount of real world experience with ACLs and
extended attributes since FreeBSD 5, make the following semantic
changes:

- Don't update the inode modification time (mtime) when extended
  attributes (and hence also ACLs) are added, modified, or removed.
- Don't update the inode access tie (atime) when extended attributes
  (and hence also ACLs) are queried.

This means that rsync (and related tools) won't improperly think
that the data in the file has changed when only the ACL has changed.

Note that ffs_reallocblks() has not been changed to not update on an
IO_EXT transaction, but currently EAs don't use the cluster write
routines so this shouldn't be a problem.  If EAs grow support for
clustering, then VOP_REALLOCBLKS() will need to grow a flag argument
to carry down IO_EXT to UFS.

MFC after: 1 week
PR:             ports/125739
Reported by:    Alexander Zagrebin <alexz@visp.ru>
Tested by:      pluknet <pluknet@gmail.com>,
                Greg Byshenk <freebsd@byshenk.net>
Discussed with: kib, kientzle, timur, Alexander Bokovoy <ab@samba.org>

15 years agofix printing of uint64_t values, so we can use WARNS=2
luigi [Tue, 27 Jan 2009 20:26:45 +0000 (20:26 +0000)]
fix printing of uint64_t values, so we can use WARNS=2

15 years agoWhen synchronizing the clock at system startup time, use both
keramida [Tue, 27 Jan 2009 20:13:24 +0000 (20:13 +0000)]
When synchronizing the clock at system startup time, use both
the -g and -q options.  They do a slightly different thing and
both are necessary when the time difference is large.

Noticed by: danger, in the forums
Approved by: roberto
MFC after: 1 week

15 years agoFix the input buffer at 1024. The previous calculated buffer size
n_hibma [Tue, 27 Jan 2009 19:37:30 +0000 (19:37 +0000)]
Fix the input buffer at 1024. The previous calculated buffer size
exceeded the maximum size of 1 page for OHCI controllers. Other serial
drivers use the same size, so I assume this should be enough (1MB/s
throughput?).

15 years agofix wrong variable usage...
luigi [Tue, 27 Jan 2009 12:24:53 +0000 (12:24 +0000)]
fix wrong variable usage...

15 years agoPut nat and ipv6 support in their own files.
luigi [Tue, 27 Jan 2009 12:01:30 +0000 (12:01 +0000)]
Put nat and ipv6 support in their own files.

Usual moving of code with no changes from ipfw2.c to the
newly created files, and addition of prototypes to ipfw2.h

I have added forward declarations for ipfw_insn_* in ipfw2.h
to avoid a global dependency on ip_fw.h

15 years agoPut dummynet-related code in a separate file.
luigi [Tue, 27 Jan 2009 11:06:59 +0000 (11:06 +0000)]
Put dummynet-related code in a separate file.
To this purpose, add prototypes for global functions in ipfw2.h
and move there also the list of tokens used in various places in the code.

15 years agonever mind, for the time being let's stick with WARNS=0 until
luigi [Tue, 27 Jan 2009 11:03:47 +0000 (11:03 +0000)]
never mind, for the time being let's stick with WARNS=0 until
we sort out all proper printf formats.

15 years agoStart splitting the monster file in smaller blocks.
luigi [Tue, 27 Jan 2009 10:18:55 +0000 (10:18 +0000)]
Start splitting the monster file in smaller blocks.

In this episode:
- introduce a common header with a minimal set of common definitions;
- bring the main() function and options parser in main.c
- rename the main functions with an ipfw_ prefix

No code changes except for the introduction of a global variable,
resvd_set_number, which stores the RESVD_SET value from ip_fw.h
and is used to remove the dependency of main.c from ip_fw.h
(and the subtree of dependencies) for just a single constant.

15 years ago- Add support for Moxa Technologies CP-168EL/PCIe card.
stas [Tue, 27 Jan 2009 09:38:44 +0000 (09:38 +0000)]
- Add support for Moxa Technologies CP-168EL/PCIe card.

Submitted by: dmarck
MFC after: 1 week

15 years agoput the usage() function inline, it was only 1 line and used once;
luigi [Tue, 27 Jan 2009 09:27:13 +0000 (09:27 +0000)]
put the usage() function inline, it was only 1 line and used once;
slightly reformat the help() text;
slightly correct the text for the 'extraneous filename' error message;

15 years agoput all options in a single struct, and document them.
luigi [Tue, 27 Jan 2009 09:06:25 +0000 (09:06 +0000)]
put all options in a single struct, and document them.

This will allow us to easily restore the original values when processing
commands from a file (where each individual line can have its own options).

15 years agoI believe this is safe to build with WARNS=2 now
luigi [Tue, 27 Jan 2009 09:04:29 +0000 (09:04 +0000)]
I believe this is safe to build with WARNS=2 now

15 years agoremove a couple of rarely used #define;
luigi [Tue, 27 Jan 2009 07:40:16 +0000 (07:40 +0000)]
remove a couple of rarely used #define;

change PRINT_UINT from a macro to a function (renaming is
postponed to reduce clutter)

15 years ago - Add support for nehalem/corei7 cpus. This supports all of the core
jeff [Tue, 27 Jan 2009 07:29:37 +0000 (07:29 +0000)]
 - Add support for nehalem/corei7 cpus.  This supports all of the core
   counters defined in the reference manual.  It does not support the
   'uncore' events.

Reviewed by: jkoshy
Sponsored by: Nokia

15 years agoFollow up with previous commit: mention -D, not -C when cg check
delphij [Tue, 27 Jan 2009 00:29:19 +0000 (00:29 +0000)]
Follow up with previous commit: mention -D, not -C when cg check
failed.

Submitted by: obrien

15 years agos/use/using/ in previous commit.
trhodes [Tue, 27 Jan 2009 00:23:43 +0000 (00:23 +0000)]
s/use/using/ in previous commit.

Suggested by: jhb

15 years agoAdd ENOMEM to the return values.
trhodes [Tue, 27 Jan 2009 00:22:16 +0000 (00:22 +0000)]
Add ENOMEM to the return values.
Remove invalid return values.
Remove reference to non-existent manual pages.
Remove reference to rfork (it does not discuss RFSTOPPED).
Add sys/unistd.h to the list of includes (required for RFSTOPPED).

PR: 126227
Submitted by: Mateusz Guzik <mjguzik@gmail.com> (based on, original version)
Reviewed by: jhb, Christoph Mallon <christoph.mallon@gmx.de>

15 years agoRemove DETACH event handling; this is race prone and does nothing useful.
sam [Mon, 26 Jan 2009 23:05:50 +0000 (23:05 +0000)]
Remove DETACH event handling; this is race prone and does nothing useful.
Leave a comment for the next person that thinks they need to be helpful.

Reviewed by: imp, jhb
MFC after: 2 weeks

15 years agoDelete commented out ancient history.
imp [Mon, 26 Jan 2009 21:45:33 +0000 (21:45 +0000)]
Delete commented out ancient history.

15 years agoClean up ng_ubt2. Get rid of excessive use of NG_NODE_REF/UNREF().
emax [Mon, 26 Jan 2009 20:59:41 +0000 (20:59 +0000)]
Clean up ng_ubt2. Get rid of excessive use of NG_NODE_REF/UNREF().
Make detach() completely synchronous. Properly handle stalled USB
transfers (use internal mechanism instead of submitting own control
transfers). Rename/remove a couple of variables and update comments.
This work was done in close collaboration with HPS.

Reviewed by: HPS

15 years agoDon't unlock the parent ppc lock until after releasing the ppbus.
jhb [Mon, 26 Jan 2009 20:58:05 +0000 (20:58 +0000)]
Don't unlock the parent ppc lock until after releasing the ppbus.

Submitted by: csjp

15 years agoMake the Monty Python quote more google friendly instead of
trhodes [Mon, 26 Jan 2009 18:14:21 +0000 (18:14 +0000)]
Make the Monty Python quote more google friendly instead of
hacking it apart.

Discussed with: Christoph Mallon <christoph.mallon@gmx.de>

15 years agoMFp4 //depot/projects/usb/ @156706
thompsa [Mon, 26 Jan 2009 17:55:07 +0000 (17:55 +0000)]
MFp4 //depot/projects/usb/ @156706

 Adjust an UHCI portreset delay.

Submitted by: Hans Petter Selasky

15 years agoRegen.
thompsa [Mon, 26 Jan 2009 17:50:20 +0000 (17:50 +0000)]
Regen.

15 years agoMFp4 //depot/projects/usb/ @156522,156530
thompsa [Mon, 26 Jan 2009 17:49:58 +0000 (17:49 +0000)]
MFp4 //depot/projects/usb/ @156522,156530

 UHCI SOF Quirk. Makes some broken USB devices work again.  Reported by several
 people. Patch made by me.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb/ @156521
thompsa [Mon, 26 Jan 2009 17:47:32 +0000 (17:47 +0000)]
MFp4 //depot/projects/usb/ @156521

 U3G regression issue. Patch to support multiple modem instances per logical
 USB interface.

Submitted by: Hans Petter Selasky

15 years agoFix up USB_GET_REPORT_DESC ioctl.
thompsa [Mon, 26 Jan 2009 17:45:50 +0000 (17:45 +0000)]
Fix up USB_GET_REPORT_DESC ioctl.

Submitted by: daichi

15 years agoAdd umass quirk.
thompsa [Mon, 26 Jan 2009 17:43:58 +0000 (17:43 +0000)]
Add umass quirk.

Submitted by: Hans Petter Selasky

15 years agoAdd a usb hid quirk.
thompsa [Mon, 26 Jan 2009 17:42:02 +0000 (17:42 +0000)]
Add a usb hid quirk.

Submitted by: Andre Guibert de Bruet

15 years agoNo need to wrap _PATH_SYSPATH. It makes it harder to grep(1) for its
obrien [Mon, 26 Jan 2009 17:09:26 +0000 (17:09 +0000)]
No need to wrap _PATH_SYSPATH.  It makes it harder to grep(1) for its
value.  (also unwrapping better matches existing style)

15 years agokmod.mk includes bsd.sys.mk anyway so use CSTD instead of homegrown
rdivacky [Mon, 26 Jan 2009 17:00:58 +0000 (17:00 +0000)]
kmod.mk includes bsd.sys.mk anyway so use CSTD instead of homegrown
reimplementation of the same. Note that this changes -std=c99
to -std=iso9899:1999 but those two are synonyms.

Approved by: kib (mentor)
Reviewed by: ru

15 years agoUse the proper flag to let kern.ttys be executed without Giant.
ed [Mon, 26 Jan 2009 16:43:18 +0000 (16:43 +0000)]
Use the proper flag to let kern.ttys be executed without Giant.

Pointed out by: jhb

15 years agoSpecify analog beep pin widget for several AD codecs.
mav [Mon, 26 Jan 2009 15:55:15 +0000 (15:55 +0000)]
Specify analog beep pin widget for several AD codecs.
It gives working speaker control for that systems.

15 years agoWhitespace tweak.
jhb [Mon, 26 Jan 2009 15:32:39 +0000 (15:32 +0000)]
Whitespace tweak.

15 years agoNow that mtx_sleep/msleep can accept Giant as the interlock, simplify the
jhb [Mon, 26 Jan 2009 15:01:47 +0000 (15:01 +0000)]
Now that mtx_sleep/msleep can accept Giant as the interlock, simplify the
CAM locking code slightly to no longer special case sleeping when a sim
uses Giant for its lock.

Tested by: trasz

15 years agoChange the way our softc is stored to use the devinfo facility provided by pcm
nwhitehorn [Mon, 26 Jan 2009 14:43:18 +0000 (14:43 +0000)]
Change the way our softc is stored to use the devinfo facility provided by pcm
instead of the regular device softc interface. This brings the AOA driver in
line with the other pcm drivers.

Requested by: ariff

15 years agowrap all malloc/calloc/realloc calls so they exit on failure
luigi [Mon, 26 Jan 2009 14:26:35 +0000 (14:26 +0000)]
wrap all malloc/calloc/realloc calls so they exit on failure
without having to check in each place.

Remove an wrong strdup from previous commit.

15 years agoThe kernel may do unbalanced calls to fifo_close() for fifo vnode,
kib [Mon, 26 Jan 2009 14:21:00 +0000 (14:21 +0000)]
The kernel may do unbalanced calls to fifo_close() for fifo vnode,
without corresponding number of fifo_open(). This causes assertion
failure in fifo_close() due to vp->v_fifoinfo being NULL for kernel
with INVARIANTS, or NULL pointer dereference otherwise. In fact, we may
ignore excess calls to fifo_close() without bad consequences.

Turn KASSERT() into the return, and print warning for now.

Tested by: pho
Reviewed by: rwatson
MFC after: 2 weeks

15 years agoAdd missing locking around setting the ppc interrupt handler IVAR.
jhb [Mon, 26 Jan 2009 14:12:12 +0000 (14:12 +0000)]
Add missing locking around setting the ppc interrupt handler IVAR.

Reported by:     many

15 years agoSome implementations of getopt() expect that argv[0] is always the
luigi [Mon, 26 Jan 2009 14:03:39 +0000 (14:03 +0000)]
Some implementations of getopt() expect that argv[0] is always the
program name, and ignore that entry.  ipfw2.c code instead skips
this entry and starts with options at offset 0, relying on a more
tolerant implementation of the library.

This change fixes the issue by always passing a program name
in the first entry to getopt. The motivation for this change
is to remove a potential compatibility issue should we use
a different getopt() implementation in the future.

No functional changes.

Submitted by: Marta Carbone (parts)
MFC after: 4 weeks

15 years agoIntroduce the I2C diagnostic utility. It let's discover and inspect slave
raj [Mon, 26 Jan 2009 14:00:50 +0000 (14:00 +0000)]
Introduce the I2C diagnostic utility. It let's discover and inspect slave
devices on the bus.

Reviewed by: bms, stas
Obtained from: Semihalf

15 years agoTeach iic(4) the 'repeated start' I2C condition. This will be used by the
raj [Mon, 26 Jan 2009 13:53:39 +0000 (13:53 +0000)]
Teach iic(4) the 'repeated start' I2C condition. This will be used by the
upcoming i2c(8) diag utility.

Reviewed by: bms, stas
Obtained from: Semihalf

15 years agoUpdate jail startup script for multi-IPv4/v6/no-IP jails.
bz [Mon, 26 Jan 2009 12:59:11 +0000 (12:59 +0000)]
Update jail startup script for multi-IPv4/v6/no-IP jails.

Note: this is only really necessary because of the ifconfig
      logic to add/remove the jail IPs upon start/stop.
      Consensus among simon and I is that the logic should
      really be factored out from the startup script and put
      into a proper management solution.

- We now support starting of no-IP jails.
- Remove the global jail_<jname>_netmask option as it is only
  helpful to set netmasks/prefixes for the right address
  family and per address.
- Implement jail_<jname>_ip options to support both
  address familes with regard to ifconfig logic.
- Implement _multi<n> support suffix to the jail_<jname>_ip
  option to configure additional addresses to avoid overlong,
  unreadbale jail_<jname>_ip lines with lots of addresses.

Submitted by: initial work from Ruben van Staveren
Discussed on: freebsd-jail in Nov 2008.
Reviewed by: simon, ru (partial, older version)
MFC after: 1 week

15 years ago - Fix grammar. [1]
delphij [Mon, 26 Jan 2009 07:31:28 +0000 (07:31 +0000)]
 - Fix grammar. [1]
 - Use the correct term 'long mode'. [2]
 - style(9) for return value. [3]

Submitted by: Ben Kaduk <minimarmot gmail com> [1],
obrien [2], scf [3]

15 years agoFix ARCHIVE_EXTRACT_SPARSE handling in libarchive.
kientzle [Mon, 26 Jan 2009 05:44:40 +0000 (05:44 +0000)]
Fix ARCHIVE_EXTRACT_SPARSE handling in libarchive.
Add a test to exercise this feature.
This should fix --sparse/-S support in tar.

Thanks to:      Daichi GOTO
MFC after: 1 week

15 years agoBetter description of kern.ipc.maxpipekva.
trhodes [Mon, 26 Jan 2009 02:15:22 +0000 (02:15 +0000)]
Better description of kern.ipc.maxpipekva.

Discussed with: kib

15 years agoSomehow deleted the .4 at the end of the snd_davbus man page right before
nwhitehorn [Mon, 26 Jan 2009 01:08:24 +0000 (01:08 +0000)]
Somehow deleted the .4 at the end of the snd_davbus man page right before
commit. Add it back.

Pointy hat to: me

15 years agoRewrite of MI strlen(3) in a way that can better utilize modern hardware by
delphij [Sun, 25 Jan 2009 23:08:47 +0000 (23:08 +0000)]
Rewrite of MI strlen(3) in a way that can better utilize modern hardware by
reducing branches and doing word-sized operation.

The idea is taken from J.T. Conklin's x86_64 optimized version of strlen(3)
for NetBSD, and reimplemented in C by me.

Discussed on: -arch@

15 years agoAdd obsolete files after tzdata2009a and file 4.26 imports
antoine [Sun, 25 Jan 2009 19:03:30 +0000 (19:03 +0000)]
Add obsolete files after tzdata2009a and file 4.26 imports

15 years ago - bit has to be fd_mask to work properly on 64bit platforms. Constants
jeff [Sun, 25 Jan 2009 18:38:42 +0000 (18:38 +0000)]
 - bit has to be fd_mask to work properly on 64bit platforms.  Constants
   must also be cast even though the result ultimately is promoted
   to 64bit.
 - Correct a loop index upper bound in selscan().

15 years agoAdd support for the I2S and davbus audio controllers found in Apple PowerPC
nwhitehorn [Sun, 25 Jan 2009 18:20:15 +0000 (18:20 +0000)]
Add support for the I2S and davbus audio controllers found in Apple PowerPC
hardware.

Submitted by: Marco Trillo

15 years agoFix a race condition where interrupts set up after boot could be enabled in
nwhitehorn [Sun, 25 Jan 2009 17:50:53 +0000 (17:50 +0000)]
Fix a race condition where interrupts set up after boot could be enabled in
the PIC before the interrupt handler was set. If the interrupt triggered in
that window, then the interrupt vector would be disabled.

Reported by: Marco Trillo

15 years agoRevert my previous two changes.
ed [Sun, 25 Jan 2009 16:52:41 +0000 (16:52 +0000)]
Revert my previous two changes.

Even though the code seems to be FreeBSD kernel code, it isn't compiled
on FreeBSD. I could have known this, because I was a little amazed that
I couldn't find a prototype of pfopen()/pfclose() somewhere else,
because it isn't marked as static.

Apart from that, removing these functions wouldn't have been harmful
anyway, because there are some other strange things about them (the
implementation isn't consistent with the prototype at the top). Still,
it's better to leave it, because it makes merging code back to older
branches a little harder.

Requested by: mlaier

15 years agoRemove pfopen() and pfclose() entirely.
ed [Sun, 25 Jan 2009 14:39:15 +0000 (14:39 +0000)]
Remove pfopen() and pfclose() entirely.

It turns out I was patching functions that weren't used by pf(4) anyway.
They still seem to use `struct proc *' instead of `struct thread *'.
They weren't listed in pf_cdevsw.

15 years agoRemove unneeded checking for invalid minor numbers from pf(4).
ed [Sun, 25 Jan 2009 14:00:00 +0000 (14:00 +0000)]
Remove unneeded checking for invalid minor numbers from pf(4).

Because it is not possible to access the pf(4) character device through
any other device node as the one in devfs, there is no need to check for
unknown device minor numbers.

Approved by: mlaier

15 years agoWhen a statically linked binary is executed (or at least, one without
rwatson [Sun, 25 Jan 2009 12:07:43 +0000 (12:07 +0000)]
When a statically linked binary is executed (or at least, one without
an interpreter definition in its program header), set the auxiliary
ELF argument AT_BASE to 0 rather than to the address that we would
have mapped the interpreter at if there had been one.

The ELF ABI specifications appear to be ambiguous as to the desired
behavior in this situation, as they define AT_BASE as the base address
of the interpreter, but do not mention what to do if there is none.
On Solaris, AT_BASE will be set to the base address of the static
binary if there is no interpreter, and on Linux, AT_BASE is set to 0.
We go with the Linux semantics as they are of more immediate utility
and allow the early runtime environment to know that the kernel has
not mapped an interpreter, but because AT_PHDR points at the ELF
header for the running binary, it is still possible to retrieve all
required mapping information when the process starts should it be
required.  Either approach would be preferable to our current behavior
of passing a pointer to an unmapped region of user memory as AT_BASE.

MFC after: 3 weeks

15 years agoInstead of killing the 'watchdog' subshell and leaving a sleep for
bz [Sun, 25 Jan 2009 10:31:45 +0000 (10:31 +0000)]
Instead of killing the 'watchdog' subshell and leaving a sleep for
rcshutdown_timeout (normally 30s) around re-parented to init, make
sure both go away using pkill -P.

While noone normally notices this for the system shutdown, it helps for
cleanly shutting down trusted jails.
Found without a killall in the base system, which in rc.d/jail normally
ensures that all processes of a jail to be stopped will be killed.

Reviewed by: silence on current@
MFC after: 4 weeks

15 years agoFor consistency with prison_{local,remote,check}_ipN rename
bz [Sun, 25 Jan 2009 10:11:58 +0000 (10:11 +0000)]
For consistency with prison_{local,remote,check}_ipN rename
prison_getipN to prison_get_ipN.

Submitted by: jamie (as part of a larger patch)
MFC after: 1 week

15 years agoRemove unneeded checks of device unit number from speaker(4).
ed [Sun, 25 Jan 2009 09:20:59 +0000 (09:20 +0000)]
Remove unneeded checks of device unit number from speaker(4).

Calls on the cdev can only be made on existing devices. This means we
don't have to check the value of dev2unit().

15 years ago - Correct a typo in a comment.
jeff [Sun, 25 Jan 2009 09:17:16 +0000 (09:17 +0000)]
 - Correct a typo in a comment.

Noticed by: danger

15 years ago - Make the keg abstraction more complete. Permit a zone to have multiple
jeff [Sun, 25 Jan 2009 09:11:24 +0000 (09:11 +0000)]
 - Make the keg abstraction more complete.  Permit a zone to have multiple
   backend kegs so it may source compatible memory from multiple backends.
   This is useful for cases such as NUMA or different layouts for the same
   memory type.
 - Provide a new api for adding new backend kegs to secondary zones.
 - Provide a new flag for adjusting the layout of zones to stagger
   allocations better across cache lines.

Sponsored by: Nokia

15 years agoRemove unneeded use of device unit numbers from pty(4).
ed [Sun, 25 Jan 2009 08:27:11 +0000 (08:27 +0000)]
Remove unneeded use of device unit numbers from pty(4).

A much more simple approach to generate the slave device name, is to
obtain the device name of the master and replace 'p' by 't'.

15 years ago - Use __XSTRING where I want the define to be expanded. This resulted in
jeff [Sun, 25 Jan 2009 07:35:10 +0000 (07:35 +0000)]
 - Use __XSTRING where I want the define to be expanded.  This resulted in
   sizeof("MAXCPU") being used to calculate a string length rather than
   something more reasonable such as sizeof("32").  This shouldn't have
   caused any ill effect until we run on machines with 1000000 or more
   cpus.

15 years agoIf the parent up/down task was queued then sync with it before returning from
thompsa [Sun, 25 Jan 2009 07:31:51 +0000 (07:31 +0000)]
If the parent up/down task was queued then sync with it before returning from
the vap ioctl. This means that the parent interface should hopefully be up
before we return to userland, it does not depend on the parent init succeeding,
just that it was run.

This fixes wpa_supplicant with ndis and USB where the parent interfaces can be
slow to init.

15 years agoFix errors introduced when I rewrote select.
jeff [Sun, 25 Jan 2009 07:24:34 +0000 (07:24 +0000)]
Fix errors introduced when I rewrote select.
 - Restructure selscan() and selrescan() to avoid producing extra selfps
   when we have a fd in multiple sets.  As described below multiple selfps
   may still exist for other reasons.
 - Make selrescan() tolerate multiple selfds for a given descriptor
   set since sockets use two selinfos per fd.  If an event on each selinfo
   fires selrescan() will see the descriptor twice.  This could result in
   select() returning 2x the number of fds actually existing in fd sets.

Reported by: mgleason@ncftp.com

15 years agoRemove unused unrhdr from GEOM character device module.
ed [Sat, 24 Jan 2009 18:23:19 +0000 (18:23 +0000)]
Remove unused unrhdr from GEOM character device module.

Now that make_dev() doesn't require unit numbers to be unique, there is
no need to use an unrhdr here to generate the numbers. Remove the entire
init-routine, because it is optional.

15 years agoMark kern.ttys as MPSAFE.
ed [Sat, 24 Jan 2009 18:20:15 +0000 (18:20 +0000)]
Mark kern.ttys as MPSAFE.

sysctl now allows Giantless calls, so make kern.ttys use this. If it
needs Giant, it locks the proper TTY anyway.

15 years agoNew sentence starts on a new line.
bz [Sat, 24 Jan 2009 15:56:44 +0000 (15:56 +0000)]
New sentence starts on a new line.

MFC after: 2 week

15 years agoUpdate the description of the '-h' option wrt to primary addresses
bz [Sat, 24 Jan 2009 15:53:37 +0000 (15:53 +0000)]
Update the description of the '-h' option wrt to primary addresses
per address family and add a reference to the ip-addresses option.

MFC after: 1 week

15 years agoChange IP addresses/prefixes to be from "Test-Net" (IPv4 documentation
bz [Sat, 24 Jan 2009 15:33:09 +0000 (15:33 +0000)]
Change IP addresses/prefixes to be from "Test-Net" (IPv4 documentation
prefix 192.0.2.0/24) rather than from private-use networks.

MFC after: 1 week

15 years agoUse __FBSDID() for $FreeBSD$ version strings in .c files.
rwatson [Sat, 24 Jan 2009 13:15:45 +0000 (13:15 +0000)]
Use __FBSDID() for $FreeBSD$ version strings in .c files.

Obtained from: TrustedBSD Project
MFC after: 3 days

15 years agoBegin to add SDT tracing of the MAC Framework: add policy modevent,
rwatson [Sat, 24 Jan 2009 10:57:32 +0000 (10:57 +0000)]
Begin to add SDT tracing of the MAC Framework: add policy modevent,
register, and unregister hooks that give access to the mac_policy_conf
for the policy.

Obtained from: TrustedBSD Project
MFC after: 3 days

15 years agoAdd explicit static DTrace tracing to the callout mechanism, capturing
rwatson [Sat, 24 Jan 2009 10:22:49 +0000 (10:22 +0000)]
Add explicit static DTrace tracing to the callout mechanism, capturing
pointers to the callout handler just before and just after the callout
it invoked.  I attempted to do this in a manner congruent to tracing in
Solaris's callout mechanism, but couldn't quite use the same names due
to convention and syntax differences.

Example DTrace script to generate a distribution graph of callout
execution times:

callout_execute:::callout_start
{
        self->cstart = timestamp;
}

callout_execute:::callout_end
{

        @length = quantize(timestamp - self->cstart);
}

Reviewed by: jb
MFC after: 3 days

15 years agoWhen "-b" is specified, one could easily create "smaller" files
trhodes [Sat, 24 Jan 2009 05:32:11 +0000 (05:32 +0000)]
When "-b" is specified, one could easily create "smaller" files
that are much larger than expected (given the default size).
Change "smaller files" to "split files" which is more in line
with what "-b" actually does.

PR: 119329
Submitted by: Julian Stacey <jhs@berklix.org>

15 years agoUpdate the supported device list a little bit.
trhodes [Sat, 24 Jan 2009 04:08:00 +0000 (04:08 +0000)]
Update the supported device list a little bit.

PR: 84538
Submitted by: asmodai

15 years agoAdd a comment on kern.ipc.maxpipekva.
trhodes [Sat, 24 Jan 2009 01:46:46 +0000 (01:46 +0000)]
Add a comment on kern.ipc.maxpipekva.

PR: 105997
Reviewed by: keramida

15 years ago- Mark all standalone INT/LONG/QUAD sysctl's MPSAFE. This is done
jhb [Fri, 23 Jan 2009 22:49:23 +0000 (22:49 +0000)]
- Mark all standalone INT/LONG/QUAD sysctl's MPSAFE.  This is done
  inside the SYSCTL() macros and thus does not need to be done for
  all of the nodes scattered across the source tree.
- Mark the name-cache related sysctl's (including debug.hashstat.*) MPSAFE.
- Mark vm.loadavg MPSAFE.
- Remove GIANT_REQUIRED from vmtotal() (everything in this routine already
  has sufficient locking) and mark vm.vmtotal MPSAFE.
- Mark the vm.stats.(sys|vm).* sysctls MPSAFE.

15 years ago- Add conditional Giant locking around the vrele() in
jhb [Fri, 23 Jan 2009 22:46:45 +0000 (22:46 +0000)]
- Add conditional Giant locking around the vrele() in
  sysctl_kern_proc_pathname().
- Mark all the kern.proc.* sysctls as MPSAFE.

Submitted by: csjp (2)

15 years agoAdd a flag to tag individual sysctl leaf nodes as MPSAFE and thus not
jhb [Fri, 23 Jan 2009 22:40:35 +0000 (22:40 +0000)]
Add a flag to tag individual sysctl leaf nodes as MPSAFE and thus not
needing Giant.

Submitted by: csjp (an older version)

15 years agoUse shared vnode locks for fchdir().
jhb [Fri, 23 Jan 2009 22:13:30 +0000 (22:13 +0000)]
Use shared vnode locks for fchdir().

Submitted by: ups

15 years agoTweak the wording for vfs_mark_atime() since the I/O it is avoiding by not
jhb [Fri, 23 Jan 2009 22:13:00 +0000 (22:13 +0000)]
Tweak the wording for vfs_mark_atime() since the I/O it is avoiding by not
updating va_atime via VOP_SETATTR() isn't always synchronous.  For some
filesystems it is asynchronous.

Suggested by:  bde

15 years agoPush down Giant in the vlnru kproc main loop so that it is only acquired
jhb [Fri, 23 Jan 2009 22:08:54 +0000 (22:08 +0000)]
Push down Giant in the vlnru kproc main loop so that it is only acquired
around calls to vlrureclaim() on non-MPSAFE filesystems.  Specifically,
vnlru no longer needs Giant for the common case of waking up and deciding
there is nothing for it to do.

MFC after: 2 weeks

15 years agoProtect against NULL pointer dereference.
trasz [Fri, 23 Jan 2009 21:08:00 +0000 (21:08 +0000)]
Protect against NULL pointer dereference.

Reviewed by: scottl
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation

15 years agoDon't leak memory when alloc fails.
trasz [Fri, 23 Jan 2009 21:06:16 +0000 (21:06 +0000)]
Don't leak memory when alloc fails.

Reviewed by: scottl
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation
Found with: Coverity Prevent(tm)
CID: 2908

15 years agoGuard against NULL pointer dereference.
trasz [Fri, 23 Jan 2009 21:05:16 +0000 (21:05 +0000)]
Guard against NULL pointer dereference.

Reviewed by: scottl
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation
Found with: Coverity Prevent(tm)
CID: 1847

15 years agoGuard against NULL pointer dereference.
trasz [Fri, 23 Jan 2009 21:03:59 +0000 (21:03 +0000)]
Guard against NULL pointer dereference.

Reviewed by: scottl
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation
Found with: Coverity Prevent(tm)
CID: 130

15 years agoOnly start the if_slowtimo timer (which drives the if_watchdog methods of
jhb [Fri, 23 Jan 2009 20:53:01 +0000 (20:53 +0000)]
Only start the if_slowtimo timer (which drives the if_watchdog methods of
network interfaces) if we have at least one interface with an if_watchdog
routine.

MFC after: 2 weeks

15 years agoSort KERNFAST and KERNCONF into the list they are in.
imp [Fri, 23 Jan 2009 18:35:09 +0000 (18:35 +0000)]
Sort KERNFAST and KERNCONF into the list they are in.

15 years agoDocument KERNCONF and KERNFAST. Note that TARGET is usually all one
imp [Fri, 23 Jan 2009 18:32:31 +0000 (18:32 +0000)]
Document KERNCONF and KERNFAST.  Note that TARGET is usually all one
needs to set for cross building.

15 years agoImplement an idea from Sam Leffler:
imp [Fri, 23 Jan 2009 18:23:16 +0000 (18:23 +0000)]
Implement an idea from Sam Leffler:
make KERNFAST=blah buildkernel
is now a short cut for
make KERNCONF=blah -DKERNFAST buildkernel

This change works for all kernel config files not named "1".  I did
that to make sure that
make -DKERNFAST buildkernel
remains the same as
make -DKERNFAST KERNCONF=GENERIC buildkernel
rather than trying to build and configure "1".  I've never seen a
kernel config file named "1," so I think this is a good compromise.

15 years agofix regulatory state check for all vaps' being down; it must be done
sam [Fri, 23 Jan 2009 18:16:14 +0000 (18:16 +0000)]
fix regulatory state check for all vaps' being down; it must be done
before calling the ic_setregdomain callback

15 years agoadd defines for driver-private bits to eliminate use of constants
sam [Fri, 23 Jan 2009 18:15:09 +0000 (18:15 +0000)]
add defines for driver-private bits to eliminate use of constants

15 years ago- Add few VIA bridges to agp_via.c and connect it to amd64 build
jkim [Fri, 23 Jan 2009 17:48:18 +0000 (17:48 +0000)]
- Add few VIA bridges to agp_via.c and connect it to amd64 build
as they support Intel Core/Core 2 and VIA Nano processors.
- Align "optional agp" in conf/files.* for consistency while I am here.

15 years agoUse the correct type for the timeout parameter to the 32-bit
jhb [Fri, 23 Jan 2009 13:23:17 +0000 (13:23 +0000)]
Use the correct type for the timeout parameter to the 32-bit
compat version aio_waitcomplete().

Reminded by: bz
Submitted by: jamie
MFC after: 3 days

15 years agoNote the implication of setting the 'w' permission on directories,
trhodes [Fri, 23 Jan 2009 11:39:00 +0000 (11:39 +0000)]
Note the implication of setting the 'w' permission on directories,
while here, expand the 'naughty bits' comment in BUGS.

PR: 84265 and 84268
Reviewed by: keramida
Obtained from: hints from ceri, keramida

15 years agourtw(4) works also on amd64.
weongyo [Fri, 23 Jan 2009 08:18:58 +0000 (08:18 +0000)]
urtw(4) works also on amd64.

Tested by: kevlo

15 years agoAdd urtw(4) to the list of supported network interface.
weongyo [Fri, 23 Jan 2009 05:57:40 +0000 (05:57 +0000)]
Add urtw(4) to the list of supported network interface.

15 years agoAdd an entry for the urtw(4) module.
weongyo [Fri, 23 Jan 2009 05:56:09 +0000 (05:56 +0000)]
Add an entry for the urtw(4) module.