summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_pool.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-03-28add pid for Dell DW5821e and HUAWEI ME906s LTE, ok patrick@sthen1-1/+3
2021-03-27Make sure that all CPUs end up with the same bits set in SCTLR_EL1.kettenis2-27/+28
Do this by clearing all the bits marked RES0 and set all the bits marked RES1 for the ARMv8.0. Any optional features introduced in later revisions of the architecture (such as PAN) will be enabled after SCTLR_EL1 is initialized. ok patrick@
2021-03-27Add ARMv8.5 instruction set related CPU features.kettenis2-4/+184
ok patrick@
2021-03-27Send arguments in alphabetical orderjob3-9/+9
OK tb@
2021-03-27Enable test-sig-algs-renegotiation-resumption.py.tb1-5/+6
This test covers various scenarios with renegotiation and session resumption. In particular it crashes the OpenSSL 1.1.1j server due to the sigalg NULL deref fixed this week. We need --sig-algs-drop-ok since we do not currently implement signature_algorithms_cert.
2021-03-27If we want to configure default routes over multiple interfaces weflorian1-4/+19
need to provide the address of the interface behind which the default router is in case they are on the same subnet otherwise the kernel can't figure out which route we are talking about This happens for example when your wifi and wired networks are bridged. Pointed out by claudio some time ago.
2021-03-27Garbage collect s->internal->typetb6-18/+9
This variable is used in the legacy stack to decide whether we are a server or a client. That's what s->server is for... The new TLSv1.3 stack failed to set s->internal->type, which resulted in hilarious mishandling of previous_{client,server}_finished. Indeed, both client and server would first store the client's verify_data in previous_server_finished and later overwrite it with the server's verify_data. Consequently, renegotiation has been completely broken for more than a year. In fact, server side renegotiation was broken during the 6.5 release cycle. Clearly, no-one uses this. This commit fixes client side renegotiation and restores the previous behavior of SSL_get_client_CA_list(). Server side renegotiation will be fixed in a later commit. ok jsing
2021-03-27Fix SDMMC_DEBUG buildkn2-8/+8
- Replace undefined SDMMCDEVNAME macro with usual DEVNAME from sdmmcvar.h - typofix struct member name
2021-03-27Handle dynamic definition of SIGSTKSZ as of glibc 2.34 on Linux.bcook1-7/+24
ok bluhm@, inoguchi@, tb@, deraadt@
2021-03-27The ospf6d manpage states that the daemon laks support for multi arearemi1-7/+2
configurations. Fix the example config to only use one area instead of two. Issue brought up and OK danj@ claudio@ doesn't mind
2021-03-27trim the FCS off Ethernet packets before sending them up the stack.dlg1-1/+8
Jurjen Oskam on tech@ found that ure in a veb caused these extra fcs bytes to be transmitted by other veb members. the extra bytes aren't a problem usually because our network stack ignores them if they're present, eg, the ip stack reads an ip packet length and trims bytes in an mbuf if there's more. bridge(4) masked this problem because it always parses IP packets going over the bridge and trims them like the IP stack before pushing them out another port. veb(4) generally just moves packets around based on the Ethernet header, by default it doesn't look too deeply into packets, which is why this issue popped out. it is more correct for ure to just not pass the fcs bytes up. ok jmatthew@ kevlo@
2021-03-26Return EOPNOTSUPP for unsupported ioctlskn1-16/+6
Match what apm(4/macppc) says and make apmd(8) log an approiate warning when unsupported power actions are requested. Merge identical cases while here. This syncs with the apm ioctl handlers on loongson and arm64.
2021-03-26Fix "mach dtb" return code to avoid bogus bootkn1-6/+8
Bootloader command functions must return zero in case of failure, returning 1 tells the bootloader to boot the currently set kernel iamge. "machine dtb" is is the wrong way around so using it triggers a boot. Fix this and print a brief usage (like other commands such as "hexdump" do) while here. Feedback OK patrick
2021-03-26Fix errno, merge ioctl caseskn1-13/+5
The EBADF error is always overwritten for the standby, suspend and hibernate ioctls, only the mode ioctl has it right. Merge the now identical casese while here. OK patrick
2021-03-26Flag sensors as invalid on bogus readskn1-3/+7
Follow-up to the previous commit: This driver continues to report stale hw.sensors values when reading them fails, which can easily be observed on a Pinebook Pro after plugging in the AC cable, causing the hw.sensors.cwfg0.raw0 (battery remaining minutes) value to jump considerably one or two times before stalling and becoming incoherent with the rest. Flag sensors invalid upfront in apm's fashion and mark them OK iff they yield valid values; this is what other drivers such as rktemp(4) do, but the consequence/intention of SENSOR_FINVALID is sysctl(8) and systat(8) skipping such sensors (until AC gets plugged off again). OK patrick
2021-03-26Push kernel lock within rtable_add(9) and rework it to return 0 in themvs3-16/+16
case when requested table is already exists. Except initialization time, route_output() and if_createrdomain() are the only paths where we call rtable_add(9). We check requested table existence by rtable_exists(9) and it's not the error condition if the table exists. Otherwise we are trying to create requested table by rtable_add(9). Those paths are kernel locked so concurrent thread can't create requested table just after rtable_exists(9) check. Also rtable_add(9) has internal rtable_exists(9) check and in this case the table existence assumed as EEXIST error. This error path is never reached. We are going to unlock PF_ROUTE sockets. This means route_output() will not be serialized with if_createrdomain() and concurrent thread could create requested table. Table existence check and creation should be serialized and it makes sense to do this within rtable_add(9). This time kernel lock is used for this so it pushed down to rtable_add(9). The internal rtable_exists(9) check was modified and table existence is not error now. Since the external rtable_exists(9) check is useless it was removed from if_createrdomain(). It still exists in route_output() path because the logic is more complicated here. ok mpi@
2021-03-26Push kernel lock down to rt_setsource() to make `ifa' dereference safe.mvs1-3/+10
Netlock doesn't make sense here because ifa_ifwithaddr() holds kernel lock while performs lists walkthrough. This was made to decrease the future diff for PF_ROUTE sockets unlocking. This time kernel lock is still held while we perform rt_setsource(). ok mpi@
2021-03-26Add test-sig-algs-renegotiation-resumption.pytb1-1/+5
This test currently fails but may soon be fixed.
2021-03-26Initialize error variable in dtread().bluhm1-2/+2
OK mpi@
2021-03-26Only install route with label, fix route leak on destroykn3-3/+15
ifconfig mp* mplslabel N" validates the label both in ifconfig(8) and each driver's ioctl handler, but there is one case where all drivers install a route without looking at the label at all. SIOCSLIFPHYRTABLE in all three drivers just validates the rdomain and sets the label to itself (0) such that the route is (re)installed accordingly. None of the driver's helper functions dealing with labels and routes validate labels themselves but instead expect the callees, e.g. the ioctl handler to do so. That means we can install routes for the explicit NULL label in non-default routing tables but are never able to clean them up without reboot. Fix this by adding the inverse of mp*_clone_destroy()'s label check to the routines installing the MPLS route to avoid bogus ones in the first place. OK claudio
2021-03-26inspect all the packets to see if they are dhcp, not just the first onederaadt1-3/+2
in a ring bundle. ok florian
2021-03-26Simplify argument parsing of vmctl stoptb1-15/+10
The previous argument parsing logic had at least three bugs: a copy-paste error led to an off-by-one and a printf "%s" NULL, as reported by Preben Guldberg. A previous commit led to a dead else branch and a use of uninitialized. This can all be avoided by reworking the logic so as to be readable. Prompted by a diff from Preben ok dv
2021-03-26Compare filepath with strcmp() and not strcasecmp(). The URI in RPKI areclaudio1-2/+2
case sensitive. OK tb@
2021-03-26Invert the 'R' indicator which seems rather unintuitive at the moment,lum2-5/+10
currently a '*' next to a file's name indicates it is writable. With this diff it now means it is read-only. Also make the active buffer indicator more visible:'.'->'>'.
2021-03-26Sort header files and wrap long lines in x509.cinoguchi1-67/+110
2021-03-26Remove parenthesis around return value to reduce the diff with NetBSD.mpi13-176/+176
No functional change. ok mlarkin@
2021-03-26Add 'get-environment-variable', in a fashion:lum1-6/+32
(define curdir(get-environment-variable CURDIR)) (insert curdir) Should now print the value of the environment variable CURDIR's value, or error if it is not set.
2021-03-26Fix wrong sequence number wrap in ieee80211_recv_auth().stsp1-2/+2
IEEE 802.11 sequence numbers wrap around at 0xfff, not 0xffff. ok phessler@ kevlo@
2021-03-26Rewrite poll loop a bit. Put the various message queues into an arrayclaudio1-44/+28
with the same order as the pollfds. This way simple for loops can be used to setup and handle all cases but POLLIN. OK tb@
2021-03-26Change the regex for define names. Make more characters available.lum1-13/+14
Keep the same regex for mg function names. Though perhaps for user-defined functions other characters could be ok....
2021-03-26regenjan1-1/+5
2021-03-26Add PCI ID for Intel X710 10G SFP+ NICjan1-1/+2
ok patrick@
2021-03-26regenjan1-1/+2
2021-03-26Add missing PCI ID for Intel X710 SFP+ NICjan1-1/+2
ok patrick@
2021-03-26Change two more bool counters to pointer NULL checks.lum1-23/+11
2021-03-26Resync the supported hardware list with armv7.html, suggested by,dtucker1-39/+28
corrections and ok jsg@. This replaces the obsolete list of boards and their supported devices with the current list of supported boards only, similar to arm64.
2021-03-25Permit kern.somaxconn when the unix pledge is used. Previously this was onlyabieber1-2/+2
allowed when inet was used. This lets Go programs use 'unix' without also including 'inet'. from Josh Rickmar ok / tree review from deraadt@, commit message cluestick from tb@
2021-03-25Log ioctl failureskn1-4/+7
Otherwise there is no way to determine why e.g. zzz(8) does not do anything on certain machines; macppc and arm64 for example have no suspend/resume suspend at all (for now) and loongson has partial support. This still does not make `zzz' or `apm -z' report the informative warning on standar error, but syslog now prints apmd: system suspending apmd: battery status: unknown. external power status: not known. estimated battery life 0% apmd: suspend: Operation not supported OK benno
2021-03-25Move the expression list create item code into a single function.lum1-35/+60
2021-03-25mail(1) cares about whitespacederaadt1-1/+1
2021-03-25Add an (exit) method.lum1-1/+20
2021-03-25User a pointer's value (!NULL) instead of a boolean to indicate somelum1-11/+11
kind of data being found.
2021-03-25an invalid value of `mcs' may come from the hardware so adjust code so that themestre1-2/+3
value is only used after checking if it's valid or not. CID 1502921 OK stsp@ phessler@
2021-03-25Use length of line to indicate end of characters to process inlum3-22/+34
foundparen(). No intended functional change. regress tests ok and they all use excline().
2021-03-25Adjust HTTP client code a bit. Add support for 304 Not Modified responses,claudio3-30/+39
remove handling of 206 Partial Content (the client does not use range headers). Report the Last-Modified timestamp back to the requestor and switch OK to a enum value for (FAIL, OK and NOT MODIFIED). OK tb@
2021-03-25Provide apm(4/arm64) with battery informationkn1-1/+41
apm merely provides an all zero/unknown stub for those values, e.g. apm(8) output is useless. Hardware sensors however provide this information: hw.sensors.cwfg0.volt0=3.76 VDC (battery voltage) hw.sensors.cwfg0.raw0=259 (battery remaining minutes) hw.sensors.cwfg0.percent0=58.00% (battery percent) Make cwfg(4) copy those over using apm_setinfohook() for apm to show it: Battery state: high, 58% remaining, 259 minutes life estimate A/C adapter state: not known Performance adjustment mode: auto (408 MHz) In cwfg's update routine, to keep values coherent, always reset them to zero/unknown and only set those that came from a valid reading. Input OK jca
2021-03-25Adjust base64_decode() to just take a base64 string as input instead ofclaudio1-11/+8
a string plus length. Preparation work for RRDP. OK tb@
2021-03-25Avoid mangled output in BIO_debug_callbacktb1-4/+12
Instead of blindly skipping 14 characters, we can use the return value of snprintf() to determine how much we should skip. From Martin Vahlensieck with minor tweaks by me
2021-03-25remove uneeded includes in md armv7 filesjsg69-307/+71
based on include-what-you-use suggestions
2021-03-25Sync correct ROUNDUP() from net/route.ctobhe1-3/+2