Re: [www] fix broken links on loongson.html

2023-08-05 Thread Moritz Buhl
Hi, I noticed this today and commited your change. mbuhl On Tue, Jun 02, 2020 at 12:33:36PM +, Yifei Zhan wrote: > Hi, > > Several links on loongson.html are now broken as zkml.lemote.com is no > longer being resolved. > > I think it's a good idea to redirect them to their archived

use designated initializer for ffs_vtbl

2023-04-14 Thread Moritz Buhl
Dear tech, while reading through ffs code I was looking for calls to ffs_truncate. This would have saved me a few seconds. OK? mbuhl Index: ufs/ffs/ffs_vfsops.c === RCS file: /cvs/src/sys/ufs/ffs/ffs_vfsops.c,v retrieving revision

Re: installer: rpi: make softraid install work

2023-04-04 Thread Moritz Buhl
On Mon, Apr 03, 2023 at 05:53:49PM +, Klemens Nanni wrote: > 03.04.2023 15:03, Klemens Nanni пишет: > > This means no behaviour change for plain installs, but working boot for > > softraid installs. > > > > 'cvs diff -b -U0': > > > > @@ -39 +39 @@ md_installboot() { > > - local

Re: panic: ffs_valloc: dup alloc

2023-03-17 Thread Moritz Buhl
Below is an updated diff addressing the following concerns: On Fri, Mar 17, 2023 at 03:45:59PM +0100, Alexander Bluhm wrote: > The FreeBSD Code puts the check_nifree label before the if > (fs->fs_cs(fs, cg).cs_nifree == 0) check. Could you move this chunk > a little up to keep us in sync? On

panic: ffs_valloc: dup alloc

2023-03-17 Thread Moritz Buhl
Dear tech, I have a machine with some kind of hardware defect. Smartctl shows that one SSD regularly has an unexpected power loss (Attribute 174): 174 Unknown_Attribute 0x0032 100 100 000Old_age Always - 284. On the console I see the following output: root on sd0a

PPPoE with PAP and CHAP

2023-03-13 Thread Moritz Buhl
Hi gerhard and tech, You wrote the following in 2015 and I was wondering if it was worth upstreaming it: The PPPoE kernel module gets a new option auto for the authproto in addition to pap and chap in client mode. In this case the authentication protocol sent by the server in the LCP configure

mountd: potential use of uninitialized stack data

2023-02-22 Thread Moritz Buhl
Dear tech@, codechecker found the following problem with fsb in sbin/mountd: mntsrv(...) ... struct statfs fsb; ... if (realpath(rpcpath, dirpath) == NULL) { bad = errno; if (debug)

igc(4) remove unnecessary PHY ID checks

2023-01-25 Thread Moritz Buhl
Dear tech, Looking into various reports on errors with mini routers that use igc(4), I found the following diff in FreeBSD: https://github.com/freebsd/freebsd-src/commit/29d7f1ff579579711dd5a3325480728b8ed45f8c I additionally deleted the igc_set_d0_lplu_state_i225 and igc_set_d3_lplu_state_i225

MAP_CONCEAL bypass due to stack overflow

2022-11-11 Thread Moritz Buhl
Dear tech, currently the MAP_CONCEAL flag for mmap(2) can be bypassed with a stack overflow. FreeBSD introduced a similar flag called MAP_NOCORE. They also save the auxinfo pointer in some struct that is attached to the proc struct, similar to the diff below. Here is an example CTF challenge:

Re: relayd: uninitialized errstr

2022-11-09 Thread Moritz Buhl
On Thu, Nov 10, 2022 at 01:29:13AM +0100, Theo Buehler wrote: > On Thu, Nov 10, 2022 at 01:10:51AM +0100, Moritz Buhl wrote: > > errstr is never set but fail does: > > RSA_meth_free(rsae_method); > > fatalx("%s: %s", __func__, errstr); > &

relayd: uninitialized errstr

2022-11-09 Thread Moritz Buhl
errstr is never set but fail does: RSA_meth_free(rsae_method); fatalx("%s: %s", __func__, errstr); Found by codechecker. OK? mbuhl Index: ca.c === RCS file: /cvs/src/usr.sbin/relayd/ca.c,v retrieving revision 1.39

relayd: always call va_end

2022-11-09 Thread Moritz Buhl
The same code is in httpd but there it was fixed in commit 6b535b529336a3fd1beb56c42ff5755b84ba9b03 Author: jung Date: Sun May 22 19:19:21 2016 + fix unbalanced va_start and va_end macros from Hiltjo Posthuma "do." deraadt Found by codechecker OK? mbuhl Index:

acme-client memory leak in error case

2022-11-09 Thread Moritz Buhl
Hi tech, g is not freed in this error case. Found by codechecker. OK? mbuhl Index: usr.sbin/acme-client/netproc.c === RCS file: /cvs/src/usr.sbin/acme-client/netproc.c,v retrieving revision 1.31 diff -u -p -r1.31 netproc.c ---

apm garbage stack value could be accessed

2022-11-09 Thread Moritz Buhl
Hi tech, In case send or recv fail in send_command, reply.error is stack garbage. This wouldn't be possible if reply was zeroed. But checking for ret == 0 ensures that reply was fully written. OK? mbuhl Index: usr.sbin/apm/apm.c

libcrypto potential memory leak in OBJ_NAME_add error path

2022-11-08 Thread Moritz Buhl
In case lh_OBJ_NAME_insert returns NULL due to a failed malloc, onp is leaked in OBJ_NAME_add. Found by CodeChecker. OK? mbuhl Index: lib/libcrypto/objects/o_names.c === RCS file: /cvs/src/lib/libcrypto/objects/o_names.c,v

Re: mbufs growing in 7.2

2022-11-08 Thread Moritz Buhl
Hi Greg, Hi Joe, dlg@ hinted to me that the ring might overwrite it's own starting position with the current code. Does this help? mbuhl Index: dev/pci/if_igc.c === RCS file: /cvs/src/sys/dev/pci/if_igc.c,v retrieving revision 1.9

potential memory leak in bgpd rde_dump_ctx_new

2022-11-07 Thread Moritz Buhl
Hi tech, Dear claudio, ctx might leak due to a prefix/rib dump new/subtree failing in calloc and then going to nomem in rde_dump_ctx_new. I am wondering if a similar fix is missing in rde_dump_done after the nomem label. thoughts? mbuhl Found by CodeChecker. Index: usr.sbin/bgpd/rde.c

bgpd and ldpd pfkey_reply might access uninitialized stack memory

2022-11-07 Thread Moritz Buhl
Hi tech, Dear claudio, there could be an uninitialized stack memory access in pfkey_reply. It looks like this: struct sadb_msg hdr, *msg; ... do { rv = pfkey_read(sd, ); if (rv == -1) return (-1); } while (rv);

Re: em(4) IPv4, TCP, UDP checksum offloading

2022-11-05 Thread Moritz Buhl
Looking for OKs. On Sat, Oct 15, 2022 at 10:01:53PM +0200, Moritz Buhl wrote: > With the previous diffs I am seeing sporadic connection problems in tcpbench > via IPv6 on Intel 82546GB. > The diff was too big anyways. Here is a smaller diff that introduces > checksu

Re: em(4) IPv4, TCP, UDP checksum offloading

2022-10-15 Thread Moritz Buhl
With the previous diffs I am seeing sporadic connection problems in tcpbench via IPv6 on Intel 82546GB. The diff was too big anyways. Here is a smaller diff that introduces checksum offloading for the controllers that use the advanced descriptors. I tested this diff on i350 and 82571EB, receive,

Re: em(4) IPv4, TCP, UDP checksum offloading

2022-10-12 Thread Moritz Buhl
Another mistake On Wed, Oct 12, 2022 at 01:45:30PM +0200, Moritz Buhl wrote: > On Tue, Oct 11, 2022 at 04:16:15PM +0100, Stuart Henderson wrote: > > On 2022/10/11 15:03, Moritz Buhl wrote: > > > Here is a new diff for checksum offloading (ipv4, udp, tcp) for em(4). > > &g

Re: em(4) IPv4, TCP, UDP checksum offloading

2022-10-12 Thread Moritz Buhl
On Tue, Oct 11, 2022 at 04:16:15PM +0100, Stuart Henderson wrote: > On 2022/10/11 15:03, Moritz Buhl wrote: > > Here is a new diff for checksum offloading (ipv4, udp, tcp) for em(4). > > > > The previous diff didn't implement hardware vlan tagging for >em82578 > > w

em(4) IPv4, TCP, UDP checksum offloading

2022-10-11 Thread Moritz Buhl
Here is a new diff for checksum offloading (ipv4, udp, tcp) for em(4). The previous diff didn't implement hardware vlan tagging for >em82578 which should result in variable ethernet header lengths and thus wrong checksums inserted at wrong places. The diff below addresses this. I would

Re: semctl, semget and semop possible panics

2022-09-22 Thread Moritz Buhl
On Fri, Sep 16, 2022 at 11:38:49PM +0200, Moritz Buhl wrote: > Syzkaller found a panic with sysv semaphores: > https://syzkaller.appspot.com/bug?id=f7e8e2822779918d7a23d9ff9d7c0a3779c00a46 The last diff would introduced two memory leaks, seminfo.semopm is the only seminfo value that can

semctl, semget and semop possible panics

2022-09-16 Thread Moritz Buhl
Syzkaller found a panic with sysv semaphores: https://syzkaller.appspot.com/bug?id=f7e8e2822779918d7a23d9ff9d7c0a3779c00a46 The problem is that the code uses a few globals (sema, semtot, seminfo) that can change during sleeping points where the kernel lock is released. Usually copyin, copyout,

Re: add sendmmsg and recvmmsg systemcalls

2022-09-08 Thread Moritz Buhl
On Wed, Aug 31, 2022 at 05:44:31PM -0900, Philip Guenther wrote: > kdump.c will need at least a SYS_recvmmsg line in the big table, and if you > do a ktrmmsghdr() bit in the kernel a matching decoder will be needed in > kdump. Here is a new diff for kdump. OK? mbuhl Index: usr.bin/kdump/kdump.c

Re: add sendmmsg and recvmmsg systemcalls

2022-09-06 Thread Moritz Buhl
On Tue, Sep 06, 2022 at 04:00:39PM +0200, Moritz Buhl wrote: > Hi, > here is the most recent diff for the libc part of send and recvmmsg. > This requires a libc minor bump and therefore should be coordinated > after snapshots are building normally again. > > To my understand

Re: add sendmmsg and recvmmsg systemcalls

2022-09-06 Thread Moritz Buhl
.Ox 7.2 . Index: lib/libc/sys/w_recvmmsg.c ======= RCS file: lib/libc/sys/w_recvmmsg.c diff -N lib/libc/sys/w_recvmmsg.c --- /dev/null 1 Jan 1970 00:00:00 - +++ lib/libc/sys/w_recvmmsg.c 6 Sep 2022 09:42:08 - @@ -0,0 +1,32 @@ +/

Re: add sendmmsg and recvmmsg systemcalls

2022-09-02 Thread Moritz Buhl
Here is an updated version of the kernel part for sendmmsg. mbuhl Index: sys/kern/syscalls.master === RCS file: /mount/openbsd/cvs/src/sys/kern/syscalls.master,v retrieving revision 1.230 diff -u -p -r1.230 syscalls.master ---

Re: add sendmmsg and recvmmsg systemcalls

2022-09-01 Thread Moritz Buhl
I addressed your concerns as well as these of jca, just the kernel part (and the new ktrace stuff) below. One minor thing: I didn't see any kdump output where one struct was contained in another one but I am printing it like ddb would so I guess it should be fine. Index: kern/syscalls.master

Re: add sendmmsg and recvmmsg systemcalls

2022-08-31 Thread Moritz Buhl
I created a pull request on their github: https://github.com/NLnetLabs/nsd/pull/231 On Tue, Aug 30, 2022 at 04:33:10PM -0600, Todd C. Miller wrote: > On Wed, 31 Aug 2022 00:19:20 +0200, Moritz Buhl wrote: > > > On Tue, Aug 30, 2022 at 10:59:43PM +0200, Claudio Jeker wrote: > >

Re: add sendmmsg and recvmmsg systemcalls

2022-08-30 Thread Moritz Buhl
On Tue, Aug 30, 2022 at 10:59:43PM +0200, Claudio Jeker wrote: > And nsd in base. It seems unbound does not use recvmmsg. After 'make -f Makefile.bsd-wrapper config' recvmmsg is picked up. The config compile test currently defines NONBLOCKING_IS_BROKEN because of a missing include. Then vlen

Re: add sendmmsg and recvmmsg systemcalls

2022-08-30 Thread Moritz Buhl
+.Ox 7.2 . .Sh CAVEATS Calling .Fn recvmsg Index: lib/libc/sys/w_recvmmsg.c === RCS file: lib/libc/sys/w_recvmmsg.c diff -N lib/libc/sys/w_recvmmsg.c --- /dev/null 1 Jan 1970 00:00:00 - +++ lib/libc/sys/w_recvmmsg.c 22 Apr 202

Re: delete unused variable in ix(4) rx checksum calc

2022-08-30 Thread Moritz Buhl
ok mbuhl On Tue, Aug 30, 2022 at 05:13:35PM +0200, Sebastian Benoit wrote: > ptype is never used. > ok? > > diff --git sys/dev/pci/if_ix.c sys/dev/pci/if_ix.c > index cb233034d23..72a221b97d9 100644 > --- sys/dev/pci/if_ix.c > +++ sys/dev/pci/if_ix.c > @@ -148,7 +148,7 @@ void

Re: ipv6 fragment checksum

2022-08-08 Thread Moritz Buhl
On Sun, Aug 07, 2022 at 12:41:29AM +0200, Alexander Bluhm wrote: > Hi, > > If interface drivers have enabled transmit offloading for the payload > checksum , IPv6 fragments contain invalid checksum. For fragments > the protocol checksum has to be calculated before fragmentation. > Hardware

pfctl: possible memory leak in load_feedback_profile

2022-07-27 Thread Moritz Buhl
Dear tech@, the scan-build(1) tool from the llvm port on sbin/pfctl reported a memory leak in the error path of load_feedback_profile. There are more places that could be investigated. Would it make sense to look into these? Independent of that I was wondering if it makes sense to warn if

Re: pf.conf(5): document new anchors limit

2022-07-23 Thread Moritz Buhl
On Thu, Jul 21, 2022 at 10:25:09PM +0100, Jason McIntyre wrote: ... > it looks like the "set limit" text in pf.conf(5) might need some small > adjustments: > > - as well as the "anchors" limit, it does not document "pktdelay-pkts" > > - for entries where defaults are not documented, it is not

Re: checksum offloading for em

2022-07-22 Thread Moritz Buhl
On Mon, Jun 27, 2022 at 08:07:32AM +1000, Jonathan Gray wrote: > On Sun, Jun 26, 2022 at 04:43:59PM +0200, Moritz Buhl wrote: > > On Sun, Jun 26, 2022 at 12:23:58PM +0200, Moritz Buhl wrote: > > > Hi, > > > > > > I noticed that for some offloading-capable em c

pf: DIOCXCOMMIT and copyin

2022-07-21 Thread Moritz Buhl
Hi tech, for the other two DIOCX ioctls syzkaller showed that it is possible to grab netlock while doing copyin. The same problem should exist for DIOCXCOMMIT but syzkaller didn't find it yet. In case anybody can reproduce the witness lock order reversals the syzkaller can produce, the diff

Re: pf: pool for pf_anchor

2022-07-20 Thread Moritz Buhl
On Tue, Jul 19, 2022 at 10:58:08PM +0200, Alexander Bluhm wrote: > On Tue, Jul 19, 2022 at 07:18:54PM +0200, Moritz Buhl wrote: > > A solution would be to move the allocation of the pf_anchor struct > > into a pool. One final question would be regarding the size of the > &g

pf: pool for pf_anchor

2022-07-19 Thread Moritz Buhl
Dear tech@, I am investigating a syzkaller reproducer found in the "no output from test machine (7)" crashes: https://syzkaller.appspot.com/bug?id=d93e92fde3857c69df2cf46b4244d9814c4318a7 https://syzkaller.appspot.com/text?tag=ReproC=116ee2e008 The code calls DIOCXBEGIN, with different

regress/lib/libm/rint on armv7

2022-07-15 Thread Moritz Buhl
Hi tech@, Dear miod@, Dear kettenis@, On arm the lib/libm/rint regress test is failing. After adding some printf debugging into libm it turns out that the problem is the cast from double to long long. http://bluhm.genua.de/regress/results/2022-07-12T04%3A17%3A03Z/logs/lib/libm/rint/make.log:

Re: checksum offloading for em

2022-06-26 Thread Moritz Buhl
On Sun, Jun 26, 2022 at 12:23:58PM +0200, Moritz Buhl wrote: > Hi, > > I noticed that for some offloading-capable em controllers checksum > offloading is still disabled and I couldn't find a reason for that. > > It was assumed during initial implementation: > https://marc

checksum offloading for em

2022-06-26 Thread Moritz Buhl
Hi, I noticed that for some offloading-capable em controllers checksum offloading is still disabled and I couldn't find a reason for that. It was assumed during initial implementation: https://marc.info/?l=openbsd-tech=137875739832438=2 According to the datasheets of the i350 controllers listed

Re: another syzkaller problem in pf

2022-06-26 Thread Moritz Buhl
On Tue, May 03, 2022 at 09:31:51PM +0200, Alexander Bluhm wrote: ... > The code is too complex to be sure what the reason of the syzkaller > panic is. Sleep in malloc is correct anyway and may improve the > situation. > > Functions with argument values 0 or 1 are hard to read. It would > be

igc vlan hwtagging

2022-06-02 Thread Moritz Buhl
Dear tech@, the following diff should implement vlan hwtagging for igc. I would appreciate feedback from further testing. OK? mbuhl Index: sys/dev/pci/if_igc.c === RCS file: /cvs/src/sys/dev/pci/if_igc.c,v retrieving revision 1.9

Re: igc checksum offloading

2022-05-25 Thread Moritz Buhl
On Wed, May 25, 2022 at 04:18:00PM +0200, Moritz Buhl wrote: > Dear tech@, > > The attached diff should handle checksum offloading for igc(4) > for IPv4, TCP, and UDP. > > I tested with "Intel I225-LM" rev 0x03, > kevlo@ tested this with "Intel I225-V"

igc checksum offloading

2022-05-25 Thread Moritz Buhl
Dear tech@, The attached diff should handle checksum offloading for igc(4) for IPv4, TCP, and UDP. I tested with "Intel I225-LM" rev 0x03, kevlo@ tested this with "Intel I225-V" rev 0x03 OK? Index: /sys/dev/pci/if_igc.c === RCS

another syzkaller problem in pf

2022-05-03 Thread Moritz Buhl
Hi tech@, Syzkaller found a few crashes in pf_anchor_global_RB_REMOVE. https://syzkaller.appspot.com/bug?id=a97f712331903ce38b8c084a489818b9bb5c6fcb and also https://syzkaller.appspot.com/text?tag=CrashLog=15ace9aaf0 The call stack is something like this: pf_anchor_global_RB_REMOVE

another copyout while holding net/pf lock in pfioctl

2022-04-28 Thread Moritz Buhl
Hi tech@, syzkaller reported pfi_get_interfaces https://syzkaller.appspot.com/bug?id=963ef41930bb84af584be3bf910a3f67d65581a0 which does a copyout while holding NET and PF lock. The following diff should address this. mbuhl Index: sys/net/pf_if.c

Re: wall(1) - fix issues with line wrapping

2022-04-25 Thread Moritz Buhl
On Tue, Apr 19, 2022 at 09:00:08PM +0200, Anton Borowka wrote: > Hi, > > the attached diff fixes 2 issues with line wrappings in wall(1). ... I can confirm that your patch fixes the described problems. But I am wondering if it makes sense to split the ch == '\n' case and the cnt == 79 case into

add sendmmsg and recvmmsg systemcalls

2022-04-22 Thread Moritz Buhl
send function call appeared in .Bx 4.1c . +The +.Fn sendmmsg +syscall first appeared in Linux 3.0, was reimplemented for +.Nx 7.0 , +and ported to +.Ox 7.1 . Index: lib/libc/sys/w_recvmmsg.c === RCS file: lib/libc/sys/w_recvmmsg.c di

pf_rollback_rules always returns 0

2022-04-07 Thread Moritz Buhl
Hi, Since 2015 pf_rollback_rules always returns 0. Make it void. OK? mbuhl Index: sys/net/pf_ioctl.c === RCS file: /cvs/src/sys/net/pf_ioctl.c,v retrieving revision 1.376 diff -u -p -r1.376 pf_ioctl.c --- sys/net/pf_ioctl.c 4 Apr

Re: possible memory leak in ipmi get_sdr

2022-04-07 Thread Moritz Buhl
Any insights? On Mon, Jan 10, 2022 at 03:18:47PM +0100, Moritz Buhl wrote: > Hi tech@, > > The return value of add_child_sensors is returned in add_sdr_sensor, > which is called by get_sdr. get_sdr mallocs psdr and only frees it > if add_sdr_sensor returns 0. The assumpti

Re: possible memory leak in ipmi get_sdr

2022-01-14 Thread Moritz Buhl
I thought I'd walk through my understanding of the code to make it easier to review. from sys/dev/ipmi.c: 1019 int 1020 get_sdr(struct ipmi_softc *sc, u_int16_t recid, u_int16_t *nxtrec) 1021 { ... 1046 psdr = malloc(sdrlen, M_DEVBUF, M_NOWAIT); 1047 if (psdr == NULL) 1048

uninitialized stack memory possibly passed to m_freem

2022-01-12 Thread Moritz Buhl
Hi tech@, https://github.com/openbsd/src/commit/0ea6bae06233cd25645df14602c3eda6bdff7dca.patch the patch forgot to add mrep to the info struct, nfsm_dissect could pass info.nmi_mrep to m_freem, which is currently uninitialized stack memory. Index: sys/nfs/nfs_subs.c

possible memory leak in ipmi get_sdr

2022-01-10 Thread Moritz Buhl
Hi tech@, The return value of add_child_sensors is returned in add_sdr_sensor, which is called by get_sdr. get_sdr mallocs psdr and only frees it if add_sdr_sensor returns 0. The assumption is that psdr is attached to a list in add_child_sensors otherwise. This is not the case if the malloc

bsd.regress.mk REGRESS_SETUP vs REGRESS_SETUP_ONCE

2020-09-24 Thread Moritz Buhl
Dear tech@, given the following Makefile: # REGRESS_SETUP vs REGRESS_SETUP_ONCE example setup: @echo setup setup_once: @echo setup_once test1: @echo test1 test2: @echo test2 cleanup: @echo cleanup REGRESS_SETUP = setup REGRESS_SETUP_ONCE =

Re: vfs posix compatibility change

2019-09-08 Thread Moritz Buhl
Any comments? July 22, 2019 8:23 PM, "Moritz Buhl" wrote: > Hi, > > here is another POSIX compatibility change I found while running > NetBSD system call tests: > > The incompatibilities can be reproduced with the followding comands: > `mv / foo` > mv: rename

fix ssh unittest misc regression test

2019-08-22 Thread Moritz Buhl
Hi, some ssh unittest ist failing because it links stuff together in another way. basically add 'sshbuf-misc.c' to SRCS. additional suggestion: make variable assignments similar to ports mbuhl Index: regress/usr.bin/ssh/unittests/misc/Makefile

fix rpki client regression tests

2019-08-22 Thread Moritz Buhl
Hi, some experts forgot to run the rpki-client regression tests after some changes. The tests are relinking parts of the source and this is not great but after all I still prefer some running tests. Patch attached. thanks, mbuhl Index: regress/usr.sbin/rpki-client/test-cert.c

unmount after realpath

2019-08-02 Thread Moritz Buhl
Hi, the same as to unveil(2) also counts for realpath(3). https://marc.info/?l=openbsd-bugs=156469573812165=2 Similar diff attached. tests are here: https://github.com/moritzbuhl/realpath-unmount-regress thanks, mbuhl Index: sys/kern/vfs_syscalls.c

vfs posix compatibility change

2019-07-22 Thread Moritz Buhl
Hi, here is another POSIX compatibility change I found while running NetBSD system call tests: The incompatibilities can be reproduced with the followding comands: `mv / foo` mv: rename / to foo: Is a directory `man 2 rename` mentions EISDIR: [EISDIR] to is a directory, but from is not

Re: make msgsnd(2) more posix

2019-07-18 Thread Moritz Buhl
> Moritz, can you create a man page ERRORS diff? Is the attached diff ok? mbuhl Index: lib/libc/sys/msgsnd.2 === RCS file: /cvs/src/lib/libc/sys/msgsnd.2,v retrieving revision 1.19 diff -u -p -r1.19 msgsnd.2 ---

make msgsnd(2) more posix

2019-07-12 Thread Moritz Buhl
Hi, while running some ported tests I noticed that msgsnd(2) did not error when passing a message with mtype < 1, even tho the manual page states: > mtype is an integer greater than 0 that can be used POSIX says: https://pubs.opengroup.org/onlinepubs/9699919799/ [EINVAL] The value of msqid

Re: problems with libm

2019-07-11 Thread Moritz Buhl
Hi, I made the FreeBSD msun regression tests compile on OpenBSD. https://github.com/moritzbuhl/msun-regress 3 out of 19 test files pass. 14 files die after the first error case. Two files (ctrig_test.c and trig_test.c) use atf and after some hacks they report all error cases. 840 for ctrig_test

listen(2) sets wrong errno

2019-07-09 Thread Moritz Buhl
Hi, while running some NetBSD syscall tests I noticed that listen(2) returns the wrong errno when a socket is already connected. man 2 listen already mentions EINVAL. NetBSD bug: http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=46150 NetBSD patch:

getgroups(2) with negative values

2019-07-08 Thread Moritz Buhl
Hi, while porting some NetBSD syscall tests to OpenBSD I noticed that the getgroups test is failing. Simply put: gid_t gidset[NGROUPS_MAX]; getgroups(-1, gidset); This was fixed on NetBSD 8 years ago: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/kern_prot.c > if (SCARG(uap,

fix format strings in relayd

2019-07-04 Thread Moritz Buhl
Hi, as promised a patch to relayd to enable formatting warnings for yyerror. Greetings, Moritz Buhl Index: usr.sbin/relayd/parse.y === RCS file: /cvs/src/usr.sbin/relayd/parse.y,v retrieving revision 1.238 diff -u -p -r1.238

fix pfctl regress on armv7

2019-07-04 Thread Moritz Buhl
. A patch will follow. Thanks for feedback and comments, Moritz Buhl Index: sbin/pfctl/parse.y === RCS file: /cvs/src/sbin/pfctl/parse.y,v retrieving revision 1.696 diff -u -p -r1.696 parse.y --- sbin/pfctl/parse.y 8 May 2019 21:31:30

port NetBSD libc tests

2019-07-01 Thread Moritz Buhl
egress/lib/libc/sys/atf-c.h27 Jun 2019 19:07:52 - @@ -0,0 +1,66 @@ +/* $OpenBSD$ */ +/* + * Copyright (c) 2019 Moritz Buhl + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that

problems with libm

2019-07-01 Thread Moritz Buhl
Hi, while testing arm hardware on OpenBSD I noticed that some floating point operations cause failures of other tests. In fact the current libm is incorrect according to the ISO C Std Annex G. I found this out after porting some FreeBSD lib msun tests. Many edge cases for complex floating point

Fix regress/sys/rtable for octeon

2019-06-23 Thread Moritz Buhl
Hi, while running regression tests on an octeon ERL, I noticed that no-macro-redefined flag was not known to the compiler. I added some #undefs and some hours ago a change to art_walk made the tests fail too. The no-macro-redefine was added 3 month ago. Thanks, mbuhl Index:

iked regression test with obj dir

2019-06-22 Thread Moritz Buhl
Hi, I noticed that the iked regress test fails if I have an obj directory. The following patch adresses this. mbuhl Index: regress/sbin/iked/parser/Makefile === RCS file: /mount/openbsd/cvs//src/regress/sbin/iked/parser/Makefile,v

user mod -u lead to segfault

2018-10-13 Thread Moritz Buhl
not crash the program with other flags that use getpw{nam,uid}. Thanks, Moritz Buhl Index: user.c === RCS file: /cvs/src/usr.sbin/user/user.c,v retrieving revision 1.122 diff -u -p -r1.122 user.c --- user.c 26 Sep 2018 14:54:58 -

top cpu stats are wrong with hyper threading

2018-10-05 Thread Moritz Buhl
and disabling/reenabling the cores with hw.smt also works. The only problem is that the lines reserved for cpu-stats does not change with reenabling. Refreshing the output with '1' or resizing the window should help. Thanks, Moritz Buhl Index: display.c

wdc polling lead to unclean fs and panics

2018-10-04 Thread Moritz Buhl
Hi, when rebooting a PowerBook G4, the kernel sometimes paniced while detaching the disk. Additionallly, during boot it was noted that / is not clean. The following patch special cases polling to not return early anymore and adds polling to all previous elements in the queue. Please tell me if

Unplugging USB network stick during tcpdump crashes system

2018-07-04 Thread Moritz Buhl
Hello, Removing my usb network interface during `tcpdump -i rum0` caused my kernel to crash. A fix is attached. Thanks, Moritz Buhl Index: net/bpf.c === RCS file: /cvs/src/sys/net/bpf.c,v retrieving revision 1.169 diff -u -p

Re: Remove vgrind in ctags

2016-11-08 Thread Moritz Buhl
Sorry, I noticed that vgrind still is in the ports after writing the mail. I will do more research before writing a patch next time. On 11/08/16 11:49, Theo Buehler wrote: On Tue, Nov 08, 2016 at 11:42:17AM +0100, Theo Buehler wrote: On Tue, Nov 08, 2016 at 10:53:37AM +0100, Moritz Buhl wrote

Remove vgrind in ctags

2016-11-08 Thread Moritz Buhl
Hi, since vgrind was removed in 4.9 I removed the -v option in ctags. At least the example in ctags(1) could be modified. Greetings Moritz Buhl ? ctags-vgrind.diff Index: ctags.1 === RCS file: /cvs/src/usr.bin/ctags/ctags.1,v