Commit Graph

160057 Commits

Author SHA1 Message Date
Andrey V. Elsukov
5c98f5b0da Check number of arguments before trying to read arg0. This prevents access
to arg0 and dumping core when `gpart bootcode` called without arguments.
2010-12-21 17:24:32 +00:00
Matthew D Fleming
d26b794591 Move the fail_point_entry definition from fail.h to kern_fail.c, which
allows putting the enumeration constants of fail point types with the
text string that matches them.

MFC after:	1 week
2010-12-21 16:29:58 +00:00
Lawrence Stewart
a8d61afdc2 - Introduce the Hhook (Helper Hook) KPI. The KPI is closely modelled on pfil(9),
and in many respects can be thought of as a more generic superset of pfil.
  Hhook provides a way for kernel subsystems to export hook points that Khelp
  modules can hook to provide enhanced or new functionality to the kernel. The
  KPI has been designed to ensure hook points pose no noticeable overhead when
  no hook functions are registered.

- Introduce the Khelp (Kernel Helpers) KPI. Khelp provides a framework for
  managing Khelp modules, which indirectly use the Hhook KPI to register their
  hook functions with hook points of interest within the kernel. Khelp modules
  aim to provide a structured way to dynamically extend the kernel at runtime in
  an ABI preserving manner. Depending on the subsystem providing hook points, a
  Khelp module may be able to associate per-object data for maintaining relevant
  state between hook calls.

- pjd's Object Specific Data (OSD) KPI is used to manage the per-object data
  allocated to Khelp modules. Create a new "OSD_KHELP" OSD type for use by the
  Khelp framework.

- Bump __FreeBSD_version to 900028 to mark the introduction of the new KPIs.

In collaboration with:	David Hayes <dahayes at swin edu au> and
			Grenville Armitage <garmitage at swin edu au>
Sponsored by:	FreeBSD Foundation
Reviewed by:	bz, others along the way
MFC after:	3 months
2010-12-21 13:45:29 +00:00
John Baldwin
a11df0cbe6 Only use the BIOS-supplied IRQ for the atkbdc device for a child atkbd
device.  Specifically, do not reuse it for a child psm device.

Tested by:	many
2010-12-21 12:49:37 +00:00
Alan Cox
c2f86e4192 The local variable "rv" is still required by vm_fault_hold_user_pages(). 2010-12-20 23:41:31 +00:00
Jilles Tjoelker
6a6760db7f sh: Make warnings in the printf builtin non-fatal, like in the program.
The #define for warnx now behaves much like the libc function (except that
it uses sh command name and output).

Also, it now uses C99 __VA_ARGS__ so there is no need for three different
macros for 0, 1 or 2 parameters.
2010-12-20 23:06:57 +00:00
Shteryana Shopova
cf90ea94a0 Unbreak the build by temprorarily not using include directives in
bsnmpd(1)' def files, until bsd.snmpmod.mk & Makefiles are fixed to
pass proper include path flags to gensnmptree.
2010-12-20 22:56:50 +00:00
Alan Cox
acd11c7499 Introduce vm_fault_hold() and use it to (1) eliminate a long-standing race
condition in proc_rwmem() and to (2) simplify the implementation of the
cxgb driver's vm_fault_hold_user_pages().  Specifically, in proc_rwmem()
the requested read or write could fail because the targeted page could be
reclaimed between the calls to vm_fault() and vm_page_hold().

In collaboration with:	kib@
MFC after:	6 weeks
2010-12-20 22:49:31 +00:00
Ulrich Spörlein
091c4c86d1 rpc.lockd(8) WARNS cleanup
- Provide function prototype for nlm_syscall
- Don't assign a variable from the stack to a global var[1]
- Remove unused vars

Found by:	clang static analyser [1]
Reviewed by:	dfr
2010-12-20 21:12:18 +00:00
Ulrich Spörlein
cffd173436 lmcconfig(8): bump to WARNS=3, fix typo in usage while here
Slight style(9) improvments
 - function definitions
 - sort #include
2010-12-20 19:08:15 +00:00
Ulrich Spörlein
057747a467 Fix type used to hold fgetc(3) output, this should help arm and powerpc
which have char == unsigned char
2010-12-20 19:08:07 +00:00
Ulrich Spörlein
bf55df1986 factor(6): Check return values of BN_* functions.
Coverity Prevent:	CID 4862, 8771, 8772, 8773
2010-12-20 19:07:56 +00:00
Ulrich Spörlein
4f1ccb4be0 Remove useless conditional.
`vga' cannot be less than 0x3f when reaching the check.

Coverity Prevent:	CID 5196
2010-12-20 19:07:48 +00:00
Pyun YongHyeon
d67a08c33f Document limitation of station address reprogramming. 2010-12-20 17:39:39 +00:00
Shteryana Shopova
5b56d5b347 Add (disabled) sample configuration lines needed to enable snmp_target(3) module
and configure minimal target addresses & notifications needed for bsnmpd(1)
to send SNMPv3 notifications.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	philip
Approved by:	philip
2010-12-20 17:28:15 +00:00
Shteryana Shopova
72cd7a520d Bring in a SNMP module that allows configuration of SNMPv3 Notification targets.
Sponsored by:	The FreeBSD Foundation
Reviewed by:	philip
Approved by:	philip
2010-12-20 17:13:14 +00:00
Tijl Coosemans
81bd5041a2 Merge amd64 and i386 bus.h and move the resulting header to x86. Replace
the original amd64 and i386 headers with stubs.

Rename (AMD64|I386)_BUS_SPACE_* to X86_BUS_SPACE_* everywhere.

Reviewed by:	imp (previous version), jhb
Approved by:	kib (mentor)
2010-12-20 16:39:43 +00:00
Alexander Leidinger
94877c06f3 Suggest to run the delete-old target after the second mergemaster. If you run
it before, your rc scripts may still reference old files/directories and
if you are in the unlucky situation to have triggered a reboot (intentionally
or not) between the delete-old run and the mergemaster, your system may not
start anymore.

While I'm here, give a hint about delete-old-libs.

Noticed by:	bcr (luckily in a discussion and not by getting hit by this)
MFC after:	1 week
2010-12-20 15:17:34 +00:00
John Baldwin
da1781dd59 Don't whine about child drivers calling pci_enable_busmaster(). That is
perfectly normal.

MFC after:	1 week
2010-12-20 14:54:24 +00:00
Nathan Whitehorn
2bb4662eff Memory can be laid out with large gaps on 64-bit PowerPC, so switch to
VM_PHYSSEG_SPARSE.
2010-12-20 14:25:01 +00:00
Philippe Charnier
d31ff7a8fb Add __unused. Ansi prototypes. 2010-12-20 09:36:54 +00:00
Philippe Charnier
a7a7d96c7a Add __unused. Ansi prototypes. 2010-12-20 09:28:28 +00:00
Philippe Charnier
8e724c686f Add __unused. Ansi prototypes. 2010-12-20 08:54:30 +00:00
Philippe Charnier
0fe7f010e4 Add __unused 2010-12-20 08:47:43 +00:00
Philippe Charnier
76cddf8d71 Add __unused 2010-12-20 08:44:08 +00:00
Philippe Charnier
43d4d55558 Add __unused 2010-12-20 08:37:26 +00:00
Philippe Charnier
9f8c312911 Add __unused. Ansi prototypes. 2010-12-20 08:29:54 +00:00
Pyun YongHyeon
954d783c0e Oops, fwe(4) listed twice. 2010-12-20 00:27:40 +00:00
Pyun YongHyeon
f25407fd6b Add ae(4) to the list of drivers use the miibus interface. 2010-12-20 00:23:47 +00:00
Pyun YongHyeon
1f253c5de4 igb(4), ixgbe(4), mxge(4) and nxge(4) support VLAN hardware tag
insertion/stripping.
et(4) and fwe(4) support VLAN oversized frames.
2010-12-20 00:10:53 +00:00
Pyun YongHyeon
cda25af317 Add .Xr to altq(4). 2010-12-19 23:54:31 +00:00
Pyun YongHyeon
68abd5a824 Add .Xr to altq(4). 2010-12-19 23:53:23 +00:00
Pyun YongHyeon
78b815ac74 ae(4), igb(4), ixgb(4) and ixgbe(4) supports altq(4). 2010-12-19 23:50:36 +00:00
Simon L. B. Nielsen
52e3f1458b Add --numeric-owner to tar extract operations in portsnap.
This is done to speed up extraction significantly (both for portsnap
extract and update) in the case of slow NSS modules (like nss_ldap) as
it avoids having to look up uid and gid for root / wheel.

The reason this is a bigger problem for portsnap than for many other
system operations, is that portsnap executes tar(1) once for each port
so the internal uid/gid caching in tar(1) only helps a bit, resulting
in many user lookup calls.

Discussed with:	cperciva
2010-12-19 23:09:42 +00:00
Konstantin Belousov
da86244d0d Restore the ABI of struct kinfo_proc32 after r213536.
MFC after:	3 days
2010-12-19 21:18:33 +00:00
Pawel Jakub Dawidek
24e75069cd Correct cookie type to match reality. 2010-12-19 18:07:10 +00:00
Pawel Jakub Dawidek
354bcd2ed9 Reduce lock scope a little. 2010-12-19 18:06:20 +00:00
Philippe Charnier
6d8484b0d0 Add __unused. Ansi prototypes. 2010-12-19 16:25:23 +00:00
Nathan Whitehorn
ed1e1e2a9e Garbage-collect unused variable. 2010-12-19 16:07:53 +00:00
Philippe Charnier
640e31deaf Add __unused. Ansi prototypes. 2010-12-19 14:18:07 +00:00
Philippe Charnier
fe71384015 Add __unused. Ansi prototypes. 2010-12-19 13:40:38 +00:00
Philippe Charnier
f0c80f9bf7 add __unused 2010-12-19 13:05:17 +00:00
Bernhard Schmidt
0e1497aefd Update firmware for wpi(4) from version 2.14.4 to 15.32.2.9.
PR:		kern/142907
Submitted by:	Craig Butler <craig001 at lerwick.hopto.org>
MFC after:	2 weeks
2010-12-19 11:37:44 +00:00
Tijl Coosemans
4485b7e74a Fix a bug introduced in r216518. The ndis_subsys field holds the PCI
subdevice ID in addition to the subvendor ID.

Reported by:	Paul B Mahol 'onemda gmail com'
Approved by:	kib (mentor)
2010-12-19 11:14:34 +00:00
Bernhard Schmidt
6a9e69db1b Fix panic trying to use monitor mode. The iwn_cmd() calls issued by
iwn_config() want to msleep() on the mutex.

PR:		kern/138427
Submitted by:	Henry Hu <henry.hu.sh at gmail.com>
MFC after:	3 days
2010-12-19 10:36:06 +00:00
Bernhard Schmidt
1375a2d077 Fix build on bigendian archs. 2010-12-19 09:18:14 +00:00
Alan Cox
9d555e459c Redo some parts of r216333, specifically, the locking changes to
pmap_extract_and_hold(), and undo the rest.  In particular, I forgot
that PG_PS and PG_PTE_PAT are the same bit.
2010-12-19 07:31:56 +00:00
Pyun YongHyeon
49981fba51 Document JMC251/JMC261 support. 2010-12-19 00:00:29 +00:00
Pyun YongHyeon
4f1ff93a3b Add support for JMicron JMC251/JMC261 Gigabit/Fast ethernet
controller with Card Read Host Controller. These controllers are
multi-function devices and have the same ethernet core of
JMC250/JMC260. Starting from REVFM 5(chip full mask revision)
controllers have the following features.
 o eFuse support
 o PCD(Packet Completion Deferring)
 o More advanced PHY power saving

Because these controllers started to use eFuse, station address
modified by driver is permanent as if it was written to EEPROM. If
you have to change station address please save your controller
default address to safe place before reprogramming it. There is no
way to restore factory default station address.

Many thanks to JMicron for continuing to support FreeBSD.

HW donated by:	JMicron
2010-12-18 23:52:50 +00:00
Pyun YongHyeon
4d9ab34335 Use system defined PCIR_EXPRESS_DEVICE_CTL instead of using magic
number.
2010-12-18 23:26:38 +00:00