Commit Graph

141278 Commits

Author SHA1 Message Date
yar
f8df6b10b3 pkill(1) first appeared in /usr/bin, but later it was moved to /bin
for the convenience of rc.d.  Now it has happily lived there for quite
a while.  So move the pkill(1) source files from usr.bin to bin, too.

Approved by:	gad
2008-08-31 14:27:59 +00:00
attilio
e2ca413d09 Decontextualize vfs_busy(), vfs_unbusy() and vfs_mount_alloc() functions.
Manpages are updated accordingly.

Tested by:	Diego Sardina <siarodx at gmail dot com>
2008-08-31 14:26:08 +00:00
rwatson
2d23f13f7f In UDPv6, reduce scope of global udbinfo lock during append to last
matching socket by dropping it before udp6_append(), and remove
duplicate unlocks of udbinfo and inpcb in sysctl return path.

MFC after:	3 days
2008-08-31 13:16:45 +00:00
rwatson
59f71b4d71 Update README to reflect removal of netatm/harp test parts some time ago.
MFC after:	3 days
2008-08-31 11:41:31 +00:00
ed
af5f6ae3e7 Disable processing of output data after disabling scroll lock by force.
The syscons code disabled scroll lock inside sc_cnputs() if it's going
to print a system message. The code currently wants to process any TTY
output data as well, but we cannot do this, because the TTY lock is a
sleep mutex, while cnputs() picks up a spin mutex.

Disable the code for now. It solves a panic when a console message is
printed while scroll lock is enabled. One solution would be to
initialize a task structure here.

Reported by:	Paul B. Mahol <onemda gmail com>
2008-08-31 10:17:40 +00:00
stas
1ab8b1ad33 - Fix comment.
- Set U/L bit of generated ethernet address to 1 to not
  clash with Atmel assigned addresses.

Suggested by:	yar
Approved by:	kib (mentor)
2008-08-31 09:28:49 +00:00
rpaulo
1507ef638c Enable EFI target.
While there, make use of the DEFAULT_VECTOR variable.
2008-08-31 09:17:27 +00:00
antoine
ab700039e9 Add more obsolete files. 2008-08-31 08:33:41 +00:00
kientzle
fe3cf0e14f New mtree writer, thanks to Joerg Sonnenberger.
Obtained from:	Joerg Sonnenberger
2008-08-31 07:21:46 +00:00
kientzle
ede0c9fe5c 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
kientzle
a3fa470b0f 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
imp
89761a8f6c 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
imp
9bdd161322 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
imp
4e578abd6f 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
imp
d83d65fc14 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
6745d3f73c Remove restore_intr(). We have intr_restore()... 2008-08-31 02:25:20 +00:00
ed
e9aab1737b 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
csjp
4d406f1257 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
1a41b28f5c In db_show_mdpcpu(), print MD fields. 2008-08-30 18:50:11 +00:00
marcel
e5965698d4 Whitespace fixes. 2008-08-30 18:48:17 +00:00
marcel
68d75b49c2 Call powerpc_sync() instead of using an asm statement. 2008-08-30 18:39:29 +00:00
marcel
7cf0ef569d Add powerpc_sync() as an inline function. 2008-08-30 18:38:37 +00:00
marcel
906dabe5ad Don't clear PSL_RI. Disabling external interrupts
doesn't make exceptions unrecoverable.
2008-08-30 18:37:55 +00:00
imp
d1abd64ba2 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
imp
2a72e8543a 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
imp
5ff8a2ebc3 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
15fcbd3b7f - 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
stas
70f2b88d5c - 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
stas
67d0d81443 - Style fix.
Approved by:	kib (mentor)
MFC after:	1 week
2008-08-30 15:04:53 +00:00
attilio
5e52675f4f Reflect recent changes to the sysctl debug.witness.watch moving into a
tri-state variable.
2008-08-30 13:37:28 +00:00
attilio
d6333c0f4d - 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
fa61dcef0f 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
kientzle
558a49e6d8 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
rnoland
ed05e5e34a 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
rnoland
c2591857ab 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
rnoland
32bdd34dda 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
jkim
15b99cdb14 Connect a forgotten test case to Makefile. 2008-08-29 20:58:01 +00:00
gnn
995cb3f198 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
jkim
a19823099f Make bpf_maxinsns visible from ng_bpf.c.
Pass me the pointyhat, please.
2008-08-29 20:34:06 +00:00
marius
05def23cd8 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
jhb
ff9581861d 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
jkim
7d24618f3d Do not pass validatation level since all issues are fixed now. 2008-08-29 20:20:30 +00:00
jkim
4b913d6bb8 Merge local copy of bpf_validate() with bpf_filter.c. 2008-08-29 20:07:02 +00:00
jkim
d7adfdf82f Fix the last missing parentheses for a return statement in bpf_filter.c. 2008-08-29 20:00:55 +00:00
jkim
ce90729ca7 More convergence towards style(9). 2008-08-29 19:32:04 +00:00
jkim
e94035c40c - 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
pjd
eb18064487 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
pjd
fb30298666 - Give algorithms recommendation.
- Keep options in alphabetical order.
2008-08-29 17:13:07 +00:00
scottl
0c41221b44 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
jkim
8fb51c23ad Make sure BPF program is not bigger than set maximum (net.bpf.maxinsns). 2008-08-29 15:49:40 +00:00