Commit Graph

281630 Commits

Author SHA1 Message Date
nia
bf7b939a1a tty: Negating INT_MIN will overflow int, bail out with EINVAL
Detected by UBSan

Reported-by: syzbot+92c0fca82b74a9798b78@syzkaller.appspotmail.com
2020-10-10 14:07:18 +00:00
christos
b65092432b Wait for the asynchronous dns resolver child to be done (and close the
socket descriptors) before returning. Otherwise we might get bind errors.
Reported by kim@, fixed by mlelstv@.
2020-10-10 13:41:14 +00:00
christos
df11da68ff merge 20200606: resolve conflict by adding kb2 and rin entries to putty 2020-10-10 12:57:39 +00:00
nia
f46a751696 xeyes should be AlwaysOnTop - requested by a user 2020-10-10 10:36:16 +00:00
nia
bf28d37d16 Bump up the dark contrast a bit 2020-10-10 10:33:37 +00:00
nia
6c12084399 Make it easier to identify the current active window (red border highlight) 2020-10-10 10:28:08 +00:00
jmcneill
ab8eeec969 Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node 2020-10-10 09:58:16 +00:00
nia
922a346a2e Switch to the same hack in pkgsrc for avoiding bitmap fonts on the web
Just for consistency's sake, and making it easier to disable this if
someone wants to do that.
2020-10-10 09:17:33 +00:00
nia
4f713b22cd hook up X11 "Spleen" fonts to the build 2020-10-10 08:33:29 +00:00
jdc
0ca8bdd1bd Don't change a videomode that's been setup in the firmware.
Extend the register debugging output (and hopefully make it easier to read).
2020-10-10 08:29:32 +00:00
jmcneill
29517913b7 Report half-precision FP and SIMD support 2020-10-10 08:27:41 +00:00
jmcneill
4a48ef14f2 Fix detection of NEON features. ID_AA64PFR0_EL1_ADV_SIMD_NONE means SIMD
is not available, and any other value means it is.
2020-10-10 08:24:10 +00:00
jmcneill
379d3d9797 Fix detection of FP and SIMD features on Armv8.2+. 2020-10-10 08:22:57 +00:00
nia
0d3c2dfaf5 Add Makefile for X11 Spleen fonts. Not integrated yet. 2020-10-10 07:28:04 +00:00
rin
9a73b3e67e Fix MKDEBUG=yes build for hppa. 2020-10-10 06:10:54 +00:00
nisimura
45d547c2e2 reorder functions for better relevance 2020-10-10 03:29:48 +00:00
thorpej
b6262570b7 Fix cycle counter-based time keeping on Alpha in MP environments by using
a simpler calibration algorithm for the CC timecounter.  Proposed in 2018
by Naruaki Etomi:

    https://mail-index.netbsd.org/tech-kern/2018/01/14/msg022940.html

This patch is largely based on the proposed change, but avoids changing
any other timecounter logic, and re-factors things a bit to keep them
as MI as possible.
2020-10-10 03:05:04 +00:00
rin
639af3ef4c Use correct note types for register storage in 32-bit core files for
architecture on which 64- and 32-bit ABIs use different values for
PT_GET{,FP}REGS, i.e., aarch64{,eb}.

Now, 32-bit GDB works fine for core files generated by aarch64{,eb}
kernel.

Should be no functional changes for ports other than aarch64{,eb}.
2020-10-10 00:10:06 +00:00
rin
94d6852a4a regen for getrandom(2) 2020-10-10 00:03:52 +00:00
rin
99d6145575 Teach about getrandom(2) to COMPAT_NETBSD32. 2020-10-10 00:00:54 +00:00
rin
16b640a67f Build GDB for aarch64eb; it works just fine as far as I can see. 2020-10-09 23:58:50 +00:00
rin
271d6b3e72 Adjust for aarch64eb; it needs elf32-aarch64.c. 2020-10-09 23:55:48 +00:00
rin
11eeaade86 mknative-gdb.old for aarch64eb 2020-10-09 23:54:12 +00:00
rin
6053aa6ca7 Correct target directory; src/external/gpl3/gdb.old not gdb. 2020-10-09 23:48:42 +00:00
rin
547879b380 Nowadays, mknative-gdb puts files into external/gpl3/gdb/lib,
instead of external/gpl3/gdb/bin/gdb.

Also, we need to nbmake-MACHINE in external/gpl3/gdb in order to
build dependent libraries correctly.
2020-10-09 23:44:46 +00:00
christos
de0b5fcaf5 Don't do extra work finding the power of 2 for values we are not going to
use. Explain that cpu_hatch has not been called yet, so no cpu_probe either
so the cache info is 0 for AP's.
2020-10-09 21:14:05 +00:00
uwe
58f328b472 Add italic correction to _Atomic-qualified. 2020-10-09 19:41:02 +00:00
christos
31f51cf979 new tzcode 2020-10-09 19:05:57 +00:00
christos
7328cbb47c Merge tzcode2020b (except we keep tzsetwall(3) for now for compatibility,
and we were "slim" already)

Support for zic's long-obsolete '-y YEARISTYPE' option has been
removed and, with it, so has support for the TYPE field in Rule
lines, which is now reserved for compatibility with earlier zic.
These features were previously deprecated in release 2015f.
(Thanks to Tim Parenti.)

zic now defaults to '-b slim' instead of to '-b fat'.

zic's new '-l -' and '-p -' options uninstall any existing
localtime and posixrules files, respectively.

The undocumented and ineffective tzsetwall function has been
removed.
2020-10-09 18:38:48 +00:00
martin
8f65adda90 When MD code requests a reserved area (at the start of the disk)
make sure to properly account for the "lost" space during all calculations
and especially when expanding the main partition to fill the disk.

Avoid using the global "pm" or a passed device descriptons when we are
passing disk limits explicitly anyway.

Simplify/fix a few rounding calculations.
2020-10-09 18:33:00 +00:00
mgorny
3a2c6ec6be Add tests for x87 FPU registers
Reviewed by kamil
2020-10-09 17:43:30 +00:00
mgorny
431834add9 Rename MM_REG macro to ST_MAN, and cover fpr/xstate with it
Rename the MM_REG macro to ST_MAN, to make it clearer that it gets
mantissa of ST registers which overlaps with MM registers but can be
also used to read ST registers (to be used in the next commit).  Extend
it to cover the difference between GETFPREGS and GETXSTATE,
and therefore avoid additional condition on i386.

Reviewed by kamil.
2020-10-09 17:43:07 +00:00
riastradh
a6e2e59435 Reword advice about when not to use membar_exit.
With help from skrll and pgoyette.

While here, change the example so it doesn't violate the advice just
given.  Still not a great example -- abusing UINT_MAX for a reference
count is kinda sketchy, but it'll serve for now.
2020-10-09 17:36:16 +00:00
macallan
252d2a5c18 build ppc_video.c etc. on hppa 2020-10-09 17:01:29 +00:00
nia
c32467e149 tty_43: Check a bitset from userspace is valid before shifting it
Passing a negative value to these legacy compat ioctls results in
left shift on a negative value which is undefined behaviour and results
in the tty (at least, possibly other things) locking up.

The argument to the ioctl should always be > 0. Return EINVAL otherwise.

While here, adjustments to code style to match current guidelines.

Found by UBSan.

Reported-by: syzbot+39cd551a05298b222756@syzkaller.appspotmail.com
2020-10-09 10:41:53 +00:00
nia
ad11505eeb tty: Avoid undefined behaviour (left shift of 1 by 31 places overflows int)
The valid sizes of the tty input and output queues (according to the man page)
are between 1024 and 65536 and input values are converted to a power of two.

The check on the validity of the range is done after the input values are
converted, however, which means that a hostile program can attempt to set
the queue size to a negative value, and cause integer overflow before
the range is validated.

Detected by UBSan

Reported-by: syzbot+521b73969fd233c49e58@syzkaller.appspotmail.com
2020-10-09 09:03:55 +00:00
kardel
75839df013 PR kern/55705:
don't attempt to sleep for negative time, we are late anyway - avoids DIAGNOSTIC panic
2020-10-09 08:18:01 +00:00
roy
db66d588fe carp: Remove media, software should use link status.
carp literally has no media just like ppp, vlan, etc.
2020-10-09 08:10:41 +00:00
rillig
245b875e3f make(1): add test for parsing the :? variable modifier 2020-10-09 07:03:20 +00:00
rillig
6fe1271163 make(1): use consistent order in .OODATE in test archive.mk 2020-10-09 06:44:42 +00:00
mrg
c4f3171f96 switch powerpc, sh3, vax and m68k to GCC 9. that's everyone.
thanks espcially to rin@ for testing and fixing issues.
2020-10-09 05:41:16 +00:00
macallan
b329d54d54 set list for hppa 2020-10-09 04:32:58 +00:00
macallan
06b5bd8add build some potentially useful drivers on hppa 2020-10-09 04:28:38 +00:00
macallan
7995230b1d build Xorg server on hppa 2020-10-09 04:19:43 +00:00
gutteridge
ed20d0c0a0 options.4: add a basic entry for the CNMAGIC option 2020-10-09 01:49:53 +00:00
tnn
f4e80fd638 rk3399_pcie: do reset timing according to PCI Express Base Specification
Don't do link training or configuration space accesses within the time
allowed by the standard for the downstream card to come out of reset
after deasserting PERST#.

This fixes detection issues seen with a dual port wm(4) NIC,
an ASMedia SATA card and also Pericom bridges (but they need more work
to be useful).
2020-10-08 22:14:00 +00:00
nisimura
8b9659189f add DM9000A register definitions 2020-10-08 21:00:25 +00:00
rillig
3c13422802 make(1): remove test misc.mk from Makefile 2020-10-08 19:11:35 +00:00
rillig
92250d426d make(1): move test for .CURDIR from misc.mk to varname-dot-curname.mk 2020-10-08 19:09:08 +00:00
rillig
aad4a70ef3 make(1): make individual targets in test archive.mk visible
This test still fails on FreeBSD, printing the "ar cru, ranlib" lines
twice, and I don't know why.

To get more insights into the inner details, without activating the full
-dA logging, split the output into paragraphs, one per target.

This change reveals another interesting detail: Dependencies without any
commands (in this case create-archive) don't inherit the commands from
.USEBEFORE and .USE sources.
2020-10-08 18:37:26 +00:00