]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agofix build with VNET enabled
luigi [Sat, 5 Dec 2009 08:32:12 +0000 (08:32 +0000)]
fix build with VNET enabled

Reported by: David Wolfskill

14 years agoRegenerate.
kib [Fri, 4 Dec 2009 21:53:20 +0000 (21:53 +0000)]
Regenerate.

14 years agoAdd several syscall compat32 entries for acl manipulation.
kib [Fri, 4 Dec 2009 21:52:31 +0000 (21:52 +0000)]
Add several syscall compat32 entries for acl manipulation.
They do not require translation of the arguments.

Tested by: bsam
MFC after: 1 week

14 years agoThis is v4l support for the linuxulator. This allows to access FreeBSD
netchild [Fri, 4 Dec 2009 21:06:54 +0000 (21:06 +0000)]
This is v4l support for the linuxulator. This allows to access FreeBSD
native devices which support the v4l API from processes running within
the linuxulator, e.g. skype or flash can access the multimedia/pwcbsd driver.

Not tested is firmware upload, framebuffer stuff and video tuner stuff
due to lack of hardware.
The clipping part (VIDIOCSWIN) needs a little bit of further work (partly
in progress, but can not be tested due to lack of a suitable device).

The submitter tested this sucessfully with Skype and flash apps on amd64 and
i386 with the multimedia/pwcbsd driver.

Submitted by: J.R. Oldroyd <fbsd@opal.com>

14 years agoImport the unchanged v4l videodev.h from the vendor branch.
netchild [Fri, 4 Dec 2009 20:46:45 +0000 (20:46 +0000)]
Import the unchanged v4l videodev.h from the vendor branch.

14 years agoImport the interface description of the video for linux (v4l) subsystem.
netchild [Fri, 4 Dec 2009 20:42:08 +0000 (20:42 +0000)]
Import the interface description of the video for linux (v4l) subsystem.
The header is importet from linux 2.6.17.

The header does not come with a license, the author
(Alan Cox <alan@redhat.com>) gave his permission to use it (note, X.org
has a copy of the header too):
---snip---
> Alan Cox <alan@redhat.com> said:
>
> > On Tue, Apr 12, 2005 at 03:13:15PM -0700, Julian Elischer wrote:
> > > How does the licensing of the include files stand?
>
> Basically you cannot copyright an interface - its a fact rather
> than creative expression normally.
>
> > > Of course there's always the "type it all in again" approach
> > > where we define a functionally equivalent but completely
> > > differntly spelled API,
>
> Wouldn't even need to be differently spelled.
>
> I'm all for this kind of sharing.
>
> Alan
---snip---

A more complete mail history is provided in the README file.

Approved by: core
Thanks to: julian (he also has the OK to use the v4l2 header)

14 years agoUse INET_ADDRSTRLEN and INET6_ADDRSTRLEN rather than hard
ume [Fri, 4 Dec 2009 15:39:37 +0000 (15:39 +0000)]
Use INET_ADDRSTRLEN and INET6_ADDRSTRLEN rather than hard
coded number.

Spotted by: bz

14 years agofix argument type in the call to expand_number
luigi [Fri, 4 Dec 2009 14:18:30 +0000 (14:18 +0000)]
fix argument type in the call to expand_number

Submitted by: gcc 4.3
MFC after: 3 days

14 years ago- In ypproc_all_2_svc(), yp_fork() is called only when !debug case.
kuriyama [Fri, 4 Dec 2009 14:12:37 +0000 (14:12 +0000)]
- In ypproc_all_2_svc(), yp_fork() is called only when !debug case.
  So _exit() in the bottom of this function should be called with the
  same case.

14 years ago- Replace magic number with YPOLDVERS macro (which may be missed in
kuriyama [Fri, 4 Dec 2009 14:08:57 +0000 (14:08 +0000)]
- Replace magic number with YPOLDVERS macro (which may be missed in
  r14262).

14 years agoAdd disk-magic for amd64: same as i386.
phk [Fri, 4 Dec 2009 10:57:01 +0000 (10:57 +0000)]
Add disk-magic for amd64: same as i386.

Pass PORTS_OPTS wherever we invoke ports makefiles

Add a logfile where we can see the progress of distfile prefetching

14 years agoAdd a missing word to a sentence in the return values section.
trhodes [Fri, 4 Dec 2009 09:20:20 +0000 (09:20 +0000)]
Add a missing word to a sentence in the return values section.

14 years agoichsmb: drop default attachment to generic smbus hardware
avg [Fri, 4 Dec 2009 05:45:46 +0000 (05:45 +0000)]
ichsmb: drop default attachment to generic smbus hardware

Attach only to devices known to be supported.
This change overrided and undoes r200053.

Suggested by: jhb
MFC after: 2 weeks (only to stable/8)

14 years agoFix cases where we've managed to get a Loop UP event prior to initializing
mjacob [Fri, 4 Dec 2009 03:34:12 +0000 (03:34 +0000)]
Fix cases where we've managed to get a Loop UP event prior to initializing
the loop down counter, as well as other things. This was brought to my
attention with a different fix, more for RELENG_7- this one covers the
multiple channel case.

PR: 140438
MFC after: 1 month

14 years agoAdd workaround to overcome hardware limitation which allows only a
yongari [Thu, 3 Dec 2009 23:57:06 +0000 (23:57 +0000)]
Add workaround to overcome hardware limitation which allows only a
single outstanding DMA read operation. Most controllers targeted to
client with PCIe bus interface(e.g. BCM5761) may have this
limitation. All controllers for servers does not have this
limitation.
Collapsing mbuf chains to reduce number of memory reads before
transmitting was most effective way to workaround this. I got about
940Mbps from 850Mbps with mbuf collapsing on BCM5761. However it
takes a lot of CPU cycles to collapse mbuf chains so add tunable to
control the number of allowed TX buffers before collapsing. The
default value is 0 which effectively disables the forced collapsing.
For most cases 2 would yield best performance(about 930Mbps)
without much sacrificing CPU cycles.
Note the collapsing is only activated when the controller is on
PCIe bus and the frame does not need TSO operation. TSO does not
seem to suffer from the hardware limitation because the payload
size is much bigger than normal IP datagram.
Thanks to davidch@ who told me the limitation of client controllers
and actually gave possible workarounds to mitigate the limitation.

Reviewed by: davidch, marius

14 years agoAdd uhci/ehci controller ids.
thompsa [Thu, 3 Dec 2009 23:24:12 +0000 (23:24 +0000)]
Add uhci/ehci controller ids.

Submitted by: mitya_cabletv.dp.ua

14 years agoChange 'load' balancing mode algorithm:
mav [Thu, 3 Dec 2009 21:47:51 +0000 (21:47 +0000)]
Change 'load' balancing mode algorithm:
- Instead of measuring last request execution time for each drive and
choosing one with smallest time, use averaged number of requests, running
on each drive. This information is more accurate and timely. It allows to
distribute load between drives in more even and predictable way.
- For each drive track offset of the last submitted request. If new request
offset matches previous one or close for some drive, prefer that drive.
It allows to significantly speedup simultaneous sequential reads.

PR: kern/113885
Reviewed by: sobomax

14 years agoRepair breakage to last-minute API change.
ed [Thu, 3 Dec 2009 21:44:41 +0000 (21:44 +0000)]
Repair breakage to last-minute API change.

I changed ulog_log{in,out} to return a void, but forgot to change
ulog-helper as well.

Reported by: stefanf

14 years agoProperly return an error reply if an NFS remove or link operation fails.
jhb [Thu, 3 Dec 2009 20:59:28 +0000 (20:59 +0000)]
Properly return an error reply if an NFS remove or link operation fails.
Previously the failing operation would allocate an mbuf and construct an
error reply, but because the function did not return 0, the NFS server
assumed it had failed to generate a reply and would leak the reply mbuf as
well as not sending the reply to the NFS client.

PR: kern/140853
Submitted by: Ted Faber  faber at isi edu (remove)
Reviewed by: rmacklem (remove)
MFC after: 1 week

14 years agoThe first argument of dcbz interprets r0 as a literal zero, not the second.
nwhitehorn [Thu, 3 Dec 2009 20:55:09 +0000 (20:55 +0000)]
The first argument of dcbz interprets r0 as a literal zero, not the second.
This worked before by accident.

MFC after: 1 week

14 years agoRemove wrong assertion. Debugee is allowed to lose a signal.
kib [Thu, 3 Dec 2009 20:16:59 +0000 (20:16 +0000)]
Remove wrong assertion. Debugee is allowed to lose a signal.

Reported and tested by: jh
MFC after: 2 weeks

14 years agoYet another cosmetic fix.
trasz [Thu, 3 Dec 2009 20:06:03 +0000 (20:06 +0000)]
Yet another cosmetic fix.

14 years agoCosmetical fixes.
trasz [Thu, 3 Dec 2009 20:02:26 +0000 (20:02 +0000)]
Cosmetical fixes.

14 years agoCosmetical fixes.
trasz [Thu, 3 Dec 2009 19:59:27 +0000 (19:59 +0000)]
Cosmetical fixes.

14 years ago- Update the Spanish NLS catalog
gabor [Thu, 3 Dec 2009 19:27:12 +0000 (19:27 +0000)]
- Update the Spanish NLS catalog

Reviewed by: carvay,
the.infamous.paul@gmail.com,
Joan Picanyol i Puig <lists-freebsd-es@biaix.org>,
Ing . Marcos Luis Ortiz Valmaseda <mlortiz@uci.cu>,
eskanete@gmail.com,
Jose M Rodriguez <josemi@freebsd.jazztel.es>,
Guillermo Hernandez <guillermo@QuerySoft.es>,
dani.doni@gmail.com

14 years agoDescription of steps required to setup NFSv4 server is in nfsv4(4);
trasz [Thu, 3 Dec 2009 19:16:40 +0000 (19:16 +0000)]
Description of steps required to setup NFSv4 server is in nfsv4(4);
add reference to exports(5), since that's the obvious starting point
for searching for this.

14 years agoRemove unused code.
trasz [Thu, 3 Dec 2009 18:16:14 +0000 (18:16 +0000)]
Remove unused code.

14 years agoAdd manpages for ams(4), akbd(4), adb(4), and cuda(4), which describe
nwhitehorn [Thu, 3 Dec 2009 18:13:47 +0000 (18:13 +0000)]
Add manpages for ams(4), akbd(4), adb(4), and cuda(4), which describe
various drivers for Apple Desktop Bus controllers and peripherals.

MFC after: 3 days

14 years agoRemove unneeded ifdefs.
trasz [Thu, 3 Dec 2009 18:03:42 +0000 (18:03 +0000)]
Remove unneeded ifdefs.

Reviewed by: rmacklem

14 years agoConnect unzip to the build.
rdivacky [Thu, 3 Dec 2009 18:02:55 +0000 (18:02 +0000)]
Connect unzip to the build.

Approved by: ed (mentor)
Approved by: des (unzip author)
Tested by: exp ports build (miwi)

14 years agoUse USER_PROCESS instead of LOGIN_PROCESS.
ed [Thu, 3 Dec 2009 17:05:36 +0000 (17:05 +0000)]
Use USER_PROCESS instead of LOGIN_PROCESS.

POSIX isn't clear about how the fields should be used, but according to
utmpx(5) on Linux, LOGIN_PROCESS refers to a TTY that's still running a
getty.

14 years agoPort users(1) to libulog.
ed [Thu, 3 Dec 2009 16:42:18 +0000 (16:42 +0000)]
Port users(1) to libulog.

Instead of digging through the utmp database by hand, use proper API
calls to do so.  Instead of parsing entries with a non-empty ut_user, we
now look at LOGIN_PROCESS entries.

14 years agoAlso implement ut_type.
ed [Thu, 3 Dec 2009 16:33:47 +0000 (16:33 +0000)]
Also implement ut_type.

I thought we couldn't emulate this field, but we can derive this field
by looking at special values for ut_host, ut_line and ut_name.

14 years agomca: small enhancements related to cpu quirks
avg [Thu, 3 Dec 2009 16:10:21 +0000 (16:10 +0000)]
mca: small enhancements related to cpu quirks

- use utility macros for CPU family/model checking
- limit Intel P6 quirk to pre-Nehalem models (taken from OpenSolaris)
- add AMD GartTblWkEn quirk for families 0Fh and 10h; I haven't experienced
  any problems without the quirk but both Linux and OpenSolaris do this
- slightly re-arrange quirk code to provide for the future generalization
  and separation of vendor-specific quirk functions

Reviewed by: jhb
MFC after: 1 week

14 years agoFix a problem with high CPU consumption (up to 30%) by bsnmpd on a loaded system.
syrinx [Thu, 3 Dec 2009 16:08:00 +0000 (16:08 +0000)]
Fix a problem with high CPU consumption (up to 30%) by bsnmpd on a loaded system.
Instead of constantly calling the mibII_idle function when the server is not busy
call the function only once every 10 seconds to avoid bsnmpd constantly doing
gettimeofday syscalls. Make the idle polling interval confugurable via
begemotIfDataPoll.

Reported and tested by: misho (at) aitbg (dot) com
Oked by: harti
MFC after: 1 week

14 years agoAdd a new library: libulog.
ed [Thu, 3 Dec 2009 15:48:24 +0000 (15:48 +0000)]
Add a new library: libulog.

One of the things I really want to do, is to get rid of the limitations
of our current utmp(5) mechanism:

- It only allows 8 byte TTY device names.
- The hostname only allows 16 bytes of storage.

I'm not a big fan of <utmpx.h>, but I think we should at least try to
add parts of it. Unfortunately we cannot implement <utmpx.h>, because we
miss various fields, such as ut_id, ut_pid, etc. The API provided by
libulog shares some similarities with <utmpx.h>, so it shouldn't be too
hard to port these applications eventually. In most simple cases, it
should just be a matter of removing the ulog_ prefix everywhere.

As a bonus, it also implements a function called ulog_login_pseudo(),
which allows unprivileged applications to write log entries, provided
they have a valid file descriptor to a pseudo-terminal master device.

libulog will allow a smoother transition to a new file format by adding
a library interface to deal with utmp/wtmp/lastlog files. I initially
thought about adding the functionality to libutil, but because I'm not
planning on keeping this library around forever, we'd better keep it
separated.

Next items on the todo list:

1. Port applications in the base system (and ports) to libulog, instead
   of letting them use <utmp.h>.
2. Remove <utmp.h>, implement <utmpx.h> and reimplement this library on
   top.
3. Port as many applications as possible back to <utmpx.h>.

14 years agoThe fd_mask type is an unsigned long, not an int, so treat the mask as a
jhb [Thu, 3 Dec 2009 15:14:30 +0000 (15:14 +0000)]
The fd_mask type is an unsigned long, not an int, so treat the mask as a
long instead of an int when examining the results of select() to look for
RPC requests.  Previously this routine would ignore RPC requests to sockets
whose file descriptor mod 64 was greater than 31 on a 64-bit platform.

PR: amd64/141130
Submitted by: liujb of array networks
MFC after: 3 days

14 years agoUse a better check for a valid kernel stack address when capturing
jkoshy [Thu, 3 Dec 2009 14:59:42 +0000 (14:59 +0000)]
Use a better check for a valid kernel stack address when capturing
kernel call chains.

Submitted by: Mark Unangst <mju at panasas.com>
Tested by: fabient

14 years agopreparation work to replace the monster switch in ipfw_chk() with
luigi [Thu, 3 Dec 2009 14:22:15 +0000 (14:22 +0000)]
preparation work to replace the monster switch in ipfw_chk() with
table of functions.

This commit (which is heavily based on work done by Marta Carbone
in this year's GSOC project), removes the goto's and explicit
return from the inner switch(), so we will have a easier time when
putting the blocks into individual functions.

MFC after: 3 weeks

14 years agoAdd change that was somehow missed in r192586. It could manifest by
trasz [Thu, 3 Dec 2009 13:29:24 +0000 (13:29 +0000)]
Add change that was somehow missed in r192586.  It could manifest by
incorrectly returning EINVAL from acl_valid(3) for applications linked
against pre-8.0 libc.

14 years agouse qsort_r instead of heapsort;
luigi [Thu, 3 Dec 2009 12:23:48 +0000 (12:23 +0000)]
use qsort_r instead of heapsort;
staticize two functions.

MFC after: 3 days

14 years agoTeach an IPv6 to the debug prints.
ume [Thu, 3 Dec 2009 11:16:53 +0000 (11:16 +0000)]
Teach an IPv6 to the debug prints.

14 years agoDisable SSL renegotiation in order to protect against a serious
cperciva [Thu, 3 Dec 2009 09:18:40 +0000 (09:18 +0000)]
Disable SSL renegotiation in order to protect against a serious
protocol flaw. [09:15]

Correctly handle failures from unsetenv resulting from a corrupt
environment in rtld-elf. [09:16]

Fix permissions in freebsd-update in order to prevent leakage of
sensitive files. [09:17]

Approved by: so (cperciva)
Security: FreeBSD-SA-09:15.ssl
Security: FreeBSD-SA-09:16.rtld
Security: FreeBSD-SA-09:17.freebsd-udpate

14 years agoichsmb: try attaching only to intel hardware in the default case
avg [Thu, 3 Dec 2009 08:11:20 +0000 (08:11 +0000)]
ichsmb: try attaching only to intel hardware in the default case

Ideally we should attempt attaching only to known supported devices.
But I am not sure that we have all supported PCI IDs already listed,
and I am too young to die, err, I don't want to take the heat from
causing a trouble to someone.

MFC after: 1 week
X-ToDo: drop the default case

14 years agoichsmb: add pci ids for some newer supported hardware
avg [Thu, 3 Dec 2009 08:01:29 +0000 (08:01 +0000)]
ichsmb: add pci ids for some newer supported hardware

Submitted by: Dmitry S. Luhtionov <mitya@cabletv.dp.ua>
MFC after: 5 days

14 years agoMake sure bus space accesses use unorder memory loads and stores.
marcel [Thu, 3 Dec 2009 04:06:48 +0000 (04:06 +0000)]
Make sure bus space accesses use unorder memory loads and stores.
Memory accesses are posted in program order by virtue of the
uncacheable memory attribute.
Since GCC, by default, adds acquire and release semantics to
volatile memory loads and stores, we need to use inline assembly
to guarantee it. With inline assembly, we don't need volatile
pointers anymore.

Itanium does not support semaphore instructions to uncacheable
memory.

14 years agoFix cut'n paste on the AR9280 entry.
thompsa [Wed, 2 Dec 2009 21:22:10 +0000 (21:22 +0000)]
Fix cut'n paste on the AR9280 entry.

Submitted by: pluknet

14 years agoInclude <sys/sysctl.h>, to get the declarations of ostype and
marcel [Wed, 2 Dec 2009 20:24:37 +0000 (20:24 +0000)]
Include <sys/sysctl.h>, to get the declarations of ostype and
osrelease. Remove the duplicate declarations from this file.

14 years agoAdd missing parameter description.
trasz [Wed, 2 Dec 2009 18:11:14 +0000 (18:11 +0000)]
Add missing parameter description.

14 years agoDon't use ap->a_td->td_ucred when we were passed ap->a_cred.
trasz [Wed, 2 Dec 2009 18:09:22 +0000 (18:09 +0000)]
Don't use ap->a_td->td_ucred when we were passed ap->a_cred.

14 years ago- initialize src_ip in the main loop to prevent a compiler warning
luigi [Wed, 2 Dec 2009 17:50:52 +0000 (17:50 +0000)]
- initialize src_ip in the main loop to prevent a compiler warning
  (gcc 4.x under linux, not sure how real is the complaint).
- rename a macro argument to prevent name clashes.
-  add the macro name on a couple of #endif
- add a blank line for readability.

MFC after: 3 days

14 years agoBump __FreeBSD_version for sigpause(3) addition [1] and
kib [Wed, 2 Dec 2009 16:40:23 +0000 (16:40 +0000)]
Bump __FreeBSD_version for sigpause(3) addition [1] and
PIE support in csu.

Requested by: fluffy [1]

14 years agoProperly support -fPIE by linking PIE binaries with specially-built
kib [Wed, 2 Dec 2009 16:34:20 +0000 (16:34 +0000)]
Properly support -fPIE by linking PIE binaries with specially-built
Scrt1.o instead of crt1.o, since the later is built as non-PIC.

Separate i386-elf crt1.c into the pure assembler part and C code,
supplying all data extracted by assembler stub as explicit parameters [1].
Hide and localize _start1 symbol used as an interface between asm and
C code.

In collaboration with: kan
Inspired by: PR i386/127387 [1]
Prodded and tested by: rdivacky [1]
MFC after: 3 weeks

14 years agondis_scan_results() can sleep if the scan results are not ready when
jhb [Wed, 2 Dec 2009 16:26:18 +0000 (16:26 +0000)]
ndis_scan_results() can sleep if the scan results are not ready when
ndis_scan() is called.  However, ndis_scan() is invoked from softclock()
and cannot sleep.  Move ndis_scan_results() to the ndis' driver's scan_end
hook instead.

Submitted by: Paul B Mahol  onemda of gmail
MFC after: 1 week

14 years agoFix several cases where the periph lock was held over malloc.
scottl [Wed, 2 Dec 2009 16:08:33 +0000 (16:08 +0000)]
Fix several cases where the periph lock was held over malloc.

Submitted by: Jaakko Heinonen

14 years agoMake <libutil.h> work when included by itself.
ed [Wed, 2 Dec 2009 15:56:18 +0000 (15:56 +0000)]
Make <libutil.h> work when included by itself.

There are several reasons why it didn't work:

- It was missing <sys/cdefs.h> for __BEGIN_DECLS.
- It uses various primitive types that were not declared.

14 years agoDispatch sockopt calls to ipfw and dummynet
luigi [Wed, 2 Dec 2009 15:50:43 +0000 (15:50 +0000)]
Dispatch sockopt calls to ipfw and dummynet
using the new option numbers, IP_FW3 and IP_DUMMYNET3.
Right now the modules return an error if called with those arguments
so there is no danger of unwanted behaviour.

MFC after: 3 days

14 years agomca: improve status checking, recording and reporting
avg [Wed, 2 Dec 2009 15:45:55 +0000 (15:45 +0000)]
mca: improve status checking, recording and reporting

- directly print mca information in case we fail to allocate memory
  for a record
- include bank number into mca record
- print raw mca status value for extended information

Reviewed by: jhb
MFC after: 10 days

14 years agosmall changes for portability and diff reduction wrt/ FreeBSD 7.
luigi [Wed, 2 Dec 2009 15:20:31 +0000 (15:20 +0000)]
small changes for portability and diff reduction wrt/ FreeBSD 7.
No functional differences.

- use the div64() macro to wrap 64 bit divisions
  (which almost always are 64 / 32 bits) so they are easier
  to handle with compilers or OS that do not have native
  support for 64bit divisions;

- use a local variable for p_numbytes even if not strictly
  necessary on HEAD, as it reduces diffs with FreeBSD7

- in dummynet_send() check that a tag is present before
  dereferencing the pointer.

- add a couple of blank lines for readability near the end of a function

MFC after: 3 days

14 years agoUnify rc.firewall and rc.firewall6, and obsolete rc.firewall6
ume [Wed, 2 Dec 2009 15:05:26 +0000 (15:05 +0000)]
Unify rc.firewall and rc.firewall6, and obsolete rc.firewall6
and rc.d/ip6fw.

Reviewed by: dougb, jhb
MFC after: 1 month

14 years agoTeach an IPv6 to send_pkt() and ipfw_tick().
ume [Wed, 2 Dec 2009 14:32:01 +0000 (14:32 +0000)]
Teach an IPv6 to send_pkt() and ipfw_tick().
It fixes the issue which keep-alive doesn't work for an IPv6.

PR: kern/117234
Submitted by: mlaier, Joost Bekkers <joost__at__jodocus.org>
MFC after: 1 month

14 years agoUntil this moment carp(4) used a strange logging priority. It used debug
glebius [Wed, 2 Dec 2009 13:24:21 +0000 (13:24 +0000)]
Until this moment carp(4) used a strange logging priority. It used debug
priority for such important information as MASTER/BACKUP state change,
and used a normal logging priority for such innocent messages as receiving
short packet (which is a normal VRRP packet between some other routers) or
receving a CARP packet on non-carp interface (someone else running CARP).

This commit shifts message logging priorities to a more sane default.

14 years agoAdd new sockopt names for ipfw and dummynet.
luigi [Wed, 2 Dec 2009 10:36:41 +0000 (10:36 +0000)]
Add new sockopt names for ipfw and dummynet.

This commit is just grabbing entries for the new names
that will be used in the future, so you don't need to
rebuild anything now.

MFC after: 3 days

14 years agochange the type of the opcode from enum *:8 to u_int8_t
luigi [Wed, 2 Dec 2009 08:52:06 +0000 (08:52 +0000)]
change the type of the opcode from enum *:8  to u_int8_t
so the size and alignment of the ipfw_insn is not compiler dependent.
No changes in the code generated by gcc.

There was only one instance of this kind in our entire source tree,
so i suspect the old definition was a poor choice (which i made).

MFC after: 3 days

14 years agoFix the dprintf() prototype.
brueffer [Wed, 2 Dec 2009 07:51:25 +0000 (07:51 +0000)]
Fix the dprintf() prototype.

PR: 141087
Submitted by: Jeremy Huddleston <jeremyhu@apple.com>
MFC after: 3 days

14 years agoBump limits on PowerPC. This allows large executables like parts of LLVM
nwhitehorn [Wed, 2 Dec 2009 06:49:22 +0000 (06:49 +0000)]
Bump limits on PowerPC. This allows large executables like parts of LLVM
to function.

Reviewed by: grehan
Obtained from: NetBSD
MFC after: 2 weeks

14 years agoAdd missing ath_ar9* ath hal entries.
thompsa [Wed, 2 Dec 2009 00:38:11 +0000 (00:38 +0000)]
Add missing ath_ar9* ath hal entries.

14 years agoRemove unknown ath hal device entries.
thompsa [Wed, 2 Dec 2009 00:37:03 +0000 (00:37 +0000)]
Remove unknown ath hal device entries.

14 years agoAdd CAM_ATAIO_DMA ATA command flag to mark DMA protocol commands.
mav [Tue, 1 Dec 2009 23:01:29 +0000 (23:01 +0000)]
Add CAM_ATAIO_DMA ATA command flag to mark DMA protocol commands.
It is not needed for SATA controllers, but required for PATA.

14 years agoT3 firmware 7.8.0 for cxgb(4)
np [Tue, 1 Dec 2009 22:23:15 +0000 (22:23 +0000)]
T3 firmware 7.8.0 for cxgb(4)

Obtained from: Chelsio
MFC after: 3 days

14 years agoFix parenthesis typo -- copy full frame pointer for userland callchain,
emaste [Tue, 1 Dec 2009 21:54:53 +0000 (21:54 +0000)]
Fix parenthesis typo -- copy full frame pointer for userland callchain,
not just one byte.

Submitted by: Ryan Stone rysto32 at gmail dot com

14 years agoDon't allocate an input buffer for a TTY when the receiver is turned off.
ed [Tue, 1 Dec 2009 19:14:57 +0000 (19:14 +0000)]
Don't allocate an input buffer for a TTY when the receiver is turned off.

When the termios CREAD flag is not set, it makes little sense to
allocate an input buffer. Just set the size to 0 in this case to reduce
memory footprint.

Disallow CREAD to be disabled for pseudo-devices to prevent
foot-shooting.

14 years agoAdd media ioctl support and link notifications so that devd will attempt
gibbs [Tue, 1 Dec 2009 17:29:25 +0000 (17:29 +0000)]
Add media ioctl support and link notifications so that devd will attempt
to run dhclient on a netfront (xn) device that is setup for DHCP in
/etc/rc.conf.

PR: kern/136251 (fixed differently than the submitted patch)

14 years agoDon't try to bind to an anycast addeess. The KAME IPv6 stack doesn't
ume [Tue, 1 Dec 2009 16:07:50 +0000 (16:07 +0000)]
Don't try to bind to an anycast addeess.  The KAME IPv6 stack doesn't
allow bind to an anycast addeess.  It does away with an annoying
message.

Reviewed by: bz, roberto
MFC after: 2 weeks

14 years agoRemove -t from the manpage and usage.
jhb [Tue, 1 Dec 2009 15:18:25 +0000 (15:18 +0000)]
Remove -t from the manpage and usage.

14 years agoUnbreak user space after if_timer/if_watchdog removal in r199975.
bz [Tue, 1 Dec 2009 14:56:00 +0000 (14:56 +0000)]
Unbreak user space after if_timer/if_watchdog removal in r199975.

Tested by: glebius

14 years agoAdd an .Nm for strncat.
brueffer [Tue, 1 Dec 2009 07:28:56 +0000 (07:28 +0000)]
Add an .Nm for strncat.

PR: 141037
Submitted by: Jeremy Huddleston <jeremyhu@apple.com>
MFC after: 3 days

14 years agoTemporarily revert the previous change because the linker has been
green [Tue, 1 Dec 2009 06:42:47 +0000 (06:42 +0000)]
Temporarily revert the previous change because the linker has been
modified so that it will abort when the environment is bad.

14 years agoDescribe what setpgid(2) does when pgid=0. The text has been
keramida [Tue, 1 Dec 2009 06:12:31 +0000 (06:12 +0000)]
Describe what setpgid(2) does when pgid=0.  The text has been
copied from NetBSD's manpage, and it also matches the behavior
described by the Open Group's online copy of setpgid.2 at
http://www.opengroup.org/onlinepubs/009695399/functions/setpgid.html

Obtained from: NetBSD
Submitted by: Petros Barbayiannis <petrosbarbayiannis@yahoo.gr>
MFC after: 1 week

14 years agoDo not gratuitously fail *env(3) operations due to corrupt ('='-less)
green [Tue, 1 Dec 2009 05:04:31 +0000 (05:04 +0000)]
Do not gratuitously fail *env(3) operations due to corrupt ('='-less)
**environ entries.  This puts non-getenv(3) operations in line with
getenv(3) in that bad environ entries do not cause all operations to
fail.  There is still some inconsistency in that getenv(3) in the
absence of any environment-modifying operation does not emit corrupt
environ entry warnings.

I also fixed another inconsistency in getenv(3) where updating the
global environ pointer would not be reflected in the return values.
It would have taken an intermediary setenv(3)/putenv(3)/unsetenv(3)
in order to see the change.

14 years agoFix local root vulnerability.
cperciva [Tue, 1 Dec 2009 02:57:06 +0000 (02:57 +0000)]
Fix local root vulnerability.

Security: Advisory will be coming soon.
X-MFC-After: 30 seconds

14 years agoRemove if_timer/if_watchdog now that they are no longer used. The space
jhb [Mon, 30 Nov 2009 21:25:57 +0000 (21:25 +0000)]
Remove if_timer/if_watchdog now that they are no longer used.  The space
used by if_timer is reserved for expanding if_index to an int in the
future.

Reviewed by: rwatson, brooks

14 years agoRemove extra parantheses from usb_ethernet.c and usb_serial.c lines.
jhb [Mon, 30 Nov 2009 21:03:44 +0000 (21:03 +0000)]
Remove extra parantheses from usb_ethernet.c and usb_serial.c lines.
config(8) doesn't parse parantheses and instead treated them as being
part of the device driver name (e.g. '(u3g' vs 'u3g').  While here, fix the
style of these long lines to match the wrapping used for other long lines
in this file.

Submitted by: Brett Glass
MFC after: 1 week

14 years agoUse switch out (SWO) instead of switch in (SWI) debug log mask in csw_out.
emaste [Mon, 30 Nov 2009 20:41:30 +0000 (20:41 +0000)]
Use switch out (SWO) instead of switch in (SWI) debug log mask in csw_out.

14 years agoFree pointer from getenv() when done with it.
emaste [Mon, 30 Nov 2009 18:26:46 +0000 (18:26 +0000)]
Free pointer from getenv() when done with it.

Submitted by: Phil Longstaff

14 years agoamdsbwd: new driver for AMD SB600/SB7xx watchdog timer
avg [Mon, 30 Nov 2009 11:44:03 +0000 (11:44 +0000)]
amdsbwd: new driver for AMD SB600/SB7xx watchdog timer

The hardware is compliant with WDRT specification, so I originally
considered including generic WDRT watchdog support, but decided
against it, because I couldn't find anyone to the code for me.
WDRT seems to be not very popular.
Besides, generic WDRT porbably requires a slightly different driver
approach.

Reviewed by: des, gavin, rpaulo
MFC after: 3 weeks

14 years agox86 cpu features: add MOVBE reporting and flag
avg [Mon, 30 Nov 2009 11:11:08 +0000 (11:11 +0000)]
x86 cpu features: add MOVBE reporting and flag

The check is glimpsed from Linux and OpenSolaris.
MOVBE instruction is found in Intel Atom processors.

14 years agoMerge Scott Long's latest blkfront now that the licensing issues are resolved
kmacy [Mon, 30 Nov 2009 04:32:34 +0000 (04:32 +0000)]
Merge Scott Long's latest blkfront now that the licensing issues are resolved

14 years agoUpdate license to reflect terms in xen 2.0 as of the time when the driver was ported
kmacy [Mon, 30 Nov 2009 04:20:43 +0000 (04:20 +0000)]
Update license to reflect terms in xen 2.0 as of the time when the driver was ported
to FreeBSD

14 years agoUpdate to BIND 9.6.1-P2. The vulnerability this is designed to fix is
dougb [Mon, 30 Nov 2009 03:38:34 +0000 (03:38 +0000)]
Update to BIND 9.6.1-P2. The vulnerability this is designed to fix is
related to DNSSEC validation on a resolving name server that allows
access to untrusted users. If your system does not fall into all 3 of
these categories you do not need to update immediately.

14 years agoDisable job control when running 'sh -i' in the testsuite.
jilles [Sun, 29 Nov 2009 22:58:10 +0000 (22:58 +0000)]
Disable job control when running 'sh -i' in the testsuite.

Job control tty manipulations sometimes cause the tests to stop (SIGTTOU
and the like) when run from the 'prove' tool.

14 years agoFix some cases where file descriptors from redirections leak to programs.
jilles [Sun, 29 Nov 2009 22:33:59 +0000 (22:33 +0000)]
Fix some cases where file descriptors from redirections leak to programs.

- Redirecting fds that were not open before kept two copies of the
  redirected file.
    sh -c '{ :; } 7>/dev/null; fstat -p $$; true'
    (both fd 7 and 10 remained open)
- File descriptors used to restore things after redirection were not
  set close-on-exec, instead they were explicitly closed before executing
  a program normally and before executing a shell procedure. The latter
  must remain but the former is replaced by close-on-exec.
    sh -c 'exec 7</; { exec fstat -p $$; } 7>/dev/null; true'
    (fd 10 remained open)

The examples above are simpler than the testsuite because I do not want to
use fstat or procstat in the testsuite.

14 years agoCorrect typo.
bz [Sun, 29 Nov 2009 21:03:54 +0000 (21:03 +0000)]
Correct typo.

Reported by: gabor
MFC after: 5 days

14 years agoAdd atp(4) to powerpc GENERIC. Most late-generation Apple PowerPC laptops
nwhitehorn [Sun, 29 Nov 2009 20:51:23 +0000 (20:51 +0000)]
Add atp(4) to powerpc GENERIC. Most late-generation Apple PowerPC laptops
have trackpads that do not work at all without this driver.

14 years agoEarly-generation touchpads do not send periodic calibration frames for
nwhitehorn [Sun, 29 Nov 2009 20:48:19 +0000 (20:48 +0000)]
Early-generation touchpads do not send periodic calibration frames for
baseline subtraction, and are very temperature sensitive, so would slowly
drift out of a calibrated state when under load. Escape this by taking
the last frame before we decide that the pad is idle as a finger-free
baseline.

Tested on: iBook G4

14 years agoEnable IPcomp by default.
bz [Sun, 29 Nov 2009 20:47:43 +0000 (20:47 +0000)]
Enable IPcomp by default.

PR: kern/123587
MFC after: 5 days

14 years agoAdd more statistics variables for IPcomp.
bz [Sun, 29 Nov 2009 20:37:30 +0000 (20:37 +0000)]
Add more statistics variables for IPcomp.

Try to version the struct in a backward compatible way.
People asked for the versioning of the stats structs in general before.

MFC after: 5 days

14 years agoMove the sysctl related fields to the end of the structure and
marcel [Sun, 29 Nov 2009 20:17:50 +0000 (20:17 +0000)]
Move the sysctl related fields to the end of the structure and
make them conditional upon _KERNEL. libkvm includes <sys/pcpu.h>
and <sys/sysctl.h> does not expose the structure definitions to
userland.

14 years agoIn case the compression result is the same size as the orignal version,
bz [Sun, 29 Nov 2009 17:53:57 +0000 (17:53 +0000)]
In case the compression result is the same size as the orignal version,
the compression was useless as well.  Make sure to not update the data
and return, else we would waste resources when decompressing.

This also avoids the copyback() changing data other consumers like
xform_ipcomp.c would have ignored because of no win and sent out without
noting that compression was used, resulting in invalid packets at the
receiver.

MFC after: 5 days

14 years agoAssimilate very similar input and output code paths
bz [Sun, 29 Nov 2009 17:47:49 +0000 (17:47 +0000)]
Assimilate very similar input and output code paths
(no real functional change).

MFC after: 5 days