OpenBSD cvs log

created 2023-07-09T08:22:20Z
begin 2023-07-04T00:00:00Z
end 2023-07-05T00:00:00Z
path src/sys
commits 19

date 2023-07-04T02:01:55Z
author jsg
files src/sys/net/pf_ioctl.c log diff annotate
message remove unused global var
ok sashan@

date 2023-07-04T03:56:07Z
author jsg
files src/sys/sys/mbuf.h log diff annotate
message m_reclaim() was removed in uipc_mbuf.c rev 1.195

date 2023-07-04T09:00:24Z
author kettenis
files src/sys/dev/ic/dwqe.c log diff annotate
message Add some extra parenthesis for consistency.

stolen from jsing@

date 2023-07-04T09:47:51Z
author jsg
files src/sys/conf/param.c log diff annotate
src/sys/sys/mbuf.h log diff annotate
message Remove mbuf low watermark vars. Unused since uipc_mbuf.c rev 1.244.
ok kn@ bluhm@

date 2023-07-04T10:22:39Z
author jmatthew
files src/sys/dev/pci/if_bge.c log diff annotate
src/sys/dev/pci/if_bgereg.h log diff annotate
message Make the hardware counters available on BCM5705 and newer available as
kstats. Some of the hardware counters are already used in
bge_stats_update_regs() to update interface counters and work around
hardware bugs, and all counters reset on read, so to keep things simple
the work is split between that function and bge_kstat_read(), which
reads the rest of the counters.

tested by bluhm@ on BCM5720 (with counters) and BCM5704 (without), and
by me on BCM5720 A0 (with counters and hardware bugs)
ok bluhm@ dlg@

date 2023-07-04T10:34:03Z
author kettenis
files src/sys/arch/riscv64/dev/stfclock.c log diff annotate
message Add a bunch of clocks for GMAC0 and GMAC1 on the JH7110 SoC.
Based on an initial diff from jsing@

ok jsing@

date 2023-07-04T10:48:19Z
author bluhm
files src/sys/netinet/ip_output.c log diff annotate
src/sys/netinet/tcp_output.c log diff annotate
message Remove redundant code when calculating checksum.
OK jmatthew@

date 2023-07-04T11:14:00Z
author jsg
files src/sys/sys/mount.h log diff annotate
src/sys/sys/proc.h log diff annotate
src/sys/sys/sysctl.h log diff annotate
src/sys/sys/tty.h log diff annotate
message remove prototypes for removed functions

date 2023-07-04T11:34:19Z
author sashan
files src/sys/net/pf_ioctl.c log diff annotate
src/sys/net/pfvar.h log diff annotate
message The recent change to DIOCGETRULE allows applications which
periodically read rules from pf(4) to consume all kernel
memory. The bug has been discovered and root caused by florian@.
In this particular case it was snmpd(8) what ate all kernel
memory.

This commit introduces DIOCXEND to pf(4) so applications such
as snmpd(8) and systat(1) to close ticket/transaction when
they are done with fetching the rules. This change also
updates snmpd(8) and systat(1) to use newly introduced
DIOCXEND ioctl(2).

OK claudio@, deraadt@, kn@

date 2023-07-04T12:20:10Z
author jasper
files src/sys/dev/dt/dt_prov_kprobe.c log diff annotate
message Unbreak kprobes. Since LLVM emits endbr64 instructions for IBT, dt could no
longer identify function boundaries and as such no kprobes were found anymore.
Adjust the parser accordingly.

ok mpi@

date 2023-07-04T12:27:44Z
author jasper
files src/sys/dev/dt/dt_prov_kprobe.c log diff annotate
message consistenly name instruction defines

date 2023-07-04T12:48:42Z
author kettenis
files src/sys/dev/ic/dwqe.c log diff annotate
message Handle rx error.

ok jsing@, patrick@

date 2023-07-04T12:58:42Z
author kettenis
files src/sys/dev/fdt/if_dwqe_fdt.c log diff annotate
message Add StarFive JH7110 support.
Based on an initial diff from jsing@

ok jsing@, patrick@

date 2023-07-04T13:04:08Z
author kettenis
files src/sys/arch/riscv64/conf/GENERIC log diff annotate
src/sys/arch/riscv64/conf/RAMDISK log diff annotate
message enable dwqe(4)

date 2023-07-04T13:37:47Z
author jan
files src/sys/net/if.c log diff annotate
message Check for interface type ethernet before call ether_brport_isset()

Pointed out by bluhm.

ok bluhm@

date 2023-07-04T14:23:38Z
author sashan
files src/sys/net/pf_ioctl.c log diff annotate
message This diff limits the number of transactions/tickets
pf_open_trans() can issue for each clone of /dev/pf
to 512. The pf_open_trans() is currently being used
by DIOCGETRULES ioctl(2). The limit avoids processes
to consume all kernel memory by asking DIOCGETRULES
for more tickets. If DIOCGETRULES hits the limit, then
the application will see EBUSY error.

This diff was fine tuned with feedback from cluadio@,
deraadt@ and kn@.

OK kn@

date 2023-07-04T14:32:21Z
author patrick
files src/sys/dev/fdt/qcsmptp.c log diff annotate
message Instead of waiting for the inbound item to show up in the interrupt
handler, allocate it ourselves. The firmware doesn't seem to mind
that it's us doing the allocation. This fixes a splassert, because
the code that retrieves the item reaches through the shared memory
driver, which acquires the hardware mutex, which in turn mallocs.

ok kettenis@

date 2023-07-04T17:29:32Z
author cheloha
files src/sys/arch/amd64/include/cpu.h log diff annotate
message amd64: cpu_info: rearrange members, keep ci_mds_tmp 32-byte aligned

ci_mds_tmp needs to be 32-byte aligned, otherwise we trip a CTASSERT
in amd64/cpu.c and break kernel compilation. However, ci_mds_tmp's
32-byte alignment is at risk: the size of schedstate_percpu is about
to change.

Move ci_curproc and ci_schedstate up just after ci_mds_buf. This puts
ci_mds_tmp at page offset 64 with no structs ahead of it in cpu_info.
With this arrangement it should remain 32-byte aligned without much
effort.

With input from guenther@.

ok guenther@

date 2023-07-04T22:28:24Z
author mvs
files src/sys/kern/uipc_socket.c log diff annotate
src/sys/kern/uipc_socket2.c log diff annotate
src/sys/sys/socketvar.h log diff annotate
message Introduce SBL_WAIT and SBL_NOINTR sbwait() flags.

This refactoring is another step to make standalone socket buffers
locking. sblock() uses M_WAITOK and M_NOWAIT flags passed as the third
argument together with the SB_NOINTR flag on the `sb_flags' to control
sleep behaviour. To perform uninterruptible acquisition, SB_NOINTR flag
should be set before sblock() call. `sb_flags' modification requires to
hold solock() around sblock()/sbunlock() that makes standalone call
impossible.

Also `sb_flags' modifications outside sblock()/sbunlock() makes
uninterruptible acquisition code huge enough. This time only sorflush()
does this (and forgets to restore SB_NOINTR flag, so shutdown(SHUT_RDWR)
call permanently modifies socket locking behaviour) and this looks not
the big problem. But with the standalone socket buffer locking it will
be many such places, so this huge construction is unwanted.

Introduce new SBL_NOINTR flag passed as third sblock() argument. The
sblock() acquisition will be uninterruptible when existing SB_NOINTR
flag is set on `sb_flags' or SBL_NOINTR was passed.

The M_WAITOK and M_NOWAIT flags belongs to malloc(9). It has no M_NOINTR
flag and there is no reason to introduce it. So for consistency reasons
introduce new SBL_WAIT and use it together with SBL_NOINTR instead of
M_WAITOK and M_NOINTR respectively.

ok bluhm