openbsd
8 months agoFix locked address interfaces in vmd(8).
dv [Sat, 10 Feb 2024 02:19:12 +0000 (02:19 +0000)]
Fix locked address interfaces in vmd(8).

Before comparing the amount of bytes read to the size of a packet
struct, make sure the fd being read was actually the packet injection
pipe(2). Locked address interfaces force using the same copy-based
approach used for the internal dhcp service for "local" interfaces
but were accidentally being treated as reads from the pipe(2) and
not the tap.

This broke networking for any locked address interfaces in vmd(8).

Reported by and ok kn@

8 months agoSet vmd virtio device fds to -1 on close after fork.
dv [Sat, 10 Feb 2024 02:10:41 +0000 (02:10 +0000)]
Set vmd virtio device fds to -1 on close after fork.

After the recent vmd(8) commit to clean up file descriptor lifecycles,
virtio disks with multiple file descriptors (QCOW2 images with at
least one base) would fail to initialize when booted with a network
device.

Use the new fd closing routine in the vm process for virtio devices
to close the device fds and set to -1, removing buggy copying and
closing of fds.

Additionally, close the vm/device sync and async channels when
closing a device's fds.

Issue reported by and ok kn@

8 months agopull in another upstream tweak for windows
tb [Fri, 9 Feb 2024 19:15:53 +0000 (19:15 +0000)]
pull in another upstream tweak for windows

8 months agodt(4): move interval/profile entry points to dedicated clockintr callback
cheloha [Fri, 9 Feb 2024 17:42:18 +0000 (17:42 +0000)]
dt(4): move interval/profile entry points to dedicated clockintr callback

To improve the utility of dt(4)'s interval and profile probes we need
to move the probe entry points from the fixed-frequency hardclock() to
a dedicated clock interrupt callback so that the probes can fire at
arbitrary frequencies.

- Remove entry points for interval/profile probes from hardclock().

- Merge dt_prov_profile_enter(), dt_prov_interval_enter(), and
  dt_prov_profile_fire() into one function, dt_clock().  This is
  the now-unified callback for interval/profile probes.  dt_clock()
  will consume multiple events during a single execution if it is
  delayed, but on platforms with high quality interrupt clocks this
  should be rare.

- Each struct dt_pcb gets its own clockintr handle, dp_clockintr.

- In struct dt_pcb, replace dp_maxtick/dp_nticks with dp_nsecs,
  the PCB's sampling period.  Aynchronous probes must initialize
  dp_nsecs to a non-zero value during dtpv_alloc().

- In struct dt_pcb, replace dp_cpuid with dp_cpu so that
  dt_ioctl_record_start() knows where to bind the PCB's
  dp_clockintr.

- dt_ioctl_record_start() binds, staggers, and starts all
  interval/profile PCBs on the given dt_softc.  Each dp_clockintr
  is given a reference to its enclosing PCB so that dt_clock()
  doesn't need to search for it.  The staggering sort-of simulates
  the current behavior under hardclock().

- dt_ioctl_record_stop() unbinds all interval/profile PCBs.  The
  CL_BARRIER ensures that dp_clockintr's PCB reference is not in
  use by dt_clock() so that the PCB may be safely freed upon
  return from dt_ioctl_record_stop().  Blocking while holding
  dt_lock is not ideal, but in practice blocking in this spot is
  rare and dt_clock() completes quickly on all but the oldest
  hardware.  An extremely unlucky thread could block for every
  interval/profile PCB on the softc, but this is implausible.

DT_FA_PROFILE values are up-to-date for amd64, i386, and macppc.
Somebody with the right hardware needs to check-and-maybe-fix the
values on octeon, powerpc64, and sparc64.

Joint effort with mpi@.

Thread: https://marc.info/?l=openbsd-tech&m=170629371821879&w=2

ok mpi@

8 months agoclockintr: add clockintr_unbind()
cheloha [Fri, 9 Feb 2024 16:52:58 +0000 (16:52 +0000)]
clockintr: add clockintr_unbind()

The clockintr_unbind() function cancels any pending execution of the
given clock interrupt object's callback and severs the binding between
the object and its host CPU.  Upon return from clockintr_unbind(), the
clock interrupt object may be rebound with a call to clockintr_bind().

The optional CL_BARRIER flag tells clockintr_unbind() to block if the
clockintr's callback function is executing at the moment of the call.
This is useful when the clockintr's arg is a shared reference and the
caller needs to be certain the reference is inactive.

Now that clockintrs can be bound and unbound repeatedly, there is more
room for error.  To help catch programmer errors, clockintr_unbind()
sets cl_queue to NULL.  Calls to other API functions after a clockintr
is unbound will then fault on a NULL dereference.  clockintr_bind()
also KASSERTs that cl_queue is NULL to ensure the clockintr is not
already bound.  These checks are not perfect, but they do catch some
common errors.

With input from mpi@.

Thread: https://marc.info/?l=openbsd-tech&m=170629367121800&w=2

ok mpi@

8 months agovmx(4): add missing NVLAN checks
jan [Fri, 9 Feb 2024 15:22:41 +0000 (15:22 +0000)]
vmx(4): add missing NVLAN checks

ok bluhm@

8 months agoclockintr: refactor clockintr_cancel() into clockintr_cancel_locked()
cheloha [Fri, 9 Feb 2024 15:06:23 +0000 (15:06 +0000)]
clockintr: refactor clockintr_cancel() into clockintr_cancel_locked()

Move the mutex-protected portions of clockintr_cancel() into a separate
function, clockintr_cancel_locked(), so that the code can be reused by
other callers.

Thread: https://marc.info/?l=openbsd-tech&m=170629367121800&w=2

ok mpi@

8 months agoInclude sys/lock.h to make qwx(4) compile with GENERIC kernel.
bluhm [Fri, 9 Feb 2024 14:57:36 +0000 (14:57 +0000)]
Include sys/lock.h to make qwx(4) compile with GENERIC kernel.

OK stsp@

8 months agoOnly debug log dhcp packet info if packet is found.
dv [Fri, 9 Feb 2024 14:52:39 +0000 (14:52 +0000)]
Only debug log dhcp packet info if packet is found.

No functional change. vmd(8) was being chatty and incorrect.

8 months agoTuck vmd's i8253 reset debug logs behind DPRINTF.
dv [Fri, 9 Feb 2024 14:35:47 +0000 (14:35 +0000)]
Tuck vmd's i8253 reset debug logs behind DPRINTF.

It's super chatty and pollutes verbose logging.

8 months agoimplement qwx_dp_process_rxdma_err()
stsp [Fri, 9 Feb 2024 14:11:00 +0000 (14:11 +0000)]
implement qwx_dp_process_rxdma_err()

8 months agoimplement qwx_dp_rx_process_wbm_err()
stsp [Fri, 9 Feb 2024 14:09:19 +0000 (14:09 +0000)]
implement qwx_dp_rx_process_wbm_err()

8 months agoimplement qwx_dp_process_reo_status()
stsp [Fri, 9 Feb 2024 14:07:27 +0000 (14:07 +0000)]
implement qwx_dp_process_reo_status()

8 months agoimplement qwx_dp_process_rx_err()
stsp [Fri, 9 Feb 2024 14:05:48 +0000 (14:05 +0000)]
implement qwx_dp_process_rx_err()

8 months agoRoute cache function returns hit or miss.
bluhm [Fri, 9 Feb 2024 14:02:11 +0000 (14:02 +0000)]
Route cache function returns hit or miss.

The route_cache() function can easily return whether it was a cache
hit or miss.  Then the logic to perform a route lookup gets a bit
simpler.  Some more complicated if (ro->ro_rt == NULL) checks still
exist elsewhere.
Also use route cache in in_pcbselsrc() instead of filling struct
route manually.

OK claudio@

8 months agoBump release
job [Fri, 9 Feb 2024 13:49:41 +0000 (13:49 +0000)]
Bump release

OK tb@

8 months agoConvert the bgplg html pages to HTML5.
claudio [Fri, 9 Feb 2024 12:56:53 +0000 (12:56 +0000)]
Convert the bgplg html pages to HTML5.

From Clemens Gößnitzer (clemens (at) goessnitzer.info)
Looks good to bentley@

8 months agoStruct layout of qwx_softc should not depend on NBPFILTER.
bluhm [Fri, 9 Feb 2024 12:50:10 +0000 (12:50 +0000)]
Struct layout of qwx_softc should not depend on NBPFILTER.

Due to a missing #include "bpfilter.h", the size of struct qwx_softc
varied in different object files.  This made the kernel crash on
arm64.  To make debugging core dumps and libkvm easier, kernel
object layout should not depend on kernel config.  Remove #if
NBPFILTER > 0 from struct definition.

problem analysis kettenis@
OK deraadt@ stsp@

8 months agobio_dump: add a test that prints all values of a single byte
tb [Fri, 9 Feb 2024 12:48:32 +0000 (12:48 +0000)]
bio_dump: add a test that prints all values of a single byte

8 months agoavoid uninitialised var use if qwx_core_fetch_bdf() errors
jsg [Fri, 9 Feb 2024 12:45:10 +0000 (12:45 +0000)]
avoid uninitialised var use if qwx_core_fetch_bdf() errors
ok stsp@

8 months agoDon't assume MPPE-{Send,Recv}-Keys are used only for MS-CHAP (or
yasuoka [Fri, 9 Feb 2024 11:59:23 +0000 (11:59 +0000)]
Don't assume MPPE-{Send,Recv}-Keys are used only for MS-CHAP (or
16 bytes length).  initial diff from markus

8 months agoqwx pci code must include bpfilter.h, too; spotted by kettenis
stsp [Fri, 9 Feb 2024 11:24:52 +0000 (11:24 +0000)]
qwx pci code must include bpfilter.h, too; spotted by kettenis

8 months agoEnable igc(4) on sparc64.
bluhm [Fri, 9 Feb 2024 11:05:22 +0000 (11:05 +0000)]
Enable igc(4) on sparc64.
OK deraadt@ jan@

8 months agomake ifconfig display the Tx rate selected by qwx firmware
stsp [Fri, 9 Feb 2024 09:59:01 +0000 (09:59 +0000)]
make ifconfig display the Tx rate selected by qwx firmware

8 months agoadd missing node reference counting to qwx's Tx completion path
stsp [Fri, 9 Feb 2024 09:55:17 +0000 (09:55 +0000)]
add missing node reference counting to qwx's Tx completion path

8 months agoremove qwx debug prints for management frame events we are already handling
stsp [Fri, 9 Feb 2024 09:53:50 +0000 (09:53 +0000)]
remove qwx debug prints for management frame events we are already handling

8 months agozlib: sync with upstream
tb [Fri, 9 Feb 2024 09:53:05 +0000 (09:53 +0000)]
zlib: sync with upstream

8 months agoExpand the set of ciphers, MACs and KEX methods in the PuTTY interop tests.
dtucker [Fri, 9 Feb 2024 08:56:59 +0000 (08:56 +0000)]
Expand the set of ciphers, MACs and KEX methods in the PuTTY interop tests.

8 months agoFactor out PuTTY setup and call when needed.
dtucker [Fri, 9 Feb 2024 08:47:42 +0000 (08:47 +0000)]
Factor out PuTTY setup and call when needed.

This allows us to avoid PuTTY key setup when it's not needed, which
speeds up the overall test run by a couple of percent.

8 months agoRefactor some functions to prepare accounting support.
yasuoka [Fri, 9 Feb 2024 07:46:32 +0000 (07:46 +0000)]
Refactor some functions to prepare accounting support.

8 months agoRemove a useless EVP_MD_CTX_init() call
tb [Fri, 9 Feb 2024 07:43:52 +0000 (07:43 +0000)]
Remove a useless EVP_MD_CTX_init() call

The hash was just created with EVP_MD_CTX_new(), so we memset a calloced
piece of memory to 0.

8 months agoAdd nochroot parameter to module_drop_privilege() so that modules can
yasuoka [Fri, 9 Feb 2024 07:41:32 +0000 (07:41 +0000)]
Add nochroot parameter to module_drop_privilege() so that modules can
use unveil(2) instead of chroot(2) if need.

8 months agoUpstream Linux finally settled on the compatible for the JH7100 Ethernet
kettenis [Thu, 8 Feb 2024 20:50:34 +0000 (20:50 +0000)]
Upstream Linux finally settled on the compatible for the JH7100 Ethernet
MAC.  Keep the preliminary one for now since the upstream device tree
doesn't include the USB controller yet.

ok miod@

8 months agoOops, commited wrong version of CLEANFILES in previous.
miod [Thu, 8 Feb 2024 20:30:54 +0000 (20:30 +0000)]
Oops, commited wrong version of CLEANFILES in previous.

8 months agoFeed more generated files to the clean target; joint work with naddy@
miod [Thu, 8 Feb 2024 20:28:53 +0000 (20:28 +0000)]
Feed more generated files to the clean target; joint work with naddy@

8 months agoinfcover: print size_t with %zu. from upstream
tb [Thu, 8 Feb 2024 17:49:27 +0000 (17:49 +0000)]
infcover: print size_t with %zu. from upstream

8 months agoAdd tests to make sure that snmpd adheres to the RFC2578 section 7.1
martijn [Thu, 8 Feb 2024 17:38:41 +0000 (17:38 +0000)]
Add tests to make sure that snmpd adheres to the RFC2578 section 7.1
octet string primitive limitations. The integer based ones are
restricted by the AgentX protocol and can't be tested.

8 months agoRFC2578 section 7.1 specifies the ranges and in the case of opaque the
martijn [Thu, 8 Feb 2024 17:34:09 +0000 (17:34 +0000)]
RFC2578 section 7.1 specifies the ranges and in the case of opaque the
format to which the values need to adhere. Implement checks, so that we
don't send illegal values to the client.

OK tb@

8 months agoNo that we load MIB files at snmpd start-up chances that the sleep build
martijn [Thu, 8 Feb 2024 17:09:51 +0000 (17:09 +0000)]
No that we load MIB files at snmpd start-up chances that the sleep build
into the regress test don't suffice anymore for slow regress machines.
(Ab)use the agentx socket (which gets created after all the MIB files
have been parsed) to detect if snmpd is available. For now we poll at
0.1s intervals for a total of 100 tries.

found by and earlier diff tested by and OK anton@

8 months agorepair QWX_DEBUG build
stsp [Thu, 8 Feb 2024 14:36:22 +0000 (14:36 +0000)]
repair QWX_DEBUG build

8 months agoimplement qwx_dp_tx_process_htt_tx_complete()
stsp [Thu, 8 Feb 2024 14:35:07 +0000 (14:35 +0000)]
implement qwx_dp_tx_process_htt_tx_complete()

8 months agofix qwx_dp_shadow_start_timer()
stsp [Thu, 8 Feb 2024 14:33:40 +0000 (14:33 +0000)]
fix qwx_dp_shadow_start_timer()

We must count all Tx attempts in order to avoid the Tx shadow
timeout handler resetting Tx ring pointers when it shouldn't.

8 months agoremove qwx(4) dp_tx debug prints which should not have been committed
stsp [Thu, 8 Feb 2024 14:31:53 +0000 (14:31 +0000)]
remove qwx(4) dp_tx debug prints which should not have been committed

8 months agoldo bits need to be shifted
jsg [Thu, 8 Feb 2024 13:00:21 +0000 (13:00 +0000)]
ldo bits need to be shifted

found by "'(data & (3 << 4)) == 1' is always false" smatch warning
tested by kettenis@ on VisionFive 2 1.2A and jmatthew@ on 1.3B
ok kettenis@

8 months agohandle qwx(4) firmware roaming events
stsp [Thu, 8 Feb 2024 11:23:33 +0000 (11:23 +0000)]
handle qwx(4) firmware roaming events

Gets rid of 'qwx_wmi_tlv_op_rx: unsupported event id 0xb001' in dmesg.
However, roaming does not work yet because the driver's newstate handler
does not handle resulting state transitions.

8 months agomark full qwx(4) Tx queues, such that the OACTIVE mechanism will be used
stsp [Thu, 8 Feb 2024 11:20:29 +0000 (11:20 +0000)]
mark full qwx(4) Tx queues, such that the OACTIVE mechanism will be used

Not quite tested yet. It is very hard to fill the queues at present
because Tx operation will freeze when we try. To be investigated next.

8 months agofix use of uninitialized variable m in qwx_dp_rx_reap_mon_status_ring()
stsp [Thu, 8 Feb 2024 11:16:49 +0000 (11:16 +0000)]
fix use of uninitialized variable m in qwx_dp_rx_reap_mon_status_ring()

Found by jsg@

8 months agofix uninitialized return from qwx_qmi_load_file_target_mem()
stsp [Thu, 8 Feb 2024 11:13:01 +0000 (11:13 +0000)]
fix uninitialized return from qwx_qmi_load_file_target_mem()

Fortunately this case could only be reached with an empty firmware file.

Found by jsg@

8 months agohandle fragmented mbuf DMA segments in the qwx(4) Tx path
stsp [Thu, 8 Feb 2024 11:09:53 +0000 (11:09 +0000)]
handle fragmented mbuf DMA segments in the qwx(4) Tx path

Fixes qwx0: failed to map Tx buffer: 27

8 months agoset the mbuf length for received data frames in qwx(4)
stsp [Thu, 8 Feb 2024 11:06:50 +0000 (11:06 +0000)]
set the mbuf length for received data frames in qwx(4)

Fixes CCMP decryption errors in the Rx path.

8 months agosync
deraadt [Thu, 8 Feb 2024 02:22:42 +0000 (02:22 +0000)]
sync

8 months agocorrect size in ipv6 address comparison
jsg [Thu, 8 Feb 2024 00:15:53 +0000 (00:15 +0000)]
correct size in ipv6 address comparison

found by "'&a->sin6_addr' too small (16 vs 28)" smatch error
ok jca@

8 months agocorrect size in mac address comparison
jsg [Thu, 8 Feb 2024 00:05:46 +0000 (00:05 +0000)]
correct size in mac address comparison

found by "'(selbs->ni_macaddr)' too small (6 vs 32)" smatch error
ok stsp@ jca@ phessler@

8 months agofix off-by-one in bounds test
jsg [Thu, 8 Feb 2024 00:00:16 +0000 (00:00 +0000)]
fix off-by-one in bounds test

found by "buffer overflow 'sc->sc_pins[i]->funcs' 10 <= 10" smatch error
ok miod@ kettenis@

8 months agofix anchortypes bounds test
jsg [Wed, 7 Feb 2024 23:53:44 +0000 (23:53 +0000)]
fix anchortypes bounds test

found by "buffer overflow 'anchortypes' 10 <= 12" smatch error
feedback and ok sashan@, ok miod@ on an earlier version

8 months agoAdd missing #ifdef INET6 to fix ramdisk build.
bluhm [Wed, 7 Feb 2024 23:52:20 +0000 (23:52 +0000)]
Add missing #ifdef INET6 to fix ramdisk build.

8 months agoUse the route generation number also for IPv6.
bluhm [Wed, 7 Feb 2024 23:40:40 +0000 (23:40 +0000)]
Use the route generation number also for IPv6.

Implement route6_cache() to check whether the cached route is still
valid and otherwise fill caching parameter of struct route_in6.
Also count cache hits and misses in netstat.  in_pcbrtentry() uses
route cache now.

OK claudio@

8 months agoAdd Allwinner H616 support.
kettenis [Wed, 7 Feb 2024 22:35:08 +0000 (22:35 +0000)]
Add Allwinner H616 support.

ok uaa@

8 months agoAdd Allwinner H616 support.
kettenis [Wed, 7 Feb 2024 22:34:39 +0000 (22:34 +0000)]
Add Allwinner H616 support.

ok uaa@

8 months agoadd allwinner H616 support
uaa [Wed, 7 Feb 2024 22:00:38 +0000 (22:00 +0000)]
add allwinner H616 support

ok kettenis@

8 months agoAdd and install the zonenow.tab file.
millert [Wed, 7 Feb 2024 21:24:58 +0000 (21:24 +0000)]
Add and install the zonenow.tab file.
This is a table where each row stands for a timezone where civil
timestamps are predicted to agree from now on.

8 months agoUse tlb_flush() rather than complete invalidation in pmap_set_modify().
miod [Wed, 7 Feb 2024 20:54:53 +0000 (20:54 +0000)]
Use tlb_flush() rather than complete invalidation in pmap_set_modify().
This has been missed in 1.68.

8 months agoriscv64 fix: Handle relaxation reductions of more than 65536 bytes
jca [Wed, 7 Feb 2024 20:54:20 +0000 (20:54 +0000)]
riscv64 fix: Handle relaxation reductions of more than 65536 bytes

Upstream commit:
https://github.com/llvm/llvm-project/commit/9d37ea95df1b84cca9b5e954d8964c976a5e303e

Already needed at least by ports/math/hdf5, prerequisite if we want to
enable linker relaxation (clang upstream defaults).

ok kettenis@

8 months agosync with base (comment-only change)
tb [Wed, 7 Feb 2024 20:52:55 +0000 (20:52 +0000)]
sync with base (comment-only change)

8 months agosync with upstream
tb [Wed, 7 Feb 2024 20:52:24 +0000 (20:52 +0000)]
sync with upstream

8 months agosync with zlib.h
tb [Wed, 7 Feb 2024 20:51:38 +0000 (20:51 +0000)]
sync with zlib.h

ok jmc

8 months agoSync doc-comment for deflateInit2 with upstream
tb [Wed, 7 Feb 2024 20:51:19 +0000 (20:51 +0000)]
Sync doc-comment for deflateInit2 with upstream

8 months agoFix signedness to make sure we don't left shift into the sign bit.
miod [Wed, 7 Feb 2024 20:32:54 +0000 (20:32 +0000)]
Fix signedness to make sure we don't left shift into the sign bit.

8 months agoInfer rdomains from environment variables N1 and N2 like many others in
anton [Wed, 7 Feb 2024 19:26:58 +0000 (19:26 +0000)]
Infer rdomains from environment variables N1 and N2 like many others in
regress/sys/net already does. No functional change as the defaults
remains the same.

8 months agoPrevent tuples to be used as map key, associative array is what we want.
mpi [Wed, 7 Feb 2024 19:07:42 +0000 (19:07 +0000)]
Prevent tuples to be used as map key, associative array is what we want.

8 months agolibkeynote: use DSA_generate_parameters_ex()
tb [Wed, 7 Feb 2024 17:22:01 +0000 (17:22 +0000)]
libkeynote: use DSA_generate_parameters_ex()

DSA_generate_parameters() was deprecated in 2002. Its removal was blocked
because someone added "enhanced DSA support" to rust-openssl. Fortunately
this was fixed recently by the pyca people. So we can remove it now.

Of course, DSA_generate_parameters_ex() wasn't an improvement. While it no
longer uses the old callback version, it also needs a DSA object passed in
thus making it more annoying for callers.

ok jsing

8 months agoLet the config parser make use of the mib_string2oid().
martijn [Tue, 6 Feb 2024 15:36:11 +0000 (15:36 +0000)]
Let the config parser make use of the mib_string2oid().
If a descriptor is not found in the loaded MIB files it falls back to
the old smi_oid2string(), which then throws a deprecation warning. This
won't trigger for most cases in the default install, but the
UCD-DISKIO-MIB and dependencies aren't included (yet?) (which can be
fixed by manually including them via "mib directory") and there's a
couple of misspellings (e.g. mib_2 vs mib-2, and
usmStatsNotInTimeWindow vs usmStatsNotInTimeWindows).

Feedback and OK tb@

8 months agoimplement basic bpf(4) support for qwx(4)
stsp [Tue, 6 Feb 2024 14:18:15 +0000 (14:18 +0000)]
implement basic bpf(4) support for qwx(4)

This is sufficient to capture 802.11 frames with tcpdump -y IEEE802_11_RADIO.
Meta-data such as RSSI and channel number is not yet recorded.

8 months agoPass struct iked directly to ca_reset() instead of passing it via ps
tobhe [Tue, 6 Feb 2024 13:10:56 +0000 (13:10 +0000)]
Pass struct iked directly to ca_reset() instead of passing it via ps

discussed with markus@

8 months agoReplace most smi_oid2string() calls with the new mib_oid2string().
martijn [Tue, 6 Feb 2024 12:44:27 +0000 (12:44 +0000)]
Replace most smi_oid2string() calls with the new mib_oid2string().
smi_oid2string() is still called from trap handle context to not break
any existing scripts.

OK tb@

8 months agoLoad MIB files during startup. The default directory is
martijn [Tue, 6 Feb 2024 12:39:13 +0000 (12:39 +0000)]
Load MIB files during startup. The default directory is
/usr/share/snmp/mibs, but one or more directories can be configured via
the "mib directory" option.

OK tb@

8 months agoFix the radius standard module to remove the specified attribute from
yasuoka [Tue, 6 Feb 2024 10:53:20 +0000 (10:53 +0000)]
Fix the radius standard module to remove the specified attribute from
response properly.

9 months agoTweak previous. Passing "dns" to pledge(2) is suitable for the purpose.
yasuoka [Tue, 6 Feb 2024 05:39:28 +0000 (05:39 +0000)]
Tweak previous.  Passing "dns" to pledge(2) is suitable for the purpose.

input deraadt, ok tobhe

9 months agoAdd risc-v support code for clang -msave-restore
jca [Tue, 6 Feb 2024 05:07:28 +0000 (05:07 +0000)]
Add risc-v support code for clang -msave-restore

ok kettenis@

9 months agoFix RTARCH in our Makefile and lets us access riscv-specific implementations
jca [Tue, 6 Feb 2024 05:00:12 +0000 (05:00 +0000)]
Fix RTARCH in our Makefile and lets us access riscv-specific implementations

This brings us fp_mode.c used in softfloat code, and muldi3.S used when
the target ISA doesn't have the Multiply extension.

ok kettenis@

9 months agodrm/amdgpu: Fix missing error code in 'gmc_v6/7/8/9_0_hw_init()'
jsg [Tue, 6 Feb 2024 04:07:51 +0000 (04:07 +0000)]
drm/amdgpu: Fix missing error code in 'gmc_v6/7/8/9_0_hw_init()'

From Srinivasan Shanmugam
7110e98840ee6b7009304b1e41c8e6930452a48e in linux-6.6.y/6.6.16
16da399091dca3d1e48109086403587af37cc196 in mainline linux

9 months agodrm/amdkfd: only flush mes process context if mes support is there
jsg [Tue, 6 Feb 2024 04:05:39 +0000 (04:05 +0000)]
drm/amdkfd: only flush mes process context if mes support is there

From Jonathan Kim
3c0a7eac9e7883317e2010bc525a3f1c4847587c in linux-6.6.y/6.6.16
24149412dfc71f7f4a54868702e9145e396263d3 in mainline linux

9 months agodrm: using mul_u32_u32() requires linux/math64.h
jsg [Tue, 6 Feb 2024 04:04:12 +0000 (04:04 +0000)]
drm: using mul_u32_u32() requires linux/math64.h

From Stephen Rothwell
8de8f000ffe1c930d0cdf73cfce91b0d1746c3bc in linux-6.6.y/6.6.16
933a2a376fb3f22ba4774f74233571504ac56b02 in mainline linux

9 months agodrm/amdkfd: Fix 'node' NULL check in 'svm_range_get_range_boundaries()'
jsg [Tue, 6 Feb 2024 04:01:06 +0000 (04:01 +0000)]
drm/amdkfd: Fix 'node' NULL check in 'svm_range_get_range_boundaries()'

From Srinivasan Shanmugam
5ea4007636b27800fa01555428aa9c198aeb5bf4 in linux-6.6.y/6.6.16
d7a254fad873775ce6c32b77796c81e81e6b7f2e in mainline linux

9 months agodrm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()'
jsg [Tue, 6 Feb 2024 03:59:48 +0000 (03:59 +0000)]
drm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()'

From Srinivasan Shanmugam
25c2de1fbd8ee13008791a3c131f5fed02b3ccec in linux-6.6.y/6.6.16
8a44fdd3cf91debbd09b43bd2519ad2b2486ccf4 in mainline linux

9 months agodrm/amdgpu: Fix with right return code '-EIO' in 'amdgpu_gmc_vram_checking()'
jsg [Tue, 6 Feb 2024 03:58:02 +0000 (03:58 +0000)]
drm/amdgpu: Fix with right return code '-EIO' in 'amdgpu_gmc_vram_checking()'

From Srinivasan Shanmugam
b02831b8a5b687138df4662ff914aa3defc2499e in linux-6.6.y/6.6.16
fac4ebd79fed60e79cccafdad45a2bb8d3795044 in mainline linux

9 months agodrm/amd/powerplay: Fix kzalloc parameter 'ATOM_Tonga_PPM_Table' in 'get_platform_powe...
jsg [Tue, 6 Feb 2024 03:56:23 +0000 (03:56 +0000)]
drm/amd/powerplay: Fix kzalloc parameter 'ATOM_Tonga_PPM_Table' in 'get_platform_power_management_table()'

From Srinivasan Shanmugam
0ee4c5829fb3cfb8b168956be9a28ede5996a8f8 in linux-6.6.y/6.6.16
6616b5e1999146b1304abe78232af810080c67e3 in mainline linux

9 months agodrm/amdgpu: fix avg vs input power reporting on smu7
jsg [Tue, 6 Feb 2024 03:55:02 +0000 (03:55 +0000)]
drm/amdgpu: fix avg vs input power reporting on smu7

From Alex Deucher
d0bc6be623ba7270ad71fee9a8af6843420e7191 in linux-6.6.y/6.6.16
25852d4b97572ff62ffee574cb8bb4bc551af23a in mainline linux

9 months agodrm/amdkfd: Fix lock dependency warning with srcu
jsg [Tue, 6 Feb 2024 03:53:15 +0000 (03:53 +0000)]
drm/amdkfd: Fix lock dependency warning with srcu

From Philip Yang
752312f6a79440086ac0f9b08d7776870037323c in linux-6.6.y/6.6.16
2a9de42e8d3c82c6990d226198602be44f43f340 in mainline linux

9 months agodrm/amdkfd: Fix lock dependency warning
jsg [Tue, 6 Feb 2024 03:51:59 +0000 (03:51 +0000)]
drm/amdkfd: Fix lock dependency warning

From Felix Kuehling
28d2d623d2fbddcca5c24600474e92f16ebb3a05 in linux-6.6.y/6.6.16
47bf0f83fc86df1bf42b385a91aadb910137c5c9 in mainline linux

9 months agodrm/amdgpu: apply the RV2 system aperture fix to RN/CZN as well
jsg [Tue, 6 Feb 2024 03:50:16 +0000 (03:50 +0000)]
drm/amdgpu: apply the RV2 system aperture fix to RN/CZN as well

From Alex Deucher
08dde830ab24cfcb855b198f7dbe7d3637f623bc in linux-6.6.y/6.6.16
16783d8ef08448815e149e40c82fc1e1fc41ddbf in mainline linux

9 months agodrm/amdkfd: Fix iterator used outside loop in 'kfd_add_peer_prop()'
jsg [Tue, 6 Feb 2024 03:47:54 +0000 (03:47 +0000)]
drm/amdkfd: Fix iterator used outside loop in 'kfd_add_peer_prop()'

From Srinivasan Shanmugam
583e0a336bfbf3f2fb2badc7d1980dadfb3611f0 in linux-6.6.y/6.6.16
b1a428b45dc7e47c7acc2ad0d08d8a6dda910c4c in mainline linux

9 months agodrm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()'
jsg [Tue, 6 Feb 2024 03:46:37 +0000 (03:46 +0000)]
drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()'

From Srinivasan Shanmugam
ff5aefbbd82ea7eee61606ff7cce56bfac269010 in linux-6.6.y/6.6.16
bf2ad4fb8adca89374b54b225d494e0b1956dbea in mainline linux

9 months agodrm/amdgpu: Fix '*fw' from request_firmware() not released in 'amdgpu_ucode_request()'
jsg [Tue, 6 Feb 2024 03:45:17 +0000 (03:45 +0000)]
drm/amdgpu: Fix '*fw' from request_firmware() not released in 'amdgpu_ucode_request()'

From Srinivasan Shanmugam
aa1791b280ed36005226e031a622091fa7e5382e in linux-6.6.y/6.6.16
13a1851f923d9a7a78a477497295c2dfd16ad4a4 in mainline linux

9 months agoRe-revert "drm/amd/display: Enable Replay for static screen use cases"
jsg [Tue, 6 Feb 2024 03:43:45 +0000 (03:43 +0000)]
Re-revert "drm/amd/display: Enable Replay for static screen use cases"

From Ivan Lipski
90df72694a5b7ca2a415eb3baeb9f385cee8033c in linux-6.6.y/6.6.16
d6398866a6b47e92319ef6efdb0126a4fbb7796a in mainline linux

9 months agodrm/amdgpu: Let KFD sync with VM fences
jsg [Tue, 6 Feb 2024 03:40:18 +0000 (03:40 +0000)]
drm/amdgpu: Let KFD sync with VM fences

From Felix Kuehling
0d35c8977be8f220931d437d568f64a7028d0115 in linux-6.6.y/6.6.16
ec9ba4821fa52b5efdbc4cdf0a77497990655231 in mainline linux

9 months agodrm/amd/display: Fix minor issues in BW Allocation Phase2
jsg [Tue, 6 Feb 2024 03:38:48 +0000 (03:38 +0000)]
drm/amd/display: Fix minor issues in BW Allocation Phase2

From Meenakshikumar Somasundaram
cef7f96a0a4c00f761248cd714b086c1256992cb in linux-6.6.y/6.6.16
aa5dc05340eb97486a631ce6bccb8d020bf6b56b in mainline linux

9 months agodrm/amdgpu: Fix ecc irq enable/disable unpaired
jsg [Tue, 6 Feb 2024 03:36:14 +0000 (03:36 +0000)]
drm/amdgpu: Fix ecc irq enable/disable unpaired

From Stanley Yang
0a8fc4e007b933d46f079a1d9ab8539a4d8439ef in linux-6.6.y/6.6.16
a32c6f7f5737cc7e31cd7ad5133f0d96fca12ea6 in mainline linux

9 months agodrm/amd/display: Only clear symclk otg flag for HDMI
jsg [Tue, 6 Feb 2024 03:34:28 +0000 (03:34 +0000)]
drm/amd/display: Only clear symclk otg flag for HDMI

From Alvin Lee
49b4cab7bcbdfe621162405502283fc9cb3ef77f in linux-6.6.y/6.6.16
dff45f03f508c92cd8eb2050e27b726726b8ae0b in mainline linux

9 months agodrm/amd/display: make flip_timestamp_in_us a 64-bit variable
jsg [Tue, 6 Feb 2024 03:32:50 +0000 (03:32 +0000)]
drm/amd/display: make flip_timestamp_in_us a 64-bit variable

From Josip Pavic
4033887acddcbb15280091f0a125ac0829cffdc8 in linux-6.6.y/6.6.16
6fb12518ca58412dc51054e2a7400afb41328d85 in mainline linux