270352 Commits

Author SHA1 Message Date
rin
5b7b8d5a80 Stop passing a large const structure by value, in order to avoid
possible kernel stack overflow; const pointer is suffice here.

Pointed out by the lgtm bot and kamil.

OK ozaki-r

XXX
pullup to netbsd-9
2019-09-23 05:00:20 +00:00
kamil
7c33168b4c Add LSan and UBSan specific preprocessor macros
__SANITIZE_LEAK__ patch:
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01270.html

__SANITIZE_UNDEFINED__
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01286.html

GCC upstream does not see value in feature parity with LLVM sanitizers.
For the time being this will be a NetBSD specific extension.

__SANITIZE_LEAK__ is needed for __NO_LEAKS in <sys/cdefs.h>
__SANITIZE_UNDEFINED__ is planned to be reused in the kernel headers.
2019-09-22 23:34:13 +00:00
kamil
e756a4ef0c Handle LSan/LLVM and LSan/GCC in __NO_LEAKS
__has_feature(leak_sanitizer) was merged with Clang/LLVM today:
https://reviews.llvm.org/D67719

GCC specific ifdef __SANITIZE_LEAK__ is pending in upstream review...
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01270.html and can be
rejected as GCC upstream does not see value in feature parity with LLVM
sanitizers. For the time being this will be a NetBSD specific extension.
2019-09-22 23:23:12 +00:00
christos
479c44ac35 new files for statvfs90 2019-09-22 23:18:53 +00:00
kamil
4d8c3d0aa3 Make __CTASSERT static assert again
Today GCC/Clang allow to specify typedef char[] with the dynamic VLA
property (as introduced in C99). This means that __CTASSERT(), when
misused with run-time semantics, was a dummy check generating either
1 or -1 size of typedef char[].

It was caught in runtime by kUBSan as -1 is size of VLA with unspecified
semantics in runtime (Undefined Behavior).

Use bit-field to enforce compile-time constant.

This approach has been inspired by the Perl variation of static_assert().
2019-09-22 23:13:10 +00:00
christos
ff17893526 regen 2019-09-22 23:03:20 +00:00
christos
02cdd248ec Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=
2019-09-22 22:59:37 +00:00
sevan
1e625733bf Add support for blacklistd 2019-09-22 19:51:18 +00:00
sevan
4c89ad8172 Passive FTP works as a client without this and we're not hosting an FTP server (port are not listed in services_tcp) 2019-09-22 19:30:15 +00:00
brad
2e0a32871b Add USE_SHLIBDIR=yes to a number of Makefiles for the libraries used
by /sbin/{zfs,zpool,mount_zfs}.  The general effect is to move them
from /usr/lib to /lib.  Compatibility links are installed in /usr/lib
and nothing that is installed, say in /usr/pkg, appears to break.

With this, it is possible to have a /var and /usr mount using ZFS
legacy mounting early on in the boot process.

Run tested on amd64 and i386 and compile tested on evbarm.
2019-09-22 18:45:19 +00:00
jmcneill
bf4f3429d7 Use vcons for simplefb preattach to speed up early console messages. 2019-09-22 18:31:59 +00:00
ryo
3e73e3f429 8168H model didn't link up well. some models seems to require to enable TX/RX after configuration.
RTKQ_TXRXEN_LATER quirk flag added. it may be able to unify with RTKQ_RXDV_GATED flag?
2019-09-22 16:41:19 +00:00
jmcneill
0c707655af Disable translation table walks using TTBR0 while changing its value and
when deactivating a pmap. Fixes stability issues on Ampere eMAG CPUs.
2019-09-22 13:57:55 +00:00
gson
70cbf9d7a5 Don't mix tabs and spaces 2019-09-22 13:08:10 +00:00
mrg
3744368154 fix "show kernhist".
set addr = 0 if we don't have_addr and avoid using random garbage in addr.
2019-09-22 12:57:34 +00:00
maxv
7b2608b508 Fix KASAN on aarch64: the bus_space_* functions are macros, so we can't
redefine them. Introduce __HAVE_KASAN_INSTR_BUS, which indicates whether
to instrument the bus functions. Defined on amd64 only.
2019-09-22 10:35:12 +00:00
jmcneill
1213a62d02 Correct mcx comment, drop mii dependency 2019-09-22 09:54:56 +00:00
kamil
ed49394828 Reduce always true comparison in malo_cmd_set_txpower()
powerlevel is already checked for >=30 in the previous condition.

Found by the lgtm bot.
2019-09-22 09:03:07 +00:00
mrg
64c1acbba1 add mcx attachment. 2019-09-22 08:21:35 +00:00
dsainty
c5e7c3ca96 Purge an ancient email address, use dsainty@NetBSD.org instead 2019-09-22 07:42:28 +00:00
dsainty
8c74e515a9 Purge an ancient email address, use dsainty@NetBSD.org instead 2019-09-22 07:28:35 +00:00
rin
67dbeb20e1 Correct size of framebuffer; page offset appears only once,
not every color depths.

Pointed out by Araki Ken. Thanks!
2019-09-22 06:06:01 +00:00
rin
510c3d20f0 Spell out "Hitachi" correctly in comment.
No binary changes.
2019-09-22 05:49:16 +00:00
sevan
6a10ef685a pastos 2019-09-21 23:55:01 +00:00
sevan
34b316756b improve description 2019-09-21 21:10:56 +00:00
sevan
9a6d582b1c Add descriptions for all rules and make use of localnet variable in place of direct IP address 2019-09-21 20:41:52 +00:00
sevan
91b0bc2c1f default policy is to blockall 2019-09-21 20:35:52 +00:00
sevan
7fbde1b12f Drop the final keyword to use the default policy of last matching rule wins 2019-09-21 20:31:31 +00:00
sevan
8a69f51671 grammar 2019-09-21 19:48:15 +00:00
gson
a9987ef8b8 Look for up to 16 USB controllers, to match the number of device nodes
now created by MAKEDEV.
2019-09-21 16:22:25 +00:00
maya
fa96dd2114 Actually define BYTEORDER since it is used. 2019-09-21 15:56:09 +00:00
kre
f77bb6aeed Initialise the sometvs array of struct timeval that is to be used to
validate that utimes() cannot update the times of a file on a read only
filesystem.   The values are never actually used, but since
	src/sys/kern/vfs_syscalls.c 1.535
they are validated for sanity, and the syscall returns EINVAL if the
values passed are invalid (tv_usec <0 or >= 1000000).  If that happens
we don't get as far as the test which produces the EROFS that is expected
from this test (these tests - one for each filesystem type).

So, init the timeval structs (just to 0, the values will still not be
used) so that the EINVAL doesn't bite us before we're eaten by the EROFS
which is the way we're supposed to die.

If the syscall API args were labelled as "const" the compiler probably
would have caught the use of uninit'd vars and complained much sooner.
2019-09-21 14:25:42 +00:00
msaitoh
8862b5fa63 Regen. 2019-09-21 14:25:33 +00:00
msaitoh
5748d206d2 Add Killer E2400 and E2500. 2019-09-21 14:25:09 +00:00
jmcneill
ee39b92057 mcx(4): Added driver for Mellanox 5th generation ethernet. 2019-09-21 14:05:38 +00:00
jmcneill
a594e6948a Add support for Mellanox 5th generation ethernet devices. This driver
supports the ConnectX-4 Lx EN, ConnectX-4 EN, ConnectX-5 EN, and
ConnectX-6 EN adapters.

Driver ported from OpenBSD.
2019-09-21 14:04:12 +00:00
kre
68769e549a bus_addt_t is different widths on different archs, so there is no
one simple %?x format that will always work to print it.  Cast to
intmax_t and use %jx which should work everywhere.
2019-09-21 12:57:25 +00:00
sevan
b058b370e0 With bin/54124 fixed, the rule needs to be explicitly set to stateful. 2019-09-21 11:46:25 +00:00
msaitoh
a65bb42f06 Regen. 2019-09-21 11:24:35 +00:00
msaitoh
185988fe15 Modify Attansic Ethernet devices' description to clarify. 2019-09-21 11:23:56 +00:00
jmcneill
d2908378b5 Honour block device's IO alignment requirements.
Patch from Simon South <simon@simonsouth.net> in PR# 54554
2019-09-21 10:19:37 +00:00
sevan
0ed1b2a1a6 We use spaces, not tabs here 2019-09-21 09:23:11 +00:00
sevan
88d1988908 sort 2019-09-21 09:15:24 +00:00
sevan
eaa5be79ae Add 8.1 release 2019-09-21 09:13:10 +00:00
maxv
f97d527f9c Remove unused function prototype. Reported by the lgtm bot. 2019-09-21 07:31:56 +00:00
maxv
764de15a1e Add __printflike, and fix two incorrect fmts. Reported by the lgtm bot. 2019-09-21 07:08:27 +00:00
maxv
7a3aebe29c Fix netbsd32___mount50():
- zero out fs_args32 to prevent info leaks
 - remove unused and non-functional copyin in NFS (lgtm bot)
 - declare udata, and don't pass kernel pointers to copyout (lgtm bot)
 - make sure data_len is just big enough, to mimic the native behavior
 - don't forget to update *retval with the 32bit value
 - add an XXX for NFS
2019-09-21 06:56:51 +00:00
nat
40dc704098 Fix off by one in sbc encoder. Test mode transmission and reception
works again.

XXX pullup -8 and -9.
2019-09-21 00:01:33 +00:00
sevan
69d856e495 Use Pa macro for path
new sentence, new line
2019-09-20 22:47:36 +00:00
brad
5aa9b9d41e Add a copyright to the man page and a bit of history. 2019-09-20 22:38:28 +00:00