pax(1): pax format write support

2023-09-05 Thread Jeremie Courreges-Anglas
A long time ago the posix folks extended the ustar format to allow representing arbitrarily big files, long file names, precise timestamps, etc. We have support to read such archives but no support to write them out. Here's a minimal proposal following discussions with Caspar and other folks.

pax(1) and tar(1): fix misleading -DSMALL

2023-09-04 Thread Jeremie Courreges-Anglas
Two code sets are currently guarded with #ifdef SMALL in pax(1) and tar(1): reading 'pax' format extended headers, and identifying various compressed formats for user-friendliness. As noted by Caspar, the SMALL path isn't currently used on the install media. I've been confused by this twice alr

Re: option GPROF on riscv64

2023-07-23 Thread Jeremie Courreges-Anglas
On Sat, Jul 22 2023, Scott Cheloha wrote: [...] > Is there any difference if you duplicate the contents of > intr_disable/intr_restore in MCOUNT_ENTER/MCOUNT_EXIT directly? > Unlikely, but maybe the compiler is shoving an _mcount() call into > intr_disable/intr_restore, causing infinite recursio

option GPROF on riscv64

2023-07-21 Thread Jeremie Courreges-Anglas
Spotted while testing a diff from cheloha@, option GPROF doesn't build on riscv64 because MCOUNT_ENTER/MCOUNT_EXIT from riscv64/include/profile.h haven't been adapted for riscv64. riscv64 /sys/arch/riscv64/compile/GPROF.MP$ doas -u build make cc -g -Werror -Wall -Wimplicit-function-declaration

Re: [v2] statclock: move profil(2), GPROF code into other clock interrupts

2023-07-21 Thread Jeremie Courreges-Anglas
On Fri, Jul 21 2023, Mike Larkin wrote: > On Fri, Jul 21, 2023 at 05:46:32PM +0200, Jeremie Courreges-Anglas wrote: >> On Thu, Jul 20 2023, Scott Cheloha wrote: >> > On Wed, Jul 19, 2023 at 05:09:04AM +, Mike Larkin wrote: >> >> On Tue, Jul 18, 2023 at 08:21:4

Re: [v2] statclock: move profil(2), GPROF code into other clock interrupts

2023-07-21 Thread Jeremie Courreges-Anglas
On Thu, Jul 20 2023, Scott Cheloha wrote: > On Wed, Jul 19, 2023 at 05:09:04AM +, Mike Larkin wrote: >> On Tue, Jul 18, 2023 at 08:21:41AM -0500, Scott Cheloha wrote: >> > This patch moves the profil(2)- and GPROF-specific parts of >> > statclock() out into into separate clock interrupt routin

Re: riscv64: enable usb(4) interface, add missing usb devices?

2023-01-23 Thread Jeremie Courreges-Anglas
On Mon, Jan 23 2023, Mark Kettenis wrote: >> From: Jeremie Courreges-Anglas >> Date: Mon, 23 Jan 2023 13:43:15 +0100 >> >> I wanted to cross-connect the serial ports of my armv7 and riscv64 >> machines. Problem on riscv64: no uftdi driver. It looks like a l

riscv64: enable usb(4) interface, add missing usb devices?

2023-01-23 Thread Jeremie Courreges-Anglas
I wanted to cross-connect the serial ports of my armv7 and riscv64 machines. Problem on riscv64: no uftdi driver. It looks like a lot of other USB drivers are missing in GENERIC, both generic drivers and hw-specific drivers: umodem, ugen, ulpt, uvideo, umb, uplcom etc. Feels like it would make

Re: crunchgen and llvm 15

2023-01-08 Thread Jeremie Courreges-Anglas
On Fri, Dec 30 2022, Miod Vallat wrote: >> I'm not sure which way to go: either sprinkle some -fno-common between >> crunchgen and distrib/special/Makefile.inc, or drop -dc on lld archs >> only. What would you folks prefer? > > I'd rather have the same behaviour for all platforms, but I need to t

Re: ESRT support for the amd64 bootloader

2022-12-31 Thread Jeremie Courreges-Anglas
On Wed, Dec 28 2022, Mark Kettenis wrote: > Dear Sergii, > > Sorry for the delay, but I have finally found the time to work on the > EFI variable and ESRT support for OpenBSD. As a first step, here is a > diff that adds support for copying the ESRT in the bootloader and > passing it on to the ker

Re: crunchgen and llvm 15

2022-12-31 Thread Jeremie Courreges-Anglas
On Sat, Dec 31 2022, Theo de Raadt wrote: > It seems some changes are being pushed without actually testing > on the non-clang architectures. > > Can this get backed out until the correct procedure is followed? Well nothing has been committed regarding this crunchgen change. I hope you're not exp

Re: crunchgen and llvm 15

2022-12-29 Thread Jeremie Courreges-Anglas
On Fri, Dec 30 2022, Miod Vallat wrote: > You need this extra chunk for your diff to work. With that, the built > instbin binary appears to behave as expected on hppa. Heh, nice, thank you. I'm not sure which way to go: either sprinkle some -fno-common between crunchgen and distrib/special/Makef

Re: clang 15 and zlib

2022-12-29 Thread Jeremie Courreges-Anglas
On Wed, Dec 28 2022, Jeremie Courreges-Anglas wrote: > To build src cleanly with clang-15 you'd need the diff below. The > alternative would be to patch our three zlib copies and wait for > upstream to fix it. A more comfortable alternative is to just neuter > the warning. -Wn

clang 15 and zlib

2022-12-28 Thread Jeremie Courreges-Anglas
To build src cleanly with clang-15 you'd need the diff below. The alternative would be to patch our three zlib copies and wait for upstream to fix it. A more comfortable alternative is to just neuter the warning. -Wno-unknown-warning-option prevents llvm 13 from complaining that it doesn't kno

crunchgen and llvm 15

2022-12-28 Thread Jeremie Courreges-Anglas
At first it looked like a fluke when building a release. What's this "ld -dc" command-line? Well -dc is short for --define-common, an option that has been dropped by upstream llvm(lld). IIUC this ld(1) behavior is somewhat similar to -fno-common for cc(1). base-clang already does -fno-common b

macppc: ansify some code (fix clang 15 errors)

2022-12-26 Thread Jeremie Courreges-Anglas
This should fix warnings in the macppc build (kernel + bootloader) with clang 15 (-Wdeprecated-non-prototype). Not build tested (no macppc machine at hand) but should be safe. ok? Index: arch/macppc/dev/pm_direct.c === RCS file:

libsa: ansify some pxe code

2022-12-26 Thread Jeremie Courreges-Anglas
These functions trip up -Wdeprecated-non-prototype (clang 15). We'll probably use -Wno-deprecated-non-prototype until zlib gets fixed upstream but let's clean up the code first. zlib2ansi doesn't find other errors in sys/arch/*clang archs* except for macppc (diff for that next). ok? Index: s

Re: perl: fix build with clang 15

2022-12-26 Thread Jeremie Courreges-Anglas
On Mon, Dec 26 2022, Andrew Hewus Fresh wrote: > On Tue, Dec 27, 2022 at 02:22:43AM +0100, Jeremie Courreges-Anglas wrote: >> >> MD5.xs:375:21: error: mixing declarations and code is incompatible with >> standards before C99 [-Werror,-Wdeclaration-after-statement] >>

perl: fix build with clang 15

2022-12-26 Thread Jeremie Courreges-Anglas
MD5.xs:375:21: error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement] unsigned char *buf = (unsigned char *)(SvPV(ST(2), len)); The build system asks for -Werror *and* -Wdeclaration-after-statement so let's fix the code.

gdb: fix build with clang 15

2022-12-26 Thread Jeremie Courreges-Anglas
/usr/src/gnu/usr.bin/binutils/gdb/tui/tui-stack.c:359:16: error: incompatible integer to pointer conversion passing 'CORE_ADDR' (aka 'unsigned long') to parameter of type 'CORE_ADDR *' (aka 'unsigned long *') [-Wint-conversion] &low, (CORE_ADDR) NULL

Re: Size reduction experiments for LLVM-built sparc64 kernel

2022-12-26 Thread Jeremie Courreges-Anglas
On Sun, Dec 25 2022, Koakuma wrote: > Some weekend updates: > > 1. The clang-built kernels seem to be working well enough that I could >complete building a (GCC-built) userland. That's good to know, I think I haven't tested that after we moved to llvm 13. > 2. I tried a larger set of LLVM pa

Re: LLVM 15: mismatched bound errors

2022-12-26 Thread Jeremie Courreges-Anglas
On Sat, Dec 24 2022, Patrick Wildt wrote: > On Thu, Dec 22, 2022 at 01:14:57AM +0100, Patrick Wildt wrote: >> On Tue, Dec 20, 2022 at 05:48:41PM -0700, Todd C. Miller wrote: >> > On Tue, 20 Dec 2022 23:44:08 +0100, Patrick Wildt wrote: >> > >> > > clang complains when the function is declared wit

Re: LLVM 15: mismatched bound errors

2022-12-26 Thread Jeremie Courreges-Anglas
On Thu, Dec 22 2022, Todd C. Miller wrote: > On Thu, 22 Dec 2022 02:08:42 +0100, Jeremie Courreges-Anglas wrote: > >> https://github.com/jcourreges/openbsd-src/commit/4862df383ccb8a8e03d5c11b4f >> b739b6a3a5a7c7 >> >> Sadly making the size available in the

Re: LLVM 15: mismatched bound errors

2022-12-26 Thread Jeremie Courreges-Anglas
On Sat, Dec 24 2022, Patrick Wildt wrote: > On Thu, Dec 22, 2022 at 01:14:57AM +0100, Patrick Wildt wrote: >> On Tue, Dec 20, 2022 at 05:48:41PM -0700, Todd C. Miller wrote: >> > On Tue, 20 Dec 2022 23:44:08 +0100, Patrick Wildt wrote: >> > >> > > clang complains when the function is declared wit

Re: LLVM 15: mismatched bound errors

2022-12-21 Thread Jeremie Courreges-Anglas
On Wed, Dec 21 2022, "Theo de Raadt" wrote: >> But yeah, maybe we'll just flip the default option in LLVM and then >> we'll just not use that warning... at all? > > is this specific warning finding dangerous bugs? is it finding a substantial > number of dangerous bugs? No, but if we remove -Wdep

Re: LLVM 15: mismatched bound errors

2022-12-21 Thread Jeremie Courreges-Anglas
On Thu, Dec 22 2022, Patrick Wildt wrote: > Am Thu, Dec 22, 2022 at 01:57:37AM +0100 schrieb Jeremie Courreges-Anglas: >> On Thu, Dec 22 2022, Theo Buehler wrote: >> > On Thu, Dec 22, 2022 at 11:39:41AM +1100, Jonathan Gray wrote: >> >> On Thu, Dec 22, 2022 at

Re: LLVM 15: mismatched bound errors

2022-12-21 Thread Jeremie Courreges-Anglas
On Tue, Dec 20 2022, Todd C. Miller wrote: > On Tue, 20 Dec 2022 23:44:08 +0100, Patrick Wildt wrote: > >> clang complains when the function is declared with a fixed array size in >> a parameter while the prototype is unbounded, like this: >> >> /usr/src/sys/net/pf.c:4353:54: error: argument 'sns'

Re: LLVM 15: mismatched bound errors

2022-12-21 Thread Jeremie Courreges-Anglas
On Thu, Dec 22 2022, Theo Buehler wrote: > On Thu, Dec 22, 2022 at 11:39:41AM +1100, Jonathan Gray wrote: >> On Thu, Dec 22, 2022 at 01:20:32AM +0100, Theo Buehler wrote: >> > > Any concerns regarding the changes in libz? It introduces diff to >> > > upstream, but the recent commits seemed to ind

Re: amptimer(4): switch to clockintr

2022-12-16 Thread Jeremie Courreges-Anglas
On Sat, Dec 10 2022, Jeremie Courreges-Anglas wrote: > On Fri, Dec 09 2022, Scott Cheloha wrote: >> Next up for the armv7 clockintr switch: amptimer(4). >> >> - Remove amptimer-specific clock interrupt scheduling bits and >> randomized statclock bits. >&

clang on riscv64: fix LTO link with PIE/PIC objects

2022-12-15 Thread Jeremie Courreges-Anglas
On riscv64 LTO fails for some ports with this error: ld: error: linking module flags 'SmallDataLimit': IDs have conflicting values in '.o' and 'ld-temp.o' This is because some objects files are built PIC and others with PIE or no PIC at all, and the final link which creates ld-temp.o fails t

Re: amptimer(4): switch to clockintr

2022-12-10 Thread Jeremie Courreges-Anglas
On Fri, Dec 09 2022, Scott Cheloha wrote: > Next up for the armv7 clockintr switch: amptimer(4). > > - Remove amptimer-specific clock interrupt scheduling bits and > randomized statclock bits. > - Remove debug evcounts. The interrupt's evcount counts all clock > interrupts from now on. > - Re

Re: agtimer(4/armv7): switch to clockintr

2022-12-08 Thread Jeremie Courreges-Anglas
On Wed, Dec 07 2022, Scott Cheloha wrote: > ARMv7 has four interrupt clocks available. I think it'll be easier to > review/test if we do the clockintr switch driver by driver instead of > all at once in a massive single email. When all four driver patches > are confirmed to work, I'll commit the

Re: Fix evcount_percpu() after evcount_init_percpu() (plus bits for mips64)

2022-12-04 Thread Jeremie Courreges-Anglas
On Sun, Dec 04 2022, Visa Hankala wrote: > Do not re-insert the event counter to evcount_list in evcount_percpu(). > Otherwise the list becomes corrupt when evcount_percpu() is called > after evcount_init_percpu(). > > OK? Woops. ok jca@ > As an extra, use percpu counters with mips64 clock and

riscv64: print SBI vendor/version

2022-12-03 Thread Jeremie Courreges-Anglas
With the diff below we get more details about the SBI version running on the machine. My Unmatched machine has OpenBSD version 0.9 but upstream has released 1.1 since, it implements v0.2 of the SBI spec but 0.3 and 1.0 have been released since. I suspect this information could be useful for new

Re: lld patch needed to build ports/lang/gcc/{8,11} on riscv64

2022-12-03 Thread Jeremie Courreges-Anglas
On Fri, Sep 09 2022, Jeremie Courreges-Anglas wrote: > When building ports-gcc on riscv64 I get this kind of error: > > --8<-- > ld: error: relocation refers to a symbol in a discarded section: .LEHB30 >>>> defined in .libs/libcp1.o >>>> referenced by conn

Re: Some ENTRY_NB for libc/arch/i386

2022-12-03 Thread Jeremie Courreges-Anglas
On Sat, Dec 03 2022, Theo Buehler wrote: > A while ago I added ENTRY_NB to i386 to fix some warnings in libm. Turns > out that libc also has a few of them on i386, diff below fixes the > > warning: bcopy changed binding to STB_WEAK > > for bcmp, bzero, bcopy, brk, sbrk. > > http://bluhm.genua.de/r

riscv64: use evcount_percpu(9) for clock interrupts

2022-12-02 Thread Jeremie Courreges-Anglas
ok? Index: clock.c === RCS file: /cvs/src/sys/arch/riscv64/riscv64/clock.c,v retrieving revision 1.6 diff -u -p -r1.6 clock.c --- clock.c 19 Nov 2022 16:02:37 - 1.6 +++ clock.c 30 Nov 2022 19:28:49 - @@ -100,6

riscv64: drop unused WEAK_REFERENCE macro

2022-12-02 Thread Jeremie Courreges-Anglas
WEAK_REFERENCE seems to come from FreeBSD, it's not used in our tree. (WEAK_ALIAS is defined a few lines above). ok? Index: sys/arch/riscv64/include/asm.h === RCS file: /cvs/src/sys/arch/riscv64/include/asm.h,v retrieving revision

ENTRY_NB() on riscv64

2022-12-02 Thread Jeremie Courreges-Anglas
clang emits this warning when compiling brk.S and sbrk.S on riscv64: /tmp/sbrk-06c40b.s:46:2: warning: sbrk changed binding to STB_WEAK .weak sbrk Let's avoid this using the "ENTRY_NB" approach implemented by guenther@ on other archs. Diff tailored to reduce the differences with arm64/include

Re: Get rid of UVM_VNODE_CANPERSIST

2022-11-17 Thread Jeremie Courreges-Anglas
On Tue, Nov 15 2022, Martin Pieuchot wrote: > UVM vnode objects include a reference count to keep track of the number > of processes that have the corresponding pages mapped in their VM space. > > When the last process referencing a given library or executable dies, > the reaper will munmap this o

Re: Patch for getopt_long.c

2022-11-15 Thread Jeremie Courreges-Anglas
On Tue, Nov 15 2022, Mathias Bavay wrote: > Hi, > > Please find here attached a patch with minor touch up on > src/lib/libc/stdlib/getopt_long.c : > >    * Added an SPDX license identifier; As Theo answered, we don't use those identifiers (except sometimes in external source code added to the b

Re: non regression tests for some packaging scripts

2022-11-14 Thread Jeremie Courreges-Anglas
On Mon, Nov 14 2022, Marc Espie wrote: > I'd like to add some non-regression tests for some scripts, most notably > register-plist, which is... let's say not perfect at the moment. > > I believe > ${PORTSDIR}/regress is probably the simplest least disturbing way to do that. We have /usr/ports/tes

Re: riscv64: switch to clockintr(9)

2022-11-08 Thread Jeremie Courreges-Anglas
On Tue, Nov 08 2022, Mark Kettenis wrote: >> Date: Tue, 8 Nov 2022 13:06:51 + >> From: Scott Cheloha >> >> On Mon, Nov 07, 2022 at 09:23:26PM +0100, Jeremie Courreges-Anglas wrote: >> > On Sun, Nov 06 2022, Scott Cheloha wrote: >> > &g

Re: riscv64: switch to clockintr(9)

2022-11-07 Thread Jeremie Courreges-Anglas
On Sun, Nov 06 2022, Scott Cheloha wrote: > This patch switches riscv64 to clockintr(9). > > jca@ has been testing it (on a SiFive board?). It has survived two > parallel release builds and upgrades from the resulting bsd.rd. I still get the same results on my HiFive Unmatched (produced by SiFiv

riscv64 pmap: sync memory writes before remote sfence.vma

2022-10-31 Thread Jeremie Courreges-Anglas
Here's the diff I've been using for the last bulk build on riscv64. It resulted in a single kernel crash: cpu1: pool_do_get: pted free list modified: page 0xffc22cc0a000; item addr 0xffc22cc0a6d0; offset 0x0=0xa06137b98e6f6767 != 0xa06137b98ed06767 and 5 userland clang crashes. Ye

Re: [patch] Delete outdated warning about HiFive Unmatched onboard ethernet device from riscv64 installation notes

2022-10-31 Thread Jeremie Courreges-Anglas
On Mon, Oct 31 2022, Miguel Landaeta wrote: > Hi, > > I just installed 7.2 successfully on a HiFive Unmatched box and the > onboard cad(4) device is working as expected. I think installation > notes should be updated. Correct, I have only ever used cad(4) on my Unmatched, with no problem seen sin

Re: HiFive Unmatched clean poweroff using the power button

2022-10-01 Thread Jeremie Courreges-Anglas
On Thu, Aug 18 2022, Jeremie Courreges-Anglas wrote: > Some time ago I wanted to get a clean poweroff from the power button on > my Unmatched, so that I don't get fsck at reboot the morning after > someone sleeps in the room where the machine lives. kettenis kindly > provided

lld patch needed to build ports/lang/gcc/{8,11} on riscv64

2022-09-08 Thread Jeremie Courreges-Anglas
When building ports-gcc on riscv64 I get this kind of error: --8<-- ld: error: relocation refers to a symbol in a discarded section: .LEHB30 >>> defined in .libs/libcp1.o >>> referenced by connection.hh:72 >>> (/usr/ports/pobj/gcc-8.4.0/gcc-8.4.0/libcc1/connection.hh:72) >>> .libs

Re: add sendmmsg and recvmmsg systemcalls

2022-08-31 Thread Jeremie Courreges-Anglas
On Tue, Aug 30 2022, Moritz Buhl wrote: > Hi tech@, > > the following diff only contains recvmmsg which should be the more useful > syscall of the two. > > I implemented some minor feedback regarding the man page and attaching > an error from recvit to the socket in case some messages were > recei

HiFive Unmatched clean poweroff using the power button

2022-08-17 Thread Jeremie Courreges-Anglas
Some time ago I wanted to get a clean poweroff from the power button on my Unmatched, so that I don't get fsck at reboot the morning after someone sleeps in the room where the machine lives. kettenis kindly provided sfgpio(4) to get interrupts working on dapmic(4) instead of my initial hack that

Re: libsoup2/3 conflicts and gstreamer1 [Re: audio/quodlibet & devel/libsoup]

2022-08-15 Thread Jeremie Courreges-Anglas
On Thu, Aug 11 2022, Stuart Henderson wrote: > Moving from ports@. > > Quick intro: > > A library (gstreamer1) uses functions from another library (libsoup) > which exists in two incompatible versions (libsoup-2.4.so.XX and > libsoup-3.0.so.XX). > > Other software calling gstreamer might use one o

Re: interface media without netlock

2022-08-14 Thread Jeremie Courreges-Anglas
On Sun, Aug 14 2022, Vitaliy Makkoveev wrote: > I propose to avoid netlock relocking for SIOCGIFSFFPAGE too. sigh, that seems to be needed indeed. > Also, since the relock should be avoided for many commands, I prefer > to have something like below: > > switch(cmd){ > case SIOCGIFMED

Re: interface media without netlock

2022-08-14 Thread Jeremie Courreges-Anglas
On Sun, Aug 14 2022, Jeremie Courreges-Anglas wrote: > On Thu, Jul 28 2022, Alexander Bluhm wrote: >> Hi, >> >> The netlock for SIOCSIFMEDIA and SIOCGIFMEDIA ioctl is not necessary. >> Legacy drivers run with kernel lock, interface media is MP safe or >> has kern

Re: interface media without netlock

2022-08-14 Thread Jeremie Courreges-Anglas
On Thu, Jul 28 2022, Alexander Bluhm wrote: > Hi, > > The netlock for SIOCSIFMEDIA and SIOCGIFMEDIA ioctl is not necessary. > Legacy drivers run with kernel lock, interface media is MP safe or > has kernel lock. > > ixl(4) talks about net lock but in fact has kernel lock. > > Problem is that smtpd

Re: echo(1): check for stdio errors

2022-08-10 Thread Jeremie Courreges-Anglas
On Wed, Aug 10 2022, Scott Cheloha wrote: > On Wed, Aug 10, 2022 at 02:23:08PM -0600, Theo de Raadt wrote: >> Scott Cheloha wrote: >> >> > On Wed, Aug 10, 2022 at 12:26:17PM -0600, Theo de Raadt wrote: >> > > Scott Cheloha wrote: >> > > >> > > > We're sorta-kinda circling around adding the mis

Re: echo(1): check for stdio errors

2022-08-10 Thread Jeremie Courreges-Anglas
On Wed, Aug 10 2022, "Theo de Raadt" wrote: > Scott Cheloha wrote: > >> We're sorta-kinda circling around adding the missing (?) stdio error >> checking to other utilities in bin/ and usr.bin/, no? I want to be >> sure I understand how to do the next patch, because if we do that it >> will proba

move swblk_t from sys/types.h to sys/blist.h and use it in blist (was: change its type and us Re: patch: change swblk_t type and use it in blist)

2022-08-06 Thread Jeremie Courreges-Anglas
On Sat, Aug 06 2022, Sebastien Marie wrote: > On Sat, Aug 06, 2022 at 02:19:31AM +0200, Jeremie Courreges-Anglas wrote: >> On Fri, Aug 05 2022, Sebastien Marie wrote: >> > Hi, >> > >> > When initially ported blist from DragonFlyBSD, we used custom type bsblk_

Re: patch: change swblk_t type and use it in blist

2022-08-05 Thread Jeremie Courreges-Anglas
On Fri, Aug 05 2022, Sebastien Marie wrote: > Hi, > > When initially ported blist from DragonFlyBSD, we used custom type bsblk_t > and > bsbmp_t instead of the one used by DragonFlyBSD (swblk_t and u_swblk_t). > > The reason was swblk_t is already defined on OpenBSD, and was incompatible > with

Re: riscv64: trigger deferred timer interrupts from splx(9)

2022-08-04 Thread Jeremie Courreges-Anglas
On Thu, Aug 04 2022, Scott Cheloha wrote: > On Thu, Aug 04, 2022 at 09:39:13AM +0200, Jeremie Courreges-Anglas wrote: >> On Mon, Aug 01 2022, Scott Cheloha wrote: >> > On Mon, Aug 01, 2022 at 07:15:33PM +0200, Jeremie Courreges-Anglas wrote: >> >> On Sun, Jul

Re: riscv64: trigger deferred timer interrupts from splx(9)

2022-08-04 Thread Jeremie Courreges-Anglas
On Mon, Aug 01 2022, Scott Cheloha wrote: > On Mon, Aug 01, 2022 at 07:15:33PM +0200, Jeremie Courreges-Anglas wrote: >> On Sun, Jul 31 2022, Scott Cheloha wrote: >> > Hi, >> > >> > I am unsure how to properly mask RISC-V timer interrupts in hardware >&

Re: riscv64: trigger deferred timer interrupts from splx(9)

2022-08-01 Thread Jeremie Courreges-Anglas
On Sun, Jul 31 2022, Scott Cheloha wrote: > Hi, > > I am unsure how to properly mask RISC-V timer interrupts in hardware > at or above IPL_CLOCK. I think that would be cleaner than doing > another timer interrupt deferral thing. > > But, just to get the ball rolling, here a first attempt at the t

Re: amuart(4) DDB

2022-07-15 Thread Jeremie Courreges-Anglas
On Fri, Jul 15 2022, Mark Kettenis wrote: > Same problem as sfuart(4); no support for detecting a BREAK. So > leverage db_rint(9) to provide a way to enter DDB. > > ok? I have no hardware to build or test this, but I guess you do and the change looks fine. ok jca@ > Index: dev/fdt/amluart.c >

Re: unp_solock_peer() and READ_ONCE()

2022-07-14 Thread Jeremie Courreges-Anglas
On Thu, Jul 14 2022, Vitaliy Makkoveev wrote: [...] > Also may be the problem lays in other layer, but triggered here... What is the syzkaller report that lead to this discussion? -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Don't build lldb on archs where it's not supported

2022-07-09 Thread Jeremie Courreges-Anglas
We currently build most of the lldb support code on all archs, even though we only build and install the lldb executable (and lldb-server) on amd64 and arm64. This wastes a significant amount of CPU cycles during all base builds for no good reason that I can see. The diff below puts the lldb-or

Build and install llvm-readelf (and llvm-readobj)

2022-07-09 Thread Jeremie Courreges-Anglas
On riscv64 I miss having a usable readelf. We could just build llvm-readelf instead. The actual tool is called llvm-readobj, with GNU compat when called under the llvm-readelf or readelf names. People will probably find this useful on arm64 and powerpc64 too. This shouldn't have a negative im

Re: amd64 serial console changes

2022-06-30 Thread Jeremie Courreges-Anglas
On Thu, Jun 30 2022, Hrvoje Popovski wrote: > On 30.6.2022. 16:48, Hrvoje Popovski wrote: >> On 30.6.2022. 15:14, Anton Lindqvist wrote: >>> On Thu, Jun 30, 2022 at 01:07:46PM +0200, Mark Kettenis wrote: Ah right. Please commit! >>> Here's the complete diff, ok? >> >> >> Hi, >> >> with th

Re: Unlocking pledge(2)

2022-06-28 Thread Jeremie Courreges-Anglas
On Tue, Jun 28 2022, Martin Pieuchot wrote: > On 28/06/22(Tue) 18:17, Jeremie Courreges-Anglas wrote: >> >> Initially I just wandered in syscall_mi.h and found the locking scheme >> super weird, even if technically correct. pledge_syscall() better be >> safe to call w

Unlocking pledge(2)

2022-06-28 Thread Jeremie Courreges-Anglas
Initially I just wandered in syscall_mi.h and found the locking scheme super weird, even if technically correct. pledge_syscall() better be safe to call without the kernel lock so I don't understand why we're sometimes calling it with the kernel lock and sometimes not. ps_pledge is 64 bits so i

Re: proctree lock diff

2022-06-27 Thread Jeremie Courreges-Anglas
On Fri, Nov 29 2019, Martin Pieuchot wrote: > For archive, here's the diff on top of -current. Here's a refreshed diff with the bare minimum changes needed to prevent a WITNESS kernel from crashing when running /usr/src/regress/sys. Index: kern/exec_elf.c ===

Re: Don't take kernel lock on pipex(4) pppoe input

2022-06-26 Thread Jeremie Courreges-Anglas
On Sun, Jun 26 2022, Alexander Bluhm wrote: > On Sun, Jun 26, 2022 at 11:26:13PM +0200, Jeremie Courreges-Anglas wrote: >> On Mon, Jun 27 2022, Vitaliy Makkoveev wrote: >> > On Sun, Jun 26, 2022 at 10:39:10PM +0200, Alexander Bluhm wrote: >> >> On Sun, Jun 26, 202

Re: Don't take kernel lock on pipex(4) pppoe input

2022-06-26 Thread Jeremie Courreges-Anglas
On Mon, Jun 27 2022, Vitaliy Makkoveev wrote: > On Sun, Jun 26, 2022 at 10:39:10PM +0200, Alexander Bluhm wrote: >> On Sun, Jun 26, 2022 at 07:45:57PM +0300, Vitaliy Makkoveev wrote: >> > This extra serialization is not required. In packet processing path we >> > have shared netlock held, but we d

Re: M-lock __mp_lock implementation

2022-06-26 Thread Jeremie Courreges-Anglas
On Sun, Jun 26 2022, Jeremie Courreges-Anglas wrote: > I noticed that our MI __mp_lock (kernel lock, sched lock) > implementation is based on a ticket lock without any backoff. > The downside of this algorithm is that it results in bus trafic increase > because all the actors are w

M-lock __mp_lock implementation

2022-06-26 Thread Jeremie Courreges-Anglas
I noticed that our MI __mp_lock (kernel lock, sched lock) implementation is based on a ticket lock without any backoff. The downside of this algorithm is that it results in bus trafic increase because all the actors are writing (lock releaser) and reading (lock waiters) the same memory region fro

Re: Fix lock order reversal in nfs_inactive()

2022-06-25 Thread Jeremie Courreges-Anglas
On Sun, Jun 19 2022, Visa Hankala wrote: > On Sun, Jun 19, 2022 at 11:05:38AM +0200, Jeremie Courreges-Anglas wrote: >> On Fri, Jun 17 2022, Jeremie Courreges-Anglas wrote: >> > On Thu, Jun 16 2022, Visa Hankala wrote: >> >> nfs_inactive() has a lock order rever

Re: Fix lock order reversal in nfs_inactive()

2022-06-19 Thread Jeremie Courreges-Anglas
On Sun, Jun 19 2022, Visa Hankala wrote: > On Sun, Jun 19, 2022 at 11:05:38AM +0200, Jeremie Courreges-Anglas wrote: >> On Fri, Jun 17 2022, Jeremie Courreges-Anglas wrote: >> > On Thu, Jun 16 2022, Visa Hankala wrote: >> >> nfs_inactive() has a lock order rever

Re: Fix lock order reversal in nfs_inactive()

2022-06-19 Thread Jeremie Courreges-Anglas
On Fri, Jun 17 2022, Jeremie Courreges-Anglas wrote: > On Thu, Jun 16 2022, Visa Hankala wrote: >> nfs_inactive() has a lock order reversal. When it removes the silly >> file, it locks the directory vnode while it already holds the lock >> of the argument file vnode. Thi

Re: Fix lock order reversal in nfs_inactive()

2022-06-16 Thread Jeremie Courreges-Anglas
On Thu, Jun 16 2022, Visa Hankala wrote: > nfs_inactive() has a lock order reversal. When it removes the silly > file, it locks the directory vnode while it already holds the lock > of the argument file vnode. This clashes for example with name lookups > where directory vnodes are locked before fi

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 patch

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 fi

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 missi

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 cpu_exception_handle

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 to

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
tform, 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] >>>>

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@ and I

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. As

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 >> built/com

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 th

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 l

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: >> >> [...] >> >

  1   2   3   4   5   6   7   8   9   >