Commit Graph

259553 Commits

Author SHA1 Message Date
jakllsch
b853854c44 add a kobj_error() to a recently added error case 2018-06-23 14:22:30 +00:00
kamil
49b4c5f864 Fix integer overflow in installboot(8)
Add a sanity check of the disk_buf first three bytes. The original code on
a disk with nul bytes was causing integer overflow and thus calling the
memcmp(3) functin in is_zero() with enormous length.

Verity that the 0th byte is JMP, 1th a signed byte >=9 to prevent overflow
and 2th byte NOP.

Add a comment explaining the check.

Detected with MKSANITIZER and ASan.
2018-06-23 14:15:57 +00:00
jakllsch
80a3fb5363 Add acpiecdt* at acpi?. 2018-06-23 14:14:42 +00:00
jdolecek
adfdc752f1 remove the xen XSAVE entry, needs more work before it can be enabled 2018-06-23 11:54:06 +00:00
jdolecek
5dfdf5bea8 fix intrctl_io_firstline() to properly return NULL if there are no records
to show
2018-06-23 11:11:00 +00:00
jdolecek
908b4d8725 re-do the XEN XSAVE support, this time to leave all probe code in
cpu_probe_fpu(), and have XEN cpu_init() just act

the xen probe is now guarded by XEN_USE_XSAVE option and XSAVE
support is thus still disabled by default (same as before), so it
wouldn't interfere with maxv's eager fpu rototil, while still
allowing testing for others

PR kern/50332
2018-06-23 10:30:22 +00:00
maxv
7f824e92ac Add XXX in fpuinit_mxcsr_mask. 2018-06-23 10:06:02 +00:00
maxv
921b2a6c45 Reorder the code a little. On Xen, return earlier, we don't need to do
the XSAVE-related initialization if we don't support XSAVE.
2018-06-23 10:02:39 +00:00
maxv
5f77c369ae Revert the rest of jdolecek's changes. This puts us back in a clean,
sensical state.
2018-06-23 09:51:34 +00:00
gson
4828bdca7d No semicolon after macro do ... while (0) wrapper. 2018-06-23 07:21:00 +00:00
maxv
6655fcaaf5 constify 2018-06-23 06:57:24 +00:00
maxv
a7dd46e24f constify 2018-06-23 06:40:43 +00:00
christos
d2ef544d72 Add some debugging in case someone else wants to debug gdb... 2018-06-23 03:32:48 +00:00
nat
fdbb1a553d Add all encoding supported by the mixer.
Addresses PR kern/52585.
2018-06-23 03:18:49 +00:00
christos
18b55cf995 Fix thread debugging. 2018-06-23 03:15:55 +00:00
jakllsch
884be20bcc locore.S is a MD_SFILES.
This keeps the dependency handling in the loop, so rebuilds after
changing options, say EARLYCONS, don't fail.
2018-06-23 01:51:03 +00:00
maya
4a24ae9634 Remove commented out MATH_EMULATE from kernel configs that got it
by copying an older i386 config.
2018-06-23 01:23:27 +00:00
jmcneill
2eda98bd15 Match generic arm,arm-v8 compatible string 2018-06-22 23:46:04 +00:00
christos
0461c2a5a3 Handle more Vortex CPU's from Andrius V.
While here refactor the code to make it smaller.
2018-06-22 23:00:54 +00:00
jdolecek
c8af0e8068 fix free() on unitialized value for list -c when there are no
assigned interrupts
2018-06-22 22:50:53 +00:00
christos
d91bf8b52c Explain the -Bstatic -Bdynamic dance. 2018-06-22 20:48:43 +00:00
christos
3306a1539a match our number of registers. 2018-06-22 19:41:40 +00:00
christos
60d5c279c7 use the right emulation 2018-06-22 19:41:16 +00:00
maya
c4e429fc54 Describe something for npf, npfd, blacklistd. 2018-06-22 19:35:25 +00:00
maya
288a6ec8cd Remove documentation references to rtsol. 2018-06-22 19:08:28 +00:00
roy
242d1b355d rtsol(8) and rtsold(8) have been long removed. 2018-06-22 18:23:59 +00:00
kre
b81009ce62 When processing character classes ([:xxx:] inside []), treat a class name
that is longer than we can handle the same way we treat an unknown
class name (as a valid char class which contains nothing, so never
matches).   Previously a "too long" class name invalidated the
class, so [:very-long-name:] would match any of  '[' ':' 'v'  ...
(note: "very-long-name" is not long enough to trigger this, but you
get the idea!)

However, the name itself has a restricted syntax ([[:***:]] is not a
character class, it is a match for one of a '[' ':' or '*', followed by
a ']') which we did not implement - check the syntax of the name before
treating it as a character class (but we do add '_' to alphanumerics
as legal class name characters).
2018-06-22 18:19:41 +00:00
christos
bb417bce75 - Fix groff reproducibility:
- specify mdoc and font paths
    - clear encoding
    - specify pagesize on the command line
XXX: pullup-8
2018-06-22 17:31:24 +00:00
christos
32fa9de216 Don't look in random (legacy) places for fonts. We want reproducible builds
to work.
XXX: pullup-8
2018-06-22 17:28:27 +00:00
kre
829cc62a58 When matching a char class ([[:name:]]) in a pattern (for filename
expansion, case patterrns, etc) do not force '[' to be a member of
every class.

Before this fix, try:
	case [ in [[:alpha:]]) echo Huh\?;; esac

XXX pullup-8    (Perhaps -7 as well, though that shell version has
much more relevant bugs than this one.)  This bug is not in -6 as
that has no charclass support.
2018-06-22 17:22:34 +00:00
martin
d12ff78ef9 iic_use_direct_match(): when iic_compatible_match() does not find a
comptible entry, set match quality to 0. Otherwise callers might use
random stack garbage.
2018-06-22 15:52:00 +00:00
martin
065c050ee0 Add a kernel panic when we matched but can not handle a string - better
die explicitly instead of crashing a few lines later with strange NULL
derefs.
2018-06-22 15:48:57 +00:00
maya
538feb9de7 Add comment describing why we remove -Wsystem-headers, requested by mrg. 2018-06-22 11:25:03 +00:00
kre
c7c0722af5 Deal with ref after free found by ASAN when a function redefines
itself, or some other function which is still active.
This was a long known bug (fixed ages ago in the FreeBSD sh) which
hadn't been fixed as in practice, the situation that causes the
problem simply doesn't arise .. ASAN found it in the sh dotcmd
tests which do have this odd "feature" in the way they are written
(but where it never caused a problem, as the tests are so simple
that no mem is ever allocated between when the old version of the
function was deleted, and when it finished executing, so its code
all remained intact, despite having been freed.)

The fix is taken from the FreeBSD sh.

XXX -- pullup-8 (after a while to ensure no other problems arise).
2018-06-22 11:04:55 +00:00
jmcneill
b75b1688db If max-frequency is not specified, use UINT_MAX instead of the rate programmed by the bootloader. 2018-06-22 10:17:04 +00:00
msaitoh
5ce7e79588 Remove bpf_tap() in iexmit() because ie_start() does bpf_mtap(). 2018-06-22 09:31:04 +00:00
msaitoh
25f7f99ace Remove bpf_tap() call in rx. It's done in if_percpuq_softint(). 2018-06-22 09:13:59 +00:00
pgoyette
a7ff55f8a7 Call config_cfattach_attach() regardless of whether the module is
being built as part of a kernel or as a external module.

Addresses kern/53389 - thanks for the report!

XXX pullup-8
2018-06-22 09:06:04 +00:00
maxv
07e5cef047 Revert jdolecek's changes related to FXSAVE. They just didn't make any
sense and were trying to hide a real bug, which is, that there is for some
reason a wrong stack alignment that causes FXSAVE to fault in
fpuinit_mxcsr_mask. As seen in current-users@ yesterday, rdi % 16 = 8. And
as seen several months ago, as well.

The rest of the changes in XSAVE are wrong too, but I'll let him fix these
ones.
2018-06-22 06:22:37 +00:00
msaitoh
ccd25bfeaa Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.
2018-06-22 04:41:57 +00:00
msaitoh
4b508fb16e It's not required to include net/bpfdesc.h. Remove it. 2018-06-22 04:17:40 +00:00
darcy
c63a40a9f5 PR port-xen/50446
With approval from bouyer@ and acceptance, sometimes grudgingly, from
others I have removed the AGP lines from the XEN3_DOM0 config.  I have
left a note in the PR suggesting that if it ever gets a proper fix that
those lines can be considered for re-inclusion.
2018-06-22 02:51:17 +00:00
maya
3472b5d3e2 Amend MIPS, there are multiple stages in a pipeline. 2018-06-21 23:05:44 +00:00
kamil
c623d35930 Fix invalid free(3) in sysinst(8)
The path variable is assigned with an allocation on the heap with
strdup(3). Later this pointer is changed with strsep(3) and this caused
invalid free(3).

Store the original pointer in a new helper variable opath and pass it to
free(3). With this change, the problem is going away.

Detected with MKSANITIZER=yes with AddressSanitizer.
2018-06-21 23:05:28 +00:00
sevan
89a50f5c3e Add AFP, AMD, ASA, BSDP, DEC, IPL, MDMX, MIPS, PIX, PRU (found on the BeagleBone
Black), XHR.
2018-06-21 22:56:42 +00:00
jdolecek
cae63d69bc split the port status reporting to new function sata_interpret_det()
so it can be called separately from sata_reset_interface()

do not treat PHY offline as an error, it's pretty normal when there
is no device actually connected

debugging aid for PR kern/52372
2018-06-21 21:52:15 +00:00
maxv
1f639d0627 remove unused arguments 2018-06-21 17:03:45 +00:00
maxv
0a9aff6f39 Fix use-after-free, m_cat can free m. 2018-06-21 16:53:10 +00:00
jakllsch
da60b60360 destroy 'sc_sync_wait' condvar and mutex upon detach 2018-06-21 16:47:06 +00:00
roy
7186703355 Note import of dhcpcd-7.0.6 2018-06-21 12:02:15 +00:00