]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoAdd an entry for the uath(4) module.
Weongyo Jeong [Tue, 7 Apr 2009 01:37:50 +0000 (01:37 +0000)]
Add an entry for the uath(4) module.

15 years ago First pass at separating per-vnet initializer functions
Marko Zec [Mon, 6 Apr 2009 22:29:41 +0000 (22:29 +0000)]
    First pass at separating per-vnet initializer functions
        from existing functions for initializing global state.

        At this stage, the new per-vnet initializer functions are
directly called from the existing global initialization code,
which should in most cases result in compiler inlining those
new functions, hence yielding a near-zero functional change.

        Modify the existing initializer functions which are invoked via
        protosw, like ip_init() et. al., to allow them to be invoked
multiple times, i.e. per each vnet.  Global state, if any,
is initialized only if such functions are called within the
context of vnet0, which will be determined via the
IS_DEFAULT_VNET(curvnet) check (currently always true).

        While here, V_irtualize a few remaining global UMA zones
        used by net/netinet/netipsec networking code.  While it is
        not yet clear to me or anybody else whether this is the right
        thing to do, at this stage this makes the code more readable,
        and makes it easier to track uncollected UMA-zone-backed
        objects on vnet removal.  In the long run, it's quite possible
        that some form of shared use of UMA zone pools among multiple
        vnets should be considered.

Bump __FreeBSD_version due to changes in layout of structs
vnet_ipfw, vnet_inet and vnet_net.

Approved by: julian (mentor)

15 years agoAdd support for PowerPC kernel core files. This commit only adds
Marcel Moolenaar [Mon, 6 Apr 2009 21:52:10 +0000 (21:52 +0000)]
Add support for PowerPC kernel core files. This commit only adds
support for virtual core files (aka minidumps). physical core
files are not supported.

The implementation is cross-tool ready and can be used in a non-
powerpc hosted debugger to analyze PowerPC core files. It also
accepts core files that still have the dump header, as can be
the case within Juniper where TFTP-based kernel core files are
supported and savecore is not used to "extract" the core file
from some dump device.

Obtained from: Juniper Networks, Inc.

15 years agoWhen a stale file handle is encountered, purge all cached information about
John Baldwin [Mon, 6 Apr 2009 21:11:08 +0000 (21:11 +0000)]
When a stale file handle is encountered, purge all cached information about
an NFS node including the access and attribute caches.  Previously the NFS
client only purged any name cache entries associated with the file.

PR: kern/123755
Submitted by: Jaakko Heinonen  jh of saunalahti fi
Reported by: Timo Sirainen  tss of iki fi
Reviewed by: rwatson, rmacklem
MFC after: 1 month

15 years agoAdd opt_kdtrace.h to fix standalone module build.
John Baldwin [Mon, 6 Apr 2009 20:17:28 +0000 (20:17 +0000)]
Add opt_kdtrace.h to fix standalone module build.

15 years agoChange the default timeout for caching attributes of a directory in the NFS
John Baldwin [Mon, 6 Apr 2009 19:12:47 +0000 (19:12 +0000)]
Change the default timeout for caching attributes of a directory in the NFS
client from 30 seconds to 3 seconds.  After the recent changes to add
caching of negative name cache lookups, a negative name cache hit will
persist until the client notices the parent directory has changed.  The
higher the attribute cache timeout on directories, the longer that can take,
so lower the default timeout for directories to match that of regular files.

Suggested by: bde, mohans
MFC after: 1 month

15 years agoOk, looking at the solution a bit closer, the level
Randall Stewart [Mon, 6 Apr 2009 14:27:28 +0000 (14:27 +0000)]
Ok, looking at the solution a bit closer, the level
calculation was too agressive. Instead we should only
look at each nibble. This makes it so we make
10.2.0.0 become 10.2/16 NOT 10.2/17.

Need to explore the non-cidr address issue. The two
may not be seperable..

MFC after: 1 week

15 years agoFix ISO8859-15 links for nb_NO / no_NO.
Dag-Erling Smørgrav [Mon, 6 Apr 2009 14:12:22 +0000 (14:12 +0000)]
Fix ISO8859-15 links for nb_NO / no_NO.

Submitted by: ru
MFC after: 1 week

15 years agoReturn -1 instead of 0 upon reaching EOF. This is somewhat ill-advised
David Schultz [Mon, 6 Apr 2009 13:50:04 +0000 (13:50 +0000)]
Return -1 instead of 0 upon reaching EOF. This is somewhat ill-advised
because it means getdelim() returns -1 for both error and EOF, and
never returns 0. However, this is what the original GNU implementation
does, and POSIX inherited the bug.

Reported by: marcus@

15 years ago- Added libpcap.so.5 to OLD_LIBS.
Ruslan Ermilov [Mon, 6 Apr 2009 13:14:34 +0000 (13:14 +0000)]
- Added libpcap.so.5 to OLD_LIBS.
- Added 32-bit versions of libusb20* to OLD_{LIBS,FILES}.
- Added 32-bit version of libmp.so.6 to OLD_LIBS.

15 years agoReduce the dcons polling frequency to 25 Hz.
Ed Schouten [Mon, 6 Apr 2009 13:09:02 +0000 (13:09 +0000)]
Reduce the dcons polling frequency to 25 Hz.

It makes little sense to use 100 Hz polling in dcons. We cannot live
without polling, because that's just how dcons works. It polls the
buffer filled by the firewire hardware. 25 Hz is probably enough for
most use cases.

Discussed with: rwatson
Tested by: kan

15 years agoconnect uath.4 to the build.
Weongyo Jeong [Mon, 6 Apr 2009 12:47:09 +0000 (12:47 +0000)]
connect uath.4 to the build.

15 years agoconnect uath(4) to the build. uath(4) should work on all architectures.
Weongyo Jeong [Mon, 6 Apr 2009 12:43:40 +0000 (12:43 +0000)]
connect uath(4) to the build.  uath(4) should work on all architectures.

15 years agoprovide the absolute path for /etc/rc1
Luigi Rizzo [Mon, 6 Apr 2009 11:14:30 +0000 (11:14 +0000)]
provide the absolute path for /etc/rc1

15 years agoadd some popular device and comment some potentially useful options
Luigi Rizzo [Mon, 6 Apr 2009 11:08:33 +0000 (11:08 +0000)]
add some popular device and comment some potentially useful options

15 years agoAdd SDT DTrace probes for namei():
Robert Watson [Mon, 6 Apr 2009 10:32:40 +0000 (10:32 +0000)]
Add SDT DTrace probes for namei():

  vfs:namei:lookup:entry takes parent directory vnode pointer, path to
    look up, and lookup flags.
  vfs:namei:lookup:return takes an error value, and if successful, the
    returned vnode pointer.

MFC after:      1 month

15 years agoClass based addressing went out in the early 90's. Basically
Randall Stewart [Mon, 6 Apr 2009 10:09:20 +0000 (10:09 +0000)]
Class based addressing went out in the early 90's. Basically
if a entry is not route add -net xxx/bits then we should use
the addr (xxx) to establish the number of bits by looking at
the first non-zero bit. So if we enter
route add -net 10.1.1.0 10.1.3.5
this is the same as doing
route add -net 10.1.1.0/24
Since the 8th bit (zero counting) is set to 1 we set bits
to 32-8.

Users can of course still use the /x to change this behavior
or in cases where the network is in the trailing part
of the address, a "netmask" argument can be supplied to
override what is established from the interpretation of the
address itself. e.g:

route add -net 10.1.1.8 -netmask 0xff00ffff

should overide and place the proper CIDR mask in place.

PR: 131365
MFC after: 1 week

15 years agoOnly raise WARNS to 6 on i386 and amd64, strict alignment platforms still
Poul-Henning Kamp [Mon, 6 Apr 2009 07:13:26 +0000 (07:13 +0000)]
Only raise WARNS to 6 on i386 and amd64, strict alignment platforms still
barf at some of the gratuitous pointer gymnastics, and I do not see a
simple solution.

15 years agoFix logic in MOD_LOAD handler to call dcons_attach after all successful
Alexander Kabaev [Mon, 6 Apr 2009 02:29:28 +0000 (02:29 +0000)]
Fix logic in MOD_LOAD handler to call dcons_attach after all successful
dcons_drv_init invocations. Testing return value for 0 does not work for
cases where dcons_drv_init was called already as part of low level
console initialization.

15 years agoRemove usb_sw_transfer.[ch] which are now empty after r190735.
Andrew Thompson [Mon, 6 Apr 2009 00:32:54 +0000 (00:32 +0000)]
Remove usb_sw_transfer.[ch] which are now empty after r190735.

15 years agoProvide a better commit log for r190735, forced by making a whitespace change.
Andrew Thompson [Mon, 6 Apr 2009 00:22:49 +0000 (00:22 +0000)]
Provide a better commit log for r190735, forced by making a whitespace change.

Refactor how we interface with the root HUB. This is achieved by making a
direct call from usb2_do_request to the host controller for root hub requests,
this call will perform the controller specific register read/writes and return
the error code.

This cuts out a lot of code in the host controller files and saves one thread
per USB bus.

Submitted by: Hans Petter Selasky

15 years agoIf KTR_SUBSYS is compiled in, it does not necessarily mean that user
Alexander Kabaev [Sun, 5 Apr 2009 23:25:06 +0000 (23:25 +0000)]
If KTR_SUBSYS is compiled in, it does not necessarily mean that user
is interested in being spammed by mcast-related printfs.

Use proper check against ktr_mask instead KTR_COMPILE.

15 years agoRegenerate src.conf.5.
Ed Schouten [Sun, 5 Apr 2009 22:15:35 +0000 (22:15 +0000)]
Regenerate src.conf.5.

15 years agoRemove if_ppp(4) and if_sl(4).
Ed Schouten [Sun, 5 Apr 2009 22:08:18 +0000 (22:08 +0000)]
Remove if_ppp(4) and if_sl(4).

Not only did these two drivers depend on IFF_NEEDSGIANT, they were
broken 7 months ago during the MPSAFE TTY import. if_ppp(4) has been
replaced by ppp(8). There is no replacement for if_sl(4).

If we see regressions in for example the ports tree, we should just use
__FreeBSD_version 800045 to check whether if_ppp(4) and if_sl(4) are
present. Version 800045 is used to denote the import of MPSAFE TTY.

Discussed with: rwatson, but also rwatson's IFF_NEEDSGIANT emails on the
                lists.

15 years agoFix the build when KDB is disabled. The second instance of rfi in
Nathan Whitehorn [Sun, 5 Apr 2009 21:52:13 +0000 (21:52 +0000)]
Fix the build when KDB is disabled. The second instance of rfi in
trap_subr.S that is patched at runtime to rfid on 64-bit systems
is inside KDB-specific code, so don't patch it without KDB.

15 years agoRemove pointeless mergeinfo that crept in from r190633.
Paolo Pisati [Sun, 5 Apr 2009 21:24:15 +0000 (21:24 +0000)]
Remove pointeless mergeinfo that crept in from r190633.

15 years agoRemember to clear the ports list before generation for prefetch
Poul-Henning Kamp [Sun, 5 Apr 2009 20:59:26 +0000 (20:59 +0000)]
Remember to clear the ports list before generation for prefetch

15 years agoAdd an Open Firmware access module for real-mode OF accesses to the PowerPC
Nathan Whitehorn [Sun, 5 Apr 2009 18:40:15 +0000 (18:40 +0000)]
Add an Open Firmware access module for real-mode OF accesses to the PowerPC
build. This is required for the IBM Mambo simulator, as well as a variety
of non-Apple PowerPC hardware.

15 years agoMFp4 //depot/projects/usb@159934
Andrew Thompson [Sun, 5 Apr 2009 18:30:24 +0000 (18:30 +0000)]
MFp4 //depot/projects/usb@159934

Update libusb function descriptions.

Submitted by: Chuck Robey

15 years agoSilence a printf warning
Poul-Henning Kamp [Sun, 5 Apr 2009 18:28:42 +0000 (18:28 +0000)]
Silence a printf warning

15 years agoCatch up with usb2_config struct layout changes.
Andrew Thompson [Sun, 5 Apr 2009 18:26:19 +0000 (18:26 +0000)]
Catch up with usb2_config struct layout changes.

15 years agoMFp4 //depot/projects/usb@160056
Andrew Thompson [Sun, 5 Apr 2009 18:22:13 +0000 (18:22 +0000)]
MFp4 //depot/projects/usb@160056

Remove code for unused and unlikely quirk, "uq_power_claim"

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@160052
Andrew Thompson [Sun, 5 Apr 2009 18:22:03 +0000 (18:22 +0000)]
MFp4 //depot/projects/usb@160052

Wait until line configuration is complete before starting data transfers.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159995
Andrew Thompson [Sun, 5 Apr 2009 18:21:51 +0000 (18:21 +0000)]
MFp4 //depot/projects/usb@159995

- add support for more complicated HID descriptors which can have multiple
  definitions of the same field.
- remove old modulo patch in ums, which I think is due to bad HID parsing,
  which should be fixed now.

Reported by: netchild
Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159992
Andrew Thompson [Sun, 5 Apr 2009 18:21:40 +0000 (18:21 +0000)]
MFp4 //depot/projects/usb@159992

at91_udp.c does not exist anymore, it is now replaced by at91dci in
src/sys/dev/usb/controller. Also remove the ohci_atmelarm.c because it is also
included in src/sys/conf/files

Submitted by: Sylvestre Gallon

15 years agoMFp4 //depot/projects/usb@159948
Andrew Thompson [Sun, 5 Apr 2009 18:21:31 +0000 (18:21 +0000)]
MFp4 //depot/projects/usb@159948

Add more debugging output on enumeration failures.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159946
Andrew Thompson [Sun, 5 Apr 2009 18:21:21 +0000 (18:21 +0000)]
MFp4 //depot/projects/usb@159946

Some cancelable flags are always true.  Substitute these away. These cancelable
flags were mostly useful with the root HUB which is now handled differently.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159926
Andrew Thompson [Sun, 5 Apr 2009 18:21:08 +0000 (18:21 +0000)]
MFp4 //depot/projects/usb@159926

Minor code factorisation in atmegadci.c

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159925
Andrew Thompson [Sun, 5 Apr 2009 18:20:58 +0000 (18:20 +0000)]
MFp4 //depot/projects/usb@159925

Cast variables properly for non-32-bit platforms.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159922
Andrew Thompson [Sun, 5 Apr 2009 18:20:49 +0000 (18:20 +0000)]
MFp4 //depot/projects/usb@159922

Refactor how we interface with the root HUB. This cuts around 1200 lines of
code totally and saves one thread per USB bus.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159909
Andrew Thompson [Sun, 5 Apr 2009 18:20:38 +0000 (18:20 +0000)]
MFp4 //depot/projects/usb@159909

- make usb2_power_mask_t 16-bit
- remove "usb2_config_sub" structure from "usb2_config". To compensate for this
  "usb2_config" has a new field called "usb_mode" which select for which mode
  the current xfer entry is active. Options are: a) Device mode only b) Host
  mode only (default-by-zero) c) Both modes.  This change was scripted using
  the following sed script: "s/\.mh\././g".
- the standard packet size table in "usb_transfer.c" is now a function, hence
  the code for the function uses less memory than the table itself.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159908
Andrew Thompson [Sun, 5 Apr 2009 18:20:24 +0000 (18:20 +0000)]
MFp4 //depot/projects/usb@159908

Reduce the amount of memory used by better sizing buffer arrays.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159897
Andrew Thompson [Sun, 5 Apr 2009 18:20:13 +0000 (18:20 +0000)]
MFp4 //depot/projects/usb@159897

Add new endpoint direction values for use with usb2_config

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159871
Andrew Thompson [Sun, 5 Apr 2009 18:20:03 +0000 (18:20 +0000)]
MFp4 //depot/projects/usb@159871

- bugfixes after the memory usage reduction patch
- Use "udev->pipes_max" instead of USB_EP_MAX
- Use correct "bmRequestType" for getting the config descriptor.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159866
Andrew Thompson [Sun, 5 Apr 2009 18:19:52 +0000 (18:19 +0000)]
MFp4 //depot/projects/usb@159866

- memory usage reduction by only allocating the required USB pipes and USB
  interfaces.
- cleanup some USB parsing functions to be more flexible.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159864
Andrew Thompson [Sun, 5 Apr 2009 18:19:42 +0000 (18:19 +0000)]
MFp4 //depot/projects/usb@159864

Fix possible deadlock with UGEN at detach.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159863
Andrew Thompson [Sun, 5 Apr 2009 18:19:30 +0000 (18:19 +0000)]
MFp4 //depot/projects/usb@159863

Speed up the endpoint descriptor search

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159811
Andrew Thompson [Sun, 5 Apr 2009 18:19:19 +0000 (18:19 +0000)]
MFp4 //depot/projects/usb@159811

First patch in a series of memory save patches.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159806
Andrew Thompson [Sun, 5 Apr 2009 18:19:10 +0000 (18:19 +0000)]
MFp4 //depot/projects/usb@159806

Properly name usb2_uref_location() so that it is not confused with
usb2_unref_location() .

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159797
Andrew Thompson [Sun, 5 Apr 2009 18:19:00 +0000 (18:19 +0000)]
MFp4 //depot/projects/usb@159797

Remove unused field in "struct usb2_pipe".

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159700
Andrew Thompson [Sun, 5 Apr 2009 18:18:47 +0000 (18:18 +0000)]
MFp4 //depot/projects/usb@159700

Get rid of the last CALLOUT_RETURNUNLOCKED reference.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159677
Andrew Thompson [Sun, 5 Apr 2009 18:18:36 +0000 (18:18 +0000)]
MFp4 //depot/projects/usb@159677

Remove redundant locking.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159674
Andrew Thompson [Sun, 5 Apr 2009 18:18:25 +0000 (18:18 +0000)]
MFp4 //depot/projects/usb@159674

Fix more corner cases around reception of SETUP packets.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159673
Andrew Thompson [Sun, 5 Apr 2009 18:18:16 +0000 (18:18 +0000)]
MFp4 //depot/projects/usb@159673

Fix a corner case around stalling SETUP packets in device side mode.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159671
Andrew Thompson [Sun, 5 Apr 2009 18:18:07 +0000 (18:18 +0000)]
MFp4 //depot/projects/usb@159671

Fix interrupt register setting on the atmegadci controller.

Submitted by: Hans Petter Selasky

15 years agoMFp4 //depot/projects/usb@159562
Andrew Thompson [Sun, 5 Apr 2009 18:18:01 +0000 (18:18 +0000)]
MFp4 //depot/projects/usb@159562

Reapply r190173 with compilation fixed on 64bit arches.

Submitted by: Hans Petter Selasky

15 years agoAdd some consts, remove some unused stuff and other attempts to calm
Poul-Henning Kamp [Sun, 5 Apr 2009 17:33:07 +0000 (17:33 +0000)]
Add some consts, remove some unused stuff and other attempts to calm
FlexeLint down.

15 years agoFix casts which are not by definition safe, but which malloc(3)
Poul-Henning Kamp [Sun, 5 Apr 2009 17:12:13 +0000 (17:12 +0000)]
Fix casts which are not by definition safe, but which malloc(3)
makes safe for us.

15 years agoSome constifications
Poul-Henning Kamp [Sun, 5 Apr 2009 16:01:56 +0000 (16:01 +0000)]
Some constifications

15 years agoModernize prototypes (ie: no extern)
Poul-Henning Kamp [Sun, 5 Apr 2009 15:55:09 +0000 (15:55 +0000)]
Modernize prototypes (ie: no extern)

Make lots of stuff static.

15 years agoImprove a bit reass documentation:
Paolo Pisati [Sun, 5 Apr 2009 15:24:27 +0000 (15:24 +0000)]
Improve a bit reass documentation:

-document fragment handling sysctls
-mention some caveats about fragments handling (and to deal with it)

15 years agoConvert list of remote interfaces to LIST_* macros
Poul-Henning Kamp [Sun, 5 Apr 2009 15:06:02 +0000 (15:06 +0000)]
Convert list of remote interfaces to LIST_* macros

15 years agoKick WARNS level up to 6 by fixing various trivial warnings.
Poul-Henning Kamp [Sun, 5 Apr 2009 14:15:05 +0000 (14:15 +0000)]
Kick WARNS level up to 6 by fixing various trivial warnings.

15 years agoUse <sys/queue.h> to manage the interface list.
Poul-Henning Kamp [Sun, 5 Apr 2009 14:01:39 +0000 (14:01 +0000)]
Use <sys/queue.h> to manage the interface list.

15 years agoRemove newlines from string argument of __COPYRIGHT(), it results in
Poul-Henning Kamp [Sun, 5 Apr 2009 13:48:06 +0000 (13:48 +0000)]
Remove newlines from string argument of __COPYRIGHT(), it results in
assembler warning messages.

15 years agoSend multicast on p2p interfaces if they can and are not prohibited
Poul-Henning Kamp [Sun, 5 Apr 2009 12:41:59 +0000 (12:41 +0000)]
Send multicast on p2p interfaces if they can and are not prohibited
from doing so with no_rip_mcast in /etc/gateways.

This allows routed(8) to work with the way ports/security/openvpn
employs the tun(4) interface.

15 years agoFix KBI breakage by r190520 which affects older linux.ko binaries:
Dmitry Chagin [Sun, 5 Apr 2009 09:27:19 +0000 (09:27 +0000)]
Fix KBI breakage by r190520 which affects older linux.ko binaries:

1) Move the new field (brand_note) to the end of the Brandinfo structure.
2) Add a new flag BI_BRAND_NOTE that indicates that the brand_note pointer
   is valid.
3) Use the brand_note field if the flag BI_BRAND_NOTE is set and as old
   modules won't have the flag set, so the new field brand_note would be
   ignored.

Suggested by: jhb
Reviewed by: jhb
Approved by: kib (mentor)
MFC after: 6 days

15 years agoRevert c190007 at the request of Ruslan. It was not correct because
Warner Losh [Sun, 5 Apr 2009 00:24:49 +0000 (00:24 +0000)]
Revert c190007 at the request of Ruslan.  It was not correct because
ar had been moved from cross tools to bootstrap tools when bsd ar was
introduced.

Submitted by: ru@

15 years agoRetire VM_PROT_READ_IS_EXEC. It was intended to be a micro-optimization,
Alan Cox [Sat, 4 Apr 2009 23:12:14 +0000 (23:12 +0000)]
Retire VM_PROT_READ_IS_EXEC.  It was intended to be a micro-optimization,
but I see no benefit from it today.

VM_PROT_READ_IS_EXEC was only intended for use on processors that do not
distinguish between read and execute permission.  On an mmap(2) or
mprotect(2), it automatically added execute permission if the caller
specified permissions included read permission.  The hope was that this
would reduce the number of vm map entries needed to implement an address
space because there would be fewer neighboring vm map entries that differed
only in the presence or absence of VM_PROT_EXECUTE.  (See vm/vm_mmap.c
revision 1.56.)

Today, I don't see any real applications that benefit from
VM_PROT_READ_IS_EXEC.  In any case, vm map entries are now organized
as a self-adjusting binary search tree instead of an ordered list.  So,
the need for coalescing vm map entries is not as great as it once was.

15 years agoPerform a dummy stwcx. when we switch contexts. The context
Marcel Moolenaar [Sat, 4 Apr 2009 22:23:03 +0000 (22:23 +0000)]
Perform a dummy stwcx. when we switch contexts. The context
being switched out may hold a reservation. The stwcx. will
clear the reservation. This is architecturally recommended.

The scenario this addresses is as follows:
1. Thread 1 performs a lwarx and as such holds a reservation.
2. Thread 1 gets switched out (before doing the matching
   stwcx.) and thread 2 is switched in.
3. Thread 2 performs a stwcx. to the same reservation granule.
   This will succeed because the processor has the reservation
   even though thread 2 didn't do the lwarx.

Note that on some processors the address given the stwcx. is
not checked. On these processors the mere condition of having
a reservation would cause the stwcx. to succeed, irrespective
of whether the addresses are the same. The dummy stwcx. is
especially important for those processors.

15 years agoAdd sysarch.h. It's included by drm(4).
Marcel Moolenaar [Sat, 4 Apr 2009 22:05:36 +0000 (22:05 +0000)]
Add sysarch.h. It's included by drm(4).

15 years agoFirst round of cleanups. There's a lot of NetBSDism in this header.
Marcel Moolenaar [Sat, 4 Apr 2009 22:03:19 +0000 (22:03 +0000)]
First round of cleanups. There's a lot of NetBSDism in this header.

15 years agoImplement kernel core dump support for Book-E processors.
Marcel Moolenaar [Sat, 4 Apr 2009 22:01:43 +0000 (22:01 +0000)]
Implement kernel core dump support for Book-E processors.
Both raw physical memory dumps and virtual minidumps are
supported. The default being minidumps.

Obtained from: Juniper Networks

15 years agoFixup the parameters to audit_submit(3) the order is errno then return
Christian S.J. Peron [Sat, 4 Apr 2009 20:58:18 +0000 (20:58 +0000)]
Fixup the parameters to audit_submit(3) the order is errno then return
value.  This bug went un-noticed for so long because EPERM == 1

MFC after: 1 week
Spotted by: sson, rwatson

15 years agoTemporary hack to unbreak user/group lookups;
Tim Kientzle [Sat, 4 Apr 2009 20:08:08 +0000 (20:08 +0000)]
Temporary hack to unbreak user/group lookups;
use a larger buffer for getpwuid_r/getgrgid_r.
This needs to be dynamically sized.

15 years agoDon't let trailing empty lines overwrite the result of the last command with 0.
Stefan Farfeleder [Sat, 4 Apr 2009 19:06:52 +0000 (19:06 +0000)]
Don't let trailing empty lines overwrite the result of the last command with 0.
This affects the built-ins eval, fc, and trap and also the string passed to sh
with the -c option.

Submitted by: Jilles Tjoelker

15 years agoRevert change 190655 temporarily. It breaks many setups where nullfs is
Alexander Kabaev [Sat, 4 Apr 2009 17:48:38 +0000 (17:48 +0000)]
Revert change 190655 temporarily. It breaks many setups where nullfs is
used and needs to be revisited.

15 years agoModularize the Macintosh built-in ATA along the lines of the rest of the
Nathan Whitehorn [Sat, 4 Apr 2009 17:05:17 +0000 (17:05 +0000)]
Modularize the Macintosh built-in ATA along the lines of the rest of the
ATA system as an optional atamacio device.

PR:             powerpc/133161
Submitted by:   Bruce Cran

15 years ago- Add the support for the Asus A3F and A3E device
Attilio Rao [Sat, 4 Apr 2009 17:01:32 +0000 (17:01 +0000)]
- Add the support for the Asus A3F and A3E device
- Fix style for A3N and for a comment

Submitted by: Akira Funahashi <funa@funa.org>
Tested by: Marcin Nowak <marcin.nowak@simplusnet.pl>,
Diego Sardina <diego.sardina@gmx.com>
PR: kern/128634

15 years ago- Style: size_t can't be negative.
Ruslan Ermilov [Sat, 4 Apr 2009 16:03:28 +0000 (16:03 +0000)]
- Style: size_t can't be negative.

- Don't exit with a zero status code when no jails are configured
  on a system.

- Style: simplify some code constructs.

- If a single jail cannot be found, let the caller print a nicer
  diagnostic message.

Reviewed by: bz
MFC after: 3 days

15 years agoFixed NAME section.
Ruslan Ermilov [Sat, 4 Apr 2009 15:48:09 +0000 (15:48 +0000)]
Fixed NAME section.

15 years agoFix mbuf chain layout pessimization:
Bruce M Simpson [Sat, 4 Apr 2009 15:32:23 +0000 (15:32 +0000)]
Fix mbuf chain layout pessimization:
 in the case where a single mbuf is allocated due to
 m_getcl() returning NULL, we already call MH_ALIGN,
 so do not increment m->m_data in this case.

Found during MLDv2 port.

15 years agoDo not obliterate QQI with MAXRESP.
Bruce M Simpson [Sat, 4 Apr 2009 15:26:32 +0000 (15:26 +0000)]
Do not obliterate QQI with MAXRESP.

Found during MLDv2 port.

15 years agoWhen removing or renaming snaphost, do not delve into request_cleanup().
Konstantin Belousov [Sat, 4 Apr 2009 12:19:52 +0000 (12:19 +0000)]
When removing or renaming snaphost, do not delve into request_cleanup().
The later may need blocks from the underlying device that belongs
to normal files, that should not be locked while snap lock is held.

Reported and tested by: pho
MFC after: 1 month

15 years agoMany bug fixes (from the IETF hack-fest):
Randall Stewart [Sat, 4 Apr 2009 11:43:32 +0000 (11:43 +0000)]
Many bug fixes (from the IETF hack-fest):
- PR-SCTP had major issues when skipping through a multi-part message.
  o Did not look at socket buffer.
  o Did not properly handle the reassmebly queue.
  o The MARKED segments could interfere and un-skip a chunk causing
    a problem with the proper FWD-TSN.
  o No FR of FWD-TSN's was being done.
- NR-Sack code was basically disabled. It needed fixes that
  never got into the real code.
- CMT code had issues when the two paths were NOT the same b/w. We
  found a few small bugs, but also the critcal one here was not
  dividing the rwnd amongst the paths.

Obtained from: Michael Tuexen and myself at the IETF hack-fest ;-)

15 years agoAdd uath(4) wireless USB driver for Atheros AR5005UG and AR5005UX
Weongyo Jeong [Sat, 4 Apr 2009 11:23:00 +0000 (11:23 +0000)]
Add uath(4) wireless USB driver for Atheros AR5005UG and AR5005UX
chipsets.

Reviewed by: sam

15 years agoPowerPC, meet kernel core dumps. The support is based
Marcel Moolenaar [Sat, 4 Apr 2009 02:12:37 +0000 (02:12 +0000)]
PowerPC, meet kernel core dumps. The support is based
on a generic dumper that creates an ELF core file and
uses PMAP functions to scan and iterate over memory
chunks, as well as handle memory mappings used during
dumping.
the PMAP layer can choose to return physical memory
chunks or virtual memory chunks. For minidumps, the
chunks should be virtual.

The default MMU I/F implementation for the scan_md()
method returns NULL. Thus, when a PMAP implementation
does not implement the required methods, an empty
core file is created. Here, empty means having an ELF
header only.

Obtained from: Juniper Networks

15 years agoThe Serverworks SATA chipsets used in Apple G5 systems require requiring
Nathan Whitehorn [Sat, 4 Apr 2009 00:26:01 +0000 (00:26 +0000)]
The Serverworks SATA chipsets used in Apple G5 systems require requiring
the ATA status register with a 4-byte read request. This updates it, and
subsequent 1-byte reads will return the correct result.

This commit adds a hack to do this, which is currently ifdef'd powerpc,
although Linux and Darwin do this unconditionally on all platforms.

15 years agoAdd support for 64-bit PowerPC CPUs operating in the 64-bit bridge mode
Nathan Whitehorn [Sat, 4 Apr 2009 00:22:44 +0000 (00:22 +0000)]
Add support for 64-bit PowerPC CPUs operating in the 64-bit bridge mode
provided, for example, on the PowerPC 970 (G5), as well as on related CPUs
like the POWER3 and POWER4.

This also adds support for various built-in hardware found on Apple G5
hardware (e.g. the IBM CPC925 northbridge).

Reviewed by:    grehan

15 years agoCatch up with recent locking changes.
Tom Rhodes [Fri, 3 Apr 2009 23:52:47 +0000 (23:52 +0000)]
Catch up with recent locking changes.

PR: 132546
Submitted by: pluknet <pluknet@gmail.com>
Reviewed by: alc

15 years agoSet SO_NOSIGPIPE on sockets used by phttpget. Without this, if
Colin Percival [Fri, 3 Apr 2009 21:13:18 +0000 (21:13 +0000)]
Set SO_NOSIGPIPE on sockets used by phttpget.  Without this, if
(1) phttpget is attempting to download enough files that it can't send
all the requests at once, and
(2) the remote server forcibly closes the connection, resulting in RST
packets being sent,
phttpget will receive a SIGPIPE and terminate without downloading all
of the files.

This is probably responsible for a number of hard-to-reproduce errors
with portsnap and freebsd-update.

MFC after: 3 days

15 years agofix whitespace
Sam Leffler [Fri, 3 Apr 2009 20:46:32 +0000 (20:46 +0000)]
fix whitespace

15 years agoAdd interleaving root hold tokens from the CAM probe to disk_create and geom
Andrew Thompson [Fri, 3 Apr 2009 19:49:33 +0000 (19:49 +0000)]
Add interleaving root hold tokens from the CAM probe to disk_create and geom
provider tasting. This is needed for disk attachments that happen after threads
are running in the boot process.

Tested by: rnoland

15 years agoAdd a how argument to root_mount_hold() so it can be passed NOWAIT and be called
Andrew Thompson [Fri, 3 Apr 2009 19:46:12 +0000 (19:46 +0000)]
Add a how argument to root_mount_hold() so it can be passed NOWAIT and be called
in situations where sleeping isnt allowed.

15 years agoAdd support for RV790 (HD 4890) asics
Robert Noland [Fri, 3 Apr 2009 19:23:14 +0000 (19:23 +0000)]
Add support for RV790 (HD 4890) asics

MFC after: 3 days

15 years agoA little more cleanup from AMD, if we don't have the right microcode
Robert Noland [Fri, 3 Apr 2009 19:21:39 +0000 (19:21 +0000)]
A little more cleanup from AMD, if we don't have the right microcode
there is no reason to mess with the chip.

MFC after: 3 days

15 years agoAllow the NULL, RTLD_SELF and RTLD_NEXT handles to work with dlfunc(3).
Konstantin Belousov [Fri, 3 Apr 2009 19:17:23 +0000 (19:17 +0000)]
Allow the NULL, RTLD_SELF and RTLD_NEXT handles to work with dlfunc(3).
dlfunc() called dlsym() to do the work, and dlsym() determines the dso
that originating the call by the return address. Due to this, dlfunc()
operated as if the caller is always the libc.

To fix this, move the dlfunc() to rtld, where it can call the internal
implementation of dlsym, and still correctly fetch return address.
Provide usual weak stub for the symbol from libc for static binaries.
dlfunc is put to FBSD_1.0 symver namespace in the ld.so export to
override dlfunc@FBSD_1.0 weak symbol, exported by libc.

Reported, analyzed and tested by: Tijl Coosemans <tijl ulyssis org>
PR: standards/133339
Reviewed by: kan

15 years agoo update dwds mcast handling after hoisting ieee80211_encap: frames need
Sam Leffler [Fri, 3 Apr 2009 18:00:19 +0000 (18:00 +0000)]
o update dwds mcast handling after hoisting ieee80211_encap: frames need
  to be encapsulated before dispatching to the driver
o eliminate M_WDS now that we call ieee80211_encap directly and can supply
  the wds vap to indicate a 4-address frame should be created

15 years ago- Fix spacing in the comment.
Stanislav Sedov [Fri, 3 Apr 2009 13:35:54 +0000 (13:35 +0000)]
- Fix spacing in the comment.

Reported by: jhb

15 years ago- Correct the comment.
Stanislav Sedov [Fri, 3 Apr 2009 10:15:00 +0000 (10:15 +0000)]
- Correct the comment.

MFC after: 3 days