Commit Graph

147879 Commits

Author SHA1 Message Date
Ed Schouten
5f46eda1fd Move buffer management into kbd and kbdmux drivers.
These two drivers seem to be the last consumers of clists. clists are
quite overengineered for simple circular buffers, so I'm adding similar
buffer management routines to the kbd and kbdmux drivers. The input
buffer is now part of the softc structures, instead of having
dynamically allocated cblocks.
2009-06-05 15:19:05 +00:00
Robert Watson
bcf11e8d00 Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC
and used in a large number of files, but also because an increasing number
of incorrect uses of MAC calls were sneaking in due to copy-and-paste of
MAC-aware code without the associated opt_mac.h include.

Discussed with:	pjd
2009-06-05 14:55:22 +00:00
Robert Watson
88a9a9a61c Unifdef MAC label pointer in syncache entries -- in general, ifdef'd
structure contents are a bad idea in the kernel for binary
compatibility reasons, and this is a single pointer that is now included
in compiles by default anyway due to options MAC being in GENERIC.
2009-06-05 14:31:03 +00:00
Robert Watson
0da4382a75 Correct MAC compile problems resulting from the new RPC code copying and
pasting code from the general socket code without also bringing along
required opt_mac.h includes.
2009-06-05 14:29:49 +00:00
Robert Watson
af4656042e Add mac_framework.h include missed when MAC code was (presumably) copied
from another file.
2009-06-05 14:23:24 +00:00
Robert Watson
37ba986a5f Don't check MAC in the NFS server ACL set path, right now we aren't
enforcing MAC for NFS clients.
2009-06-05 14:15:00 +00:00
John Baldwin
869c29a7e7 Trim old remnants of per-CPU KTR buffers.
Submitted by:	 Eygene Ryabinkin
2009-06-05 14:07:00 +00:00
Robert Watson
c27b9cdb83 Fix spelling of MAC check for 8.x version of MAC Framework, not noticed due
to a lack of an opt_mac.h include, which I won't add for now as options MAC
will soon move to opt_global.h.

Spotted by:	pjd
2009-06-05 13:55:33 +00:00
Luigi Rizzo
115a40c7bf More cleanup in preparation of ipfw relocation (no actual code change):
+ move ipfw and dummynet hooks declarations to raw_ip.c (definitions
  in ip_var.h) same as for most other global variables.
  This removes some dependencies from ip_input.c;

+ remove the IPFW_LOADED macro, just test ip_fw_chk_ptr directly;

+ remove the DUMMYNET_LOADED macro, just test ip_dn_io_ptr directly;

+ move ip_dn_ruledel_ptr to ip_fw2.c which is the only file using it;

To be merged together with rev 193497

MFC after:	5 days
2009-06-05 13:44:30 +00:00
Luigi Rizzo
bbf46d80db remove a printf that was only useful for debugging.
MFC after:	3 days
2009-06-05 13:11:34 +00:00
Edwin Groothuis
3d942a6fc5 [patch] Portuguese timedef
In Portuguese, the names of the days of the week are not capitalized.
Also there is always a dash before "feira" in the names of the days.
For example: "segunda-feira" and not "segunda feira" (which has a
completely different meaning).

x_fmt is not correct either. The date separator should not be a dot
but a slash. Example: 31/12/2005 if far more used in Portugal than
31.12.2005.

References:
- a Portuguese online dictionary http://priberam.pt/dlpo/dlpo.aspx
- http://answers.com/days_of_the_week (there are translations to
  various languages, including Portuguese, at the bottom of the
  page)
- http://en.wikipedia.org/wiki/Week-day_names (there are translations
  to various languages, including Portuguese, at the bottom of the
  page)
- a Portuguese style guide
  http://www.publico.clix.pt/nos/livro_estilo/16d-palavras.html
  ("datas" section)

PR:		conf/58595
Submitted by:	Chris Stenton <jacs@gnome.co.uk>
MFC after:	1 week
2009-06-05 13:05:14 +00:00
Luigi Rizzo
b4043122fa Small changes (no actual code changes) in preparation of moving ipfw-related
stuff to its own directory, and cleaning headers and dependencies:

In this commit:
+ remove one use of a typedef;
+ document dn_rule_delete();
+ replace one usage of the DUMMYNET_LOADED macro with its value;

No MFC planned until the cleanup is complete.
2009-06-05 12:49:54 +00:00
Rafal Jaworowski
2b7b2d7952 Discover and handle the number of E500 CPUs in run time. 2009-06-05 09:46:00 +00:00
Brian Somers
f121baaa45 If we're passed garbage in malloc_init(), panic() rather than expecting
a KASSERT to handle it.  People are likely to turn off INVARIANTS RSN
and loading an old module can cause garbage-in here.

I saw the issue with an older nvidia driver (x11/nvidia-driver) loading
into a new kernel - a crash wasn't seen 'till sysctl_kern_malloc_stats().
I was lucky that mtp->ks_shortdesc was NULL and not something horrible.

While I'm here, KASSERT that malloc_uninit() isn't passed something that's
not in kmemstatistics.

MFC after:	3 weeks
2009-06-05 09:16:52 +00:00
Rafal Jaworowski
29794416db Fill PTEs covering kernel code and data.
Without this fix pte_vatopa() was not able to retrieve physical address of
data structures inside kernel, for example EFAULT was reported while acessing
/dev/kmem ('netstat -nr').

Submitted by:	Piotr Ziecik
Obtained from:	Semihalf
2009-06-05 09:09:46 +00:00
Brian Somers
22da50cfc8 Change the behaviour of -F slightly; it now persists (forever) in
trying to open files rather than giving up when it encounters an
error.  ENOENT errors are not reported.

As a result, files that are moved away then recreated are not at
risk of being 'lost' to tail.  Files that are recreated and
temporarily have unreadable permissions will be shown when they
are fixed.

This behaviour is consistent with the GNU version of tail but
without the verbiage that goes with the GNU version.

This change also fixes error messages accompanying -f and -F.
They no longer report problems with (null)!

MFC after:	3 weeks
2009-06-05 09:08:53 +00:00
Edwin Groothuis
ca67260eba Misc fixed to fortunes
PR:		conf/112024
Submitted by:	Niclas Zeising <niclas.zeising@gmail.com>
MFC after:	2 days
2009-06-05 07:57:10 +00:00
Benno Rice
effdb43e12 Bump document date.
Pointed out by:	trhodes
2009-06-05 03:06:24 +00:00
Benno Rice
02479ead25 Perform some checking on the requested list of modules to warn people if they
try to load modules by filename out of the current directory where the module
in question may be further up the module path or not in the module path at all.

Also add some text to the man page to help explain what's going on.

Sponsored by:	Redacted Consulting
2009-06-04 23:43:08 +00:00
Benno Rice
815d752a97 style(9) pass prior to further changes.
Sponsored by:	Redacted Consulting
2009-06-04 23:31:05 +00:00
Edwin Groothuis
b962a0d6e0 [patch] fortune(6): George Bernard Shaw quote fix
From the original PR:

    s/milestones/millstones/
    and less important..
    s/man/Man/
    Not every source I've seen capitalizes 'Man', but it seems
    right. Uncapitalized 'man' would usually be preceded by
    an 'a'. But I haven't seen any reference cite the orignal
    source yet, so I can't say for sure.

http://quotationsbook.com/quote/31568/

PR:		conf/131469
Submitted by:	John Hein <jhein@timing.com>
MFC after:	2 days
2009-06-04 22:01:50 +00:00
Andrew Thompson
b7d3e2426f Remove duplicate variable setting.
Spotted by:	Sylvestre Gallon
2009-06-04 22:00:48 +00:00
Andrew Thompson
c737a63263 revert r162516. We only support 1 or 2 channels per stream
which reflects mono and stereo.

Submitted by:	Hans Petter Selasky
2009-06-04 21:59:28 +00:00
Edwin Groothuis
d0e67068f4 [patch] fortune(6): file not Y2.01K compliant
Update the time in the fortune to make the joke a little bit more
realistic again: Bump year from 2009 to 2039.

PR:		conf/129860
Submitted by:	Alan Amesbury <amesbury@umn.edu>
MFC after:	2 days
2009-06-04 21:55:07 +00:00
Edwin Groothuis
5db5ccf42c [patch] calendar.music: Chuck Berry was born in St. Louis, Missouri, not California
The /usr/bin/calendar program reports that Chuck Berry was born
    in San Jose California but he was not born in California.

    Chuck Berry was born in St. Louis, Missouri in 1926 on October 18.

    http://www.chuckberry.com/about/bio.htm
    http://www.khaldea.com/charts/chuckberry.shtml
    http://en.wikipedia.org/wiki/Chuck_Berry

PR:		conf/128215
Submitted by:	comet--berkeley (aka Pablo Picasso) <comet@transbay.net>
MFC after:	2 days
2009-06-04 21:48:04 +00:00
Sam Leffler
5d644c39b5 track rename of CSA ie
Submitted by:	wxs
2009-06-04 18:22:21 +00:00
Paul Saab
983b43c5de When checking for shared writes, use the struct mount returned from
vn_start_write.

Reviewed by:	jhb
2009-06-04 16:50:03 +00:00
Paul Saab
a6d545d8ed Support shared vnode locks for write operations when the offset is
provided on filesystems that support it.  This really improves mysql
+ innodb performance on ZFS.

Reviewed by:	jhb, kmacy, jeffr
2009-06-04 16:18:07 +00:00
Sam Leffler
c70761e6b5 o station mode channel switch support
o IEEE80211_IOC_CHANSWITCH fixups:
  - restrict to hostap vaps
  - return EOPNOTSUPP instead of EINVAL when applied to !hostap vap
    or to a vap w/o 11h enabled
  - interpret count of 0 to mean cancel the current CSA

Reviewed by:	rpaulo, avatar
2009-06-04 15:57:38 +00:00
Rick Macklem
3144f81221 Fix upcall races in the client side krpc. For the client side upcall,
holding SOCKBUF_LOCK() isn't sufficient to guarantee that there is
no upcall in progress, since SOCKBUF_LOCK() is released/re-acquired
in the upcall. An upcall reference counter was added to the upcall
structure that is incremented at the beginning of the upcall and
decremented at the end of the upcall. As such, a reference count == 0
when holding the SOCKBUF_LOCK() guarantees there is no upcall in
progress. Add a function that is called just after soupcall_clear(),
which waits until the reference count == 0.
Also, move the mtx_destroy() down to after soupcall_clear(), so that
the mutex is not destroyed before upcalls are done.

Reviewed by:	dfr, jhb
Tested by:	pho
Approved by:	kib (mentor)
2009-06-04 14:49:27 +00:00
Rick Macklem
a4fa5e6dd9 Fix two races in the server side krpc w.r.t upcalls:
Add a flag so that soupcall_clear() is only called once to cancel
  an upcall.
  Move the test for xprt_registered in the upcall down to after the
  mtx_lock() of the pool mutex, to catch the case where it is
  unregistered while the upcall is waiting for the mutex.
Also, move the mtx_destroy() of the pool mutex to after SVC_RELEASE(),
so that it isn't destroyed before the upcalls are disabled.

Reviewed by:	dfr, jhb
Tested by:	pho
Approved by:	kib (mentor)
2009-06-04 14:13:06 +00:00
Luigi Rizzo
c421791e77 fix a bug introduced in rev.190865 related to the signedness
of the credit of a pipe. On passing, also use explicit
signed/unsigned types for two other fields.
Noticed by Oleg Bulyzhin and Maxim Ignatenko long ago,
i forgot to commit the fix.

Does not affect RELENG_7.
2009-06-04 12:27:57 +00:00
Ed Schouten
e38ee1f2b2 Correct typo; errno => error. 2009-06-04 11:22:53 +00:00
Robert Watson
927e0a56ce Re-add opt_mac.h include, which is required in order for MNT_MULTILABEL
to be set properly on devfs.  Otherwise, it isn't possible to set labels
on /dev nodes.

Reported by:	Sergio Rodriguez <sergiorr at yahoo.com>
MFC after:	3 days
2009-06-04 10:30:18 +00:00
Doug Rabson
d7e0637111 Don't panic in nlm_record_lock if we get ENOENT from lf_advlockasync. This
is likely to be because the file was just removed and in our context this is
harmless.
2009-06-04 08:13:51 +00:00
Weongyo Jeong
df99b9c9ac add two prerequisites; if_zydreg.h and if_zydfw for dependency check. 2009-06-04 03:59:20 +00:00
Weongyo Jeong
78cc4bbbb0 reimplements RF logic for GCT chipset (as known as UW2453) to support
ICIDU NI-707503 which is donated by Nick Hibma (great thanks!).  Though
it has a MAXIM RF (0x8) there's some success reports with using GCT RF
(0x9) codes and it worked well for ICIDU NI-707503 too.  So codes for
MAXIM and GCT RFs are integrated.

Before this commit, if I rememeber correctly, MAXIM RF is never tested
that it seems it's a first report working with FreeBSD.
2009-06-04 02:49:50 +00:00
Weongyo Jeong
9dde689c63 cleanups the device match list. 2009-06-04 01:55:13 +00:00
Sam Leffler
7131987ded When a channel switch is done to a channel with different operating
characteristics force the stations to re-associate so protocol state
is re-initialized.  Note that for 11h/DFS this is irrelevant as channel
changes are never cross-band.

Reviewed by:	ctlaw
2009-06-03 23:33:09 +00:00
Sam Leffler
4e15098821 After a channel switch mark associated stations so they will immediately
be probed as inactive; this more quickly weeds out stations that don't
follow to the new channel.
2009-06-03 23:30:25 +00:00
Rick Macklem
35f2eba009 Re-format the nfsv4.4 man page so that all sentences start on a
new line.

Approved by:	kib (mentor)
2009-06-03 21:50:26 +00:00
John Baldwin
8985d7f35e Remove unused VM includes. 2009-06-03 20:25:13 +00:00
Robert Watson
3ad3d9c5ef Add one further check with mac_policy_count to an mbuf copying case
(limited to netatalk) to avoid MAC label lookup on both mbufs if no
policies are registered.

Obtained from:	TrustedBSD Project
2009-06-03 19:41:12 +00:00
Marius Strobl
506a380d0f Adjust the padding of struct pcpu to r193219.
Submitted by:	Eygene Ryabinkin
2009-06-03 19:31:26 +00:00
Robert Watson
3de4046939 Continue work to optimize performance of "options MAC" when no MAC policy
modules are loaded by avoiding mbuf label lookups when policies aren't
loaded, pushing further socket locking into MAC policy modules, and
avoiding locking MAC ifnet locks when no policies are loaded:

- Check mac_policies_count before looking for mbuf MAC label m_tags in MAC
  Framework entry points.  We will still pay label lookup costs if MAC
  policies are present but don't require labels (typically a single mbuf
  header field read, but perhaps further indirection if IPSEC or other
  m_tag consumers are in use).

- Further push socket locking for socket-related access control checks and
  events into MAC policies from the MAC Framework, so that sockets are
  only locked if a policy specifically requires a lock to protect a label.
  This resolves lock order issues during sonewconn() and also in local
  domain socket cross-connect where multiple socket locks could not be
  held at once for the purposes of propagatig MAC labels across multiple
  sockets.  Eliminate mac_policy_count check in some entry points where it
  no longer avoids locking.

- Add mac_policy_count checking in some entry points relating to network
  interfaces that otherwise lock a global MAC ifnet lock used to protect
  ifnet labels.

Obtained from:	TrustedBSD Project
2009-06-03 18:46:28 +00:00
Stanislav Sedov
097695e97a - Remove unused sparc64-bitops.h file. Our ext2fs code doesn't use
sparc64-specific bitops implemetations and relies on generic ones.
  Furthermore, bitops implementations present in sparc64-bitops.h
  are written in C similarly to generic bitops.
2009-06-03 17:30:10 +00:00
Sam Leffler
309a3e4521 treat IEEE80211_S_CSA as a "running state"; this fixes
ap mode 11h channel switch announcements
2009-06-03 17:25:19 +00:00
Joseph Koshy
3b9626854a Trim an obsolete comment.
Noticed by:	lifengkai <lifengkai at huawei dot com>
2009-06-03 17:19:12 +00:00
Rafal Jaworowski
f439325342 Make GPT style partitiong endian-safe in U-Boot support library.
Submitted by:	Piotr Ziecik
Obtained from:	Semihalf
2009-06-03 16:28:29 +00:00
Stanislav Sedov
52d9a478fe - Style(9) improvements.
- Convert all K&R definitions to ANSI equialents.
- Retire bsd_malloc and bsd_free macros and
  use malloc/free directly.
- Drop some unused debugging calls.

This commit brings no functional changes.
2009-06-03 14:18:37 +00:00