Commit Graph

297949 Commits

Author SHA1 Message Date
riastradh 5e84044ef5 bpf(4): Reject bogus timeout values before arithmetic overflows.
Reported-by: syzbot+fbd86bdf579944b64a98@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=60d46fd4863952897cbf67c6b1bcc8b20ec7bde6

XXX pullup-8
XXX pullup-9
2022-09-03 10:03:20 +00:00
mlelstv 770e369e23 netisr.c is gone. 2022-09-03 09:41:24 +00:00
rillig b1f6d83a36 make: untangle output handling in jobs mode, remove redundant braces
No functional change.
2022-09-03 08:41:07 +00:00
rillig 194dde8c55 make: fix handling of null bytes in the output in jobs mode
The test job-output-null failed occasionally, depending on the exact
timing of the child's write and make's read.
2022-09-03 08:03:27 +00:00
tsutsui e371117863 Make build with WARNS=5. 2022-09-03 07:45:08 +00:00
rin 177d48051f Localize addr and buf. NFC. 2022-09-03 04:54:47 +00:00
rin 468acab616 Fix weird logic. NFC.
Set both type and size to double by default, and change both to
single if required.
2022-09-03 04:54:08 +00:00
rin a289f3249f Do not use ``cond'' for two purposes: flag and bit field.
For the latter, use ``bits'' instead. Switch ``cond'' to int.
NFC.
2022-09-03 04:52:50 +00:00
rillig eaa6b09061 tests/make: remove nonexistent file from file list
The file had been added accidentally, it never existed in distdir.
2022-09-03 03:33:37 +00:00
thorpej 11582e82aa Remove <net/netisr.h> 2022-09-03 03:11:56 +00:00
thorpej 97fd514741 Garbage-collect everything related to struct domain::dom_ifqueues
(except dom_ifqueues itself, until the next kernel version bump).
It's no longer used now that nothing uses the legacy netisr mechanism.
2022-09-03 02:53:18 +00:00
thorpej 6ffff4f242 Garbage-collect the remaining vestiges of netisr. 2022-09-03 02:47:59 +00:00
thorpej dd8687cce0 Convert MPLS from a legacy netisr to pktqueue. 2022-09-03 02:24:59 +00:00
thorpej ca257ba439 Convert CAN from a legacy netisr to pktqueue. 2022-09-03 02:07:32 +00:00
thorpej 6bd159b890 Convert NETATALK from a legacy netisr to pktqueue. 2022-09-03 01:48:22 +00:00
thorpej 63ae4dd2e0 Convert ARP from a legacy netisr to pktqueue. 2022-09-03 01:35:03 +00:00
rillig 863fcc7b0b make: clean up handling of .break in .for loops
Move For_Break further up, as the functions in that file are sorted from
small to big.  The cast from size_t to unsigned int is required by lint.

In parse.c, move the code into a separate function to keep
ParseDirective small.  Its only job is to parse the directive and then
delegate to another function doing the actual work.

In the manual page, remove empty lines.

In the test, ensure that .break stops processing of the .for loop
immediately; anything after the .break is not processed anymore.
Replace ':=' with '=', as there is no need to evaluate '$i' early.
Check the expected value in the .mk file instead of the .exp file, to
keep the reading scope as small as possible.
2022-09-03 00:50:07 +00:00
thorpej 8310d9409c Only use configured RPS hash functions for IPv4 and IPv6 packets.
This is NFC change now because only IPv4 and IPv6 use pktqueue,
but that will change in future commits.
2022-09-03 00:31:02 +00:00
thorpej eca1c11589 Remove unnecessary inclusion of <net/netisr.h>. 2022-09-02 23:48:10 +00:00
sjg cb2c55cb6a Enable make/unit-tests/directive-for-break
Also ensure MAKE_VERSION is ignored.
2022-09-02 18:54:25 +00:00
sjg 5cc8492191 make: add .break to terminate .for loop early
When .break is encountered within a .for loop
it causes immediate termination.

Outside of a .for loop .break causes a parse error.

Reviewed by: christos
2022-09-02 16:24:31 +00:00
rin cc4d57285f fpu_implode(): Clear lower word for float just for sure. 2022-09-02 12:48:04 +00:00
rin bd50f5405d Fix fres and frsqrte.
- Pass correct fp to succeeding fpu_implode().
- fres calculates 1 / frB; not 1 / sqrt(frB).
2022-09-02 12:47:10 +00:00
rin e41cdfd480 Make fpu_explode() and fpu_implode() take uint64_t and uint64_t *,
instead of register number, respectively. NFC.
2022-09-02 12:40:49 +00:00
rin beee0953c3 Use hi and lo for higher and lower words, instead of i and j.
No binary changes.
2022-09-02 12:30:48 +00:00
rin fa8ab9b379 fpu_subr.c: Convert #ifdef DIAGNOSTIC panic() --> KASSERT{,MSG}(). 2022-09-02 12:29:58 +00:00
rin dbd91bbfef Fix off-by-one error in exponent when round a double to the
largest normalized value; QNaN was wrongly generated here.
2022-09-02 12:24:54 +00:00
rin f7b84308e1 Make fpu_ftod() return uint64_t value. NFC. 2022-09-02 12:22:49 +00:00
riastradh 37d4d19175 dtrace_fbt: Allow tracing names that start with `__'.
This was never relevant on FreeBSD and I don't think it is relevant on
NetBSD either.  The FreeBSD change to lift this restriction had the
following comment:

    r306570 | markj | 2016-10-02 00:35:00 +0000 (Sun, 02 Oct 2016) | 7 lines

    Allow tracing of functions prefixed by "__".

    This restriction was inherited from upstream but is not relevant on FreeBSD.
    Furthermore, it hindered the tracing of locking primitive subroutines.
2022-09-02 11:03:50 +00:00
skrll a2aebd3ed8 Whitespace - mostly align the line continutation characters 2022-09-02 06:51:24 +00:00
msaitoh 0785ab37b7 KNF. No functional change. 2022-09-02 06:25:43 +00:00
nakayama e8f73aaeb4 Fix "error: cast from pointer to integer of different size" on
sparc build.
2022-09-02 06:01:38 +00:00
thorpej 45288633c8 Re-factor how pktq_barrier() is issued by if_detach().
Rather than excplicitly referencing ip_pktq and ip6_pktq in if_detach(),
instead add all pktqueues to a global list.  This list is then used in
the new pktq_ifdetach() function to issue a barrier on all pktqueues.

Note that the performance of this list is not critical; it will seldom
be accessed (then pktqueues are created/destroyed and when network
interfaces are detached), and so a simple synchronization strategy using
a rwlock is sufficient.
2022-09-02 05:50:36 +00:00
kre 70a8fd8df8 Fix the syntax of the non _LP64 code fragment to match that in the
_LP64 fragment, so hopefully 32 bit ports with XEN (i386) will
build again.
2022-09-02 05:09:49 +00:00
thorpej 60fe01447e f_detach(): Drain the protocol input queues before the pr_purgeif()
calls; pktq_barrier() doesn't remove packets from the queue, it waits
for the packets enqueued before the barrier to drain.  This, in turn,
may cause the protocols to gain additional references to the interface
that's detaching.  By draining the queues first, we ensure that no
additional references will be taken after calling pr_purgeif().
2022-09-02 04:34:58 +00:00
thorpej 0c0a3f29e3 pktqueue: Re-factor sysctl handling.
Provide a new pktq_sysctl_setup() function that attaches standard
pktq sysctl nodes below a specified parent node, with either a
fixed node ID or CTL_CREATE to dynamically assign node IDs.  Make
all of the sysctl handlers private to pktqueue.c, and remove the
INET- and INET6-specific pktqueue sysctl code from net/if.c.
2022-09-02 03:50:00 +00:00
gutteridge 42d743eb34 ktrace.1: correct historical reference and minor grammar tweak 2022-09-02 03:43:53 +00:00
gutteridge 8b5211b80a kdump.1: use past tense for history 2022-09-02 03:39:29 +00:00
riastradh 2bea1ff88c cprng_fast(9): Assert not in pserialize read section.
This may sleep to take the global entropy lock in case it needs to be
reseeded.  If that happens we can't be in a pserialize read section.
2022-09-01 18:32:25 +00:00
riastradh 7295f80b8b nd6: Take ifnet psref around cprng_fast in nd6_slowtimo.
This may sleep on an adpative mutex, the global entropy lock, so
pserialize is forbidden.
2022-09-01 18:32:17 +00:00
riastradh 5cfdc56642 xhci(4): Make sure to destroy sc_rhlock on detach. 2022-09-01 18:09:45 +00:00
riastradh 6ca9ac72e4 drmfb: Rework console detection and takeover.
While here, simplify logic by removing an unreachable error branch so
we never have to contemplate unwinding claiming of the console.
2022-09-01 17:54:47 +00:00
bouyer 7b782151dd Call extent_alloc_subregion() with EX_MALLOCOK; under heavy I/O load we need
lots of them and the preallocatted extent descriptors are not enough.
2022-09-01 16:28:08 +00:00
bouyer bad2ac4874 process_msg() is called from thread context, so malloc() can wait for
memory. Should avoids occasional ENOMEM reading messages
2022-09-01 16:25:18 +00:00
bouyer 4c8adaa46e in backend drivers, use xen_shm_(un)map for the rings instead of inline,
mostly duplicate code.
2022-09-01 15:33:23 +00:00
bouyer aaff4d1b29 Redo previous; kill the right printf() 2022-09-01 15:32:16 +00:00
bouyer 921c7ef390 xen: Add experimental support for PVH dom0. 2022-09-01 12:36:14 +00:00
bouyer f8166b1646 Add commented out experimental PVH dom0 options and pseudo-device 2022-09-01 12:35:02 +00:00
bouyer 4afc9f0078 Remove a noisy printf; HVM guests triggers it (a lot) and it seems to be
expected.
2022-09-01 12:31:26 +00:00
bouyer 5dac1986e8 Add PVH support for backend drivers grant operation.
Now a domU in a PVH dom0 boots multiuser.
2022-09-01 12:29:00 +00:00