OpenBSD cvs log

created 2024-02-18T05:31:09Z
begin 2024-02-13T00:00:00Z
end 2024-02-14T00:00:00Z
path src/sys
commits 7

date 2024-02-13T02:14:25Z
author jsg
files src/sys/arch/armv7/marvell/mvacc.c log diff annotate
message fix off-by-one in bounds test

found by "buffer overflow 'mvacc_cpu_freqs' 13 <= 13" smatch error
ok miod@

date 2024-02-13T08:26:56Z
author tb
files src/sys/lib/libz/zconf.h log diff annotate
src/sys/lib/libz/zlib.h log diff annotate
src/sys/lib/libz/zutil.h log diff annotate
message zlib: sync with base

date 2024-02-13T09:29:39Z
author claudio
files src/sys/arch/sparc64/sparc64/db_trace.c log diff annotate
message There is no way to implement the INKERNEL() macro on sparc64.
It was set to just 1 since the dawn of sparc64 support. It is
time to accept the fact and remove all INKERNEL() checks.
OK miod@ mpi@

date 2024-02-13T10:16:28Z
author miod
files src/sys/uvm/uvm_page.c log diff annotate
message Remove sanity checks from uvm_pagefree(). The first thing this function does
is invoke uvm_pageclean(), which performs the exact same sanity check, so
one set of checks is enough.

ok mpi@

date 2024-02-13T12:22:09Z
author bluhm
files src/sys/net/if_bridge.c log diff annotate
src/sys/net/if_etherip.c log diff annotate
src/sys/net/if_pfsync.c log diff annotate
src/sys/net/if_veb.c log diff annotate
src/sys/net/route.c log diff annotate
src/sys/net/route.h log diff annotate
src/sys/netinet/in.h log diff annotate
src/sys/netinet/in_pcb.c log diff annotate
src/sys/netinet/in_pcb.h log diff annotate
src/sys/netinet/ip_carp.c log diff annotate
src/sys/netinet/ip_input.c log diff annotate
src/sys/netinet/ip_output.c log diff annotate
src/sys/netinet/ip_var.h log diff annotate
src/sys/netinet/tcp_input.c log diff annotate
src/sys/netinet/tcp_output.c log diff annotate
src/sys/netinet/tcp_subr.c log diff annotate
src/sys/netinet/tcp_var.h log diff annotate
src/sys/netinet6/dest6.c log diff annotate
src/sys/netinet6/in6.h log diff annotate
src/sys/netinet6/in6_pcb.c log diff annotate
src/sys/netinet6/in6_src.c log diff annotate
src/sys/netinet6/ip6_divert.c log diff annotate
src/sys/netinet6/ip6_forward.c log diff annotate
src/sys/netinet6/ip6_id.c log diff annotate
src/sys/netinet6/ip6_output.c log diff annotate
src/sys/netinet6/ip6_var.h log diff annotate
src/sys/netinet6/mld6.c log diff annotate
src/sys/netinet6/raw_ip6.c log diff annotate
src/sys/netinet6/route6.c log diff annotate
src/sys/netinet6/udp6_output.c log diff annotate
message Merge struct route and struct route_in6.

Use a common struct route for both inet and inet6. Unfortunately
struct sockaddr is shorter than sockaddr_in6, so netinet/in.h has
to be exposed from net/route.h. Struct route has to be bsd visible
for userland as netstat kvm code inspects inp_route. Internet PCB
and TCP SYN cache can use a plain struct route now. All specific
sockaddr types for inet and inet6 are embeded there.

OK claudio@

date 2024-02-13T13:58:19Z
author bluhm
files src/sys/dev/pci/if_bnxt.c log diff annotate
src/sys/dev/pci/if_em.c log diff annotate
src/sys/dev/pci/if_igc.c log diff annotate
src/sys/dev/pci/if_ix.c log diff annotate
src/sys/dev/pci/if_ixl.c log diff annotate
src/sys/dev/pv/if_vio.c log diff annotate
src/sys/net/if_ethersubr.c log diff annotate
src/sys/netinet/if_ether.h log diff annotate
message Analyse header layout in ether_extract_headers().

Several drivers need IPv4 header length and TCP offset for checksum
offload, TSO and LRO. Accessing these fields directly caused crashes
on sparc64 due to misaligned access. It cannot be guaranteed that
IP and TCP header is 4 byte aligned in driver level. Also gcc 4.2.1
assumes that bit fields can be accessed with 32 bit load instructions.

Use memcpy() in ether_extract_headers() to get the bits from IPv4
and TCP header and store the header length in struct ether_extracted.
From there network drivers can esily use it without caring about
alignment and bit shift. Do some sanity checks with the length
values to prevent that invalid values from evil packets get stored
into hardware registers. If check fails, clear the pointer to the
header to hide it from the driver. Add debug prints that help to
figure out the reason for bad packets and provide information when
debugging drivers.

OK mglocker@

date 2024-02-13T17:51:17Z
author miod
files src/sys/dev/ic/oosiop.c log diff annotate
message Fix splbio usage in oosiop_scsicmd() - it does not need to be taken early
since the switch to iopool years ago, but on the other had the update of
the command TAILQ needs to be done at splbio, and it wasn't.