CVS: cvs.openbsd.org: src

2024-04-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 19:15:33

Modified files:
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316: dcn316_clk_mgr.c 

Log message:
drm/amd/display: fix disable otg wa logic in DCN316

>From Fudongwang
50971570ba79e421e0df8785dd58f4b696c8c1b7 in linux-6.6.y/6.6.28
cf79814cb0bf5749b9f0db53ca231aa540c02768 in mainline linux



CVS: cvs.openbsd.org: src

2024-04-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 19:13:07

Modified files:
sys/dev/pci/drm/amd/display/amdgpu_dm: amdgpu_dm.c 

Log message:
drm/amd/display: Set VSC SDP Colorimetry same way for MST and SST

>From Harry Wentland
5ca6cbd8adbedd4aa2ef7e77aa31354f6dfee573 in linux-6.6.y/6.6.28
c3e2a5f2da904a18661335e8be2b961738574998 in mainline linux



CVS: cvs.openbsd.org: src

2024-04-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 19:10:52

Modified files:
sys/dev/pci/drm/amd/display/amdgpu_dm: amdgpu_dm.c 

Log message:
drm/amd/display: Program VSC SDP colorimetry for all DP sinks >= 1.4

>From Harry Wentland
b12c3cfd8265f69d238b4a3200d8755f609e9e58 in linux-6.6.y/6.6.28
9e61ef8d219877202d4ee51d0d2ad9072c99a262 in mainline linux



CVS: cvs.openbsd.org: src

2024-04-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 19:08:20

Modified files:
sys/dev/pci/drm/amd/amdgpu: gfx_v11_0.c 

Log message:
drm/amdgpu: fix incorrect number of active RBs for gfx11

>From Tim Huang
bd3105a71d1c125deedf35be11b4d79e8b84e6f2 in linux-6.6.y/6.6.28
bbca7f414ae9a12ea231cdbafd79c607e3337ea8 in mainline linux



CVS: cvs.openbsd.org: src

2024-04-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 19:06:33

Modified files:
sys/dev/pci/drm/amd/amdgpu: soc21.c 

Log message:
drm/amdgpu: always force full reset for SOC21

>From Alex Deucher
fa2df4aa3e3aeae02adc9b4b4f43b7b69b63e5cf in linux-6.6.y/6.6.28
65ff8092e4802f96d87d3d7cde146961f5228265 in mainline linux



CVS: cvs.openbsd.org: src

2024-04-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 19:04:42

Modified files:
sys/dev/pci/drm/amd/amdgpu: soc21.c 

Log message:
drm/amdgpu: Reset dGPU if suspend got aborted

>From Lijo Lazar
1520bf605d2ff0d733648713b5485865dde0dea9 in linux-6.6.y/6.6.28
8b2be55f4d6c1099d7f629b0ed7535a5be788c83 in mainline linux



CVS: cvs.openbsd.org: src

2024-04-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 19:02:16

Modified files:
sys/dev/pci/drm/i915/display: intel_ddi.c 

Log message:
drm/i915: Disable port sync when bigjoiner is used

>From Ville Syrjala
2708354ffb70c0a6ec8dd6944077ca7e50a2688b in linux-6.6.y/6.6.28
0653d501409eeb9f1deb7e4c12e4d0d2c9f1cba1 in mainline linux



CVS: cvs.openbsd.org: src

2024-04-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 19:00:30

Modified files:
sys/dev/pci/drm/i915/display: intel_cdclk.c intel_cdclk.h 

Log message:
drm/i915/cdclk: Fix CDCLK programming order when pipes are active

>From Ville Syrjala
d1742f77bdf28ffd37a9bd94934a2d261e85de33 in linux-6.6.y/6.6.28
7b1f6b5aaec0f849e19c3e99d4eea75876853cdd in mainline linux



CVS: cvs.openbsd.org: src

2024-04-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 18:58:03

Modified files:
sys/dev/pci/drm: drm_client_modeset.c 

Log message:
drm/client: Fully protect modes[] with dev->mode_config.mutex

>From Ville Syrjala
04e018bd913d3d3336ab7d21c2ad31a9175fe984 in linux-6.6.y/6.6.28
3eadd887dbac1df8f25f701e5d404d1b90fd0fea in mainline linux



CVS: cvs.openbsd.org: src

2024-04-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 18:56:11

Modified files:
sys/dev/pci/drm/amd/amdkfd: kfd_device_queue_manager.c 

Log message:
drm/amdkfd: Reset GPU on queue preemption failure

>From Harish Kasiviswanathan
4d87f08eb75513334a85458306373d7560af1017 in linux-6.6.y/6.6.28
8bdfb4ea95ca738d33ef71376c21eba20130f2eb in mainline linux



CVS: cvs.openbsd.org: src

2024-04-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 18:54:36

Modified files:
sys/dev/pci/drm/i915/display: intel_vrr.c 

Log message:
drm/i915/vrr: Disable VRR when using bigjoiner

>From Ville Syrjala
f9b31dfdc0b5a04fb78cde6d2c64e54607dd316d in linux-6.6.y/6.6.28
dcd8992e47f13afb5c11a61e8d9c141c35e23751 in mainline linux



CVS: cvs.openbsd.org: src

2024-04-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 18:52:17

Modified files:
sys/dev/pci/drm/amd/pm/swsmu/smu13: smu_v13_0_4_ppt.c 

Log message:
drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11

>From Tim Huang
1e3b8874d55c0c28378beb9007494a7a9269a5f5 in linux-6.6.y/6.6.28
31729e8c21ecfd671458e02b6511eb68c2225113 in mainline linux



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 17:24:18

Modified files:
lib/libcrypto/ec: ec_asn1.c 

Log message:
Remove comments from captain obvious and drop useless prototypes



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 16:48:17

Modified files:
regress/lib/libssl/symbols: symbols.awk 

Log message:
SSL_version_str is no more



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 16:43:42

Modified files:
lib/libcrypto  : o_fips.c 

Log message:
tidy includes



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 15:55:43

Modified files:
lib/libcrypto/bn: bn_convert.c 

Log message:
bn_convert: zap extra blank line



CVS: cvs.openbsd.org: src

2024-04-17 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2024/04/17 14:48:51

Modified files:
sys/netinet: in_pcb.c in_pcb.h ip_ipsp.h ip_output.c 
 ip_spd.c ip_var.h raw_ip.c tcp_input.c 
 tcp_output.c tcp_subr.c udp_usrreq.c 
sys/netinet6   : ip6_output.c ip6_var.h raw_ip6.c udp6_output.c 
usr.bin/netstat: inet.c 

Log message:
Use struct ipsec_level within inpcb.

Instead of passing around u_char[4], introduce struct ipsec_level
that contains 4 ipsec levels.  This provides better type safety.
The embedding struct inpcb is globally visible for netstat(1), so
put struct ipsec_level outside of #ifdef _KERNEL.

OK deraadt@ mvs@



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 14:47:36

Modified files:
distrib/sets/lists/comp: mi 

Log message:
sync



CVS: cvs.openbsd.org: src

2024-04-17 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 12:12:12

Modified files:
bin/pax: extern.h options.c tar.c 

Log message:
Provide a pax format specific option handler

The existing tar_opt() implements support for -o write_opt=nodir for the
old tar and ustar formats. We don't really want to support it for the
pax format, and we want to be able to implement pax format specific
options (even if there are none right now).  ok millert@



CVS: cvs.openbsd.org: src

2024-04-17 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 09:48:44

Modified files:
bin/pax: pax.1 

Log message:
Fold long line



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 09:03:22

Modified files:
usr.sbin/rpki-client: parser.c 

Log message:
Simplify super ugly exit path

ok job



CVS: cvs.openbsd.org: src

2024-04-17 Thread Job Snijders
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 09:00:50

Modified files:
usr.sbin/rpki-client: parser.c 

Log message:
Remove outdated (now inaccurate) warning message

OK tb@



CVS: cvs.openbsd.org: src

2024-04-17 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2024/04/17 08:47:17

Modified files:
lib/libcrypto/bn: bn_convert.c 

Log message:
Rewrite BN_mpi2bn() using CBS and bn_bin2bn_cbs().

ok tb@



CVS: cvs.openbsd.org: src

2024-04-17 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2024/04/17 08:45:46

Modified files:
lib/libcrypto/bn: bn_convert.c 

Log message:
Rewrite BN_lebin2bn() using CBS.

We get an implementation of this for free by having bn_bin2bn_cbs() use
CBS_get_u8() instead of CBS_get_last_u8().

ok tb@



CVS: cvs.openbsd.org: src

2024-04-17 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2024/04/17 08:43:37

Modified files:
lib/libcrypto  : crypto_internal.h 

Log message:
Provide constant time operations for uint8_t.

These will be used in upcoming changes.

ok tb@



CVS: cvs.openbsd.org: src

2024-04-17 Thread Job Snijders
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 08:31:59

Modified files:
etc/rpki   : apnic.constraints arin.constraints 
 lacnic.constraints ripe.constraints 

Log message:
Sync RPKI Trust Anchor constraints to nro-delegated-stats

Turns out that registry at 
https://www.iana.org/assignments/as-numbers/as-numbers.xml
is an incomplete one, where only 'new' assignments are listed. In the
past this registry used to list all ASNs, but the RIRs asked IANA to
revert to not being very detailed...

There is another source of truth, the 'nro-delegated-stats' file at
https://ftp.ripe.net/pub/stats/ripencc/nro-stats/latest/nro-delegated-stats
this is updated daily and composed of information from each RIR.

Summary of changes:

* LACNIC manages a more ASNs than previously known:
- allow those ASNs for LACNIC
- deny those for RIPE, APNIC, ARIN

* AFRINIC's allow list was good (compared to nro-delegated-stats), but the
full set of AfriNIC ASNs wasn't denylisted for RIPE, ARIN, APNIC.

OK tb@



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 08:01:33

Modified files:
lib/libcrypto/ec: ec_ameth.c 

Log message:
Shuffle EVP_PKEY_CTX setting together

Another stroke of the already very dirty brush eliminates more traces
of ADHD and/or crack.

ok jsing



CVS: cvs.openbsd.org: src

2024-04-17 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2024/04/17 08:01:17

Modified files:
usr.sbin/rpki-client: http.c 

Log message:
Set Accept: */* HTTP header like it was done in ftp(1).
OK tb@ job@



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 08:00:18

Modified files:
lib/libcrypto/ec: ec_ameth.c 

Log message:
ecdh_cms_encrypt(): tweak wrap_algor construction

This manually constructs an X509_ALGOR because the (now internal) legacy
interface EVP_CIPHER_param_to_asn1() (which is an unwelcome complication
thanks to RC2) is entirely incompatible with X509_ALGOR_set0() since
the ASN1_TYPE can't be pulled apart nicely (because the ASN1_TYPE API
is incomplete as well).

Once we got this far, we get to DER-encode the inner AlgorithmIdentifier
and set that blob as the parameters of another one. The same variables
are reused of course and needless to say an unchecked X509_ALGOR_set0()
would leak this blob on failure. So fix this by switching to the usual
error checked X509_ALGOR_set0_by_nid().

ok jsing



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 07:58:55

Modified files:
lib/libcrypto/ec: ec_ameth.c 

Log message:
ecdh_cms_encrypt: tweak handling of ecdh_nid

ok jsing



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 07:57:58

Modified files:
lib/libcrypto/ec: ec_ameth.c 

Log message:
ecdh_cms_encrypt: handle kdf_md in one go

Again the getting and the setting were interrupted by ten lines of
completely unrelated code.

ok jsing



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 07:56:36

Modified files:
lib/libcrypto/ec: ec_ameth.c 

Log message:
ecdh_cms_encrypt: simplify setting the KDF type

It is much simpler to avoid the key_type variable altogether and inline
its use. Also it makes no sense to have 15 unrelated lines between the
getting of the kdf type, checking its content, and then actually setting
it to EVP_PKEY_ECDH_KDF_X9_63.

ok jsing



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 07:54:39

Modified files:
lib/libcrypto/ec: ec_ameth.c 

Log message:
Use error checked X509_ALGOR_set0_by_nid

While setting the parameters to type V_ASN1_UNDEF can't actually fail,
it is cleaner to just do the check. Using the by_nid() variant also
removes the need for an unchecked nested OBJ_nid2obj() call.

ok jsing



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 07:51:41

Modified files:
lib/libcrypto/ec: ec_ameth.c 

Log message:
ecdh_cms_encrypt: simplify handling of pkey

The pkey is only used in one scope. i2o allocates if passed a pointer
to NULL, so use that to drop two unnecessary local variables.

ok jsing



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 07:50:01

Modified files:
lib/libcrypto/ec: ec_ameth.c 

Log message:
Transfer ownership before setting unused bits

This looks like a use after free, but setting the unused bits to 0
can't actually fail.

ok jsing



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 07:49:18

Modified files:
lib/libcrypto/ec: ec_ameth.c 

Log message:
Turn ecdh_cms_encrypt() into single exit

Also use ret instead of rv.

ok jsing



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 07:47:18

Modified files:
lib/libcrypto/ec: ec_ameth.c 

Log message:
Fix error check in ecdh_cms_encrypt()

ASN1_TYPE_get() returns V_ASN1_* constants.  Checking the return for
NID_undef instead means that we actually check for V_ASN1_EOC, which
makes absolutely no sense here. Clearly V_ASN1_UNDEF was intended.

ok jsing



CVS: cvs.openbsd.org: src

2024-04-17 Thread Stuart Henderson
CVSROOT:/cvs
Module name:src
Changes by: st...@cvs.openbsd.org   2024/04/17 07:34:23

Modified files:
share/man/man5 : python-module.5 

Log message:
change docs for MODPY_PYBUILD=other



CVS: cvs.openbsd.org: src

2024-04-17 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2024/04/17 07:17:31

Modified files:
sys/uvm: uvm_amap.c 

Log message:
Remove a micro optimization to free pages in batch in amap_wipeout().

The contention on uvm_lock_fpageq() is now reduced by using per-CPU caches,
so we want to put pages on the cache and not give them back directly to the
allocator.

ok kettenis@



CVS: cvs.openbsd.org: src

2024-04-17 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2024/04/17 07:12:58

Modified files:
usr.bin/systat : uvm.c 
usr.bin/vmstat : vmstat.c 
sys/arch/amd64/include: cpu.h 
sys/arch/arm64/include: cpu.h 
sys/arch/i386/include: cpu.h 
sys/uvm: uvm_page.c uvm_pdaemon.c uvm_pmemrange.c 
 uvm_pmemrange.h uvmexp.h 
Added files:
sys/uvm: uvm_percpu.h 

Log message:
Add per-CPU caches to the pmemrange allocator.

The caches are used primarily to reduce contention on uvm_lock_fpageq() during
concurrent page faults.  For the moment only uvm_pagealloc() tries to get a
page from the current CPU's cache.  So on some architectures the caches are
also used by the pmap layer.

Each cache is composed of two magazines, design is borrowed from jeff bonwick
vmem's paper and the implementation is similar to the one of pool_cache from
dlg@.  However there is no depot layer and magazines are refilled directly by
the pmemrange allocator.

Tested by robert@, claudio@ and Laurence Tratt.

ok kettenis@



CVS: cvs.openbsd.org: www

2024-04-17 Thread Stuart Henderson
CVSROOT:/cvs
Module name:www
Changes by: st...@cvs.openbsd.org   2024/04/17 06:43:38

Modified files:
images/hackathons: p2k24-s.gif p2k24.png 

Log message:
adjust images



Re: CVS: cvs.openbsd.org: src

2024-04-17 Thread Alexander Bluhm
On Wed, Apr 17, 2024 at 08:55:38AM +0200, Anton Lindqvist wrote:
> On Tue, Apr 16, 2024 at 08:37:49AM -0600, Florian Obser wrote:
> > CVSROOT:/cvs
> > Module name:src
> > Changes by: flor...@cvs.openbsd.org 2024/04/16 08:37:49
> >
> > Modified files:
> > sys/netinet6   : in6.c
> >
> > Log message:
> > Destination addresses make no sense on loopback interfaces.
> >
> > While here use (variable & FLAG) or !(variable & FLAG) consistently in
> > in6_update_ifa().
> >
> > Discussed with claudio
> > OK denis
>
> This change introduced 15 regress failures, all related to inet6.
>
>   https://regress.basename.se/
>
> Excerpt from sys/net/mpath showing the symptom:
>
>   doas -n /sbin/ifconfig lo19 inet6 fc00::19 alias
>   ifconfig: lo19: SIOCIFAFATTACH: Invalid argument
>   ifconfig: SIOCAIFADDR: Invalid argument

Localhost ::1 and all inet6 adresses are missing at loopback.

==> /etc/hostname.lo0 <==
inet alias 10.188.0.74 255.255.255.255
inet6 fdd7:e83e:66bc:0::74 128

before

# ifconfig lo0
lo0: flags=2008049 mtu 32768
index 5 priority 0 llprio 3
groups: lo
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet 127.0.0.1 netmask 0xff00
inet 10.188.0.74 netmask 0x
inet6 fdd7:e83e:66bc::74 prefixlen 128

after

# ifconfig lo0
lo0: flags=2008049 mtu 32768
index 5 priority 0 llprio 3
groups: lo
inet 127.0.0.1 netmask 0xff00
inet 10.188.0.74 netmask 0x



CVS: cvs.openbsd.org: src

2024-04-17 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2024/04/17 04:19:17

Modified files:
bin/pax: options.c 

Log message:
Fixup comment

Spotted by caspar@ earlier



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 03:51:18

Modified files:
usr.bin/ftp: fetch.c 

Log message:
ftp: send 'Accept */*' header

A recent update to filezilla showed a server that would refuse to let us
download the distfile without us sending this header. Browsers, curl and
wget do so, so it should be safe for us to follow suit.

ok deraadt florian phessler sthen



CVS: cvs.openbsd.org: src

2024-04-17 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2024/04/17 03:41:44

Modified files:
sys/kern   : kern_resource.c 

Log message:
dogetrusage() must be called with the KERNEL_LOCK held for now.
OK mpi@



CVS: cvs.openbsd.org: www

2024-04-17 Thread Stuart Henderson
CVSROOT:/cvs
Module name:www
Changes by: st...@cvs.openbsd.org   2024/04/17 03:31:14

Modified files:
.  : hackathons.html 

Log message:
fix year, pointed out by Pablo Méndez Hernández



Re: CVS: cvs.openbsd.org: src

2024-04-17 Thread Florian Obser
reverted, sorry for the breakage, I did my tests on an old kernel :(

On 2024-04-17 02:07 -06, Theo de Raadt  wrote:
> There's a long history of using loX interfaces for such things.
>
> What might make sense is to restrict it on lo0 ?
>

it's not about configuring additional IP addresses on loopback
interfaces but on how they are configured.
What ifconfig does internally is set a *destination* of ::1, i.e. as if
called like this:

/sbin/ifconfig lo19 inet6 fc00::19/128 ::1

I suspect that something somewhere in our stack depends on ::1 being
there to deliver packets correctly. I'll leave this alone and punt it to
future IPv6 hackers.

I think we probably should enforce in the kernel that ifconfig sends us
::1 as the destination address and nothing else.

>>On Tue, Apr 16, 2024 at 08:37:49AM -0600, Florian Obser wrote:
>>> CVSROOT:/cvs
>>> Module name:src
>>> Changes by: flor...@cvs.openbsd.org 2024/04/16 08:37:49
>>> 
>>> Modified files:
>>> sys/netinet6   : in6.c 
>>> 
>>> Log message:
>>> Destination addresses make no sense on loopback interfaces.
>>> 
>>> While here use (variable & FLAG) or !(variable & FLAG) consistently in
>>> in6_update_ifa().
>>> 
>>> Discussed with claudio
>>> OK denis
>>
>>This change introduced 15 regress failures, all related to inet6.
>>
>>  https://regress.basename.se/
>>
>>Excerpt from sys/net/mpath showing the symptom:
>>
>>  doas -n /sbin/ifconfig lo19 inet6 fc00::19 alias
>>  ifconfig: lo19: SIOCIFAFATTACH: Invalid argument
>>  ifconfig: SIOCAIFADDR: Invalid argument
>>
>>
>

-- 
In my defence, I have been left unsupervised.



CVS: cvs.openbsd.org: src

2024-04-17 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2024/04/17 02:51:11

Modified files:
regress/lib/libcrypto/bn: bn_convert.c 

Log message:
Add regress coverage for BN_lebin2bn().



CVS: cvs.openbsd.org: src

2024-04-17 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2024/04/17 02:36:30

Modified files:
sys/netinet6   : in6.c 

Log message:
Revert previous, it breaks IPv6 on loopback interfaces.

Reported by bket & anton



CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2024/04/17 02:24:11

Modified files:
lib/libcrypto/evp: pmeth_gn.c 

Log message:
Avoid NULL dereference in EVP_PKEY_paramgen()

If EVP_PKEY_new() returns NULL, it would be passed to the paramgen() pmeth
which would typically dereference it. This is identical to a recent change
in keygen().

ok jsing



Re: CVS: cvs.openbsd.org: src

2024-04-17 Thread Theo de Raadt
There's a long history of using loX interfaces for such things.

What might make sense is to restrict it on lo0 ?

>On Tue, Apr 16, 2024 at 08:37:49AM -0600, Florian Obser wrote:
>> CVSROOT: /cvs
>> Module name: src
>> Changes by:  flor...@cvs.openbsd.org 2024/04/16 08:37:49
>> 
>> Modified files:
>>  sys/netinet6   : in6.c 
>> 
>> Log message:
>> Destination addresses make no sense on loopback interfaces.
>> 
>> While here use (variable & FLAG) or !(variable & FLAG) consistently in
>> in6_update_ifa().
>> 
>> Discussed with claudio
>> OK denis
>
>This change introduced 15 regress failures, all related to inet6.
>
>   https://regress.basename.se/
>
>Excerpt from sys/net/mpath showing the symptom:
>
>   doas -n /sbin/ifconfig lo19 inet6 fc00::19 alias
>   ifconfig: lo19: SIOCIFAFATTACH: Invalid argument
>   ifconfig: SIOCAIFADDR: Invalid argument
>
>



Re: CVS: cvs.openbsd.org: src

2024-04-17 Thread Anton Lindqvist
On Tue, Apr 16, 2024 at 08:37:49AM -0600, Florian Obser wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   flor...@cvs.openbsd.org 2024/04/16 08:37:49
> 
> Modified files:
>   sys/netinet6   : in6.c 
> 
> Log message:
> Destination addresses make no sense on loopback interfaces.
> 
> While here use (variable & FLAG) or !(variable & FLAG) consistently in
> in6_update_ifa().
> 
> Discussed with claudio
> OK denis

This change introduced 15 regress failures, all related to inet6.

https://regress.basename.se/

Excerpt from sys/net/mpath showing the symptom:

doas -n /sbin/ifconfig lo19 inet6 fc00::19 alias
ifconfig: lo19: SIOCIFAFATTACH: Invalid argument
ifconfig: SIOCAIFADDR: Invalid argument



CVS: cvs.openbsd.org: src

2024-04-17 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2024/04/17 00:18:18

Modified files:
regress/usr.bin/snmp: Makefile 

Log message:
Only use the first egress interface in $IFIDX and $IFLLADDR. Systems
can have more then one interface.
This only works if ther first egress interface is a ethernet interface
(P2P interfaces have no LLADDR) but that was already buggy before this.
OK bluhm@ martijn@