Commit Graph

254639 Commits

Author SHA1 Message Date
kre
f5deb3ba25 Improve quoting in xtrace (-x) output ... if a string ("word") to be
output includes a single quote (') then see if using double-quotes
to quote it is reasonable (if no chars that are magic in " also appear).
If so, and if the string is not entirely the ' character, then
use " quoting.  This avoids some ugly looking results (occasionally).

Also, fix a bug introduced about 20 months ago where null strings
in xtrace output are dropped, instead of made explicit ('').
To observe this, before you get the fix: set -x; echo ''   (or similar.)

Move a comment from the wrong place to the right place.
2017-11-16 19:41:02 +00:00
riastradh
bcaddc3bbc Use device_private, not cast, to get at softc.
Someone^TM should turn this wall of prose into a nice itemized list
to make it clearer.
2017-11-16 18:40:28 +00:00
christos
f4a905f0b8 When deleting orphans detect parent<->child loops and break them.
"active" is not a boolean, use the right comparison.
2017-11-16 17:08:07 +00:00
wiz
4d889baaa1 binutils-2.29.1 out. 2017-11-16 14:28:19 +00:00
skrll
3f391d52fc Match hppa JEMALLOC_TINY_MIN_2POW 2017-11-16 13:54:42 +00:00
skrll
f9ef5aa297 The HPPA architectures (1.1 and 2.0) both define quadruple-word (128-bit)
floating point types.  Adjust alignment to match.
2017-11-16 13:54:00 +00:00
ozaki-r
ccced0141e Bump kernel version for IFEF_MPSAFE
Welcome to 8.99.7
2017-11-16 10:40:29 +00:00
msaitoh
a799b2bceb Add test case of vlan(4)'s re-configure without destroy
(see also if_vlan.c rev. 1.104). Written by s-yamaguchi@iij.
2017-11-16 06:31:00 +00:00
ozaki-r
ab3cd725ea Unify IFEF_*_MPSAFE into IFEF_MPSAFE
There are already two flags for if_output and if_start, however, it seems such
MPSAFE flags are eventually needed for all if_XXX operations. Having discrete
flags for each operation is wasteful of if_extflags bits. So let's unify
the flags into one: IFEF_MPSAFE.

Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so
we can change them without breaking backward compatibility of the releases
(though the kernel version of -current should be bumped).

Note that if an interface have both MP-safe and non-MP-safe operations at a
time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe
opeartions take the kernel lock.

Proposed on tech-kern@ and tech-net@
2017-11-16 03:07:17 +00:00
sevan
76a2640021 Add missing words beginning with 'a' from FreeBSD's copy of src/share/dict/web2. 2017-11-16 01:24:42 +00:00
sevan
3c96f56c6a Add software
Realised missing word through David Cantrell & Andrew Fresh.
2017-11-16 00:10:31 +00:00
mrg
9d6d176649 merge mknative files from gcc.old back into gcc.
they're back to being the same again now.
2017-11-15 23:33:49 +00:00
christos
c0d12e4603 PR/52728: Izumi Tsutsui: "mount -u /dev/ /" triggers kernel panic
Simplify the control flow of the mount code and make sure that the
mountfrom argument can be converted to a block device in the update
case.
XXX: pullup-8
2017-11-15 21:21:18 +00:00
maxv
5b84bc5542 Small cleanup. 2017-11-15 20:45:16 +00:00
maxv
d38e65062b Mmh, should be <=. 2017-11-15 20:25:29 +00:00
maxv
d19e39ba16 Define MM_PROT_* locally. 2017-11-15 18:44:34 +00:00
maxv
26e9e80df3 Support large pages on KASLR kernels, in a way that does not reduce
randomness, but on the contrary that increases it.

The size of the kernel sub-blocks is changed to be 1MB. This produces a
kernel with sections that are always < 2MB in size, that can fit a large
page.

Each section is put in a 2MB physical chunk. In this chunk, there is a
padding of approximately 1MB. The prekern uses a random offset aligned to
sh_addralign, to shift the section in physical memory.

For example, physical memory layout created by the bootloader for .text.4
and .rodata.0:
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
 |+---------------+                  |+---------------+                  |
 ||    .text.4    |       PAD        ||   .rodata.0   |       PAD        |
 |+---------------+                  |+---------------+                  |
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
 PA                                  PA+2MB                         PA+4MB

Then, physical memory layout, after having been shifted by the prekern:
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
 | P +---------------+               |          +---------------+        |
 | A |    .text.4    |      PAD      |   PAD    |   .rodata.0   |   PAD  |
 | D +---------------+               |          +---------------+        |
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
 PA                                  PA+2MB                         PA+4MB

The kernel maps these 2MB physical chunks with 2MB large pages. Therefore,
randomness is enforced at both the virtual and physical levels, and the
resulting entropy is higher than that of our current implementaion until
now.

The padding around the section is filled by the prekern. Not to consume
too much memory, the sections that are smaller than PAGE_SIZE are mapped
with normal pages - because there is no point in optimizing them. In these
normal pages, the same shift is applied.

This change has two additional advantages: (a) the cache attacks based on
the TLB are mostly mitigated, because even if you are able to determine
that a given page-aligned range is mapped as executable you don't know
where exactly within that range the section actually begins, and (b) given
that we are slightly randomizing the physical layout we are making some
rare physical attacks more difficult to conduct.

NOTE: after this change you need to update GENERIC_KASLR / prekern /
bootloader.
2017-11-15 18:02:36 +00:00
tsutsui
13fd0b3a72 Put back /bin/cp and /sbin/sysctl to installation binaries.
- cp(1) is explicitly required by sysinst(8), cp_to_target() in
  src/usr.sbin/sysinst/target.c, to copy bootloader to targetroot
- sysctl(8) is required by src/distrib/atari/floppies/common/dot.profile
  to detect the root device (fd or md)

This might cause floppy overflow on HEAD again, but works on 8.0_BETA.

Should be pulled up to netbsd-8.
2017-11-15 16:37:00 +00:00
tsutsui
180bf5d3e0 Avoid use of expr(1).
It was removed from src/distrib/atari/floppies/install/list since rev 1.19
and the install script complains expr is not found.

Should be pulled up to netbsd-8.
2017-11-15 16:19:19 +00:00
jmcneill
2ebabce5c9 honour non-removable and broken-cd properties 2017-11-15 13:53:26 +00:00
knakahara
fb23bb2cff Add argument to encapsw->pr_input() instead of m_tag. 2017-11-15 10:42:41 +00:00
msaitoh
419a28baa0 s/Id/NetBSD/. Pointed out by wiz! 2017-11-15 10:13:11 +00:00
ozaki-r
2d0b7bd256 Convert SYN_CACHE_TIMER_ARM macro to static inline function (NFC) 2017-11-15 09:56:31 +00:00
ozaki-r
4bb813fca3 Make syn_cache_timer static 2017-11-15 09:55:22 +00:00
ozaki-r
e9798877ac Reduce return points (NFC) 2017-11-15 09:54:18 +00:00
kre
b86d4a7424 DEBUG mode only change. Add some tracing. NFC (without DEBUG). 2017-11-15 09:21:48 +00:00
kre
20c8eb69ec Sort options with long names that differ only by char case in
the same order that option flags with a similar property are sorted.
This corresponds with the change made to the sort order of the short
names made in the previous update (1.4).

Right now, this change makes no difference at all, as there are no
long option names that differ only in char case (yet.)
2017-11-15 09:21:19 +00:00
msaitoh
6fa7a33d6c Restore NetBSD RCS Id which was accidentally removed in rev. 1.2. 2017-11-15 09:13:26 +00:00
kre
e965a70935 Correct a typo: s/ at / an / 2017-11-15 08:50:07 +00:00
knakahara
ce15beb42d Mark callouts of pppoe(4) CALLOUT_MPSAFE. Suggested by ozaki-r@n.o. 2017-11-15 07:52:58 +00:00
mrg
0ace67202c ensure version.c gets rebuilt properly. 2017-11-15 07:47:10 +00:00
ozaki-r
01a838cc57 Mark callouts of bridge CALLOUT_MPSAFE 2017-11-15 06:17:40 +00:00
macallan
dfcdd5e31d create more /dev/pci* nodes, for PCIe systems 2017-11-15 04:31:48 +00:00
nat
96100f6b39 For the virtual stream it is required to insert silence. As these streams
are not harware streams audio_pint_silence is ineffective.

As audio_mix() was the only consumer of audio_pint_silence it has been
removed along with sc_sil_count - which was only used by this function.
2017-11-15 04:28:45 +00:00
ozaki-r
1f6e2ad19c Don't take KERNEL_LOCK in looutput if NET_MPSAFE
We can perhaps get rid of KERNEL_LOCK from looutput, but for now
keep it for safe.
2017-11-15 04:08:02 +00:00
nat
d6a97917e6 The harware vc is rounded to a power of two then round_blocksize is called.
This improves playback and makes it possibile to use mmapped audio on usb.
2017-11-15 02:13:33 +00:00
nat
cf588ee07b audio_pint improvements for when audio mixing is disabled.
When audio mixing is disabled there is only the hardware vc the mix ring
is not used.
2017-11-15 02:02:55 +00:00
nat
2f436ba4cf Improved audiostartp for when audio mixing is disabled. 2017-11-15 01:58:48 +00:00
nat
c5a8bbef5a Improved draining function for when the mixer is and is not enabled.
One block of silence is also played in audio drivers using start_output
when draining the hardware, this helps playback of short (less than
blocksize) samples.
2017-11-15 01:55:45 +00:00
nat
e99a9d9318 Plug memory leak as the mixer state does not grow or shrink when audio
mixing is disabled.  This avoids triggering a panic also.
2017-11-15 01:49:59 +00:00
nat
380d4173c3 Don't return EIO falsely when dealing with the hardware vc.
Draining of the hardware vc on close is now possible.
2017-11-15 01:45:57 +00:00
jmcneill
277e74edfd Build nand_toshiba.c 2017-11-15 00:48:42 +00:00
jmcneill
ae11699502 Wait for irq instead of polling for cmd completion. 2017-11-15 00:30:02 +00:00
riastradh
81f0ddf5e8 Fix up chfs_mountfs error branches. 2017-11-14 22:06:40 +00:00
martin
c2746c613f Bump PAGER_MAP_DEFAULT_SIZE to 512 MB (like amd64 recently did). 2017-11-14 16:56:03 +00:00
christos
51b157a357 - fix an assert; we can reach there if we are nowait or limitfail.
- when priming the pool and failing with ERESTART, don't decrement the number
  of pages; this avoids the issue of returning an ERESTART when we get to 0,
  and is more correct.
- simplify the pool_grow code, and don't wakeup things if we ENOMEM.
2017-11-14 15:02:06 +00:00
christos
de48dcba3d check results of pool_prime. 2017-11-14 14:29:33 +00:00
christos
a42bc43b7a check the result of pool_prime. 2017-11-14 14:27:54 +00:00
jmcneill
20c760647e Add "disk" dependency to flash to set device class to DV_DISK. 2017-11-14 14:15:29 +00:00
jmcneill
f69ff2189c Include "flash" in list of block devices that don't use partitions. 2017-11-14 14:14:29 +00:00