Commit Graph

141134 Commits

Author SHA1 Message Date
Antoine Brodin
598027bb46 Add more obsolete files. 2008-08-31 08:33:41 +00:00
Tim Kientzle
9ea6421090 New mtree writer, thanks to Joerg Sonnenberger.
Obtained from:	Joerg Sonnenberger
2008-08-31 07:21:46 +00:00
Tim Kientzle
7584fa8aa4 Joerg Sonnenberger's improvements to the shar writer.
Significant performance improvements, better quoting of file names, etc.
2008-08-31 07:10:40 +00:00
Tim Kientzle
5dc843b27b Make libarchive_test a little smarter about trying to find
its reference files when you don't specify -r.  It now checks
a couple of likely nearby directories to see if any of them
have a particular known file.
2008-08-31 07:06:02 +00:00
Warner Losh
b2fcf23526 Make uipaq's ucom callbacks easier to read while I'm hear looking for
other why this seems to be broken with my phone...
2008-08-31 03:39:59 +00:00
Warner Losh
88c29cec87 All the other routines returned EIO from the param routine. Return it
from umodem and ufoma.

With these changes, umodem kinda works for me now.  It certainly gets
past the "tip" bug that I found earlier where 115200 wasn't a valid
baud rate.  This was "broken" in the mpsafetty commit, but in reality,
umodem was always broken.
2008-08-31 03:22:19 +00:00
Warner Losh
8a5492b881 Ioctls that aren't handled by this layer need to return ENOIOCTL, not
ENOTTY.  Also, make the ucom callback structure easier to read while
I'm here.
2008-08-31 03:16:31 +00:00
Warner Losh
c9b04e1085 Kill dead code. This has been a 'todo' item for a long time and the
skelton ioctl handler has decayed beyond usefulness in both of these
drivers.
2008-08-31 03:08:26 +00:00
Marcel Moolenaar
24c8466e8f Remove restore_intr(). We have intr_restore()... 2008-08-31 02:25:20 +00:00
Ed Schouten
331773cd07 Document the ulimit -p option in the sh(1) manual page.
When I imported the MPSAFE TTY code, I added the -p flag to sh(1)'s
ulimit, but I forgot to document it in the appropriate manual page.

Requested by:	stefanf
2008-08-30 22:35:21 +00:00
Christian S.J. Peron
8751c5bac8 Improve the entropy of the source port randomization for network address
translation.  It turns out this is useful for applications which require
source port randomization for security (i.e. dns servers).

Discussed with:	secteam
Requested by:	mlaier
MFC after:	2 weeks
2008-08-30 20:58:34 +00:00
Marcel Moolenaar
896b354188 In db_show_mdpcpu(), print MD fields. 2008-08-30 18:50:11 +00:00
Marcel Moolenaar
958ed50695 Whitespace fixes. 2008-08-30 18:48:17 +00:00
Marcel Moolenaar
20c5910af7 Call powerpc_sync() instead of using an asm statement. 2008-08-30 18:39:29 +00:00
Marcel Moolenaar
d3f6fb3b91 Add powerpc_sync() as an inline function. 2008-08-30 18:38:37 +00:00
Marcel Moolenaar
7aff4169e3 Don't clear PSL_RI. Disabling external interrupts
doesn't make exceptions unrecoverable.
2008-08-30 18:37:55 +00:00
Warner Losh
a423fd2c55 opt_bus.h isn't needed here anymore. It never was really needed,
since usb has no business including it like it did...
2008-08-30 16:24:01 +00:00
Warner Losh
06a6aa2b6b opt_bus.h isn't needed here. It is supposed to be for subr_bus.c only. 2008-08-30 16:23:04 +00:00
Warner Losh
277f167c86 opt_bus.h is supposed to be for subr_bus.c only. There's no need for
it in the usb code.
2008-08-30 16:21:16 +00:00
Marius Strobl
20e6aaf533 - Read ASI_{D,I}TLB_DATA_ACCESS_REG twice in order to work around
errata of USIII and beyond (USIII erratum #19, USIII+ erratum #1,
  USIIIi erratum #1).
- Use the cheetah PA mask in {d,i}tlb_va_to_pa_sun4u() for USIII
  and beyond. This is done so that these functions will still mask
  the debug bits of spitfire-class CPUs once we increase TD_PA_BITS
  to match the number of bits used for the PA by cheetah-class CPUs.
- Change {d,i}tlb_enter_sun4u() to also set TLB_CTX_KERNEL as the
  context of the mappings entered. This is more or less cosmetic as
  TLB_CTX_KERNEL is 0.
- Now that we have to distinguish between different sun4u CPUs in
  the loader anyway, no longer do trial and error when reading the
  portid property.
2008-08-30 16:03:22 +00:00
Stanislav Sedov
0787c9a03f - Try to look for MAC address in all SA registers, not only in the
first one. U-boot, for example, uses the second register to store
  MAC.[1]
- Use random MAC address if none configured instead of failing.

Submitted by:	Bjorn Konig <bkoenig@alpha-tierchen.de> [1]
Reviewed by:	imp
Approved by:	kib (mentor)
MFC after:	1 week
2008-08-30 15:16:40 +00:00
Stanislav Sedov
ae8b75dddb - Style fix.
Approved by:	kib (mentor)
MFC after:	1 week
2008-08-30 15:04:53 +00:00
Attilio Rao
65eb71bd3c Reflect recent changes to the sysctl debug.witness.watch moving into a
tri-state variable.
2008-08-30 13:37:28 +00:00
Attilio Rao
988d28340a - Improve some witness_watch operability in code which does perform both
lock tracking and checks, doing just the former ones.
- Fix a bug where sysctl utility was printing crazy values when setting a
  new value for debug.witness.watch [0]

[0] Reported by:	yongari
2008-08-30 13:20:35 +00:00
Ed Schouten
74bb9e3ad5 Fix some edge cases in the TTY queues:
- In the current design, when a TTY decreases its baud rate, it tries to
  shrink the queues. This may not always be possible, because it will
  not free any blocks that are still filled with data.

  Change the TTY queues to store a `quota' value as well, which means it
  will not free any blocks when changing the baud rate, but when placing
  blocks back into the queue. When the amount of blocks exceeds the
  quota, they get freed.

  It also fixes some edge cases, where TIOCSETA during read()/
  write()-calls could actually make the queue a tiny bit bigger than in
  normal cases.

- Don't leak blocks of memory when calling TIOCSETA when the device
  driver abandons the TTY while allocating memory.

- Create ttyoutq_init() and ttyinq_init() to initialize the queues,
  instead of initializing them by hand. The new TTY snoop driver also
  creates an outq, so it's good to have a proper interface to do this.

Obtained from:	//depot/projects/mpsafetty/...
2008-08-30 09:18:27 +00:00
Tim Kientzle
cec048ddf0 When atime wasn't specified, it should get set == mtime.
This is much stronger than just asserting that it's not zero.
2008-08-30 05:31:23 +00:00
Robert Noland
6f81ba0e97 Don't return EINVAL when trying to unlock.
anholt thinks that he added this check as part of some regression testing,
but it is failing at least some of the time.  I don't want to remove it
just yet.  I added a bit of debugging to help identify the issue.

Approved by:	kib
2008-08-30 01:00:18 +00:00
Robert Noland
ac165058b7 We need to lock around driver unload now.
The i915 driver installs it's register map at load time now.  We can't
remove the map during unload without holding the lock.

Approved by:	kib
2008-08-30 00:53:30 +00:00
Robert Noland
4d8fefdaf4 Free the device lock around the call to drm_drawable_free_all()
This function manipulates a spin lock and we can't hold a mutex over it.

Approved by:	kib
2008-08-30 00:47:52 +00:00
Jung-uk Kim
4c84e72151 Connect a forgotten test case to Makefile. 2008-08-29 20:58:01 +00:00
George V. Neville-Neil
e4762f75c3 Fix a bug whereby multicast packets that are looped back locally
wind up with the incorrect checksum on the wire when transmitted via
devices that do checksum offloading.

PR:		kern/119635
Reviewed by:	rwatson
MFC after:	5 days
2008-08-29 20:42:58 +00:00
Jung-uk Kim
12dc95824b Make bpf_maxinsns visible from ng_bpf.c.
Pass me the pointyhat, please.
2008-08-29 20:34:06 +00:00
Marius Strobl
d0d67284f8 For chips with a broken DC_ISR_RX_STATE which f.e. never signals
stopped nor the waiting state and also no other means to check
whether the receiver is idle (see also r163774), we have no choice
than to call mii_tick(9) unconditionally even in the case of the
DC_REDUCED_MII_POLL handling as far as the RX side is concerned.
This isn't necessarily worse than checking whether RX is idle
though because unlike as with TX we're racing with the hardware,
which might receive packets any time while we poll the MII, anyway.

Reported and tested by:	Jacob Owens
Reviewed by:		yongari
MFC after:		3 days
2008-08-29 20:31:41 +00:00
John Baldwin
a0f01ecb62 Add the ability to run /usr/sbin/crashinfo on a new core dump automatically
during boot.  Right now this is disabled by default, but it can be enabled
by setting 'crashinfo_enable=YES' in rc.conf.

MFC after:	2 weeks
2008-08-29 20:30:30 +00:00
Jung-uk Kim
51fc382e51 Do not pass validatation level since all issues are fixed now. 2008-08-29 20:20:30 +00:00
Jung-uk Kim
ec07961360 Merge local copy of bpf_validate() with bpf_filter.c. 2008-08-29 20:07:02 +00:00
Jung-uk Kim
b87fd66b6d Fix the last missing parentheses for a return statement in bpf_filter.c. 2008-08-29 20:00:55 +00:00
Jung-uk Kim
7c5db425bf More convergence towards style(9). 2008-08-29 19:32:04 +00:00
Jung-uk Kim
07e7d73788 - Directly match code wherever possible instead of using macros.
- Macrofy bitmap table lookup.  Constify the table while I am here.
- Add missing continue statements in the for loop.

Functionally it should be the last remaining fix from:

PR:		kern/89752
MFC after:	1 month
2008-08-29 19:10:51 +00:00
Pawel Jakub Dawidek
ba196edbd2 By default backup geli metadata to a file. It is quite critical 512 bytes,
once it is lost, all data is gone.

Option '-B none' can by used to prevent backup. Option '-B path' can be
used to backup metadata to a different file than the default, which is
/var/backups/<prov>.eli.

The 'geli init' command also prints backup file location and gives short
procedure how to restore metadata.

The 'geli setkey' command now warns that even after passphrase change or keys
update there could be version of the master key encrypted with old
keys/passphrase in the backup file.

Add regression tests to verify that new functionality works as expected.

Update other regression tests so they don't create backup files.

Reviewed by:	keramida, rink
Dedicated to:	a friend who lost 400GB of his live by accidentally overwritting geli metadata
MFC after:	2 weeks
2008-08-29 18:10:18 +00:00
Pawel Jakub Dawidek
785c7ba6a1 - Give algorithms recommendation.
- Keep options in alphabetical order.
2008-08-29 17:13:07 +00:00
Scott Long
a25cb00747 Ensure that the padding calcualtion doesn't return a negative value.
Submitted by:	kib
Approved by:	jb
2008-08-29 15:55:49 +00:00
Jung-uk Kim
37b5fe59b5 Make sure BPF program is not bigger than set maximum (net.bpf.maxinsns). 2008-08-29 15:49:40 +00:00
Attilio Rao
df3310e04a - Make witness_watch a 3 state value.
1 means that witness is up and running.
  0 means that witness is disabled but that it can be established later
    again in effective way.
  -1 means that witness is disabled permanently
- Fix a bug causing kernel to panic on witness disabling through
  witness_watch.  lock lists queues were still full of entries and this was
  causing throubles with debugging stubs (like witness_thread_exit()).

Reported by:	kris, yongari
Sponsored by:	Nokia
2008-08-29 15:47:53 +00:00
Ed Schouten
67d350d60c Restore assertion that was removed in r182444.
While merging back my changes from Perforce, it seemed I removed a
locking assertion that still applies to ttydisc_rint_poll(). Restore it,
because it may come in handy.
2008-08-29 15:05:34 +00:00
Ed Schouten
a15ec0a5e4 Backport two small fixes from the MPSAFE TTY branch in Perforce:
- Implement IMAXBEL. It turned out the IMAXBEL termios switch was marked
  as supported, while it had not been implemented.

- Don't go into the high watermark when in canonical mode, no data has
  been canonicalized and the input buffer is full. This caused the
  terminal to lock up. This prevented users from pressing
  backspace/^U/etc in such cases.

  This could easily be simulated by pasting a very big amount of data in
  a shell with sh(1) in canonical mode.

Obtained from:	//depot/projects/mpsafetty/...
2008-08-29 15:02:50 +00:00
Yoshihiro Takahashi
5798cf97e9 unifdef PC98 2008-08-29 12:25:58 +00:00
Yoshihiro Takahashi
c5fe188c44 Remove unneeded include. 2008-08-29 12:23:51 +00:00
Tai-hwa Liang
2bc01c3a32 Fixing INVARIANTS build by adding 'z' format prefix for size_t typed
variable.

Reminded by:	tinderbox
2008-08-29 08:44:51 +00:00
Sam Leffler
02a1ebb4e3 Fix mic calculation when final data is entirely in a trailing mbuf;
it's unclear if this can happen on freebsd but does appear on netbsd.
Identified by Matthias Drochner who came up with an initial change
that we then revised together.

Reviewed by:	thompsa, sephe, avatar
MFC after:	2 weeks
2008-08-29 05:02:10 +00:00