Replace cos and avoid FPU trigonometry (was: tanf returns NaN for large inputs)

2022-01-10 Thread Greg Steuck
Greg Steuck writes: > This failure can be reduced to a trivial program which does change > its behavior for the worse if s_cos.S is taken out: > > #include > #include > > int main(int a, char**b) { > double y = -0.34061437849088045332; > printf("cos(%lf)=%le delta=%e\n", y, cos(y),

Re: new: lang/polyml

2022-01-10 Thread Philip Guenther
Yeah, it makes sense to move our base C environment to match the values seen in the output of 'readelf' and in the broader programming environment. Philip On Mon, Jan 10, 2022 at 3:34 PM Mark Kettenis wrote: > > Date: Sun, 09 Jan 2022 23:54:23 +0100 > > From: Leo Larnack > > > > Daniel

fw_update(8) minor fixes

2022-01-10 Thread Andrew Hewus Fresh
I pulled some fixes out of the verbose patch so hopefully I can get them in while folks are trying out the more complex patch. Plus one change to usage from jmc@. His other option was to move the [-F | -d] into the man page, but we can just complain more specifically if they try to use

Re: new: lang/polyml

2022-01-10 Thread Mark Kettenis
> Date: Sun, 09 Jan 2022 23:54:23 +0100 > From: Leo Larnack > > Daniel Dickman wrote: > > > elfexport.cpp:352:56: error: use of undeclared identifier 'R_386_32' > > reloc.r_info = ELFXX_R_INFO(symbolNum, isFuncPtr ? > > HOST_DIRECT_FPTR_RELOC : HOST_DIRECT_DATA_RELOC); > >

Re: Unlock getpeername(2)

2022-01-10 Thread Alexander Bluhm
On Mon, Jan 03, 2022 at 07:49:33PM +0300, Vitaliy Makkoveev wrote: > Subj. The getpeername(2) sysckall is pretty simple. For inet and unix > sockets it follows the code which was already unlocked with accept(2) > unlocking. Just copy the 'sockaddr' structure containing the peer > address. For key

Re: Avoid dead store to `f' in libsa readdir()

2022-01-10 Thread Todd C . Miller
On Mon, 10 Jan 2022 16:02:31 +, Visa Hankala wrote: > This removes a dead store to variable `f' from libsa's readdir(), > which also avoids suspicious use of `fd' without validation. OK millert@ - todd

Avoid dead store to `f' in libsa readdir()

2022-01-10 Thread Visa Hankala
This removes a dead store to variable `f' from libsa's readdir(), which also avoids suspicious use of `fd' without validation. OK? Index: lib/libsa/readdir.c === RCS file: src/sys/lib/libsa/readdir.c,v retrieving revision 1.9 diff

Re: sed(1): enable regression tests and correct pattern space assumptions

2022-01-10 Thread Todd C . Miller
OK millert@ - todd

Re: sed(1): enable regression tests and correct pattern space assumptions

2022-01-10 Thread Martijn van Duren
On Mon, 2022-01-10 at 08:21 -0700, Todd C. Miller wrote: > On Mon, 10 Jan 2022 15:23:42 +0100, Martijn van Duren wrote: > > > The lputs case is fairly straight forward and I'd like to get an OK > > for that part. > > I agree that fixing lputs() to honor psl is the best approach. > Wouldn't the

Re: sdmmc: fix malloc error handling in sdmmc_mem_send_scr()

2022-01-10 Thread Visa Hankala
On Mon, Jan 10, 2022 at 04:35:41PM +0100, Tobias Heider wrote: > On Mon, Jan 10, 2022 at 04:20:36PM +0100, Stefan Sperling wrote: > > On Mon, Jan 10, 2022 at 03:50:45PM +0100, Tobias Heider wrote: > > > Makes sense. I also fixed the one in sdmmc_mem_send_cxd_data(). > > > > Doesn't build here,

Re: sdmmc: fix malloc error handling in sdmmc_mem_send_scr()

2022-01-10 Thread Stefan Sperling
On Mon, Jan 10, 2022 at 04:35:41PM +0100, Tobias Heider wrote: > On Mon, Jan 10, 2022 at 04:20:36PM +0100, Stefan Sperling wrote: > > On Mon, Jan 10, 2022 at 03:50:45PM +0100, Tobias Heider wrote: > > > Makes sense. I also fixed the one in sdmmc_mem_send_cxd_data(). > > > > Doesn't build here,

Re: sdmmc: fix malloc error handling in sdmmc_mem_send_scr()

2022-01-10 Thread Tobias Heider
On Mon, Jan 10, 2022 at 04:20:36PM +0100, Stefan Sperling wrote: > On Mon, Jan 10, 2022 at 03:50:45PM +0100, Tobias Heider wrote: > > Makes sense. I also fixed the one in sdmmc_mem_send_cxd_data(). > > Doesn't build here, there a few errors like this: > >

Re: sed(1): enable regression tests and correct pattern space assumptions

2022-01-10 Thread Todd C . Miller
On Mon, 10 Jan 2022 15:23:42 +0100, Martijn van Duren wrote: > The lputs case is fairly straight forward and I'd like to get an OK > for that part. I agree that fixing lputs() to honor psl is the best approach. Wouldn't the diff be simpler if you left the handling of 's' as-is but make the loop

possible memory leak in ipmi get_sdr

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

Re: sdmmc: fix malloc error handling in sdmmc_mem_send_scr()

2022-01-10 Thread Stefan Sperling
On Mon, Jan 10, 2022 at 03:50:45PM +0100, Tobias Heider wrote: > Makes sense. I also fixed the one in sdmmc_mem_send_cxd_data(). Doesn't build here, there a few errors like this: /usr/src/sys/dev/sdmmc/sdmmc_mem.c:483:1: error: unused label 'out' [-Werror,-Wu nused-label] I like Visa's idea of

Re: sdmmc: fix malloc error handling in sdmmc_mem_send_scr()

2022-01-10 Thread Tobias Heider
On Mon, Jan 10, 2022 at 02:39:58PM +, Visa Hankala wrote: > On Mon, Jan 10, 2022 at 03:21:49PM +0100, Tobias Heider wrote: > > On Mon, Jan 10, 2022 at 01:41:53PM +, Visa Hankala wrote: > > > On Mon, Jan 10, 2022 at 01:12:10PM +0100, Tobias Heider wrote: > > > > sdmmc_mem_send_scr() tries

Re: sdmmc: fix malloc error handling in sdmmc_mem_send_scr()

2022-01-10 Thread Visa Hankala
On Mon, Jan 10, 2022 at 03:21:49PM +0100, Tobias Heider wrote: > On Mon, Jan 10, 2022 at 01:41:53PM +, Visa Hankala wrote: > > On Mon, Jan 10, 2022 at 01:12:10PM +0100, Tobias Heider wrote: > > > sdmmc_mem_send_scr() tries to malloc() with M_NOWAIT and returns 0 on > > > error, which leads to

rpki-client pass repo info to parser process

2022-01-10 Thread Claudio Jeker
This diff changes the way the parser figures out which file to work on. Until now the parent process sent a full path to the parser but that does not work well with the idea of splitting the repo up into validated, rsync and rrdp parts. So this diff changes the way the parser opens a file. There

Re: remove ieee80211_find_node_for_beacon()

2022-01-10 Thread Tobias Heider
On Mon, Jan 10, 2022 at 11:00:52AM +0100, Stefan Sperling wrote: > Ping. I have had zero feedback on this so far. Anyone? Makes sense, I remember that part of the code making problems before. ok tobhe. > > On Tue, Jan 04, 2022 at 02:35:52PM +0100, Stefan Sperling wrote: > > The function

Re: sed(1): enable regression tests and correct pattern space assumptions

2022-01-10 Thread Martijn van Duren
On Mon, 2022-01-10 at 00:25 -0600, user wrote: > The commandD1 regression test can be enabled without modifying sed's source > code, it is no longer failing. The commandl1, commandl2, and commandc1 tests > fail because the 'c' and 'D' commands assume that setting the correct length > of the

Re: sdmmc: fix malloc error handling in sdmmc_mem_send_scr()

2022-01-10 Thread Tobias Heider
On Mon, Jan 10, 2022 at 01:41:53PM +, Visa Hankala wrote: > On Mon, Jan 10, 2022 at 01:12:10PM +0100, Tobias Heider wrote: > > sdmmc_mem_send_scr() tries to malloc() with M_NOWAIT and returns 0 on > > error, which leads to sdmmc_mem_sd_init() passing uninitialized stack > > memory to

Re: sdmmc: fix malloc error handling in sdmmc_mem_send_scr()

2022-01-10 Thread Visa Hankala
On Mon, Jan 10, 2022 at 01:12:10PM +0100, Tobias Heider wrote: > sdmmc_mem_send_scr() tries to malloc() with M_NOWAIT and returns 0 on > error, which leads to sdmmc_mem_sd_init() passing uninitialized stack > memory to sdmmc_mem_decode_scr(). > The diff below makes sdmmc_mem_send_scr() return

fix some spelling mistakes in sys/*fs

2022-01-10 Thread Jonathan Gray
diff --git sys/isofs/cd9660/cd9660_lookup.c sys/isofs/cd9660/cd9660_lookup.c index 3b56a930349..19f2773600e 100644 --- sys/isofs/cd9660/cd9660_lookup.c +++ sys/isofs/cd9660/cd9660_lookup.c @@ -133,7 +133,7 @@ cd9660_lookup(void *v) lockparent = flags & LOCKPARENT; /* -

Re: sdmmc: fix malloc error handling in sdmmc_mem_send_scr()

2022-01-10 Thread Stefan Sperling
On Mon, Jan 10, 2022 at 01:12:10PM +0100, Tobias Heider wrote: > sdmmc_mem_send_scr() tries to malloc() with M_NOWAIT and returns 0 on > error, which leads to sdmmc_mem_sd_init() passing uninitialized stack > memory to sdmmc_mem_decode_scr(). > The diff below makes sdmmc_mem_send_scr() return

sdmmc: fix malloc error handling in sdmmc_mem_send_scr()

2022-01-10 Thread Tobias Heider
sdmmc_mem_send_scr() tries to malloc() with M_NOWAIT and returns 0 on error, which leads to sdmmc_mem_sd_init() passing uninitialized stack memory to sdmmc_mem_decode_scr(). The diff below makes sdmmc_mem_send_scr() return ENOMEM if malloc fails. ok? diff --git a/sys/dev/sdmmc/sdmmc_mem.c

Re: unlock mmap(2) for anonymous mappings

2022-01-10 Thread Klemens Nanni
On Fri, Dec 31, 2021 at 09:54:23AM -0700, Theo de Raadt wrote: > >Now that mpi has unlocked uvm's fault handler, we can unlock the mmap > >syscall to handle MAP_ANON without the big lock. > ... > >So here's a first small step. I've been running with this for months > >on a few amd64, arm64 and

Re: unlock mmap(2) for anonymous mappings

2022-01-10 Thread Klemens Nanni
On Fri, Dec 31, 2021 at 07:54:53PM +0300, Vitaliy Makkoveev wrote: > The uvm_wxabort path within uvm_wxcheck() looks not MP-safe. Right, I did not pay enough attention to W^X handling. I'm not entirely sure about the sigexit() path. There's `ps_wxcounter' as u_int64_t which needs a lock or

Re: remove ieee80211_find_node_for_beacon()

2022-01-10 Thread Stefan Sperling
Ping. I have had zero feedback on this so far. Anyone? On Tue, Jan 04, 2022 at 02:35:52PM +0100, Stefan Sperling wrote: > The function ieee80211_find_node_for_beacon() was added by reyk on 2005. > At the time, net80211 nodes were stored in a hash table keyed on hashes > the node's source MAC