Commit Graph

140154 Commits

Author SHA1 Message Date
Robert Watson
0c0a142a52 Use #define<tab> rather than #define<space>.
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 16:21:59 +00:00
Andrey A. Chernov
d16863efa6 1) Initialize arc4_i and arc4_j to 0 after key mixing as recommended in
draft-kaukonen-cipher-arcfour-03.txt (3.1.5)

2) Drop first 768 bytes as standard RC4-drop(768)
2008-07-22 16:16:51 +00:00
Robert Watson
f1cb603072 Comment fix.
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 16:02:21 +00:00
VANHULLEBUS Yvan
c1842f7d5d Added me as a commiter
Approved by:	gnn (mentor)
2008-07-22 16:01:57 +00:00
Robert Watson
98ee1b30aa Comment typo fix.
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 15:54:10 +00:00
Robert Watson
c2f027ffb8 Minor white space synchronization to Apple version of security audit.
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 15:49:19 +00:00
Robert Watson
bc9a43d698 In preparation to sync Apple and FreeBSD versions of security audit,
pick up the Apple Computer -> Apple change in their copyright and
license templates.

Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 15:29:48 +00:00
Andrey A. Chernov
ba2c3a6557 Change /dev/urandom to /dev/random since urandom marked as
XXX Deprecated
alias in /sys/dev/random/randomdev.c
2008-07-22 15:25:35 +00:00
Robert Watson
59b622e6b3 Use unsigned int when iterating over groupsets in audit_arg_groupset().
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 15:17:21 +00:00
Andrey A. Chernov
bc8541b1d1 Use arc4random_uniform(3) since modulo size is not power of 2 2008-07-22 15:08:50 +00:00
Maxim Konovalov
e647cc3dba o Alan Shepard was first American in the space; fix attribution.
o Correct Alan's surname.

PR:		bin/125812
Submitted by:	Derek Taylor [1], gavin [2]
MFC after:	1 week
2008-07-22 14:21:56 +00:00
Stanislav Sedov
cde9cd82fe - Whitespace fixes.
Approved by:	gonzo
MFC after:	1 week
2008-07-22 14:04:06 +00:00
Marius Strobl
93060c6c1b o Fix style(9) bugs and similar nits.
o Merge ncr53c9x.c from NetBSD:
  1.115: fix variable shadowing
  1.118: __inline -> inline
  1.121: fix empty if
2008-07-22 13:51:21 +00:00
Andrey A. Chernov
9b78febf8e Bump __FreeBSD_version for arc4random_buf() and arc4random_uniform()
added.
2008-07-22 13:38:17 +00:00
Andrey A. Chernov
61d35b6350 In arc4random_uniform() detect simple "power of two" case and
return just (arc4random() % upper_bound)
2008-07-22 12:43:09 +00:00
Andrey A. Chernov
c0046493c9 Add arc4random_uniform()
Obtained from:  OpenBSD
2008-07-22 11:40:42 +00:00
Andrey A. Chernov
6e4fe40a24 Add arc4random_uniform() function (to avoid "modulo bias")
Obtained from:  OpenBSD
2008-07-22 11:33:49 +00:00
Andrey A. Chernov
85986016ae Increase initially dropped bytes from 512 to 768 (768 is also
suggested in the Ilya Mironov's article). 768 taken from another
research where it treats as default for RC4-drop(768):
http://www.users.zetnet.co.uk/hopwood/crypto/scan/cs.html#RC4-drop

Minor style tweak.
2008-07-22 10:31:29 +00:00
Marius Strobl
109c391928 For sun4v ensure there is an opt_global.h with SUN4V defined included,
even for the stand-alone build.
2008-07-22 09:56:45 +00:00
Olivier Houchard
7cff8ceafb Disable SSP for the kernel on arm as well (see rev 180605).
I overlooked this because a SSP kernel booted for me.

Apologises to:	ticso
2008-07-22 09:38:12 +00:00
Bruce A. Mah
3969be11ef Add a sentence of credits to the KSE removal note.
Requested by:	brooks
2008-07-22 05:02:46 +00:00
Tai-hwa Liang
df9cf830d1 Trying to fix compilation bustage:
- removing 'const' qualifier from an input parameter to conform to the type
  required by rw_assert();
- using in_addr->s_addr to retrive 32 bits address value.

Observed by:	tinderbox
2008-07-22 04:23:57 +00:00
Attilio Rao
09400d5abe - Disallow XFS mounting in write mode. The write support never worked really
and there is no need to maintain it.
- Fix vn_get() in order to let it call vget(9) with a valid locking
  request.  vget(9) returns the vnode locked in order to prevent recycling,
  but in this case internal XFS locks alredy prevent it from happening, so
  it is safe to drop the vnode lock before to return by vn_get().
- Add a VNASSERT() in vget(9) in order to catch malformed locking requests.

Discussed with:	kan, kib
Tested by:	Lothar Braun <lothar at lobraun dot de>
2008-07-21 23:01:09 +00:00
Andrew Thompson
c7971a92ea Change the module example to kldload since this is the resume side. 2008-07-21 22:55:40 +00:00
Marcel Moolenaar
8941d4ae1d Remove sioX as an alias for uartX. It is believed to be
more confusing than helpful.

Suggested by: jhb
2008-07-21 22:38:00 +00:00
Kip Macy
9d29c635da make new accessor functions consistent with existing style 2008-07-21 22:11:39 +00:00
John Baldwin
bf9a8c1d39 Add feature_present(3) to the FBSD 1.1 symbol map. 2008-07-21 22:07:59 +00:00
Andrey A. Chernov
a08f5d95ec 1) Use __packed attr on rdat structure to make it exact 128 bytes.
2) Use gettimeofday() and getpid() only if reading from /dev/urandom
fails or impossible.
3) Discard N bytes on very first initialization only (i.e. don't
discard on re-stir).
4) Reduce N from 1024 to 512 as really suggested in the
"(Not So) Random Shuffles of RC4" paper:
http://research.microsoft.com/users/mironov/papers/rc4full.pdf
2008-07-21 21:57:30 +00:00
Kip Macy
99d803b98f remove call to unsafe tcp_twstart function 2008-07-21 21:23:43 +00:00
Kip Macy
84330faa64 - Switch to INP_WLOCK macro from inp_wlock
- calling sodisconnect after tcp_twstart is both gratuitous and unsafe - remove

Submitted by:	rwatson
2008-07-21 21:22:56 +00:00
Robert Watson
828e07694c If run_interrupt_driven_config_hooks() waits 360 seconds and INVARIANTS
is compiled into the kernel, then panic.

MFC after:	3 days
Discussed with:	scottl
2008-07-21 20:50:49 +00:00
Andrey A. Chernov
860c4e582a 1) Update copyright notice.
2) Eliminate "struct arc4_stream *as" arg since only single arg is
possible.
3) Set rs.j = rs.i after arc4random key schedule to be more like arc4
stream cipher.

Obtained from:  OpenBSD
2008-07-21 20:04:32 +00:00
John Baldwin
847bd80810 Allocate a single CCB at the start of the main loop of the RAID monitoring
kthread of the mpt(4) driver that hangs around for the entire lifetime of
the thread.  Previously the driver would allocate a new CCB using M_WAITOK
with a lock held each time it updated its state.  While here, use the
CAM API for allocating a CCB rather than raw malloc(9).

Reviewed by:	scottl
MFC after:	1 week
2008-07-21 18:43:02 +00:00
Andrey A. Chernov
531ebdb7b1 Add arc4random_buf to FBSD_1.1 space 2008-07-21 18:03:31 +00:00
Marius Strobl
6ab60a4bdd - Remove redundant inclusion of opt_global.h.
- Use __FBSDID in autoconf.c.

MFC after:	3 days
2008-07-21 17:15:51 +00:00
Pawel Jakub Dawidek
7f41115ef6 Implement the following macros for completeness:
SYSCTL_QUAD()
	SYSCTL_ADD_QUAD()
	TUNABLE_QUAD()
	TUNABLE_QUAD_FETCH()

Now we can use 64bit tunables on 32bit systems.
2008-07-21 15:05:25 +00:00
Pawel Jakub Dawidek
37876323b1 We want to use LBOLT instead of lbolt on FreeBSD.
I've this already fixed in p4, but the fix was never integrated into HEAD.

Reported by:	ed
2008-07-21 14:35:48 +00:00
Andrey A. Chernov
1c443b9b18 Add arc4random_buf.3 to MLINKS 2008-07-21 14:33:11 +00:00
Andrey A. Chernov
3204108bc3 Add arc4random_buf.
Style: remove arg names from arc4random_addrandom.
2008-07-21 14:03:04 +00:00
Andrey A. Chernov
bc6847e225 Implement arc4random_buf() function
Obtained from:  OpenBSD
2008-07-21 13:52:06 +00:00
Andrey A. Chernov
b6634bf8d2 Decrease arc4_count only when needed and with proper bytes amount.
Obtained from:  OpenBSD
2008-07-21 12:44:47 +00:00
Andrey A. Chernov
0761bd1fe1 1) Set stired flag after forced initialization.
2) Increase arc4_count to the limit OpenBSD use.

Submitted by:   Thorsten Glaser <tg@mirbsd.de> (1)
Obtained from:  OpenBSD (2)
2008-07-21 10:31:28 +00:00
Maxim Konovalov
dc5aa2110e o Document "show conifhk", wording from r180610 commit log.
Reviewed by:	rwatson
2008-07-21 10:03:02 +00:00
Pawel Jakub Dawidek
28814ddbe8 We want to check new options given, not the current ones.
This fixes 'zpool import -o <mntopt> <name>' not working properly.
2008-07-21 09:45:44 +00:00
Kip Macy
7038c6d2c1 remove unneeded declarations 2008-07-21 02:34:52 +00:00
Kip Macy
9a027ea9a4 remove local version of tcp_offload_* functions 2008-07-21 02:29:40 +00:00
Kip Macy
d21cb942bc update syncache function names 2008-07-21 02:26:49 +00:00
Kip Macy
b1f8bd6464 Add versions of tcp_twstart, tcp_close, and tcp_drop that hide the acquisition the tcbinfo lock.
MFC after:	1 week
2008-07-21 02:23:02 +00:00
Kip Macy
83324f5cb5 remove cxgb local definition of locked syncache_expand 2008-07-21 02:17:27 +00:00
Edwin Groothuis
8bd833fff8 After the commit of SVN rev 180236, wilko@ noticed that the approach
doesn't work on the Alpha platform: machine/elf.h doesn't include
sys/elf32.h there.

PR:		related to bin/124906
Approved by:	bde@
MFC after:	1 week
2008-07-21 02:13:14 +00:00