Re: process: annotate locking for setitimer(2) state

2020-08-11 Thread Anton Lindqvist
On Sun, Aug 09, 2020 at 05:33:58PM +0200, Mark Kettenis wrote: > > Date: Sun, 9 Aug 2020 10:02:38 -0500 > > From: Scott Cheloha > > > > On Sun, Aug 09, 2020 at 04:43:24PM +0200, Mark Kettenis wrote: > > > > Date: Sat, 8 Aug 2020 19:46:14 -0500 > > > > From: Scott Cheloha > > > > > > > > Hi, >

harmonize locking annotations

2020-06-29 Thread Anton Lindqvist
Hi, I think we all agree that global locks should be represented using uppercase letters in locking annotations. This is an attempt to harmonize the existing annotations. Comments? OK? Index: dev/dt/dt_dev.c === RCS file:

Re: pipe: reduce number of allocations

2020-06-23 Thread Anton Lindqvist
On Tue, Jun 16, 2020 at 09:10:54PM +0200, Anton Lindqvist wrote: > Hi, > Instead of performing three distinct allocations per created pipe, > reduce it to a single one. Not only should this be more performant, it > also solves a kqueue related issue found by visa@ who also requested &

pipe: reduce number of allocations

2020-06-16 Thread Anton Lindqvist
Hi, Instead of performing three distinct allocations per created pipe, reduce it to a single one. Not only should this be more performant, it also solves a kqueue related issue found by visa@ who also requested this change: > If you attach an EVFILT_WRITE filter to a pipe fd, the knote gets added

Re: Call FRELE() without fdplock in dup*(2)

2020-06-10 Thread Anton Lindqvist
On Wed, Jun 10, 2020 at 02:34:00PM +, Visa Hankala wrote: > A while ago, finishdup() was changed to release fdplock before calling > closef() to avoid potential lock order problems in the file close path. > However, the dup* code can still invoke that path with fdplock held > through FRELE().

ddb(4): missing tags

2020-05-17 Thread Anton Lindqvist
Hi, The ddb(4) manual documents a couple of commands which can be abbreviated. The diff below adds explicit tags for such commands which in turn makes it possible to jump to for instance `examine' from within your $PAGER. Comments? OK? Index: ddb.4

flock unlock

2020-03-13 Thread Anton Lindqvist
Hi, After reading the flock(2) code I cannot spot anything preventing it from being unlocked. This is all made possible by the recent MP-safe effort including atomic file flags and posix file locks. I've been running with this for a week by now. However, testing is much appreciated. Remember to

atomic f_iflags

2020-03-10 Thread Anton Lindqvist
Hi, In order to unlock flock(2), make writes to the f_iflags field of struct file atomic; similar to recent changes to both struct file and process. This also gets rid of the last kernel lock protected field in the scope of struct file. Comments? OK? Index: kern/kern_descrip.c

fcntl unlock

2020-03-05 Thread Anton Lindqvist
Hi, After reading the fcntl(2) code I cannot spot anything obvious preventing it from being unlocked[1]. This is all made possible by the recent MP-safe effort including resource limits, atomic file flags, ioctl unlock and posix file locks. I've been running with this for a week by now. However,

rwlock(9): xr rwsleep(9)

2019-11-04 Thread Anton Lindqvist
ok? Index: rwlock.9 === RCS file: /cvs/src/share/man/man9/rwlock.9,v retrieving revision 1.24 diff -u -p -r1.24 rwlock.9 --- rwlock.925 Feb 2019 22:03:56 - 1.24 +++ rwlock.94 Nov 2019 14:25:19 - @@ -238,6 +238,7

Re: vmctl: invalid parent template error

2019-08-12 Thread Anton Lindqvist
On Mon, Aug 12, 2019 at 02:52:46PM +0200, Klemens Nanni wrote: > On Mon, Aug 12, 2019 at 02:14:42PM +0200, Anton Lindqvist wrote: > > Hi, > > I recently fat fingered the vm template passed to vmctl and was greeted > > with the following error: > > > > vmctl: s

vmctl: invalid parent template error

2019-08-12 Thread Anton Lindqvist
Hi, I recently fat fingered the vm template passed to vmctl and was greeted with the following error: vmctl: start vm command failed: Operation not permitted I think we can be more specific in order to improve usability: vmctl: could not find specified parent template Comments? OK? Index:

Re: vm.conf: boot-device

2019-05-12 Thread Anton Lindqvist
On Wed, May 08, 2019 at 01:02:10PM -0700, Mike Larkin wrote: > On Wed, May 08, 2019 at 09:41:42PM +0200, Anton Lindqvist wrote: > > On Wed, May 08, 2019 at 07:19:45PM +0200, Reyk Floeter wrote: > > > On Wed, May 08, 2019 at 06:47:53PM +0200, Anton Lindqvist wrote: > > >

Re: vm.conf: boot-device

2019-05-08 Thread Anton Lindqvist
On Wed, May 08, 2019 at 07:19:45PM +0200, Reyk Floeter wrote: > On Wed, May 08, 2019 at 06:47:53PM +0200, Anton Lindqvist wrote: > > Hi, > > A first stab at adding support for option `-B device' to vm.conf(5). > > With the diff below, I'm able to add a dedicated VM to be used

vm.conf: boot-device

2019-05-08 Thread Anton Lindqvist
Hi, A first stab at adding support for option `-B device' to vm.conf(5). With the diff below, I'm able to add a dedicated VM to be used with autoinstall(5): vm "amd64-install" { disable boot $snapshots "bsd.rd" disk $home "amd64.qcow2" boot-device net

chflagsat(2): fix function argument

2019-03-25 Thread Anton Lindqvist
Hi, My guess is that flag actually refers to atflags. Comments? OK? Index: chflags.2 === RCS file: /cvs/src/lib/libc/sys/chflags.2,v retrieving revision 1.27 diff -u -p -r1.27 chflags.2 --- chflags.2 19 Jan 2015 15:54:11 -

lockf: initialization order

2019-02-21 Thread Anton Lindqvist
Hi, Initialize the fields of `struct lockf' in the same order as the struct definition, with the ambition of making easier to inspect that all fields are properly initialized. Similar work has already been done in lf_split(). Comments? OK? Index: kern/vfs_lockf.c

wscons: struct wssrcops initializers

2019-02-18 Thread Anton Lindqvist
Hi, Favor C99 initializers for struct wssrcops; improves grepability. Comments? OK? Index: dev/wscons/wskbd.c === RCS file: /cvs/src/sys/dev/wscons/wskbd.c,v retrieving revision 1.95 diff -u -p -r1.95 wskbd.c --- dev/wscons/wskbd.c

wscons: free size

2019-01-31 Thread Anton Lindqvist
Comments? OK? Index: dev/wscons/wsevent.c === RCS file: /cvs/src/sys/dev/wscons/wsevent.c,v retrieving revision 1.18 diff -u -p -r1.18 wsevent.c --- dev/wscons/wsevent.c19 Nov 2018 19:19:24 - 1.18 +++

cd9660: unused field in iso_node

2019-01-19 Thread Anton Lindqvist
Hi, The i_lockf field in `struct iso_node' looks unused since the initial import. Also, vop_advlock is mapped to eopnotsupp() in cd9660_vops. Comments? OK? Index: isofs/cd9660/cd9660_node.h === RCS file:

Re: kcov: trace cmp

2019-01-18 Thread Anton Lindqvist
On Fri, Jan 18, 2019 at 04:58:16PM +0100, Alexander Bluhm wrote: > On Fri, Jan 18, 2019 at 04:38:55PM +0100, Anton Lindqvist wrote: > > > - You allocate nmemb * sizeof(uintptr_t) bytes. > > > - kd_buf[nmemb - 1] is the largest valid index. > > > - kd_nmemb is nmemb -

Re: kcov: trace cmp

2019-01-18 Thread Anton Lindqvist
On Wed, Jan 16, 2019 at 10:36:29PM +0100, Alexander Bluhm wrote: > On Wed, Jan 16, 2019 at 09:17:33PM +0100, Anton Lindqvist wrote: > > + idx = kd->kd_buf[0]; > > + if (idx * 4 + 4 + 1 >= kd->kd_nmemb) > > + return; > > + > > + kd->kd_bu

kcov: trace cmp

2019-01-16 Thread Anton Lindqvist
Hi, This diff add supports for an additional trace mode to kcov where comparison instructions and switch statements can be traced. The actual comparison operands ends up in the coverage buffer, with some additional data. See the manual bits for further info. This mode will generate even more

kcov: deny mmap() while enabled

2019-01-16 Thread Anton Lindqvist
Hi, When a kcov fd is in an enabled state, disallow mmap() calls using the same fd. Sometimes, syzkaller manages to create a device node using mknod() with major=22 and minor=X where X maps to an already open kcov fd in the current process; it then mmap() the kcov coverage buffer which is used as

kcov: enable retguard

2019-01-07 Thread Anton Lindqvist
Hi, The problems caused by enabling both kcov and retguard was due to the increased kernel size. Now that NKL2_KIMG_ENTRIES has been bumped on amd64, it's no longer a problem. Comments? OK? Index: arch/amd64/conf/Makefile.amd64 ===

kcov: prepare for trace cmp [2/N]

2018-12-27 Thread Anton Lindqvist
Hi, As a next step, let KIOENABLE accept the desired tracing mode. The API matches the kcov implementation found both in Linux and FreeBSD. As far as I know, syzkaller is the only kcov consumer in the wild and I will make sure to adapt the new API there. Comments? OK? Index:

kcov: prepare for trace cmp

2018-12-26 Thread Anton Lindqvist
Hi, The end goal here is teach kcov to support tracing of comparison instructions and switch statements in order to improve coverage during fuzzing. It's achieved by compiling the kernel with the ` -fsanitize-coverage=trace-cmp' option. But first, some refactoring: the diff below separates the

Re: vmd: set dhcp hostname option during netboot

2018-12-10 Thread Anton Lindqvist
On Mon, Dec 10, 2018 at 09:40:41PM -0800, Mike Larkin wrote: > On Mon, Dec 10, 2018 at 07:27:40PM -0800, Carlos Cardenas wrote: > > On Sat, Dec 08, 2018 at 10:13:47AM +0100, Anton Lindqvist wrote: > > > Hi, > > > I've been trying out the new fake netboot feature in

Re: make build as root fails when SUDO=doas

2018-12-10 Thread Anton Lindqvist
On Mon, Dec 10, 2018 at 01:33:49PM +0100, Solene Rapenne wrote: > hi > > I have SUDO=doas in /etc/mk.conf for ports, this is preventing a `make build` > in /usr/src as root if /etc/doas.conf doesn't have a line "permit nopass root > as root". This fails when using "doas" in regress/usr/bin/ssh/ >

Re: option kcov + GENERIC.MP -> silent crash

2018-12-09 Thread Anton Lindqvist
On Wed, Dec 05, 2018 at 10:03:38PM +0100, Anton Lindqvist wrote: > On Sat, Dec 01, 2018 at 04:34:57PM +0100, Anton Lindqvist wrote: > > On Tue, Nov 27, 2018 at 05:52:15PM -0800, Greg Steuck wrote: > > > I booted the patched kernel and it seems to have gone farther an

vmd: set dhcp hostname option during netboot

2018-12-08 Thread Anton Lindqvist
Hi, I've been trying out the new fake netboot feature in vmd. Overall, a great addition that removed the need for me to run dhcpd/rebound locally to achieve auto install. It would be convenient if the DHCP lease included a hostname inferred from the VM name in order to use dedicated response files

Re: option kcov + GENERIC.MP -> silent crash

2018-12-05 Thread Anton Lindqvist
On Sat, Dec 01, 2018 at 04:34:57PM +0100, Anton Lindqvist wrote: > On Tue, Nov 27, 2018 at 05:52:15PM -0800, Greg Steuck wrote: > > I booted the patched kernel and it seems to have gone farther and I believe > > reached init before crashing. > > By performing a semi-automa

Re: option kcov + GENERIC.MP -> silent crash

2018-12-01 Thread Anton Lindqvist
On Tue, Nov 27, 2018 at 05:52:15PM -0800, Greg Steuck wrote: > I booted the patched kernel and it seems to have gone farther and I believe > reached init before crashing. By performing a semi-automated bisect I was able to identify the source files that are incompatible with tracing. Common for

Re: option kcov + GENERIC.MP -> silent crash

2018-11-26 Thread Anton Lindqvist
'd rather try coming up with a proper fix before adding any #error directives. > > On Sun, Nov 25, 2018 at 11:21 PM Anton Lindqvist wrote: > > > Hi Greg, > > > > On Sun, Nov 25, 2018 at 10:13:52AM -0800, Greg Steuck wrote: > > > Hi Anton, > > > > &

Re: option kcov + GENERIC.MP -> silent crash

2018-11-25 Thread Anton Lindqvist
Hi Greg, On Sun, Nov 25, 2018 at 10:13:52AM -0800, Greg Steuck wrote: > Hi Anton, > > I tried to boot a kernel with kcov based on GENERIC.MP and the machine > reboots without a peep immediately after > > vmm0 at mainbus0: VMX (using slow L1TF mitigation) > > Switching off either of kcov or MP

wscons: FIOGETOWN

2018-11-19 Thread Anton Lindqvist
Hi, Now that wscons is using sigio, adding support for FIOSETOWN/TIOCGPGRP is trivial. Also, visa@ pointed out that FIOSETOWN gets translated into TIOCSPGRP by sys_ioctl(), handling of FIOSETOWN is therefore redundant. Comments? OK? Index: wskbd.c

lockf: consistent use of new debug macro

2018-11-10 Thread Anton Lindqvist
Hi, Make use of the new LFPRINT() debug macro. Comments? OK? Index: kern/vfs_lockf.c === RCS file: /cvs/src/sys/kern/vfs_lockf.c,v retrieving revision 1.30 diff -u -p -r1.30 vfs_lockf.c --- kern/vfs_lockf.c10 Nov 2018 11:54:03

ktrace: struct flock

2018-11-04 Thread Anton Lindqvist
Hi, Start tracing struct flock. I've been using this diff during lockf development. Comments? OK? Index: sys/kern/kern_descrip.c === RCS file: /cvs/src/sys/kern/kern_descrip.c,v retrieving revision 1.182 diff -u -p -r1.182

Re: ksh: fc -s and SIGINT

2018-10-29 Thread Anton Lindqvist
On Mon, Oct 29, 2018 at 09:55:38AM +0100, Martijn van Duren wrote: > On 10/28/18 8:13 PM, Anton Lindqvist wrote: > > Hi, > > Bug reported by miod@, how to reproduce: > > > > $ command -v r > > alias r='fc -s' > > $ sleep 5 > > $ r sleep >

ksh: fc -s and SIGINT

2018-10-28 Thread Anton Lindqvist
Hi, Bug reported by miod@, how to reproduce: $ command -v r alias r='fc -s' $ sleep 5 $ r sleep ^C # abort sleep before finishing $ r sleep ksh: fc: history function called recursively The c_fc() function has some internal state used to prevent recursive invocations that gets out

Re: Regression in "Add support to create and convert disk images from existing images"

2018-10-27 Thread Anton Lindqvist
On Wed, Oct 24, 2018 at 05:51:08PM +0200, Anton Lindqvist wrote: > On Mon, Oct 22, 2018 at 11:05:13AM -0700, Greg Steuck wrote: > > Hi Reyk & Anton, > > > > I upgraded the syzkaller machine from Oct 11 to Oct 21 snapshot and started > > seeing: > > Oct 22 10:

Re: Regression in "Add support to create and convert disk images from existing images"

2018-10-24 Thread Anton Lindqvist
On Mon, Oct 22, 2018 at 11:05:13AM -0700, Greg Steuck wrote: > Hi Reyk & Anton, > > I upgraded the syzkaller machine from Oct 11 to Oct 21 snapshot and started > seeing: > Oct 22 10:00:21 ci-openbsd vmd[15707]: qc2_open: missing base image > /syzkaller/managers/main/current/image > Oct 22

Re: Add bufferevent_setwatermark(3) to manual

2018-09-23 Thread Anton Lindqvist
On Sat, Sep 22, 2018 at 11:41:05AM -0700, Geoff Hill wrote: > New patch included. > > On Sat, Sep 22, 2018 at 07:09:44AM +0100, Jason McIntyre wrote: > > does the "ok" request mean you have commit access? (sorry, find it hard > > to keep track) > > Nope, no commit access, just a user sending up

Re: Add bufferevent_setwatermark(3) to manual

2018-09-22 Thread Anton Lindqvist
On Fri, Sep 21, 2018 at 06:36:54PM -0700, Geoff Hill wrote: > Hello tech, > > I noticed the event(3) manual pages don't mention the > bufferevent_setwatermark(3) function and glosses over the details of > watermarks, even though there's a few programs in userland that set both > read and write

Re: [patch] rebound: add NULL pointer checks

2018-09-08 Thread Anton Lindqvist
On Sat, Sep 08, 2018 at 11:48:35AM +0200, Clemens Goessnitzer wrote: > > > On 08/09/18 11:40, Theo Buehler wrote: > > On Sat, Sep 08, 2018 at 11:07:30AM +0200, Anton Lindqvist wrote: > > > On Fri, Sep 07, 2018 at 09:22:33PM +0200, Theo Buehler wrote: > > > >

Re: [patch] rebound: add NULL pointer checks

2018-09-08 Thread Anton Lindqvist
On Fri, Sep 07, 2018 at 09:22:33PM +0200, Theo Buehler wrote: > On Fri, Sep 07, 2018 at 09:15:30PM +0200, Clemens Goessnitzer wrote: > > This patch adds 2 missing NULL pointer checks to rebound.c after malloc(). > > The same function also contains an unchecked calloc. Since it's a daemon I guess

kdump: recognize kcov ioctl commands

2018-08-29 Thread Anton Lindqvist
Hi, Note that you must be running a fairly recent snapshot including the sys/kcov.h header in order to compile. Comments? OK? diff --git Makefile Makefile index e1918ae6a70..9c1416f12ef 100644 --- Makefile +++ Makefile @@ -39,6 +39,7 @@ ioctl.c: ${.CURDIR}/Makefile ${.CURDIR}/mkioctls

kcov: rename struct kd -> kcov_dev

2018-08-26 Thread Anton Lindqvist
Hi, The terse named struct kd was initially fine since it wasn't used outside of dev/kcov.c. Since struct proc now includes a pointer to such struct it definitely deserves a more descriptive name, as reminded by visa@. Comments? OK? Index: dev/kcov.c

Re: kcov: trace threads

2018-08-24 Thread Anton Lindqvist
On Thu, Aug 23, 2018 at 08:16:06AM +0200, Anton Lindqvist wrote: > Hi. > Currently kcov is enabled on a per process (pid) basis. A process with > multiple threads therefore share the same coverage buffer which leads to > non-deterministic results. Instead, kcov should be enabled on a

kcov: trace threads

2018-08-23 Thread Anton Lindqvist
Hi. Currently kcov is enabled on a per process (pid) basis. A process with multiple threads therefore share the same coverage buffer which leads to non-deterministic results. Instead, kcov should be enabled on a per thread basis; just like how kcov behaves on Linux and FreeBSD. The decision to

ffs_write: include vnode type in panic message

2018-07-21 Thread Anton Lindqvist
Hi, A minor correction, include the vnode type just like ffs_read() does when it encounters an unsupported type and panics. Comments? OK? Index: ffs_vnops.c === RCS file: /cvs/src/sys/ufs/ffs/ffs_vnops.c,v retrieving revision 1.91

vmctl: improve error message

2018-07-03 Thread Anton Lindqvist
Hi, Stopping a VM owned by root as a non-root user fails with the following error message: $ vmctl stop test vmctl: terminate vm command failed: Invalid argument I think favoring warnc() with the appropriate errno number passed along improves things. This of course is under the assumption

Re: kqueue: move members from filedesc to kqueue

2018-06-15 Thread Anton Lindqvist
On Fri, Jun 15, 2018 at 10:22:42AM +0200, Mark Kettenis wrote: > > Date: Fri, 15 Jun 2018 09:59:47 +0200 > > From: Anton Lindqvist > > > > On Tue, Jun 12, 2018 at 09:00:14PM +0200, Anton Lindqvist wrote: > > > Hi, > > > This diff moves the k

Re: kqueue: move members from filedesc to kqueue

2018-06-15 Thread Anton Lindqvist
On Tue, Jun 12, 2018 at 09:00:14PM +0200, Anton Lindqvist wrote: > Hi, > This diff moves the kqueue related members from struct filedesc to > struct kqueue with the prime motivation of fixing a panic in > knote_processexit() that can occur when the filedesc is gone. > Since filede

kqueue: move members from filedesc to kqueue

2018-06-12 Thread Anton Lindqvist
Hi, This diff moves the kqueue related members from struct filedesc to struct kqueue with the prime motivation of fixing a panic in knote_processexit() that can occur when the filedesc is gone. Since filedesc is no longer shared between kqueues belong to the same process, I added a list of the

Re: hashinit(): power of 2 fast path

2018-04-29 Thread Anton Lindqvist
On Sun, Apr 29, 2018 at 10:52:27AM +0200, Mathieu - wrote: > Disregard that, brainfart on my side. > > Mathieu - wrote: > > Anton Lindqvist wrote: > > > Hi, > > > If the elements argument passed to hashinit() is a power of 2 there's no > > > need to fi

hashinit(): power of 2 fast path

2018-04-28 Thread Anton Lindqvist
Hi, If the elements argument passed to hashinit() is a power of 2 there's no need to find the closest power of 2 that can fit all elements since elements == hashsize will always be true. During boot of a stock amd64 kernel running inside vmd 80% of the calls to hashinit() includes a power of 2

patch(1): remove unused header

2018-04-07 Thread Anton Lindqvist
Hi, Since patch(1) no longer invokes ed(1), pathnames.h can be removed. _PATH_TMP is still used inside patch.c but including paths.h is sufficient. Comments? OK? diff --git usr.bin/patch/patch.c usr.bin/patch/patch.c index fef7df6466e..af142599340 100644 --- usr.bin/patch/patch.c +++

Re: What does the struct xen_softc represent?

2018-03-25 Thread Anton Lindqvist
On Mon, Mar 26, 2018 at 12:17:22AM +0530, Pratyush Yadav wrote: > Hi everyone, > > I was looking at the Xen drivers in sys/dev/pv/xen.c and I noticed a struct > very frequently used, the xen_softc struct. I am new to Xen and kernel > programming in general and couldn't understand the use of this

Re: ksh: __func__ in warnings

2018-03-15 Thread Anton Lindqvist
On Thu, Mar 15, 2018 at 08:37:06AM +0100, Anton Lindqvist wrote: > On Tue, Mar 13, 2018 at 04:39:16PM +0800, Michael W. Bombardieri wrote: > > Hello, > > > > Some errors and warnings printed by ksh have the function name > > prefixed. __func__ could be used

Re: ksh: __func__ in warnings

2018-03-15 Thread Anton Lindqvist
On Tue, Mar 13, 2018 at 04:39:16PM +0800, Michael W. Bombardieri wrote: > Hello, > > Some errors and warnings printed by ksh have the function name > prefixed. __func__ could be used here instead of hard-coding > the name. The names are wrong for tty_init(), j_set_async(), > j_change(),

Re: ksh: bug with quoted parameter expansion

2018-01-25 Thread Anton Lindqvist
On Wed, Jan 24, 2018 at 04:15:24PM +0100, m...@josuah.net wrote: > I found a bug in ksh's parameter expansion on an edge case: > > true $(true "${USER#'"'}") > > /home/sh[4]: no closing quote > > The problem seems to occurs when all of these conditions are present: > > 1. On

Re: disabled code in ksh tree.c

2018-01-20 Thread Anton Lindqvist
On Tue, Jan 16, 2018 at 04:29:59PM +0100, Jeremie Courreges-Anglas wrote: > On Mon, Jan 15 2018, "Michael W. Bombardieri" <m...@ii.net> wrote: > > On Sun, Jan 14, 2018 at 05:47:43PM +0100, Jeremie Courreges-Anglas wrote: > >> On Sun, Jan 14 2018, Anton L

Re: disabled code in ksh tree.c

2018-01-14 Thread Anton Lindqvist
On Thu, Jan 11, 2018 at 03:25:15PM +0800, Michael W. Bombardieri wrote: > Hello, > > Revision 1.9 of tree.c (from 1999) added the disabled code and it > is still disabled. Would it be better to remove it? Fine with me. Anyone else willing OK? > - Michael > > > Index: tree.c >

ksh: ulimit optstring

2018-01-14 Thread Anton Lindqvist
Hi, Stop constructing the optstring passed to ksh_getopt() for ulimit at runtime. While here remove ifdef RLIMIT_VMEM block since it's not defined. Comments? OK? Index: c_ulimit.c === RCS file: /cvs/src/bin/ksh/c_ulimit.c,v

Re: httpd response mimetype bug

2018-01-13 Thread Anton Lindqvist
On Sat, Jan 13, 2018 at 01:08:38PM +0100, Hiltjo Posthuma wrote: > On Sat, Jan 13, 2018 at 09:39:44AM +0100, Anton Lindqvist wrote: > > On Tue, Jan 09, 2018 at 05:38:57PM +0100, Hidvégi Gábor wrote: > > > >Synopsis: httpd reports wrong mimetype when item is in the browser

ksh: remove BRACE_EXPAND

2018-01-13 Thread Anton Lindqvist
Hi, Looks like all variants of ksh in the tree is compiled with BRACE_EXPAND defined, therefore remove it. No binary change. While here, fix an endif typo. Comments? OK? Index: config.h === RCS file: /cvs/src/bin/ksh/config.h,v

Re: httpd response mimetype bug

2018-01-13 Thread Anton Lindqvist
On Tue, Jan 09, 2018 at 05:38:57PM +0100, Hidvégi Gábor wrote: > >Synopsis: httpd reports wrong mimetype when item is in the browser cache > >Category: httpd > >Environment: > System : OpenBSD 6.2 > Details : OpenBSD 6.2 (GENERIC) #91: Wed Oct 4 00:35:21 MDT > 2017 > >

Re: ksh: remove unused param from kb_add()

2018-01-08 Thread Anton Lindqvist
On Sun, Jan 07, 2018 at 12:26:22PM -0700, Todd C. Miller wrote: > In kb_add(), the args parameter is always NULL. Noticed by anton@ ok anton@

wsconsctl: minor cleanup

2017-12-30 Thread Anton Lindqvist
Hi, Get rid of a unused variable and define the noinput lex option in order to suppress the following warning: map_scan.c:1235:16: warning: function 'input' is not needed and will not be emitted static int input (void) Comments? OK? Index: map_scan.l

Re: release(8): join exports

2017-12-23 Thread Anton Lindqvist
On Fri, Dec 22, 2017 at 10:39:20PM +0100, Mark Kettenis wrote: > > Date: Fri, 22 Dec 2017 22:12:19 +0100 > > From: Anton Lindqvist <an...@openbsd.org> > > > > Hi, > > Since export accepts several variables, put them on a single line. > > > > Comme

release(8): join exports

2017-12-22 Thread Anton Lindqvist
Hi, Since export accepts several variables, put them on a single line. Comments? OK? Index: release.8 === RCS file: /cvs/src/share/man/man8/release.8,v retrieving revision 1.89 diff -u -p -r1.89 release.8 --- release.8 5 Jun 2017

Re: one XXX in ksh(1)

2017-12-18 Thread Anton Lindqvist
On Mon, Dec 18, 2017 at 08:37:17PM +0100, Anton Lindqvist wrote: > On Mon, Dec 18, 2017 at 03:18:37PM +0800, Michael W. Bombardieri wrote: > > Hello, > > > > In my understanding the reason why texec had to be static was > > because the struct member ioact was never ini

Re: one XXX in ksh(1)

2017-12-18 Thread Anton Lindqvist
On Mon, Dec 18, 2017 at 03:18:37PM +0800, Michael W. Bombardieri wrote: > Hello, > > In my understanding the reason why texec had to be static was > because the struct member ioact was never initialised. > The call tree is execute() -> comexec() -> exchild() -> execute() > and a fork happens in

Re: csh dounsetenv()

2017-12-18 Thread Anton Lindqvist
On Sun, Dec 17, 2017 at 05:54:23PM +0800, Michael W. Bombardieri wrote: > Hello, > > The free() at the top of dounsetenv() in csh(1) isn't needed > because name is always freed before returning at bottom of function. > Also, name itself is never returned so it doesn't need to be static. > >

Re: ksh: make home & end keys work out-of-the-box in the console

2017-12-18 Thread Anton Lindqvist
On Mon, Dec 18, 2017 at 06:29:46PM +0100, Anton Lindqvist wrote: > On Sat, Dec 16, 2017 at 01:58:49PM +0200, Lari Rasku wrote: > > Tested with vt220 and wsvt25. Hopefully we're close to exhausting > > all the different ways to encode these keys by now. > > > > diff --

Re: ksh: make home & end keys work out-of-the-box in the console

2017-12-18 Thread Anton Lindqvist
On Sat, Dec 16, 2017 at 01:58:49PM +0200, Lari Rasku wrote: > Tested with vt220 and wsvt25. Hopefully we're close to exhausting > all the different ways to encode these keys by now. > > diff --git bin/ksh/emacs.c bin/ksh/emacs.c > index 07bfbd914..4291ce656 100644 > --- bin/ksh/emacs.c > +++

Re: csh: NULL checks before free()

2017-12-16 Thread Anton Lindqvist
On Fri, Dec 15, 2017 at 05:03:40PM +0800, Michael W. Bombardieri wrote: > Hello, > > Previously in csh(1) the xfree() function was removed in favour > of regular free(). This patch removes a couple of NULL checks > before free(). Committed, thanks!

ksh: stop emitting carriage return twice

2017-12-12 Thread Anton Lindqvist
Hi, Here's a little nit that has been bugging me while writing tests for Emacs editing mode in ksh. Since the map-CR-to-NL (ONLCR) output mode is enabled by default on the tty, emitting a newline gets translated into a carriage return (CR) followed by newline (NL). Parts of the Emacs related code

Re: ksh(1): kill the "version" function

2017-11-26 Thread Anton Lindqvist
On Sun, Nov 26, 2017 at 07:27:37PM +0100, Jeremie Courreges-Anglas wrote: > On Tue, Nov 21 2017, Anton Lindqvist <an...@openbsd.org> wrote: > > Hi, > > While writing tests for the Emacs editing mode in ksh I discovered some > > potential errors in the manual: >

ksh(1): manual tweaks

2017-11-21 Thread Anton Lindqvist
Hi, While writing tests for the Emacs editing mode in ksh I discovered some potential errors in the manual: - Sync the order of key bindings in emacs.c with the manual - ^W is bound to delete-word-backward and not kill-region which is mentioned in emacs.c. I don't know the full history here...

Re: wsconscfg(8): ioctl request macros

2017-11-15 Thread Anton Lindqvist
On Tue, Oct 31, 2017 at 12:24:20PM +0100, Anton Lindqvist wrote: > Hi, > Use the actual ioctl request macros instead of relying on compatibility > indirection. > > Looks like wsconscfg(8) is the last consumer of the compat macros > defined in dev/wscons/wsconsio.h. Assumin

csh(1): minor tweaks

2017-11-14 Thread Anton Lindqvist
Hi, In revision 1.35 of file.c tenex() was modified to respect the inputline_size argument. I did miss one conditional which depends on the size of the input buffer. This change does not cause any functional change since tenex() only has one call site where `inputline_size == sizeof(buf)` but for

Re: libfuse: signal handler doesn't cater for "Device busy" and other errors

2017-11-10 Thread Anton Lindqvist
On Fri, Nov 10, 2017 at 09:36:25AM +0100, Martin Pieuchot wrote: > On 09/11/17(Thu) 09:02, Helg Bredow wrote: > > The current libfuse signal handling assumes that the file system will > > always be unmounted by the child. One obvious case where this is not true > > is if the file system is busy.

wsconscfg(8): ioctl request macros

2017-10-31 Thread Anton Lindqvist
Hi, Use the actual ioctl request macros instead of relying on compatibility indirection. Looks like wsconscfg(8) is the last consumer of the compat macros defined in dev/wscons/wsconsio.h. Assuming there's no usage in ports, now might be the time to zap them? Comments? OK? Index: wsconscfg.c

pms: reset announcement

2017-10-29 Thread Anton Lindqvist
Hi, Every now and then, my Synaptics touchpad stops working and no further interrupts are received for the device. The following message appears in the log: pms0: not in sync yet, discard input (state = 0) Examining the bytes received prior to the halt reveals the sequence [0xaa, 0x00] which

Re: apmd: manual tweak

2017-10-16 Thread Anton Lindqvist
On Mon, Oct 16, 2017 at 06:10:02PM +0100, Jason McIntyre wrote: > On Mon, Oct 16, 2017 at 06:38:31PM +0200, Anton Lindqvist wrote: > > > > Good call. Without knowing too much about the apmd internals, here's a > > first stab. As I read the code, the period polling is also use

Re: apmd: manual tweak

2017-10-16 Thread Anton Lindqvist
On Mon, Oct 16, 2017 at 03:57:22PM +0100, Jason McIntyre wrote: > On Mon, Oct 16, 2017 at 04:06:59PM +0200, Anton Lindqvist wrote: > > Hi, > > A proposal on improving the `-t` option documentation. Most importantly, > > remove the recursive reference to the op

apmd: manual tweak

2017-10-16 Thread Anton Lindqvist
Hi, A proposal on improving the `-t` option documentation. Most importantly, remove the recursive reference to the option being documented. Comments? OK? Index: apmd.8 === RCS file: /cvs/src/usr.sbin/apmd/apmd.8,v retrieving

Re: dirty1, for those w/vanishing memory to keep up w/multiple cu's

2017-10-16 Thread Anton Lindqvist
On Sun, Oct 15, 2017 at 10:45:53AM +0300, Artturi Alm wrote: > Hi, > > i've been saving time+frustration for having had this, but i'm not proposing > anything, i'm aware how this what most likely exists only because of how badly > scripts stick w/me across reinstalls/need of backups, compared to

acpi: free() size

2017-10-11 Thread Anton Lindqvist
Hi, Add missing size to free(), tested on amd64. Comments? OK? Index: dsdt.c === RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v retrieving revision 1.234 diff -u -p -r1.234 dsdt.c --- dsdt.c 28 May 2017 15:36:45 - 1.234 +++

Re: ctags(1): missing space between tag and line number

2017-10-10 Thread Anton Lindqvist
Ping On Thu, Oct 05, 2017 at 10:41:09AM +0200, Anton Lindqvist wrote: > Hi, > Running `ctags -x` on a file including a tag which satisfies strlen(tag) > >= 16 and line number >= 1000 corrupts the output since there's no space > between the tag and line number. Therefore, add a

ctags(1): missing space between tag and line number

2017-10-05 Thread Anton Lindqvist
Hi, Running `ctags -x` on a file including a tag which satisfies strlen(tag) >= 16 and line number >= 1000 corrupts the output since there's no space between the tag and line number. Therefore, add a space between them just like ectags and uctags in ports does. $ ctags -x /sys/dev/usb/umass.c |

Re: [patch] ftp(1): change mtime for http/https links

2017-09-23 Thread Anton Lindqvist
On Fri, Sep 22, 2017 at 11:56:51PM +0100, Raf Czlonka wrote: > On Fri, Sep 22, 2017 at 11:01:57PM BST, Jesper Wallin wrote: > > Hi all, > > > > My morning routine consists of downloading the latest snapshot files and > > running the upgrade. To avoid wasting bandwidth and time, I check the > >

clang-local(1): typo

2017-09-13 Thread Anton Lindqvist
undesriable -> undesirable; ok? Index: clang-local.1 === RCS file: /cvs/src/share/man/man1/clang-local.1,v retrieving revision 1.9 diff -u -p -r1.9 clang-local.1 --- clang-local.1 29 Jul 2017 21:01:13 - 1.9 +++

csh(1): zap redundant assignment

2017-08-30 Thread Anton Lindqvist
Comments? OK? Index: lex.c === RCS file: /cvs/src/bin/csh/lex.c,v retrieving revision 1.24 diff -u -p -r1.24 lex.c --- lex.c 23 Jan 2017 04:53:15 - 1.24 +++ lex.c 30 Aug 2017 07:09:50 - @@ -1426,7 +1426,6 @@

csh(1): paste long lines

2017-08-28 Thread Anton Lindqvist
Hi, deraadt@ discovered that pasting long lines in csh with filec enabled is currently broken. NUL-terminating the input buffer from tenex() instructs csh that the buffer contains a complete command. This is wrong and should only happen when buffer is not full, otherwise more data has to be read

uplcom(4): add adapter to manual

2017-08-07 Thread Anton Lindqvist
Hi, I recently got an Aten UC232A (Prolific chipset) adapter which is supported by uplcom. Comments? OK? Index: uplcom.4 === RCS file: /cvs/src/share/man/man4/uplcom.4,v retrieving revision 1.26 diff -u -p -r1.26 uplcom.4 ---

Re: less(1) - segmentation fault with '-g'

2017-08-03 Thread Anton Lindqvist
On Wed, Aug 02, 2017 at 09:39:25PM +0200, Anton Lindqvist wrote: > On Wed, Aug 02, 2017 at 08:46:26PM +0200, Martijn van Duren wrote: > > You're right. Maybe I should read up on my less. :-) > > > > OK martijn@ for the full diff. > > Thanks, committed. The fix

Re: less(1) - segmentation fault with '-g'

2017-08-02 Thread Anton Lindqvist
On Wed, Aug 02, 2017 at 08:46:26PM +0200, Martijn van Duren wrote: > You're right. Maybe I should read up on my less. :-) > > OK martijn@ for the full diff. Thanks, committed. > On 08/02/17 19:55, Anton Lindqvist wrote: > > On Wed, Aug 02, 2017 at 07:19:50PM +0200, Marti

  1   2   >