Commit Graph

258218 Commits

Author SHA1 Message Date
riastradh 7bc66ed4ff Add -f option to ftpd to stay in foreground with -D.
From nia in PR bin/53221.
2018-04-28 13:38:00 +00:00
maxv 2489795f85 Remove unused ipsec_var.h includes. 2018-04-28 13:26:57 +00:00
maxv 2f2fea5f0e Remove unused macros. 2018-04-28 13:23:17 +00:00
jmcneill 3117ca5607 Create bpf and openfirm devices 2018-04-28 12:45:03 +00:00
jmcneill 6320cfdbae Define __HAVE_OLD_DISKLABEL for compatibility with the arm32 port. 2018-04-28 12:33:17 +00:00
nonaka d54c6989c4 gmake: Apply patch to support GLIBC glob interface v2
http://git.savannah.gnu.org/cgit/make.git/commit/?id=48c8a116

Fix a build failure on Ubuntu 18.04.
2018-04-28 12:20:40 +00:00
jmcneill 7ee63b91ad Add support for Pinebook lid switch and eMMC 2018-04-28 11:49:48 +00:00
jmcneill 75dc1f1c7e Add support for lid switch event codes. 2018-04-28 11:49:06 +00:00
jmcneill 11e00a763e Increase default MSGBUFSIZE to match arm32 defaults 2018-04-28 10:53:02 +00:00
maxv 70fbd42a2e Rename the 'flags' and 'nowait' arguments to 'how'. The other BSDs did the
same. Also, in m_defrag, rename 'mold' to 'm'.
2018-04-28 08:34:45 +00:00
maxv 7155a9b4d8 Modify m_defrag, so that it never frees the first mbuf of the chain. While
here use the given 'flags' argument, and not M_DONTWAIT.

We have a problem with several drivers: they poll an mbuf chain from their
queues and call m_defrag on them, but m_defrag could update the mbuf
pointer, so the mbuf in the queue is no longer valid. It is not easy to
fix each driver, because doing pop+push will reorder the queue, and we
don't really want that to happen.

This problem was independently spotted by me, Kengo, Masanobu, and other
people too it seems (perhaps PR/53218).

Now m_defrag leaves the first mbuf in place, and compresses the chain
only starting from the second mbuf in the chain.

It is important not to compress the first mbuf with hacks, because the
storage of this first mbuf may be shared with other mbufs.
2018-04-28 08:16:15 +00:00
mlelstv ac6073da9a regen 2018-04-28 05:12:54 +00:00
mlelstv ba623ebf71 Add Symbios/LSI RAID and SAS controllers. 2018-04-28 05:11:49 +00:00
kamil 5abe8ef7df Refactor the traceme2 ATF ptrace(2) tests
Replace traceme2 with 3 tests:
 - traceme_sighandler_catch1
 - traceme_sighandler_catch2
 - traceme_sighandler_catch3

These tests are verified with PT_TRACE_ME for: SIGHUP, SIGCONT and SIGABRT.

We don't want tests all signals (this is a domain for a fuzzer), but we want
to cover tests with signals from different groups.

All tests pass.

Sponsored by <The NetBSD Foundation>
2018-04-28 00:14:37 +00:00
kamil 0165d5af91 Refactor the traceme1 and traceme4 ATF ptrace(2) tests
Use common bode for these tests and a macro 1-liner to define a new test.

Test the same scenarios for 5 signals:
 - SIGKILL (temporarily disabled)
 - SIGSTOP
 - SIGABRT
 - SIGHUP
 - SIGCONT

These tests call: raise(sig). It's actually important to assert their
behavior for tests that are from different kinds.

The SIGKILL test is work in progress. It can be caught by a debugger on the
FreeBSD kernel, but it's causing a signaled event in a debugger on Linux.

NetBSD is right now in one of the camps, but research whether this is a bug
or feature is in progress.

Sponsored by <The NetBSD Foundation>
2018-04-27 21:36:45 +00:00
maxv 10ed9cc7a2 Remove unused debug code. 2018-04-27 19:06:48 +00:00
maxv 0f993de4ce Remove reference to m_ext.ext_type (doesn't exist). 2018-04-27 18:40:40 +00:00
christos 860a01d976 Canonicalize the interpreter path in #! scripts since check_exec() expects
an absolute path, and we KASSERT if that's not the case later.
2018-04-27 18:33:24 +00:00
kamil 8f414e6476 Correct XXX comment in the ptrace(2) kernel code
Explain I and D read/write operations and its history, removing dummy XXX
comments.

Sponsored by <The NetBSD Foundation>
2018-04-27 16:50:56 +00:00
maxv 4d2bf052af Remove unused ext_flags field in struct _m_ext_storage.
Also, simplify MEXTMALLOC, mbtypes[] doesn't exist anymore, but the code
still compiled correctly because "malloc" is a macro and the argument
was dropped.
2018-04-27 16:32:03 +00:00
maxv bdebf53f25 Stop passing the pool as argument of the storage. M_EXT_CLUSTER mbufs
are supposed to take their area from mcl_cache only.
2018-04-27 16:18:40 +00:00
christos 213d895173 use the proper station nodeid read command. 2018-04-27 12:04:23 +00:00
knakahara b0c61d654b Fix LOCKDEBUG kernel panic when many(about 200) tunnel interfaces is created.
The tunnel interfaces are gif(4), l2tp(4), and ipsecif(4). They use mutex
itself in percpu area. When percpu_cpu_enlarge() run, the address of the
mutex in percpu area becomes different from the address which lockdebug
saved. That can cause "already initialized" false detection.
2018-04-27 09:55:27 +00:00
wiz d4593e87a1 Fix xrefs. 2018-04-27 09:33:43 +00:00
wiz e54c25f543 New sentence, new line. 2018-04-27 09:33:09 +00:00
maxv b615efb12f Remove _MCLGET, merge its content into m_clget(). The code is slightly
modified to reduce the indentation level.
2018-04-27 09:22:28 +00:00
ryo 5b5022b696 remove suspicious compare, and cleanup complex conditionals.
pointed out PR/53159 by dcb314, thanks.
2018-04-27 09:05:26 +00:00
maxv 354fb9ed32 Fix a bug introduced in rev1.154 (2009). mcl_cache still has a size of
MCLBYTES, so the area allocated is still too small.

I think it should have been MEXTMALLOC, and of course I can't test my
change.
2018-04-27 09:02:16 +00:00
maxv 4070f54bcc M_CLUSTER -> M_EXT_CLUSTER, and remove M_CLUSTER completely. 2018-04-27 08:51:26 +00:00
maxv f5b99fb7f5 Reorder, to group related functions. 2018-04-27 08:23:18 +00:00
ryo 5c64b812f4 fix instability behavior of bufcache on aarch64.
* fix to return correct ref/mod when PMAP_WIRED.
* changed to keep wired flags in pte instead of pv_entry, and cleanup.
2018-04-27 08:07:08 +00:00
maxv f8f3c934e0 M_CLUSTER -> M_EXT_CLUSTER 2018-04-27 07:53:07 +00:00
maxv 6bcbbb2d9d Rename m_reclaim -> mb_drain, and localify. 2018-04-27 07:41:58 +00:00
maxv ca2e857672 Implement M_COPY_PKTHDR as a function, like m_move_pkthdr. 2018-04-27 07:20:33 +00:00
maxv 3f23c9efec Move m_align and m_append into iee80211_netbsd.c. They are part of
net80211, and shouldn't be used outside.
2018-04-27 06:56:21 +00:00
ragge 31c431270b Remove the old unneccessary cksum files. 2018-04-27 06:36:32 +00:00
maxv b68c1786cf Simplify m_copydata, use unsigned int, and change its last argument to
match that of the man page.
2018-04-27 06:36:16 +00:00
maxv 4814d4311b Style and simplify. 2018-04-27 06:27:36 +00:00
ryo 06fef18adc define __HAVE_ATOMIC64_OPS
pointed out by nonaka@, thanks
2018-04-27 06:23:34 +00:00
maxv 85bdc711fa Panic in m_copypacket if no header is present, that's a requirement. 2018-04-27 06:15:49 +00:00
maxv 04ce492590 Improve the documentation of m_copypacket(), to say explicitly that a
header must be present, contrary to m_copym().

While here fix a variable name (from yesterday).
2018-04-27 06:06:43 +00:00
knakahara f6621122fb Fix "how" argument of MGET(). Pointed out by maxv@n.o, thanks.
MGET() does not have M_ZERO flag, so add memset when it is required.
2018-04-27 00:06:40 +00:00
maxv 2679f01cd0 Hum. This should be M_READONLY, not M_ROMAP.
M_ROMAP tells us whether the mbuf storage is mapped on a read-only page.
But an mbuf can still be read-only in the sense that the storage is
shared with other mbufs.
2018-04-26 20:10:44 +00:00
maxv ecb801f971 m_copy -> m_copym 2018-04-26 19:56:55 +00:00
maxv eee3723d53 Stop using m_copy(), use m_copym() directly. m_copy is useless,
undocumented and confusing.
2018-04-26 19:50:09 +00:00
maxv 02dd989063 Fix inverted arguments in m_gethdr(). 2018-04-26 19:33:02 +00:00
maxv 3c78537229 Fix inverted arguments in MGET(). 2018-04-26 19:27:04 +00:00
maxv de9cefcf44 Remove unused mbuf argument from sbsavetimestamp. 2018-04-26 19:22:17 +00:00
maxv a3e322b567 Change MCLGET, so that it calls m_clget instead of doing the work in a
macro. Macros are inefficient when they contain too many instructions and
are used too often, because of cache coherency (and also register use).

This change saves 32KB of kernel .text.
2018-04-26 19:13:34 +00:00
alnsn 8fa5a65e9e Add SVS. It may not be disabled at securelevel 1 and above. 2018-04-26 18:56:18 +00:00