claudio [Mon, 10 May 2021 10:26:23 +0000 (10:26 +0000)]
Better way to detect the double new lines the API issues from time to time.
This way done lines now will have a newline.
stsp [Mon, 10 May 2021 08:28:00 +0000 (08:28 +0000)]
Let iwm(4) flush Tx queues before removing the firmware station and
before stopping a Tx block ack session. This aligns us more closely
with how the Linux iwlwifi driver is doing things.
Also, reset the device if an errors occurs in the block ack session task.
Fixes auto-recovery after such errors.
Prompted by firmware error reports from kettenis@ and Matthias Schmidt.
Doesn't fix the reported issues completely. I will keep investigating.
Tested:
7265: stsp
8265: Matthias Schmidt
9260: phessler, kettenis
stsp [Mon, 10 May 2021 08:17:07 +0000 (08:17 +0000)]
Refactor softraid crypto code to allow use of a discipline-specific data
structure for RAID1C volumes, as requested by jsing@ during review of my
initial RAID1C patch.
This should effectively be a cosmetic change. The point of this exercise
is to allow the data structure changes made here in softraidvar.h.
Tested on CRYPTO and RAID1C by Josh Grosse, Matthias Schmidt, and myself.
ok jsing@
jsg [Mon, 10 May 2021 05:58:19 +0000 (05:58 +0000)]
reduce exception.S diff to FreeBSD
ok mlarkin@
guenther [Mon, 10 May 2021 00:52:15 +0000 (00:52 +0000)]
Pull the logic to get the "lock" for TLB shooting into
pmap_start_tlb_shoot(), to get the #ifdef goo out of
pmap_tlb_shoot{page,range,tlb}()
Use a normal do{}while(0) when nooping pmap_tlb_shootwait()
tweak and ok kettenis@
jsg [Sun, 9 May 2021 23:22:25 +0000 (23:22 +0000)]
fpu_valid_opcode() did not correctly handle 16 bit fp instructions
such as an stval of 0xaa22. The RISC-V Instruction Set Manual states
that setting stval to a non-zero value with the instruction on illegal
instruction exception is an optional feature so instead of changing
fpu_valid_opcode() remove it entirely.
ok deraadt@ kettenis@ drahn@
drahn [Sun, 9 May 2021 21:26:06 +0000 (21:26 +0000)]
Change offsets to (N * 8) to reduce chance of register clobber and mistakes.
Simplify integer loading, use 'li <dest>, <value>' instead of x0/zero register
Adjust _JB_SIGMASK to not collide with saved registers.
job [Sun, 9 May 2021 19:50:14 +0000 (19:50 +0000)]
Add draft-ietf-sidrops-rpki-rsc OID
Listed under 'SMI Security for S/MIME CMS Content Type
(1.2.840.113549.1.9.16.1)'
https://www.iana.org/assignments/smi-numbers/smi-numbers.xhtml#security-smime-1
OK tb@
kettenis [Sun, 9 May 2021 15:51:35 +0000 (15:51 +0000)]
Some x86 machines advertise the "hardware reduced" ACPI feature, advertise
S4 and S5 support, but fail to populate the SLEEP_CONTROL_REG and
SLEEP_STATUS_REG descriptions in the FADT. An example of such a machine
is the ASUS Zenbook 14 UM433DA. Any attempt to powerdown the machine
will result in a kernel crash. It turns out that using the legacy ACPI PM
registers works fine on this machien. So fall back on those registers
if SLEEP_CONTROL_REG and/or SLEEP_STATUS_REG aren't provided.
ok deraadt@, mpi@
jan [Sun, 9 May 2021 14:26:45 +0000 (14:26 +0000)]
Add subtest for EPRT command in ftpd regression test
tb [Sun, 9 May 2021 14:25:40 +0000 (14:25 +0000)]
Prepare to provide EVP_Digest{Sign,Verify}
These are one-shot versions combining EVP_Digest{Sign,Verify}{Update,Final}.
and are part of the OpenSSL 1.1.1 API. While they simplify callers in some
situations slightly, their real use is for EdDSA that by design can't be
split into Update/Final steps.
Based on OpenSSL commit
7539418981c140648a620d72edd7398564878b5c
ok inoguchi
jan [Sun, 9 May 2021 14:05:42 +0000 (14:05 +0000)]
Add subtest for SIZE command in ftpd regression tests
jan [Sun, 9 May 2021 13:16:33 +0000 (13:16 +0000)]
Add subtest for RNFR and RNTO in ftpd regression tests
tb [Sun, 9 May 2021 11:25:32 +0000 (11:25 +0000)]
Garbage collect sz in mft_parse_filehash() which has been unused
since mft.c r1.20.
tb [Sun, 9 May 2021 11:19:30 +0000 (11:19 +0000)]
two whitespace tweaks
tb [Sun, 9 May 2021 11:18:57 +0000 (11:18 +0000)]
Remove unnecessary NULL check that breaks the build with OpenSSL 1.1.
ok job
jsg [Sun, 9 May 2021 06:40:59 +0000 (06:40 +0000)]
return type on a different line and use (void) instead of ()
jsg [Sun, 9 May 2021 06:34:21 +0000 (06:34 +0000)]
fix indentation
deraadt [Sat, 8 May 2021 18:10:03 +0000 (18:10 +0000)]
adapt ruslan@freebsd's disasm to our world, and replace the incomplete decoder.
ok jsg kettenis
deraadt [Sat, 8 May 2021 18:08:41 +0000 (18:08 +0000)]
similar to ruslan@freebsd's work, use https://github.com/riscv/riscv-opcodes
to generate instruction decoder tables
$ cat opcodes opcodes-rvc-pseudo opcodes-rvc opcodes-custom |
./parse-opcodes -c
with jsg
krw [Sat, 8 May 2021 17:44:22 +0000 (17:44 +0000)]
Recognize GPT partitions of type
21686148-6449-6e6f-744e-
656564454649 (a.k.a.
"IdontNeedEFI", a.k.a. "BIOS boot"). Often used to contain the second stage boot
loader binary on disk images.
Makes it easier to recognize/overwrite/remove the contents.
Example image provided by mlarkin@
krw [Sat, 8 May 2021 16:41:24 +0000 (16:41 +0000)]
Spoof GPT partitions of type
21686148-6449-6e6f-744e-
656564454649 (a.k.a.
"IdontNeedEFI", a.k.a. "BIOS boot") as FS_BOOT. Often used to contain the second
stage boot loader binary on disk images.
Makes it easier to recognize/overwrite/remove the contents.
Not yet supported in fdisk(8).
Example image provided by mlarkin@
lum [Sat, 8 May 2021 12:57:41 +0000 (12:57 +0000)]
Perhaps the syntax '((' and '()' will be valid one day, but not at the
moment. This diff works the two checks for them into the main for
parsing loop.
martijn [Sat, 8 May 2021 09:38:29 +0000 (09:38 +0000)]
Revert previous commit.
Someone this introduces some problems that I didn't ran into during testing
lum [Sat, 8 May 2021 09:27:35 +0000 (09:27 +0000)]
stop parsing if a digit is found as first character of an expression.
martijn [Sat, 8 May 2021 07:26:19 +0000 (07:26 +0000)]
In the C locale make codepoints > 0x7f return EILSEQ, since these aren't
part of that locale.
This matches what at least FreeBSD and glibc do.
OK millert@
anton [Sat, 8 May 2021 06:53:19 +0000 (06:53 +0000)]
Fix a race in the kqueue-read test. If the writer thread managed to fill
up the pipe buffer, it will hang in write(2) waiting for the pipe to
become writeable again. While doing so, it cannot observe that the
kqueue thread as already finished implying that ctx_thread_alive() would
return false, meaning no further writes are wanted.
Therefore open the pipe in non blocking mode and just ignore EAGAIN
errors while writing.
deraadt [Sat, 8 May 2021 05:31:07 +0000 (05:31 +0000)]
kernel setjmp saves 14 registers, not 13. ddb continue now works.
ok jsg
krw [Fri, 7 May 2021 22:15:13 +0000 (22:15 +0000)]
Replace random mix of u_int* and uint* types with consistent uint* types.
kettenis [Fri, 7 May 2021 19:03:01 +0000 (19:03 +0000)]
Print Synopsys version number, use OF_getpropbool(9) where appropriate
and handle a few more device properties seen on the beaglev board.
ok jsg@
bluhm [Fri, 7 May 2021 19:00:34 +0000 (19:00 +0000)]
Dynamic socket buffers make tests unreliable, set fixed buffer size.
martijn [Fri, 7 May 2021 14:31:27 +0000 (14:31 +0000)]
Fix the \x escape sequence to be limited to max 2 characters, instead of
consuming as long as there are isxdigit(3) characters available.
While here document it and mark it as an extension.
OK millert@
dtucker [Fri, 7 May 2021 09:23:40 +0000 (09:23 +0000)]
Increase ConnectionAttempts from 4 to 10 as the tests occasionally time
out on heavily loaded hosts.
jsg [Fri, 7 May 2021 09:13:19 +0000 (09:13 +0000)]
RealTek -> Realtek
ok jmc@ kevlo@
lum [Fri, 7 May 2021 08:29:30 +0000 (08:29 +0000)]
Give an error if quoted string is found as first non-white char after
'('.
lum [Fri, 7 May 2021 07:42:20 +0000 (07:42 +0000)]
Take a note of expression length when it is extracted from line
submitted to excline().
djm [Fri, 7 May 2021 04:11:51 +0000 (04:11 +0000)]
include pid in LogVerbose spam
djm [Fri, 7 May 2021 03:09:38 +0000 (03:09 +0000)]
don't sigdie() in signal handler in privsep child process;
this can end up causing sandbox violations per bz3286; ok dtucker@
djm [Fri, 7 May 2021 02:29:40 +0000 (02:29 +0000)]
correct mistake in spec - the private key blobs are encoded verbatim
and not as strings (i.e. no 4-byte length header)
djm [Fri, 7 May 2021 02:26:55 +0000 (02:26 +0000)]
dump out a usable private key string too; inspired by Tyson Whitehead
jsg [Fri, 7 May 2021 01:54:17 +0000 (01:54 +0000)]
fix bounds tests gpio pin numbering starts at 0
ok kettenis@
jsg [Fri, 7 May 2021 00:37:36 +0000 (00:37 +0000)]
add support for RTL8168FP/RTL8111FP/RTL8117 to re(4)
from Stephen Taylor who tested on a ThinkCenter M75n Nano IoT
with RTL8111FP-CG
krw [Thu, 6 May 2021 22:26:14 +0000 (22:26 +0000)]
GPT_get_hdr() is actually spelled GPT_get_header().
kettenis [Thu, 6 May 2021 20:35:21 +0000 (20:35 +0000)]
Fix bogus return statement.
From miod@
kettenis [Thu, 6 May 2021 19:45:16 +0000 (19:45 +0000)]
Add OF_getpropbool(9).
ok visa@
claudio [Thu, 6 May 2021 17:25:45 +0000 (17:25 +0000)]
Bring comment in sync with the code. No functional change.
job [Thu, 6 May 2021 17:03:57 +0000 (17:03 +0000)]
Add an 'expires' column to CSV & JSON output
The 'expires' value contains a reasonable earliest moment a VRP would expire,
in light of the currently available set of CAs and CRLs. The 'expires' value
can be used to avoid route selection based on stale data when generating VRP
sets, when faced with loss of communication between consumer and valdiator,
or validator and CA repository.
OK claudio@
stsp [Thu, 6 May 2021 14:40:35 +0000 (14:40 +0000)]
Clarify that athn(4) USB devices don't support power saving in hostap mode.
Prompted by a report from martingot on bugs@
lum [Thu, 6 May 2021 14:16:12 +0000 (14:16 +0000)]
Add the line number of an error to error messages.
anton [Thu, 6 May 2021 12:57:02 +0000 (12:57 +0000)]
regen
anton [Thu, 6 May 2021 12:55:20 +0000 (12:55 +0000)]
Unlock lseek(2).
In August 2019 I tried to unlock lseek which failed since the vnode lock
could not be acquired without holding the kernel lock back then.
claudio@ recently made it possible to acquire a vnode lock without
holding the kernel lock. The kernel lock is still required around
VOP_GETATTR() as the underlying file system implementations are not
MP-safe.
ok claudio@
lum [Thu, 6 May 2021 12:44:21 +0000 (12:44 +0000)]
Add a number to parameters for ewprintf() via beeping.
mvs [Thu, 6 May 2021 11:29:34 +0000 (11:29 +0000)]
Kill pfkeyv2_parsemessage() declaration which is absolutely useless
here since it's declared in net/pfkeyv2.h.
Also kill unused RETURN_EINVAL() macro.
ok mpi@
mpi [Thu, 6 May 2021 09:33:22 +0000 (09:33 +0000)]
Refactor routines to stop/unstop processes and save the corresponding signal.
- Move the "hack" involving P_SINTR to avoid grabbing the SCHED_LOCK()
recursively closer to where it is necessary, in proc_stop()
- Introduce proc_unstop(), the symmetric routine to proc_stop(), which
manipulates `ps_xsig' and use it whenever a SSTOPed thread needs to be
awaken.
- Manipulate `ps_xsig' only in proc_stop/unstop()
ok kettenis@
claudio [Thu, 6 May 2021 09:23:42 +0000 (09:23 +0000)]
export [ none | default-route ] changes are not handled by reload.
claudio [Thu, 6 May 2021 09:21:35 +0000 (09:21 +0000)]
It is no longer required to reset a session when export is changed.
stsp [Thu, 6 May 2021 09:19:28 +0000 (09:19 +0000)]
Make iwx(4) install CCMP keys to hardware from a task context to
wait for confirmation from the firmware before setting link UP.
Tested by Hrvoje, dv, and myself.
claudio [Thu, 6 May 2021 09:18:54 +0000 (09:18 +0000)]
Improve reload behaviour of RDE peer flags and export_type.
Add an extra reload barrier (IMSG_RECONF_DRAIN) to the sync of the peer
config from the session engine to the rde. Necessary to ensure that the
peer config is up to date in the RDE before hitting reconfiguration.
Store the export_type and the peer flags outside of peer->conf. Adjust all
users of these two fields so they only look at the copies in peer.
During reload check the values with the peer->conf to check for changes.
If the export_type or the rde evaluate or transparent-as flags changed
flush the Adj-RIB-Out for that peer and in a 2nd step rebuild the RIB from
scratch. This results in a lot of UPDATE churn but these configs are not
altered often.
Fix multiple issues in the rde_softreconfig_in_done handler that resulted
in multiple runs of the out stage of the softreconfig pipeline.
OK benno@
claudio [Thu, 6 May 2021 07:35:22 +0000 (07:35 +0000)]
Simplify file handling. There is no reason to use O_NONBLOCK on regular
files since they will never "block". Remove the UPLOAD_READ_LOCAL state
and inline the meta data check into pre_file().
Plug one memory leak and cleanup code a bunch.
OK benno@
claudio [Thu, 6 May 2021 07:29:59 +0000 (07:29 +0000)]
More code cleanup
OK florian@ benno@
lum [Thu, 6 May 2021 07:16:24 +0000 (07:16 +0000)]
Give parse error if character found between blocks.
jsg [Thu, 6 May 2021 04:09:41 +0000 (04:09 +0000)]
enable dwmmc(4)
dv [Wed, 5 May 2021 21:33:11 +0000 (21:33 +0000)]
Refactor vm_instance to return error value directly.
vmd(8)'s vm_instance function set unsupported errno values. Change the
api to directly return an error (either errno or custom vmd error).
"go for it" -mlarkin@
jsing [Wed, 5 May 2021 19:52:00 +0000 (19:52 +0000)]
Replace DTLS w_epoch with epoch from TLSv1.2 record layer.
ok inoguchi@ tb@
kettenis [Wed, 5 May 2021 19:26:51 +0000 (19:26 +0000)]
The StarFive JH7100 SoC found on the BeagleV beta boards has most of
its peripherals hooked up through a bus that doesn't maintain cache
coherency. So in order to use DMA we will need to flush the L2 caches
before/after a DMA tranfer. Add a driver for the L2 cache controller
for these SoCs and infrastructure to do the necessary cache maintenance.
Since this particular L2 cache controller needs physical addresses, this
makes the bus_dma(4) code deviate from its arm64 counterpart.
ok drahn@
job [Wed, 5 May 2021 17:25:44 +0000 (17:25 +0000)]
Emit an integer instead of a string in JSON output
We added the "AS123" format because this is what the other tools did
and there was the goal to have equal output. However, many in the
community have voiced complaints about having to do string conversions.
OK deraadt@ claudio@
job [Wed, 5 May 2021 17:24:00 +0000 (17:24 +0000)]
Clarify -n behavior
Input from John Heasley
OK claudio@
visa [Wed, 5 May 2021 15:29:19 +0000 (15:29 +0000)]
Remove unneeded tlb_set_gbase() that was used with R8000.
Pointed out by miod@
kettenis [Wed, 5 May 2021 14:13:57 +0000 (14:13 +0000)]
whitespace
jsg [Wed, 5 May 2021 13:28:56 +0000 (13:28 +0000)]
use fence iorw,iorw for bus_space_barrier()
ok kettenis@
kettenis [Wed, 5 May 2021 13:12:26 +0000 (13:12 +0000)]
Sync with arm64 version.
ok jsg@
claudio [Wed, 5 May 2021 12:34:12 +0000 (12:34 +0000)]
Document new reload behaviour. From Ashton Fagg
OK jmc@
kettenis [Wed, 5 May 2021 12:02:21 +0000 (12:02 +0000)]
Fix definition of GICD_TYPER_LPIS.
ok patrick@
sthen [Wed, 5 May 2021 11:49:17 +0000 (11:49 +0000)]
slight tidy-up of /etc/services:
- remove a few UDP entries for protocols that are TCP-only
- drop some obsolete protocols
- move smtps/465 to the standards section (rfc8314)
- move the talk about IANA's "reserve for both UDP/TCP even when you only
use one" policy from a comment in /etc/services to the manual, and talk
about how an entry in /etc/services prevents the associated port from
being used for dynamic ports (via net.inet.udp|tcp.baddynamic sysctl).
ok phessler@ florian@
claudio [Wed, 5 May 2021 10:28:11 +0000 (10:28 +0000)]
Improve the rde evaluate all test case by doing a withdraw of a prefix
that is hidden (but sent to one system because of rde evaluate all).
jsing [Wed, 5 May 2021 10:05:27 +0000 (10:05 +0000)]
Rewrite TLSv1.2 key block handling.
For TLSv1.2 a single key block is generated, then partitioned into
individual secrets for use as IVs and keys. The previous implementation
splits this across two functions tls1_setup_key_block() and
tls1_change_cipher_state(), which means that the IV and key sizes have to
be known in multiple places.
This implementation generates and partitions the key block in a single
step, meaning that the secrets are then simply handed out when requested.
ok inoguchi@ tb@
claudio [Wed, 5 May 2021 10:02:52 +0000 (10:02 +0000)]
All exabgp configs changed to the c code version of the api-exabgp code.
jsg [Wed, 5 May 2021 09:17:19 +0000 (09:17 +0000)]
Match on snps,dw-mshc in dwmmc(4) and use clock-frequency for clkbase if
the "ciu" clock is missing as mentioned in the devicetree binding.
ok kettenis@
mpi [Wed, 5 May 2021 07:29:00 +0000 (07:29 +0000)]
Unlock top part of the fault handler.
ok kettenis@
lum [Wed, 5 May 2021 06:12:23 +0000 (06:12 +0000)]
Check the characters preceeding and following quotes.
stsp [Wed, 5 May 2021 05:47:11 +0000 (05:47 +0000)]
Enable detailed reports about firmware errors in iwm(4) for the time being.
I am getting reports about firmware errors which may be related to Tx agg.
drahn [Wed, 5 May 2021 04:52:39 +0000 (04:52 +0000)]
riscv64 binutils 'support'
Enable just enough of binutils to be a functional compilation system
with llvm doing the heavy lifting.
With corrections suggested by reviewers.
ok jsg@ kettenis@
asou [Wed, 5 May 2021 03:03:16 +0000 (03:03 +0000)]
Fix backtrace command with kernel core.
ok mpi@
jsg [Wed, 5 May 2021 01:28:38 +0000 (01:28 +0000)]
riscv: Assert that SUM is not set in SSTATUS for exceptions.
From John Baldwin
6a3a6fe34bf36b6e745b3e9ad1a991de057729c7 in FreeBSD
ok kettenis@ mlarkin@
jsg [Wed, 5 May 2021 01:24:57 +0000 (01:24 +0000)]
riscv: Clear SUM in SSTATUS for supervisor mode exceptions.
From John Baldwin
753bcca440a4d2c95f48536b586131b84c0bb87e in FreeBSD
ok kettenis@ mlarkin@
jsg [Wed, 5 May 2021 00:53:08 +0000 (00:53 +0000)]
rename trap.S exception.S and trap_machdep.c trap.c to match other archs
ok kettenis@
kurt [Wed, 5 May 2021 00:04:49 +0000 (00:04 +0000)]
Add Radxa Rock Pi N10.
dtucker [Tue, 4 May 2021 22:53:52 +0000 (22:53 +0000)]
Don't pass NULL as a string in debugging as it does not work on some
platforms in -portable. ok djm@
bluhm [Tue, 4 May 2021 21:57:15 +0000 (21:57 +0000)]
Reorder the integer sysctl functions. Then the traditional 4.4BSD
comment 'As above...' makes sense again. Improve comments for
sysctl_int_bounded() and sysctl_bounded_arr().
OK gnezdo@ mvs@
naddy [Tue, 4 May 2021 21:03:30 +0000 (21:03 +0000)]
shell scripts should use getopts instead of getopt
Add a prominent deprecation notice to getopt.1.
Add examples of the getopts idiom to sh.1 and ksh.1.
Requested by and ok espie@, ok jmc@
bluhm [Tue, 4 May 2021 19:04:56 +0000 (19:04 +0000)]
As the unbouded feature in sysctl_int_bounded() is no longer used,
remove it. This also fixes a defective check of the dynamic boundary
in sysctl_sysvshm().
OK mvs@ gnezdo@
kettenis [Tue, 4 May 2021 19:02:52 +0000 (19:02 +0000)]
sigpending(2) will never fail. Optimize the syscall stub accordingly like
we do on other architectures.
ok mpi@
tb [Tue, 4 May 2021 18:20:05 +0000 (18:20 +0000)]
Rename shutdown_all() to shutdown_peers() for consistency.
cheloha [Tue, 4 May 2021 18:14:58 +0000 (18:14 +0000)]
syscalls.c, init_sysent.c, syscall.h, syscallargs.h: regen
Regen after unlocking getitimer(2) and setitimer(2).
ok anton@, mpi@
cheloha [Tue, 4 May 2021 18:10:24 +0000 (18:10 +0000)]
getitimer(2), setitimer(2): unlock syscalls
With the changes in kern_time.c v1.150, neither getitimer(2) nor
setitimer(2) need the kernel lock anymore.
ok anton@, mpi@
kettenis [Tue, 4 May 2021 16:38:06 +0000 (16:38 +0000)]
The clock on RISC-V is architectural, so we really don't need the
whole abstraction layer to support multiple timers. And we don't
really need a separate driver. Replace timer(4) with code based on
the powerpc64 implementation of the randomized statclock code.
Fixes hangs seen on real hardware.
ok jsg@, drahn@
aoyama [Tue, 4 May 2021 14:05:12 +0000 (14:05 +0000)]
Fix 2nd and 3rd arguments' cast in atomic_cas_ptr().
This fixes compile errors (actually warnings) on m88k in sys/net/pf.c
revision 1.1116 changes.
Diff from Miod Vallat, tested on GENERIC and GENERIC.MP by me.
bluhm [Tue, 4 May 2021 13:24:49 +0000 (13:24 +0000)]
Create memory pressure in test. Allocate heap and stack in child
processes and threads. Then exit has more work to do.
kettenis [Tue, 4 May 2021 12:46:28 +0000 (12:46 +0000)]
Add a boot hart ID check in the function that matches secondary CPUs
as well.
ok jsg@
dv [Tue, 4 May 2021 10:48:51 +0000 (10:48 +0000)]
gzread(3) doesn't always set errno, so use gzerror(3)
Compression errors from libz don't set errno.
OK mlarkin@