Commit Graph

163888 Commits

Author SHA1 Message Date
Bjoern A. Zeeb
ec49fe398a For the moment document the possible problem introduced with dynamic address
family detection in world, mostly noticed by ifconfig(8), when running with
an old kernel.

Reported by:	Andrzej Tobola (ato iem.pw.edu.pl)
Reported by:	gcooper
2011-06-07 19:39:34 +00:00
Xin LI
c73830758a Add a special mount option "failok" to indicate that the administrator wants
the system to proceed to boot without bailing out into single user mode,
even when the file system can not be successfully mounted.

This option is implemented in mount(8) and not passed into kernel.

MFC after:	1 month
2011-06-07 18:48:49 +00:00
John Baldwin
c721b93449 Log the socket address passed as the destination to sendto() and sendmsg()
via ktrace.

MFC after:	1 week
2011-06-07 17:40:33 +00:00
Marius Strobl
c40847145b Adapt CATR() to r222813. This is somewhat tricky as we can't afford using
more than three temporary register in several places CATR() is used so
this code trades instructions in for registers. Actually, this still isn't
sufficient and CATR() has the side-effect of clobbering %y. Luckily, with
the current uses of CATR() this either doesn't matter or we are able to
(save and) restore it.
Now that there's only one use of AND() and TEST() left inline these.
2011-06-07 17:33:39 +00:00
Marius Strobl
3bd5692b1f Fix a problem with r222813; given that we may only operate on interrupt
globals here but clobber %y save and restore the latter.
2011-06-07 17:19:14 +00:00
Alexander Motin
cbebc90de0 Make automatic hw.snd.default_unit choice a bit more intelligent. Instead
of just setting it to the first registered device, reevaluate it for each
device registered, trying to choose best candidate, unless one was forced.
For now use such preference order: play&rec, play, rec.

As side effect, this should workaround the situation when HDMI audio output
of the video card, usually not connected to anything, becomes default, that
requires manual user intervention to make sound working. If at some point
this won't be enough, we can try to fetch some additional priority flags
from the device driver.
2011-06-07 17:01:52 +00:00
Jaakko Heinonen
189075e9db Remove a gratuitous newline. This should be a non-functional change.
PR:		bin/153667
Submitted by:	Craig Leres
MFC after:	1 week
2011-06-07 16:23:27 +00:00
Hiroki Sato
5a10f1ccec Fix a bug that prevents tc=xxx from working. 2011-06-07 15:40:17 +00:00
Adrian Chadd
e484e92770 Since HAL_PHYERR_* is used in the radar code, always include ah_desc.h. 2011-06-07 14:00:47 +00:00
Hiroki Sato
07a42575b4 - Use ELM_MALLOC() for struct rainfo.
- Fix a missing back pointer assignment in struct prefix to struct rainfo
  when addr="" is specified.  This caused SIGSEGV.

- Insert a prefix element to a tail queue after setting parameters.
2011-06-07 12:00:29 +00:00
Andrey V. Elsukov
08892bf4bf Do not use LCM from stripesize and user specified alignment value.
When user wants have specific alignment - do what user wants.
Use stripesize as alignment value in case, when some of gpart's
arguments are ommitted for automatic calculation.

Suggested by:	mav
2011-06-07 11:11:11 +00:00
Julien Laffaye
d3edd193e0 - Add myself to calendar.freebsd
- Add the forgotten relation to mentors in committers-ports.dot

Approved by:	bapt@ (mentor)
2011-06-07 09:06:15 +00:00
Adrian Chadd
3d423111f6 Flesh out a new HAL method to fetch the radar PHY error frame information.
For the AR5211/AR5212, this is apparently a one byte pulse duration
counter value. It is only coded up here for the AR5212 as I don't have
any AR5211-series hardware to test it on.

This information was extracted from the Madwifi DFS branch along with
some local additions.

Please note - all this does is extract out the radar event duration,
it in no way reflects the presence of a radar. Further code is needed
to take a set of radar events and filter them to extract out correct
radar pulse trains (and ignore other events.)

For further information, please see:

http://wiki.freebsd.org/dev/ath_hal%284%29/RadarDetection

This includes references to the relevant patents which describe what
is going on.

Obtained from:	Madwifi
2011-06-07 09:03:28 +00:00
Attilio Rao
033e1e35d3 etire the cpumask_t type and replace it with cpuset_t usage.
This is intended to fix the bug where cpu mask objects are
capped to 32.  MAXCPU, then, can now arbitrarely bumped to whatever
value.  Anyway, as long as several structures in the kernel are
statically allocated and sized as MAXCPU, it is suggested to keep it
as low as possible for the time being.

Technical notes on this commit itself:
- More functions to handle with cpuset_t objects are introduced.
  The most notable are cpusetobj_ffs() (which calculates a ffs(3)
  for a cpuset_t object), cpusetobj_strprint() (which prepares a string
  representing a cpuset_t object) and cpusetobj_strscan() (which
  creates a valid cpuset_t starting from a string representation).
- pc_cpumask and pc_other_cpus are target to be removed soon.
  With the moving from cpumask_t to cpuset_t they are now inefficient
  and not really useful.  Anyway, for the time being, please note that
  access to pcpu datas is protected by sched_pin() in order to avoid
  migrating the CPU while reading more than one (possible) word
- Please note that size of cpuset_t objects may differ between kernel
  and userland.  While this is not directly related to the patch itself,
  it is good to understand that concept and possibly use the patch
  as a reference on how to deal with cpuset_t objects in userland, when
  accessing kernland members.
- KTR_CPUMASK is changed and now is represented through a string, to be
  set as the example reported in NOTES.

Please additively note that no MAXCPU is bumped in this patch, but
private testing has been done until to MAXCPU=128 on a real 8x8x2(htt)
machine (amd64).

Please note that the FreeBSD version is not yet bumped because of
the upcoming pcpu changes.  However, note that this patch is not
targeted for MFC.

People to thank for the time spent on this patch:
- sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested
  several revision of the patches and really helped in improving
  stability of this work.
- marius fixed several bugs in the sparc64 implementation and reviewed
  patches related to ktr.
- jeff and jhb discussed the basic approach followed.
- kib and marcel made targeted review on some specific part of the
  patch.
- marius, art, nwhitehorn and andreast reviewed MD specific part of
  the patch.
- marius, andreast, gonzo, nwhitehorn and jceel tested MD specific
  implementations of the patch.
- Other people have made contributions on other patches that have been
  already committed and have been listed separately.

Companies that should be mentioned for having participated at several
degrees:
- Yahoo! for having offered the machines used for testing on big
  count of CPUs.
- The FreeBSD Foundation for having sponsored my devsummit attendance,
  which has been instrumental.
- Sandvine for having offered offices and infrastructure during
  development.

(I really hope I didn't forget anyone, if it happened I apologize in
advance).
2011-06-07 08:46:13 +00:00
Attilio Rao
5e9857e76b MFC 2011-06-07 08:24:29 +00:00
Attilio Rao
f0fcb36793 Add an UPDATE entry. 2011-06-07 08:07:41 +00:00
Attilio Rao
74e4245e3f Bring back the number of CPU to 32. 2011-06-07 08:05:23 +00:00
Andrey V. Elsukov
56e38090a4 Fix indentation. 2011-06-07 06:57:22 +00:00
Andrey V. Elsukov
c57e67d04e Sync ng_nat with recent (r222806) ipfw_nat changes:
Make a behaviour of the libalias based in-kernel NAT a bit closer to
  how natd(8) does work. natd(8) drops packets only when libalias returns
  PKT_ALIAS_IGNORED and "deny_incoming" option is set, but ipfw_nat
  always did drop packets that were not aliased, even if they should
  not be aliased and just are going through.

Also add SCTP support: mark response packets to skip firewall processing.

MFC after:	1 month
2011-06-07 06:48:42 +00:00
Andrey V. Elsukov
bd853db48c Make a behaviour of the libalias based in-kernel NAT a bit closer to
how natd(8) does work. natd(8) drops packets only when libalias returns
PKT_ALIAS_IGNORED and "deny_incoming" option is set, but ipfw_nat
always did drop packets that were not aliased, even if they should
not be aliased and just are going through.

PR:		kern/122109, kern/129093, kern/157379
Submitted by:	Alexander V. Chernikov (previous version)
MFC after:	1 month
2011-06-07 06:42:29 +00:00
Andriy Gapon
d1817e7db7 amdsbwd: update to support SB8xx southbridges
Many thanks to Tino <tinotom@gmail.com> for drawing my attention to
this, for doing a lot of testing and providing great feedback.
Many thanks to AMD for continuing to release public specifications for
their chipsets.

PR:		kern/157568
Tested by:	Tino <tinotom@gmail.com>
MFC after:	1 week
2011-06-07 06:18:02 +00:00
Kenneth D. Merry
5e319c480c Set pca.p_bufr to NULL when we haven't allocated a buffer.
Otherwise, p_bufr is set to garbage on the stack, and if that garbage
happens to be non-NULL, and the TOLOG or TOCONS flag is set, putbuf()
will get called and attempt to fill the non-existent buffer.

This is really only relevant for tprintf() (and only when the priority is
not -1), but set it in uprintf() and ttyprintf() for completeness.

The next step, to avoid log buffer scrambling, would be to add the
PRINTF_BUFR_SIZE code to tprintf(), but this should prevent panics.

Submitted by:	rmacklem
Found by:	pho
2011-06-07 05:04:37 +00:00
Marcel Moolenaar
1d90532abe Lower WARNS level to 3 to eliminate alignment warnings related to
casting inherent in CMSG_DATA().
2011-06-07 04:38:33 +00:00
David Xu
a231144921 Use p4prio_to_tsprio to calculate TS priority instead of using
p4prio_to_rtpprio which is for RT priority.

PR:	kern/157657
Submitted by:	krivenok.dmitry at gmail dot com
MFC after:	3 days
2011-06-07 02:50:14 +00:00
Marcel Moolenaar
299cceef03 Fix making kernel dumps from the debugger by creating a command
for it. Do not not expect a developer to call doadump(). Calling
doadump does not necessarily work when it's declared static. Nor
does it necessarily do what was intended in the context of text
dumps. The dump command always creates a core dump.

Move printing of error messages from doadump to the dump command,
now that we don't have to worry about being called from DDB.
2011-06-07 01:28:12 +00:00
Marcel Moolenaar
28fb80aa8c Call set_cputicker() to have the time counter use the ITC register.
Note that the ITC frequency is fixed.
2011-06-07 01:06:49 +00:00
Marcel Moolenaar
9f11397eb5 o Bump the EFI loader version to 3.1.
o   Add the about, pbvm and reboot commands.
o   Trim the banner (suppress maker and date).
2011-06-07 00:59:31 +00:00
Marcel Moolenaar
6d48fab9c5 Add ia64_sync_icache() and use it to make the I-cache coherent
after loading the kernel's text segment. The kernel will do the
same for loaded modules, so don't worry about that.
2011-06-07 00:39:15 +00:00
Julien Laffaye
9821807db1 Add myself to committers-ports.dot
Approved by: tabthorpe@ (mentor)
2011-06-06 23:48:48 +00:00
Jung-uk Kim
393ec7ad27 Validate INT 15h and 16h vectors more strictly. Traditionally these entry
points are fixed addresses and (U)EFI CSM specification also mandated that.
Unfortunately, (U)EFI CSM specification does not specifically mention this
is to call service routine via interrupt vector table or to jump directly
to the entry point.  As a result, some CSM seems to install two routines
and acts differently, depending on how it was executed, unfortunately.
When INT 15h is used, it calls a function pointer (which is probably a UEFI
service function).  When it jumps directly to the entry point, it executes
a simple and traditional INT 15h service routine.  Therefore, actually there
are two possible fixes, i. e., this fix or jumping directly to the fixed
entry point.  However, we chose this fix because a) keyboard typematic
support via BIOS is becoming extremely rarer and b) we cannot support random
service routine installed by a firmware or a boot loader.  This should fix
Lenovo X220 laptop, specifically.

Reviewed by:	delphij
MFC after:	3 days
2011-06-06 23:03:37 +00:00
Jung-uk Kim
7d09e4ab23 Revert r222152. The root cause was analysed and better fix is upcoming.
Discussed with:	delphij
2011-06-06 22:18:40 +00:00
Attilio Rao
9c68ff4742 MFC 2011-06-06 22:06:42 +00:00
Hans Petter Selasky
2906af23b8 Reset clear-stall error counter before setting up the USB control transfers.
MFC after:	14 days
2011-06-06 22:03:09 +00:00
Bjoern A. Zeeb
1417604e70 Unbreak kernels with non-default PCBGROUP included but no WITNESS.
Rather than including lock.h in in_pcbgroup.c in right order, fix it
for all consumers of in_pcb.h by further header file pollution under
#ifdef KERNEL.

Reported by:	Pan Tsu (inyaoo gmail.com)
2011-06-06 21:45:32 +00:00
Hans Petter Selasky
9eb0d7025d Improve enumeration of Low- and Full-speed devices connected through a
High-speed USB HUB by resetting the transaction translator (TT)
before trying re-enumeration. Also when clear-stall fails multiple times
try a re-enumeration.

Suggested by:	Trevor Blackwell
MFC after:	14 days
2011-06-06 21:45:09 +00:00
Attilio Rao
81c02539f1 MFC 2011-06-06 21:38:39 +00:00
Gavin Atkinson
8a7fca58aa Rework parts of this man page to improve grammar.
Inspired by, and parts submitted by...
PR:		docs/157467
Submitted by:	Ben Kaduk <kaduk mit.edu>
MFC after:	2 weeks
2011-06-06 21:02:26 +00:00
Ed Schouten
48a16a34d8 Remove redundant assignments to WARNS.
For these directories, WARNS is already implied to be 6.
2011-06-06 20:24:17 +00:00
Hiroki Sato
37a0ad8079 Set WARNS=1 temporarily to unbreak universe. 2011-06-06 20:14:50 +00:00
Glen Barber
b6654957c3 Attempt to clear up some confusion in the following example, by stating
the '-c' argument is passed to the shell, not to su(1), which would
indicate the login class.

	'su -m <user> -c <command>'

Submitted by:	Warren Block <wblock@wonkity.com> (followup to 157078)
MFC after:	5 days
2011-06-06 19:33:19 +00:00
Marcel Moolenaar
e726a6b70c Improve cpu_idle():
o   cpu_idle_hook is expected to be called with interrupts
    disabled and re-enables interrupts on return.
o   sync with x86: don't idle when the CPU has runnable tasks
o   have callers of ia64_call_pal_static() disable interrupts
    and re-enable interrupts.
o   add, but compile-out, support for idle mode. This will be
    enabled at some later time, after proper testing.
2011-06-06 19:06:15 +00:00
Dmitry Chagin
27242311a3 Fix regex for ptraceopname().
PR:		bin/157663
Submitted by:	jason wright <jason@thought.net>
MFC after:	10 days
2011-06-06 19:00:38 +00:00
Ed Schouten
05c67f2245 Allow custom files to be opened and allow sorting by timestamp.
While implementing a tool to import lastlog entries into utmpx, I
noticed lastlogin doesn't allow custom database files to be opened. Add
a -f switch to support this. Also, add -r and -t similar to ls(1),
ruptime(1), etc. where you can sort entries by timestamp and reverse
them. This allows you to spot active/idle users more easily.
2011-06-06 18:40:01 +00:00
Marcel Moolenaar
ad1de6722c Don't clobber the hosts /etc/fstab. $1 is empty at this point. 2011-06-06 18:25:11 +00:00
Bjoern A. Zeeb
b3a1dfb7e1 Include param.h for CACHE_LINE_SIZE to unbreak the build. 2011-06-06 17:07:38 +00:00
Warner Losh
54e397e566 Make a couple of debug printfs DEVPRINTF. 2011-06-06 16:27:38 +00:00
John Baldwin
a59f78daa9 Some style fixes.
Submitted by:	bde
2011-06-06 15:33:15 +00:00
Glen Barber
a53dafae57 Bump date from previous commit. :(
MFC after:	5 days
2011-06-06 15:21:53 +00:00
Glen Barber
4af4a110a7 Document that when running 'su -m <user> -c <command>', <command> is run
within a shell as <user>.

PR:		157078
Submitted by:	Warren Block <wblock@wonkity.com>
MFC after:	5 days
2011-06-06 15:17:55 +00:00
Martin Matuska
298a6c3de6 Remove empty #ifndef
MFC after:	3 days
2011-06-06 14:46:43 +00:00