Commit Graph

233454 Commits

Author SHA1 Message Date
skrll f391dedeee Really fix arm_cksumdata for <4 bytes of data 2015-02-15 17:21:08 +00:00
jmcneill 481b9e731c At startup, instead of doing run-hooks for each device, call run-hooks
once with a list of all found devices. This lets us batch calls to MAKEDEV
which results in a noticeable improvement in Raspberry Pi boot time.

Run the initial device enumeration hooks before detaching from the foreground,
ensuring that any required devices have been created before the rc.d script
exits.
2015-02-15 15:56:30 +00:00
joerg 6214f5f4d1 Format string annotation. 2015-02-15 14:51:57 +00:00
maxv 12c9fae830 Revert a change in my previous commit that broke the checksum calculation.
Noted by dholland@
2015-02-15 11:04:43 +00:00
martin 906a6a13d7 A syscall like posix_fallocate() that is not supposed to set errno in
userland needs to always return 0 and store the error code *retval.
2015-02-15 10:48:21 +00:00
skrll ff958e114f port-sh3/49613: errno does not set by some systemcall at error case
Branch to correct point when error detected.
2015-02-15 10:48:13 +00:00
nakayama aaa0006cf5 Fix up sysmon_* dependencies. 2015-02-15 01:43:11 +00:00
justin a0e1fabf06 Minor fixes to types and includes 2015-02-15 00:54:32 +00:00
skrll 9c3600fc37 Correct arm_cksumdata for <4 bytes of data 2015-02-14 23:12:29 +00:00
alnsn 6d5b9045a5 Add two more libbpfjit_jmp_jeq_x_noinit_XX tests. 2015-02-14 22:40:18 +00:00
alnsn e3ced4adff Add two more bpfjit_jmp_jeq_x_noinit_XX tests. 2015-02-14 22:34:33 +00:00
he de7f57fda9 Change the new counter variables in struct tcpcb to uint32_t, as
per christos' comments.
2015-02-14 22:09:53 +00:00
alnsn 84db77b722 Copyright year. 2015-02-14 21:32:46 +00:00
alnsn 321f9dd4e2 In some implementations pc->k is signed. Cast it to uint32_t before comparing. 2015-02-14 21:17:05 +00:00
alnsn 7674f27971 Properly track initialisation of registers for BPF_JMP instructions. 2015-02-14 21:14:56 +00:00
alnsn 4bf0e499d1 Replace accidentally committed test with libbpfjit_jmp_jeq_x_noinit_ax test. 2015-02-14 20:39:09 +00:00
alnsn 3228cf99a8 Improve libbpfjit_jmp_jeq_x test. 2015-02-14 20:29:36 +00:00
alnsn 73969c29cc Improve bpfjit_jmp_jeq_x test. 2015-02-14 20:25:08 +00:00
alnsn 86cd3d4d52 BPF_JMP+BPF_JEQ+BPF_X doesn't compare X with k, it compares X with A.
Fix it in the bpfjit_jmp_jeq_x_noinit_ax test.
2015-02-14 19:55:05 +00:00
nakayama 29acffa014 Avoid nfs devices correctly. 2015-02-14 19:46:55 +00:00
christos 7fe8be8b24 one more pfilter_init() 2015-02-14 19:05:59 +00:00
christos 28d868e3cd initialize the pfilter for the privilege-separated copy (Frank Kardel) 2015-02-14 19:05:29 +00:00
alnsn 009978ddb6 Avoid testing for zero rv in bpfjit_jmp_x_uninitialised. Unitialised
X isn't a problem for bpf_validate().
2015-02-14 17:28:19 +00:00
alnsn 35489d090f Add bpfjit_jmp_x_uninitialised test.
Found by http://lcamtuf.coredump.cx/afl/.
2015-02-14 16:48:30 +00:00
christos bf418d8f39 PR/49667: Henning Petersen: Missing initialization of values in dt_parser.c 2015-02-14 15:55:05 +00:00
christos 92111d5005 PR/49666: Henning Petersen: initialization of instr wrong in dt_cg.c NULL
instead of 0 for uint32_t.
2015-02-14 15:53:23 +00:00
christos 9b4aac0254 Add the bad user diff. 2015-02-14 15:42:17 +00:00
christos 72106c5215 Also mark as bad attempts those who come in a bad users (Frank Kardel) 2015-02-14 15:41:21 +00:00
maxv f2f615bb86 ffs_superblock_validate(): when checking the number of frag blocks, also
make sure it matches fs->fs_frag. This also prevents an infinite loop if
fs->fs_frag=0.
2015-02-14 13:43:28 +00:00
tsutsui a628ff77ec Explicitly denote static functions. 2015-02-14 13:07:39 +00:00
tsutsui 908d6ff293 Make local readonly arrays static const. 2015-02-14 13:06:28 +00:00
wiz 392ee9f315 Remove trailing space, use American spelling, bump date for previous. 2015-02-14 13:02:38 +00:00
he 5636a89746 Struct tcpcb was extended with three new fields, therefore
welcome to NetBSD 7.99.5.
2015-02-14 12:59:02 +00:00
he 1d14d02249 Port over the TCP_INFO socket option from FreeBSD, originally from
the Linux 2.6 TCP API.  This permits the caller to query certain information
about a TCP connection, and is used by pkgsrc's net/iperf3 test program
if available.

This extends struct tcbcb with three fields to count retransmits,
out-of-sequence receives and zero window announcements, and will
therefore warrant a kernel revision bump (done separately).
2015-02-14 12:57:52 +00:00
maxv cba38714c3 ffs_superblock_validate(): compute fs_bshift and fs_fshift, and ensure
they are consistent with what is indicated in the superblock. This allows
us to safely use some ffs_ macros.
2015-02-14 10:21:29 +00:00
maxv 7fcc4ddf11 In fact, we need to sanitize the superblock *after* swapping it. Therefore,
move the swap code inside the loop.

'fs->fs_sbsize' is swapped twice: the first time in order to get the
correct superblock size, and later when swapping the whole superblock
structure. As a result, we need to check 'fs->fs_sbsize' twice.

This:
 - fixes my previous changes for swapped FSes
 - allows the kernel to look for other superblock locations if the
   current superblock is not validated

And now:
 - ffs_superblock_validate() takes only one argument: the fs structure
 - 'fs_bsize' is unused, so delete it

Add some comments to explain a bit what we are doing.
2015-02-14 09:55:53 +00:00
maxv a42dfe11dc Two typos:
- "preferrably" -> "preferably"
 - "overriden" -> "overridden"
No functional change.
2015-02-14 09:06:11 +00:00
maxv dd5da7d8bc ffs_superblock_validate(): sanitize the number of frag blocks. 2015-02-14 09:00:12 +00:00
isaki 76ca8ec888 uint64_t -> uint32_t. 32bit is sufficient in this case
and it improved the performance approx 7% on my 68030.
see also PR lib/49664.
2015-02-14 08:46:02 +00:00
maxv 4d2092869c ffs_appleufs_validate():
- remove superfluous printfs
 - ensure ul_namelen!=0, otherwise the kernel accesses ul_name[-1] and
   overwrites the previous field in the structure.
2015-02-14 08:07:39 +00:00
maxv 55a23d9c1d KNF. No functional change. 2015-02-14 07:56:31 +00:00
maxv e54cf2b426 Currently, in ffs_reload(), we don't handle the possibility that the
superblock location may have changed. But that implies that we don't
handle the possibility that its size may have changed either.

Therefore: add a check to ensure the size hasn't changed. Otherwise the
mismatch leads to a memory corruption with kmem.
2015-02-14 07:41:40 +00:00
dholland 1b225aadc1 typo in comment 2015-02-14 07:37:19 +00:00
maxv 8f21e79caf Style. No functional change. 2015-02-14 07:20:11 +00:00
maxv dc85b9beea ffs_reload(): call ffs_superblock_validate() with the new superblock. 2015-02-14 07:11:34 +00:00
mrg ae839ccccc add a ugly hack to avoid difficult to understand failures with
radeondrmkms on i386.  the problem is that the pcdisplay@isa
and vga@isa drivers rely on some other driver having already
mapped the vga registers to know they should not attach, but
radeondrmkms attaches late as it needs rootfs access, and it
does not map these registers, and either of vga or pcdisplay
will attach, and then attach wsdisplay0, and then getty and
X11 will fail and you shake a tiny fist at the computer.

so, for i386, map and unmap the VGA register space between
the normal attach and the mountroot attach.
2015-02-14 06:58:12 +00:00
tsutsui f5a0bb37f1 Make local functions and variables static. 2015-02-14 06:31:31 +00:00
tsutsui 51dae4bfea Don't use cnputc() directly in an application layer. 2015-02-14 06:16:29 +00:00
tsutsui 5b5099022c Misc KNF and cosmetics. 2015-02-14 05:58:02 +00:00
tsutsui bdeab44e3f Use proper signedness and exact-width interger types. 2015-02-14 05:03:09 +00:00