Re: if calloc() needs nmemb and size, why doesn't freezero()?

2021-02-18 Thread Otto Moerbeek
On Thu, Feb 18, 2021 at 03:24:36PM -0600, Luke Small wrote: > However, calloc(ptr, nmemb, size) may have been called using smaller int > variable types which would overflow when multiplied. Where if the variables > storing the values passed to nmemb and size are less than or especially > equal to

Re: timecounting: use C99-style initialization for all timecounter structs

2021-02-18 Thread Greg Steuck
Scott Cheloha writes: > Hi, > > If the timecounter struct changes again in the future it will be > easier to make the change if we are using C99-style initialization > everywhere. In general I think C99-style initialization is easier to > read for larger structs. The timecounter struct

Re: if calloc() needs nmemb and size, why doesn't freezero()?

2021-02-18 Thread Luke Small
I had a drawn out email email describing passing by value and the function’s need to only perform size_t multiplication overload checking but not only do you not care I don’t think it’s worth my time to merely succeed in angering you. I love your work! On Thu, Feb 18, 2021 at 7:10 PM Theo de

timecounting: use C99-style initialization for all timecounter structs

2021-02-18 Thread Scott Cheloha
Hi, If the timecounter struct changes again in the future it will be easier to make the change if we are using C99-style initialization everywhere. In general I think C99-style initialization is easier to read for larger structs. The timecounter struct definitely qualifies as "larger". We

Re: malloc junking tweaks

2021-02-18 Thread Theo de Raadt
This diff will land in snapshots.

Re: if calloc() needs nmemb and size, why doesn't freezero()?

2021-02-18 Thread Theo de Raadt
Luke Small wrote: > However, calloc(ptr, nmemb, size) may have been called using smaller int > variable types which would overflow when multiplied. In which case the allocation would not have succeeded. > Where if the variables > storing the values passed to nmemb and size are less than or

Re: UNIX domain sockets: move garbage collector to `systqmp'

2021-02-18 Thread Vitaliy Makkoveev
ping > On 16 Feb 2021, at 16:13, Vitaliy Makkoveev wrote: > > There are no fallout reports after UNIX sockets unlocking, so I propose > to move moves garbage collector to `systqmp'. unp_gc() touches nothing > which requires kernel lock to be held. > > Index: sys/kern/uipc_usrreq.c >

Re: if calloc() needs nmemb and size, why doesn't freezero()?

2021-02-18 Thread Luke Small
However, calloc(ptr, nmemb, size) may have been called using smaller int variable types which would overflow when multiplied. Where if the variables storing the values passed to nmemb and size are less than or especially equal to their original values, I think it’d be good to state that:

Re: malloc junking tweaks

2021-02-18 Thread Stuart Henderson
On 2021/02/18 19:52, Otto Moerbeek wrote: > Any feedback? I've been doing i386 ports builds with this in, no problems seen there. The changes seem sane, and there's an easy way for people to disable the changes if they do run into problems. Does it make sense to put it into snaps?

Re: malloc junking tweaks

2021-02-18 Thread Otto Moerbeek
On Fri, Feb 12, 2021 at 02:48:34PM +0100, Otto Moerbeek wrote: > On Fri, Feb 12, 2021 at 02:18:08PM +0100, Otto Moerbeek wrote: > > > Hi, > > > > Curently, junking is done like this: > > > > - for small chunk, the whole chunk junked on free > > > > - for pages sized and larger, the first half

Re: further x509 cleanup in rpki-client

2021-02-18 Thread Theo Buehler
On Thu, Feb 18, 2021 at 02:41:39PM +0100, Claudio Jeker wrote: > Instead of iterating over all x509 extension and look for SKI and AKI use > X509_get_ext_d2i(). This reduces the complexity a fair bit. Also add > additional checks (e.g. make sure the extensions are non-critical). > More cleanup in

Re: rpki-client, create repo dir in parent process

2021-02-18 Thread Theo Buehler
On Thu, Feb 18, 2021 at 11:57:52AM +0100, Claudio Jeker wrote: > This diff moves the mkpath() call from the rsync child to the parent. > As a result the rsync process no longer needs cpath. It will also simplify > integration of RRDP since that will be another process. ok tb > > -- > :wq

Re: use /dev/dri/ in xenocara

2021-02-18 Thread Matthieu Herrb
On Thu, Feb 18, 2021 at 09:18:51PM +1100, Jonathan Gray wrote: Ok matthieu@. > Index: lib/libdrm/xf86drm.h > === > RCS file: /cvs/xenocara/lib/libdrm/xf86drm.h,v > retrieving revision 1.21 > diff -u -p -r1.21 xf86drm.h > ---

Re: use /dev/dri/ in xenocara

2021-02-18 Thread Damien Couderc
Le 18/02/2021 à 13:11, Jonathan Gray a écrit : On Thu, Feb 18, 2021 at 11:34:19AM +, Stuart Henderson wrote: On 2021/02/18 22:24, Jonathan Gray wrote: On Thu, Feb 18, 2021 at 12:01:28PM +0100, Mark Kettenis wrote: Date: Thu, 18 Feb 2021 21:18:51 +1100 From: Jonathan Gray I suspect that

Re: use /dev/dri/ in xenocara

2021-02-18 Thread Landry Breuil
On Thu, Feb 18, 2021 at 11:11:15PM +1100, Jonathan Gray wrote: > On Thu, Feb 18, 2021 at 11:34:19AM +, Stuart Henderson wrote: > > On 2021/02/18 22:24, Jonathan Gray wrote: > > > On Thu, Feb 18, 2021 at 12:01:28PM +0100, Mark Kettenis wrote: > > > > > Date: Thu, 18 Feb 2021 21:18:51 +1100 > >

further x509 cleanup in rpki-client

2021-02-18 Thread Claudio Jeker
Instead of iterating over all x509 extension and look for SKI and AKI use X509_get_ext_d2i(). This reduces the complexity a fair bit. Also add additional checks (e.g. make sure the extensions are non-critical). More cleanup in cert.c should follow but one step at a time. -- :wq Claudio Index:

Re: use /dev/dri/ in xenocara

2021-02-18 Thread Jonathan Gray
On Thu, Feb 18, 2021 at 11:34:19AM +, Stuart Henderson wrote: > On 2021/02/18 22:24, Jonathan Gray wrote: > > On Thu, Feb 18, 2021 at 12:01:28PM +0100, Mark Kettenis wrote: > > > > Date: Thu, 18 Feb 2021 21:18:51 +1100 > > > > From: Jonathan Gray > > > > > > I suspect that there are some

Re: use /dev/dri/ in xenocara

2021-02-18 Thread Jonathan Gray
On Thu, Feb 18, 2021 at 12:29:29PM +0100, Mark Kettenis wrote: > > Date: Thu, 18 Feb 2021 22:24:10 +1100 > > From: Jonathan Gray > > > > On Thu, Feb 18, 2021 at 12:01:28PM +0100, Mark Kettenis wrote: > > > > Date: Thu, 18 Feb 2021 21:18:51 +1100 > > > > From: Jonathan Gray > > > > > > I

Re: use /dev/dri/ in xenocara

2021-02-18 Thread Stuart Henderson
On 2021/02/18 22:24, Jonathan Gray wrote: > On Thu, Feb 18, 2021 at 12:01:28PM +0100, Mark Kettenis wrote: > > > Date: Thu, 18 Feb 2021 21:18:51 +1100 > > > From: Jonathan Gray > > > > I suspect that there are some ports that need to get their unveils > > updated if we do this. > > firefox

Re: use /dev/dri/ in xenocara

2021-02-18 Thread Mark Kettenis
> Date: Thu, 18 Feb 2021 22:24:10 +1100 > From: Jonathan Gray > > On Thu, Feb 18, 2021 at 12:01:28PM +0100, Mark Kettenis wrote: > > > Date: Thu, 18 Feb 2021 21:18:51 +1100 > > > From: Jonathan Gray > > > > I suspect that there are some ports that need to get their unveils > > updated if we do

Re: use /dev/dri/ in xenocara

2021-02-18 Thread Jonathan Gray
On Thu, Feb 18, 2021 at 12:01:28PM +0100, Mark Kettenis wrote: > > Date: Thu, 18 Feb 2021 21:18:51 +1100 > > From: Jonathan Gray > > I suspect that there are some ports that need to get their unveils > updated if we do this. firefox ports were updated. Not aware of anything else in ports that

Re: use /dev/dri/ in xenocara

2021-02-18 Thread Mark Kettenis
> Date: Thu, 18 Feb 2021 21:18:51 +1100 > From: Jonathan Gray I suspect that there are some ports that need to get their unveils updated if we do this. > Index: lib/libdrm/xf86drm.h > === > RCS file:

rpki-client, create repo dir in parent process

2021-02-18 Thread Claudio Jeker
This diff moves the mkpath() call from the rsync child to the parent. As a result the rsync process no longer needs cpath. It will also simplify integration of RRDP since that will be another process. -- :wq Claudio ? obj Index: extern.h

use /dev/dri/ in xenocara

2021-02-18 Thread Jonathan Gray
Index: lib/libdrm/xf86drm.h === RCS file: /cvs/xenocara/lib/libdrm/xf86drm.h,v retrieving revision 1.21 diff -u -p -r1.21 xf86drm.h --- lib/libdrm/xf86drm.h11 Feb 2021 10:27:08 - 1.21 +++ lib/libdrm/xf86drm.h

Re: if calloc() needs nmemb and size, why doesn't freezero()?

2021-02-18 Thread Otto Moerbeek
On Wed, Feb 17, 2021 at 11:05:49AM -0700, Theo de Raadt wrote: > Luke Small wrote: > > > I guess I always thought there'd be some more substantial overflow > > mitigation. > > You have to free with the exact same size as allocation. Small correction: the size may be smaller than the