Re: speaker(4): unhook driver and manpage from build

2022-04-29 Thread Jeremie Courreges-Anglas
On Thu, Apr 28 2022, Scott Cheloha wrote: > speaker(4) is a whimsical thing, but I don't think we should have a > dedicated chiptune interpreter in the kernel. > This patch unhooks the driver and the manpage from the build. The > driver is built for alpha, amd64, and i386. > > A subsequent

Re: ddb: simplify "machine" command handling

2022-04-11 Thread Jeremie Courreges-Anglas
On Mon, Apr 11 2022, Christian Weisgerber wrote: > Christian Weisgerber: > >> This will allow constifying the ddb command tables in a subsequent >> step. > > And here's that boring follow-up diff. sparc64 and riscv64 GENERIC and GENERIC.MP build successfully with this diff and the previous one,

Re: gpio: Add missing device_unref()

2022-04-10 Thread Jeremie Courreges-Anglas
On Sun, Apr 10 2022, Visa Hankala wrote: > Make gpio(4) release the device reference that device_lookup() takes. > > OK? ok jca@ -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: [PATCH] [src] usr.bin/sendbug/sendbug.c - update categories

2022-04-10 Thread Jeremie Courreges-Anglas
On Tue, Mar 29 2022, Theo Buehler wrote: > On Tue, Mar 29, 2022 at 08:51:25PM +0200, Jeremie Courreges-Anglas wrote: >> On Tue, Mar 29 2022, Raf Czlonka wrote: >> > Hello, >> > >> > sparc and vax ports have been retired a while back; add riscv64 >&g

Re: [diff] gzip verbose message

2022-04-10 Thread Jeremie Courreges-Anglas
On Wed, Apr 06 2022, prx wrote: > Since gzip has -k flag to keep original file, the output when used with -v > flag is wrong. > > Find below a stupid diff almost shorter than this message. > > Regards > > Index: main.c > === > RCS

Re: [PATCH] [src] usr.bin/sendbug/sendbug.c - update categories

2022-03-29 Thread Jeremie Courreges-Anglas
On Tue, Mar 29 2022, Raf Czlonka wrote: > Hello, > > sparc and vax ports have been retired a while back; add riscv64 > while there. Committed, thanks. There are more missing entries I think. If I follow the existing pattern, naming the cpu architectures and not the platforms: - aarch64 is

riscv64: chatty SIGILL printf

2022-03-22 Thread Jeremie Courreges-Anglas
Just like breakpoints, SIGILL shouldn't print anything. FWIW this seems to only happen once in a ports bulk build. ok? Index: trap.c === RCS file: /home/cvs/src/sys/arch/riscv64/riscv64/trap.c,v retrieving revision 1.17 diff -u

Re: fix multiple iwm/iwx interfaces

2022-03-16 Thread Jeremie Courreges-Anglas
On Mon, Mar 14 2022, Stefan Sperling wrote: > It is currently impossible to use more than one iwm or iwx interface > in a system because I don't understand C. > > Trying to bring up an uninitialized interface anyway results in a > kernel panic ("bogus channel pointer" from net80211), so prevent >

Re: add -k / --keep for gzip(1)

2022-03-13 Thread Jeremie Courreges-Anglas
On Sat, Mar 12 2022, Solene Rapenne wrote: > On Sat, 12 Mar 2022 15:49:40 +0100 > Solene Rapenne : > >> On Sat, 05 Mar 2022 19:15:02 -0700 >> "Todd C. Miller" : >> >> > On Sun, 06 Mar 2022 02:58:30 +0100, Jeremie Courreges-Anglas wrote: >> &g

Re: riscv64: ld.lld is too picky on ABI mismatch

2022-03-09 Thread Jeremie Courreges-Anglas
On Mon, Oct 25 2021, Jeremie Courreges-Anglas wrote: > On Mon, Oct 25 2021, Patrick Wildt wrote: >> Am Mon, Oct 25, 2021 at 11:43:55AM +0200 schrieb Mark Kettenis: >>> > From: Jeremie Courreges-Anglas >>> > Date: Sun, 24 Oct 2021 17:30:46 +0100 >>> >

Re: Add kernel stack trace saving for riscv64

2022-03-08 Thread Jeremie Courreges-Anglas
On Tue, Mar 08 2022, Visa Hankala wrote: > This patch adds kernel stack trace saving for riscv64, for the benefit > of dt(4) and witness(4). Nice! > The unwinder is slow because of the symbol > lookup, but this can be tweaked later. A dumb approach that appears to work: add

Re: add -k / --keep for gzip(1)

2022-03-05 Thread Jeremie Courreges-Anglas
On Thu, Mar 03 2022, Todd C. Miller wrote: > On Thu, 03 Mar 2022 15:11:13 +, Miod Vallat wrote: > >> > I think this makes sense if only for better GNU gzip compatibility. >> > OK millert@ >> >> But does the `-k' flag needs to be added to compress(1) too? > > No, it just makes usage() slightly

Re: add openvpn 1194/udp/tcp port to /etc/services

2022-03-01 Thread Jeremie Courreges-Anglas
On Tue, Mar 01 2022, Landry Breuil wrote: > Hi, > > while looking at other things i noticed OpenVPN wasnt in /etc/services. > > apparently its listed/registered by IANA since 2004 (i know, not a reason), > and > i have it on a debian 11 box and on a FreeBSD 12.2 server. > > i see two reasons: >

Re: lldb(1) libedit support

2022-02-24 Thread Jeremie Courreges-Anglas
On Tue, Feb 15 2022, Greg Steuck wrote: > Andrei writes: > >> The lldb(1) debugger was recently added in base and as I was playing around >> with it I noticed the lack of line editing functionality. >> >> This is because currently lldb is built without support for >> libedit. It would be nice

ubsan_minimal documentation hint (was: Re: Ship ubsan_minimal library in base?)

2022-02-16 Thread Jeremie Courreges-Anglas
On Tue, Feb 15 2022, Jeremie Courreges-Anglas wrote: [...] >>> Index: clang-local.1 >>> === >>> RCS file: /home/cvs/src/share/man/man1/clang-local.1,v >>> retrieving revision 1.22 >&

Re: Ship ubsan_minimal library in base?

2022-02-15 Thread Jeremie Courreges-Anglas
orm, that would be useful. > > Jeremie Courreges-Anglas writes: > >> On Sat, Feb 05 2022, Jeremie Courreges-Anglas wrote: >>> On Fri, Feb 04 2022, Greg Steuck wrote: >>>> How do people feel about shipping the minimal UBSan runtime library[1] >>>> in t

Re: Ship ubsan_minimal library in base?

2022-02-05 Thread Jeremie Courreges-Anglas
On Sat, Feb 05 2022, Jeremie Courreges-Anglas wrote: > On Fri, Feb 04 2022, Greg Steuck wrote: >> How do people feel about shipping the minimal UBSan runtime library[1] >> in the base system? It takes very little to build (Makefile + a few >> ifdefs that both jca@

Re: Ship ubsan_minimal library in base?

2022-02-05 Thread Jeremie Courreges-Anglas
On Fri, Feb 04 2022, Greg Steuck wrote: > How do people feel about shipping the minimal UBSan runtime library[1] > in the base system? It takes very little to build (Makefile + a few > ifdefs that both jca@ and I hacked together). The library is tiny and > useful enough for finding UB in base.

Re: Missing UBSan libs

2022-02-02 Thread Jeremie Courreges-Anglas
On Mon, Jan 31 2022, Greg Steuck wrote: > Patrick Wildt writes: > >> regarding the missing userpace support: Since a few clang updates ago >> we import more than just the builtins of compiler-rt. This means we >> should have at least some related code in our tree, even if it is not >>

Re: fix active scan on iwm and iwx

2022-01-21 Thread Jeremie Courreges-Anglas
On Thu, Jan 13 2022, Stefan Sperling wrote: > At present active scans (which send probe requests, as opposed to > just listening for beacons) are disabled on iwm 9k and iwx. This > was done because firmware misbehaved after association. > > zxystd from the OpenIntelWireless project has debugged

Re: DNS in acme-client

2021-12-12 Thread Jeremie Courreges-Anglas
On Sun, Dec 12 2021, Florian Obser wrote: > On 12 December 2021 21:19:21 CET, Jeremie Courreges-Anglas > wrote: >> >>dnsproc.c only returns a single address even if the code pretends to >>support multiple addresses. This leads to weird behavior in edge cases, >>a

DNS in acme-client

2021-12-12 Thread Jeremie Courreges-Anglas
dnsproc.c only returns a single address even if the code pretends to support multiple addresses. This leads to weird behavior in edge cases, as experienced by a user on IRC. Take a machine with both IPv4 and IPv6 addresses configured, but no IPv4 default route (on purpose). Since there is at

Re: asr(3): strip AD flag in responses

2021-11-23 Thread Jeremie Courreges-Anglas
On Mon, Nov 22 2021, Florian Obser wrote: > On 2021-11-21 22:21 +01, Jeremie Courreges-Anglas wrote: >> On Sun, Nov 21 2021, Jeremie Courreges-Anglas wrote: >>> On Sat, Nov 20 2021, Florian Obser wrote: >> >> [...] >> >

Re: asr(3): strip AD flag in responses

2021-11-22 Thread Jeremie Courreges-Anglas
On Mon, Nov 22 2021, Florian Obser wrote: > On 2021-11-21 21:34 +01, Jeremie Courreges-Anglas wrote: >> On Sat, Nov 20 2021, Florian Obser wrote: >>> On 2021-11-20 17:05 +01, Jeremie Courreges-Anglas wrote: > >>> do you remember why you check for !RES_USE_DNSSEC

Re: asr(3): strip AD flag in responses

2021-11-21 Thread Jeremie Courreges-Anglas
On Sun, Nov 21 2021, Jeremie Courreges-Anglas wrote: > On Sat, Nov 20 2021, Florian Obser wrote: [...] >>> Index: lib/libc/asr/res_mkquery.c >>> === >>> RCS file: /home/cvs/src/lib/libc/asr/res_mkque

Re: asr(3): strip AD flag in responses

2021-11-21 Thread Jeremie Courreges-Anglas
On Sat, Nov 20 2021, Florian Obser wrote: > On 2021-11-20 17:05 +01, Jeremie Courreges-Anglas wrote: [...] >> Index: lib/libc/asr/getrrsetbyname_async.c >> === >> RCS file: /home/cvs/src/lib/libc/asr/get

Re: asr(3): strip AD flag in responses

2021-11-20 Thread Jeremie Courreges-Anglas
First, I'm happy to this subject considered again, even if I don't use DNSSEC these days I think it makes sense to provide this support in libc. On Sat, Nov 20 2021, Florian Obser wrote: > On 2021-11-20 14:40 +01, Otto Moerbeek wrote: >> On Sat, Nov 20, 2021 at 12:20:32PM +0100, Florian Obser

Re: some warnings in prep for LLVM 13

2021-10-25 Thread Jeremie Courreges-Anglas
On Mon, Oct 25 2021, Mark Kettenis wrote: >> From: Jeremie Courreges-Anglas >> Date: Mon, 25 Oct 2021 14:55:16 +0100 >> >> On Mon, Oct 25 2021, Mark Kettenis wrote: >> >> Date: Mon, 25 Oct 2021 12:37:41 +0200 (CEST) >> >> From: Mark Kettenis

Re: some warnings in prep for LLVM 13

2021-10-25 Thread Jeremie Courreges-Anglas
On Mon, Oct 25 2021, Mark Kettenis wrote: >> Date: Mon, 25 Oct 2021 12:37:41 +0200 (CEST) >> From: Mark Kettenis >> >> > Date: Mon, 25 Oct 2021 12:01:11 +0200 >> > From: Patrick Wildt >> > >> > Hi, >> > >> > mortimer@ has this diff in his tree for LLVM 13. I actually haven't >> > tried to

Re: some warnings in prep for LLVM 13

2021-10-25 Thread Jeremie Courreges-Anglas
On Mon, Oct 25 2021, Theo Buehler wrote: >> index 664a5200037..e33763e7420 100644 >> --- a/usr.bin/openssl/Makefile >> +++ b/usr.bin/openssl/Makefile >> @@ -17,6 +17,7 @@ CFLAGS+= -Wuninitialized >> CFLAGS+= -Wunused >> .if ${COMPILER_VERSION:L} == "clang" >> CFLAGS+= -Werror >> +CFLAGS+=

Re: riscv64: ld.lld is too picky on ABI mismatch

2021-10-25 Thread Jeremie Courreges-Anglas
On Mon, Oct 25 2021, Patrick Wildt wrote: > Am Mon, Oct 25, 2021 at 11:43:55AM +0200 schrieb Mark Kettenis: >> > From: Jeremie Courreges-Anglas >> > Date: Sun, 24 Oct 2021 17:30:46 +0100 >> > >> > clang(1) defaults to FP ABI but ld(1) -melf64lriscv d

riscv64: ld.lld is too picky on ABI mismatch

2021-10-24 Thread Jeremie Courreges-Anglas
clang(1) defaults to FP ABI but ld(1) -melf64lriscv doesn't. This is a problem as soon as a port tries to use raw ld(1) -b binary to embed data in a .o file. Downgrading this hard error to a warning seems more useful as far as the ports tree is concerned. The diff below fixes

Re: riscv64: icache flush using sysarch(2)

2021-09-13 Thread Jeremie Courreges-Anglas
On Thu, Sep 09 2021, Mark Kettenis wrote: >> From: Jeremie Courreges-Anglas >> Date: Sun, 05 Sep 2021 21:41:35 +0200 >> >> On Sat, Sep 04 2021, Jeremie Courreges-Anglas wrote: >> > The first problem I was able to diagnose using egdb on riscv was >> >

Re: riscv64: icache flush using sysarch(2)

2021-09-05 Thread Jeremie Courreges-Anglas
On Sat, Sep 04 2021, Jeremie Courreges-Anglas wrote: > The first problem I was able to diagnose using egdb on riscv was > lang/python/2.7 using libffi and aborting in libcompiler-rt (the > compilerrt_abort() call below). > > --8<-- > #elif defined(__riscv) &&

riscv64: icache flush using sysarch(2)

2021-09-04 Thread Jeremie Courreges-Anglas
t val) Index: include/sysarch.h === RCS file: include/sysarch.h diff -N include/sysarch.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ include/sysarch.h 4 Sep 2021 09:12:53 - @@ -0,0 +1,38 @@ +/* $OpenBSD$ */ + +/* + * Co

riscv64/trap.c debug printfs

2021-09-03 Thread Jeremie Courreges-Anglas
This one is a bit too chatty whenever you run a program under egdb. But the other printfs in this file seem ok, thus I'm not touching them. ok? Index: trap.c === RCS file: /d/cvs/src/sys/arch/riscv64/riscv64/trap.c,v retrieving

Re: riscv64 ptrace(2) tweaks

2021-09-03 Thread Jeremie Courreges-Anglas
On Fri, Sep 03 2021, Mark Kettenis wrote: >> From: Jeremie Courreges-Anglas >> Date: Fri, 03 Sep 2021 14:32:26 +0200 >> >> Two changes that would be useful: >> - enable PT_*FPREGS, Mark has already done the job. >> - hide PT_STEP since hardware suppor

riscv64 ptrace(2) tweaks

2021-09-03 Thread Jeremie Courreges-Anglas
Two changes that would be useful: - enable PT_*FPREGS, Mark has already done the job. - hide PT_STEP since hardware support seems missing (the spec only talks about single stepping support in "Debug mode", which is not "Machine" or "Supervisor" mode). Since we don't emulate it (like mips64

Re: usertc: small consistency tweaks

2021-07-25 Thread Jeremie Courreges-Anglas
cc'ing cheloha@ since he probably cares about this. On Sun, Jul 25 2021, Mark Kettenis wrote: >> From: Jeremie Courreges-Anglas >> Date: Sun, 25 Jul 2021 04:31:20 +0200 >> >> On Sat, Jul 24 2021, Mark Kettenis wrote: >> >> From: Jeremie Courreges-Anglas

usertc: small consistency tweaks (was: Re: riscv64 usertc)

2021-07-24 Thread Jeremie Courreges-Anglas
On Sat, Jul 24 2021, Mark Kettenis wrote: >> From: Jeremie Courreges-Anglas >> Date: Sat, 24 Jul 2021 21:22:23 +0200 >> >> hifive /usr/src/regress/sys/kern/gettimeofday$ doas -u build time >> obj/gettimeofday >> 6.64 real 6.63 user

riscv64 usertc

2021-07-24 Thread Jeremie Courreges-Anglas
1/04/29 18:33:36 drahn Exp $*/ /* * Copyright (c) 2020 Paul Irofti + * Copyright (c) 2021 Jeremie Courreges-Anglas * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -18,4 +19,24 @@

readelf(1) on riscv64: pretty-print machine name

2021-07-24 Thread Jeremie Courreges-Anglas
Before: Machine: : f3 After: Machine: RISC-V ok? Index: binutils/readelf.c === RCS file: /cvs/src/gnu/usr.bin/binutils-2.17/binutils/readelf.c,v retrieving revision 1.22 diff

Re: riscv64: slightly optimized copyin/copyout/kcopy

2021-07-23 Thread Jeremie Courreges-Anglas
On Fri, Jul 23 2021, Mark Kettenis wrote: >> From: Jeremie Courreges-Anglas >> Date: Fri, 23 Jul 2021 11:54:51 +0200 >> Content-Type: text/plain >> >> >> I've been using a variation of this diff on my hifive unmatched since >> a few days. The goal

riscv64: slightly optimized copyin/copyout/kcopy

2021-07-23 Thread Jeremie Courreges-Anglas
I've been using a variation of this diff on my hifive unmatched since a few days. The goal is to at least optimize the aligned cases by using 8 or 4 bytes loads/stores. On this hifive unmatched, I found that unaligned 8 or 4 bytes loads/stores loops are utterly slow, much slower than

Re: ksh: require expression in while loop

2021-07-05 Thread Jeremie Courreges-Anglas
On Sun, Jul 04 2021, Todd C. Miller wrote: > On Sun, 04 Jul 2021 23:25:25 +0200, Alexander Hall wrote: > >> The "... do done" variant has been frequently used by me, and seems to appear >> at least three times in install.sub, so if this goes in, please scan the scr >> ipts in our tree first, at

Re: tcpdump: print 802.11 sequence numbers properly

2021-06-28 Thread Jeremie Courreges-Anglas
On Mon, Jun 28 2021, Stefan Sperling wrote: > tcpdump -e -v -y IEEE802_11_RADIO currently prints sequence number > and fragment number as a combined decimal value. > > This patch makes tcpdump display these values separately which is a lot > easier to follow along as packets scroll by. > > ok?

base-gcc: fix -Wno-error=uninitialized

2021-06-23 Thread Jeremie Courreges-Anglas
In base-gcc -Wno-error=uninitialized is currently ineffective, in that cc1 still errors out with the following flags combination: billy /tmp$ cat t.c #include int f(void) { int r; return r; } billy /tmp$ gcc -v -c -O2 -Wall -Werror -Wno-error=uninitialized

Re: Patch: ksh: fix input handling for 4 byte UTF-8 sequences

2021-06-03 Thread Jeremie Courreges-Anglas
On Wed, Jun 02 2021, Ingo Schwarze wrote: > Hi, > > feeling hesitant to commit into ksh without at least one proper OK, > i'm resending this patch here, sorry if i missed private feedback. I found two mails in my drafts folder, sorry, you didn't miss any feedback from me. > What the existing

Re: services(5): more cleanup

2021-05-16 Thread Jeremie Courreges-Anglas
On Sat, May 15 2021, Aisha Tammy wrote: > On 5/11/21 9:04 PM, Kurt Mosiejczuk wrote: >> On Wed, May 12, 2021 at 01:13:55AM +0200, Jeremie Courreges-Anglas wrote: >> >>> I'd like to drop SWAT, unofficial and dropped by the samba project >>> around the switch

Re: panic(9): set panicstr atomically

2021-05-13 Thread Jeremie Courreges-Anglas
On Thu, May 13 2021, Jeremie Courreges-Anglas wrote: > On Wed, May 12 2021, Scott Cheloha wrote: >> Hi, >> >> In a separate mail thread, bluhm@ mentioned that panic(9) does not >> cleanly handle multiple CPUs entering it simultaneously: >> >> https://marc

Re: panic(9): set panicstr atomically

2021-05-13 Thread Jeremie Courreges-Anglas
On Wed, May 12 2021, Scott Cheloha wrote: > Hi, > > In a separate mail thread, bluhm@ mentioned that panic(9) does not > cleanly handle multiple CPUs entering it simultaneously: > > https://marc.info/?l=openbsd-tech=161908805925325=2 > > I'm unsure which part of panic(9) is causing the problem he

services(5): more cleanup

2021-05-11 Thread Jeremie Courreges-Anglas
On Wed, May 05 2021, Stuart Henderson wrote: > On 2021/05/04 12:07, Jan Klemkow wrote: >> Hi, >> >> Add missing ftps defaults ports to servies(5). >> >> OK? >> >> bye, >> Jan >> >> Index: services >> === >> RCS file:

Re: apmd/apm: propagate failure to apm, make apm report failure

2021-04-06 Thread Jeremie Courreges-Anglas
On Wed, Apr 07 2021, Klemens Nanni wrote: > On Tue, Apr 06, 2021 at 11:35:44PM +0200, Jeremie Courreges-Anglas wrote: [...] >> > @@ -321,40 +328,49 @@ handle_client(int sock_fd, int ctl_fd) >> >return reply.newstate; >> > } >> > >&g

Re: apmd/apm: propagate failure to apm, make apm report failure

2021-04-06 Thread Jeremie Courreges-Anglas
On Fri, Apr 02 2021, Klemens Nanni wrote: > On Fri, Mar 26, 2021 at 10:49:53PM +0100, Klemens Nanni wrote: >> On Fri, Mar 26, 2021 at 10:38:30PM +0100, Klemens Nanni wrote: >> > apm(8) never knows gets the result of the requested power action carried >> > out by apmd(8), so platforms without

Re: arm64: make cwfg(4) report battery information to apm(4)

2021-03-24 Thread Jeremie Courreges-Anglas
On Wed, Mar 24 2021, Klemens Nanni wrote: > On Wed, Mar 24, 2021 at 12:49:51AM +0100, Jeremie Courreges-Anglas wrote: > >> >> > @@ -202,6 +217,12 @@ cwfg_attach(struct device *parent, struc >> >> > >> >> > sensor_task_register(sc, c

Re: arm64: make cwfg(4) report battery information to apm(4)

2021-03-23 Thread Jeremie Courreges-Anglas
On Mon, Mar 22 2021, Klemens Nanni wrote: > Better diff at the end thanks to jca's eyeballing, see comments inline. > > kettenis: I see room for improvement in our subsystems and their > interactions, but I don't think the current situation is bad enough to > leave those bits out for now. > >

Re: arm64: make cwfg(4) report battery information to apm(4)

2021-03-21 Thread Jeremie Courreges-Anglas
On Sun, Mar 21 2021, Mark Kettenis wrote: >> Date: Sun, 21 Mar 2021 17:22:05 +0100 >> From: Klemens Nanni >> >> On Sun, Mar 21, 2021 at 02:02:00PM +0100, Mark Kettenis wrote: >> > > Date: Sun, 21 Mar 2021 01:02:53 +0100 >> > > From: Klemens Nanni >> > > >> > > apm(4/arm64) merely provides an

Re: arm64: make cwfg(4) report battery information to apm(4)

2021-03-21 Thread Jeremie Courreges-Anglas
On Sun, Mar 21 2021, Klemens Nanni wrote: > apm(4/arm64) merely provides an all zero/unknown stub for those values, > e.g. apm(8) output is useless. > > Hardware sensors however provide the information: > > $ sysctl hw.sensors > hw.sensors.rktemp0.temp0=32.22 degC (CPU) >

Re: ftp: make use of getline(3)

2021-02-15 Thread Jeremie Courreges-Anglas
On Sun, Feb 14 2021, Christian Weisgerber wrote: > Christian Weisgerber: > >> > Make use of getline(3) in ftp(1). >> > >> > Replace fparseln(3) with getline(3). This removes the only use >> > of libutil.a(fparseln.o) from the ramdisk. >> > Replace a complicated fgetln(3) idiom with the much

Re: video(4) multiple opens

2021-02-12 Thread Jeremie Courreges-Anglas
On Wed, Feb 10 2021, Martin Pieuchot wrote: [...] > Which fields is the new lock protecting? Why isn't the KERNEL_LOCK() > enough? When I mentioned this potential lack of locking to Marcus, I was mistaken. Some of the functions in video.c are called from syscalls that are marked NOLOCK. But

Re: unwind(8): open DNSSEC trustanchor late

2021-02-06 Thread Jeremie Courreges-Anglas
On Sat, Feb 06 2021, Florian Obser wrote: > On Sat, Feb 06, 2021 at 01:23:35AM +0100, Jeremie Courreges-Anglas wrote: >> On Fri, Jan 29 2021, Florian Obser wrote: >> > Last piece of the puzzle... >> > >> > Re-try to open DNSSEC trust anchor file if /var i

Re: unwind(8): open DNSSEC trustanchor late

2021-02-05 Thread Jeremie Courreges-Anglas
On Fri, Jan 29 2021, Florian Obser wrote: > Last piece of the puzzle... > > Re-try to open DNSSEC trust anchor file if /var is not mounted yet. > With this we are able to start unwind before the network is up and > partitions are mounted. Sorry for being late to the party, I just upgraded to the

Re: getopt.3 bugs section

2021-01-09 Thread Jeremie Courreges-Anglas
On Sat, Jan 09 2021, Christian Weisgerber wrote: > Edgar Pettijohn: > >> In the BUGS section for the getopt(3) manual it mentions not using >> single digits for options. I know spamd uses -4 and -6 there are >> probably others. Should they be changed? Or is the manual mistaken? > > You

Re: video(4) multiple opens

2021-01-06 Thread Jeremie Courreges-Anglas
On Wed, Jan 06 2021, Marcus Glocker wrote: > On Tue, Jan 05, 2021 at 11:54:31PM +0100, Jeremie Courreges-Anglas wrote: [...] >> Here's the diff. IIUC the use of atomic operations isn't strictly >> needed here since open(2) runs with the kernel lock, but the result >> is e

video(4) multiple opens

2021-01-05 Thread Jeremie Courreges-Anglas
I hit a weird failure with firefox and BigBlueButton (https://bigbluebutton.org/) where firefox can't use my webcam. video(1) works, same for other webrtc sites in firefox, eg meet.jit.si. ktrace shows that a single firefox process tries to open /dev/video0 more than once, and that fails with

Re: ftp(1): handle HTTP 308

2021-01-01 Thread Jeremie Courreges-Anglas
On Thu, Dec 31 2020, Lucas wrote: > Weekly bump chrisz@ had a similar diff, already ok'd by kn@ and me. Christopher, would you mind committing it? > Index: fetch.c > === > RCS file: /home/cvs/src/usr.bin/ftp/fetch.c,v > retrieving

Re: Fewer uvmexp

2020-11-18 Thread Jeremie Courreges-Anglas
On Wed, Nov 18 2020, Martin Pieuchot wrote: > While auditing the various uses of the uvmexp fields I came across > those under #ifdet notyet. May I delete them so I don't have to give > them some MP love? Ok? ok jca@, but while here shouldn't the rest of cpu_vm_init() go too? Unless I'm

Re: [PATCH] tcpdump: Fix missing argument from icmp_print call in print-skip.c

2020-11-03 Thread Jeremie Courreges-Anglas
On Tue, Nov 03 2020, Theo Buehler wrote: > On Tue, Nov 03, 2020 at 04:19:34PM +0530, Neeraj Pal wrote: >> Hi all, >> >> It seems that there is a typo, 2nd argument - length is missing from >> the function call icmp_print in print-skip.c > > There is quite a bit more that is wrong with

Re: [PATCH] Mention unsupported stacking in softraid(4)

2020-10-25 Thread Jeremie Courreges-Anglas
On Sun, Oct 25 2020, "Filippo Valsorda" wrote: > Based on the text in faq14.html, but using the manpage language. Makes sense. I'm not sure .Em is useful here, though. ok jca@ if someone wants to pick this up, else I'll just commit it in a few hours. Thanks, > diff --git

Re: Non-const basename: usr.bin/ftp

2020-10-17 Thread Jeremie Courreges-Anglas
On Thu, Oct 15 2020, Christian Weisgerber wrote: > Accommodate POSIX basename(3) that takes a non-const parameter and > may modify the string buffer. > > I've tried to follow the conventions of the existing code. > > ok? > > Index: usr.bin/ftp/fetch.c >

Re: apmd(8) and hw.perfpolicy quirks

2020-09-27 Thread Jeremie Courreges-Anglas
On Thu, Sep 24 2020, Jeremie Courreges-Anglas wrote: > On Wed, Sep 23 2020, "Ted Unangst" wrote: >> On 2020-09-23, Jeremie Courreges-Anglas wrote: >> >>> ok? >> >> Seems fine. >> >> >>> Note: I inlined the apmd(8)->apm(

Re: apmd(8) and hw.perfpolicy quirks

2020-09-24 Thread Jeremie Courreges-Anglas
On Wed, Sep 23 2020, "Ted Unangst" wrote: > On 2020-09-23, Jeremie Courreges-Anglas wrote: > >> ok? > > Seems fine. > > >> Note: I inlined the apmd(8)->apm(8) perfpolicy conversion for now, which >> brings a question. I find it weird that the

Re: apmd(8) and hw.perfpolicy quirks

2020-09-23 Thread Jeremie Courreges-Anglas
On Wed, Sep 23 2020, Jeremie Courreges-Anglas wrote: > Prompted by a report from Miod: setting hw.setperf works only if the > kernel doesn't have a usable cpu_setperf implementation. The current > apmd(8) code warns if setting hw.perfpolicy fails, but then handles > back bogus val

apmd(8) and hw.perfpolicy quirks

2020-09-23 Thread Jeremie Courreges-Anglas
Prompted by a report from Miod: setting hw.setperf works only if the kernel doesn't have a usable cpu_setperf implementation. The current apmd(8) code warns if setting hw.perfpolicy fails, but then handles back bogus values to apm(8) clients. The easy fix is to just query the kernel about the

Re: httpd(8): don't leak iov

2020-09-20 Thread Jeremie Courreges-Anglas
On Sun, Sep 20 2020, Tobias Heider wrote: > iov is allocated with calloc. I think we should free it after the imsg > is sent. > > ok? ok jca@ > Index: config.c > === > RCS file: /cvs/src/usr.sbin/httpd/config.c,v > retrieving

apm(8) and apmd(8): zap "cool" running mode remnants

2020-09-20 Thread Jeremie Courreges-Anglas
apmd "cool" mode was removed in 2014, and -C was made an undocumented compat alias for -A ("auto"). The code still contains kinda misleading references to this "cool" running mode, the diff below zaps those. ok? Index: apm/apm.c

Re: ftp: allow specifying supported protocols

2020-09-06 Thread Jeremie Courreges-Anglas
On Sun, Sep 06 2020, Theo Buehler wrote: > On Sun, Sep 06, 2020 at 12:55:17AM +0200, Jeremie Courreges-Anglas wrote: >> On Sat, Sep 05 2020, Theo Buehler wrote: >> > I found this small diff useful more than once (admittedly for debugging). >> > It allows specifying the

Re: ftp: allow specifying supported protocols

2020-09-05 Thread Jeremie Courreges-Anglas
On Sat, Sep 05 2020, Theo Buehler wrote: > I found this small diff useful more than once (admittedly for debugging). > It allows specifying the protocols that may be used by ftp the same way > as nc -Tprotocols works. For example: > > $ ftp -Sprotocols=tlsv1.2:tlsv1.1 https://example.com/file > >

unwind(8): use SO_REUSEADDR

2020-08-29 Thread Jeremie Courreges-Anglas
On Sat, Aug 29 2020, Stuart Henderson wrote: > On 2020/08/27 15:28, Florian Obser wrote: >> all heavy lifting done by sthen in unbound >> >> tests? > > ok with me. only tested lightly (the machine I normally use does DNS for > other machines too so runs unbound). > > related, any idea what's

Re: [Patch] Change httpd's handling of request "Host:" headers

2020-08-10 Thread Jeremie Courreges-Anglas
On Mon, Aug 10 2020, Ross L Richardson wrote: > Leo, > > On Mon, Aug 10, 2020 at 08:46:19AM +0200, Leo Unglaub wrote: >> Hey, >> i love your patch. The current behavour always bothered me because it caused >> servers to display "wrong" sites as defaults for all requests missing the >> Host

Re: [Patch] Change httpd's handling of request "Host:" headers

2020-08-10 Thread Jeremie Courreges-Anglas
On Sun, Aug 09 2020, Ross L Richardson wrote: > At present, if a request contains no "Host:" header [HTTP pre-1.1] or > if the supplied header does not match any of the servers configured > in httpd.conf, the request is directed to the first server. This > isn't documented, AFAICT. > > For

Re: allow TCP connections to IPv6 anycast addresses

2020-08-08 Thread Jeremie Courreges-Anglas
On Sat, Aug 08 2020, Florian Obser wrote: > On Fri, Aug 07, 2020 at 11:52:46PM +0200, Jeremie Courreges-Anglas wrote: >> If you don't want to remove M_ACAST from sys/mbuf.h, can you please at >> least change the comment? /* obsolete */ or something. > > Good point, I for

Re: allow TCP connections to IPv6 anycast addresses

2020-08-07 Thread Jeremie Courreges-Anglas
On Fri, Aug 07 2020, Florian Obser wrote: > No longer prevent TCP connections to IPv6 anycast addresses. > > RFC 4291 dropped this requirement from RFC 3513: >o An anycast address must not be used as the source address of an > IPv6 packet. > > And from that requirement

Re: ssh(1), getrrsetbyname(3), SSHFP and DNSSEC

2020-07-29 Thread Jeremie Courreges-Anglas
On Wed, Jul 29 2020, Florian Obser wrote: > On Wed, Jul 29, 2020 at 03:51:55PM +0200, Jeremie Courreges-Anglas wrote: >> So I did a few tests and read some unwind(8) code, and it *appears* safe >> to use unwind(8) along with "options trust-ad". > > Yes. > >>

Re: ssh(1), getrrsetbyname(3), SSHFP and DNSSEC

2020-07-29 Thread Jeremie Courreges-Anglas
On Sun, Jul 26 2020, Jeremie Courreges-Anglas wrote: > On Sat, Jul 25 2020, Sebastian Benoit wrote: [...] >> If you enable trust-ad on a system that moves around, e.g. your laptop, you >> will experience failures, which is why unwind tests for this and falls back >>

Re: ssh(1), getrrsetbyname(3), SSHFP and DNSSEC

2020-07-29 Thread Jeremie Courreges-Anglas
On Mon, Jul 27 2020, Jesper Wallin wrote: [...] > I still think the RES_USE_AD option might be a useful though, for when > you want to decide on an application-level whether to trust AD or not? RES_TRUSTAD can also be used for this, but as the proposed documentation points out it would be

Re: ssh(1), getrrsetbyname(3), SSHFP and DNSSEC

2020-07-26 Thread Jeremie Courreges-Anglas
On Sun, Jul 26 2020, Jesper Wallin wrote: > On Sat, Jul 25, 2020 at 02:01:06PM +0200, Jeremie Courreges-Anglas wrote: >> >> For those two reasons I think the feature should be opt-in. > > Yeah, I agree with you. My first approach was to have it check what > kind of DNS r

Re: ssh(1), getrrsetbyname(3), SSHFP and DNSSEC

2020-07-26 Thread Jeremie Courreges-Anglas
On Sat, Jul 25 2020, Sebastian Benoit wrote: > Jeremie Courreges-Anglas(j...@wxcvbn.org) on 2020.07.25 14:01:06 +0200: >> On Fri, Jul 17 2020, Jesper Wallin wrote: >> > Hi all, >> > >> > I recently decided to add SSHFP records for my servers, since I neve

Re: ssh(1), getrrsetbyname(3), SSHFP and DNSSEC

2020-07-25 Thread Jeremie Courreges-Anglas
On Fri, Jul 17 2020, Jesper Wallin wrote: > Hi all, > > I recently decided to add SSHFP records for my servers, since I never > memorize or write down my key fingerprints. I learned that if I > want ssh(1) to trust these records, DNSSEC needs to be enabled for my > zone. To validate these

ksh(1) set -o pipefail

2020-07-06 Thread Jeremie Courreges-Anglas
Requested by ajacoutot@, here's an attempt at implementing set -o pipefail. As pointed by sthen@ this option should be included in the next POSIX standard: https://www.austingroupbugs.net/view.php?id=789 There are several ways to implement it, the diff I showed to Antoine was based on

ftp(1) double free

2020-06-20 Thread Jeremie Courreges-Anglas
Small bug, but still... naddy@ reported a double free when interrupting (^C) ftp(1) at the end or url_get(). If that happens, the SIGINT handler longjmps and the cleanup path is taken a second time. To avoid this, restore the previous SIGINT handler in each possible error path. I chose to

Re: official ports vs DEBUG_PACKAGES

2020-05-30 Thread Jeremie Courreges-Anglas
On Sat, May 30 2020, Marc Espie wrote: >> - have some magic I don't know in ELF handling that would allow to either >> tweak the default location/introduce ${WRKOBJDIR} in that debug info. > > Thinking some more about it, that 3rd option is possibly not that > far-fetched > > we do pass most

Re: net80211: fix capinfo in assoc request

2020-05-18 Thread Jeremie Courreges-Anglas
On Thu, May 14 2020, Stefan Sperling wrote: > The capablities info field in an association request contains an ESS bit > which is set if the sender is an access point (there are other cases but > they don't matter for us; see 802.11-2012 8.4.1.4 if you are interested). > > This bit is set when

acpi(4): battery and A/C status after resume

2020-05-17 Thread Jeremie Courreges-Anglas
On Sat, Jan 25 2020, Jeremie Courreges-Anglas wrote: > So I have this diff for apmd -z/-Z that uses APM_POWER_CHANGE events to > trigger autosuspend. It works fine except for one glitch: if I plug the > AC cable and then resume, apmd will receive another APM_POWER_CHANGE > ev

Re: acpibat(4): remaining battery power with multiple batteries

2020-05-11 Thread Jeremie Courreges-Anglas
On Mon, May 11 2020, "Theo de Raadt" wrote: > You sure about that? In this code, acpi.c is collecting abstracted > information from the 3 battery drivers. (One A/C driver and two battery drivers.) > Maybe one of the drivers > isn't providing enough information? > > Mark Kettenis wrote: > >>

Re: acpibat(4): remaining battery power with multiple batteries

2020-05-11 Thread Jeremie Courreges-Anglas
On Fri, May 08 2020, Jeremie Courreges-Anglas wrote: > Overall remaining battery power is currently the average of the > remaining power (in percents) of each battery. This is misleading if > your laptop uses a large external battery which drains out first, and > a smaller inte

acpiac(4): no need to look at _STA

2020-05-08 Thread Jeremie Courreges-Anglas
acpiac(4) obtains the AC status using _PSR. _STA is queried too but nothing is done with the result. AFAICS ACPI 6.3 doesn't say anything about a relationship between _STA and _PSR. Diff below removes the unused _STA query and renames the surrounding plumbing. Thoughts, oks? Index:

acpibat(4): remaining battery power with multiple batteries

2020-05-08 Thread Jeremie Courreges-Anglas
Overall remaining battery power is currently the average of the remaining power (in percents) of each battery. This is misleading if your laptop uses a large external battery which drains out first, and a smaller internal battery (common scheme on eg thinkpad machines). Overall battery power

Re: ksh: Use typedef for function pointer

2020-05-08 Thread Jeremie Courreges-Anglas
On Thu, May 07 2020, Michael Forney wrote: > I originally submitted this patch as a portability fix to Brian > Callahan's oksh, but he suggested I submit it here instead. Out of curiosity, do you run (o)ksh on machines where this matters? > Conversion of function pointer to void pointer is not

Re: ld.so and ldconfig manpage nits

2020-05-08 Thread Jeremie Courreges-Anglas
On Fri, May 08 2020, Miod Vallat wrote: > This ensures consistent spelling of set-{user,group}-ID, and also > mentions LD_DEBUG is ignored by ld.so for such binaries. Committed, thanks! -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

  1   2   3   4   5   6   7   8   >